Function at 0x4058e0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
lea esi, [ecx + 0x94]
push edi
mov dword [esp + 0x18], ecx
push 0
mov ecx, esi
xor bl, bl
call fcn.00408140
push eax
mov ecx, esi
call fcn.00408250
mov edi, eax
mov dword [esp + 0x10], 0
test edi, edi
je 0x405b03
test bl, bl
jne 0x405b03
mov eax, dword [edi]
mov ecx, esi
push eax
call fcn.00408250
mov ebp, dword [esp + 0x24]
mov ecx, dword [eax]
cmp ecx, ebp
jbe 0x40594b
mov ecx, dword [edi + 4]
add edi, 4
push ecx
mov ecx, esi
mov dword [esp + 0x14], edi
call fcn.00408250
mov edi, eax
jmp 0x405aed
mov edx, dword [edi]
mov ecx, esi
push edx
call fcn.00408250
cmp dword [eax], ebp
jae 0x405972
mov eax, dword [edi + 8]
add edi, 8
push eax
mov ecx, esi
mov dword [esp + 0x14], edi
call fcn.00408250
mov edi, eax
jmp 0x405aed
mov ecx, dword [edi]
push ecx
mov ecx, esi
call fcn.00408250
mov ebx, dword [eax + 8]
add eax, 8
and ebx, 0xfffffffe
mov dword [eax], ebx
mov eax, dword [edi + 4]
mov ecx, dword [0x410084]
cmp eax, ecx
je 0x4059cc
mov ecx, dword [esp + 0x10]
test ecx, ecx
jne 0x4059a7
push ecx
push eax
mov ecx, esi
call fcn.00408160
jmp 0x4059a9
mov dword [ecx], eax
mov eax, dword [edi + 8]
mov ecx, dword [0x410084]
cmp eax, ecx
je 0x4059ff
push 0
push eax
mov ecx, esi
call fcn.00408250
mov ecx, dword [esp + 0x1c]
push eax
call fcn.004057e0
jmp 0x4059ff
mov eax, dword [edi + 8]
cmp eax, ecx
je 0x4059ea
mov ecx, dword [esp + 0x10]
test ecx, ecx
jne 0x4059e6
push ecx
push eax
mov ecx, esi
call fcn.00408160
jmp 0x4059ff
mov dword [ecx], eax
jmp 0x4059ff
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x4059fd
push eax
push ecx
mov ecx, esi
call fcn.00408160
jmp 0x4059ff
mov dword [eax], ecx
mov eax, dword [esp + 0x28]
test eax, eax
je 0x405abe
mov ecx, dword [esp + 0x18]
push 1
mov dword [esp + 0x18], 0xffffffff
mov dword [esp + 0x20], 0
call fcn.004033a0
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
je 0x405b01
mov edx, dword [edi]
mov ecx, esi
push edx
call fcn.00408250
mov ecx, dword [esp + 0x14]
mov ebp, eax
push 0
push 0
mov eax, dword [ebp + 0x14]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x405b01
mov edx, dword [ebp + 0x10]
push edx
call fcn.0040a590
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x405b01
mov ecx, dword [ebp + 0x10]
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x1c]
push 0
push eax
push ecx
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x405b01
mov eax, dword [esp + 0x1c]
mov ecx, dword [ebp + 0x10]
cmp eax, ecx
jb 0x405b01
mov ecx, dword [esp + 0x2c]
push ecx
push ebp
push ebx
call dword [esp + 0x34]
add esp, 0xc
push ebx
call fcn.0040a130
mov ecx, dword [esp + 0x1c]
add esp, 4
lea edx, [esp + 0x14]
push edx
push 1
call fcn.00403400
test byte [esp + 0x30], 1
je 0x405aeb
mov eax, dword [0x410084]
push 1
mov ecx, esi
mov dword [edi + 4], eax
call fcn.00408140
push 1
push edi
mov ecx, esi
mov dword [edi + 8], eax
call fcn.00408230
push eax
mov ecx, esi
call fcn.00408160
mov bl, 1
test edi, edi
jne 0x405916
mov al, bl
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0x10
xor bl, bl
pop edi
pop esi
mov al, bl
pop ebp
pop ebx
add esp, 0x10
ret 0x10