Function at 0x14001ff10
Capabilities:
Get common file path
Read .ini file

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
lea rbp, [rsp - 0x5a0]
sub rsp, 0x6a0
mov rax, qword [0x14016b140]
xor rax, rsp
mov qword [rbp + 0x590], rax
mov rbx, r8
lea rcx, [rbp + 0x40]
mov rdi, rdx
mov r8d, 0x104
xor edx, edx
xor esi, esi
call fcn.1400c0ac0
test rbx, rbx
je 0x14001ff90
mov r8d, 0x104
lea rdx, [rbp + 0x260]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetShortPathNameA]
test eax, eax
jne 0x14001ff9a
lea rdx, [rbp + 0x260]
mov rcx, rbx
sub rdx, rbx
nop dword [rax]
movzx eax, byte [rcx]
mov byte [rdx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x14001ff80
jmp 0x14001ff9a
mov dword [rbp + 0x260], 0x4c554e
mov edx, 0x104
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea rdx, [rsp + 0x30]
dec rdx
cmp byte [rdx + 1], sil
lea rdx, [rdx + 1]
jne 0x14001ffb2
mov eax, dword [0x140106680]
mov r8d, 0x104
movsd xmm0, qword [str.WININIT.INI]
mov rcx, rdi
movsd qword [rdx], xmm0
mov dword [rdx + 8], eax
movzx eax, byte [0x140106684]
mov byte [rdx + 0xc], al
lea rdx, [rbp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetShortPathNameA]
cmp byte [rbp + 0x40], sil
jne 0x14001fffb
xor eax, eax
jmp 0x140020269
lea rax, [rsp + 0x30]
mov byte [rbp + 0x480], sil
mov qword [rsp + 0x28], rax
lea r9, [rbp + 0x150]
lea r8, [rbp + 0x480]
mov dword [rsp + 0x20], 0x104
lea rdx, [rbp + 0x260]
mov byte [rbp + 0x150], sil
lea rcx, str.Rename
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
jne 0x140020055
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Get_Error___NUL___ld_n
call fcn.140020f50
test rbx, rbx
je 0x140020089
lea r9, [rsp + 0x30]
lea r8, [rbp + 0x40]
lea rdx, [rbp + 0x260]
lea rcx, str.Rename
call qword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
test eax, eax
je 0x14002024e
mov esi, 1
jmp 0x140020267
cmp byte [rbp + 0x150], sil
je 0x14002022d
lea rdx, str.KCRESVDX
lea rcx, [rbp + 0x150]
call fcn.1400c0888
test rax, rax
jne 0x14002011e
lea r9, [rsp + 0x30]
lea r8, [rbp + 0x150]
lea rdx, str.KCRESVDX0.TMP
lea rcx, str.Rename
call qword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
test eax, eax
jne 0x1400200e6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Write_Error___KCRESVDX0.TMP___ld_n
call fcn.140020f50
lea r9, [rsp + 0x30]
lea r8, str.KCRESVDX.TMP
lea rdx, [rbp + 0x260]
lea rcx, str.Rename
call qword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
test eax, eax
jne 0x14002011e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Write_Error___KCRESVDX.TMP___ld_n
call fcn.140020f50
mov bl, 1
mov edi, esi
mov r8d, edi
lea rdx, str.KCRESVDX_d.TMP
lea rcx, [rbp + 0x370]
call qword [sym.imp.USER32.dll_wsprintfA]
lea rax, [rsp + 0x30]
mov byte [rbp + 0x480], sil
mov qword [rsp + 0x28], rax
lea r9, [rbp + 0x150]
lea r8, [rbp + 0x480]
mov dword [rsp + 0x20], 0x104
lea rdx, [rbp + 0x370]
mov byte [rbp + 0x150], sil
lea rcx, str.Rename
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
jne 0x14002019b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [rbp + 0x370]
lea rcx, str.Get_Error____s___ld_n
call fcn.140020f50
cmp byte [rbp + 0x150], sil
movzx ebx, bl
cmove ebx, esi
inc edi
test bl, bl
jne 0x140020122
lea r9, [rsp + 0x30]
lea r8, [rbp + 0x40]
lea rdx, [rbp + 0x370]
lea rcx, str.Rename
call qword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
test eax, eax
jne 0x1400201f3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
lea r8, [rbp + 0x40]
lea rdx, [rbp + 0x370]
lea rcx, str.Write_Error____s___s___ld_n
call fcn.140020f50
lea r9, [rsp + 0x30]
lea r8, str.KCRESVDX.TMP
lea rdx, [rbp + 0x260]
lea rcx, str.Rename
call qword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
test eax, eax
jne 0x140020267
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Write_Error___NUL__KCRESVDX.TMP___ld_n
call fcn.140020f50
jmp 0x140020267
lea r9, [rsp + 0x30]
lea r8, [rbp + 0x40]
lea rdx, [rbp + 0x260]
lea rcx, str.Rename
call qword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
test eax, eax
jne 0x140020267
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [rbp + 0x40]
lea rcx, str.Error___tszShortName___s___ld_n
call fcn.140020f50
mov eax, esi
mov rcx, qword [rbp + 0x590]
xor rcx, rsp
call fcn.140027790
mov rbx, qword [rsp + 0x6c0]
add rsp, 0x6a0
pop rdi
pop rsi
pop rbp
ret