Function at 0x406810
Capabilities:
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d9387
mov eax, dword fs:[0]
push eax
sub esp, 0x33c
mov eax, dword [0x5176f0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ecx, dword [ebp + 8]
call fcn.004041a0
push eax
call fcn.00404fe0
add esp, 4
movzx eax, al
test eax, eax
jne 0x40685a
mov al, 1
jmp 0x406b4e
mov byte [ebp - 0xb9], 1
mov ecx, dword [ebp + 8]
call fcn.004041a0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
lea ecx, [ebp - 0x300]
call fcn.00404aa0
mov dword [ebp - 4], 0
xor ecx, ecx
mov word [ebp - 0x2e4], cx
push 0x206
push 0
lea edx, [ebp - 0x2e2]
push edx
call fcn.004b28e0
add esp, 0xc
lea ecx, [ebp - 0x300]
call fcn.004041a0
push eax
push 0
call fcn.00407c30
add esp, 4
push edx
push eax
push str.Tmp_I64d__s
lea eax, [ebp - 0x2e4]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
lea ecx, [ebp - 0x2e4]
push ecx
lea ecx, [ebp - 0xb8]
call fcn.00404aa0
mov byte [ebp - 4], 1
lea edx, [ebp - 0x2c]
push edx
call fcn.00404c20
add esp, 4
mov dword [ebp - 0x324], eax
mov eax, dword [ebp - 0x324]
mov dword [ebp - 0x328], eax
mov byte [ebp - 4], 2
lea ecx, [ebp - 0xb8]
push ecx
mov edx, dword [ebp - 0x328]
push edx
lea eax, [ebp - 0xd8]
push eax
call fcn.00403050
add esp, 0xc
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2c]
call fcn.00404250
push 1
lea ecx, [ebp - 0xd8]
call fcn.004041a0
push eax
mov ecx, dword [ebp + 8]
call fcn.004041a0
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x406aeb
mov ecx, dword [ebp + 0xc]
call fcn.0040d680
movzx ecx, al
test ecx, ecx
je 0x406a26
mov edx, dword [ebp + 8]
push edx
lea ecx, [ebp - 0x31c]
call fcn.004041c0
mov byte [ebp - 4], 5
mov ecx, dword [ebp + 0xc]
call fcn.004041a0
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push 0x4fd41c
lea eax, [ebp - 0x31c]
push eax
lea ecx, [ebp - 0x48]
push ecx
call fcn.00402e60
add esp, 0xc
mov dword [ebp - 0x32c], eax
mov edx, dword [ebp - 0x32c]
mov dword [ebp - 0x330], edx
mov byte [ebp - 4], 6
lea eax, [ebp - 0xb8]
push eax
mov ecx, dword [ebp - 0x330]
push ecx
lea edx, [ebp - 0x64]
push edx
call fcn.00403050
add esp, 0xc
mov dword [ebp - 0x334], eax
mov eax, dword [ebp - 0x334]
mov dword [ebp - 0x338], eax
mov byte [ebp - 4], 7
mov ecx, dword [ebp - 0x338]
push ecx
lea ecx, [ebp - 0xd8]
call fcn.00402670
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x64]
call fcn.00404250
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x48]
call fcn.00404250
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x31c]
call fcn.00404250
jmp 0x406ab1
push 0x4fd420
mov edx, dword [ebp + 0xc]
push edx
lea eax, [ebp - 0x80]
push eax
call fcn.00402e60
add esp, 0xc
mov dword [ebp - 0x33c], eax
mov ecx, dword [ebp - 0x33c]
mov dword [ebp - 0x340], ecx
mov byte [ebp - 4], 8
lea edx, [ebp - 0xb8]
push edx
mov eax, dword [ebp - 0x340]
push eax
lea ecx, [ebp - 0x9c]
push ecx
call fcn.00403050
add esp, 0xc
mov dword [ebp - 0x344], eax
mov edx, dword [ebp - 0x344]
mov dword [ebp - 0x348], edx
mov byte [ebp - 4], 9
mov eax, dword [ebp - 0x348]
push eax
lea ecx, [ebp - 0xd8]
call fcn.00402670
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x9c]
call fcn.00404250
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x80]
call fcn.00404250
push 1
lea ecx, [ebp - 0xd8]
call fcn.004041a0
push eax
mov ecx, dword [ebp + 8]
call fcn.004041a0
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x406ad9
mov byte [ebp - 0xb9], 0
lea ecx, [ebp - 0xd8]
call fcn.004041a0
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 4
push 0
lea ecx, [ebp - 0xd8]
call fcn.004041a0
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x406b0c
mov byte [ebp - 0xb9], 0
mov cl, byte [ebp - 0xb9]
mov byte [ebp - 0x31d], cl
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xd8]
call fcn.00404250
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xb8]
call fcn.00404250
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x300]
call fcn.00404250
mov al, byte [ebp - 0x31d]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004ae123
mov esp, ebp
pop ebp
ret