Function at 0x473680
Capabilities:
Copy file
Delete file
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x3c4
push ebx
push ebp
push esi
mov esi, dword [esp + 0x3d4]
cmp esi, 1
push edi
mov ebp, ecx
jl 0x4738cc
lea eax, [esp + 0x2b8]
mov ecx, 0x593d48
push eax
call fcn.0042f650
mov eax, dword [esp + 0x2d0]
lea ecx, [eax + eax]
cmp ecx, esi
jg 0x4738cc
sub esi, eax
cmp esi, 1
mov dword [esp + 0x10], esi
jl 0x4738cc
mov edx, dword [ebp + 0x7ec]
lea eax, [ebp + 0x58]
push edx
push eax
lea eax, [ebp + 0x18]
lea ecx, [esp + 0x1b8]
push eax
push 0x5965b8
push str._shistory_s_s_d.hst
push 0x104
push ecx
call dword [sym.imp.MSVCRT.dll__snprintf]
mov edi, dword [sym.imp.MSVCRT.dll_fopen]
lea edx, [esp + 0x1cc]
push 0x581660
push edx
call edi
mov esi, eax
add esp, 0x24
test esi, esi
je 0x4738cc
lea eax, [esp + 0xa8]
push eax
call dword [sym.imp.MSVCRT.dll_tmpnam]
lea ecx, [esp + 0xac]
push 0x581698
push ecx
call edi
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x47375a
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c4
ret 4
mov ecx, 0x25
xor eax, eax
lea edi, [esp + 0x14]
push 0x3f
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.MSVCRT.dll_strncpy]
lea edx, [esp + 0x1c]
push str._C_opyright_2003__MetaQuotes_Software_Corp.
push edx
call edi
lea eax, [ebp + 0x58]
push 0xb
push eax
lea eax, [esp + 0x6c]
push eax
mov byte [esp + 0x6f], 0
call edi
mov edx, dword [ebp + 0x858]
mov ecx, dword [ebp + 0x7ec]
mov eax, dword [ebp + 0x808]
mov dword [esp + 0x88], edx
push ebx
mov dword [esp + 0x80], ecx
mov ecx, dword [ebp + 0xc0]
push 1
lea edx, [esp + 0x34]
push 0x94
push edx
mov byte [esp + 0x8b], 0
mov dword [esp + 0x3c], 0x190
mov dword [esp + 0x94], eax
mov dword [esp + 0x90], ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x28
cmp eax, 1
je 0x473800
push esi
mov esi, dword [sym.imp.MSVCRT.dll_fclose]
call esi
push ebx
call esi
add esp, 8
jmp 0x4738be
mov eax, dword [esp + 0x10]
push 0
lea ecx, [eax + eax*4]
lea edx, [eax + ecx*2]
lea eax, [edx*4 + 0x94]
push eax
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
push 0x10040
call fcn.004c2e90
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x473858
push esi
mov esi, dword [sym.imp.MSVCRT.dll_fclose]
call esi
push ebx
call esi
add esp, 8
lea ecx, [esp + 0xa8]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c4
ret 4
test byte [esi + 0xc], 0x10
jne 0x473891
push esi
push 0x10000
push 1
push edi
call dword [sym.imp.MSVCRT.dll_fread]
mov ebp, eax
mov al, byte [esi + 0xc]
add esp, 0x10
test al, 0x20
jne 0x4738d9
push ebx
push ebp
push 1
push edi
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, ebp
jne 0x473909
test byte [esi + 0xc], 0x10
je 0x47385e
push edi
call fcn.004c2eb0
push esi
mov esi, dword [sym.imp.MSVCRT.dll_fclose]
call esi
push ebx
call esi
add esp, 0xc
lea ecx, [esp + 0x1b0]
lea edx, [esp + 0xa8]
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea eax, [esp + 0xa8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c4
ret 4
push edi
call fcn.004c2eb0
push esi
mov esi, dword [sym.imp.MSVCRT.dll_fclose]
call esi
push ebx
call esi
add esp, 0xc
lea edx, [esp + 0xa8]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c4
ret 4
push edi
call fcn.004c2eb0
push esi
mov esi, dword [sym.imp.MSVCRT.dll_fclose]
call esi
push ebx
call esi
add esp, 0xc
jmp 0x4738be