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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x405810
push 0x404a00
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x54
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x58], edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 4], edi
push edi
push 0x80
push 3
push edi
push 3
push 0x80000000
mov eax, dword [ebp + 8]
push eax
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
call esi
mov dword [ebp - 0x28], eax
cmp eax, 0xffffffff
jne 0x40390d
push 0x40a2b0
push 0x40f470
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x1c], edi
jmp 0x403b7b
lea ecx, [ebp - 0x54]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x403931
push 0x40a294
push 0x40f470
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
jmp 0x403b7b
mov edx, dword [ebp - 0x50]
push edx
mov eax, dword [ebp - 0x54]
push eax
push 0x409fc8
call fcn.00401000
add esp, 0xc
push edi
push 0x80
push 2
push edi
push 3
push 0xc0000000
mov ecx, dword [ebp + 0xc]
push ecx
call esi
mov dword [ebp - 0x30], eax
cmp eax, 0xffffffff
jne 0x40397f
push 0x40a270
push 0x40f470
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x1c], edi
jmp 0x403b7b
push edi
push 0x100000
mov esi, dword [ebp - 0x50]
push esi
mov edi, dword [ebp - 0x54]
push edi
call fcn.00404a10
mov ebx, eax
mov dword [ebp - 0x4c], ebx
push 0
push 0x100000
push esi
push edi
call fcn.004048d0
mov edi, eax
mov dword [ebp - 0x48], edi
mov esi, 0x40fc70
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x34], 0
cmp dword [ebp - 0x34], ebx
push 0
lea edx, [ebp - 0x58]
push edx
jae 0x403a35
push 0x100000
push esi
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0x58], 0x100000
jne 0x403a46
mov eax, dword [ebp - 0x34]
shl eax, 0x14
mov dword [ebp - 0x24], eax
xor ecx, ecx
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp + 0x10]
push edx
push 0x100000
push esi
push ecx
push eax
call fcn.00401060
push 0
lea eax, [ebp - 0x58]
push eax
push 0x100000
push esi
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 0x58], 0x100000
je 0x403a30
push 0x40a254
push 0x40f470
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
jmp 0x403b7b
inc dword [ebp - 0x34]
jmp 0x4039b9
push edi
push esi
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0x58], edi
je 0x403a5b
push 0x40a234
push 0x40f470
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
jmp 0x403b7b
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x28], 0
xor edx, edx
mov eax, dword [ebp - 0x54]
sub eax, dword [0x409c70]
mov ecx, dword [ebp - 0x50]
sbb ecx, edx
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], ecx
shl ebx, 0x14
mov eax, ebx
mov dword [ebp - 0x24], eax
xor ecx, ecx
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp + 0x10]
push edx
mov edx, edi
sub edx, dword [0x409c70]
push edx
push esi
push ecx
push eax
call fcn.00401060
mov edx, dword [0x409c70]
xor ebx, ebx
mov eax, dword [ebp - 0x54]
sub eax, edx
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x50]
sbb ecx, ebx
mov dword [ebp - 0x20], ecx
mov ebx, dword [ebp + 0x10]
push ebx
push edx
mov edx, edi
sub edx, dword [0x409c70]
add edx, esi
push edx
push ecx
push eax
call fcn.00401060
lea eax, [ebp - 0x3c]
push eax
mov ecx, edi
sub ecx, dword [0x409c70]
add ecx, esi
push ecx
call fcn.00403ca0
mov edx, dword [ebp - 0x38]
push edx
mov eax, dword [ebp - 0x3c]
push eax
push 0x40a210
call fcn.00401000
add esp, 0xc
xor ebx, ebx
mov dword [ebp - 0x64], ebx
cmp dword [0xe0fc70], ebx
jne 0x403b1e
push ebx
push 0x100000
mov ecx, dword [ebp - 0x38]
push ecx
mov edx, dword [ebp - 0x3c]
push edx
call fcn.004048d0
mov edi, eax
mov dword [ebp - 0x64], edi
push edi
push 0x40a1ec
call fcn.00401000
add esp, 8
push ebx
lea eax, [ebp - 0x58]
push eax
push edi
push esi
mov esi, dword [ebp - 0x30]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 0x58], edi
je 0x403b57
push 0x40a1c8
push 0x40f470
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
jmp 0x403b7b
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], ebx
push 0x409f8c
push 0x40f470
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov dword [ebp - 0x1c], 1
mov dword [ebp - 4], 0xffffffff
call fcn.00403b9d
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 0xc