Function at 0x405f90
Capabilities:
Copy file
Delete file
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x538cad
mov eax, dword fs:[0]
push eax
sub esp, 0x42c
mov eax, dword [0x58d140]
xor eax, ebp
mov dword [ebp - 0x10], eax
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x56802c
lea ecx, [ebp - 0x430]
mov byte [ebp - 0x421], 0
call fcn.00405e40
mov dword [ebp - 4], 0
mov eax, dword [esi]
push 0x2e
push eax
call fcn.0050eb48
add esp, 8
test eax, eax
je 0x406043
mov ecx, dword [esi]
sub eax, ecx
sar eax, 1
mov edx, eax
cmp edx, 0xffffffff
je 0x406043
mov eax, dword [ecx - 0xc]
sub eax, edx
dec eax
push eax
lea eax, [ebp - 0x42c]
push eax
mov ecx, esi
call fcn.00402f60
push eax
lea ecx, [ebp - 0x430]
mov byte [ebp - 4], 1
call fcn.00401600
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x42c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406043
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x420]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
cmp eax, 0x104
ja 0x406246
test eax, eax
je 0x406246
lea edx, [ebp - 0x218]
push edx
push 0
push 0x568034
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea ecx, [ebp - 0x218]
push ecx
lea ecx, [ebp - 0x428]
mov edi, eax
call fcn.00405e40
push 0x568030
lea ecx, [ebp - 0x434]
mov byte [ebp - 4], 2
call fcn.00405e40
push eax
lea edx, [ebp - 0x428]
push edx
lea eax, [ebp - 0x438]
push eax
mov byte [ebp - 4], 3
call fcn.00403070
lea ecx, [ebp - 0x430]
push ecx
push eax
lea edx, [ebp - 0x42c]
push edx
mov byte [ebp - 4], 4
call fcn.00403070
add esp, 0x18
push eax
lea ecx, [ebp - 0x428]
mov byte [ebp - 4], 5
call fcn.00401600
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x42c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406114
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x438]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40613a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x434]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406160
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x56802c
push str..tmp
lea ecx, [ebp - 0x428]
call fcn.00402bd0
test edi, edi
je 0x406220
mov edi, dword [ebp - 0x428]
cmp dword [edi - 4], 1
jle 0x40619e
mov ecx, dword [edi - 0xc]
push ecx
lea ecx, [ebp - 0x428]
call fcn.00401330
mov edi, dword [ebp - 0x428]
mov eax, dword [esi]
cmp dword [eax - 4], 1
jle 0x4061b1
mov edx, dword [eax - 0xc]
push edx
mov ecx, esi
call fcn.00401330
mov eax, dword [esi]
push 0
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
setne al
test al, al
je 0x406220
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x428]
push eax
lea ecx, [ebp - 0x42c]
call fcn.00405f00
lea ecx, [ebp - 0x42c]
push ecx
mov ecx, esi
mov byte [ebp - 4], 6
call fcn.00401600
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x42c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x406219
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 0x421], 1
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x428]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406246
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x430]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40626f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, byte [ebp - 0x421]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0050e0a7
mov esp, ebp
pop ebp
ret