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

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rdx
mov qword [rax + 0x18], r8
mov qword [rax + 0x20], r9
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x1c8]
sub rsp, 0x288
mov rax, qword [0x14003a020]
xor rax, rsp
mov qword [rbp + 0x170], rax
mov r14, rcx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
or rdi, 0xffffffffffffffff
xor r12d, r12d
lea r15d, [rdi + 3]
cmp byte [r14 + 0xb0], r12b
jne 0x14000228b
lea esi, [rdi + 4]
mov dword [rsp + 0x48], 0x18
mov dword [rsp + 0x58], 1
mov qword [rsp + 0x50], r12
cmp byte [r14 + 0xb1], r12b
jne 0x140002151
mov rcx, qword [r14 + 0x98]
lea r9, [rsp + 0x48]
mov qword [rsp + 0x30], r12
xor r8d, r8d
mov dword [rsp + 0x28], 0xa0000000
mov edx, 0xc0000000
mov dword [rsp + 0x20], esi
call qword [sym.imp.KERNEL32.dll_CreateFileA]
jmp 0x140002154
mov rax, rdi
mov qword [r14 + 0xb8], rax
cmp rax, rdi
jne 0x140002283
mov r13d, 0x208
mov ecx, r13d
call fcn.140008e20
mov r8d, r13d
xor edx, edx
mov rcx, rax
mov rbx, rax
call fcn.14000b250
mov r8, qword [r14 + 0x90]
test r8, r8
je 0x1400021b2
mov ecx, dword [r14 + 0xb4]
lea rdx, [0x140033eb0]
mov r9, qword [r14 + 0x88]
mov dword [rsp + 0x20], ecx
mov rcx, rbx
call qword [sym.imp.USER32.dll_wsprintfW]
jmp 0x1400021ea
mov r8, r13
lea rcx, [rsp + 0x60]
xor edx, edx
call fcn.14000b250
lea rdx, [rsp + 0x60]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
mov rcx, rbx
test eax, eax
je 0x140002256
lea r8, [rsp + 0x60]
lea rdx, [0x140033ee0]
call qword [sym.imp.USER32.dll_wsprintfW]
mov r13d, 0x80
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], r13d
lea r9, [rsp + 0x48]
mov r8d, esi
mov dword [rsp + 0x20], esi
mov rcx, rbx
lea edx, [r13 - 0x7c]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [r14 + 0xb8], rax
cmp rax, rdi
jne 0x14000226d
mov qword [rsp + 0x30], r12
lea r9, [rsp + 0x48]
mov dword [rsp + 0x28], r13d
mov r8d, esi
mov edx, 0x40000000
mov dword [rsp + 0x20], 1
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [r14 + 0xb8], rax
cmp rax, rdi
jne 0x140002265
mov rcx, rbx
mov rdx, r15
call fcn.1400088f0
xor eax, eax
jmp 0x140002465
mov rdx, rbx
call fcn.140001d10
mov al, 1
mov rdx, r15
mov rcx, rbx
mov byte [r14 + 0xb1], al
call fcn.1400088f0
jmp 0x14000228b
mov byte [r14 + 0xb0], 1
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [rsp + 0x40], r12d
cmp qword [r14 + 0xb8], rdi
je 0x140002461
mov rbx, qword [rbp + 0x1d8]
test rbx, rbx
je 0x140002444
lea r13, [rbp + 0x1e0]
call fcn.140001250
mov qword [rsp + 0x28], r13
mov r9, rbx
xor r8d, r8d
mov qword [rsp + 0x20], r12
xor edx, edx
mov rdi, rax
mov rcx, qword [rax]
or rcx, 1
call fcn.1400140dc
mov esi, eax
or eax, 0xffffffff
test esi, esi
cmovs esi, eax
mov rax, r15
lea edx, [rsi + 1]
mul rdx
mov rbx, rax
mov rax, 0xffffffffffffffff
cmovo rbx, rax
mov rcx, rbx
call fcn.140008e20
mov r8, rbx
xor edx, edx
mov rcx, rax
mov r12, rax
call fcn.14000b250
xor ebx, ebx
mov qword [rsp + 0x28], r13
mov word [r12], bx
or r8, 0xffffffffffffffff
mov r9, qword [rbp + 0x1d8]
mov rdx, r12
mov rcx, qword [rdi]
mov qword [rsp + 0x20], rbx
call fcn.1400140dc
lea rcx, [r14 + 0x28]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r9, qword [r14 + 0x80]
test r9, r9
je 0x1400023fd
lea r8, [0x140033f28]
mov qword [rsp + 0x20], r12
xor edx, edx
xor ecx, ecx
call fcn.140001ba0
mov esi, eax
mov rax, r15
lea edx, [rsi + 1]
mul rdx
mov rbx, rax
mov rax, 0xffffffffffffffff
cmovo rbx, rax
mov rcx, rbx
call fcn.140008e20
mov r8, rbx
xor edx, edx
mov rcx, rax
mov rdi, rax
call fcn.14000b250
xor ebx, ebx
mov qword [rsp + 0x20], r12
mov word [rdi], bx
lea r8, [0x140033f28]
mov r9, qword [r14 + 0x80]
mov edx, esi
mov rcx, rdi
call fcn.140001ba0
mov rcx, qword [r14 + 0xb8]
lea r8d, [rsi + rsi]
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], rbx
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [r14 + 0xb8]
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov rdx, r15
mov rcx, rdi
call fcn.1400088f0
jmp 0x140002428
mov rcx, qword [r14 + 0xb8]
lea r8d, [rsi + rsi]
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], rbx
mov rdx, r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [r14 + 0xb8]
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov rdx, r15
mov rcx, r12
call fcn.1400088f0
lea rcx, [r14 + 0x28]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor r12d, r12d
or rdi, 0xffffffffffffffff
cmp byte [r14 + 0xb1], r12b
je 0x140002461
mov rcx, qword [r14 + 0xb8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [r14 + 0xb8], rdi
mov eax, dword [rsp + 0x40]
mov rcx, qword [rbp + 0x170]
xor rcx, rsp
call fcn.1400088d0
add rsp, 0x288
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret