Function at 0x4302e0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
cmp dword [ebp + 8], 0
jne 0x4302f4
or eax, 0xffffffff
jmp 0x430a01
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 0x430331
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 0x430358
or eax, 0xffffffff
jmp 0x430a01
cmp dword [ebp - 0x14], 0
jne 0x430400
mov eax, dword [ebp + 8]
movzx ecx, word [eax + 0x3a]
and ecx, 0x200
jne 0x430400
mov edx, dword [ebp + 8]
cmp dword [edx + 0x3c], 1
je 0x43039a
push 0
push 1
mov eax, dword [ebp + 8]
push eax
call fcn.0042ef10
add esp, 0xc
test eax, eax
jge 0x43039a
or eax, 0xffffffff
jmp 0x430a01
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov eax, dword [ecx]
cmp eax, dword [edx + 0xc]
jae 0x430400
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.0042cac0
add esp, 4
test eax, eax
jge 0x4303d1
or eax, 0xffffffff
jmp 0x430a01
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 0x430425
mov ecx, dword [ebp + 8]
movsx edx, word [ecx + 0x16]
test edx, edx
jge 0x430425
xor eax, eax
jmp 0x430a01
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 0x43049c
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 0x430481
jl 0x430473
cmp dword [ebp - 0x20], 0
jae 0x430481
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
cmp dword [ebp - 0x1c], 0
jg 0x430494
jl 0x43048f
cmp dword [ebp - 0x20], 0
ja 0x430494
jmp 0x430954
mov eax, dword [ebp - 0x20]
jmp 0x430a01
cmp dword [ebp - 8], 0
jne 0x4304b3
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 0x4304de
mov edx, dword [ebp + 8]
movzx eax, word [edx + 0x3a]
and eax, 0x200
je 0x4304d2
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 0x4304d8
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 0x4304f7
mov eax, dword [ebp - 0x24]
cmp dword [eax], 0
jne 0x4304f7
mov ecx, dword [ebp - 0x24]
mov edx, dword [ecx + 0x10]
mov dword [ebp - 0x24], edx
jmp 0x4304de
cmp dword [ebp - 0x24], 0
je 0x430503
mov eax, dword [ebp - 0x24]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x430580
mov ecx, dword [ebp - 8]
cmp dword [ecx + 0xc], 0
je 0x430580
mov edx, dword [ebp + 8]
movzx eax, word [edx + 0x14]
and eax, 0x400
je 0x430580
cmp dword [ebp - 0x14], 0
je 0x430538
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.00437ed0
add esp, 0x10
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jle 0x43055f
mov ecx, dword [ebp - 0x28]
mov dword [ebp + 0x10], ecx
jmp 0x430580
cmp dword [ebp - 0x28], 0
jge 0x430580
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 0x430a01
cmp dword [ebp - 0xc], 0
jne 0x4305ac
mov edx, dword [ebp + 8]
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 0x38]
cmp dword [eax + 0x2c], 0
jg 0x4305ac
jl 0x4305a0
mov ecx, dword [ebp - 0x38]
cmp dword [ecx + 0x28], 0
jae 0x4305ac
mov dword [ebp - 0xc], 1
call fcn.00430a20
mov edx, dword [ebp + 8]
mov dword [ebp - 0x3c], edx
mov eax, dword [ebp - 0x3c]
cmp dword [eax + 0x2c], 0
jl 0x430653
jg 0x4305ce
mov ecx, dword [ebp - 0x3c]
cmp dword [ecx + 0x28], 0
jb 0x430653
mov edx, dword [ebp + 8]
movzx eax, word [edx + 0x14]
and eax, 0x40
je 0x430653
mov ecx, dword [ebp + 8]
movzx edx, word [ecx + 0x14]
and edx, 0x800
jne 0x430623
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.004373c0
add esp, 0x14
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x30], eax
mov dword [ecx + 0x34], edx
jmp 0x430653
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.004373c0
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 0x430741
mov eax, dword [ebp - 8]
cmp dword [eax], 0
je 0x430741
mov ecx, dword [ebp + 8]
movzx edx, word [ecx + 0x14]
and edx, 0x40
mov dword [ebp - 0x2c], edx
cmp dword [ebp - 4], 0
je 0x4306a4
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 0x4306b5
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 0x430712
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 0x43072b
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 0x43073c
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 0x43085e
mov edx, dword [ebp + 8]
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x40]
cmp dword [eax + 0x2c], 0
jg 0x43077a
jl 0x43075b
mov ecx, dword [ebp - 0x40]
cmp dword [ecx + 0x28], 0
jae 0x43077a
mov edx, dword [ebp + 8]
movzx eax, word [edx + 0x3a]
and eax, 8
je 0x43077a
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
jmp 0x43085e
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x44], ecx
mov edx, dword [ebp - 0x44]
cmp dword [edx + 0x2c], 0
jg 0x43083e
jl 0x43079c
mov eax, dword [ebp - 0x44]
cmp dword [eax + 0x28], 0
jae 0x43083e
mov ecx, dword [ebp + 8]
movzx edx, word [ecx + 0x14]
and edx, 0x40
je 0x43083e
cmp dword [ebp - 4], 0
je 0x43083e
mov eax, dword [ebp - 4]
and eax, 8
je 0x4307ca
mov ecx, dword [ebp + 8]
movzx edx, byte [ecx + 0x38]
mov dword [ebp - 0x48], edx
jmp 0x4307d1
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.004383c0
add esp, 0x18
cdq
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
cmp dword [ebp - 0x1c], 0
jl 0x43083c
jg 0x430811
cmp dword [ebp - 0x20], 0
jbe 0x43083c
mov eax, dword [ebp - 4]
and eax, 0x10
je 0x43082d
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x3c]
or edx, 0x200
mov eax, dword [ebp + 8]
mov dword [eax + 0x3c], edx
jmp 0x43083c
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x3c]
or edx, 8
mov eax, dword [ebp + 8]
mov dword [eax + 0x3c], edx
jmp 0x43085e
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 0x430874
call dword [sym.imp.MSVCR90.dll__errno]
mov edx, dword [ebp - 0x10]
mov dword [eax], edx
cmp dword [ebp - 0x1c], 0
jl 0x430954
jg 0x43088a
cmp dword [ebp - 0x20], 0
jbe 0x430954
mov eax, dword [ebp + 8]
movzx ecx, word [eax + 0x3a]
and ecx, 0x200
jne 0x43094c
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x3c]
and eax, 0x200
jne 0x430918
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 0x430918
jg 0x4308dc
mov ecx, dword [ebp - 0x4c]
cmp dword [ecx + 0x28], 0
jb 0x430918
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 0x430918
jl 0x430906
mov ecx, dword [ebp - 0x50]
mov edx, dword [ebp - 0x54]
mov eax, dword [ecx + 0x28]
cmp eax, dword [edx + 0x30]
jae 0x430918
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 0x43094c
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 0x43094c
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 0x430a01
cmp dword [ebp - 0x14], 0
je 0x43096c
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.00437ed0
add esp, 0x10
mov dword [ebp - 0x58], eax
cmp dword [ebp - 0x58], 3
ja case.default.0x43098e
mov ecx, dword [ebp - 0x58]
jmp dword [ecx*4 + 0x430a08]
jmp case.default.0x43098e
cmp dword [ebp - 0x14], 0
je 0x4309a6
mov dword [ebp - 0x5c], 0
jmp 0x4309ac
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 0x430a01
cmp dword [ebp - 0x14], 0
jne case.0x43098e.2
mov ecx, dword [ebp + 8]
movzx edx, word [ecx + 0x14]
and edx, 4
jne case.0x43098e.2
jmp case.default.0x43098e
or eax, 0xffffffff
jmp 0x430a01
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x40]
mov dword [ebp - 8], ecx
jmp 0x4309e4
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x10]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x4309f6
mov ecx, dword [ebp - 8]
cmp ecx, dword [ebp + 0x14]
jne 0x4309f4
jmp 0x4309f6
jmp 0x4309db
mov edx, dword [ebp - 8]
mov dword [ebp + 0x14], edx
jmp 0x430407
mov esp, ebp
pop ebp
ret