Function at 0x42c130
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
cmp dword [ebp + 8], 0
jne 0x42c144
or eax, 0xffffffff
jmp 0x42c851
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3c]
and ecx, 0x8000
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x3c]
and eax, 0xffff7fff
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x3c], eax
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x3c]
and eax, 0x18
mov dword [ebp - 4], eax
je 0x42c181
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x3c]
and edx, 0xffffffe7
mov eax, dword [ebp + 8]
mov dword [eax + 0x3c], edx
mov ecx, dword [ebp + 8]
movzx edx, word [ecx + 0x3a]
and edx, 0xffffffdf
mov eax, dword [ebp + 8]
mov word [eax + 0x3a], dx
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x3c]
and edx, 0x200
je 0x42c1a8
or eax, 0xffffffff
jmp 0x42c851
cmp dword [ebp - 0x14], 0
jne 0x42c250
mov eax, dword [ebp + 8]
movzx ecx, word [eax + 0x3a]
and ecx, 0x200
jne 0x42c250
mov edx, dword [ebp + 8]
cmp dword [edx + 0x3c], 1
je 0x42c1ea
push 0
push 1
mov eax, dword [ebp + 8]
push eax
call fcn.0042ad60
add esp, 0xc
test eax, eax
jge 0x42c1ea
or eax, 0xffffffff
jmp 0x42c851
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov eax, dword [ecx]
cmp eax, dword [edx + 0xc]
jae 0x42c250
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x3c]
or edx, 0x8000
mov eax, dword [ebp + 8]
mov dword [eax + 0x3c], edx
mov ecx, dword [ebp + 8]
push ecx
call fcn.00423300
add esp, 4
test eax, eax
jge 0x42c221
or eax, 0xffffffff
jmp 0x42c851
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x18]
mov dword [edx + 4], ecx
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
mov dword [edx + 8], ecx
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
mov dword [edx + 0xc], ecx
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xc]
mov dword [edx], ecx
mov dword [ebp - 0xc], 0
mov edx, dword [ebp + 8]
movzx eax, word [edx + 0x14]
and eax, 4
jne 0x42c275
mov ecx, dword [ebp + 8]
movsx edx, word [ecx + 0x16]
test edx, edx
jge 0x42c275
xor eax, eax
jmp 0x42c851
mov eax, dword [ebp + 8]
movzx ecx, word [eax + 0x14]
and ecx, 0xfffffe7f
mov edx, dword [ebp + 8]
mov word [edx + 0x14], cx
mov eax, dword [ebp + 0x14]
mov dword [ebp - 8], eax
mov ecx, dword [ebp + 8]
movzx edx, word [ecx + 0x14]
and edx, 4
je 0x42c2ec
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x28]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x18]
add eax, ecx
mov ecx, dword [ebp + 8]
sub eax, dword [ecx]
cdq
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
cmp dword [ebp - 0x1c], 0
jg 0x42c2d1
jl 0x42c2c3
cmp dword [ebp - 0x20], 0
jae 0x42c2d1
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
cmp dword [ebp - 0x1c], 0
jg 0x42c2e4
jl 0x42c2df
cmp dword [ebp - 0x20], 0
ja 0x42c2e4
jmp 0x42c7a4
mov eax, dword [ebp - 0x20]
jmp 0x42c851
cmp dword [ebp - 8], 0
jne 0x42c303
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x40]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x24], ecx
jmp 0x42c32e
mov edx, dword [ebp + 8]
movzx eax, word [edx + 0x3a]
and eax, 0x200
je 0x42c322
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x10]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 8]
mov dword [ebp - 0x34], eax
jmp 0x42c328
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x34], ecx
mov edx, dword [ebp - 0x34]
mov dword [ebp - 0x24], edx
cmp dword [ebp - 0x24], 0
je 0x42c347
mov eax, dword [ebp - 0x24]
cmp dword [eax], 0
jne 0x42c347
mov ecx, dword [ebp - 0x24]
mov edx, dword [ecx + 0x10]
mov dword [ebp - 0x24], edx
jmp 0x42c32e
cmp dword [ebp - 0x24], 0
je 0x42c353
mov eax, dword [ebp - 0x24]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x42c3d0
mov ecx, dword [ebp - 8]
cmp dword [ecx + 0xc], 0
je 0x42c3d0
mov edx, dword [ebp + 8]
movzx eax, word [edx + 0x14]
and eax, 0x400
je 0x42c3d0
cmp dword [ebp - 0x14], 0
je 0x42c388
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x3c]
or edx, 0x8000
mov eax, dword [ebp + 8]
mov dword [eax + 0x3c], edx
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp + 0x10]
push edx
push 1
mov eax, dword [ebp + 8]
push eax
call fcn.00434700
add esp, 0x10
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jle 0x42c3af
mov ecx, dword [ebp - 0x28]
mov dword [ebp + 0x10], ecx
jmp 0x42c3d0
cmp dword [ebp - 0x28], 0
jge 0x42c3d0
mov edx, dword [ebp + 8]
movzx eax, word [edx + 0x14]
or eax, 0x100
mov ecx, dword [ebp + 8]
mov word [ecx + 0x14], ax
mov eax, dword [ebp - 0x28]
jmp 0x42c851
cmp dword [ebp - 0xc], 0
jne 0x42c3fc
mov edx, dword [ebp + 8]
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 0x38]
cmp dword [eax + 0x2c], 0
jg 0x42c3fc
jl 0x42c3f0
mov ecx, dword [ebp - 0x38]
cmp dword [ecx + 0x28], 0
jae 0x42c3fc
mov dword [ebp - 0xc], 1
call fcn.0042c870
mov edx, dword [ebp + 8]
mov dword [ebp - 0x3c], edx
mov eax, dword [ebp - 0x3c]
cmp dword [eax + 0x2c], 0
jl 0x42c4a3
jg 0x42c41e
mov ecx, dword [ebp - 0x3c]
cmp dword [ecx + 0x28], 0
jb 0x42c4a3
mov edx, dword [ebp + 8]
movzx eax, word [edx + 0x14]
and eax, 0x40
je 0x42c4a3
mov ecx, dword [ebp + 8]
movzx edx, word [ecx + 0x14]
and edx, 0x800
jne 0x42c473
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3c]
or ecx, 0x8000
mov edx, dword [ebp + 8]
mov dword [edx + 0x3c], ecx
mov eax, dword [ebp - 8]
push eax
push 0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x34]
push edx
mov eax, dword [ecx + 0x30]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0042ddf0
add esp, 0x14
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x30], eax
mov dword [ecx + 0x34], edx
jmp 0x42c4a3
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x3c]
or eax, 0x8000
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x3c], eax
mov edx, dword [ebp - 8]
push edx
push 1
push 0
push 0
mov eax, dword [ebp + 8]
push eax
call fcn.0042ddf0
add esp, 0x14
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x30], eax
mov dword [ecx + 0x34], edx
call dword [sym.imp.MSVCR90.dll__errno]
mov edx, dword [eax]
mov dword [ebp - 0x10], edx
call dword [sym.imp.MSVCR90.dll__errno]
mov dword [eax], 0
cmp dword [ebp - 8], 0
je 0x42c591
mov eax, dword [ebp - 8]
cmp dword [eax], 0
je 0x42c591
mov ecx, dword [ebp + 8]
movzx edx, word [ecx + 0x14]
and edx, 0x40
mov dword [ebp - 0x2c], edx
cmp dword [ebp - 4], 0
je 0x42c4f4
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3c]
or ecx, dword [ebp - 4]
mov edx, dword [ebp + 8]
mov dword [edx + 0x3c], ecx
jmp 0x42c505
mov eax, dword [ebp + 8]
movzx ecx, word [eax + 0x14]
and ecx, 0xffffffbf
mov edx, dword [ebp + 8]
mov word [edx + 0x14], cx
mov eax, dword [ebp + 8]
movzx ecx, word [eax + 0x3a]
and ecx, 0x200
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp + 8]
movzx eax, word [edx + 0x3a]
or eax, 0x200
mov ecx, dword [ebp + 8]
mov word [ecx + 0x3a], ax
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
call ecx
add esp, 0x10
cdq
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
cmp dword [ebp - 0x30], 0
jne 0x42c562
mov edx, dword [ebp + 8]
movzx eax, word [edx + 0x3a]
and eax, 0xfffffdff
mov ecx, dword [ebp + 8]
mov word [ecx + 0x3a], ax
cmp dword [ebp - 4], 0
je 0x42c57b
mov edx, dword [ebp - 4]
not edx
mov eax, dword [ebp + 8]
and edx, dword [eax + 0x3c]
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x3c], edx
jmp 0x42c58c
mov edx, dword [ebp + 8]
movzx eax, word [edx + 0x14]
or eax, dword [ebp - 0x2c]
mov ecx, dword [ebp + 8]
mov word [ecx + 0x14], ax
jmp 0x42c6ae
mov edx, dword [ebp + 8]
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x40]
cmp dword [eax + 0x2c], 0
jg 0x42c5ca
jl 0x42c5ab
mov ecx, dword [ebp - 0x40]
cmp dword [ecx + 0x28], 0
jae 0x42c5ca
mov edx, dword [ebp + 8]
movzx eax, word [edx + 0x3a]
and eax, 8
je 0x42c5ca
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
jmp 0x42c6ae
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x44], ecx
mov edx, dword [ebp - 0x44]
cmp dword [edx + 0x2c], 0
jg 0x42c68e
jl 0x42c5ec
mov eax, dword [ebp - 0x44]
cmp dword [eax + 0x28], 0
jae 0x42c68e
mov ecx, dword [ebp + 8]
movzx edx, word [ecx + 0x14]
and edx, 0x40
je 0x42c68e
cmp dword [ebp - 4], 0
je 0x42c68e
mov eax, dword [ebp - 4]
and eax, 8
je 0x42c61a
mov ecx, dword [ebp + 8]
movzx edx, byte [ecx + 0x38]
mov dword [ebp - 0x48], edx
jmp 0x42c621
mov dword [ebp - 0x48], 0xffffffff
mov eax, dword [ebp - 4]
and eax, 0x10
neg eax
sbb eax, eax
neg eax
push eax
push 0xffffffffffffffff
mov ecx, dword [ebp - 0x48]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
movsx edx, word [ecx + 0x16]
push edx
call fcn.00434bf0
add esp, 0x18
cdq
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
cmp dword [ebp - 0x1c], 0
jl 0x42c68c
jg 0x42c661
cmp dword [ebp - 0x20], 0
jbe 0x42c68c
mov eax, dword [ebp - 4]
and eax, 0x10
je 0x42c67d
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x3c]
or edx, 0x200
mov eax, dword [ebp + 8]
mov dword [eax + 0x3c], edx
jmp 0x42c68c
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x3c]
or edx, 8
mov eax, dword [ebp + 8]
mov dword [eax + 0x3c], edx
jmp 0x42c6ae
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
movsx ecx, word [eax + 0x16]
push ecx
call dword [sym.imp.MSVCR90.dll__read]
add esp, 0xc
cdq
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
call dword [sym.imp.MSVCR90.dll__errno]
cmp dword [eax], 0
jne 0x42c6c4
call dword [sym.imp.MSVCR90.dll__errno]
mov edx, dword [ebp - 0x10]
mov dword [eax], edx
cmp dword [ebp - 0x1c], 0
jl 0x42c7a4
jg 0x42c6da
cmp dword [ebp - 0x20], 0
jbe 0x42c7a4
mov eax, dword [ebp + 8]
movzx ecx, word [eax + 0x3a]
and ecx, 0x200
jne 0x42c79c
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x3c]
and eax, 0x200
jne 0x42c768
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x30]
add edx, dword [ebp - 0x20]
mov eax, dword [ecx + 0x34]
adc eax, dword [ebp - 0x1c]
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x30], edx
mov dword [ecx + 0x34], eax
mov edx, dword [ebp + 8]
mov dword [ebp - 0x4c], edx
mov eax, dword [ebp - 0x4c]
cmp dword [eax + 0x2c], 0
jl 0x42c768
jg 0x42c72c
mov ecx, dword [ebp - 0x4c]
cmp dword [ecx + 0x28], 0
jb 0x42c768
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x50], edx
mov dword [ebp - 0x54], eax
mov ecx, dword [ebp - 0x50]
mov edx, dword [ebp - 0x54]
mov eax, dword [ecx + 0x2c]
cmp eax, dword [edx + 0x34]
jg 0x42c768
jl 0x42c756
mov ecx, dword [ebp - 0x50]
mov edx, dword [ebp - 0x54]
mov eax, dword [ecx + 0x28]
cmp eax, dword [edx + 0x30]
jae 0x42c768
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x30]
mov dword [ecx + 0x28], eax
mov edx, dword [edx + 0x34]
mov dword [ecx + 0x2c], edx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
cmp ecx, dword [eax + 0x18]
jb 0x42c79c
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x18]
mov ecx, dword [ebp + 8]
add eax, dword [ecx + 0x1c]
cmp dword [ebp + 0xc], eax
jae 0x42c79c
mov edx, dword [ebp - 0x20]
add edx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov dword [eax + 8], edx
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 8]
mov dword [ecx + 0xc], eax
mov eax, dword [ebp - 0x20]
jmp 0x42c851
cmp dword [ebp - 0x14], 0
je 0x42c7bc
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x3c]
or edx, 0x8000
mov eax, dword [ebp + 8]
mov dword [eax + 0x3c], edx
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 0x20]
push edx
push 1
mov eax, dword [ebp + 8]
push eax
call fcn.00434700
add esp, 0x10
mov dword [ebp - 0x58], eax
cmp dword [ebp - 0x58], 3
ja case.default.0x42c7de
mov ecx, dword [ebp - 0x58]
jmp dword [ecx*4 + 0x42c858]
jmp case.default.0x42c7de
cmp dword [ebp - 0x14], 0
je 0x42c7f6
mov dword [ebp - 0x5c], 0
jmp 0x42c7fc
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x5c], edx
mov eax, dword [ebp - 0x5c]
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 0x10]
jmp 0x42c851
cmp dword [ebp - 0x14], 0
jne case.0x42c7de.2
mov ecx, dword [ebp + 8]
movzx edx, word [ecx + 0x14]
and edx, 4
jne case.0x42c7de.2
jmp case.default.0x42c7de
or eax, 0xffffffff
jmp 0x42c851
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x40]
mov dword [ebp - 8], ecx
jmp 0x42c834
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x10]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x42c846
mov ecx, dword [ebp - 8]
cmp ecx, dword [ebp + 0x14]
jne 0x42c844
jmp 0x42c846
jmp 0x42c82b
mov edx, dword [ebp - 8]
mov dword [ebp + 0x14], edx
jmp 0x42c257
mov esp, ebp
pop ebp
ret