Function at 0x647fd9c0
Capabilities:
Get common file path
Persist via run registry key

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x64818a71
mov eax, dword fs:[0]
push eax
sub esp, 0x244
mov eax, dword [0x64854008]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov edi, ecx
mov dword [ebp - 0x24c], edi
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x250], 0
push eax
push 0
push 0
push esi
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov ecx, eax
test ecx, ecx
jns 0x647fdcd9
mov eax, esi
and eax, 0xffff00ff
cmp eax, 0x24
jne 0x647fdaa4
push 0x104
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
jne 0x647fda6e
push esi
push str.Unable_to_retrieve_a_path_of_the_known_folder___d__
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x248]
push eax
call fcn.64802140
add esp, 0x10
lea eax, [ebp - 0x248]
push 0x64850520
push eax
call fcn.64807648
cmp eax, 0x104
jbe 0x647fdcd9
push esi
push str.Unable_to_retrieve_a_path_of_the_known_folder___d__
lea eax, [ebp - 0x248]
push 0xea
push eax
call fcn.64802140
add esp, 0x10
lea eax, [ebp - 0x248]
push 0x64850520
push eax
call fcn.64807648
cmp eax, 0x23
jne 0x647fdb0a
xor eax, eax
mov dword [ebp - 0x220], 7
mov dword [ebp - 0x224], 0
mov word [ebp - 0x234], ax
push ecx
push eax
mov dword [ebp - 4], eax
mov edx, str.SOFTWAREMicrosoftWindowsCurrentVersionExplorerShell_Folders
lea eax, [ebp - 0x234]
mov ecx, 0x80000002
push eax
push str.Common_AppData
call fcn.647fea30
add esp, 0x10
test al, al
je 0x647fda41
cmp dword [ebp - 0x220], 8
lea eax, [ebp - 0x234]
cmovae eax, dword [ebp - 0x234]
jmp 0x647fdcb1
cmp eax, 0x1a
jne 0x647fdbfc
xor eax, eax
mov dword [ebp - 0x220], 7
mov dword [ebp - 0x224], 0
mov word [ebp - 0x234], ax
push ecx
push eax
lea eax, [ebp - 0x234]
mov dword [ebp - 4], 1
push eax
push str.AppData
mov edx, str.SOFTWAREMicrosoftWindowsCurrentVersionExplorerShell_Folders
mov ecx, 0x80000001
call fcn.647fea30
add esp, 0x10
test al, al
jne 0x647fdc99
push 0x104
lea ecx, [ebp - 0x234]
call fcn.64789890
cmp dword [ebp - 0x220], 8
lea eax, [ebp - 0x234]
push dword [ebp - 0x224]
cmovae eax, dword [ebp - 0x234]
push eax
push str._APPDATA_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x647fdbb2
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x647fdc99
push esi
push str.Unable_to_retrieve_a_path_of_the_known_folder___d__
jmp 0x647fda4d
cmp eax, dword [ebp - 0x224]
jbe 0x647fdbca
push esi
mov eax, 0xea
push str.Unable_to_retrieve_a_path_of_the_known_folder___d__
jmp 0x647fda4d
mov ecx, dword [ebp - 0x220]
lea eax, [ebp - 0x234]
mov edx, dword [ebp - 0x234]
cmp ecx, 8
cmovae eax, edx
cmp word [eax], 0x25
jne 0x647fdca5
mov eax, 3
push esi
push str.Unable_to_retrieve_a_path_of_the_known_folder___d__
jmp 0x647fda4d
cmp eax, 0x1c
jne 0x647fdcf9
xor eax, eax
mov dword [ebp - 0x220], 7
mov dword [ebp - 0x224], 0
mov word [ebp - 0x234], ax
push ecx
push eax
lea eax, [ebp - 0x234]
mov dword [ebp - 4], 2
push eax
push str.Local_AppData
mov edx, str.SOFTWAREMicrosoftWindowsCurrentVersionExplorerShell_Folders
mov ecx, 0x80000001
call fcn.647fea30
add esp, 0x10
test al, al
jne 0x647fdc99
push 0x104
lea ecx, [ebp - 0x234]
call fcn.64789890
cmp dword [ebp - 0x220], 8
lea eax, [ebp - 0x234]
push dword [ebp - 0x224]
cmovae eax, dword [ebp - 0x234]
push eax
push str._LOCALAPPDATA_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x647fdbb2
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x647fdbf1
mov ecx, dword [ebp - 0x220]
mov edx, dword [ebp - 0x234]
cmp ecx, 8
lea eax, [ebp - 0x234]
cmovae eax, edx
push eax
lea eax, [ebp - 0x21c]
push 0x104
push eax
call dword [0x6481d454]
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x234]
call fcn.647898d0
xor eax, eax
mov dword [edi + 0x14], 7
mov dword [edi + 0x10], 0
mov word [edi], ax
cmp word [ebp - 0x21c], ax
jne 0x647fdd1f
xor ecx, ecx
jmp 0x647fdd3f
push esi
push str.Unable_to_retrieve_a_path_of_the_known_folder___d__
push ecx
lea eax, [ebp - 0x230]
push eax
call fcn.64802140
add esp, 0x10
lea eax, [ebp - 0x230]
push 0x64850520
jmp 0x647fda68
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x647fdd30
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x21c]
mov ecx, edi
push eax
call fcn.6478d1e0
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.648031e0
mov esp, ebp
pop ebp
ret