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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1114
call fcn.00414fd0
mov eax, dword [0x41d004]
xor eax, esp
mov dword [esp + 0x1110], eax
mov eax, dword [ebp + 8]
xorps xmm0, xmm0
push ebx
push esi
push edi
push 0
push 0x8000000
push 3
push 0
push 1
push 0xc0000000
push eax
mov dword [esp + 0x50], ecx
mov dword [esp + 0x54], 0
movlpd qword [esp + 0x5c], xmm0
movlpd qword [esp + 0x34], xmm0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40728c
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1110]
xor ecx, esp
call fcn.00407f82
mov esp, ebp
pop ebp
ret 4
lea eax, [esp + 0x40]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov esi, dword [esp + 0x40]
mov eax, esi
mov ebx, dword [esp + 0x44]
or eax, ebx
mov dword [esp + 0x30], esi
jne 0x4072b7
mov dword [esp + 0x38], 0xe8
jmp 0x4074ad
test ebx, ebx
jl 0x4072d0
jg 0x4072c5
cmp esi, 0xa00000
jb 0x4072d0
mov esi, 0xa00000
xor ebx, ebx
mov dword [esp + 0x30], esi
mov ecx, dword [esp + 0x34]
mov eax, dword [ecx + 0x44]
lea edx, [ecx + 0x44]
mov dword [esp + 0x10cc], eax
mov dword [esp + 0x110c], 0x100
mov eax, dword [ecx + 0x48]
mov dword [esp + 0x10d0], eax
mov eax, dword [ecx + 0x4c]
mov dword [esp + 0x10d4], eax
mov eax, dword [ecx + 0x50]
mov dword [esp + 0x10d8], eax
mov eax, dword [ecx + 0x54]
mov dword [esp + 0x10dc], eax
mov eax, dword [ecx + 0x58]
mov dword [esp + 0x10e0], eax
mov eax, dword [ecx + 0x5c]
mov dword [esp + 0x10e4], eax
mov eax, dword [ecx + 0x60]
lea ecx, [esp + 0x48]
mov dword [esp + 0x1110], 0x100
mov dword [esp + 0x10e8], eax
call fcn.00405ae0
push 0x40
lea eax, [esp + 0x10d0]
push 0
push eax
call fcn.00409790
add esp, 0xc
mov eax, esi
add eax, 0x1ffff
adc ebx, 0
push 0
push 0x20000
push ebx
push eax
call fcn.00414dd0
mov dword [esp + 0x10], eax
cmp eax, 1
jle 0x4073a7
push 0x20000
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
mov dword [esp + 0x24], 0
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], 0
jmp 0x4073d5
push esi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
mov dword [esp + 0x24], 0
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], 0
test eax, eax
jle 0x407474
dec eax
xor edx, edx
mov dword [esp + 0x3c], eax
xor ecx, ecx
mov eax, dword [esp + 0x1c]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x18], eax
mov eax, esi
mov esi, 0x20000
sub eax, edx
cmp ecx, dword [esp + 0x3c]
push 0
cmove esi, eax
lea eax, [esp + 0x28]
push eax
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
push ebx
push ebx
lea edx, [esp + 0x54]
call fcn.00405ea0
add esp, 0xc
push 0
push 0
push dword [esp + 0x14]
push dword [esp + 0x24]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea eax, [esp + 0x18]
push eax
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esp + 0x28]
mov eax, esi
mov esi, dword [esp + 0x30]
cdq
add dword [esp + 0x18], eax
adc dword [esp + 0xc], edx
inc ecx
mov edx, dword [esp + 0x2c]
add edx, 0x20000
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], edx
cmp ecx, dword [esp + 0x10]
jl 0x4073f6
test ebx, ebx
je 0x407488
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push 2
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [esp + 0x34]
lea eax, [esp + 0x14]
push 0
push eax
push 0x20
add ecx, 0x24
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x111c]
mov eax, dword [esp + 0x38]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00407f82
mov esp, ebp
pop ebp
ret 4