Function at 0x4019e0
Capabilities:
Copy file
Get file size
Read file on windows
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x40e738
mov eax, dword fs:[0]
push eax
sub esp, 0x428
mov eax, dword [0x413090]
xor eax, esp
mov dword [esp + 0x420], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x413090]
xor eax, esp
push eax
lea eax, [esp + 0x43c]
mov dword fs:[0], eax
mov dword [esp + 0x444], 2
mov eax, dword [esp + 0x488]
xor ebp, ebp
mov ebx, 8
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], 0xff99ff99
cmp dword [esp + 0x49c], ebx
jae 0x401a50
lea eax, [esp + 0x488]
push eax
lea eax, [esp + 0x28]
push 0x410cb0
push eax
call fcn.00404a3b
push 0x206
lea edx, [esp + 0x23e]
xor ecx, ecx
push ebp
push edx
mov word [esp + 0x244], cx
call fcn.00405360
add esp, 0x18
push 0x104
lea eax, [esp + 0x230]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov eax, dword [esp + 0x46c]
cmp dword [esp + 0x480], ebx
jae 0x401aab
lea eax, [esp + 0x46c]
push ebp
push eax
lea ecx, [esp + 0x234]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x401bc2
mov eax, dword [esp + 0x450]
cmp dword [esp + 0x464], ebx
jae 0x401ada
lea eax, [esp + 0x450]
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push ebp
push 0x80
push 3
push ebp
push 3
push 0x80000000
push eax
call esi
mov edi, eax
cmp edi, 0xffffffff
je 0x401bb2
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
mov dword [esp + 0x24], eax
call fcn.004045dc
add esp, 4
push ebp
mov ebx, eax
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x1c]
push edx
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401b9b
cmp dword [esp + 0x480], 8
mov eax, dword [esp + 0x46c]
jae 0x401b44
lea eax, [esp + 0x46c]
push ebp
push 0x80
push 3
push ebp
push 1
push 0x40000000
push eax
call esi
mov esi, eax
cmp esi, 0xffffffff
je 0x401b9b
push 2
push ebp
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [esp + 0x20]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
lea ecx, [esp + 0x1c]
push ecx
push edx
push ebx
push esi
call ebp
push 0
lea eax, [esp + 0x1c]
push eax
push 0x210
lea ecx, [esp + 0x28]
push ecx
push esi
call ebp
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebp, ebp
push ebx
call fcn.004045f6
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, 8
jmp 0x401bc2
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x401bc2
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [esp + 0x464], ebx
jb 0x401bdb
mov edx, dword [esp + 0x450]
push edx
call fcn.004045f6
add esp, 4
xor eax, eax
mov esi, 7
mov dword [esp + 0x464], esi
mov dword [esp + 0x460], ebp
mov word [esp + 0x450], ax
cmp dword [esp + 0x480], ebx
jb 0x401c11
mov ecx, dword [esp + 0x46c]
push ecx
call fcn.004045f6
add esp, 4
xor edx, edx
mov dword [esp + 0x480], esi
mov dword [esp + 0x47c], ebp
mov word [esp + 0x46c], dx
cmp dword [esp + 0x49c], ebx
jb 0x401c42
mov eax, dword [esp + 0x488]
push eax
call fcn.004045f6
add esp, 4
mov ecx, dword [esp + 0x43c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x420]
xor ecx, esp
call fcn.004045e7
add esp, 0x434
ret