Function at 0x4954d0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push ebx
sub esp, 0x74
mov ebx, dword [ebp + 8]
cmp dword [ebx + 0x124], 0xfffffffc
je 0x497860
and byte [ebx + 0x1ad], 0xfe
test byte [ebx + 0x1a9], 0x10
je 0x495511
push ebx
call fcn.00499a80
add esp, 4
test eax, eax
jne 0x496a43
and byte [ebx + 0x1a9], 0xef
mov eax, dword [ebx + 0x94]
test byte [ebx + 0x1a2], 0x40
je 0x495563
test eax, eax
je 0x495579
cmp byte [eax + 0x1c], 0
je 0x495567
mov byte [ebp - 0x10], 0xa
mov edx, dword [eax + 0x10]
test edx, edx
push 1
jne 0x495539
mov edx, ebx
lea eax, [ebp - 0x10]
push eax
push edx
call fcn.00482e60
add esp, 0xc
cmp eax, 0xffffffff
je 0x496a4b
mov eax, dword [ebx + 0x94]
test eax, eax
je 0x495579
mov byte [eax + 0x1c], 0
mov eax, dword [ebx + 0x94]
test eax, eax
je 0x495579
mov byte [eax + 0x1d], 0
mov eax, dword [ebx + 0x94]
test eax, eax
je 0x495579
mov byte [eax + 0x20], 0
movsx edx, byte [ebx + 0x18c]
cmp edx, 8
ja 0x495ff4
movzx eax, word [edx*2 + 0x5094b0]
add eax, 0x495598
jmp eax
push 0xe5c
push 0x5094c4
push 2
push 8
call fcn.00480060
add esp, 0x10
mov eax, dword [ebx + 0x98]
xor esi, esi
mov dword [ebp - 0x50], eax
xor edi, edi
mov edx, dword [ebx + 0x160]
mov eax, dword [ebx + 0xb0]
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x58], 0
cmp edi, dword [ebp - 0x48]
ja 0x4976d1
cmp edi, dword [ebp - 0x48]
ja 0x496e8e
cmp edi, 4
jne 0x49612f
mov ecx, dword [ebx + 0x64]
test byte [ebx + 0x1a5], 0x20
movzx edx, byte [ecx + 1]
mov dword [ebp - 0x60], edx
movzx eax, byte [ecx]
movzx edx, byte [ecx + 2]
movzx ecx, byte [ecx + 3]
mov dword [ebp - 0x5c], ecx
je 0x496086
shl edx, 8
or ecx, edx
mov edx, dword [ebp - 0x60]
shl edx, 0x10
shl eax, 0x18
or ecx, edx
or ecx, eax
mov dword [ebp - 0x5c], ecx
jmp 0x49609e
mov ecx, dword [ebp - 0x60]
shl ecx, 8
shl edx, 0x10
or eax, ecx
or eax, edx
mov edx, dword [ebp - 0x5c]
shl edx, 0x18
or edx, eax
mov dword [ebp - 0x5c], edx
cmp dword [ebp - 0x5c], 0
jl 0x4960b0
movzx eax, byte [ebx + 0x1aa]
and eax, 0xffffffdf
jmp 0x4960bd
movzx eax, byte [ebx + 0x1aa]
neg dword [ebp - 0x5c]
or eax, 0x20
mov byte [ebx + 0x1aa], al
mov eax, dword [ebp - 0x5c]
movzx edx, byte [ebx + 0x1ac]
and edx, 0xfffffffe
mov dword [ebx + 0x17c], eax
mov dword [ebp - 0x4c], edx
cmp dword [ebx + 0x164], 0xb
jne 0x496125
and edx, 4
shr edx, 2
je 0x496102
test byte [ebp - 0x4c], 0x40
je 0x496102
mov eax, dword [ebp - 0x4c]
inc eax
mov dword [ebp - 0x4c], eax
mov byte [ebx + 0x1ac], al
jmp 0x49618a
mov eax, dword [ebx + 0x168]
test eax, eax
jne 0x496111
mov eax, 0x20000
cmp eax, dword [ebp - 0x5c]
jae 0x49611a
test edx, edx
je 0x4960f0
mov eax, dword [ebp - 0x4c]
mov byte [ebx + 0x1ac], al
jmp 0x49618a
mov eax, edx
mov byte [ebx + 0x1ac], al
jmp 0x49618a
cmp edi, 2
jne 0x496177
mov eax, dword [ebx + 0x64]
movzx edx, byte [eax + 1]
shl edx, 8
movzx ecx, byte [eax]
or ecx, edx
movsx eax, cx
mov dword [ebp - 0x5c], eax
cmp eax, 1
je 0x496ef6
movzx eax, byte [ebx + 0x1ac]
mov edx, dword [ebp - 0x5c]
mov dword [ebp - 0x4c], eax
and edx, 0x80000001
jge 0x49616e
sub edx, 1
or edx, 0xfffffffe
inc edx
xor eax, eax
cmp eax, edx
adc esi, 0
jmp 0x49618a
mov eax, dword [ebx + 0x118]
movzx edx, byte [ebx + 0x1ac]
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x4c], edx
mov edx, dword [ebp - 0x5c]
lea eax, [esi + edx]
mov edx, dword [ebp - 0x4c]
and edx, 1
mov dword [ebp - 0x38], eax
cmp eax, dword [ebp - 0x48]
jbe 0x49743b
test edx, edx
jne 0x49743b
test byte [ebx + 0x1a0], 1
jne 0x497212
cmp dword [ebp - 0x54], 0
je 0x497212
mov edx, eax
sub edx, esi
mov eax, dword [ebx + 0x10c]
mov dword [ebp - 0x60], edx
cmp edx, eax
jae 0x4961df
test byte [ebx + 0x1a7], 0x40
je 0x497212
cmp dword [ebp + 0xc], 0
je 0x4976c2
mov edx, dword [ebp + 0xc]
movsx edx, byte [edx + 1]
cmp edx, 5
je 0x497695
cmp edx, 7
je 0x497673
cmp dword [ebp - 0x50], 0
je 0x497207
movzx eax, byte [ebx + 0x1aa]
not eax
mov edx, dword [ebp - 0x48]
and eax, 0x20
sub edx, edi
shr eax, 5
mov dword [ebp - 0x3c], eax
cmp edx, dword [ebp - 0x14]
jb 0x496291
mov eax, dword [ebx + 0x64]
lea edx, [edi + eax]
cmp edx, dword [ebp - 0x50]
jb 0x496244
mov ecx, dword [ebp - 0x50]
mov esi, dword [ebp - 0x14]
add ecx, esi
cmp ecx, edx
ja 0x496251
cmp edx, dword [ebp - 0x50]
ja 0x49625f
mov ecx, dword [ebp - 0x14]
lea esi, [edi + ecx]
add esi, eax
cmp esi, dword [ebp - 0x50]
jbe 0x49625f
push dword [ebp - 0x14]
push edx
push dword [ebp - 0x50]
call fcn.004d1b40
jmp 0x49626b
push dword [ebp - 0x14]
push edx
push dword [ebp - 0x50]
call fcn.004ca960
add esp, 0xc
mov eax, dword [ebx + 0xb0]
mov edx, dword [ebp - 0x14]
sub eax, edi
sub dword [ebx + 0x17c], edx
sub eax, edx
xor edx, edx
mov dword [ebx + 0xb0], eax
mov dword [ebp - 0x14], edx
jmp 0x496319
mov ecx, dword [ebx + 0x64]
lea eax, [edi + ecx]
cmp eax, dword [ebp - 0x50]
jb 0x4962ad
mov esi, dword [ebp - 0x50]
sub esi, edi
add esi, dword [ebp - 0x48]
cmp esi, eax
ja 0x4962b7
cmp eax, dword [ebp - 0x50]
ja 0x4962c3
mov esi, dword [ebp - 0x48]
add esi, ecx
cmp esi, dword [ebp - 0x50]
jbe 0x4962c3
push edx
push eax
push dword [ebp - 0x50]
call fcn.004d1b40
jmp 0x4962cd
push edx
push eax
push dword [ebp - 0x50]
call fcn.004ca960
add esp, 0xc
mov eax, dword [ebx + 0xb0]
mov ecx, eax
mov edx, dword [ebp - 0x60]
sub ecx, edi
mov esi, edx
sub esi, ecx
mov dword [ebp - 0x48], esi
mov esi, dword [ebp - 0x14]
sub esi, ecx
add eax, dword [ebx + 0x64]
add dword [ebp - 0x50], ecx
mov dword [ebp - 0x14], esi
mov dword [ebx + 0x50], eax
mov dword [ebx + 0xb0], 0
mov dword [ebx + 0x64], 0
mov dword [ebp - 0x28], edx
test esi, esi
mov esi, dword [ebp - 0x48]
jg 0x49689d
mov edx, 1
or byte [ebx + 0x1a7], 0x40
test edx, edx
je 0x496333
mov eax, esi
add esi, edi
cdq
mov ecx, edx
adc ecx, 0
jmp 0x49647a
mov eax, dword [ebx + 0x68]
mov edx, dword [ebx + 0x4c]
mov dword [ebp - 0x44], eax
sub eax, edx
mov dword [ebp - 0x40], edx
cmp eax, dword [ebp - 0x38]
jg 0x49646d
mov esi, dword [ebp - 0x38]
mov eax, esi
mov ecx, dword [ebp - 0x44]
cdq
mov eax, ecx
mov dword [ebp - 0x4c], edx
cdq
mov eax, dword [ebp - 0x40]
mov ebx, edx
cdq
sub ecx, eax
mov dword [ebp - 0x20], edi
sbb ebx, edx
sub esi, ecx
mov ecx, dword [ebp - 0x4c]
sbb ecx, ebx
mov ebx, dword [ebp + 8]
movzx edx, byte [eax]
mov dword [ebp - 0x54], edx
movzx edi, byte [ebx + 0x1a5]
and edi, 0x20
movzx edx, byte [eax + 2]
mov dword [ebp - 0x58], edx
movzx edx, byte [eax + 3]
mov dword [ebp - 0x60], edx
shr edi, 5
mov dword [ebp - 0x50], edi
movzx edi, byte [eax + 1]
mov dword [ebp - 0x5c], edi
mov edi, dword [ebp - 0x20]
je 0x4963bd
mov eax, dword [ebp - 0x58]
shl eax, 8
or edx, eax
mov eax, dword [ebp - 0x5c]
shl eax, 0x10
or edx, eax
mov eax, dword [ebp - 0x54]
shl eax, 0x18
or edx, eax
mov dword [ebp - 0x60], edx
jmp 0x4963db
mov eax, dword [ebp - 0x5c]
shl eax, 8
mov edx, dword [ebp - 0x54]
or edx, eax
mov eax, dword [ebp - 0x58]
shl eax, 0x10
or edx, eax
mov eax, dword [ebp - 0x60]
shl eax, 0x18
or eax, edx
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x60]
cdq
add eax, 8
mov dword [ebp - 0x60], eax
adc edx, 0
sub eax, dword [ebp - 0x38]
mov dword [ebp - 0x5c], edx
mov ebx, dword [ebp + 8]
sbb edx, dword [ebp - 0x4c]
jge 0x49647a
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x48], esi
mov edi, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x60]
mov edx, dword [ebp - 0x40]
cmp edx, dword [ebp - 0x44]
jae 0x496462
add edx, eax
add dword [ebp - 0x48], eax
mov dword [ebp - 0x40], edx
adc ecx, edi
movzx edi, byte [edx]
movzx esi, byte [edx + 1]
movzx ebx, byte [edx + 2]
movzx eax, byte [edx + 3]
cmp dword [ebp - 0x50], 0
je 0x49643e
shl ebx, 8
shl esi, 0x10
or eax, ebx
shl edi, 0x18
or eax, esi
or eax, edi
jmp 0x49644d
shl esi, 8
shl ebx, 0x10
or edi, esi
shl eax, 0x18
or edi, ebx
or eax, edi
cdq
add eax, 8
mov edi, edx
mov ebx, eax
adc edi, 0
sub ebx, dword [ebp - 0x38]
mov esi, edi
sbb esi, dword [ebp - 0x4c]
jl 0x496406
mov esi, dword [ebp - 0x48]
mov edi, dword [ebp - 0x20]
mov ebx, dword [ebp + 8]
jmp 0x49647a
mov esi, dword [ebp - 0x38]
xor ecx, ecx
sub esi, edi
sub esi, dword [ebx + 0x160]
mov edx, 1
mov dword [esp + 4], esi
mov eax, dword [ebx + 0x104]
mov dword [esp + 8], ecx
call fcn.00491ff0
mov ecx, eax
mov eax, 0xffffffff
sub ecx, eax
sub edx, eax
or ecx, edx
je 0x496be3
mov ecx, edi
lea eax, [ebx + 0xb0]
mov dword [ebp - 0x20], eax
mov dword [esp + 0xc], eax
movzx eax, byte [ebx + 0x1a8]
and eax, 0x80
shr eax, 7
mov dword [esp + 0x10], eax
movzx eax, byte [ebx + 0x1a9]
and eax, 1
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x16c]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 0x104]
mov edx, dword [ebx + 0x4c]
mov dword [esp + 0x1c], ebx
call fcn.0049789c
movzx edx, byte [ebx + 0x1a5]
cmp dword [ebp - 0x3c], 0
je 0x496506
mov eax, dword [ebx + 0x4c]
jmp 0x496782
mov eax, dword [ebx + 0x4c]
movzx ecx, byte [eax]
movzx esi, byte [eax + 1]
movzx edi, byte [eax + 2]
movzx eax, byte [eax + 3]
test dl, 0x20
je 0x49652e
shl edi, 8
shl esi, 0x10
or eax, edi
shl ecx, 0x18
or eax, esi
or eax, ecx
jmp 0x49653d
shl esi, 8
shl edi, 0x10
or ecx, esi
shl eax, 0x18
or ecx, edi
or eax, ecx
xor esi, esi
cdq
mov edi, eax
lea ecx, [ebp - 0x38]
xor edi, edx
test eax, eax
push 1
push ecx
mov dword [ecx], 0
jl 0x496559
mov esi, 1
sub edi, edx
sub edi, dword [ebx + 0xb0]
add edi, 8
push edi
push dword [ebx + 0x104]
mov dword [ebp - 0x3c], edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x3c], eax
cmp eax, 0xffffffff
je 0x496fb3
cmp eax, 0xffffffff
je 0x49687d
mov ecx, dword [ebx + 0x104]
mov dword [ebp - 0x30], ecx
movzx ecx, byte [ebx + 0x1a8]
and ecx, 0x80
movzx eax, byte [ebx + 0x1a9]
shr ecx, 7
and eax, 1
mov edx, dword [ebx + 0x16c]
mov edi, dword [ebx + 0x4c]
mov dword [ebp - 0x2c], eax
mov dword [ebx + 0xb0], 0
cmp dword [ebx + 0x28], 0xfffffffc
je 0x496f94
cmp dword [0x2e00b58], 0
je 0x496678
lea eax, [edx - 1]
cmp eax, 1
jbe 0x49687d
test ecx, ecx
je 0x496670
cmp edx, 0xfffffffa
je 0x496f64
test edx, edx
je 0x496f25
cmp dword [ebp - 0x2c], 0
je 0x496678
mov dword [ebp - 0x4c], 0
push dword [ebp - 0x34]
mov dword [ebp - 0x54], edx
call fcn.004cf410
push dword [ebp - 0x34]
call fcn.004cf430
mov edx, dword [ebp - 0x54]
add esp, 8
cmp dword [ebp - 0x4c], 0
je 0x496678
push dword [ebp - 0x34]
push 4
push edi
call fcn.004cf410
add esp, 0xc
mov dword [ebx + 0xb0], eax
cmp eax, 0xffffffff
je 0x49687d
push 0
push dword [ebp - 0x34]
push 2
push 0x509510
mov dword [ebp - 0x48], eax
call fcn.004cf410
mov eax, dword [ebp - 0x48]
add esp, 0x10
mov byte [eax + edi], 0xa
inc dword [ebx + 0xb0]
jmp 0x49672c
test edx, edx
je 0x496f25
mov dword [ebp - 0x54], edx
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebx + 0x168]
mov edx, dword [ebp - 0x54]
mov dword [ebx + 0xb0], 0
test eax, eax
je 0x496709
cmp eax, 4
jae 0x496709
test edx, edx
je 0x496709
test eax, eax
mov dword [ebp - 0x60], esi
jne 0x4966af
mov eax, 0x20000
mov edx, 4
mov ebx, edi
mov edi, eax
mov esi, edx
push 0
lea ecx, [ebp - 0x5c]
push ecx
push edi
push ebx
push dword [ebp - 0x30]
mov dword [ebp - 0x58], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4966da
mov esi, dword [ebp - 0x60]
mov ebx, dword [ebp + 8]
jmp 0x496724
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x5c]
sub esi, edx
add ebx, edx
add dword [ecx], edx
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0x168]
test ecx, ecx
jne 0x4966f8
mov ecx, 0x20000
cmp esi, ecx
ja 0x4966fe
mov edi, esi
test esi, esi
je 0x4966d2
cmp edx, dword [ebp - 0x58]
je 0x4966ba
jmp 0x4966d2
push 0
lea eax, [ebp - 0x5c]
push eax
push 4
push edi
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 0x5c]
mov dword [ebx + 0xb0], edx
test eax, eax
je 0x49687d
mov eax, dword [ebx + 0x4c]
movzx edx, byte [ebx + 0x1a5]
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x40], eax
movzx edx, byte [eax]
movzx ecx, byte [eax + 1]
movzx edi, byte [eax + 2]
movzx eax, byte [eax + 3]
mov ebx, dword [ebp + 8]
test byte [ebp - 0x44], 0x20
je 0x496765
shl edi, 8
shl ecx, 0x10
or eax, edi
shl edx, 0x18
or eax, ecx
or eax, edx
jmp 0x496774
shl ecx, 8
shl edi, 0x10
or edx, ecx
shl eax, 0x18
or edx, edi
or eax, edx
test esi, esi
je 0x49653f
mov eax, dword [ebp - 0x40]
mov edx, dword [ebp - 0x44]
mov esi, dword [ebx + 0xb0]
or edx, 2
mov dword [ebx + 0x64], eax
mov byte [ebx + 0x1a5], dl
cmp dword [ebp - 0x14], 0
lea ecx, [eax + esi]
mov dword [ebp - 0x18], ecx
mov dword [ebx + 0x68], ecx
mov dword [ebx + 0x50], ecx
je 0x4967ae
test esi, esi
je 0x49787b
mov edi, dword [ebx + 0x58]
mov dword [ebx + 0x12c], 0
cmp edi, dword [ebp - 0x18]
je 0x49680b
movsx eax, byte [ebx + 0x18c]
add eax, 0xfffffffa
test eax, 0xfffffffd
jne 0x49680b
mov eax, edi
dec eax
je 0x496f80
cmp byte [edi - 1], 0xd
jne 0x4967ec
mov edi, dword [ebp - 0x18]
cmp edi, eax
ja 0x4967e9
mov edi, eax
mov dword [ebx + 0x58], edi
test byte [ebx + 0x1aa], 0x10
je 0x49680b
cmp edi, dword [ebp - 0x18]
jbe 0x49680b
mov eax, dword [ebp - 0x18]
cmp byte [edi - 1], 0xd
jne 0x49680b
dec edi
mov dword [ebx + 0x58], edi
cmp edi, eax
ja 0x4967fd
test byte [ebx + 0x1a0], 4
je 0x496835
test byte [ebx + 0x1a2], 0x40
je 0x496835
test byte [ebx + 0x1a3], 8
je 0x496835
cmp byte [ebx + 0x18c], 1
jne 0x496835
add edi, 0xfffffffe
mov dword [ebx + 0x58], edi
sub edi, dword [ebp - 0x18]
cmp edi, 1
jne 0x496873
movzx eax, byte [ebx + 0x1a2]
test al, 0x40
jne 0x496867
test eax, 0x80
jne 0x49685e
movzx eax, byte [ebx + 0x1a8]
test al, 1
jne 0x49685e
test al, 2
je 0x496873
cmp byte [ebx + 0x18c], 4
jne 0x496873
mov eax, dword [ebp - 0x18]
cmp byte [eax], 0x1a
je 0x496f03
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x108], eax
and byte [ebx + 0x1ad], 0xfe
mov eax, 0x27
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
mov dword [ebp - 0x20], edi
mov edi, dword [ebp - 0x14]
cmp esi, edi
mov ecx, esi
mov eax, dword [ebx + 0x104]
lea edx, [ebp - 0x1c]
mov dword [esp + 0xc], edx
movzx edx, byte [ebx + 0x1a8]
jl 0x4968bf
mov ecx, edi
and edx, 0x80
shr edx, 7
mov dword [esp + 0x10], edx
movzx edx, byte [ebx + 0x1a9]
and edx, 1
mov dword [esp + 0x14], edx
mov edx, dword [ebx + 0x16c]
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], ebx
mov edx, dword [ebp - 0x50]
call fcn.0049789c
mov dword [ebp - 0x54], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e3
je 0x4971f4
cmp dword [ebp - 0x54], 0
je 0x4971b8
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x497189
sub edi, edx
sub esi, edx
add dword [ebp - 0x50], edx
test edi, edi
jle 0x497179
movzx eax, byte [ebx + 0x1a8]
lea esi, [ebp - 0x1c]
and eax, 0x80
mov ecx, dword [ebx + 0x16c]
movzx edx, byte [ebx + 0x1a9]
mov dword [esp + 0xc], esi
and edx, 1
shr eax, 7
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
lea edx, [ebp - 0x24]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ebx
mov eax, dword [ebx + 0x104]
mov ecx, dword [ebp - 0x20]
call fcn.0049789c
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e3
je 0x497166
test esi, esi
je 0x49712a
cmp dword [ebp - 0x1c], 0
je 0x4970fb
cmp dword [ebp - 0x20], 4
je 0x4970aa
mov eax, dword [ebp - 0x24]
cdq
xor eax, edx
lea esi, [ebp - 0x1c]
sub eax, edx
mov dword [ebp - 0x24], eax
movzx eax, byte [ebx + 0x1a8]
and eax, 0x80
mov ecx, dword [ebx + 0x16c]
movzx edx, byte [ebx + 0x1a9]
mov dword [esp + 0xc], esi
and edx, 1
shr eax, 7
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
lea edx, [ebp - 0x28]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ebx
mov eax, dword [ebx + 0x104]
mov ecx, dword [ebp - 0x20]
call fcn.0049789c
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e3
je 0x497097
test esi, esi
je 0x49705b
cmp dword [ebp - 0x1c], 0
je 0x49702c
cmp dword [ebp - 0x20], 4
je 0x496fd5
mov esi, dword [ebp - 0x28]
test esi, esi
js 0x496a32
mov dword [ebp - 0x3c], 1
jmp 0x4968a3
neg esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x3c], 0
jmp 0x4968a3
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x108], eax
mov eax, 0x26
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x108], eax
mov eax, 0x27
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
mov eax, 0x18
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
mov eax, dword [ebx + 0x50]
cmp byte [eax + 2], 0x1a
jne 0x496152
add dword [ebx + 0xb8], 1
adc dword [ebx + 0xbc], 0
mov eax, 0x18
and byte [ebx + 0x1a7], 0xfb
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x50], ecx
call fcn.004cf430
mov ecx, dword [ebp - 0x50]
mov edx, dword [ebp - 0x54]
mov dword [ebp - 0x34], eax
cmp dword [0x2e00b58], 0
je 0x49662a
test ecx, ecx
je 0x49662a
cmp dword [ebp - 0x2c], 0
je 0x49662a
mov dword [ebp - 0x4c], 1
jmp 0x49660b
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x2c], 0
je 0x49662a
mov dword [ebp - 0x4c], 1
jmp 0x49660b
push 0x13bc
push str.for_get.c
push str.terminator_minus_one
call fcn.004d61ea
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x50], ecx
call fcn.00481300
mov ecx, dword [ebp - 0x50]
mov edx, dword [ebp - 0x54]
cmp eax, 1
jg 0x49672c
jmp 0x4965cc
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x496fcd
mov eax, 0xffffffff
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
jmp 0x496580
mov eax, dword [ebp - 0x3c]
jmp 0x496580
test byte [ebx + 0x1a5], 0x20
je 0x497005
movzx edx, byte [ebp - 0x26]
shl edx, 8
movzx esi, byte [ebp - 0x25]
movzx ecx, byte [ebp - 0x27]
or esi, edx
shl ecx, 0x10
movzx edx, byte [ebp - 0x28]
or esi, ecx
shl edx, 0x18
or esi, edx
mov dword [ebp - 0x28], esi
jmp 0x496a22
movzx edx, byte [ebp - 0x27]
shl edx, 8
movzx esi, byte [ebp - 0x28]
movzx ecx, byte [ebp - 0x26]
or esi, edx
shl ecx, 0x10
movzx edx, byte [ebp - 0x25]
or esi, ecx
shl edx, 0x18
or esi, edx
mov dword [ebp - 0x28], esi
jmp 0x496a22
and byte [ebx + 0x1ad], 0xfe
cmp dword [ebx + 0x124], 0xfffffffc
jne 0x496e8e
call fcn.00481300
cmp eax, 1
jle 0x496e8e
mov eax, 0x30d
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
and byte [ebx + 0x1ad], 0xfe
mov dword [ebx + 0x108], eax
cmp eax, 0x26
je 0x496e8e
cmp eax, 0x6d
jne 0x49708a
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
cmp eax, dword [ebx + 0x104]
je 0x496e8e
mov eax, 0x27
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
mov dword [ebp - 0x60], eax
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x60]
jmp 0x496a03
test byte [ebx + 0x1a5], 0x20
je 0x4970d7
movzx edx, byte [ebp - 0x22]
shl edx, 8
movzx eax, byte [ebp - 0x21]
movzx ecx, byte [ebp - 0x23]
or eax, edx
shl ecx, 0x10
movzx esi, byte [ebp - 0x24]
or eax, ecx
shl esi, 0x18
or eax, esi
jmp 0x4969a1
movzx edx, byte [ebp - 0x23]
shl edx, 8
movzx eax, byte [ebp - 0x24]
movzx ecx, byte [ebp - 0x22]
or eax, edx
shl ecx, 0x10
movzx esi, byte [ebp - 0x21]
or eax, ecx
shl esi, 0x18
or eax, esi
jmp 0x4969a1
and byte [ebx + 0x1ad], 0xfe
cmp dword [ebx + 0x124], 0xfffffffc
jne 0x496e8e
call fcn.00481300
cmp eax, 1
jle 0x496e8e
mov eax, 0x30d
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
and byte [ebx + 0x1ad], 0xfe
mov dword [ebx + 0x108], eax
cmp eax, 0x26
je 0x496e8e
cmp eax, 0x6d
jne 0x497159
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
cmp eax, dword [ebx + 0x104]
je 0x496e8e
mov eax, 0x27
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
mov dword [ebp - 0x5c], eax
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x5c]
jmp 0x496982
mov dword [ebp - 0x14], edi
mov edx, 1
mov edi, dword [ebp - 0x20]
jmp 0x496319
and byte [ebx + 0x1ad], 0xfe
cmp dword [ebx + 0x124], 0xfffffffc
jne 0x496e8e
call fcn.00481300
cmp eax, 1
jle 0x496e8e
mov eax, 0x30d
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
and byte [ebx + 0x1ad], 0xfe
mov dword [ebx + 0x108], eax
cmp eax, 0x26
je 0x496e8e
cmp eax, 0x6d
jne 0x4971e7
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
cmp eax, dword [ebx + 0x104]
je 0x496e8e
mov eax, 0x27
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
mov dword [ebp - 0x58], eax
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x58]
jmp 0x496904
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4974ea
cmp dword [ebp - 0x58], 0
mov ecx, dword [ebx + 0x98]
mov eax, dword [ebx + 0x4c]
jne 0x497223
mov ecx, eax
mov edx, dword [ebx + 0x64]
mov dword [ebp - 0x60], ecx
cmp ecx, edx
je 0x497283
cmp dword [ebp - 0x48], 0
jbe 0x497272
cmp edx, dword [ebp - 0x60]
jb 0x497248
mov eax, ecx
mov ecx, dword [ebp - 0x48]
add eax, ecx
cmp eax, edx
ja 0x497252
cmp edx, dword [ebp - 0x60]
ja 0x497260
mov eax, dword [ebp - 0x48]
add eax, edx
cmp eax, dword [ebp - 0x60]
jbe 0x497260
push dword [ebp - 0x48]
push edx
push dword [ebp - 0x60]
call fcn.004d1b40
jmp 0x49726c
push dword [ebp - 0x48]
push edx
push dword [ebp - 0x60]
call fcn.004ca960
add esp, 0xc
mov eax, dword [ebx + 0x4c]
cmp eax, dword [ebp - 0x60]
jne 0x497283
mov edx, dword [ebx + 0x64]
sub edx, dword [ebp - 0x60]
mov dword [ebx + 0x64], eax
sub dword [ebx + 0x58], edx
mov ecx, dword [ebx + 0x10c]
cmp ecx, dword [ebp - 0x38]
jae 0x497324
cmp dword [ebp - 0x54], 0
jne 0x4972a5
mov eax, 0x16
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
mov edx, dword [ebp - 0x5c]
lea eax, [ebx + 0x4c]
push ecx
push eax
lea eax, [esi + edx + 0x14]
push eax
call fcn.004875f0
add esp, 0xc
test eax, eax
je 0x4972cb
mov eax, 0x62
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
mov eax, dword [ebp - 0x5c]
lea edx, [esi + eax + 4]
mov eax, dword [ebx + 0x4c]
mov dword [ebx + 0x118], edx
mov dword [ebx + 0x10c], edx
mov dword [edx + eax], 0x23332340
mov dword [ebp - 0x60], eax
mov edx, dword [ebx + 0x4c]
mov eax, dword [ebx + 0x10c]
mov dword [eax + edx + 4], 0x23372335
mov edx, dword [ebx + 0x4c]
mov eax, dword [ebx + 0x10c]
mov dword [eax + edx + 8], 0x23302339
mov edx, dword [ebx + 0x4c]
mov eax, dword [ebx + 0x10c]
mov dword [eax + edx + 0xc], 0x352333
mov ecx, dword [ebx + 0x10c]
mov eax, dword [ebx + 0xb0]
sub ecx, eax
mov edx, dword [ebp - 0x60]
add edx, eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x60], edx
mov dword [esp + 0xc], eax
movzx eax, byte [ebx + 0x1a8]
and eax, 0x80
shr eax, 7
mov dword [esp + 0x10], eax
movzx eax, byte [ebx + 0x1a9]
and eax, 1
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x16c]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 0x104]
mov dword [esp + 0x1c], ebx
call fcn.0049789c
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x60]
add dword [ebx + 0xb0], eax
mov dword [ebx + 0x50], edx
add edx, eax
mov eax, dword [ebx + 0x4c]
mov dword [ebx + 0x68], edx
mov dword [ebx + 0x64], eax
mov dword [ebx + 0x58], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e3
je 0x4974d7
cmp dword [ebp - 0x5c], 0
jne 0x4973ec
and byte [ebx + 0x1ad], 0xfe
mov dword [ebx + 0x108], eax
cmp eax, 0x26
je 0x496e8e
cmp eax, 0x6d
jne 0x4973df
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
cmp eax, dword [ebx + 0x104]
je 0x496e8e
mov eax, 0x27
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
cmp dword [ebp - 0x1c], 0
jne 0x49740f
and byte [ebx + 0x1ad], 0xfe
cmp dword [ebx + 0x124], 0xfffffffc
je 0x497477
mov eax, 0x18
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
cmp dword [ebp - 0x58], 0
je 0x49741c
or byte [ebx + 0x1a7], 0x40
mov eax, dword [ebx + 0xb0]
mov dword [ebp - 0x48], eax
cmp eax, dword [ebp - 0x38]
jb 0x496890
movzx edx, byte [ebx + 0x1ac]
mov dword [ebp - 0x4c], edx
and edx, 1
mov eax, dword [ebx + 0x64]
sub dword [ebp - 0x48], edi
lea ecx, [edi + eax]
mov dword [ebp - 0x18], ecx
mov dword [ebx + 0x50], ecx
cmp edx, 1
je 0x49748e
mov edx, dword [ebp - 0x38]
add eax, edx
neg edx
add edx, edi
sub edi, esi
add edx, dword [ebp - 0x48]
add edi, eax
mov dword [ebx + 0x64], eax
mov dword [ebx + 0xb0], edx
mov dword [ebx + 0x58], edi
or byte [ebx + 0x1a5], 2
jmp 0x4967b1
call fcn.00481300
cmp eax, 1
jle 0x497402
mov eax, 0x30d
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
mov edx, dword [ebp - 0x48]
mov dword [ebx + 0xb0], edx
test byte [ebp - 0x4c], 0x40
je 0x4974c7
cmp edx, dword [ebp - 0x38]
jb 0x4974b6
mov edi, edx
mov edx, dword [ebp - 0x38]
add edx, eax
mov dword [ebx + 0x64], edx
add edi, eax
mov dword [ebx + 0x58], edi
jmp 0x4967b1
mov edi, dword [ebx + 0x4c]
add edi, dword [ebx + 0x10c]
mov dword [ebx + 0x58], edi
jmp 0x4967b1
sub esi, edi
add eax, dword [ebp - 0x48]
lea edi, [esi + eax]
mov dword [ebx + 0x58], edi
jmp 0x4967b1
mov dword [ebp - 0x60], eax
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x60]
jmp 0x4973aa
mov eax, dword [ebp + 0xc]
cmp byte [eax], 1
jne 0x497212
mov dword [ebp - 0x20], edi
lea edx, [ebx + 0xb0]
mov dword [ebp - 0x60], edx
mov eax, dword [ebp - 0x48]
mov edi, dword [ebp - 0x38]
mov edx, 1
sub edi, eax
mov dword [esp + 4], edi
mov eax, dword [ebx + 0x104]
mov dword [esp + 8], 0
call fcn.00491ff0
mov ecx, eax
mov eax, 0xffffffff
sub ecx, eax
sub edx, eax
or ecx, edx
je 0x496be3
test byte [ebx + 0x1aa], 0x20
je 0x497602
movzx edi, byte [ebx + 0x1a8]
mov esi, dword [ebp - 0x60]
and edi, 0x80
mov edx, dword [ebx + 0x16c]
movzx eax, byte [ebx + 0x1a9]
mov dword [esp + 0xc], esi
and eax, 1
shr edi, 7
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], ebx
mov eax, dword [ebx + 0x104]
mov edx, dword [ebx + 0x4c]
mov ecx, dword [ebp - 0x20]
call fcn.0049789c
mov eax, dword [ebx + 0xb0]
mov edi, dword [ebx + 0x4c]
mov dword [ebx + 0x50], edi
test byte [ebx + 0x1a5], 0x20
lea edx, [eax + edi]
mov dword [ebx + 0x68], edx
movzx edx, byte [edi]
movzx ecx, byte [edi + 1]
movzx esi, byte [edi + 2]
movzx edi, byte [edi + 3]
je 0x4975cb
shl esi, 8
shl ecx, 0x10
or edi, esi
shl edx, 0x18
or edi, ecx
or edi, edx
jl 0x4975e8
jmp 0x4975dc
shl ecx, 8
shl esi, 0x10
or edx, ecx
shl edi, 0x18
or edx, esi
or edi, edx
jl 0x4975e8
movzx edx, byte [ebx + 0x1aa]
and edx, 0xffffffdf
jmp 0x4975f4
movzx edx, byte [ebx + 0x1aa]
neg edi
or edx, 0x20
mov byte [ebx + 0x1aa], dl
add edi, 8
jmp 0x497508
movzx eax, byte [ebx + 0x1a8]
mov edx, dword [ebp - 0x60]
and eax, 0x80
mov edi, dword [ebp - 0x20]
mov ecx, edi
mov dword [esp + 0xc], edx
shr eax, 7
mov dword [esp + 0x10], eax
movzx eax, byte [ebx + 0x1a9]
and eax, 1
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x16c]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 0x104]
mov edx, dword [ebx + 0x4c]
mov dword [esp + 0x1c], ebx
call fcn.0049789c
mov edx, dword [ebx + 0x4c]
mov eax, dword [ebx + 0xb0]
mov dword [ebx + 0x64], edx
add eax, edx
add edx, edi
mov dword [ebx + 0x68], eax
mov dword [ebp - 0x18], edx
mov dword [ebx + 0x50], edx
or byte [ebx + 0x1a5], 2
mov edi, dword [ebx + 0x58]
jmp 0x4967b1
mov eax, dword [ebp + 0xc]
cmp byte [eax + 2], 1
jne 0x496202
mov eax, dword [ebx + 0x50]
mov edi, dword [ebx + 0x58]
or byte [ebx + 0x1a7], 0x20
mov dword [ebp - 0x18], eax
jmp 0x4967b1
mov edx, dword [ebp + 0xc]
cmp byte [edx + 2], 1
jne 0x496202
mov edx, dword [ebp + 0x10]
cmp eax, dword [edx]
ja 0x496202
mov eax, dword [ebx + 0x50]
mov edi, dword [ebx + 0x58]
or byte [ebx + 0x1a7], 0x20
mov dword [ebp - 0x18], eax
jmp 0x4967b1
cmp dword [ebp - 0x50], 0
jne 0x49620c
jmp 0x497212
cmp dword [ebp - 0x48], 0
jbe 0x497715
mov eax, dword [ebx + 0x64]
mov edx, dword [ebx + 0x4c]
cmp edx, eax
ja 0x4976ee
mov ecx, dword [ebp - 0x48]
add ecx, edx
cmp ecx, eax
ja 0x4976f7
cmp edx, eax
jb 0x497706
mov ecx, dword [ebp - 0x48]
add ecx, eax
cmp edx, ecx
jae 0x497706
push dword [ebp - 0x48]
push eax
push edx
call fcn.004d1b40
add esp, 0xc
jmp 0x497739
push dword [ebp - 0x48]
push eax
push edx
call fcn.004ca960
add esp, 0xc
jmp 0x497739
movzx eax, byte [ebx + 0x1ac]
test al, 0x40
je 0x497732
and eax, 0x7f
mov byte [ebx + 0x1ac], al
mov dword [ebp - 0x48], 0
jmp 0x497739
mov dword [ebp - 0x48], 0
mov edx, dword [ebx + 0x4c]
mov eax, dword [ebp - 0x48]
add edx, eax
mov ecx, dword [ebx + 0x10c]
mov dword [ebp - 0x58], 0
sub ecx, eax
lea eax, [ebp - 0x1c]
mov dword [esp + 0xc], eax
movzx eax, byte [ebx + 0x1a8]
and eax, 0x80
shr eax, 7
mov dword [esp + 0x10], eax
movzx eax, byte [ebx + 0x1a9]
and eax, 1
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x16c]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 0x104]
mov dword [esp + 0x1c], ebx
call fcn.0049789c
mov dword [ebp - 0x60], eax
mov edx, dword [ebp - 0x48]
add edx, dword [ebp - 0x1c]
mov ecx, dword [ebx + 0x4c]
mov dword [ebx + 0xb0], edx
mov dword [ebx + 0x64], ecx
mov dword [ebx + 0x50], ecx
lea eax, [ecx + edx]
add edx, ecx
mov dword [ebx + 0x68], eax
mov dword [ebx + 0x58], edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0x3e3
je 0x497853
cmp dword [ebp - 0x60], 0
je 0x497813
cmp dword [ebp - 0x1c], 0
je 0x4977e4
mov eax, dword [ebx + 0xb0]
mov dword [ebp - 0x48], eax
jmp 0x49603c
and byte [ebx + 0x1ad], 0xfe
cmp dword [ebx + 0x124], 0xfffffffc
jne 0x496e8e
call fcn.00481300
cmp eax, 1
jle 0x496e8e
mov eax, 0x30d
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
mov eax, dword [ebp - 0x5c]
and byte [ebx + 0x1ad], 0xfe
mov dword [ebx + 0x108], eax
cmp eax, 0x26
je 0x496e8e
cmp dword [ebp - 0x5c], 0x6d
jne 0x497846
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
cmp eax, dword [ebx + 0x104]
je 0x496e8e
mov eax, 0x27
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4977ca
call fcn.00481300
cmp eax, 1
jle 0x4954e9
mov eax, 0x30d
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
mov eax, 0x43
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret