Function at 0x4a6ff0
Capabilities:
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1c
call fcn.007081d0
mov dword [ebp - 8], 0
mov dword [ebp - 0x1c], 0
xor eax, eax
je 0x4a7020
mov ecx, dword [ebp + 8]
mov dword [ebp - 8], ecx
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0xc], edx
jmp 0x4a710c
mov eax, dword [ebp + 8]
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
add eax, 1
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp + 0xc]
push ecx
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
add eax, 1
mov dword [ebp - 0x18], eax
mov edx, dword [ebp - 0x14]
add edx, dword [ebp - 0x18]
shl edx, 1
push edx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x4a7064
jmp 0x4a71a0
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 8]
lea edx, [ecx + eax*2]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp + 8]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x4a70be
mov dword [ebp - 4], 0
jmp 0x4a70a0
mov ecx, dword [ebp - 4]
add ecx, 1
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
cmp edx, dword [ebp - 0x14]
jae 0x4a70be
mov eax, dword [ebp + 8]
add eax, dword [ebp - 4]
movsx cx, byte [eax]
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 8]
mov word [eax + edx*2], cx
jmp 0x4a7097
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x4a710c
mov dword [ebp - 4], 0
jmp 0x4a70ee
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0x18]
jae 0x4a710c
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 4]
movsx dx, byte [ecx]
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0xc]
mov word [ecx + eax*2], dx
jmp 0x4a70e5
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x4a7123
jmp 0x4a71a7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xb7
je 0x4a713b
cmp dword [ebp - 0x10], 0x50
jne 0x4a7166
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x4a715d
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x4a715d
jmp 0x4a71a7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 2
je 0x4a7172
cmp dword [ebp - 0x10], 3
jne 0x4a7180
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], 2
jmp 0x4a71a0
cmp dword [ebp - 0x10], 5
jne 0x4a7194
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], 0xd
jmp 0x4a71a0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], 0x16
mov dword [ebp - 0x1c], 0xffffffff
cmp dword [ebp - 8], 0
je 0x4a71c2
mov ecx, dword [ebp - 8]
cmp ecx, dword [ebp + 8]
je 0x4a71c2
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov eax, dword [ebp - 0x1c]
mov esp, ebp
pop ebp
ret