Function at 0x4028c1
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x244
and dword [ebp - 8], 0
and dword [ebp - 4], 0
cmp byte [0x40ac52], 0
je 0x4028e6
call fcn.0040329d
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], edx
push ebx
push esi
or ebx, 0xffffffff
push edi
mov edi, dword [ebp + 8]
mov ecx, ebx
xor eax, eax
lea edx, [ebp - 0x12c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x4090ec
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [ebp - 0x12c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x12c]
mov ecx, ebx
repne scasb al, byte es:[edi]
dec edi
mov esi, 0x4090d8
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov edi, dword [ebp + 0xc]
mov ecx, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
mov ecx, ebx
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x12c]
mov ecx, ebx
repne scasb al, byte es:[edi]
dec edi
mov esi, 0x4090e0
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x12c]
push eax
movsb byte es:[edi], byte [esi]
call dword [sym.imp.MSVCRT.dll_fopen]
pop ecx
mov dword [ebp + 8], eax
test eax, eax
pop ecx
jne 0x4029a8
cmp byte [ebp + 0x10], al
jne 0x4029a1
lea eax, [ebp - 0x12c]
push 1
push eax
push 0x4090f0
call fcn.00403344
add esp, 0xc
push 1
call dword [sym.imp.MSVCRT.dll_exit]
mov eax, ebx
jmp 0x402c76
push dword [ebp + 8]
lea eax, [ebp - 0x244]
push 0x118
push eax
call dword [sym.imp.MSVCRT.dll_fgets]
add esp, 0xc
test eax, eax
je 0x402c37
and dword [ebp + 0xc], 0
mov ebx, dword [sym.imp.MSVCRT.dll_fprintf]
or dword [ebp + 0x10], 0xffffffff
inc dword [ebp - 4]
cmp byte [ebp - 0x244], 0x23
je 0x402c17
cmp byte [ebp - 0x244], 0x2d
je 0x402a0c
lea eax, [ebp - 0x12c]
push eax
mov eax, dword [sym.imp.MSVCRT.dll__iob]
push dword [ebp - 4]
add eax, 0x40
push 0x40910c
push eax
call ebx
add esp, 0x10
mov eax, dword [ebp - 8]
cmp eax, dword [0x40ac5c]
jl 0x402a1e
push eax
call fcn.00402c7b
pop ecx
lea edi, [ebp - 0x244]
or ecx, 0xffffffff
xor eax, eax
push dword [0x40806c]
repne scasb al, byte es:[edi]
not ecx
dec ecx
and byte [ebp + ecx - 0x245], al
lea eax, [ebp - 0x244]
push eax
call dword [sym.imp.MSVCRT.dll_strcspn]
cmp byte [ebp + eax - 0x244], 0
lea esi, [ebp + eax - 0x244]
pop ecx
pop ecx
jne 0x402a6f
lea eax, [ebp - 0x12c]
push eax
push dword [ebp - 4]
push 0x409138
jmp 0x402b03
and byte [esi], 0
push dword [0x40806c]
inc esi
push esi
call dword [sym.imp.MSVCRT.dll_strspn]
add esi, eax
pop ecx
pop ecx
cmp byte [esi], 0
jne 0x402a9a
lea eax, [ebp - 0x12c]
push eax
push dword [ebp - 4]
push 0x409168
jmp 0x402b03
mov edi, dword [sym.imp.MSVCRT.dll_strncmp]
push 5
push 0x409198
push esi
call edi
add esp, 0xc
test eax, eax
je 0x402b7f
push 0xa
push 0x4091a0
push esi
call edi
add esp, 0xc
test eax, eax
jne 0x402b2e
push dword [0x40806c]
mov edi, dword [sym.imp.MSVCRT.dll_strcspn]
push esi
call edi
add esi, eax
pop ecx
pop ecx
cmp byte [esi], 0
je 0x402af4
push dword [0x40806c]
push esi
call dword [sym.imp.MSVCRT.dll_strspn]
add esi, eax
pop ecx
pop ecx
cmp byte [esi], 0
jne 0x402b13
lea eax, [ebp - 0x12c]
push eax
push dword [ebp - 4]
push 0x4091ac
mov eax, dword [sym.imp.MSVCRT.dll__iob]
add eax, 0x40
push eax
call ebx
add esp, 0x10
jmp 0x402b83
push dword [0x40806c]
mov dword [ebp - 0xc], esi
push esi
call edi
and byte [eax + esi], 0
pop ecx
pop ecx
mov dword [ebp + 0x10], 1
jmp 0x402b83
push 4
push 0x4091dc
push esi
call edi
add esp, 0xc
test eax, eax
jne 0x402b48
mov dword [ebp + 0x10], 2
jmp 0x402b83
push 5
push 0x4091e4
push esi
call edi
add esp, 0xc
test eax, eax
jne 0x402b62
mov dword [ebp + 0x10], 3
jmp 0x402b83
lea eax, [ebp - 0x12c]
push eax
mov eax, dword [sym.imp.MSVCRT.dll__iob]
push dword [ebp - 4]
add eax, 0x40
push 0x4091ec
push eax
call ebx
add esp, 0x10
and dword [ebp + 0x10], 0
cmp byte [0x40ac52], 0
je 0x402ba4
lea eax, [ebp - 0x244]
push eax
push dword [ebp - 8]
push 0x40921c
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 0xc
cmp dword [ebp + 0x10], 0xffffffff
je 0x402c17
mov edi, dword [sym.imp.MSVCRT.dll__strdup]
lea eax, [ebp - 0x244]
push eax
call edi
mov esi, dword [ebp + 0xc]
pop ecx
mov ecx, dword [0x40ac54]
mov dword [esi + ecx], eax
mov ecx, dword [0x40ac54]
mov eax, dword [ebp + 0x10]
mov dword [esi + ecx + 4], eax
dec eax
jne 0x402c0e
push dword [ebp - 0xc]
call edi
pop ecx
mov ecx, dword [0x40ac54]
mov dword [esi + ecx + 8], eax
cmp byte [0x40ac52], 0
je 0x402c0e
mov eax, dword [0x40ac54]
add eax, esi
push dword [eax + 8]
push 0x409234
push dword [eax]
push 0x409244
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 0x10
inc dword [ebp - 8]
add esi, 0xc
mov dword [ebp + 0xc], esi
push dword [ebp + 8]
lea eax, [ebp - 0x244]
push 0x118
push eax
call dword [sym.imp.MSVCRT.dll_fgets]
add esp, 0xc
test eax, eax
jne 0x4029d2
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll_fclose]
mov esi, dword [ebp - 8]
cmp byte [0x40ac52], 0
pop ecx
mov dword [0x40ac58], esi
je 0x402c74
call fcn.0040329d
sub eax, dword [ebp - 0x14]
sbb edx, dword [ebp - 0x10]
push edx
push eax
call fcn.004032e3
push eax
push 0x40926c
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 0x10
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret