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

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
push rdi
sub rsp, 0x340
mov rax, qword [0x180042020]
xor rax, rsp
mov qword [rsp + 0x330], rax
mov rax, qword [rsp + 0x350]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [rsp + 0x350]
movzx eax, byte [rax + 0xb0]
test eax, eax
jne 0x1800047e1
mov dword [rsp + 0x100], reloc.OLEAUT32.dll_SafeArrayGetElement
mov dword [rsp + 0x110], 1
mov qword [rsp + 0x108], 0
mov rax, qword [rsp + 0x350]
movzx eax, byte [rax + 0xb1]
test eax, eax
jne 0x18000455a
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0xa0000000
mov dword [rsp + 0x20], 3
lea r9, [rsp + 0x100]
xor r8d, r8d
mov edx, 0xc0000000
mov rax, qword [rsp + 0x350]
mov rcx, qword [rax + 0x98]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rcx, qword [rsp + 0x350]
mov qword [rcx + 0xb8], rax
jmp 0x18000456d
mov rax, qword [rsp + 0x350]
mov qword [rax + 0xb8], 0xffffffffffffffff
mov rax, qword [rsp + 0x350]
cmp qword [rax + 0xb8], 0xffffffffffffffff
jne 0x1800047d2
mov ecx, 0x208
call fcn.180011040
mov qword [rsp + 0x70], rax
cmp qword [rsp + 0x70], 0
je 0x1800045bc
mov rax, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x70]
xor eax, eax
mov ecx, 0x208
rep stosb byte [rdi], al
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x88], rax
jmp 0x1800045c8
mov qword [rsp + 0x88], 0
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x40], rax
mov dword [rsp + 0xc0], 0
mov rax, qword [rsp + 0x350]
cmp qword [rax + 0x90], 0
je 0x180004636
mov rax, qword [rsp + 0x350]
mov eax, dword [rax + 0xb4]
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x350]
mov r9, qword [rax + 0x88]
mov rax, qword [rsp + 0x350]
mov r8, qword [rax + 0x90]
lea rdx, str._hsoutput__hs__lu.txt
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.USER32.dll_wsprintfW]
jmp 0x1800046a3
lea rax, [rsp + 0x120]
mov rdi, rax
xor eax, eax
mov ecx, 0x208
rep stosb byte [rdi], al
lea rdx, [rsp + 0x120]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x18000467d
lea r8, [rsp + 0x120]
lea rdx, str._lsglobal_apt_scenarios_output.txt
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.USER32.dll_wsprintfW]
jmp 0x1800046a3
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0xc8], rax
mov edx, 2
mov rcx, qword [rsp + 0xc8]
call fcn.1800109e0
xor eax, eax
jmp 0x180004b88
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
lea r9, [rsp + 0x100]
mov r8d, 3
mov edx, 4
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rcx, qword [rsp + 0x350]
mov qword [rcx + 0xb8], rax
mov rax, qword [rsp + 0x350]
cmp qword [rax + 0xb8], 0xffffffffffffffff
jne 0x1800047a2
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 1
lea r9, [rsp + 0x100]
mov r8d, 3
mov edx, 0x40000000
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rcx, qword [rsp + 0x350]
mov qword [rcx + 0xb8], rax
mov rax, qword [rsp + 0x350]
cmp qword [rax + 0xb8], 0xffffffffffffffff
jne 0x18000477f
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0xd0], rax
mov edx, 2
mov rcx, qword [rsp + 0xd0]
call fcn.1800109e0
xor eax, eax
jmp 0x180004b88
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x350]
call fcn.180003f40
mov rax, qword [rsp + 0x350]
mov byte [rax + 0xb1], 1
jmp 0x1800047b1
mov rax, qword [rsp + 0x350]
mov byte [rax + 0xb1], 1
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0xd8], rax
mov edx, 2
mov rcx, qword [rsp + 0xd8]
call fcn.1800109e0
jmp 0x1800047e1
mov rax, qword [rsp + 0x350]
mov byte [rax + 0xb0], 1
mov rax, qword [rsp + 0x350]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [rsp + 0x4c], 0
mov rax, qword [rsp + 0x350]
cmp qword [rax + 0xb8], 0xffffffffffffffff
je 0x180004b84
cmp qword [rsp + 0x358], 0
je 0x180004b49
lea rax, [rsp + 0x360]
mov qword [rsp + 0x78], rax
mov r9, qword [rsp + 0x78]
mov r8, qword [rsp + 0x358]
xor edx, edx
xor ecx, ecx
call fcn.1800012b0
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x50]
inc eax
mov eax, eax
mov qword [rsp + 0xe0], rax
mov eax, 2
mov rcx, qword [rsp + 0xe0]
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov qword [rsp + 0x90], rax
mov rcx, qword [rsp + 0x90]
call fcn.180011040
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
je 0x1800048e3
mov rdi, qword [rsp + 0x58]
xor eax, eax
mov rcx, qword [rsp + 0x90]
rep stosb byte [rdi], al
cmp qword [rsp + 0x58], 0
je 0x1800048c5
xor eax, eax
mov rcx, qword [rsp + 0x58]
mov word [rcx], ax
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x98], rax
jmp 0x1800048d1
mov qword [rsp + 0x98], 0
mov rax, qword [rsp + 0x98]
mov qword [rsp + 0xa0], rax
jmp 0x1800048ef
mov qword [rsp + 0xa0], 0
mov rax, qword [rsp + 0xa0]
mov qword [rsp + 0x68], rax
mov r8, qword [rsp + 0x78]
mov rdx, qword [rsp + 0x358]
mov rcx, qword [rsp + 0x68]
call fcn.1800013a0
mov qword [rsp + 0x78], 0
mov rax, qword [rsp + 0x350]
add rax, 0x28
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [rsp + 0x350]
cmp qword [rax + 0x80], 0
je 0x180004ace
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x350]
mov r9, qword [rax + 0x80]
lea r8, [0x18003b858]
xor edx, edx
xor ecx, ecx
call fcn.180003b50
mov dword [rsp + 0x48], eax
mov eax, dword [rsp + 0x48]
inc eax
mov eax, eax
mov qword [rsp + 0xe8], rax
mov eax, 2
mov rcx, qword [rsp + 0xe8]
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov qword [rsp + 0xa8], rax
mov rcx, qword [rsp + 0xa8]
call fcn.180011040
mov qword [rsp + 0x60], rax
cmp qword [rsp + 0x60], 0
je 0x180004a11
mov rdi, qword [rsp + 0x60]
xor eax, eax
mov rcx, qword [rsp + 0xa8]
rep stosb byte [rdi], al
cmp qword [rsp + 0x60], 0
je 0x1800049f3
xor eax, eax
mov rcx, qword [rsp + 0x60]
mov word [rcx], ax
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0xb0], rax
jmp 0x1800049ff
mov qword [rsp + 0xb0], 0
mov rax, qword [rsp + 0xb0]
mov qword [rsp + 0xb8], rax
jmp 0x180004a1d
mov qword [rsp + 0xb8], 0
mov rax, qword [rsp + 0xb8]
mov qword [rsp + 0x80], rax
mov eax, dword [rsp + 0x48]
mov rcx, qword [rsp + 0x68]
mov qword [rsp + 0x20], rcx
mov rcx, qword [rsp + 0x350]
mov r9, qword [rcx + 0x80]
lea r8, str._hs:_ls
mov edx, eax
mov rcx, qword [rsp + 0x80]
call fcn.180003b50
mov eax, dword [rsp + 0x48]
shl rax, 1
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x4c]
mov r8d, eax
mov rdx, qword [rsp + 0x80]
mov rax, qword [rsp + 0x350]
mov rcx, qword [rax + 0xb8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rax, qword [rsp + 0x350]
mov rcx, qword [rax + 0xb8]
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0xf0], rax
mov edx, 2
mov rcx, qword [rsp + 0xf0]
call fcn.1800109e0
jmp 0x180004b15
mov eax, dword [rsp + 0x50]
shl rax, 1
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x4c]
mov r8d, eax
mov rdx, qword [rsp + 0x68]
mov rax, qword [rsp + 0x350]
mov rcx, qword [rax + 0xb8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rax, qword [rsp + 0x350]
mov rcx, qword [rax + 0xb8]
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0xf8], rax
mov edx, 2
mov rcx, qword [rsp + 0xf8]
call fcn.1800109e0
mov rax, qword [rsp + 0x350]
add rax, 0x28
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rax, qword [rsp + 0x350]
movzx eax, byte [rax + 0xb1]
test eax, eax
je 0x180004b84
mov rax, qword [rsp + 0x350]
mov rcx, qword [rax + 0xb8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x350]
mov qword [rax + 0xb8], 0xffffffffffffffff
mov eax, dword [rsp + 0x4c]
mov rcx, qword [rsp + 0x330]
xor rcx, rsp
call fcn.1800109c0
add rsp, 0x340
pop rdi
ret