Function at 0x40f2f0
Capabilities:
Copy file
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4bfebd
mov eax, dword fs:[0]
push eax
sub esp, 0x458
mov eax, dword [0x509074]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x464], ebx
mov edi, dword [ebp + 8]
mov dword [ebx], 0
call fcn.00420750
test al, al
je 0x40f62a
lea eax, [ebp - 0x424]
push eax
push 0
push 0
push 0x24
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
xor ecx, ecx
mov eax, edi
cmp word [edi], cx
je 0x40f36a
nop word [eax + eax]
lea eax, [eax + 2]
inc ecx
cmp word [eax], 0
jne 0x40f360
xor edx, edx
lea eax, [ebp - 0x424]
cmp word [ebp - 0x424], dx
je 0x40f392
nop dword [eax + eax]
lea eax, [eax + 2]
inc edx
cmp word [eax], 0
jne 0x40f380
cmp ecx, edx
jb 0x40f62a
lea ecx, [ebp - 0x424]
xor edx, edx
call fcn.00405d70
mov ecx, eax
test ecx, ecx
je 0x40f3c7
nop word [eax + eax]
mov ax, word [edi + edx*2]
cmp ax, word [ebp + edx*2 - 0x424]
jne 0x40f62a
inc edx
cmp edx, ecx
jb 0x40f3b0
lea ecx, [ebp - 0x454]
call fcn.00406270
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x43c]
push ecx
mov ecx, eax
call fcn.00421c60
mov esi, eax
mov byte [ebp - 4], 1
cmp dword [esi + 0x14], 8
jb 0x40f3f5
mov esi, dword [esi]
call fcn.004043d0
mov ecx, eax
test ecx, ecx
je 0x40f6b9
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x458], eax
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x458]
push esi
call fcn.00403470
test al, al
jne 0x40f44f
test esi, esi
jne 0x40f42e
xor ecx, ecx
jmp 0x40f442
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40f433
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x458]
call fcn.004035e0
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x43c]
call fcn.00403e10
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x454]
call fcn.00403e10
lea ecx, [ebp - 0x458]
call fcn.0040e4f0
push 0x208
lea eax, [ebp - 0x21c]
push 0
push eax
call fcn.00498b50
mov esi, dword [ebp - 0x458]
lea eax, [ebp - 0x21c]
add esp, 0xc
push eax
push 0
push str.shim_clone
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
mov eax, dword [ebx]
test eax, eax
je 0x40f4b8
push eax
call fcn.00496f3e
add esp, 4
xor ecx, ecx
lea eax, [ebp - 0x21c]
cmp word [ebp - 0x21c], cx
je 0x40f4da
nop dword [eax]
lea eax, [eax + 2]
inc ecx
cmp word [eax], 0
jne 0x40f4d0
lea eax, [ecx + 1]
mov edx, 2
xor ecx, ecx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00496f43
mov ecx, eax
add esp, 4
mov ax, word [ebp - 0x21c]
mov dword [ebx], ecx
test ax, ax
je 0x40f528
lea ebx, [ebp - 0x21c]
movzx edx, ax
sub ebx, ecx
mov word [ecx], dx
add ecx, 2
movzx eax, word [ebx + ecx]
mov edx, eax
test ax, ax
jne 0x40f511
mov ebx, dword [ebp - 0x464]
xor eax, eax
mov word [ecx], ax
mov dword [ebp - 0x460], eax
mov byte [ebp - 0x45c], al
mov byte [ebp - 4], 8
lea eax, [ebp - 0x460]
push eax
call dword [sym.imp.KERNEL32.dll_Wow64DisableWow64FsRedirection]
movzx ecx, byte [ebp - 0x45c]
test eax, eax
push 0
push dword [ebx]
mov edx, 1
cmovne ecx, edx
push edi
mov byte [ebp - 0x45c], cl
call dword [sym.imp.KERNEL32.dll_CopyFileW]
cmp eax, 1
sete al
mov byte [ebx + 4], al
je 0x40f5dc
mov eax, dword [ebx]
test eax, eax
je 0x40f586
push eax
call fcn.00496f3e
add esp, 4
xor ecx, ecx
mov eax, edi
cmp word [edi], cx
je 0x40f59a
nop
lea eax, [eax + 2]
inc ecx
cmp word [eax], 0
jne 0x40f590
lea eax, [ecx + 1]
mov edx, 2
xor ecx, ecx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00496f43
mov ecx, eax
add esp, 4
mov dword [ebx], ecx
movzx eax, word [edi]
mov edx, eax
test ax, ax
je 0x40f5d7
sub edi, ecx
mov word [ecx], dx
add ecx, 2
movzx eax, word [edi + ecx]
mov edx, eax
test ax, ax
jne 0x40f5c6
xor eax, eax
mov word [ecx], ax
mov byte [ebp - 4], 5
cmp byte [ebp - 0x45c], 0
je 0x40f609
push dword [ebp - 0x460]
call dword [sym.imp.KERNEL32.dll_Wow64RevertWow64FsRedirection]
movzx ecx, byte [ebp - 0x45c]
xor edx, edx
test eax, eax
cmovne ecx, edx
mov byte [ebp - 0x45c], cl
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40f699
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x40f699
mov eax, dword [ebx]
test eax, eax
je 0x40f639
push eax
call fcn.00496f3e
add esp, 4
xor ecx, ecx
mov eax, edi
cmp word [edi], cx
je 0x40f64c
lea eax, [eax + 2]
inc ecx
cmp word [eax], 0
jne 0x40f642
lea eax, [ecx + 1]
mov edx, 2
xor ecx, ecx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00496f43
mov ecx, eax
add esp, 4
mov dword [ebx], ecx
movzx eax, word [edi]
mov edx, eax
test ax, ax
je 0x40f691
sub edi, ecx
nop dword [eax + eax]
mov word [ecx], dx
add ecx, 2
movzx eax, word [edi + ecx]
mov edx, eax
test ax, ax
jne 0x40f680
xor eax, eax
mov word [ecx], ax
mov byte [ebx + 4], al
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00496b9e
mov esp, ebp
pop ebp
ret 4
push 0x80004005
call fcn.00402570
int3