Function at 0x402ee0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x24
mov eax, dword [0x423568]
xor eax, esp
mov dword [esp + 0x20], eax
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, ecx
mov dword [esp + 8], ebx
push edi
push 0x40
push dword [esi]
lea ecx, [esi + 4]
call fcn.00401b80
mov eax, dword [esi + 0x20]
lea edx, [esp + 0x20]
push 0
push edx
mov ecx, dword [eax + 0x30]
mov eax, dword [eax + 0x34]
push eax
push ecx
push dword [esi + 8]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov eax, dword [esi + 0x20]
mov ecx, dword [eax + 0x10]
test ecx, ecx
jne 0x402faf
mov eax, dword [eax + 8]
add eax, 0x100
push 1
push eax
call fcn.0040963a
mov ecx, dword [esi + 0x20]
add esp, 8
mov edi, eax
cmp dword [ecx + 0xc], 0
mov edx, dword [ecx + 8]
ja 0x402f5e
test edx, edx
je 0x402f7c
mov dword [esp + 0x1c], 0
test edx, edx
je 0x402f7c
push 0
lea eax, [esp + 0x20]
push eax
push edx
push edi
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esi + 8]
test eax, eax
je 0x402f91
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 8], 0
mov eax, dword [esi + 0x20]
push dword [eax + 8]
push edi
push ebx
call fcn.00407920
add esp, 0xc
push edi
call fcn.00409bf0
add esp, 4
jmp 0x403170
cmp ecx, 1
jne 0x403056
mov eax, dword [eax]
add eax, 0x100
push ecx
push eax
call fcn.0040963a
mov ecx, dword [esi + 0x20]
add esp, 8
mov edi, eax
cmp dword [ecx + 4], 0
mov eax, dword [ecx]
ja 0x402fda
test eax, eax
je 0x402ff8
mov dword [esp + 0x1c], 0
test eax, eax
je 0x402ff8
push 0
lea ecx, [esp + 0x20]
push ecx
push eax
push edi
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esi + 8]
test eax, eax
je 0x40300d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 8], 0
mov eax, dword [esi + 0x20]
mov ecx, edi
mov eax, dword [eax + 0x14]
xor dword [edi], eax
lea eax, [esp + 0x1c]
mov esi, dword [esi + 0x20]
push eax
mov ebx, dword [esi]
mov edx, ebx
call fcn.004059f0
add esp, 4
test al, al
je 0x403048
mov eax, dword [esi + 8]
cmp eax, dword [esp + 0x1c]
jb 0x403048
push dword [esp + 0xc]
mov edx, ebx
mov ecx, edi
call fcn.00405cd0
add esp, 4
push edi
call fcn.00409bf0
add esp, 4
jmp 0x403170
cmp dword [eax + 0xc], 0
xorps xmm0, xmm0
movlpd qword [esp + 0x20], xmm0
jb 0x40315b
ja 0x403075
cmp dword [eax + 8], 0
jbe 0x40315b
mov eax, dword [esp + 0x24]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x14], eax
nop dword [eax + eax]
push 0
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0
push eax
push 4
lea eax, [esp + 0x24]
push eax
push dword [esi + 8]
call edi
mov eax, dword [esp + 0x18]
add eax, 0x100
push 1
push eax
call fcn.0040963a
mov ebx, eax
mov dword [esp + 0x28], 0
mov eax, dword [esp + 0x20]
add esp, 8
test eax, eax
je 0x4030df
push 0
lea ecx, [esp + 0x24]
push ecx
push eax
push ebx
push dword [esi + 8]
call edi
mov eax, dword [esi + 0x20]
mov ecx, ebx
mov edi, dword [eax + 8]
mov eax, dword [eax + 0x14]
xor dword [ebx], eax
lea eax, [esp + 0x10]
mov edx, dword [esp + 0x18]
push eax
call fcn.004059f0
add esp, 4
test al, al
je 0x403120
cmp edi, dword [esp + 0x10]
jb 0x403120
push dword [esp + 0xc]
mov edx, dword [esp + 0x1c]
mov ecx, ebx
call fcn.00405cd0
add esp, 4
test al, al
cmovne edi, dword [esp + 0x10]
push ebx
call fcn.00409bf0
mov ecx, dword [esp + 0x18]
add esp, 4
mov eax, dword [esi + 0x20]
add ecx, edi
mov edi, dword [esp + 0x1c]
adc edi, 0
mov dword [esp + 0x14], ecx
mov dword [esp + 0x1c], edi
cmp edi, dword [eax + 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
jb 0x403090
ja 0x40315b
cmp ecx, dword [eax + 8]
jb 0x403090
mov eax, dword [esi + 8]
test eax, eax
je 0x403170
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 8], 0
mov ecx, dword [esp + 0x2c]
mov eax, 1
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004065fa
mov esp, ebp
pop ebp
ret 0xc