Function at 0x40239b
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24c
push ebx
push esi
push edi
call fcn.0040286c
and dword [ebp - 8], 0
and dword [ebp - 4], 0
cmp byte [0x406356], 0
mov ebx, eax
je 0x4023ca
call fcn.00402d01
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edx
mov edi, dword [ebp + 8]
or edx, 0xffffffff
mov ecx, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea esi, [ebp - 0x134]
mov eax, ecx
mov dword [ebp + 8], esi
mov esi, edi
mov edi, dword [ebp + 8]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push 0x405cdc
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x134]
mov ecx, edx
repne scasb al, byte es:[edi]
dec edi
mov esi, 0x405cc8
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov edi, ebx
mov ecx, edx
repne scasb al, byte es:[edi]
lea esi, [ebp - 0x134]
not ecx
mov eax, esi
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, eax
mov ecx, edx
xor eax, eax
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x134]
mov ecx, edx
repne scasb al, byte es:[edi]
dec edi
mov esi, 0x405cd0
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x134]
push eax
movsb byte es:[edi], byte [esi]
call dword [sym.imp.MSVCRT.dll_fopen]
pop ecx
mov dword [ebp - 0xc], eax
test eax, eax
pop ecx
jne 0x40248c
lea eax, [ebp - 0x134]
push eax
mov eax, dword [sym.imp.MSVCRT.dll__iob]
add eax, 0x40
push 0x405ce0
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 0xc
push 1
call dword [sym.imp.MSVCRT.dll_exit]
push dword [ebp - 0xc]
lea eax, [ebp - 0x24c]
push 0x118
push eax
call dword [sym.imp.MSVCRT.dll_fgets]
add esp, 0xc
test eax, eax
je 0x4026f7
and dword [ebp - 0x10], 0
mov ebx, dword [sym.imp.MSVCRT.dll_fprintf]
or dword [ebp + 8], 0xffffffff
inc dword [ebp - 4]
cmp byte [ebp - 0x24c], 0x23
je 0x4026d7
cmp byte [ebp - 0x24c], 0x2d
je 0x4024f0
lea eax, [ebp - 0x134]
push eax
mov eax, dword [sym.imp.MSVCRT.dll__iob]
push dword [ebp - 4]
add eax, 0x40
push 0x405cfc
push eax
call ebx
add esp, 0x10
mov eax, dword [ebp - 8]
cmp eax, dword [0x406364]
jl 0x402502
push eax
call fcn.0040273b
pop ecx
lea edi, [ebp - 0x24c]
or ecx, 0xffffffff
xor eax, eax
push dword [0x405e48]
repne scasb al, byte es:[edi]
not ecx
dec ecx
and byte [ebp + ecx - 0x24d], al
lea eax, [ebp - 0x24c]
push eax
call dword [sym.imp.MSVCRT.dll_strcspn]
cmp byte [ebp + eax - 0x24c], 0
lea esi, [ebp + eax - 0x24c]
pop ecx
pop ecx
jne 0x402553
lea eax, [ebp - 0x134]
push eax
push dword [ebp - 4]
push 0x405d28
jmp 0x4025e7
and byte [esi], 0
push dword [0x405e48]
inc esi
push esi
call dword [sym.imp.MSVCRT.dll_strspn]
add esi, eax
pop ecx
pop ecx
cmp byte [esi], 0
jne 0x40257e
lea eax, [ebp - 0x134]
push eax
push dword [ebp - 4]
push 0x405d58
jmp 0x4025e7
mov edi, dword [sym.imp.MSVCRT.dll_strncmp]
push 5
push 0x405d88
push esi
call edi
add esp, 0xc
test eax, eax
je 0x402665
push 0xa
push 0x405d90
push esi
call edi
add esp, 0xc
test eax, eax
jne 0x402612
push dword [0x405e48]
mov edi, dword [sym.imp.MSVCRT.dll_strcspn]
push esi
call edi
add esi, eax
pop ecx
pop ecx
cmp byte [esi], 0
je 0x4025d8
push dword [0x405e48]
push esi
call dword [sym.imp.MSVCRT.dll_strspn]
add esi, eax
pop ecx
pop ecx
cmp byte [esi], 0
jne 0x4025f7
lea eax, [ebp - 0x134]
push eax
push dword [ebp - 4]
push 0x405d9c
mov eax, dword [sym.imp.MSVCRT.dll__iob]
add eax, 0x40
push eax
call ebx
add esp, 0x10
jmp 0x402669
push dword [0x405e48]
mov dword [ebp - 0x1c], esi
push esi
call edi
and byte [eax + esi], 0
pop ecx
pop ecx
mov dword [ebp + 8], 1
jmp 0x402669
push 4
push 0x405dcc
push esi
call edi
add esp, 0xc
test eax, eax
jne 0x40262c
mov dword [ebp + 8], 2
jmp 0x402669
push 5
push 0x405dd4
push esi
call edi
add esp, 0xc
test eax, eax
jne 0x402646
mov dword [ebp + 8], 3
jmp 0x402669
lea eax, [ebp - 0x134]
push eax
mov eax, dword [sym.imp.MSVCRT.dll__iob]
push dword [ebp - 4]
add eax, 0x40
push 0xffffffffffffffff
push 0x405ddc
push eax
call ebx
add esp, 0x14
and dword [ebp + 8], 0
cmp byte [0x406356], 0
je 0x40268a
lea eax, [ebp - 0x24c]
push eax
push dword [ebp - 8]
push 0x405e0c
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 0xc
cmp dword [ebp + 8], 0xffffffff
je 0x4026d7
mov edi, dword [sym.imp.MSVCRT.dll__strdup]
lea eax, [ebp - 0x24c]
push eax
call edi
mov esi, dword [ebp - 0x10]
pop ecx
mov ecx, dword [0x40635c]
mov dword [esi + ecx], eax
mov ecx, dword [0x40635c]
mov eax, dword [ebp + 8]
cmp eax, 1
mov dword [esi + ecx + 4], eax
jne 0x4026ce
push dword [ebp - 0x1c]
call edi
pop ecx
mov ecx, dword [0x40635c]
mov dword [esi + ecx + 8], eax
inc dword [ebp - 8]
add esi, 0xc
mov dword [ebp - 0x10], esi
push dword [ebp - 0xc]
lea eax, [ebp - 0x24c]
push 0x118
push eax
call dword [sym.imp.MSVCRT.dll_fgets]
add esp, 0xc
test eax, eax
jne 0x4024b6
push dword [ebp - 0xc]
call dword [sym.imp.MSVCRT.dll_fclose]
mov esi, dword [ebp - 8]
cmp byte [0x406356], 0
pop ecx
mov dword [0x406360], esi
je 0x402734
call fcn.00402d01
sub eax, dword [ebp - 0x18]
sbb edx, dword [ebp - 0x14]
push edx
push eax
call fcn.00402d47
push eax
push 0x405e24
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 0x10
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret