Function at 0x404570
Capabilities:
Get file size
Read file on windows

Disassembly:
mov eax, 0x1074
call fcn.00736440
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x1088]
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, dword [esp + 0x1090]
mov esi, eax
and ebx, 0xff00
lea eax, [esi + 0xfff]
shr eax, 0xc
mov ebp, ebx
push 0
neg ebp
lea eax, [eax*4 + 4]
sbb ebp, ebp
push 0x576
and ebp, eax
push str.C:SrcToolsMoPaq_srcMPQAPI.cpp
add eax, esi
push eax
mov dword [esp + 0x34], esi
mov dword [esp + 0x20], 0
mov dword [esp + 0x30], esi
mov dword [esp + 0x28], ebx
call sub.Storm.dll_Ordinal_401
mov ecx, dword [esp + 0x108c]
push 0
push 0
push 0
push edi
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test byte [0x827360], 1
je 0x404612
mov edx, dword [esp + 0x10a4]
push 1
push edx
push 0
push 0
call fcn.00408240
add esp, 0x10
test byte [0x827360], 4
je 0x404628
lea eax, [esp + 0x2c]
push eax
call fcn.00407730
add esp, 4
mov ecx, dword [esp + 0x108c]
mov edi, dword [ecx]
add edi, ebp
test esi, esi
mov dword [esp + 0x1c], edi
je 0x4047a9
nop
cmp esi, 0x1000
mov ebx, esi
jb 0x40464f
mov ebx, 0x1000
mov ecx, dword [esp + 0x1088]
push 0
lea edx, [esp + 0x2c]
push edx
push ebx
lea eax, [esp + 0x90]
push eax
push ecx
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test byte [0x827360], 1
je 0x404695
mov edx, dword [esp + 0x10a4]
push 2
push edx
lea eax, [esp + 0x8c]
push ebx
push eax
call fcn.00408240
add esp, 0x10
test byte [0x827360], 4
je 0x4046b4
push ebx
lea ecx, [esp + 0x88]
push ecx
lea edx, [esp + 0x34]
push edx
call fcn.00407760
add esp, 0xc
mov eax, dword [esp + 0x18]
test eax, eax
je 0x404763
mov eax, dword [esp + 0x1090]
test ah, 1
je 0x4046f7
push ebx
lea eax, [esp + 0x88]
push eax
push edi
call fcn.00407300
mov edx, dword [esp + 0x1098]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x20], eax
mov eax, dword [edx]
add esp, 0xc
mov dword [eax + ecx*4], ebp
jmp 0x404782
mov ecx, dword [esp + 0x24]
mov eax, dword [0x82735c]
mov edx, ecx
sub edx, esi
cmp edx, dword [esp + 0x1094]
jb 0x404732
mov edx, ebx
sub edx, esi
lea ecx, [edx + ecx - 1]
cmp ecx, dword [esp + 0x1098]
ja 0x404732
mov eax, dword [esp + 0x109c]
neg eax
sbb eax, eax
and eax, 0x40
add eax, 0x40
or eax, 1
mov edx, dword [esp + 0x10a0]
push edx
push 0
push eax
push ebx
lea eax, [esp + 0x94]
push eax
lea ecx, [esp + 0x28]
push ecx
push edi
call sub.Storm.dll_Ordinal_551
mov edx, dword [esp + 0x108c]
mov eax, dword [edx]
mov ecx, dword [esp + 0x10]
mov dword [eax + ecx*4], ebp
jmp 0x404782
mov ecx, ebx
mov edx, ecx
shr ecx, 2
lea esi, [esp + 0x84]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
sub esi, ebx
add edi, eax
add ebp, eax
inc ecx
test esi, esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x10], ecx
jne 0x404640
mov ebx, dword [esp + 0x18]
test ebx, ebx
je 0x4047bd
mov eax, dword [esp + 0x108c]
mov ecx, dword [eax]
mov edx, dword [esp + 0x10]
mov dword [ecx + edx*4], ebp
test byte [0x827360], 1
je 0x4047dc
mov eax, dword [esp + 0x10a4]
push 4
push eax
push 0
push 0
call fcn.00408240
add esp, 0x10
test byte [0x827360], 4
je 0x4047fa
mov edx, dword [esp + 0x10a8]
lea ecx, [esp + 0x2c]
push ecx
push edx
call fcn.00407820
add esp, 8
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x1074
ret