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

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
mov eax, 0x16f8
call fcn.1801907a0
sub rsp, rax
mov qword [rsp + 0x250], 0xfffffffffffffffe
mov rax, qword [rsp + 0x1700]
mov dword [rax + 0x20], 0
mov rax, qword [rsp + 0x1700]
mov rcx, rax
call fcn.1800736f0
mov rcx, qword [rsp + 0x1710]
call fcn.1800736f0
mov rax, qword [rsp + 0x1700]
movzx eax, byte [rax + 0x6e8]
test eax, eax
jne 0x1801631df
xor edx, edx
mov rcx, qword [rsp + 0x1700]
call fcn.180160230
movzx eax, al
test eax, eax
jne 0x1801631df
mov rax, qword [rsp + 0x1700]
mov dword [rax + 0x20], 0x1f
mov rax, qword [rsp + 0x1700]
lea rdx, [0x1803accc8]
mov rcx, rax
call fcn.1800736c0
xor al, al
jmp 0x180163e5e
mov qword [rsp + 0x88], 0
mov r8d, 0x30
xor edx, edx
lea rcx, [rsp + 0x288]
call fcn.18017d170
mov dword [rsp + 0x28c], 0
mov dword [rsp + 0x290], 1
mov dword [rsp + 0x294], 6
lea rcx, [rsp + 0x190]
call fcn.18007b600
nop
xor r8d, r8d
lea rdx, [rsp + 0x190]
mov rcx, qword [rsp + 0x1708]
call fcn.1801e7900
lea rcx, [rsp + 0x1b0]
call fcn.1800738f0
movzx eax, al
test eax, eax
je 0x18016326f
lea rdx, [0x1803acf04]
lea rcx, [rsp + 0x1b0]
call fcn.1800736c0
lea rcx, [rsp + 0x190]
call fcn.1800738f0
movzx eax, al
test eax, eax
je 0x1801632fd
mov rax, qword [rsp + 0x1700]
mov dword [rax + 0x20], 0x1f
mov r8, qword [rsp + 0x1708]
lea rdx, [0x1803acf48]
lea rcx, [rsp + 0x3e0]
call fcn.1801e9200
mov qword [rsp + 0x130], rax
mov rax, qword [rsp + 0x1700]
mov rdx, qword [rsp + 0x130]
mov rcx, rax
call fcn.1800732b0
lea rcx, [rsp + 0x3e0]
call fcn.180073360
xor eax, eax
test eax, eax
jne 0x1801632db
mov byte [rsp + 0x48], 0
lea rcx, [rsp + 0x190]
call fcn.1800984e0
movzx eax, byte [rsp + 0x48]
jmp 0x180163e5e
lea rcx, [rsp + 0x190]
call fcn.180073860
lea r9, [rsp + 0x88]
lea r8, [rsp + 0x288]
xor edx, edx
mov rcx, rax
mov rax, qword [rsp + 0x1700]
call qword [rax + 0x2b0]
test eax, eax
je 0x1801633cd
mov rax, qword [rsp + 0x1700]
call qword [rax + 0x2a8]
mov rcx, qword [rsp + 0x1700]
mov dword [rcx + 0x20], eax
lea rcx, [rsp + 0x190]
call fcn.180073860
mov r9, rax
mov rax, qword [rsp + 0x1700]
mov r8d, dword [rax + 0x20]
lea rdx, [0x1803acd80]
lea rcx, [rsp + 0x400]
call fcn.1801e9200
mov qword [rsp + 0xd8], rax
mov rax, qword [rsp + 0x1700]
mov rdx, qword [rsp + 0xd8]
mov rcx, rax
call fcn.1800732b0
lea rcx, [rsp + 0x400]
call fcn.180073360
xor eax, eax
test eax, eax
jne 0x1801633ab
mov byte [rsp + 0x49], 0
lea rcx, [rsp + 0x190]
call fcn.1800984e0
movzx eax, byte [rsp + 0x49]
jmp 0x180163e5e
lea rcx, [rsp + 0x168]
call fcn.180073040
nop
lea rcx, [rsp + 0xb0]
call fcn.1800740e0
nop
mov qword [rsp + 0x50], 0xffffffffffffffff
mov qword [rsp + 0x68], 0
mov dword [rsp + 0x40], 0
mov qword [rsp + 0xa8], 0
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x60], rax
jmp 0x18016342c
mov rax, qword [rsp + 0x60]
mov rax, qword [rax + 0x28]
mov qword [rsp + 0x60], rax
cmp qword [rsp + 0x60], 0
je 0x180163460
mov rax, qword [rsp + 0x60]
cmp qword [rax + 0x20], 0
je 0x18016345e
mov rax, qword [rsp + 0x60]
cmp dword [rax + 4], 2
jne 0x18016345e
mov rax, qword [rsp + 0x60]
mov rax, qword [rax + 0x20]
mov qword [rsp + 0xa8], rax
jmp 0x180163460
jmp 0x18016341e
cmp qword [rsp + 0xa8], 0
jne 0x18016348c
lea rcx, [rsp + 0x2d8]
call fcn.18017ca8c
lea rdx, [0x180396880]
lea rcx, [rsp + 0x2d8]
call fcn.180181900
mov r8d, 0x10
mov rdx, qword [rsp + 0xa8]
lea rcx, [rsp + 0x220]
call fcn.18017c210
cmp dword [rsp + 0x1d0], 0
je 0x1801634be
mov eax, dword [rsp + 0x1d0]
mov dword [rsp + 0x74], eax
jmp 0x1801634c6
mov dword [rsp + 0x74], 0x50
movzx ecx, word [rsp + 0x74]
mov rax, qword [rsp + 0x1700]
call qword [rax + 0x300]
mov word [rsp + 0x4c], ax
movzx eax, word [rsp + 0x4c]
mov word [rsp + 0x222], ax
mov rax, qword [rsp + 0x1700]
add rax, 0x6a8
mov rcx, rax
call fcn.180073860
mov qword [rsp + 0x158], rax
mov rcx, qword [rsp + 0x1700]
add rcx, 0x6c8
call fcn.180073860
mov qword [rsp + 0x160], rax
lea rcx, [rsp + 0x190]
call fcn.180073860
mov qword [rsp + 0x148], rax
lea rcx, [rsp + 0x1b0]
call fcn.180073860
mov rcx, qword [rsp + 0x158]
mov qword [rsp + 0x28], rcx
mov rcx, qword [rsp + 0x160]
mov qword [rsp + 0x20], rcx
mov rcx, qword [rsp + 0x148]
mov r9, rcx
mov r8, rax
lea rdx, [0x1803acf10]
lea rcx, [rsp + 0x1e0]
call fcn.1801e9200
mov qword [rsp + 0x270], rax
mov r8d, 6
mov edx, 1
mov ecx, 2
mov rax, qword [rsp + 0x1700]
call qword [rax + 0x2c0]
mov qword [rsp + 0xf8], rax
mov rax, qword [rsp + 0xf8]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
jae 0x1801635e7
lea rcx, [rsp + 0x350]
call fcn.18017ca8c
lea rdx, [0x180396880]
lea rcx, [rsp + 0x350]
call fcn.180181900
mov r8d, 0x10
lea rdx, [rsp + 0x220]
mov rcx, qword [rsp + 0x50]
mov rax, qword [rsp + 0x1700]
call qword [rax + 0x2c8]
mov dword [rsp + 0xa4], eax
cmp dword [rsp + 0xa4], 0
jge 0x18016363a
lea rcx, [rsp + 0x2f0]
call fcn.18017ca8c
lea rdx, [0x180396880]
lea rcx, [rsp + 0x2f0]
call fcn.180181900
lea rcx, [rsp + 0x1e0]
call fcn.180003ba0
mov qword [rsp + 0x140], rax
lea rcx, [rsp + 0x1e0]
call fcn.180073860
xor r9d, r9d
mov rcx, qword [rsp + 0x140]
mov r8d, ecx
mov rdx, rax
mov rcx, qword [rsp + 0x50]
mov rax, qword [rsp + 0x1700]
call qword [rax + 0x2d0]
mov dword [rsp + 0xa0], eax
lea rcx, [rsp + 0x1e0]
call fcn.180003ba0
cmp dword [rsp + 0xa0], eax
je 0x1801636be
lea rcx, [rsp + 0x308]
call fcn.18017ca8c
lea rdx, [0x180396880]
lea rcx, [rsp + 0x308]
call fcn.180181900
lea rdx, [rsp + 0x5e0]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
mov dword [rsp + 0x9c], eax
mov eax, dword [rsp + 0x9c]
mov dword [rsp + 0x78], eax
cmp dword [rsp + 0x78], 0
je 0x18016372d
cmp dword [rsp + 0x78], 0xf4
ja 0x18016372d
lea r9, [rsp + 0x4d0]
xor r8d, r8d
lea rdx, [0x1803acf6c]
lea rcx, [rsp + 0x5e0]
call qword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x18016372d
lea rdx, [rsp + 0x4d0]
lea rcx, [rsp + 0x168]
call fcn.180073420
lea rcx, [rsp + 0x168]
call fcn.1800738f0
movzx eax, al
test eax, eax
je 0x180163762
lea rcx, [rsp + 0x338]
call fcn.18017ca8c
lea rdx, [0x180396880]
lea rcx, [rsp + 0x338]
call fcn.180181900
lea rcx, [rsp + 0x168]
call fcn.180073860
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov r8d, 1
mov edx, 0xc0000000
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x108], rax
mov rax, qword [rsp + 0x108]
mov qword [rsp + 0x68], rax
cmp qword [rsp + 0x68], 0xffffffffffffffff
jne 0x1801637dd
lea rcx, [rsp + 0x368]
call fcn.18017ca8c
lea rdx, [0x180396880]
lea rcx, [rsp + 0x368]
call fcn.180181900
xor eax, eax
cmp eax, 1
je 0x1801638b7
xor r9d, r9d
mov r8d, 0x1000
lea rdx, [rsp + 0x6f0]
mov rcx, qword [rsp + 0x50]
mov rax, qword [rsp + 0x1700]
call qword [rax + 0x2d8]
mov dword [rsp + 0x94], eax
mov eax, dword [rsp + 0x94]
mov dword [rsp + 0x84], eax
cmp dword [rsp + 0x84], 0
jle 0x1801638b0
mov rax, qword [rsp + 0xb8]
mov qword [rsp + 0x120], rax
mov rax, qword [rsp + 0x120]
mov qword [rsp + 0xc8], rax
lea rdx, [rsp + 0xb0]
lea rcx, [rsp + 0xc8]
call fcn.180001220
mov rax, qword [rsp + 0xc8]
mov qword [rsp + 0x118], rax
movsxd rax, dword [rsp + 0x84]
lea rax, [rsp + rax + 0x6f0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x6f0]
mov r8, qword [rsp + 0x118]
lea rdx, [rsp + 0x278]
lea rcx, [rsp + 0xb0]
call fcn.180163e70
jmp 0x1801638b2
jmp 0x1801638b7
jmp 0x1801637dd
xor eax, eax
test eax, eax
jne 0x1801638b7
xor edx, edx
lea rcx, [rsp + 0xb0]
call fcn.180074b40
mov qword [rsp + 0x128], rax
mov rax, qword [rsp + 0x128]
mov qword [rsp + 0x58], rax
lea rcx, [rsp + 0x58]
call fcn.1801602f0
mov dword [rsp + 0x98], eax
mov eax, dword [rsp + 0x98]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0xc8
je 0x18016393c
cmp dword [rsp + 0x40], 0x12d
je 0x18016393c
cmp dword [rsp + 0x40], 0x12e
je 0x18016393c
lea rcx, [rsp + 0x3c8]
call fcn.18017ca8c
lea rdx, [0x180396880]
lea rcx, [rsp + 0x3c8]
call fcn.180181900
lea rcx, [rsp + 0x230]
call fcn.180073040
mov qword [rsp + 0x268], rax
cmp qword [rsp + 0x58], 0
je 0x180163b50
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x200]
call fcn.1801603b0
mov qword [rsp + 0x280], rax
lea rcx, [rsp + 0x200]
call fcn.1800738f0
movzx eax, al
test eax, eax
je 0x18016399d
lea rcx, [rsp + 0x200]
call fcn.180073360
jmp 0x180163b50
cmp dword [rsp + 0x40], 0x12d
je 0x1801639b5
cmp dword [rsp + 0x40], 0x12e
jne 0x180163aee
lea rcx, [rsp + 0x460]
call fcn.180075ce0
mov qword [rsp + 0x258], rax
mov r8d, 0x100
lea rdx, [0x1803acce0]
lea rcx, [rsp + 0x2b8]
call fcn.180076030
mov qword [rsp + 0x260], rax
lea rcx, [rsp + 0x200]
call fcn.180073860
xor r9d, r9d
lea r8, [rsp + 0x2b8]
lea rdx, [rsp + 0x460]
mov rcx, rax
call fcn.180083780
mov byte [rsp + 0x4a], al
movzx eax, byte [rsp + 0x4a]
test eax, eax
je 0x180163ad3
mov edx, 1
lea rcx, [rsp + 0x460]
call fcn.180075d50
mov qword [rsp + 0x138], rax
mov edx, 1
lea rcx, [rsp + 0x460]
call fcn.180075d50
mov qword [rsp + 0xd0], rax
mov edx, 1
lea rcx, [rsp + 0x460]
call fcn.180075d50
mov qword [rsp + 0x150], rax
mov rax, qword [rsp + 0x138]
mov rcx, qword [rsp + 0xd0]
mov rcx, qword [rcx]
mov rax, qword [rax + 8]
sub rax, rcx
mov r8, rax
mov rax, qword [rsp + 0x150]
mov rdx, qword [rax]
lea rcx, [rsp + 0x440]
call fcn.180073080
mov qword [rsp + 0xe8], rax
mov rdx, qword [rsp + 0xe8]
lea rcx, [rsp + 0x230]
call fcn.180073190
lea rcx, [rsp + 0x440]
call fcn.180073360
nop
lea rcx, [rsp + 0x2b8]
call fcn.1800760c0
nop
lea rcx, [rsp + 0x460]
call fcn.180005390
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x420]
call fcn.1801603b0
mov qword [rsp + 0xf0], rax
mov rcx, qword [rsp + 0xf0]
call fcn.1800738f0
mov byte [rsp + 0x47], al
lea rcx, [rsp + 0x420]
call fcn.180073360
movzx eax, byte [rsp + 0x47]
test eax, eax
je 0x180163b3e
lea rcx, [rsp + 0x200]
call fcn.180073360
jmp 0x180163b50
lea rcx, [rsp + 0x200]
call fcn.180073360
jmp 0x180163951
cmp dword [rsp + 0x40], 0x12d
je 0x180163b68
cmp dword [rsp + 0x40], 0x12e
jne 0x180163c6b
lea rcx, [rsp + 0x230]
call fcn.1800738f0
movzx eax, al
test eax, eax
jne 0x180163c4a
cmp dword [rsp + 0x1718], 2
jge 0x180163c29
mov eax, dword [rsp + 0x1718]
inc eax
mov dword [rsp + 0x90], eax
lea rcx, [rsp + 0x230]
call fcn.180073860
mov ecx, dword [rsp + 0x90]
mov r9d, ecx
mov r8, qword [rsp + 0x1710]
mov rdx, rax
mov rcx, qword [rsp + 0x1700]
call fcn.180163130
mov byte [rsp + 0x45], al
movzx eax, byte [rsp + 0x45]
mov byte [rsp + 0x46], al
lea rcx, [rsp + 0x230]
call fcn.180073360
nop
lea rcx, [rsp + 0x1e0]
call fcn.180073360
nop
lea rcx, [rsp + 0xb0]
call fcn.180074b00
nop
lea rcx, [rsp + 0x168]
call fcn.180073360
nop
lea rcx, [rsp + 0x190]
call fcn.1800984e0
movzx eax, byte [rsp + 0x46]
jmp 0x180163e5e
lea rcx, [rsp + 0x3b0]
call fcn.18017ca8c
lea rdx, [0x180396880]
lea rcx, [rsp + 0x3b0]
call fcn.180181900
lea rcx, [rsp + 0x398]
call fcn.18017ca8c
lea rdx, [0x180396880]
lea rcx, [rsp + 0x398]
call fcn.180181900
cmp qword [rsp + 0x58], 0
jne 0x180163c94
lea rcx, [rsp + 0x320]
call fcn.18017ca8c
lea rdx, [0x180396880]
lea rcx, [rsp + 0x320]
call fcn.180181900
mov dword [rsp + 0x7c], 0
xor edx, edx
lea rcx, [rsp + 0xb0]
call fcn.180074b40
mov qword [rsp + 0x100], rax
mov rax, qword [rsp + 0x100]
mov rcx, qword [rsp + 0x58]
sub rcx, rax
mov rax, rcx
mov qword [rsp + 0x110], rax
lea rcx, [rsp + 0xb0]
call fcn.180074b20
mov rcx, qword [rsp + 0x110]
sub rax, rcx
mov dword [rsp + 0x80], eax
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x7c]
mov r8d, dword [rsp + 0x80]
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x180163d24
mov eax, dword [rsp + 0x80]
cmp dword [rsp + 0x7c], eax
je 0x180163d45
lea rcx, [rsp + 0x380]
call fcn.18017ca8c
lea rdx, [0x180396880]
lea rcx, [rsp + 0x380]
call fcn.180181900
lea rdx, [rsp + 0x168]
mov rcx, qword [rsp + 0x1710]
call fcn.180073380
nop
lea rcx, [rsp + 0x230]
call fcn.180073360
nop
lea rcx, [rsp + 0x1e0]
call fcn.180073360
nop
jmp 0x180163d79
cmp qword [rsp + 0x68], 0
je 0x180163d94
cmp qword [rsp + 0x68], 0xffffffffffffffff
je 0x180163d94
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp qword [rsp + 0x50], 0
jb 0x180163daf
mov rcx, qword [rsp + 0x50]
mov rax, qword [rsp + 0x1700]
call qword [rax + 0x2f0]
cmp qword [rsp + 0x88], 0
je 0x180163dd0
mov rcx, qword [rsp + 0x88]
mov rax, qword [rsp + 0x1700]
call qword [rax + 0x2b8]
mov rcx, qword [rsp + 0x1710]
call fcn.1800738f0
movzx eax, al
test eax, eax
je 0x180163e01
mov rax, qword [rsp + 0x1700]
cmp dword [rax + 0x20], 0
jne 0x180163e01
mov rax, qword [rsp + 0x1700]
mov dword [rax + 0x20], 0x1f
mov rcx, qword [rsp + 0x1710]
call fcn.1800738f0
movzx eax, al
test eax, eax
jne 0x180163e1f
mov dword [rsp + 0x70], 1
jmp 0x180163e27
mov dword [rsp + 0x70], 0
movzx eax, byte [rsp + 0x70]
mov byte [rsp + 0x44], al
lea rcx, [rsp + 0xb0]
call fcn.180074b00
nop
lea rcx, [rsp + 0x168]
call fcn.180073360
nop
lea rcx, [rsp + 0x190]
call fcn.1800984e0
movzx eax, byte [rsp + 0x44]
add rsp, 0x16f8
ret