Function at 0x46564b
Capabilities:
Check if file exists
Copy file
Get common file path
Get file attributes

Disassembly:
push 0x23c
mov eax, 0x51c67c
call fcn.004d8af2
mov ebx, ecx
mov dword [ebp - 0x238], ebx
mov dword [ebp - 0x21c], ebx
mov dword [ebp - 0x21c], ebx
and dword [ebp - 4], 0
lea ecx, [ebp - 0x234]
call fcn.0040687a
push ecx
mov byte [ebp - 4], 1
lea edi, [ebp - 0x234]
mov esi, esp
mov dword [ebp - 0x21c], esi
mov ecx, dword [ebp + 8]
lea ecx, [ecx - 0x10]
call fcn.004070e7
add eax, 0x10
lea ecx, [ebp - 0x228]
mov edx, edi
mov dword [esi], eax
call fcn.00428612
pop ecx
mov byte [ebp - 4], 2
cmp dword [ebp - 0x228], 0
jge 0x465747
cmp dword [ebp - 0x224], 0
mov eax, 0x135a
cmovne eax, dword [ebp - 0x224]
push eax
push dword [ebp - 0x228]
push ecx
mov esi, esp
mov dword [ebp - 0x21c], esi
mov ecx, dword [ebp - 0x220]
lea ecx, [ecx - 0x10]
call fcn.004070e7
add eax, 0x10
lea ecx, [ebp - 0x244]
mov dword [esi], eax
call fcn.00406620
lea eax, [ebp - 0x244]
mov byte [ebp - 4], 3
push eax
mov ecx, ebx
call fcn.0040121b
mov ecx, dword [ebp - 0x23c]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x220]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x234]
add ecx, 0xfffffff0
call fcn.00407189
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
jmp 0x4659ec
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x220]
lea ecx, [ecx - 0x10]
call fcn.00407189
lea ecx, [ebp + 8]
call fcn.004aee1c
push 0
push str._CSIDL_PROGRAMS_
mov ecx, eax
call fcn.004045bb
mov esi, dword [ebp - 0x234]
mov edi, eax
push 0x5c
push esi
call fcn.004da090
pop ecx
pop ecx
test eax, eax
jne 0x4657bf
push 0x1362
push 0x80004005
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x244]
call fcn.00406620
lea eax, [ebp - 0x244]
mov byte [ebp - 4], 4
push eax
mov ecx, ebx
call fcn.0040121b
mov ecx, dword [ebp - 0x23c]
jmp 0x4659d6
add eax, 2
lea ecx, [ebp - 0x230]
push eax
call fcn.00406fea
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004d9f30
add esp, 0xc
lea eax, [ebp - 0x218]
cmp edi, 0xffffffff
push eax
push 0
push 0
push 0x10
pop eax
push 0x19
pop ecx
cmove eax, ecx
xor edi, edi
push eax
push edi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea ecx, [ebp - 0x220]
mov dword [ebp - 0x228], eax
mov dword [ebp - 0x224], edi
call fcn.0040687a
mov byte [ebp - 4], 6
cmp dword [ebp - 0x228], edi
jge 0x4658c4
cmp dword [ebp - 0x224], edi
mov eax, 0x1368
cmovne eax, dword [ebp - 0x224]
push eax
push dword [ebp - 0x228]
push ecx
mov edi, esp
mov dword [ebp - 0x21c], edi
mov ebx, dword [ebp - 0x220]
lea ecx, [ebx - 0x10]
call fcn.004070e7
add eax, 0x10
lea ecx, [ebp - 0x244]
mov dword [edi], eax
call fcn.00406620
lea eax, [ebp - 0x244]
mov byte [ebp - 4], 7
mov ecx, dword [ebp - 0x238]
push eax
call fcn.0040121b
mov ecx, dword [ebp - 0x23c]
lea ecx, [ecx - 0x10]
call fcn.00407189
lea ecx, [ebx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x230]
lea ecx, [ecx - 0x10]
call fcn.00407189
lea ecx, [esi - 0x10]
call fcn.00407189
mov ecx, dword [ebp + 8]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov eax, dword [ebp - 0x238]
jmp 0x4659f3
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x220]
lea ecx, [ecx - 0x10]
call fcn.00407189
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x21c]
call fcn.00406fea
push 0x53d64c
mov edx, eax
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x238]
call fcn.00409442
lea ecx, [ebp - 0x230]
mov byte [ebp - 4], 9
push ecx
mov edx, eax
lea ecx, [ebp - 0x22c]
call fcn.0040a037
pop ecx
pop ecx
mov ecx, dword [ebp - 0x238]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov byte [ebp - 4], 0xc
mov ecx, dword [ebp - 0x21c]
lea ecx, [ecx - 0x10]
call fcn.00407189
push dword [ebp - 0x22c]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4659b5
push 1
push dword [ebp - 0x22c]
push esi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x4659b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
push 0x136d
cmovle ecx, eax
mov eax, 0x80004005
test ecx, ecx
cmovs eax, ecx
push eax
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x244]
call fcn.00406620
lea eax, [ebp - 0x244]
mov byte [ebp - 4], 0xd
push eax
mov ecx, ebx
call fcn.0040121b
mov ecx, dword [ebp - 0x23c]
lea ecx, [ecx - 0x10]
call fcn.00407189
jmp 0x4659c2
lea ecx, [ebx + 8]
mov dword [ebx], edi
mov dword [ebx + 4], edi
call fcn.0040687a
mov ecx, dword [ebp - 0x22c]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x230]
lea ecx, [ecx - 0x10]
call fcn.00407189
lea ecx, [esi - 0x10]
call fcn.00407189
mov ecx, dword [ebp + 8]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov eax, ebx
call fcn.004d8aa1
ret