Function at 0x402d80
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x20
push ebx
mov ebx, dword [esp + 0x30]
push edi
xor eax, eax
mov ecx, 8
lea edi, [esp + 8]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x44]
mov edi, dword [esp + 0x38]
push eax
lea ecx, [esp + 0x48]
push ecx
lea edx, [esp + 0x10]
push edx
push edi
push ebx
call fcn.00402fe0
add esp, 0x14
test eax, eax
jne 0x402dbd
pop edi
pop ebx
add esp, 0x20
ret
mov eax, dword [esp + 0x30]
push esi
mov esi, dword [esp + 0x30]
push 0x104
push eax
lea ecx, [esi + 0x10]
push ecx
call sub.Storm.dll_Ordinal_501
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
cmp eax, ecx
mov dword [esi + 0x114], edx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], edi
mov edx, eax
ja 0x402df5
mov edx, ecx
mov ebx, dword [esp + 0x40]
cmp edx, ebx
jbe 0x402e05
cmp eax, ecx
ja 0x402e07
mov eax, ecx
jmp 0x402e07
mov eax, ebx
add eax, 0x64
mov dword [esi + 0x11c], eax
imul eax, eax, 0x2c
push ebp
push 0
push 0x21b
push str.C:SrcToolsMoPaq_srcMPQAPI.cpp
push eax
mov dword [esi + 0x120], eax
call sub.Storm.dll_Ordinal_401
mov ecx, dword [esi + 0x120]
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, ecx
mov edi, eax
shr ecx, 2
xor eax, eax
mov dword [esi + 0x128], edi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x402eca
mov eax, dword [esi + 0x114]
mov edx, dword [esp + 0x24]
mov ecx, dword [esi + 8]
push 0
push 0
add eax, edx
push eax
push ecx
call ebp
mov eax, dword [esp + 0x2c]
mov ecx, dword [esi + 8]
push 0
shl eax, 4
lea edx, [esp + 0x44]
push edx
push eax
mov dword [esp + 0x4c], eax
mov eax, dword [esi + 0x128]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 3
push str._block_table_
call fcn.00407220
mov edx, dword [esp + 0x34]
push eax
mov eax, dword [esi + 0x128]
shl edx, 4
push edx
push eax
call fcn.00407160
mov ecx, dword [esi + 0x11c]
mov edx, dword [esi + 0x128]
push ecx
push edx
call fcn.004031a0
add esp, 0x1c
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x402ed4
mov eax, ebx
push 0
push 0x230
mov dword [esi + 0x12c], eax
shl eax, 4
push str.C:SrcToolsMoPaq_srcMPQAPI.cpp
lea ebx, [esi + 0x130]
push eax
mov dword [ebx], eax
call sub.Storm.dll_Ordinal_401
mov ecx, dword [ebx]
mov edx, ecx
mov edi, eax
shr ecx, 2
or eax, 0xffffffff
mov dword [esi + 0x138], edi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x28]
test eax, eax
je 0x402f67
mov ecx, dword [esp + 0x20]
mov eax, dword [esi + 0x114]
push 0
push 0
add eax, ecx
mov ecx, dword [esi + 8]
push eax
push ecx
call ebp
mov edx, dword [ebx]
mov eax, dword [esi + 0x138]
mov ecx, dword [esi + 8]
push 0
push ebx
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 3
push str._hash_table_
call fcn.00407220
mov edx, dword [ebx]
push eax
mov eax, dword [esi + 0x138]
push edx
push eax
call fcn.00407160
add esp, 0x14
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
cmp eax, edx
pop ebp
mov ecx, eax
jb 0x402f78
mov ecx, edx
cmp ecx, 0x20
jae 0x402f84
mov eax, 0x20
jmp 0x402f8a
cmp eax, edx
jb 0x402f8a
mov eax, edx
mov dword [esi + 0x118], eax
mov eax, dword [esp + 0x44]
test eax, eax
je 0x402fb1
mov eax, dword [esp + 0x28]
test eax, eax
je 0x402fb1
mov ecx, dword [esi + 0x128]
push eax
push ecx
push esi
call fcn.00403230
add esp, 0xc
test byte [esi + 0xc], 0x24
je 0x402fc0
push esi
call fcn.00403360
add esp, 4
mov cl, byte [esi + 0xc]
test cl, cl
mov eax, 1
js 0x402fd2
mov dword [esi + 0x148], eax
pop esi
pop edi
pop ebx
add esp, 0x20
ret