Function at 0x404ec0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0x10], edi
test eax, eax
jg 0x404ef2
jl 0x404ee5
test ecx, ecx
jne 0x404ef2
xor eax, eax
xor edx, edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x404fb2
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], eax
mov ecx, ebx
call fcn.00408600
mov esi, eax
mov eax, edx
mov dword [esp + 0x14], eax
test eax, eax
jl 0x404f5e
jg 0x404f1d
test esi, esi
je 0x404f5e
mov ecx, dword [esp + 0x10]
cmp ecx, eax
jg 0x404f35
mov eax, dword [esp + 0xc]
jl 0x404f2f
cmp eax, esi
jae 0x404f35
mov esi, eax
mov dword [esp + 0x14], ecx
mov eax, dword [ebx + 0x1c]
push esi
push dword [eax]
push edi
call fcn.004246a0
mov eax, dword [ebx + 0x2c]
add esp, 0xc
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x10]
sub ecx, esi
sbb edx, dword [esp + 0x14]
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
jmp 0x404f7f
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x1c]
mov edx, dword [esp + 0x10]
cmp eax, 0xffffffff
je 0x404f9b
mov ecx, dword [esp + 0xc]
mov esi, 1
add ecx, 0xffffffff
mov byte [edi], al
adc edx, 0xffffffff
add edi, esi
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], ecx
test edx, edx
jg 0x404f04
jl 0x404f9b
test ecx, ecx
jne 0x404f04
mov eax, dword [ebp + 0xc]
sub eax, dword [esp + 0xc]
mov ecx, dword [ebp + 0x10]
sbb ecx, edx
mov edx, ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
mov edi, ecx
mov esi, ecx
mov edx, dword [eax]
test edx, edx
je 0x404ffd
mov eax, dword [ebx + 0x2c]
mov dword [esp + 0xc], esi
mov eax, dword [eax]
test eax, eax
je 0x405001
mov edi, dword [esp + 0x10]
cmp eax, ecx
cmovb esi, eax
push esi
push edx
push edi
call fcn.004246a0
mov eax, dword [ebx + 0x2c]
add edi, esi
mov dword [esp + 0x1c], edi
add esp, 0xc
mov edi, dword [ebp + 0xc]
sub edi, esi
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, edi
mov dword [esp + 0xc], esi
jmp 0x405001
mov dword [esp + 0xc], ecx
cmp dword [ebx + 0x4c], 0
je 0x4050ab
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x40502c
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebx + 0x2c]
mov dword [eax], edx
mov edx, esi
cmp esi, 0xfff
mov esi, dword [esp + 0x10]
mov dword [esp + 0x14], edx
jbe 0x405068
nop
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call fcn.0042a311
sub edi, eax
add esp, 0x10
add esi, eax
mov dword [esp + 0x14], edi
mov edx, edi
cmp eax, 0xfff
jne 0x405097
cmp edi, eax
ja 0x405040
mov ecx, edx
test edx, edx
je 0x4050af
push dword [ebx + 0x4c]
push edi
push 1
push esi
call fcn.0042a311
mov ecx, dword [esp + 0x24]
add esp, 0x10
mov edx, dword [ebp + 0x10]
sub ecx, eax
mov eax, dword [ebp + 0xc]
sub eax, ecx
sbb edx, 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
sbb edx, 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [esp + 0xc]
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, ecx
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc