Function at 0x401420
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 0x4014d9
cmp dword [ebp - 0xc], 0
je 0x40144e
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 fcn.00474f29
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 fcn.004748bb
add esp, 0x10
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x4014a5
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x40]
push ecx
call fcn.0047577a
add esp, 4
test eax, eax
je 0x4014a5
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 0x4014d9
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
mov dword [ecx + 0x58], eax
jmp 0x401663
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
movzx eax, byte [edx]
cmp eax, dword [0x48b4d0]
jne 0x4014fa
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
movzx eax, byte [edx + 1]
cmp eax, dword [0x48b4d4]
je 0x401509
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x58], 1
jmp 0x401663
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.00401670
add esp, 4
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push eax
call fcn.00401670
add esp, 4
mov dword [ebp - 8], eax
cmp dword [ebp - 4], 8
jne 0x401554
mov ecx, dword [ebp - 8]
and ecx, 0xe0
je 0x401563
mov edx, dword [ebp + 8]
mov dword [edx + 0x38], 0xfffffffd
jmp 0x401663
mov dword [ebp - 0xc], 0
jmp 0x401575
mov eax, dword [ebp - 0xc]
add eax, 1
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 6
jae 0x401589
mov ecx, dword [ebp + 8]
push ecx
call fcn.00401670
add esp, 4
jmp 0x40156c
mov edx, dword [ebp - 8]
and edx, 4
je 0x4015d8
mov eax, dword [ebp + 8]
push eax
call fcn.00401670
add esp, 4
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00401670
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 0x4015d8
mov ecx, dword [ebp + 8]
push ecx
call fcn.00401670
add esp, 4
cmp eax, 0xffffffff
je 0x4015d8
jmp 0x4015b5
mov edx, dword [ebp - 8]
and edx, 8
je 0x4015fd
mov eax, dword [ebp + 8]
push eax
call fcn.00401670
add esp, 4
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x4015fd
cmp dword [ebp - 0x10], 0xffffffff
je 0x4015fd
jmp 0x4015e0
mov ecx, dword [ebp - 8]
and ecx, 0x10
je 0x401622
mov edx, dword [ebp + 8]
push edx
call fcn.00401670
add esp, 4
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x401622
cmp dword [ebp - 0x10], 0xffffffff
je 0x401622
jmp 0x401605
mov eax, dword [ebp - 8]
and eax, 2
je 0x401650
mov dword [ebp - 0xc], 0
jmp 0x40163c
mov ecx, dword [ebp - 0xc]
add ecx, 1
mov dword [ebp - 0xc], ecx
cmp dword [ebp - 0xc], 2
jae 0x401650
mov edx, dword [ebp + 8]
push edx
call fcn.00401670
add esp, 4
jmp 0x401633
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