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

Disassembly:
mov eax, 0x207c
call fcn.00736440
push ebx
push ebp
push esi
mov esi, dword [esp + 0x208c]
push edi
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, dword [esp + 0x2094]
mov dword [esp + 0x20], eax
mov ebp, eax
push 0
and edi, 0xff00
add eax, 0xfff
push 0
mov dword [esp + 0x2c], edi
shr eax, 0xc
neg edi
push 0
lea eax, [eax*4 + 4]
sbb edi, edi
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esp + 0x28], 0
and edi, eax
call esi
test byte [0x827360], 1
je 0x404070
mov ecx, dword [esp + 0x20a8]
push 1
push ecx
push 0
push 0
call fcn.00408240
add esp, 0x10
test byte [0x827360], 4
je 0x404086
lea edx, [esp + 0x34]
push edx
call fcn.00407730
add esp, 4
mov ebx, dword [esp + 0x20b0]
push 1
push 0
push 0
push ebx
call esi
push 8
push 0x5eb
push str.C:SrcToolsMoPaq_srcMPQAPI.cpp
push edi
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], edi
call sub.Storm.dll_Ordinal_401
push 0
lea ecx, [esp + 0x14]
push ecx
push edi
push eax
push ebx
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 1
push 0
push 0
push ebx
call esi
mov eax, dword [esp + 0x20]
test eax, eax
je 0x404266
lea esp, [esp]
cmp ebp, 0x1000
mov esi, ebp
jb 0x4040ef
mov esi, 0x1000
mov ecx, dword [esp + 0x2090]
push 0
lea edx, [esp + 0x34]
push edx
push esi
lea eax, [esp + 0x98]
push eax
push ecx
mov dword [esp + 0x28], esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test byte [0x827360], 1
je 0x404135
mov edx, dword [esp + 0x20a8]
push 2
push edx
lea eax, [esp + 0x94]
push esi
push eax
call fcn.00408240
add esp, 0x10
test byte [0x827360], 4
je 0x404154
push esi
lea ecx, [esp + 0x90]
push ecx
lea edx, [esp + 0x3c]
push edx
call fcn.00407760
add esp, 0xc
mov eax, dword [esp + 0x24]
test eax, eax
je 0x404226
mov eax, dword [esp + 0x2094]
test ah, 1
je 0x40418b
push esi
lea eax, [esp + 0x90]
push eax
lea ecx, [esp + 0x1094]
push ecx
call fcn.00407300
add esp, 0xc
mov dword [esp + 0x14], eax
jmp 0x4041f0
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x2098]
mov eax, dword [0x82735c]
sub edx, ebp
cmp edx, ecx
jb 0x4041ca
mov edx, dword [esp + 0x20]
mov ecx, esi
sub ecx, ebp
lea ecx, [ecx + edx - 1]
cmp ecx, dword [esp + 0x209c]
ja 0x4041ca
mov eax, dword [esp + 0x20a0]
neg eax
sbb eax, eax
and eax, 0x40
add eax, 0x40
or eax, 1
mov edx, dword [esp + 0x20a4]
push edx
push 0
push eax
push esi
lea eax, [esp + 0x9c]
push eax
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x10a4]
push edx
call sub.Storm.dll_Ordinal_551
mov ecx, dword [esp + 0x14]
push 0
lea eax, [esp + 0x14]
push eax
push ecx
lea edx, [esp + 0x1098]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x14]
jne 0x4042e0
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
mov dword [ecx + edx*4], edi
jmp 0x404247
push 0
lea eax, [esp + 0x14]
push eax
push esi
lea ecx, [esp + 0x98]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [esp + 0x10], esi
jne 0x4042e0
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
sub ebp, esi
add edi, edx
inc ecx
test ebp, ebp
mov dword [esp + 0x18], ecx
jne 0x4040e0
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x404279
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov dword [eax + edx*4], edi
test byte [0x827360], 1
je 0x404298
mov ecx, dword [esp + 0x20a8]
push 4
push ecx
push 0
push 0
call fcn.00408240
add esp, 0x10
test byte [0x827360], 4
je 0x4042b6
mov eax, dword [esp + 0x20ac]
lea edx, [esp + 0x34]
push edx
push eax
call fcn.00407820
add esp, 8
mov ecx, dword [esp + 0x28]
push 0
push 0
push ecx
push ebx
call esi
mov ebp, dword [esp + 0x2c]
mov eax, dword [esp + 0x1c]
push 0
lea edx, [esp + 0x14]
push edx
push ebp
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp ebp, dword [esp + 0x10]
je 0x4042ed
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x207c
ret
push 2
push 0
push 0
push ebx
call esi
mov ecx, dword [esp + 0x1c]
push 0
push 0x64c
push str.C:SrcToolsMoPaq_srcMPQAPI.cpp
push ecx
call sub.Storm.dll_Ordinal_403
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x207c
ret