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 [0x40ac62], 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 0x409104
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, 0x4090f0
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, 0x4090f8
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 0x409108
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 0x409124
push eax
call ebx
add esp, 0x10
mov eax, dword [ebp - 8]
cmp eax, dword [0x40ac6c]
jl 0x402a32
push eax
call fcn.00402c8f
pop ecx
lea edi, [ebp - 0x244]
or ecx, 0xffffffff
xor eax, eax
push dword [0x408060]
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 0x409150
jmp 0x402b17
and byte [esi], 0
push dword [0x408060]
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 0x409180
jmp 0x402b17
mov edi, dword [sym.imp.MSVCRT.dll_strncmp]
push 5
push 0x4091b0
push esi
call edi
add esp, 0xc
test eax, eax
je 0x402b93
push 0xa
push 0x4091b8
push esi
call edi
add esp, 0xc
test eax, eax
jne 0x402b42
push dword [0x408060]
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 [0x408060]
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 0x4091c4
mov eax, dword [sym.imp.MSVCRT.dll__iob]
add eax, 0x40
push eax
call ebx
add esp, 0x10
jmp 0x402b97
push dword [0x408060]
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 0x4091f4
push esi
call edi
add esp, 0xc
test eax, eax
jne 0x402b5c
mov dword [ebp + 0x10], 2
jmp 0x402b97
push 5
push 0x4091fc
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 0x409204
push eax
call ebx
add esp, 0x10
and dword [ebp + 0x10], 0
cmp byte [0x40ac62], 0
je 0x402bb8
lea eax, [ebp - 0x244]
push eax
push dword [ebp - 8]
push 0x409234
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 [0x40ac64]
mov dword [esi + ecx], eax
mov ecx, dword [0x40ac64]
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 [0x40ac64]
mov dword [esi + ecx + 8], eax
cmp byte [0x40ac62], 0
je 0x402c22
mov eax, dword [0x40ac64]
add eax, esi
push dword [eax + 8]
push 0x40924c
push dword [eax]
push 0x40925c
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 [0x40ac62], 0
pop ecx
mov dword [0x40ac68], 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 0x409284
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 0x10
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret