Function at 0x405df0
Capabilities:
Read file on windows

Disassembly:
push ecx
mov eax, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 0xc]
test ebx, ebx
mov dword [esp + 4], eax
je 0x40609b
cmp byte [ebx + 0x5c], 0x72
jne 0x40609b
mov ecx, dword [ebx + 0x38]
cmp ecx, 0xfffffffd
push esi
je 0x406094
or esi, 0xffffffff
cmp ecx, esi
je 0x406094
cmp ecx, 1
jne 0x405e33
pop esi
xor eax, eax
pop ebx
pop ecx
ret
push ebp
push edi
mov edi, dword [esp + 0x20]
test edi, edi
mov dword [esp + 0x1c], eax
mov dword [ebx + 0xc], eax
mov dword [ebx + 0x10], edi
je 0x405e86
mov ecx, dword [ebx + 0x6c]
cmp ecx, esi
je 0x405e86
mov byte [eax], cl
mov ebp, dword [ebx + 0xc]
mov edx, dword [ebx + 0x10]
mov ecx, dword [ebx + 0x68]
inc eax
inc ebp
dec edx
mov dword [esp + 0x1c], eax
mov eax, dword [ebx + 0x70]
inc ecx
test eax, eax
mov dword [ebx + 0xc], ebp
mov dword [ebx + 0x10], edx
mov dword [ebx + 0x6c], esi
mov dword [ebx + 0x68], ecx
je 0x405e86
pop edi
pop ebp
pop esi
mov dword [ebx + 0x38], 1
mov eax, 1
pop ebx
pop ecx
ret
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x40606d
mov ebp, dword [sym.imp.MSVCR100.dll_fread]
mov esi, dword [sym.imp.MSVCR100.dll__errno]
lea ecx, [ecx]
mov eax, dword [ebx + 0x58]
test eax, eax
jne 0x405fcd
mov eax, dword [ebx + 4]
test eax, eax
jne 0x405eff
mov eax, dword [ebx + 0x3c]
test eax, eax
jne 0x405eff
call esi
mov dword [eax], 0
mov edx, dword [ebx + 0x40]
mov eax, dword [ebx + 0x44]
push edx
push 0x4000
push 1
push eax
call ebp
add esp, 0x10
test eax, eax
mov dword [ebx + 4], eax
jne 0x405efa
mov edx, dword [ebx + 0x40]
mov ecx, 1
mov dword [ebx + 0x3c], ecx
mov eax, dword [edx + 0xc]
test al, 0x20
jne 0x406061
test al, 0x10
jne 0x40606a
mov eax, dword [ebx + 0x44]
mov dword [ebx], eax
mov ecx, dword [ebx + 4]
mov edx, dword [ebx + 0x64]
add edx, ecx
mov ecx, dword [ebx + 0x68]
mov dword [ebx + 0x64], edx
mov edx, dword [ebx + 0x10]
add ecx, edx
push 0
push ebx
mov dword [ebx + 0x68], ecx
call fcn.00407800
mov ecx, dword [ebx + 4]
mov edx, dword [ebx + 0x64]
sub edx, ecx
mov ecx, dword [ebx + 0x68]
mov dword [ebx + 0x64], edx
mov edx, dword [ebx + 0x10]
sub ecx, edx
add esp, 8
cmp eax, 1
mov dword [ebx + 0x38], eax
mov dword [ebx + 0x68], ecx
jne 0x405f9b
mov eax, dword [esp + 0x10]
mov ecx, dword [ebx + 0xc]
mov edx, dword [ebx + 0x4c]
sub ecx, eax
push ecx
push eax
push edx
call fcn.00408fa0
mov dword [ebx + 0x4c], eax
mov eax, dword [ebx + 0xc]
mov dword [esp + 0x1c], eax
add esp, 0xc
mov eax, ebx
call fcn.00405af0
cmp eax, dword [ebx + 0x4c]
jne 0x405fc1
mov eax, ebx
call fcn.00405af0
mov eax, ebx
call fcn.00405680
mov eax, dword [ebx + 0x38]
test eax, eax
jne 0x40606d
push ebx
call fcn.004075c0
push 0
push 0
push 0
call fcn.00408fa0
add esp, 0x10
mov dword [ebx + 0x4c], eax
mov eax, dword [ebx + 0x38]
test eax, eax
jne 0x40606d
mov eax, dword [ebx + 0x3c]
test eax, eax
jne 0x40606d
mov eax, dword [ebx + 0x10]
test eax, eax
jne 0x405ea0
jmp 0x40606d
mov dword [ebx + 0x38], 0xfffffffd
jmp 0x40606d
mov eax, dword [ebx + 4]
mov ecx, dword [ebx + 0x10]
cmp eax, ecx
jbe 0x405fd9
mov eax, ecx
test eax, eax
jbe 0x406019
mov esi, dword [ebx]
mov edi, dword [ebx + 0xc]
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x1c]
mov esi, dword [ebx]
mov edx, dword [ebx + 0x10]
mov edi, dword [esp + 0x20]
add ecx, eax
mov dword [esp + 0x1c], ecx
mov dword [ebx + 0xc], ecx
mov ecx, dword [ebx + 4]
add esi, eax
sub edx, eax
sub ecx, eax
mov dword [ebx], esi
mov dword [ebx + 0x10], edx
mov dword [ebx + 4], ecx
mov eax, dword [ebx + 0x10]
test eax, eax
jbe 0x406039
mov ecx, dword [ebx + 0x40]
mov edx, dword [esp + 0x1c]
push ecx
push eax
push 1
push edx
call ebp
mov ecx, dword [ebx + 0x10]
add esp, 0x10
sub ecx, eax
mov dword [ebx + 0x10], ecx
mov esi, dword [ebx + 0x10]
mov edx, dword [ebx + 0x64]
mov ecx, dword [ebx + 0x68]
sub edi, esi
add edx, edi
add ecx, edi
test edi, edi
mov dword [ebx + 0x64], edx
mov dword [ebx + 0x68], ecx
jne 0x406059
mov dword [ebx + 0x3c], 1
mov eax, edi
pop edi
pop ebp
pop esi
pop ebx
pop ecx
ret
mov dword [ebx + 0x38], 0xffffffff
jmp 0x40606d
mov dword [ebx + 0x38], ecx
mov eax, dword [esp + 0x10]
mov ecx, dword [ebx + 0xc]
mov edx, dword [ebx + 0x4c]
sub ecx, eax
push ecx
push eax
push edx
call fcn.00408fa0
mov ecx, dword [ebx + 0x10]
add esp, 0xc
mov dword [ebx + 0x4c], eax
mov eax, edi
pop edi
pop ebp
pop esi
sub eax, ecx
pop ebx
pop ecx
ret
pop esi
or eax, 0xffffffff
pop ebx
pop ecx
ret
mov eax, 0xfffffffe
pop ebx
pop ecx
ret