Function at 0x402206
Capabilities:
Delete file

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x80]
mov qword [rbp - 0x20], rcx
mov rcx, qword [rbp - 0x20]
call fcn.00401fa6
mov ecx, 0x1000
call sub.msvcrt.dll_malloc
mov rdx, rax
lea rax, [0x00452418]
mov qword [rax], rdx
mov dword [rbp - 0x60], 0
mov dword [rbp - 0x5c], 0
jmp 0x402541
mov rax, qword [0x0044a038]
mov edx, dword [rax + 0x28]
mov rax, qword [0x0044a038]
mov eax, dword [rax + 0x2c]
cmp edx, eax
jge 0x40229c
mov rax, qword [0x0044a038]
mov rdx, qword [rax + 0x20]
mov rax, qword [0x0044a038]
mov eax, dword [rax + 0x28]
cdqe
shl rax, 3
add rax, rdx
mov rax, qword [rax]
mov qword [rbp - 0x58], rax
mov rax, qword [0x0044a038]
mov edx, dword [rax + 0x28]
add edx, 1
mov dword [rax + 0x28], edx
jmp 0x4022a4
mov qword [rbp - 0x58], 0
cmp dword [rbp - 0x60], 0
jne 0x40253c
cmp qword [rbp - 0x58], 0
je 0x40253c
mov rax, qword [0x0044a038]
mov rbx, qword [rax]
mov rax, qword [0x0044a038]
mov rax, qword [rax]
mov rcx, rax
call sub.msvcrt.dll_strlen
sub rax, 1
add rax, rbx
movzx eax, byte [rax]
cmp al, 0x2f
jne 0x402354
mov rax, qword [0x0044a038]
mov rdx, qword [rax]
lea rax, [0x00452418]
mov rax, qword [rax]
mov rcx, rax
call sub.msvcrt.dll_strcpy
mov rax, qword [rbp - 0x58]
mov rdx, qword [rax]
lea rax, [0x00452418]
mov rax, qword [rax]
mov rcx, rax
call sub.msvcrt.dll_strcat
lea rax, [0x00452418]
mov rbx, qword [rax]
mov rax, qword [0x0044a038]
mov rax, qword [rax]
mov rcx, rax
call sub.msvcrt.dll_strlen
mov rsi, rax
mov rax, qword [rbp - 0x58]
mov rax, qword [rax]
mov rcx, rax
call sub.msvcrt.dll_strlen
add rax, rsi
add rax, rbx
mov byte [rax], 0
jmp 0x4023f7
mov rax, qword [0x0044a038]
mov rdx, qword [rax]
lea rax, [0x00452418]
mov rax, qword [rax]
mov rcx, rax
call sub.msvcrt.dll_strcpy
lea rax, [0x00452418]
mov rdx, qword [rax]
mov rax, rdx
mov rcx, 0xffffffffffffffff
mov r8, rax
mov eax, 0
mov rdi, r8
repne scasb al, byte [rdi]
mov rax, rcx
not rax
sub rax, 1
add rax, rdx
mov word [rax], 0x2f
mov rax, qword [rbp - 0x58]
mov rdx, qword [rax]
lea rax, [0x00452418]
mov rax, qword [rax]
mov rcx, rax
call sub.msvcrt.dll_strcat
lea rax, [0x00452418]
mov rbx, qword [rax]
mov rax, qword [0x0044a038]
mov rax, qword [rax]
mov rcx, rax
call sub.msvcrt.dll_strlen
mov rsi, rax
mov rax, qword [rbp - 0x58]
mov rax, qword [rax]
mov rcx, rax
call sub.msvcrt.dll_strlen
add rax, rsi
add rax, 1
add rax, rbx
mov byte [rax], 0
lea rax, [0x00452418]
mov rdx, qword [rax]
mov rax, qword [rbp - 0x58]
movzx eax, byte [rax + 8]
movzx eax, al
mov ecx, eax
call fcn.004018ac
test al, al
je 0x4024ef
lea rax, [0x00452418]
mov rax, qword [rax]
mov rcx, rax
call fcn.00401abc
test al, al
je 0x40245f
lea rax, [0x0044de40]
mov eax, dword [rax + 0x14]
lea edx, [rax + 1]
lea rax, [0x0044de40]
mov dword [rax + 0x14], edx
lea rax, [0x00452418]
mov rax, qword [rax]
mov rcx, rax
call sub.msvcrt.dll_remove
jmp 0x402541
lea rax, [0x00452418]
mov rax, qword [rax]
mov rcx, rax
call fcn.00401a31
xor eax, 1
test al, al
je 0x402541
jmp 0x4024b0
mov ecx, 0x64
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
call rax
lea rax, [0x00452408]
mov eax, dword [rax]
cmp eax, 1
jle 0x4024b0
add dword [rbp - 0x5c], 1
lea rax, [0x00452408]
mov ecx, dword [rax]
mov eax, dword [rbp - 0x5c]
cdq
idiv ecx
mov dword [rbp - 0x5c], edx
lea rax, [0x00452418]
mov rax, qword [rax]
mov edx, dword [rbp - 0x5c]
mov rcx, rax
call fcn.0040255b
test eax, eax
je 0x40247e
lea rax, [0x00452408]
mov eax, dword [rax]
cmp eax, 1
jle 0x402541
add dword [rbp - 0x5c], 1
lea rax, [0x00452408]
mov ecx, dword [rax]
mov eax, dword [rbp - 0x5c]
cdq
idiv ecx
mov dword [rbp - 0x5c], edx
jmp 0x402541
lea rax, [0x00452418]
mov rdx, qword [rax]
mov rax, qword [rbp - 0x58]
movzx eax, byte [rax + 8]
movzx eax, al
mov ecx, eax
call fcn.00401884
test al, al
je 0x402541
lea rax, [0x00452418]
mov rax, qword [rax]
mov rcx, rax
call fcn.00401922
xor eax, 1
test al, al
je 0x402541
lea rax, [0x00452418]
mov rax, qword [rax]
mov rcx, rax
call fcn.00401fa6
jmp 0x402541
call fcn.004020a8
mov rax, qword [0x0044a038]
test rax, rax
jne 0x40224d
nop
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
ret