Function at 0x471dc0
Capabilities:
Get common file path
Persist via run registry key
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d84d6
mov eax, dword fs:[0]
push eax
sub esp, 0x244
mov eax, dword [0x517074]
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 - 0x248], edi
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x24c], 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 0x471fe0
mov eax, esi
and eax, 0xffff00ff
cmp eax, 0x24
jne 0x471ea4
push 0x104
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
jne 0x471e6e
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 - 0x244]
push eax
call fcn.004770a0
add esp, 0x10
lea eax, [ebp - 0x244]
push 0x513ed8
push eax
call fcn.004a4f7b
cmp eax, 0x104
jbe 0x471fe0
push esi
push str.Unable_to_retrieve_a_path_of_the_known_folder___d__
lea eax, [ebp - 0x244]
push 0xea
push eax
call fcn.004770a0
add esp, 0x10
lea eax, [ebp - 0x244]
push 0x513ed8
push eax
call fcn.004a4f7b
cmp eax, 0x23
jne 0x471f09
xor eax, eax
mov dword [ebp - 0x220], 7
mov dword [ebp - 0x224], 0
mov word [ebp - 0x234], ax
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.00472c60
add esp, 0xc
test al, al
je 0x471e41
cmp dword [ebp - 0x220], 8
lea eax, [ebp - 0x234]
cmovae eax, dword [ebp - 0x234]
jmp 0x471fb9
cmp eax, 0x1a
jne 0x47204d
xor eax, eax
mov dword [ebp - 0x220], 7
mov dword [ebp - 0x224], 0
mov word [ebp - 0x234], ax
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.00472c60
add esp, 0xc
test al, al
jne 0x471fa1
push 0x104
lea ecx, [ebp - 0x234]
call fcn.0041a400
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 0x472003
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x472042
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 fcn.004b7dc0
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x234]
call fcn.00414250
xor eax, eax
mov dword [edi + 0x14], 7
mov dword [edi + 0x10], 0
mov word [edi], ax
cmp word [ebp - 0x21c], ax
jne 0x472073
xor ecx, ecx
jmp 0x47208f
cmp eax, dword [ebp - 0x224]
jbe 0x47201b
push esi
mov eax, 0xea
push str.Unable_to_retrieve_a_path_of_the_known_folder___d__
jmp 0x471e4d
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 0x471fad
mov eax, 3
push esi
push str.Unable_to_retrieve_a_path_of_the_known_folder___d__
jmp 0x471e4d
push esi
push str.Unable_to_retrieve_a_path_of_the_known_folder___d__
push ecx
lea eax, [ebp - 0x22c]
push eax
call fcn.004770a0
add esp, 0x10
lea eax, [ebp - 0x22c]
push 0x513ed8
jmp 0x471e68
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x472080
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x21c]
mov ecx, edi
push eax
call fcn.00413f90
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.0048bc9e
mov esp, ebp
pop ebp
ret