Function at 0x14001830c
Capabilities:
Get common file path
Get comspec environment variable
Get hostname
Get keyboard layout
Get session user name
Query environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x338]
sub rsp, 0x400
mov rbx, rcx
mov r12, rdx
xor r15d, r15d
lea rcx, [rsp + 0x30]
mov edx, 0x104
movaps xmmword [rax - 0x48], xmm6
mov r14, r8
mov word [rbp], r15w
call fcn.140015394
mov r13, qword [r12]
mov edi, r15d
lea rsi, str.ERROR
mov rcx, qword [rsi]
mov rdx, r13
call fcn.140026718
mov r8d, 1
test eax, eax
je 0x140018386
lea rax, case.0x14004a93d.0
add rsi, 8
add edi, r8d
cmp rsi, rax
jl 0x14001835e
cmp edi, 0x61
je 0x14009002c
cmp edi, 0x60
ja case.0x1400183a8.88
lea rdx, [0x140000000]
movsxd rax, edi
mov ecx, dword [rdx + rax*4 + 0x1851c]
add rcx, rdx
jmp rcx
lea rdx, [rbx + 0x190]
mov rcx, r14
call fcn.14001787c
lea rcx, [rsp + 0x30]
call fcn.14000fef0
lea r11, [rsp + 0x400]
mov eax, r15d
mov rbx, qword [r11 + 0x40]
movaps xmm6, xmmword [r11 - 0x10]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea rdx, reloc.WSOCK32.dll_inet_addr
mov rcx, r14
call fcn.140006cd8
jmp case.0x1400183a8.88
lea rdx, [rbx + 0x170]
jmp 0x1400183b1
mov rcx, r14
call fcn.140009550
mov eax, 1
mov dword [r14], eax
mov dword [r14 + 0x10], eax
jmp case.0x1400183a8.88
lea rdx, [0x1400c7bc4]
jmp 0x1400183ed
lea rdx, [0x1400c7144]
jmp 0x1400183ed
lea rdx, reloc.WSOCK32.dll_htons
jmp 0x1400183ed
mov ecx, reloc.OLEAUT32.dll_SafeArrayDestroyData
jmp 0x1400902c9
mov ecx, 0x2b
jmp 0x1400902c9
mov ecx, 5
jmp 0x1400902c9
mov ecx, SafeArrayRedim
jmp 0x1400902c9
mov ecx, 0x19
jmp 0x1400902c9
mov ecx, 0x2e
jmp 0x1400902c9
mov ecx, reloc.OLEAUT32.dll_CreateStdDispatch
jmp 0x1400902c9
mov ecx, reloc.WSOCK32.dll_socket
jmp 0x1400902c9
mov ecx, SafeArrayGetElement
jmp 0x1400902c9
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetElement
jmp 0x1400902c9
mov ecx, RegisterActiveObject
jmp 0x1400902c9
mov ecx, 0x1a
jmp 0x1400902c9
mov ecx, reloc.WSOCK32.dll_recv
jmp 0x1400902c9
mov ecx, 6
jmp 0x1400902c9
mov ecx, 2
jmp 0x1400902c9
mov ecx, reloc.WSOCK32.dll_inet_ntoa
jmp 0x1400902c9
mov rcx, r14
jmp 0x14009047c
lea rdx, [rbx + 0x150]
jmp 0x1400183b1
lea rdx, str.WIN32_NT
jmp 0x1400183ed
mov ecx, r8d
jmp 0x140090796
mov ecx, 2
jmp 0x140090796
mov ecx, 3
jmp 0x140090796
lea rdx, [rbx + 0x248]
jmp 0x1400183b1
lea rdx, [0x1400c7b68]
lea rcx, [rbp - 0x50]
call fcn.140006d50
lea rcx, [rbp - 0x50]
mov rdx, r12
mov dword [rbp + 0x358], r15d
call fcn.140011dd0
lea r9, [rbp + 0x358]
lea r8, [rsp + 0x50]
lea rdx, [rbp - 0x50]
mov dword [rsp + 0x20], r15d
call fcn.140006c0c
mov rdx, qword [rsp + 0x50]
test rdx, rdx
jne 0x140090079
or r15d, 0xffffffff
jmp 0x140090081
mov rcx, r14
call fcn.14000f774
lea rcx, [rbp - 0x50]
jmp 0x1400901b0
mov rax, qword [rbx]
movsxd rcx, dword [rax + 4]
add rcx, 8
add rcx, rbx
call fcn.140017848
mov ebx, dword [rax + 0x1c]
jmp 0x1400900a8
mov ebx, dword [rbx + 0x244]
mov rcx, r14
call fcn.140009550
mov dword [r14 + 0x10], 1
mov dword [r14], ebx
jmp case.0x1400183a8.88
mov rax, qword [rbx]
movsxd rcx, dword [rax + 4]
add rcx, 8
add rcx, rbx
call fcn.140017848
mov rcx, r14
lea rdx, [rax + 0x28]
call fcn.14000f774
nop
jmp case.0x1400183a8.88
lea rcx, [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx r8d, word [rbp - 0x7a]
lea rdx, str._.3d
jmp 0x140090119
lea rcx, [rbp - 0x28]
call fcn.14006cff4
mov rcx, rax
call fcn.14006cf3c
lea rdx, [0x1400c6e68]
mov r8d, eax
lea rcx, [rbp]
call fcn.140026864
jmp 0x14009013f
lea rdx, [rbp + 0x348]
lea rcx, [rbp]
mov dword [rbp + 0x348], 0x104
call qword [sym.imp.ADVAPI32.dll_GetUserNameW]
lea rdx, [rbp]
jmp 0x1400183ed
lea rcx, [rbp + 0x358]
call fcn.14006cff4
lea r8, [0x1400c7bdc]
lea rdx, [rbp + 0x2d0]
mov rcx, rax
call fcn.14006cec4
mov rcx, r14
mov rdx, rax
call fcn.14001787c
lea rcx, [rbp + 0x2d0]
jmp 0x1400901b0
lea rcx, [rsp + 0x68]
call fcn.14006cff4
lea r8, [0x1400c7c04]
lea rdx, [rbp + 0x290]
mov rcx, rax
call fcn.14006cec4
mov rcx, r14
mov rdx, rax
call fcn.14001787c
lea rcx, [rbp + 0x290]
call fcn.14000fef0
nop
jmp case.0x1400183a8.88
lea rcx, [rsp + 0x50]
call fcn.14006cff4
lea r8, [0x1400c7be4]
lea rdx, [rbp + 0x210]
mov rcx, rax
call fcn.14006cec4
mov rcx, r14
mov rdx, rax
call fcn.14001787c
lea rcx, [rbp + 0x210]
jmp 0x1400901b0
lea rcx, [rbp - 0x18]
call fcn.14006cff4
lea r8, [0x1400c7bec]
lea rdx, [rbp + 0x2b0]
mov rcx, rax
call fcn.14006cec4
mov rcx, r14
mov rdx, rax
call fcn.14001787c
lea rcx, [rbp + 0x2b0]
jmp 0x1400901b0
lea rcx, [rbp - 0x10]
call fcn.14006cff4
lea r8, [0x1400c6e68]
lea rdx, [rbp + 0x270]
mov rcx, rax
call fcn.14006cec4
mov rcx, r14
mov rdx, rax
call fcn.14001787c
lea rcx, [rbp + 0x270]
jmp 0x1400901b0
lea rcx, [rbp - 0x20]
call fcn.14006cff4
lea r8, [0x1400c7bf4]
lea rdx, [rbp + 0x230]
mov rcx, rax
call fcn.14006cec4
mov rcx, r14
mov rdx, rax
call fcn.14001787c
lea rcx, [rbp + 0x230]
jmp 0x1400901b0
lea rcx, [rbp - 0x30]
call fcn.14006cff4
lea r8, [0x1400c7bfc]
lea rdx, [rbp + 0x250]
mov rcx, rax
call fcn.14006cec4
mov rcx, r14
mov rdx, rax
call fcn.14001787c
lea rcx, [rbp + 0x250]
jmp 0x1400901b0
mov ecx, 7
lea rdx, [rsp + 0x30]
call fcn.1400507c4
lea rdx, [rsp + 0x30]
jmp 0x1400183b1
lea rdx, [rbp + 0x348]
lea rcx, [rbp]
mov dword [rbp + 0x348], 0x104
call qword [sym.imp.KERNEL32.dll_GetComputerNameW]
jmp 0x14009013f
lea rcx, [rbp]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je case.0x1400183a8.88
jmp 0x14009013f
mov rax, qword [0x1400dcff8]
cmp byte [rax + 0x40], r15b
je 0x140090353
lea rcx, [rsp + 0x78]
mov qword [rsp + 0x78], r15
mov qword [rbp - 0x78], r15
call fcn.14006ce9c
lea rcx, [rbp]
mov edx, 0x104
call rax
lea rcx, [rsp + 0x78]
call fcn.140001a10
jmp 0x14009013f
lea rcx, [rbp]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x14009013f
mov rcx, r14
call fcn.140009550
mov dword [r14 + 0x10], 1
mov dword [r14], 6
jmp case.0x1400183a8.88
mov rcx, r14
call fcn.140009550
mov dword [r14 + 0x10], 1
mov dword [r14], 3
jmp case.0x1400183a8.88
mov rcx, r14
call fcn.140009550
mov dword [r14 + 0x10], 1
mov dword [r14], 9
jmp case.0x1400183a8.88
mov rcx, r14
call fcn.140009550
mov dword [r14 + 0x10], 1
mov dword [r14], 5
jmp case.0x1400183a8.88
mov rcx, r14
call fcn.140009550
mov dword [r14 + 0x10], 1
mov dword [r14], 0xa
jmp case.0x1400183a8.88
mov rcx, r14
call fcn.140009550
mov dword [r14 + 0x10], 1
mov dword [r14], 2
jmp case.0x1400183a8.88
mov rcx, r14
call fcn.140009550
mov dword [r14 + 0x10], 1
mov dword [r14], 7
jmp case.0x1400183a8.88
mov rcx, r14
call fcn.140009550
mov dword [r14 + 0x10], 1
mov dword [r14], 8
jmp case.0x1400183a8.88
mov rcx, r14
call fcn.140009550
mov dword [r14 + 0x10], 1
mov dword [r14], 4
jmp case.0x1400183a8.88
cmp byte [0x1400dae7a], r8b
jmp 0x140090473
cmp byte [0x1400dbb4d], r8b
mov rcx, r14
je 0x140018403
call fcn.140009550
mov dword [r14 + 0x10], 1
mov dword [r14], r15d
jmp case.0x1400183a8.88
mov rcx, r14
call fcn.140009550
mov dword [r14 + 0x10], 1
mov dword [r14], 0x40
jmp case.0x1400183a8.88
mov rcx, r14
call fcn.140009550
mov dword [r14 + 0x10], 1
mov dword [r14], 0x41
jmp case.0x1400183a8.88
mov rcx, r14
call fcn.140009550
mov dword [r14 + 0x10], 1
mov dword [r14], 0x42
jmp case.0x1400183a8.88
mov rcx, r14
call fcn.140009550
mov dword [r14 + 0x10], 1
mov dword [r14], 0x43
jmp case.0x1400183a8.88
mov edx, dword [rbx + 0x1c4]
test edx, edx
jne 0x140090511
mov edx, dword [rbx + 0x1c0]
call fcn.14004b138
mov ebx, eax
jmp 0x1400900a8
lea rdx, [rbp]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
jmp 0x14009013f
mov rax, qword [0x1400dcff8]
movzx ecx, word [rax + 0x42]
test ecx, ecx
je 0x140090571
cmp ecx, 6
je 0x140090565
cmp ecx, 9
mov rcx, r14
je 0x140090559
lea rdx, str.UNKNOWN
jmp 0x1400183f0
lea rdx, [0x1400c7c28]
jmp 0x1400183f0
lea rdx, str.IA64
jmp 0x1400183ed
lea rdx, [0x1400c7c10]
jmp 0x1400183ed
mov eax, 0x80000001
xor ecx, ecx
cpuid
bt edx, 0x1d
mov dword [rsp + 0x68], eax
lea rdx, [0x1400c7c28]
lea rax, [0x1400c7c10]
mov dword [rsp + 0x6c], ebx
mov dword [rsp + 0x70], ecx
cmovae rdx, rax
jmp 0x1400183ed
mov rax, qword [0x1400dcff8]
cmp byte [rax + 0x3e], r8b
jne 0x1400905c6
lea rdx, str.WIN_81
jmp 0x1400183ed
cmp byte [rax + 0x3c], r8b
jne 0x1400905d8
lea rdx, str.WIN_8
jmp 0x1400183ed
cmp byte [rax + 0x3a], r8b
jne 0x1400905ea
lea rdx, str.WIN_2008R2
jmp 0x1400183ed
cmp byte [rax + 0x38], r8b
jne 0x1400905fc
lea rdx, str.WIN_7
jmp 0x1400183ed
cmp byte [rax + 0x36], r8b
jne 0x14009060e
lea rdx, str.WIN_2008
jmp 0x1400183ed
cmp byte [rax + 0x34], r8b
jne 0x140090620
lea rdx, str.WIN_VISTA
jmp 0x1400183ed
cmp byte [rax + 0x32], r8b
jne 0x140090632
lea rdx, str.WIN_2003
jmp 0x1400183ed
cmp byte [rax + 0x30], r8b
jne 0x140090653
cmp byte [rax + 0x44], r15b
lea rdx, str.WIN_XPe
lea rcx, str.WIN_XP
cmove rdx, rcx
jmp 0x1400183ed
lea rdx, str.UNKNOWN
jmp 0x1400183ed
mov rax, qword [0x1400dcff8]
mov ebx, dword [rax + 8]
jmp 0x1400900a8
mov rdx, qword [0x1400dcff8]
add rdx, 0x10
jmp 0x1400183b1
lea rax, [rbp]
lea r8, str.InstallLanguage
lea rdx, str.SYSTEMCurrentControlSetControlNlsLanguage
mov r9d, 0x104
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
call fcn.140024050
jmp 0x14009013f
lea rax, [rbp]
lea r8, str.SchemeLangID
lea rdx, str.Control_PanelAppearance
mov r9d, 0x104
mov rcx, 0xffffffff80000001
mov qword [rsp + 0x20], rax
call fcn.140024050
movzx eax, word [rbp]
lea rdx, [rbp]
mov ecx, eax
mov r8d, 4
mov dword [rbp + 0x348], eax
call fcn.140006dec
jmp 0x14009013f
lea rcx, [rbp - 0x50]
call qword [sym.imp.USER32.dll_GetKeyboardLayoutNameW]
lea rdx, [rbp - 0x50]
jmp 0x1400183ed
lea rdx, str.3__3__9__21
lea rcx, [rbp]
call fcn.140025c80
lea rcx, [rbp]
mov edi, r15d
mov r13d, r15d
call fcn.140025c38
test eax, eax
jle 0x14009076c
lea rbx, [rbp]
lea r12, [rbp]
mov esi, 0x2e
movzx eax, word [r12]
cmp ax, 0x20
je 0x140090757
inc edi
cmp ax, 0x2c
jne 0x140090750
mov word [rbx], si
jmp 0x140090753
mov word [rbx], ax
add rbx, 2
lea rcx, [rbp]
inc r13d
add r12, 2
call fcn.140025c38
cmp r13d, eax
jl 0x140090738
movsxd rax, edi
mov word [rbp + rax*2], r15w
jmp 0x14009013f
lea rdx, [rbp]
mov r8d, 0x104
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
jmp 0x14009013f
mov ecx, 4
lea rdx, [rbp - 0x70]
call fcn.140050670
lea rdx, [rbp - 0x70]
jmp 0x1400183ed
call qword [sym.imp.USER32.dll_GetDesktopWindow]
lea rdx, [rsp + 0x58]
mov rcx, rax
call qword [sym.imp.USER32.dll_GetWindowRect]
mov ebx, dword [rsp + 0x60]
jmp 0x1400900a8
call qword [sym.imp.USER32.dll_GetDesktopWindow]
lea rdx, [rsp + 0x58]
mov rcx, rax
call qword [sym.imp.USER32.dll_GetWindowRect]
mov ebx, dword [rsp + 0x64]
jmp 0x1400900a8
call qword [sym.imp.USER32.dll_GetDesktopWindow]
mov rcx, rax
mov rsi, rax
call qword [sym.imp.USER32.dll_GetDC]
mov edx, reloc.OLEAUT32.dll_VariantTimeToDosDateTime
jmp 0x140090812
call qword [sym.imp.USER32.dll_GetDesktopWindow]
mov rcx, rax
mov rsi, rax
call qword [sym.imp.USER32.dll_GetDC]
mov edx, reloc.WSOCK32.dll_WSACleanup
mov rcx, rax
mov rdi, rax
call qword [sym.imp.GDI32.dll_GetDeviceCaps]
mov rcx, r14
mov ebx, eax
call fcn.140009550
mov rdx, rdi
mov rcx, rsi
mov dword [r14 + 0x10], 1
mov dword [r14], ebx
call qword [sym.imp.USER32.dll_ReleaseDC]
nop
jmp case.0x1400183a8.88
lea rcx, str.COMSPEC
jmp 0x140090855
lea rcx, str.USERDNSDOMAIN
lea rdx, [rbp]
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
jmp 0x14009013f
lea rdx, [rbp]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
lea rcx, [rbp]
call fcn.140001728
jmp 0x14009013f
mov eax, dword [0x1400daf28]
mov rcx, r14
add eax, 0xfffffffd
cmp eax, r8d
jbe 0x140018403
jmp 0x14009047c
lea rcx, str.USERPROFILE
jmp 0x140090855
lea rcx, str.HOMEDRIVE
jmp 0x140090855
lea rcx, str.HOMEPATH
jmp 0x140090855
lea rcx, str.HOMESHARE
jmp 0x140090855
lea rcx, str.LOGONSERVER
jmp 0x140090855
lea rcx, str.USERDOMAIN
jmp 0x140090855
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
xorps xmm6, xmm6
mov rcx, r14
mov eax, eax
cvtsi2sd xmm6, rax
call fcn.140009550
movsd qword [r14], xmm6
mov dword [r14 + 0x10], 3
jmp case.0x1400183a8.88