Function at 0x1800c54c0
Capabilities:
Get common file path
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdi
push rbp
lea rbp, [rsp - 0x57]
sub rsp, 0xf0
mov rax, qword [0x180230100]
xor rax, rsp
mov qword [rbp + 0x47], rax
xor edi, edi
mov qword [rbp - 0x51], rdi
lea r9, [rbp - 0x51]
xor r8d, r8d
xor edx, edx
lea rcx, [0x1801e6c40]
call sub.SHELL32.dll_SHGetKnownFolderPath
xorps xmm0, xmm0
movups xmmword [rbp - 0x19], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 9], xmm1
mov rdx, qword [rbp - 0x51]
mov r8, 0xffffffffffffffff
nop word [rax + rax]
inc r8
cmp word [rdx + r8*2], di
jne 0x1800c5520
lea rcx, [rbp - 0x19]
call fcn.18001bbd0
nop
mov rcx, qword [rbp - 0x51]
call qword [sym.imp.ole32.dll_CoTaskMemFree]
lea r8, str.CitizenFX_
lea rdx, [rbp - 0x19]
lea rcx, [rbp + 0x27]
call fcn.180098940
nop
lea r8, [rbp - 0x19]
cmp qword [rbp - 1], 7
cmova r8, qword [rbp - 0x19]
mov qword [rsp + 0x38], rdi
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rdi
xor edx, edx
mov ecx, 0xfde9
lea r9d, [rdx - 1]
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
movsxd rbx, eax
mov rdx, rbx
xor r8d, r8d
lea rcx, [rbp + 7]
call fcn.18000a0c0
nop
lea rdx, [rbp + 7]
cmp qword [rbp + 0x1f], 0xf
cmova rdx, qword [rbp + 7]
lea r8, [rbp - 0x19]
cmp qword [rbp - 1], 7
cmova r8, qword [rbp - 0x19]
mov qword [rsp + 0x38], rdi
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rdx
xor edx, edx
mov ecx, 0xfde9
lea r9d, [rdx - 1]
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [rbp - 0x41], edi
lea rdx, [rbp + 7]
lea rcx, [rbp - 0x39]
call fcn.18000a2f0
nop
mov rcx, qword [rbp - 0x29]
mov rdx, qword [rbp - 0x21]
mov rax, rdx
sub rax, rcx
cmp rax, 0xa
jb 0x1800c5630
lea rax, [rcx + 0xa]
mov qword [rbp - 0x29], rax
lea rbx, [rbp - 0x39]
cmp rdx, 0xf
cmova rbx, qword [rbp - 0x39]
add rbx, rcx
mov r8d, 0xa
lea rdx, str.ros_id.dat
mov rcx, rbx
call sub.VCRUNTIME140.dll_memmove
mov byte [rbx + 0xa], 0
jmp 0x1800c5653
mov qword [rsp + 0x20], 0xa
lea r9, str.ros_id.dat
movzx r8d, byte [rbp - 0x59]
mov edx, 0xa
lea rcx, [rbp - 0x39]
call fcn.18000d5d0
lea rdx, [rbp - 0x39]
cmp qword [rbp - 0x21], 0xf
cmova rdx, qword [rbp - 0x39]
lea r8, [0x1801e025c]
lea rcx, [rbp - 0x49]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
xor r8d, r8d
xor edx, edx
mov rcx, qword [rbp - 0x49]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
mov r9, qword [rbp - 0x49]
mov edx, 1
lea r8d, [rdx + 3]
lea rcx, [rbp - 0x41]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rcx, qword [rbp - 0x49]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
nop
mov rdx, qword [rbp - 0x21]
cmp rdx, 0xf
jbe 0x1800c56e1
inc rdx
mov rcx, qword [rbp - 0x39]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1800c56dc
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1800c56dc
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1800d084c
mov qword [rbp - 0x29], rdi
mov qword [rbp - 0x21], reloc.WS2_32.dll_ntohs
mov byte [rbp - 0x39], 0
mov rdx, qword [rbp + 0x1f]
cmp rdx, 0xf
jbe 0x1800c572f
inc rdx
mov rcx, qword [rbp + 7]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1800c572a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1800c572a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1800d084c
movdqa xmm0, xmmword [0x180212870]
movdqu xmmword [rbp + 0x17], xmm0
mov byte [rbp + 7], 0
mov rdx, qword [rbp + 0x3f]
cmp rdx, 7
jbe 0x1800c5784
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x27]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1800c577e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1800c577e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1800d084c
nop
mov rdx, qword [rbp - 1]
cmp rdx, 7
jbe 0x1800c57c7
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x19]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1800c57c2
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1800c57c2
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1800d084c
mov eax, 1
mov rcx, qword [rbp + 0x47]
xor rcx, rsp
call fcn.1800d08e0
lea r11, [rsp + 0xf0]
mov rbx, qword [r11 + 0x10]
mov rdi, qword [r11 + 0x18]
mov rsp, r11
pop rbp
ret