Function at 0x1004bed
Capabilities:
Terminate process

Disassembly:
push ecx
push ecx
cmp dword [0x1037f90], 0
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x10], 1
je 0x1004e5e
mov eax, dword [0x1037a90]
and dword [0x1037f90], 0
lea ebp, [eax + 0x1037ec0]
mov esi, dword [0x100fe1c]
cmp dword [0x100fecc], 0xa
mov edi, 0x1037aa0
mov dword [0x1037f88], esi
jne 0x1004c37
add esi, 0xc
mov eax, dword [esi]
mov ecx, 0x100e668
cmp eax, ecx
mov dword [esp + 0x14], eax
jne 0x1004c60
cmp dword [esp + 0x10], 0
jne 0x1004c60
mov eax, dword [esi + 4]
test eax, eax
je 0x1004d92
cmp dword [eax], ecx
je 0x1004d92
mov eax, dword [0x100fec8]
cmp eax, 0x1037de0
jbe 0x1004c77
dec eax
mov dword [0x100fec8], eax
movsx eax, byte [eax]
jmp 0x1004c84
push dword [sym.imp.MSVCRT.dll__iob]
call dword [sym.imp.MSVCRT.dll_getc]
pop ecx
push 0xa
mov dword [0x1037f8c], eax
pop ecx
cmp eax, ecx
jne 0x1004c98
inc dword [0x100fec4]
jmp 0x1004c9a
mov ecx, eax
inc ecx
neg ecx
sbb ecx, ecx
and ecx, eax
mov ebx, ecx
mov byte [ebp], bl
inc ebp
and dword [esp + 0x10], 0
test ebx, ebx
jne 0x1004cb8
push ebx
call dword [sym.imp.MSVCRT.dll_exit]
pop ecx
mov eax, dword [esp + 0x14]
mov ecx, 0x100e668
cmp eax, ecx
jle 0x1004ce2
lea eax, [eax + ebx*8]
cmp eax, dword [0x100fe18]
ja 0x1004d32
mov edx, dword [eax]
lea edx, [edx + edx*2]
lea edx, [edx*4 + 0x100f770]
cmp edx, esi
je 0x1004d48
jmp 0x1004d32
jge 0x1004d32
sub ecx, eax
sar ecx, 3
lea ecx, [ecx*8 + 0x100e668]
lea eax, [ecx + ebx*8]
cmp eax, dword [0x100fe18]
ja 0x1004d0b
mov edx, dword [eax]
lea edx, [edx + edx*2]
lea edx, [edx*4 + 0x100f770]
cmp edx, esi
je 0x1004d48
movsx eax, byte [ebx + 0x100fe20]
lea ecx, [ecx + eax*8]
cmp ecx, dword [0x100fe18]
ja 0x1004d2d
mov eax, dword [ecx]
lea eax, [eax + eax*2]
lea eax, [eax*4 + 0x100f770]
cmp eax, esi
je 0x1004d50
mov ecx, 0x100e668
mov esi, dword [esi + 4]
test esi, esi
je 0x1004d6f
mov eax, dword [esi]
cmp eax, ecx
mov dword [esp + 0x14], eax
je 0x1004d6f
jmp 0x1004cac
mov eax, dword [eax + 4]
lea eax, [eax + eax*2]
jmp 0x1004d56
mov ecx, dword [ecx + 4]
lea eax, [ecx + ecx*2]
lea esi, [eax*4 + 0x100f770]
cmp esi, 0x100f770
je 0x1004d6f
mov dword [edi], esi
add edi, 4
jmp 0x1004c37
movsx eax, byte [ebp - 1]
dec ebp
cmp eax, 0xa
mov dword [0x1037f8c], eax
jne 0x1004d84
dec dword [0x100fec4]
mov ecx, dword [0x100fec8]
mov byte [ecx], al
inc dword [0x100fec8]
push 4
mov eax, edi
pop esi
mov ebx, 0x1037aa0
sub edi, esi
cmp eax, ebx
jbe 0x1004deb
and byte [ebp], 0
mov eax, dword [edi]
dec ebp
test eax, eax
je 0x1004dc3
mov ecx, dword [eax + 8]
test ecx, ecx
mov dword [0x1037a94], ecx
je 0x1004dc3
cmp dword [ecx], 0
jg 0x1004e68
movsx eax, byte [ebp]
cmp eax, 0xa
mov dword [0x1037f8c], eax
jne 0x1004dd7
dec dword [0x100fec4]
mov ecx, dword [0x100fec8]
mov byte [ecx], al
inc dword [0x100fec8]
mov eax, edi
sub edi, esi
jmp 0x1004d9e
cmp byte [0x1037ec0], 0
je 0x1004ef2
mov eax, dword [0x100fec8]
cmp eax, 0x1037de0
jbe 0x1004e0f
dec eax
mov dword [0x100fec8], eax
movsx eax, byte [eax]
jmp 0x1004e1c
push dword [sym.imp.MSVCRT.dll__iob]
call dword [sym.imp.MSVCRT.dll_getc]
pop ecx
push 0xa
mov dword [0x1037f8c], eax
pop ecx
cmp eax, ecx
jne 0x1004e30
inc dword [0x100fec4]
jmp 0x1004e32
mov ecx, eax
inc ecx
neg ecx
sbb ecx, ecx
and ecx, eax
movsx eax, cl
test eax, eax
mov byte [0x1037ec0], cl
mov dword [0x100fecc], eax
jle 0x1004e5e
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
mov ebp, 0x1037ec0
jmp 0x1004c1a
mov dword [0x1037dc0], edi
mov eax, dword [ecx]
cmp byte [eax + 0x100fea8], 0
je 0x1004ec3
neg eax
push eax
mov eax, dword [edi]
push dword [eax + 8]
call fcn.01004f05
cmp eax, 1
je 0x1004ebd
cmp edi, ebx
jbe 0x1004ebd
movsx eax, byte [ebp]
sub edi, esi
dec ebp
cmp eax, 0xa
mov dword [0x1037f8c], eax
jne 0x1004ea6
dec dword [0x100fec4]
mov ecx, dword [0x100fec8]
mov byte [ecx], al
mov eax, dword [0x1037a94]
inc dword [0x100fec8]
mov eax, dword [eax]
jmp 0x1004e79
mov ecx, dword [0x1037a94]
movsx eax, byte [ebp]
sub ebp, 0x1037ec0
mov dword [0x100fecc], eax
inc ebp
mov dword [0x1037dc4], edi
mov dword [0x1037a90], ebp
and byte [ebp + 0x1037ec0], 0
mov eax, dword [ecx]
add ecx, esi
mov dword [0x1037a94], ecx
jmp 0x1004efe
mov dword [0x100fec8], 0x1037de0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret