Function at 0x402ec0
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.00401940
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 0x402f8f
mov eax, dword [eax + 8]
add eax, 0x100
push 1
push eax
call fcn.0040961a
mov ecx, dword [esi + 0x20]
add esp, 8
mov edi, eax
cmp dword [ecx + 0xc], 0
mov edx, dword [ecx + 8]
ja 0x402f3e
test edx, edx
je 0x402f5c
mov dword [esp + 0x1c], 0
test edx, edx
je 0x402f5c
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 0x402f71
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.00407900
add esp, 0xc
push edi
call fcn.00409bd0
add esp, 4
jmp 0x403150
cmp ecx, 1
jne 0x403036
mov eax, dword [eax]
add eax, 0x100
push ecx
push eax
call fcn.0040961a
mov ecx, dword [esi + 0x20]
add esp, 8
mov edi, eax
cmp dword [ecx + 4], 0
mov eax, dword [ecx]
ja 0x402fba
test eax, eax
je 0x402fd8
mov dword [esp + 0x1c], 0
test eax, eax
je 0x402fd8
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 0x402fed
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.004059d0
add esp, 4
test al, al
je 0x403028
mov eax, dword [esi + 8]
cmp eax, dword [esp + 0x1c]
jb 0x403028
push dword [esp + 0xc]
mov edx, ebx
mov ecx, edi
call fcn.00405cb0
add esp, 4
push edi
call fcn.00409bd0
add esp, 4
jmp 0x403150
cmp dword [eax + 0xc], 0
xorps xmm0, xmm0
movlpd qword [esp + 0x20], xmm0
jb 0x40313b
ja 0x403055
cmp dword [eax + 8], 0
jbe 0x40313b
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.0040961a
mov ebx, eax
mov dword [esp + 0x28], 0
mov eax, dword [esp + 0x20]
add esp, 8
test eax, eax
je 0x4030bf
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.004059d0
add esp, 4
test al, al
je 0x403100
cmp edi, dword [esp + 0x10]
jb 0x403100
push dword [esp + 0xc]
mov edx, dword [esp + 0x1c]
mov ecx, ebx
call fcn.00405cb0
add esp, 4
test al, al
cmovne edi, dword [esp + 0x10]
push ebx
call fcn.00409bd0
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 0x403070
ja 0x40313b
cmp ecx, dword [eax + 8]
jb 0x403070
mov eax, dword [esi + 8]
test eax, eax
je 0x403150
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.004065da
mov esp, ebp
pop ebp
ret 0xc