Function at 0x4028d5
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x244
and dword [ebp - 8], 0
and dword [ebp - 4], 0
cmp byte [0x40acf2], 0
je 0x4028fa
call fcn.004032b1
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 0x40918c
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, 0x409178
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, 0x409180
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 0x4029bc
cmp byte [ebp + 0x10], al
jne 0x4029b5
lea eax, [ebp - 0x12c]
push 1
push eax
push 0x409190
call fcn.00403358
add esp, 0xc
push 1
call dword [sym.imp.MSVCRT.dll_exit]
mov eax, ebx
jmp 0x402c8a
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 0x402c4b
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 0x402c2b
cmp byte [ebp - 0x244], 0x2d
je 0x402a20
lea eax, [ebp - 0x12c]
push eax
mov eax, dword [sym.imp.MSVCRT.dll__iob]
push dword [ebp - 4]
add eax, 0x40
push 0x4091ac
push eax
call ebx
add esp, 0x10
mov eax, dword [ebp - 8]
cmp eax, dword [0x40acfc]
jl 0x402a32
push eax
call fcn.00402c8f
pop ecx
lea edi, [ebp - 0x244]
or ecx, 0xffffffff
xor eax, eax
push dword [0x4080e8]
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 0x402a83
lea eax, [ebp - 0x12c]
push eax
push dword [ebp - 4]
push 0x4091d8
jmp 0x402b17
and byte [esi], 0
push dword [0x4080e8]
inc esi
push esi
call dword [sym.imp.MSVCRT.dll_strspn]
add esi, eax
pop ecx
pop ecx
cmp byte [esi], 0
jne 0x402aae
lea eax, [ebp - 0x12c]
push eax
push dword [ebp - 4]
push 0x409208
jmp 0x402b17
mov edi, dword [sym.imp.MSVCRT.dll_strncmp]
push 5
push 0x409238
push esi
call edi
add esp, 0xc
test eax, eax
je 0x402b93
push 0xa
push 0x409240
push esi
call edi
add esp, 0xc
test eax, eax
jne 0x402b42
push dword [0x4080e8]
mov edi, dword [sym.imp.MSVCRT.dll_strcspn]
push esi
call edi
add esi, eax
pop ecx
pop ecx
cmp byte [esi], 0
je 0x402b08
push dword [0x4080e8]
push esi
call dword [sym.imp.MSVCRT.dll_strspn]
add esi, eax
pop ecx
pop ecx
cmp byte [esi], 0
jne 0x402b27
lea eax, [ebp - 0x12c]
push eax
push dword [ebp - 4]
push 0x40924c
mov eax, dword [sym.imp.MSVCRT.dll__iob]
add eax, 0x40
push eax
call ebx
add esp, 0x10
jmp 0x402b97
push dword [0x4080e8]
mov dword [ebp - 0xc], esi
push esi
call edi
and byte [eax + esi], 0
pop ecx
pop ecx
mov dword [ebp + 0x10], 1
jmp 0x402b97
push 4
push 0x40927c
push esi
call edi
add esp, 0xc
test eax, eax
jne 0x402b5c
mov dword [ebp + 0x10], 2
jmp 0x402b97
push 5
push 0x409284
push esi
call edi
add esp, 0xc
test eax, eax
jne 0x402b76
mov dword [ebp + 0x10], 3
jmp 0x402b97
lea eax, [ebp - 0x12c]
push eax
mov eax, dword [sym.imp.MSVCRT.dll__iob]
push dword [ebp - 4]
add eax, 0x40
push 0x40928c
push eax
call ebx
add esp, 0x10
and dword [ebp + 0x10], 0
cmp byte [0x40acf2], 0
je 0x402bb8
lea eax, [ebp - 0x244]
push eax
push dword [ebp - 8]
push 0x4092bc
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 0xc
cmp dword [ebp + 0x10], 0xffffffff
je 0x402c2b
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 [0x40acf4]
mov dword [esi + ecx], eax
mov ecx, dword [0x40acf4]
mov eax, dword [ebp + 0x10]
mov dword [esi + ecx + 4], eax
dec eax
jne 0x402c22
push dword [ebp - 0xc]
call edi
pop ecx
mov ecx, dword [0x40acf4]
mov dword [esi + ecx + 8], eax
cmp byte [0x40acf2], 0
je 0x402c22
mov eax, dword [0x40acf4]
add eax, esi
push dword [eax + 8]
push 0x4092d4
push dword [eax]
push 0x4092e4
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 0x4029e6
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll_fclose]
mov esi, dword [ebp - 8]
cmp byte [0x40acf2], 0
pop ecx
mov dword [0x40acf8], esi
je 0x402c88
call fcn.004032b1
sub eax, dword [ebp - 0x14]
sbb edx, dword [ebp - 0x10]
push edx
push eax
call fcn.004032f7
push eax
push 0x40930c
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 0x10
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret