Function at 0x180010158
Capabilities:
Get common file path
Get system information on windows

Disassembly:
mov rax, rsp
mov dword [rax + 0x18], r8d
mov qword [rax + 0x10], rdx
mov qword [rax + 8], rcx
push rbp
push rbx
push rsi
push rdi
push r12
push r14
lea rbp, [rax - 0x9f8]
sub rsp, 0xac8
mov rcx, qword [0x18002aad8]
xor r12d, r12d
mov rsi, qword [0x180029f68]
test rcx, rcx
je 0x1800106dc
lea edx, [r12 + 8]
mov r8d, 0x1b18
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
je 0x1800106dc
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [rdi + 0x1660], eax
mov rcx, qword [0x180029f58]
call qword [rcx + 0x160]
add eax, dword [rdi + 0x1660]
lea rdx, [rdi + 0x668]
mov ecx, eax
call fcn.18001b86c
mov rax, qword [0x180029f58]
lea rbx, [rdi + 0x1664]
mov r8d, 0x105
mov rdx, rbx
xor ecx, ecx
call qword [rax + 0x258]
test eax, eax
je 0x180010213
mov rcx, rbx
call fcn.18000cd78
mov qword [rdi + 0x1878], rax
mov rax, qword [0x180029f58]
call qword [rax + 0x260]
mov rcx, rax
call fcn.1800131b0
mov qword [rdi + 0x110], rax
mov rcx, qword [rax]
call fcn.180013330
test eax, eax
je 0x180010247
mov dword [rdi + 0x218], 3
jmp 0x18001025c
call fcn.180013228
test eax, eax
mov ecx, r12d
setg cl
inc ecx
mov dword [rdi + 0x218], ecx
lea rcx, [rdi + 0x230]
call fcn.180013eac
mov qword [rdi + 0x220], rax
call fcn.180013df4
mov qword [rdi + 0x228], rax
lea r9, [rbp + 0xa08]
mov qword [rdi + 0x238], rsi
lea rax, [rbp + 0xa00]
mov qword [rsp + 0x30], rax
lea rsi, [rdi + 0x118]
mov dword [rbp + 0xa08], 0x80
lea rax, [rbp + 0xa10]
mov rdx, qword [rdi + 0x110]
mov r8, rsi
mov qword [rsp + 0x28], rax
xor ecx, ecx
lea rax, [rbp - 0x10]
mov dword [rbp + 0xa10], pe_nt_image_headers64
mov qword [rsp + 0x20], rax
mov rax, qword [0x180029f50]
mov rdx, qword [rdx]
call qword [rax + pe_nt_image_headers64]
test eax, eax
jne 0x1800102eb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rax, qword [0x180029f98]
mov ecx, 0x1000
call qword [rax + 0x78]
mov ecx, r12d
lea rbx, [rdi + 0x240]
test eax, eax
mov r8d, 0x104
mov rdx, rbx
setg cl
mov dword [rdi + 0x1870], ecx
cmp dword [0x180029f60], 2
mov rax, qword [0x180029f58]
jne 0x180010344
xor ecx, ecx
call qword [rax + 0x258]
test eax, eax
je 0x18001033a
cmp word [rbx], r12w
jne 0x180010363
mov rcx, rbx
call fcn.180010080
jmp 0x180010363
mov rcx, qword [rdi + 0x238]
call qword [rax + 0x258]
test eax, eax
je 0x18001035b
cmp word [rbx], r12w
jne 0x180010363
mov rcx, rbx
call fcn.18000ff1c
mov eax, dword [0x180029f60]
mov dword [rdi + 0xa0], eax
test rbx, rbx
je 0x180010383
mov rcx, rbx
call fcn.18000cd78
mov qword [rdi + 0x450], rax
mov rcx, rsi
call fcn.180012108
lea rsi, [rdi + 0xb0]
mov dword [rdi + 0xac], eax
mov rdx, rsi
mov ecx, eax
call fcn.180012034
lea r14, [rdi + 0xd0]
test rsi, rsi
je 0x1800103d7
mov dword [rsp + 0x28], 0x20
or r9d, 0xffffffff
mov r8, rsi
mov qword [rsp + 0x20], r14
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jle 0x1800103d7
cdqe
mov word [r14 + rax*2], r12w
movzx edx, word [rbx]
lea r10, [rdi + 0x458]
mov ecx, r12d
mov r8d, r12d
jmp 0x1800103fd
cmp dx, 0x5c
mov eax, r8d
cmovne eax, ecx
inc r8d
mov ecx, eax
movzx edx, word [rbx + r8*2]
test dx, dx
jne 0x1800103e9
mov r9d, r12d
test ecx, ecx
je 0x180010426
mov rdx, r10
mov r8d, ecx
mov r9d, ecx
movzx eax, word [rdx - 0x218]
mov word [rdx], ax
lea rdx, [rdx + 2]
sub r8, 1
jne 0x180010412
mov eax, r9d
mov edx, r12d
mov word [r10 + rax*2], r12w
test rsi, rsi
je 0x180010448
cmp byte [rsi], r12b
je 0x180010448
mov rax, rsi
inc rax
inc edx
cmp byte [rax], r12b
jne 0x18001043e
xor r8d, r8d
lea r14, [rdi + 0x102c]
mov rcx, rsi
call fcn.180013f88
mov ecx, eax
mov rdx, r14
call fcn.180012244
mov rax, qword [0x180029f58]
call qword [rax + 0x260]
mov rcx, rax
call fcn.1800133bc
movsx ecx, al
mov ebx, 0x9c
mov dword [rdi + 0x103c], ecx
mov r8d, ebx
mov rcx, rdi
xor edx, edx
call sub.msvcrt.dll_memset
mov rcx, rdi
mov dword [rdi], ebx
call qword [sym.imp.KERNEL32.dll_GetVersionExA]
mov rbx, qword [0x180029f58]
mov eax, r12d
mov dword [rbp + 0xa10], eax
cmp qword [rbx + 0xe8], r12
je 0x1800104d4
call qword [rbx + 0x260]
mov rcx, rax
lea rdx, [rbp + 0xa10]
call qword [rbx + 0xe8]
mov eax, dword [rbp + 0xa10]
mov dword [rdi + 0xa8], eax
test eax, eax
je 0x1800104e5
mov eax, 9
jmp 0x1800104f5
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
movzx eax, word [rsp + 0x40]
lea rsi, [rdi + 0x1040]
mov word [rdi + 0x9c], ax
mov rcx, rsi
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov ecx, 0x1622
call fcn.18000dae4
mov r9, qword [0x180029f58]
lea rdx, [rbp - 0x10]
mov r8d, 0x104
mov qword [rbp + 0xa18], rax
mov rcx, rax
mov rbx, rax
call qword [r9 + 0x1e0]
test eax, eax
jne 0x180010557
mov rax, qword [0x180029f58]
mov rdx, rsi
mov rcx, rbx
call qword [rax + 0x218]
lea rcx, [rbp + 0xa18]
call fcn.18000da80
mov rax, qword [0x180029f58]
lea rbx, [rdi + 0x1454]
mov r8d, 0x209
lea rcx, str.USERPROFILE
mov rdx, rbx
call qword [rax + 0x1e0]
test eax, eax
jne 0x1800105c5
lea rax, [0x1800243d0]
mov r9, rsi
lea r8, str._s_s
mov qword [rsp + 0x20], rax
mov edx, 0x105
mov rcx, rbx
call fcn.180010954
mov rax, qword [0x180029f58]
lea rcx, str.USERPROFILE
mov rdx, rbx
call qword [rax + 0x218]
mov rax, qword [0x180029f58]
lea rdx, [rdi + 0x124a]
mov r8d, 0x20a
lea rcx, str.TEMP
call qword [rax + 0x1e0]
test eax, eax
jne 0x180010601
mov rax, qword [0x180029f58]
lea rcx, str.TEMP
mov rdx, rbx
call qword [rax + 0x218]
mov rax, qword [0x180029f58]
lea rdx, [rsp + 0x70]
mov r8d, 0x40
lea rcx, str.SystemDrive
call qword [rax + 0x1e0]
test eax, eax
jne 0x18001063f
mov rax, qword [0x180029f58]
lea rdx, [0x1800243f4]
lea rcx, str.SystemDrive
call qword [rax + 0x218]
mov rax, qword [0x180029f58]
lea rcx, [rdi + 0x19c4]
lea rdx, [rbp + 0xa10]
mov dword [rbp + 0xa10], 0x7f
call qword [rax + 0x180]
mov edx, r12d
test r14, r14
je 0x18001067e
cmp byte [r14], r12b
je 0x18001067e
mov rax, r14
inc rax
inc edx
cmp byte [rax], r12b
jne 0x180010674
xor r8d, r8d
mov rcx, r14
call fcn.180013f88
mov ecx, eax
lea rdx, [rbp - 0x10]
call fcn.18001b86c
lea rdx, [rdi + 0x1880]
mov r8d, 0x20
lea rcx, [rbp - 0x10]
call fcn.18001b824
mov ecx, 1
lea rax, [rbp - 0x10]
lea rdx, [rdi + 0x18a0]
mov qword [rsp + 0x20], rax
lea r9d, [rcx + 0x1d]
lea r8d, [rcx + 0x13]
call fcn.18000cdc0
call fcn.18000fb24
mov dword [rdi + 0x18c0], eax
mov rax, rdi
jmp 0x1800106de
xor eax, eax
add rsp, 0xac8
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret