Function at 0x404910
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
mov dword [ebp - 0xc], ecx
cmp dword [ebp - 0xc], 2
jae 0x4049c9
cmp dword [ebp - 0xc], 0
je 0x40493e
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x44]
mov al, byte [eax]
mov byte [edx], al
call sub.MSVCR90.dll__errno
mov dword [eax], 0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x40]
push edx
mov eax, 0x4000
mov ecx, dword [ebp - 0xc]
sar eax, cl
push eax
push 1
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x44]
add edx, dword [ebp - 0xc]
push edx
call sub.MSVCR90.dll_fread
add esp, 0x10
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x404995
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x40]
push ecx
call sub.MSVCR90.dll_ferror
add esp, 4
test eax, eax
je 0x404995
mov edx, dword [ebp + 8]
mov dword [edx + 0x38], 0xffffffff
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
add ecx, dword [ebp - 0xc]
mov edx, dword [ebp + 8]
mov dword [edx + 4], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x44]
mov dword [eax], edx
mov eax, dword [ebp + 8]
cmp dword [eax + 4], 2
jae 0x4049c9
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
mov dword [ecx + 0x58], eax
jmp 0x404b53
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
movzx eax, byte [edx]
cmp eax, dword [0x40f52c]
jne 0x4049ea
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
movzx eax, byte [edx + 1]
cmp eax, dword [0x40f530]
je 0x4049f9
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x58], 1
jmp 0x404b53
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
sub eax, 2
mov ecx, dword [ebp + 8]
mov dword [ecx + 4], eax
mov edx, dword [ebp + 8]
mov eax, dword [edx]
add eax, 2
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov edx, dword [ebp + 8]
push edx
call fcn.00404b60
add esp, 4
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push eax
call fcn.00404b60
add esp, 4
mov dword [ebp - 8], eax
cmp dword [ebp - 4], 8
jne 0x404a44
mov ecx, dword [ebp - 8]
and ecx, 0xe0
je 0x404a53
mov edx, dword [ebp + 8]
mov dword [edx + 0x38], 0xfffffffd
jmp 0x404b53
mov dword [ebp - 0xc], 0
jmp 0x404a65
mov eax, dword [ebp - 0xc]
add eax, 1
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 6
jae 0x404a79
mov ecx, dword [ebp + 8]
push ecx
call fcn.00404b60
add esp, 4
jmp 0x404a5c
mov edx, dword [ebp - 8]
and edx, 4
je 0x404ac8
mov eax, dword [ebp + 8]
push eax
call fcn.00404b60
add esp, 4
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00404b60
add esp, 4
shl eax, 8
add eax, dword [ebp - 0xc]
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
sub eax, 1
mov dword [ebp - 0xc], eax
test edx, edx
je 0x404ac8
mov ecx, dword [ebp + 8]
push ecx
call fcn.00404b60
add esp, 4
cmp eax, 0xffffffff
je 0x404ac8
jmp 0x404aa5
mov edx, dword [ebp - 8]
and edx, 8
je 0x404aed
mov eax, dword [ebp + 8]
push eax
call fcn.00404b60
add esp, 4
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x404aed
cmp dword [ebp - 0x10], 0xffffffff
je 0x404aed
jmp 0x404ad0
mov ecx, dword [ebp - 8]
and ecx, 0x10
je 0x404b12
mov edx, dword [ebp + 8]
push edx
call fcn.00404b60
add esp, 4
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x404b12
cmp dword [ebp - 0x10], 0xffffffff
je 0x404b12
jmp 0x404af5
mov eax, dword [ebp - 8]
and eax, 2
je 0x404b40
mov dword [ebp - 0xc], 0
jmp 0x404b2c
mov ecx, dword [ebp - 0xc]
add ecx, 1
mov dword [ebp - 0xc], ecx
cmp dword [ebp - 0xc], 2
jae 0x404b40
mov edx, dword [ebp + 8]
push edx
call fcn.00404b60
add esp, 4
jmp 0x404b23
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3c]
neg ecx
sbb ecx, ecx
and ecx, 0xfffffffd
mov edx, dword [ebp + 8]
mov dword [edx + 0x38], ecx
mov esp, ebp
pop ebp
ret