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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4dfb31
mov eax, dword fs:[0]
push eax
sub esp, 0x244
mov eax, dword [0x520078]
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 0x4788e8
mov eax, esi
and eax, 0xffff00ff
cmp eax, 0x24
jne 0x4786b4
push 0x104
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
jne 0x47867e
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.0047e080
add esp, 0x10
lea eax, [ebp - 0x248]
push 0x51d458
push eax
call fcn.004ac830
cmp eax, 0x104
jbe 0x4788e8
push esi
push str.Unable_to_retrieve_a_path_of_the_known_folder___d__
lea eax, [ebp - 0x248]
push 0xea
push eax
call fcn.0047e080
add esp, 0x10
lea eax, [ebp - 0x248]
push 0x51d458
push eax
call fcn.004ac830
cmp eax, 0x23
jne 0x47871a
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.00479520
add esp, 0x10
test al, al
je 0x478651
cmp dword [ebp - 0x220], 8
lea eax, [ebp - 0x234]
cmovae eax, dword [ebp - 0x234]
jmp 0x4788c1
cmp eax, 0x1a
jne 0x47880c
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.00479520
add esp, 0x10
test al, al
jne 0x4788a9
push 0x104
lea ecx, [ebp - 0x234]
call fcn.0041d730
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 0x4787c2
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4788a9
push esi
push str.Unable_to_retrieve_a_path_of_the_known_folder___d__
jmp 0x47865d
cmp eax, dword [ebp - 0x224]
jbe 0x4787da
push esi
mov eax, 0xea
push str.Unable_to_retrieve_a_path_of_the_known_folder___d__
jmp 0x47865d
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 0x4788b5
mov eax, 3
push esi
push str.Unable_to_retrieve_a_path_of_the_known_folder___d__
jmp 0x47865d
cmp eax, 0x1c
jne 0x478908
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.00479520
add esp, 0x10
test al, al
jne 0x4788a9
push 0x104
lea ecx, [ebp - 0x234]
call fcn.0041d730
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 0x4787c2
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x478801
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.004befb0
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x234]
call fcn.00415720
xor eax, eax
mov dword [edi + 0x14], 7
mov dword [edi + 0x10], 0
mov word [edi], ax
cmp word [ebp - 0x21c], ax
jne 0x47892e
xor ecx, ecx
jmp 0x478946
push esi
push str.Unable_to_retrieve_a_path_of_the_known_folder___d__
push ecx
lea eax, [ebp - 0x230]
push eax
call fcn.0047e080
add esp, 0x10
lea eax, [ebp - 0x230]
push 0x51d458
jmp 0x478678
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x478937
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x21c]
mov ecx, edi
push eax
call fcn.00415460
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.0049384c
mov esp, ebp
pop ebp
ret