Function at 0x401528
Capabilities:
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x430
call sym.___main
mov dword [esp + 0x42c], 0
mov dword [esp + 0x428], 0
mov dword [esp + 0x424], 0
mov dword [esp + 4], 0x40607e
mov dword [esp], str.test1.txt
call sym._fopen
mov dword [esp + 0x418], eax
cmp dword [esp + 0x418], 0
jne 0x401589
mov eax, 1
jmp 0x401890
mov dword [esp + 4], 0x40608a
mov dword [esp], str.temp.txt
call sym._fopen
mov dword [esp + 0x414], eax
cmp dword [esp + 0x414], 0
jne 0x4016ab
mov eax, 2
jmp 0x401890
cmp dword [esp + 0x410], 0x2e
jne 0x40168f
cmp dword [esp + 0x428], 0
jle 0x4016ab
lea edx, [esp + 0x1f]
mov eax, dword [esp + 0x428]
add eax, edx
mov byte [eax], 0
lea eax, [esp + 0x1f]
mov dword [esp], eax
call dbg.is_palindrome
test eax, eax
je 0x401682
lea eax, [esp + 0x1f]
mov dword [esp], eax
call sym._strlen
add eax, 1
mov dword [esp], eax
call sym._malloc
mov dword [esp + 0x40c], eax
lea eax, [esp + 0x1f]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x40c]
mov dword [esp], eax
call sym._strcpy
mov eax, dword [esp + 0x424]
add eax, 1
shl eax, 2
mov dword [esp + 4], eax
mov eax, dword [esp + 0x42c]
mov dword [esp], eax
call sym._realloc
mov dword [esp + 0x42c], eax
mov eax, dword [esp + 0x424]
lea edx, [eax + 1]
mov dword [esp + 0x424], edx
lea edx, [eax*4]
mov eax, dword [esp + 0x42c]
add edx, eax
mov eax, dword [esp + 0x40c]
mov dword [edx], eax
mov dword [esp + 0x428], 0
jmp 0x4016ab
mov eax, dword [esp + 0x428]
lea edx, [eax + 1]
mov dword [esp + 0x428], edx
mov edx, dword [esp + 0x410]
mov byte [esp + eax + 0x1f], dl
mov eax, dword [esp + 0x418]
mov dword [esp], eax
call sym._fgetc
mov dword [esp + 0x410], eax
cmp dword [esp + 0x410], 0xffffffff
jne 0x4015bc
mov eax, dword [esp + 0x418]
mov dword [esp], eax
call sym._fclose
mov eax, dword [esp + 0x414]
mov dword [esp], eax
call sym._fclose
mov dword [esp + 0x420], 0
mov dword [esp + 0x408], 0xa
mov eax, dword [esp + 0x424]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x42c]
mov dword [esp], eax
call dbg.print_phrases
mov eax, dword [esp + 0x420]
lea edx, [eax + 1]
mov eax, dword [esp + 0x408]
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov dword [esp], 0x406095
call sym._printf
mov dword [esp], 0x4060a8
call sym._puts
mov dword [esp], 0x4060be
call sym._puts
mov dword [esp], 0x4060d5
call sym._puts
movsx eax, byte [esp + 0x407]
mov dword [esp + 4], eax
mov dword [esp], 0x4060de
call sym._scanf
movsx eax, byte [esp + 0x407]
cmp eax, 0x6e
je 0x401797
cmp eax, 0x70
je 0x4017c2
cmp eax, 0x65
je 0x4017f2
jmp 0x4017e4
mov eax, dword [esp + 0x408]
sub eax, 1
cmp eax, dword [esp + 0x420]
jle 0x4017b4
add dword [esp + 0x420], 1
jmp 0x4017f3
mov dword [esp], 0x4060e1
call sym._puts
jmp 0x4017f3
cmp dword [esp + 0x420], 0
jle 0x4017d6
sub dword [esp + 0x420], 1
jmp 0x4017f3
mov dword [esp], 0x4060fa
call sym._puts
jmp 0x4017f3
mov dword [esp], 0x406110
call sym._puts
jmp 0x4017f3
nop
mov eax, dword [esp + 0x420]
cmp eax, dword [esp + 0x408]
jge 0x401811
cmp dword [esp + 0x420], 0
jns 0x401703
mov dword [esp], str.test1.txt
call sym._remove
mov dword [esp + 4], str.test1.txt
mov dword [esp], str.temp.txt
call sym._rename
mov dword [esp + 0x41c], 0
jmp 0x401867
mov eax, dword [esp + 0x41c]
lea edx, [eax*4]
mov eax, dword [esp + 0x42c]
add eax, edx
mov eax, dword [eax]
mov dword [esp], eax
call sym._free
add dword [esp + 0x41c], 1
mov eax, dword [esp + 0x41c]
cmp eax, dword [esp + 0x424]
jl 0x40183e
mov eax, dword [esp + 0x42c]
mov dword [esp], eax
call sym._free
call sym._getchar
mov eax, 0
leave
ret