Rev 2155 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2155 | Rev 2495 | ||
---|---|---|---|
1 | struct f70{ |
1 | struct f70{ |
2 | dword func; |
2 | dword func; |
3 | dword param1; |
3 | dword param1; |
4 | dword param2; |
4 | dword param2; |
5 | dword param3; |
5 | dword param3; |
6 | dword param4; |
6 | dword param4; |
7 | char rezerv; |
7 | char rezerv; |
8 | dword name; |
8 | dword name; |
9 | }; |
9 | }; |
10 | 10 | ||
11 | struct BDVK{ |
11 | struct BDVK{ |
12 | dword attr; |
12 | dword attr; |
13 | byte type_name; |
13 | byte type_name; |
14 | byte rez1, rez2, rez3; |
14 | byte rez1, rez2, rez3; |
15 | dword timecreate; |
15 | dword timecreate; |
16 | dword datecreate; |
16 | dword datecreate; |
17 | dword timelastaccess; |
17 | dword timelastaccess; |
18 | dword datelastaccess; |
18 | dword datelastaccess; |
19 | dword timelastedit; |
19 | dword timelastedit; |
20 | dword datelastedit; |
20 | dword datelastedit; |
21 | dword sizelo; |
21 | dword sizelo; |
22 | dword sizehi; |
22 | dword sizehi; |
23 | char name[518]; |
23 | char name[518]; |
24 | }; |
24 | }; |
25 | 25 | ||
26 | 26 | ||
27 | /////////////////////////// |
27 | /////////////////////////// |
28 | // Ïàðàìåòðû ôàéëà // |
28 | // Ïàðàìåòðû ôàéëà // |
29 | /////////////////////////// |
29 | /////////////////////////// |
30 | f70 getinfo_file_70; |
30 | f70 getinfo_file_70; |
31 | BDVK getinfo_file_info; |
31 | BDVK getinfo_file_info; |
32 | dword GetFileInfo(dword file_name) |
32 | dword GetFileInfo(dword file_name) |
33 | { |
33 | { |
34 | getinfo_file_70.func = 5; |
34 | getinfo_file_70.func = 5; |
35 | getinfo_file_70.param1 = |
35 | getinfo_file_70.param1 = |
36 | getinfo_file_70.param2 = |
36 | getinfo_file_70.param2 = |
37 | getinfo_file_70.param3 = |
37 | getinfo_file_70.param3 = |
38 | getinfo_file_70.param4 = #getinfo_file_info; |
38 | getinfo_file_70.param4 = #getinfo_file_info; |
39 | getinfo_file_70.rezerv = 0; |
39 | getinfo_file_70.rezerv = 0; |
40 | getinfo_file_70.name = file_name; |
40 | getinfo_file_70.name = file_name; |
41 | $mov eax,70 |
41 | $mov eax,70 |
42 | $mov ebx,#getinfo_file_70.func |
42 | $mov ebx,#getinfo_file_70.func |
43 | $int 0x40 |
43 | $int 0x40 |
44 | IF (EAX == 0) { |
44 | IF (EAX == 0) { |
45 | EAX = #getinfo_file_info; |
45 | EAX = #getinfo_file_info; |
46 | } |
46 | } |
47 | } |
47 | } |
48 | 48 | ||
49 | 49 | ||
50 | /////////////////////////// |
50 | /////////////////////////// |
51 | // Çàïóñê ïðîãðàììû // |
51 | // Çàïóñê ïðîãðàììû // |
52 | /////////////////////////// |
52 | /////////////////////////// |
53 | f70 run_file_70; |
53 | f70 run_file_70; |
54 | int RunProgram(dword run_path, run_param) |
54 | int RunProgram(dword run_path, run_param) |
55 | { |
55 | { |
56 | run_file_70.func = 7; |
56 | run_file_70.func = 7; |
57 | run_file_70.param1 = |
57 | run_file_70.param1 = |
58 | run_file_70.param3 = |
58 | run_file_70.param3 = |
59 | run_file_70.param4 = |
59 | run_file_70.param4 = |
60 | run_file_70.rezerv = 0; |
60 | run_file_70.rezerv = 0; |
61 | run_file_70.param2 = run_param; |
61 | run_file_70.param2 = run_param; |
62 | run_file_70.name = run_path; |
62 | run_file_70.name = run_path; |
63 | $mov eax,70 |
63 | $mov eax,70 |
64 | $mov ebx,#run_file_70.func |
64 | $mov ebx,#run_file_70.func |
65 | $int 0x40 |
65 | $int 0x40 |
66 | RETURN EAX; |
66 | RETURN EAX; |
67 | } |
67 | } |
68 | 68 | ||
69 | /////////////////////////// |
69 | /////////////////////////// |
70 | // Ñîçäàíèå ïàïêè // |
70 | // Ñîçäàíèå ïàïêè // |
71 | /////////////////////////// |
71 | /////////////////////////// |
72 | f70 create_dir_70; |
72 | f70 create_dir_70; |
73 | void CreateFolder(dword new_folder_path) |
73 | void CreateFolder(dword new_folder_path) |
74 | { |
74 | { |
75 | create_dir_70.func = 9; |
75 | create_dir_70.func = 9; |
76 | create_dir_70.param1 = |
76 | create_dir_70.param1 = |
77 | create_dir_70.param2 = |
77 | create_dir_70.param2 = |
78 | create_dir_70.param3 = |
78 | create_dir_70.param3 = |
79 | create_dir_70.param4 = |
79 | create_dir_70.param4 = |
80 | create_dir_70.rezerv = 0; |
80 | create_dir_70.rezerv = 0; |
81 | create_dir_70.name = new_folder_path; |
81 | create_dir_70.name = new_folder_path; |
82 | $mov eax,70 |
82 | $mov eax,70 |
83 | $mov ebx,#create_dir_70.func |
83 | $mov ebx,#create_dir_70.func |
84 | $int 0x40 |
84 | $int 0x40 |
85 | } |
85 | } |
86 | 86 | ||
87 | //////////////////////////// |
87 | //////////////////////////// |
88 | // Óäàëåíèå ôàéëà/ïàïêè // |
88 | // Óäàëåíèå ôàéëà/ïàïêè // |
89 | //////////////////////////// |
89 | //////////////////////////// |
90 | f70 del_file_70; |
90 | f70 del_file_70; |
91 | void DeleteFile(dword del_file_path) |
91 | void DeleteFile(dword del_file_path) |
92 | { |
92 | { |
93 | del_file_70.func = 8; |
93 | del_file_70.func = 8; |
94 | del_file_70.param1 = |
94 | del_file_70.param1 = |
95 | del_file_70.param2 = |
95 | del_file_70.param2 = |
96 | del_file_70.param3 = |
96 | del_file_70.param3 = |
97 | del_file_70.param4 = |
97 | del_file_70.param4 = |
98 | del_file_70.rezerv = 0; |
98 | del_file_70.rezerv = 0; |
99 | del_file_70.name = del_file_path; |
99 | del_file_70.name = del_file_path; |
100 | $mov eax,70 |
100 | $mov eax,70 |
101 | $mov ebx,#del_file_70.func |
101 | $mov ebx,#del_file_70.func |
102 | $int 0x40 |
102 | $int 0x40 |
103 | } |
103 | } |
104 | 104 | ||
105 | //////////////////////////// |
105 | //////////////////////////// |
106 | // Ïðî÷èòàòü ôàéë // |
106 | // Ïðî÷èòàòü ôàéë // |
107 | //////////////////////////// |
107 | //////////////////////////// |
108 | f70 read_file_70; |
108 | f70 read_file_70; |
109 | void ReadFile(dword pos, file_size, read_buffer, file_path) |
109 | int ReadFile(dword pos, file_size, read_buffer, file_path) |
110 | { |
110 | { |
111 | read_file_70.func = 0; |
111 | read_file_70.func = 0; |
112 | read_file_70.param1 = pos; |
112 | read_file_70.param1 = pos; |
113 | read_file_70.param2 = 0; |
113 | read_file_70.param2 = 0; |
114 | read_file_70.param3 = file_size; |
114 | read_file_70.param3 = file_size; |
115 | read_file_70.param4 = read_buffer; |
115 | read_file_70.param4 = read_buffer; |
116 | read_file_70.rezerv = 0; |
116 | read_file_70.rezerv = 0; |
117 | read_file_70.name = file_path; |
117 | read_file_70.name = file_path; |
118 | $mov eax,70 |
118 | $mov eax,70 |
119 | $mov ebx,#read_file_70.func |
119 | $mov ebx,#read_file_70.func |
120 | $int 0x40 |
120 | $int 0x40 |
121 | } |
121 | } |
122 | 122 | ||
123 | /////////////////////////// |
123 | /////////////////////////// |
124 | // Ïðî÷èòàòü ïàïêó // |
124 | // Ïðî÷èòàòü ïàïêó // |
125 | /////////////////////////// |
125 | /////////////////////////// |
126 | f70 read_dir_70; |
126 | f70 read_dir_70; |
127 | void ReadDir(dword file_count, read_buffer, dir_path) |
127 | int ReadDir(dword file_count, read_buffer, dir_path) |
128 | { |
128 | { |
129 | read_dir_70.func = 1; |
129 | read_dir_70.func = 1; |
130 | read_dir_70.param1 = |
130 | read_dir_70.param1 = |
131 | read_dir_70.param2 = |
131 | read_dir_70.param2 = |
132 | read_dir_70.rezerv = 0; |
132 | read_dir_70.rezerv = 0; |
133 | read_dir_70.param3 = file_count; |
133 | read_dir_70.param3 = file_count; |
134 | read_dir_70.param4 = read_buffer; |
134 | read_dir_70.param4 = read_buffer; |
135 | read_dir_70.name = dir_path; |
135 | read_dir_70.name = dir_path; |
136 | $mov eax,70 |
136 | $mov eax,70 |
137 | $mov ebx,#read_dir_70.func |
137 | $mov ebx,#read_dir_70.func |
138 | $int 0x40 |
138 | $int 0x40 |
139 | } |
139 | } |
140 | 140 | ||
141 | /////////////////////////// |
141 | /////////////////////////// |
142 | // Ñêîïèðîâàòü ôàéë // |
142 | // Ñêîïèðîâàòü ôàéë // |
143 | /////////////////////////// |
143 | /////////////////////////// |
144 | f70 CopyFile_f; |
144 | f70 CopyFile_f; |
145 | inline fastcall dword CopyFile(dword EBX,ECX) |
145 | inline fastcall dword CopyFile(dword EBX,ECX) |
146 | { |
146 | { |
147 | BDVK CopyFile_atr; |
147 | BDVK CopyFile_atr; |
148 | dword s=EBX, d=ECX, cBufer=0; |
148 | dword s=EBX, d=ECX, cBufer=0; |
149 | CopyFile_f.func = 5; |
149 | CopyFile_f.func = 5; |
150 | CopyFile_f.param1 = 0; |
150 | CopyFile_f.param1 = 0; |
151 | CopyFile_f.param2 = 0; |
151 | CopyFile_f.param2 = 0; |
152 | CopyFile_f.param3 = 0; |
152 | CopyFile_f.param3 = 0; |
153 | CopyFile_f.param4 = #CopyFile_atr; |
153 | CopyFile_f.param4 = #CopyFile_atr; |
154 | CopyFile_f.rezerv = 0; |
154 | CopyFile_f.rezerv = 0; |
155 | CopyFile_f.name = s; |
155 | CopyFile_f.name = s; |
156 | $mov eax, 70 |
156 | $mov eax, 70 |
157 | $mov ebx, #CopyFile_f |
157 | $mov ebx, #CopyFile_f |
158 | $int 0x40 |
158 | $int 0x40 |
159 | 159 | ||
160 | if (!EAX) |
160 | if (!EAX) |
161 | { |
161 | { |
162 | cBufer = malloc(CopyFile_atr.sizelo); |
162 | cBufer = malloc(CopyFile_atr.sizelo); |
163 | ReadFile(dword 0, CopyFile_atr.sizelo, cBufer, s); |
163 | ReadFile(dword 0, CopyFile_atr.sizelo, cBufer, s); |
164 | 164 | ||
165 | IF (!EAX) |
165 | IF (!EAX) |
166 | { |
166 | { |
167 | CopyFile_f.func = 2; |
167 | CopyFile_f.func = 2; |
168 | CopyFile_f.param1 = 0; |
168 | CopyFile_f.param1 = 0; |
169 | CopyFile_f.param2 = 0; |
169 | CopyFile_f.param2 = 0; |
170 | CopyFile_f.param3 = CopyFile_atr.sizelo; |
170 | CopyFile_f.param3 = CopyFile_atr.sizelo; |
171 | CopyFile_f.param4 = cBufer; |
171 | CopyFile_f.param4 = cBufer; |
172 | CopyFile_f.rezerv = 0; |
172 | CopyFile_f.rezerv = 0; |
173 | CopyFile_f.name = d; |
173 | CopyFile_f.name = d; |
174 | $mov eax, 70 |
174 | $mov eax, 70 |
175 | $mov ebx, #CopyFile_f |
175 | $mov ebx, #CopyFile_f |
176 | $int 0x40 |
176 | $int 0x40 |
177 | } |
177 | } |
178 | } |
178 | } |
179 | } |
179 | } |
180 | 180 | ||
181 | 181 | ||
182 | //Asper |
182 | //Asper |
183 | void ReadAttributes(dword read_buffer, file_path) |
183 | void ReadAttributes(dword read_buffer, file_path) |
184 | { |
184 | { |
185 | read_file_70.func = 5; |
185 | read_file_70.func = 5; |
186 | read_file_70.param1 = 0; |
186 | read_file_70.param1 = 0; |
187 | read_file_70.param2 = 0; |
187 | read_file_70.param2 = 0; |
188 | read_file_70.param3 = 0; |
188 | read_file_70.param3 = 0; |
189 | read_file_70.param4 = read_buffer; |
189 | read_file_70.param4 = read_buffer; |
190 | read_file_70.rezerv = 0; |
190 | read_file_70.rezerv = 0; |
191 | read_file_70.name = file_path; |
191 | read_file_70.name = file_path; |
192 | $mov eax,70 |
192 | $mov eax,70 |
193 | $mov ebx,#read_file_70.func |
193 | $mov ebx,#read_file_70.func |
194 | $int 0x40 |
194 | $int 0x40 |
195 | } |
195 | } |