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

Disassembly:
mov rax, rsp
mov qword [rax + 8], rcx
push rbp
push rdi
lea rbp, [rax - 0x1e8]
sub rsp, 0x2d8
mov qword [rax + 0x10], rbx
xor edi, edi
mov qword [rax + 0x18], rsi
mov rsi, rdx
mov qword [rax + 0x20], r12
mov r12, r9
mov qword [rax - 0x18], r13
mov r13, r8
mov qword [rax - 0x20], r14
mov r14, rcx
mov qword [rax - 0x28], r15
mov r15d, dword [rbp + 0x210]
mov qword [rsp + 0x48], rdi
mov dword [rsp + 0x44], 0x10
mov dword [rsp + 0x40], edi
mov qword [rsp + 0x68], rdi
mov dword [rsp + 0x64], 0x10
mov dword [rsp + 0x60], edi
test r15b, 2
je 0x140022fc3
lea rdx, [rbp + 0xb0]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
lea r9, [rbp - 0x60]
xor r8d, r8d
lea rdx, [0x1400d59d4]
lea rcx, [rbp + 0xb0]
call qword [sym.imp.KERNEL32.dll_GetTempFileNameA]
mov rbx, 0xffffffffffffffff
lea rax, [rbp - 0x60]
mov r8, rbx
nop dword [rax + rax]
inc r8
cmp byte [rax + r8], dil
jne 0x140022dd0
lea rdx, [rbp - 0x60]
lea rcx, [rsp + 0x60]
call fcn.140032320
xor edx, edx
lea rax, [rbp + 0x210]
lea rcx, [rbp - 0x60]
mov qword [rsp + 0x20], rax
lea r9d, [rdx + 1]
lea r8d, [rdx + 2]
call fcn.140024d20
mov r14, rax
test rax, rax
jne 0x140022e30
mov rax, qword [rbp + 0x218]
test rax, rax
je 0x140023089
mov dword [rax], 0xc
jmp 0x140023089
inc rbx
cmp byte [rsi + rbx], dil
jne 0x140022e30
test r15b, 4
je 0x140022ef1
mov dword [rsp + 0x78], ebx
lea rdx, [rsp + 0x78]
bts ebx, 0x1e
mov qword [rbp - 0x80], rsi
lea rcx, [rbp - 0x78]
mov dword [rsp + 0x7c], ebx
call fcn.14002eae0
mov eax, dword [rsp + 0x7c]
shr eax, 0x1f
test al, al
je 0x140022e75
mov rcx, qword [rbp - 0x80]
call fcn.14006bcf0
test r15b, 0x10
je 0x140022ea8
mov rcx, qword [r14]
lea r9, [rsp + 0x58]
mov r8d, 2
mov word [rbp + 0x210], 0xfeff
lea rdx, [rbp + 0x210]
mov dword [rsp + 0x58], edi
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
lea rcx, [rbp - 0x78]
call fcn.140033860
mov rbx, rax
lea rcx, [rbp - 0x78]
add rbx, rbx
call fcn.140033830
mov rcx, qword [r14]
lea r9, [rbp + 0x210]
mov r8d, ebx
mov dword [rbp + 0x210], edi
mov rdx, rax
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rbp - 0x78]
test rcx, rcx
je 0x140022f12
call fcn.14006bcf0
jmp 0x140022f12
mov rcx, qword [rax]
lea r9, [rbp + 0x210]
mov r8d, ebx
mov dword [rbp + 0x210], edi
mov rdx, rsi
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [r14]
cmp rcx, 0xffffffffffffffff
je 0x140022f27
cmp byte [r14 + 0x11], dil
jne 0x140022f27
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [r14 + 8]
test rbx, rbx
je 0x140022f46
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, 8
mov rcx, rbx
call fcn.1400387c8
mov edx, 0x18
mov rcx, r14
call fcn.1400387c8
lea rdx, [0x1400d59d8]
lea rcx, [rsp + 0x40]
call fcn.140032300
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x40]
call fcn.140032420
xor r8d, r8d
lea rcx, [rsp + 0x40]
mov dl, 0x20
call fcn.1400334d0
cmp rax, 0xffffffffffffffff
je 0x140022fa9
mov r8b, 0x22
lea rcx, [rsp + 0x40]
xor edx, edx
call fcn.1400328f0
mov r8d, 1
lea rcx, [rsp + 0x40]
mov dl, 0x22
call fcn.140032510
test dword [rsp + 0x44], 0x40000000
lea rsi, [rsp + 0x48]
mov r14, qword [rbp + 0x1f0]
cmovne rsi, qword [rsp + 0x48]
mov edx, 1
lea r8, str.C:JenkinsworkspaceBeefBeefySysLibplatformwinPlatform.cpp
mov r9d, 0x7b5
lea ecx, [rdx + 0x47]
call fcn.1400387a8
mov rbx, rax
test rax, rax
je 0x14002300b
mov qword [rax + 8], rdi
mov dword [rax + 4], 0x10
mov dword [rax], edi
mov qword [rax + 0x18], rdi
mov dword [rax + 0x20], edi
mov qword [rax + 0x28], rdi
mov qword [rax + 0x30], rdi
mov qword [rax + 0x38], rdi
mov byte [rax + 0x40], dil
jmp 0x14002300e
mov rbx, rdi
mov rax, qword [rbp + 0x218]
mov r9, r13
mov qword [rsp + 0x30], rax
mov r8, rsi
mov dword [rsp + 0x28], r15d
mov rdx, r14
mov qword [rsp + 0x20], r12
mov rcx, rbx
test r15b, 0x20
je 0x14002303d
call fcn.14002a290
jmp 0x140023042
call fcn.140029a90
test al, al
jne 0x14002305a
test rbx, rbx
je 0x140023089
mov edx, 1
mov rcx, rbx
call fcn.14002a670
jmp 0x140023089
lea rax, [rsp + 0x60]
cmp rax, rbx
je 0x140023086
mov dword [rbx], edi
lea rdx, [rsp + 0x68]
test dword [rsp + 0x64], 0x40000000
mov rcx, rbx
movsxd r8, dword [rsp + 0x60]
cmovne rdx, qword [rsp + 0x68]
call fcn.140032320
mov rdi, rbx
mov ecx, dword [rsp + 0x64]
mov r15, qword [rsp + 0x2c0]
mov r14, qword [rsp + 0x2c8]
mov r13, qword [rsp + 0x2d0]
mov r12, qword [rsp + 0x308]
mov rsi, qword [rsp + 0x300]
mov rbx, qword [rsp + 0x2f8]
shr ecx, 0x1f
test cl, cl
je 0x1400230ce
mov rcx, qword [rsp + 0x68]
call fcn.14006bcf0
mov ecx, dword [rsp + 0x44]
shr ecx, 0x1f
test cl, cl
je 0x1400230e3
mov rcx, qword [rsp + 0x48]
call fcn.14006bcf0
mov rax, rdi
add rsp, 0x2d8
pop rdi
pop rbp
ret