Function at 0x180004c50
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x470
mov rax, qword [0x18004e3a0]
xor rax, rsp
mov qword [rsp + 0x460], rax
mov rsi, rcx
xor edx, edx
lea rcx, [rsp + 0x40]
mov r8d, 0x208
call fcn.18001b5d0
xor edx, edx
lea rcx, [rsp + 0x250]
mov r8d, 0x208
call fcn.18001b5d0
mov rcx, rsi
xor bl, bl
call fcn.180003fd0
test al, al
je 0x180004d05
lea rdx, [rsp + 0x30]
mov qword [rsp + 0x30], 0
mov rcx, rsi
call fcn.180002330
test al, al
je 0x180004d05
mov r8, qword [rsp + 0x30]
lea rax, [rsp + 0x40]
mov edi, 1
mov qword [rsp + 0x20], rax
mov r9d, edi
xor ecx, ecx
lea edx, [rdi + 0x2b]
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
movzx ebx, bl
cmove ebx, edi
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test bl, bl
jne 0x180004d19
xor r9d, r9d
lea rdx, [rsp + 0x40]
xor ecx, ecx
lea r8d, [r9 + 0x2c]
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea rcx, [rsp + 0x40]
sub rcx, 2
cmp word [rcx + 2], 0
lea rcx, [rcx + 2]
jne 0x180004d22
mov eax, dword [0x180036804]
mov dword [rcx], eax
lea rcx, [rsp + 0x40]
sub rcx, 2
nop
cmp word [rcx + 2], 0
lea rcx, [rcx + 2]
jne 0x180004d40
movups xmm2, xmmword [str.PuddingDesktop]
mov edx, dword [0x180036888]
movsd xmm3, qword [0x180036880]
movzx r8d, word [0x18003688c]
movups xmmword [rcx], xmm2
movsd qword [rcx + 0x10], xmm3
mov dword [rcx + 0x18], edx
mov word [rcx + 0x1c], r8w
lea rcx, [rsp + 0x40]
sub rcx, 2
cmp word [rcx + 2], 0
lea rcx, [rcx + 2]
jne 0x180004d81
mov dword [rcx], eax
lea rax, [rsp + 0x40]
sub rax, 2
nop word [rax + rax]
cmp word [rax + 2], 0
lea rax, [rax + 2]
jne 0x180004da0
movups xmmword [rax], xmm2
lea rcx, [rsp + 0x40]
movsd qword [rax + 0x10], xmm3
sub rcx, 2
mov dword [rax + 0x18], edx
mov word [rax + 0x1c], r8w
cmp word [rcx + 2], 0
lea rcx, [rcx + 2]
jne 0x180004dc4
cmp qword [rsi + 0x48], 8
lea rbx, [rsi + 0x30]
movsd xmm0, qword [str..ini]
movzx eax, word [0x1800368d8]
movsd qword [rcx], xmm0
mov word [rcx + 8], ax
jb 0x180004df6
mov r8, qword [rbx]
jmp 0x180004df9
mov r8, rbx
lea r9, [rsp + 0x40]
lea rdx, str.CfgRootPath
lea rcx, str.Globals
call qword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
cmp qword [rsi + 0x28], 8
lea rdi, [rsi + 0x10]
jb 0x180004e22
mov r8, qword [rdi]
jmp 0x180004e25
mov r8, rdi
lea r9, [rsp + 0x40]
lea rdx, str.CfgUserPath
lea rcx, str.Globals
call qword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
lea r8, [rsi + 0xb0]
cmp qword [r8 + 0x18], 8
jb 0x180004e4f
mov r8, qword [r8]
lea r9, str.PuddingDesktop.ini
lea rdx, str._s_s
lea rcx, [rsp + 0x250]
call fcn.180005ee0
cmp qword [rbx + 0x18], 8
jb 0x180004e76
mov r8, qword [rbx]
jmp 0x180004e79
mov r8, rbx
lea r9, [rsp + 0x250]
lea rdx, str.CfgRootPath
lea rcx, str.AppInfo
call qword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
cmp qword [rdi + 0x18], 8
jb 0x180004ea1
mov r8, qword [rdi]
jmp 0x180004ea4
mov r8, rdi
lea r9, [rsp + 0x250]
lea rdx, str.CfgUserPath
lea rcx, str.AppInfo
call qword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
cmp qword [rbx + 0x18], 8
jb 0x180004eca
mov rbx, qword [rbx]
mov r9, rbx
lea r8, str.CfgRootPath
lea rdx, str.AppInfo
lea rcx, str.PuddingDesktop
call fcn.180007340
cmp qword [rdi + 0x18], 8
jb 0x180004ef1
mov rdi, qword [rdi]
mov r9, rdi
lea r8, str.CfgUserPath
lea rdx, str.AppInfo
lea rcx, str.PuddingDesktop
call fcn.180007340
mov rcx, qword [rsp + 0x460]
xor rcx, rsp
call fcn.180018080
lea r11, [rsp + 0x470]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret