Function at 0x40161c
Capabilities:
Delete file

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x78
call sym.___main
mov eax, esp
mov edi, eax
mov dword [ebp - 0x20], 0x1f4
mov dword [ebp - 0x24], 0x1e
mov eax, dword [ebp - 0x24]
sub eax, 1
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x24]
mov edx, 0x10
sub edx, 1
add eax, edx
mov ecx, 0x10
mov edx, 0
div ecx
imul eax, eax, 0x10
call fcn.00402540
sub esp, eax
lea eax, [esp + 0x10]
add eax, 0
mov dword [ebp - 0x2c], eax
mov dword [esp], str.Pls_enter_a_name:
call sym._printf
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x24]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._input
mov eax, esp
mov ebx, eax
mov eax, dword [ebp - 0x20]
sub eax, 1
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x20]
mov edx, 0x10
sub edx, 1
add eax, edx
mov esi, 0x10
mov edx, 0
div esi
imul eax, eax, 0x10
call fcn.00402540
sub esp, eax
lea eax, [esp + 0x10]
add eax, 0
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x20]
sub eax, 1
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x20]
mov edx, 0x10
sub edx, 1
add eax, edx
mov ecx, 0x10
mov edx, 0
div ecx
imul eax, eax, 0x10
call fcn.00402540
sub esp, eax
lea eax, [esp + 0x10]
add eax, 0
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x20]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._memclear
mov dword [esp], 0x406077
call sym._printf
mov eax, dword [ebp - 0x34]
mov edx, dword [ebp - 0x20]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._input
mov eax, dword [ebp - 0x34]
mov dword [esp + 4], 0x40607a
mov dword [esp], eax
call sym._cmdcmp
test eax, eax
jne 0x4017ee
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], str..txt
mov dword [esp], eax
call sym._concat
mov dword [esp + 4], 0x406083
mov dword [esp], eax
call sym._fopen
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call sym._strlen
mov ecx, eax
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x34]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], 4
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._substring
mov eax, dword [ebp - 0x3c]
movzx eax, byte [eax]
test al, al
je 0x4017de
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], eax
mov dword [esp], str._s_logged__n
call sym._printf
mov eax, dword [ebp - 0x3c]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x406092
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sym._fprintf
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sym._fclose
jmp 0x4019a0
mov eax, dword [ebp - 0x34]
mov dword [esp + 4], str.close
mov dword [esp], eax
call sym._strcmp
test eax, eax
je 0x40180f
mov eax, dword [ebp - 0x34]
movzx eax, byte [eax]
test al, al
jne 0x40181d
mov eax, 0
mov esp, ebx
mov esp, edi
jmp 0x4019a7
mov eax, dword [ebp - 0x34]
mov dword [esp + 4], str.getlog
mov dword [esp], eax
call sym._strcmp
test eax, eax
jne 0x401920
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], str..txt
mov dword [esp], eax
call sym._concat
mov dword [esp + 4], 0x4060a3
mov dword [esp], eax
call sym._fopen
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x1c], 0
jmp 0x401903
mov eax, esp
mov esi, eax
mov eax, dword [ebp - 0x20]
sub eax, 1
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x20]
mov edx, 0x10
sub edx, 1
add eax, edx
mov ecx, 0x10
mov edx, 0
div ecx
imul eax, eax, 0x10
call fcn.00402540
sub esp, eax
lea eax, [esp + 0x10]
add eax, 0
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x20]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._memclear
mov eax, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x44]
mov dword [esp + 8], edx
mov edx, dword [ebp - 0x20]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._fgets
mov eax, dword [ebp - 0x4c]
movzx eax, byte [eax]
test al, al
je 0x4018fa
mov eax, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x1c]
add edx, 1
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov dword [esp], str._i:__s
call sym._printf
mov esp, esi
jmp 0x4018ff
nop
mov esp, esi
jmp 0x401910
add dword [ebp - 0x1c], 1
cmp dword [ebp - 0x1c], 0x7cf
jle 0x40186a
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
call sym._fclose
jmp 0x4019a0
mov eax, dword [ebp - 0x34]
mov dword [esp + 4], str.dellog
mov dword [esp], eax
call sym._strcmp
test eax, eax
jne 0x401954
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], str..txt
mov dword [esp], eax
call sym._concat
mov dword [esp], eax
call sym._remove
jmp 0x4019a0
mov eax, dword [ebp - 0x34]
mov dword [esp + 4], str.system
mov dword [esp], eax
call sym._cmdcmp
test eax, eax
jne 0x4019a0
mov dword [esp + 4], 0x1e
lea eax, [ebp - 0x6a]
mov dword [esp], eax
call sym._memclear
mov eax, dword [ebp - 0x34]
mov dword [esp + 0xc], 0x1e
mov dword [esp + 8], 7
lea edx, [ebp - 0x6a]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._substring
mov esp, ebx
jmp 0x40169b
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret