Function at 0x1004909
Capabilities:
Terminate process

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
cmp dword [0x1036ce8], 0
push ebx
push esi
push edi
mov dword [ebp - 0xc], 1
jne 0x100492b
mov edi, 0x10358c0
jmp 0x100493e
mov edi, dword [0x1035cc4]
and dword [0x1036ce8], 0
lea edi, [edi + 0x10358c0]
and dword [ebp - 8], 0
cmp dword [0x100ded8], 0xa
mov esi, dword [0x100de2c]
mov ebx, 0x1035ce0
mov dword [0x10358b4], esi
jne 0x100495f
add esi, 0xc
inc dword [ebp - 8]
cmp dword [ebp - 8], 0x400
jge 0x1004bf8
mov edx, dword [esi]
mov ecx, 0x100c678
cmp edx, ecx
mov dword [ebp - 4], edx
jne 0x1004996
cmp dword [ebp - 0xc], 0
jne 0x1004996
mov eax, dword [esi + 4]
test eax, eax
je 0x1004ad5
cmp dword [eax], ecx
je 0x1004ad5
mov eax, dword [0x100ded4]
cmp eax, 0x1036d00
jbe 0x10049ad
dec eax
mov dword [0x100ded4], eax
movsx eax, byte [eax]
jmp 0x10049bd
push dword [sym.imp.msvcrt.dll__iob]
call dword [sym.imp.msvcrt.dll_getc]
mov edx, dword [ebp - 4]
pop ecx
cmp eax, 0xa
mov dword [0x1036ce4], eax
jne 0x10049d1
inc dword [0x100ded0]
push eax
pop ecx
jmp 0x10049d3
mov ecx, eax
inc ecx
neg ecx
sbb ecx, ecx
and ecx, eax
mov byte [edi], cl
inc edi
and dword [ebp - 0xc], 0
test ecx, ecx
je 0x1004b5c
mov eax, 0x100c678
cmp edx, eax
jle 0x10049f7
lea eax, [edx + ecx*8]
jmp 0x1004a38
jge 0x1004a50
mov eax, 0x100c678
sub eax, edx
sar eax, 3
lea eax, [eax*8 + 0x100c678]
lea edx, [eax + ecx*8]
mov dword [ebp - 4], edx
mov edx, dword [0x100de28]
cmp dword [ebp - 4], edx
ja 0x1004a2e
mov edx, dword [ebp - 4]
mov edx, dword [edx]
lea edx, [edx + edx*2]
lea edx, [edx*4 + 0x100d780]
cmp edx, esi
je 0x1004a89
movsx edx, byte [ecx + 0x100de30]
lea eax, [eax + edx*8]
cmp eax, dword [0x100de28]
ja 0x1004a50
mov edx, dword [eax]
lea edx, [edx + edx*2]
lea edx, [edx*4 + 0x100d780]
cmp edx, esi
je 0x1004a6a
mov esi, dword [esi + 4]
test esi, esi
je 0x1004a8e
mov eax, dword [esi]
cmp eax, 0x100c678
mov dword [ebp - 4], eax
je 0x1004a8e
mov edx, eax
jmp 0x10049e1
mov eax, dword [eax + 4]
lea esi, [eax + eax*2]
lea esi, [esi*4 + 0x100d780]
cmp esi, 0x100d780
je 0x1004a8e
mov dword [ebx], esi
add ebx, 4
jmp 0x100495f
mov eax, dword [ebp - 4]
jmp 0x1004a6a
dec edi
jmp 0x1004ab4
sub ebx, 4
mov eax, dword [ebx]
mov byte [edi], 0
dec edi
test eax, eax
je 0x1004ab4
mov edx, dword [eax + 8]
test edx, edx
mov dword [0x1035cc0], edx
je 0x1004ab4
cmp dword [edx], 0
jg 0x1004b64
movsx eax, byte [edi]
cmp eax, 0xa
mov dword [0x1036ce4], eax
jne 0x1004ac7
dec dword [0x100ded0]
mov ecx, dword [0x100ded4]
mov byte [ecx], al
inc dword [0x100ded4]
cmp ebx, 0x1035ce0
ja 0x1004a91
cmp byte [0x10358c0], 0
je 0x1004bee
mov eax, dword [0x100ded4]
cmp eax, 0x1036d00
jbe 0x1004b01
dec eax
mov dword [0x100ded4], eax
movsx eax, byte [eax]
jmp 0x1004b0e
push dword [sym.imp.msvcrt.dll__iob]
call dword [sym.imp.msvcrt.dll_getc]
pop ecx
push 0xa
pop ecx
cmp eax, ecx
mov dword [0x1036ce4], eax
jne 0x1004b22
inc dword [0x100ded0]
jmp 0x1004b24
mov ecx, eax
cmp ecx, 0xffffffff
sete cl
dec cl
and ecx, eax
movsx eax, cl
test eax, eax
mov byte [0x10358c0], cl
mov dword [0x100ded8], eax
jle 0x1004924
mov ecx, dword [sym.imp.msvcrt.dll__iob]
add ecx, 0x20
push ecx
push eax
call dword [sym.imp.msvcrt.dll_putc]
pop ecx
pop ecx
jmp 0x1004924
push 0
call dword [sym.imp.msvcrt.dll_exit]
mov dword [0x10358b0], ebx
mov eax, dword [edx]
cmp byte [eax + 0x100deb4], 0
je 0x1004bbe
jmp 0x1004bac
cmp ebx, 0x1035ce0
jbe 0x1004bbe
movsx eax, byte [edi]
sub ebx, 4
dec edi
cmp eax, 0xa
mov dword [0x1036ce4], eax
jne 0x1004b96
dec dword [0x100ded0]
mov ecx, dword [0x100ded4]
mov byte [ecx], al
mov edx, dword [0x1035cc0]
inc dword [0x100ded4]
mov eax, dword [edx]
neg eax
push eax
mov eax, dword [ebx]
push dword [eax + 8]
call fcn.010048dd
cmp eax, 1
jne 0x1004b77
movsx eax, byte [edi]
sub edi, 0x10358c0
inc edi
mov dword [0x100ded8], eax
mov eax, edi
mov dword [0x1036ce0], ebx
mov dword [0x1035cc4], eax
mov byte [eax + 0x10358c0], 0
mov eax, dword [edx]
add edx, 4
mov dword [0x1035cc0], edx
jmp 0x1004bfa
mov dword [0x100ded4], 0x1036d00
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret