25,33 → 25,10 |
|
|
/////////////////////////// |
// Ïàðàìåòðû ôàéëà // |
/////////////////////////// |
f70 getinfo_file_70; |
BDVK getinfo_file_info; |
dword GetFileInfo(dword file_name) |
{ |
getinfo_file_70.func = 5; |
getinfo_file_70.param1 = |
getinfo_file_70.param2 = |
getinfo_file_70.param3 = |
getinfo_file_70.param4 = #getinfo_file_info; |
getinfo_file_70.rezerv = 0; |
getinfo_file_70.name = file_name; |
$mov eax,70 |
$mov ebx,#getinfo_file_70.func |
$int 0x40 |
IF (EAX == 0) { |
EAX = #getinfo_file_info; |
} |
} |
|
|
/////////////////////////// |
// Çàïóñê ïðîãðàììû // |
/////////////////////////// |
f70 run_file_70; |
int RunProgram(dword run_path, run_param) |
:int RunProgram(dword run_path, run_param) |
{ |
run_file_70.func = 7; |
run_file_70.param1 = |
63,7 → 40,6 |
$mov eax,70 |
$mov ebx,#run_file_70.func |
$int 0x40 |
RETURN EAX; |
} |
|
/////////////////////////// |
70,7 → 46,7 |
// Ñîçäàíèå ïàïêè // |
/////////////////////////// |
f70 create_dir_70; |
void CreateFolder(dword new_folder_path) |
:int CreateFolder(dword new_folder_path) |
{ |
create_dir_70.func = 9; |
create_dir_70.param1 = |
88,7 → 64,7 |
// Óäàëåíèå ôàéëà/ïàïêè // |
//////////////////////////// |
f70 del_file_70; |
void DeleteFile(dword del_file_path) |
:int DeleteFile(dword del_file_path) |
{ |
del_file_70.func = 8; |
del_file_70.param1 = |
106,25 → 82,43 |
// Ïðî÷èòàòü ôàéë // |
//////////////////////////// |
f70 read_file_70; |
int ReadFile(dword pos, file_size, read_buffer, file_path) |
:int ReadFile(dword read_pos, read_file_size, read_buffer, read_file_path) |
{ |
read_file_70.func = 0; |
read_file_70.param1 = pos; |
read_file_70.param1 = read_pos; |
read_file_70.param2 = 0; |
read_file_70.param3 = file_size; |
read_file_70.param3 = read_file_size; |
read_file_70.param4 = read_buffer; |
read_file_70.rezerv = 0; |
read_file_70.name = file_path; |
read_file_70.name = read_file_path; |
$mov eax,70 |
$mov ebx,#read_file_70.func |
$int 0x40 |
} |
|
//////////////////////////// |
// Çàïèñàòü ôàéë // |
//////////////////////////// |
f70 write_file_70; |
:int WriteFile(dword write_file_size, write_buffer, write_file_path) |
{ |
write_file_70.func = 2; |
write_file_70.param1 = 0; |
write_file_70.param2 = 0; |
write_file_70.param3 = write_file_size; |
write_file_70.param4 = write_buffer; |
write_file_70.rezerv = 0; |
write_file_70.name = write_file_path; |
$mov eax,70 |
$mov ebx,#write_file_70.func |
$int 0x40 |
} |
|
/////////////////////////// |
// Ïðî÷èòàòü ïàïêó // |
/////////////////////////// |
f70 read_dir_70; |
int ReadDir(dword file_count, read_buffer, dir_path) |
:int ReadDir(dword file_count, read_buffer, dir_path) |
{ |
read_dir_70.func = 1; |
read_dir_70.param1 = |
138,45 → 132,45 |
$int 0x40 |
} |
|
|
/////////////////////////// |
// Ñêîïèðîâàòü ôàéë // |
// Ïàðàìåòðû ôàéëà // |
/////////////////////////// |
f70 CopyFile_f; |
inline fastcall dword CopyFile(dword EBX,ECX) |
f70 getinfo_file_70; |
BDVK getinfo_file_info; |
:dword GetFileInfo(dword file_path) |
{ |
BDVK CopyFile_atr; |
dword s=EBX, d=ECX, cBufer=0; |
CopyFile_f.func = 5; |
CopyFile_f.param1 = 0; |
CopyFile_f.param2 = 0; |
CopyFile_f.param3 = 0; |
CopyFile_f.param4 = #CopyFile_atr; |
CopyFile_f.rezerv = 0; |
CopyFile_f.name = s; |
getinfo_file_70.func = 5; |
getinfo_file_70.param1 = |
getinfo_file_70.param2 = |
getinfo_file_70.param3 = 0; |
getinfo_file_70.param4 = #getinfo_file_info; |
getinfo_file_70.rezerv = 0; |
getinfo_file_70.name = file_path; |
$mov eax, 70 |
$mov ebx, #CopyFile_f |
$mov ebx,#getinfo_file_70.func |
$int 0x40 |
} |
|
if (!EAX) |
|
/////////////////////////// |
// Ñêîïèðîâàòü ôàéë // |
/////////////////////////// |
:int CopyFile(dword copy_from, copy_in) |
{ |
cBufer = malloc(CopyFile_atr.sizelo); |
ReadFile(dword 0, CopyFile_atr.sizelo, cBufer, s); |
BDVK CopyFile_atr; |
dword cBufer=0; |
|
IF (!EAX) |
if (! GetFileInfo(copy_from)) |
{ |
CopyFile_f.func = 2; |
CopyFile_f.param1 = 0; |
CopyFile_f.param2 = 0; |
CopyFile_f.param3 = CopyFile_atr.sizelo; |
CopyFile_f.param4 = cBufer; |
CopyFile_f.rezerv = 0; |
CopyFile_f.name = d; |
$mov eax, 70 |
$mov ebx, #CopyFile_f |
$int 0x40 |
mem_Init(); |
cBufer = mem_Alloc(CopyFile_atr.sizelo); |
if (! ReadFile(dword 0, CopyFile_atr.sizelo, cBufer, copy_from)) |
if (! WriteFile(CopyFile_atr.sizelo, cBufer, copy_in)) return 1; |
} |
|
return 0; |
} |
} |
|
|
//Asper |
192,4 → 186,4 |
$mov eax,70 |
$mov ebx,#read_file_70.func |
$int 0x40 |
} |
} |