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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4057f0
push 0x404a00
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x38
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 4], ebx
mov ecx, 0x40000
xor eax, eax
mov edi, 0x40fc70
rep stosd dword es:[edi], eax
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
mov eax, dword [ebp + 8]
push eax
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
call esi
mov edi, eax
mov dword [ebp - 0x24], edi
cmp edi, 0xffffffff
jne 0x4031ff
push 0x40a01c
push 0x40f470
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
xor edi, edi
mov dword [ebp - 0x24], edi
mov ebx, dword [ebp - 0x2c]
jmp 0x403390
push ebx
push 0x80
push 2
push ebx
push 1
push 0xc0000000
mov ecx, dword [ebp + 0xc]
push ecx
call esi
mov ebx, eax
mov dword [ebp - 0x2c], ebx
cmp ebx, 0xffffffff
jne 0x403239
push 0x40a008
push 0x40f470
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
xor ebx, ebx
mov dword [ebp - 0x2c], ebx
jmp 0x403390
lea edx, [ebp - 0x44]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x40325d
push 0x409ff0
push 0x40f470
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
jmp 0x403390
mov eax, dword [ebp - 0x40]
push eax
mov ecx, dword [ebp - 0x44]
push ecx
push 0x409fc8
call fcn.00401000
add esp, 0xc
mov esi, 0x40fc70
mov dword [ebp - 0x28], esi
push 0
push 0x100000
mov edx, dword [ebp - 0x40]
push edx
mov eax, dword [ebp - 0x44]
push eax
call fcn.00404a10
mov dword [ebp - 0x38], eax
push 0
push 0x100000
mov ecx, dword [ebp - 0x40]
push ecx
mov edx, dword [ebp - 0x44]
push edx
call fcn.004048d0
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], 0
mov eax, dword [ebp - 0x30]
cmp eax, dword [ebp - 0x38]
push 0
jae 0x403309
lea ecx, [ebp - 0x3c]
push ecx
push 0x100000
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0x3c], 0x100000
je 0x4032e8
push 0x409fb4
push 0x40f470
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
jmp 0x403390
push 0
lea edx, [ebp - 0x3c]
push edx
push 0x100000
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 0x3c], 0x100000
jne 0x403358
inc dword [ebp - 0x30]
jmp 0x4032af
lea eax, [ebp - 0x3c]
push eax
mov ecx, dword [ebp - 0x34]
push ecx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 0x34]
cmp dword [ebp - 0x3c], edx
je 0x403333
push 0x409fb4
push 0x40f470
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
jmp 0x403390
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
mov dword [ebp - 0x24], edi
push edi
lea eax, [ebp - 0x3c]
push eax
mov ecx, dword [ebp - 0x34]
push ecx
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp - 0x34]
cmp dword [ebp - 0x3c], edx
je 0x40336a
push 0x409f9c
push 0x40f470
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
jmp 0x403390
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x1c], 1
push 0x409f8c
push 0x40f470
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
xor ebx, ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 4], 0xffffffff
call fcn.004033b8
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8