Function at 0x1400046f0
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x470
mov rax, qword [0x14003a200]
xor rax, rsp
mov qword [rsp + 0x460], rax
mov rsi, rcx
xor edx, edx
lea rcx, [rsp + 0x40]
mov r8d, 0x208
call fcn.140010590
xor edx, edx
lea rcx, [rsp + 0x250]
mov r8d, 0x208
call fcn.140010590
mov rcx, rsi
xor bl, bl
call fcn.140003b30
test al, al
je 0x1400047a5
lea rdx, [rsp + 0x30]
mov qword [rsp + 0x30], 0
mov rcx, rsi
call fcn.140001e90
test al, al
je 0x1400047a5
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 0x1400047b9
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 0x1400047c2
mov eax, dword [0x14002572c]
mov dword [rcx], eax
lea rcx, [rsp + 0x40]
sub rcx, 2
nop
cmp word [rcx + 2], 0
lea rcx, [rcx + 2]
jne 0x1400047e0
movups xmm2, xmmword [str.PuddingDesktop]
mov edx, dword [0x1400256e8]
movsd xmm3, qword [0x1400256e0]
movzx r8d, word [0x1400256ec]
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 0x140004821
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 0x140004840
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 0x140004864
cmp qword [rsi + 0x48], 8
lea rbx, [rsi + 0x30]
movsd xmm0, qword [0x140025730]
movzx eax, word [0x140025738]
movsd qword [rcx], xmm0
mov word [rcx + 8], ax
jb 0x140004896
mov r8, qword [rbx]
jmp 0x140004899
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 0x1400048c2
mov r8, qword [rdi]
jmp 0x1400048c5
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 0x1400048ef
mov r8, qword [r8]
lea r9, str.PuddingDesktop.ini
lea rdx, str._s_s
lea rcx, [rsp + 0x250]
call fcn.140005490
cmp qword [rbx + 0x18], 8
jb 0x140004916
mov r8, qword [rbx]
jmp 0x140004919
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 0x140004941
mov r8, qword [rdi]
jmp 0x140004944
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 0x14000496a
mov rbx, qword [rbx]
mov r9, rbx
lea r8, str.CfgRootPath
lea rdx, str.AppInfo
lea rcx, str.PuddingDesktop
call fcn.140006f00
cmp qword [rdi + 0x18], 8
jb 0x140004991
mov rdi, qword [rdi]
mov r9, rdi
lea r8, str.CfgUserPath
lea rdx, str.AppInfo
lea rcx, str.PuddingDesktop
call fcn.140006f00
mov rcx, qword [rsp + 0x460]
xor rcx, rsp
call fcn.14000d1c0
lea r11, [rsp + 0x470]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret