Function at 0x405310
Capabilities:
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47e141
mov eax, dword fs:[0]
push eax
sub esp, 0x840
mov eax, dword [0x49f56c]
xor eax, ebp
mov dword [ebp - 0x24], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea ecx, [ebp - 0x20]
call fcn.004028e0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x14]
call fcn.004028e0
mov byte [ebp - 4], 1
mov byte [ebp - 0x19], 0
push 2
push 0
mov ecx, dword [ebp + 8]
call fcn.0041a040
push eax
call fcn.00462830
add esp, 0xc
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x4054a5
xor eax, eax
mov word [ebp - 0x824], ax
push 0x800
lea ecx, [ebp - 0x824]
push ecx
call fcn.004069d0
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [ebp - 0x824]
push edx
lea ecx, [ebp - 0x20]
call fcn.004029f0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push 0x485880
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea ecx, [ebp - 0x824]
push ecx
push 0x485888
lea edx, [ebp - 0x20]
push edx
lea eax, [ebp - 0x82c]
push eax
call fcn.004020e0
add esp, 0xc
mov dword [ebp - 0x840], eax
mov ecx, dword [ebp - 0x840]
mov dword [ebp - 0x844], ecx
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x844]
push edx
lea eax, [ebp - 0x830]
push eax
call fcn.004020e0
add esp, 0xc
mov dword [ebp - 0x848], eax
mov ecx, dword [ebp - 0x848]
mov dword [ebp - 0x84c], ecx
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x84c]
push edx
lea ecx, [ebp - 0x14]
call fcn.00401c20
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x830]
call fcn.004029a0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x82c]
call fcn.004029a0
lea ecx, [ebp - 0x14]
call fcn.0041a040
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 2
push 0
lea ecx, [ebp - 0x14]
call fcn.0041a040
push eax
push 0
mov eax, dword [ebp - 0x18]
push eax
call fcn.00462c60
add esp, 0x14
test eax, eax
jne 0x40548a
mov byte [ebp - 0x19], 1
jmp 0x405499
lea ecx, [ebp - 0x14]
call fcn.0041a040
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.00462cd0
add esp, 4
mov ecx, dword [ebp + 8]
call fcn.0041a040
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
movzx edx, byte [ebp - 0x19]
test edx, edx
jne 0x4054e9
mov byte [ebp - 0x831], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x14]
call fcn.004029a0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.004029a0
mov al, byte [ebp - 0x831]
jmp 0x405698
mov byte [ebp - 0x1a], 0
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x14]
call fcn.0041a040
push eax
call dword [sym.imp.KERNEL32.dll_GetBinaryTypeW]
test eax, eax
je 0x405657
cmp dword [ebp - 0x10], 0
je 0x405518
cmp dword [ebp - 0x10], 6
jne 0x405657
movzx ecx, byte [ebp + 0xc]
test ecx, ecx
je 0x405608
lea edx, [ebp - 0x20]
push edx
lea ecx, [ebp - 0x828]
call fcn.00402940
mov byte [ebp - 4], 4
push 0x485894
lea ecx, [ebp - 0x828]
call fcn.00401c40
lea ecx, [ebp - 0x828]
call fcn.0041a040
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [ebp - 0x828]
call fcn.0041a040
push eax
lea ecx, [ebp - 0x20]
call fcn.0041a040
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x4055f7
lea ecx, [ebp - 0x20]
call fcn.0041a040
push eax
lea ecx, [ebp - 0x14]
call fcn.0041a040
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x4055f7
mov byte [ebp - 0x1a], 1
call fcn.0040b480
mov byte [eax + 0x38], 1
call fcn.0040b480
mov ecx, eax
call fcn.0040a870
push 0
push 0xe141
push 0x111
call fcn.00421270
push eax
call dword [sym.imp.USER32.dll_PostMessageW]
cmp dword [0x4a0bf4], 0
je 0x4055e4
mov eax, dword [0x4a0bf4]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x4a0bf4], 0
push 1
lea ecx, [ebp - 0x20]
call fcn.0041a040
push eax
call fcn.00453690
add esp, 8
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x828]
call fcn.004029a0
jmp 0x405657
mov byte [ebp - 0x1a], 1
lea ecx, [ebp - 0x14]
call fcn.00402a30
add eax, 1
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00463394
add esp, 4
mov dword [ebp - 0x838], eax
mov eax, dword [ebp - 0x838]
mov dword [0x4a0bf8], eax
lea ecx, [ebp - 0x14]
call fcn.0041a040
push eax
mov ecx, dword [0x4a0bf8]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
movzx edx, byte [ebp - 0x1a]
test edx, edx
jne 0x40566e
lea ecx, [ebp - 0x14]
call fcn.0041a040
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov al, byte [ebp - 0x1a]
mov byte [ebp - 0x839], al
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x14]
call fcn.004029a0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.004029a0
mov al, byte [ebp - 0x839]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x24]
xor ecx, ebp
call fcn.00464355
mov esp, ebp
pop ebp
ret