Function at 0x140082f80
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
mov qword [rax + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x528]
sub rsp, 0x5f0
mov r14, qword [rdx]
mov rbx, rcx
mov r12, r8
mov edi, 0x208
lea rcx, [rbp - 0x4e]
xor esi, esi
movaps xmmword [rax - 0x48], xmm6
mov r8d, edi
xor edx, edx
mov word [rbp - 0x50], si
call fcn.140014ac0
lea rcx, [rbp + 0x2d2]
mov r8d, edi
xor edx, edx
mov word [rbp + 0x2d0], si
call fcn.140014ac0
mov edi, esi
lea rsi, str.ERROR
mov r13d, 1
mov rcx, qword [rsi]
mov rdx, r14
call fcn.14001565c
test eax, eax
je 0x140083013
lea rax, [0x1400ac740]
add rsi, 8
add edi, r13d
cmp rsi, rax
jl 0x140082ff1
mov r15, qword [rbp + 0x538]
cmp edi, 0x60
jne 0x14008307e
lea rdx, [0x14009fbe0]
lea rcx, [rbp - 0x70]
call fcn.140001ea0
lea rcx, [rbp - 0x70]
xor ebx, ebx
mov rdx, r15
mov dword [rbp + 0x538], ebx
call fcn.14000cb10
lea r8, [rbp + 0x538]
lea rdx, [rsp + 0x30]
lea rcx, [rbp - 0x70]
xor r9d, r9d
call fcn.14000ebb0
mov rdx, qword [rsp + 0x30]
test rdx, rdx
je 0x140083070
mov rcx, r12
call fcn.140009980
mov r13d, ebx
lea rcx, [rbp - 0x70]
call fcn.140002bd0
jmp 0x14008396b
cmp edi, 0x5f
ja case.0x14008309b.87
lea rdx, [0x140000000]
movsxd rax, edi
mov ecx, dword [rdx + rax*4 + 0x83a30]
add rcx, rdx
jmp rcx
lea rdx, [0x14009fc44]
mov rcx, r12
call fcn.140010b80
jmp case.0x14008309b.87
lea rdx, reloc.WSOCK32.dll_inet_addr
jmp 0x1400830a4
lea rdx, [0x14009b3ac]
jmp 0x1400830a4
lea rdx, reloc.WSOCK32.dll_htons
jmp 0x1400830a4
mov rax, qword [rbx]
movsxd rcx, dword [rax + 4]
lea rcx, [rcx + rbx + 8]
call fcn.140003320
mov ebx, dword [rax + 0x1c]
mov rcx, r12
call fcn.140009a80
mov dword [r12], ebx
jmp 0x140083960
mov rax, qword [rbx]
movsxd rcx, dword [rax + 4]
lea rcx, [rcx + rbx + 8]
call fcn.140003320
mov rcx, r12
lea rdx, [rax + 0x28]
call fcn.140009980
jmp case.0x14008309b.87
lea rcx, [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx r8d, word [rsp + 0x56]
lea rdx, str._.3d
lea rcx, [rbp - 0x50]
call fcn.1400157ac
lea rdx, [rbp - 0x50]
jmp 0x1400830a4
lea rcx, [rsp + 0x30]
call fcn.14004b350
lea r8, [0x14009fc5c]
lea rdx, [rbp + 0x290]
mov rcx, rax
call fcn.14005e010
mov rcx, r12
mov rdx, rax
call fcn.140010ef0
lea rcx, [rbp + 0x290]
call fcn.140002bd0
jmp case.0x14008309b.87
lea rcx, [rbp + 0x1e0]
call fcn.14004b350
lea r8, [0x14009fc64]
lea rdx, [rbp + 0x1f0]
mov rcx, rax
call fcn.14005e010
mov rcx, r12
mov rdx, rax
call fcn.140010ef0
lea rcx, [rbp + 0x1f0]
jmp 0x14008316f
lea rcx, [rbp + 0x1d0]
call fcn.14004b350
lea r8, [0x14009fc6c]
lea rdx, [rbp + 0x230]
mov rcx, rax
call fcn.14005e010
mov rcx, r12
mov rdx, rax
call fcn.140010ef0
lea rcx, [rbp + 0x230]
jmp 0x14008316f
lea rcx, [rbp + 0x1c0]
call fcn.14004b350
lea r8, [0x140099650]
lea rdx, [rbp + 0x2b0]
mov rcx, rax
call fcn.14005e010
mov rcx, r12
mov rdx, rax
call fcn.140010ef0
lea rcx, [rbp + 0x2b0]
jmp 0x14008316f
lea rcx, [rbp + 0x1c8]
call fcn.14004b350
lea r8, [0x14009fc74]
lea rdx, [rbp + 0x270]
mov rcx, rax
call fcn.14005e010
mov rcx, r12
mov rdx, rax
call fcn.140010ef0
lea rcx, [rbp + 0x270]
jmp 0x14008316f
lea rcx, [rbp + 0x1d8]
call fcn.14004b350
lea r8, [0x14009fc7c]
lea rdx, [rbp + 0x210]
mov rcx, rax
call fcn.14005e010
mov rcx, r12
mov rdx, rax
call fcn.140010ef0
lea rcx, [rbp + 0x210]
jmp 0x14008316f
lea rcx, [rbp + 0x1e8]
call fcn.14004b350
mov rcx, rax
call fcn.14005e090
lea rdx, [0x140099650]
mov r8d, eax
jmp 0x14008312b
lea rcx, [rbp - 0x80]
call fcn.14004b350
lea r8, [0x14009fc84]
lea rdx, [rbp + 0x250]
mov rcx, rax
call fcn.14005e010
mov rcx, r12
mov rdx, rax
call fcn.140010ef0
lea rcx, [rbp + 0x250]
jmp 0x14008316f
mov edx, reloc.OLEAUT32.dll_SafeArrayDestroyData
lea rax, [rbp - 0x50]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov qword [rsp + 0x20], rax
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
jmp 0x140083134
mov edx, 0x2b
jmp 0x1400832ee
mov edx, 5
jmp 0x1400832ee
mov edx, SafeArrayDestroyDescriptor
jmp 0x1400832ee
mov edx, 0x19
jmp 0x1400832ee
mov edx, 0x2e
jmp 0x1400832ee
mov edx, reloc.OLEAUT32.dll_CreateStdDispatch
jmp 0x1400832ee
mov edx, reloc.WSOCK32.dll_socket
jmp 0x1400832ee
mov edx, SafeArrayUnaccessData
jmp 0x1400832ee
mov edx, reloc.OLEAUT32.dll_SafeArrayGetElement
jmp 0x1400832ee
mov edx, 0x1a
jmp 0x1400832ee
mov edx, reloc.WSOCK32.dll_recv
jmp 0x1400832ee
mov edx, 6
jmp 0x1400832ee
mov edx, 2
jmp 0x1400832ee
mov edx, reloc.WSOCK32.dll_inet_ntoa
jmp 0x1400832ee
mov edx, 7
jmp 0x1400832ee
lea rdx, [rbp + 0x548]
lea rcx, [rbp - 0x50]
mov dword [rbp + 0x548], 0x104
call qword [sym.imp.KERNEL32.dll_GetComputerNameW]
jmp 0x140083134
lea rcx, [rbp - 0x50]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je case.0x14008309b.87
jmp 0x140083134
mov rax, qword [0x1400c5d28]
xor ecx, ecx
cmp byte [rax + 0x40], cl
je 0x1400833ee
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0x58], rcx
lea rcx, [rsp + 0x48]
call fcn.140038450
lea rcx, [rbp - 0x50]
mov edx, 0x104
call rax
lea rcx, [rsp + 0x48]
call fcn.1400386f0
jmp 0x140083134
lea rcx, [rbp - 0x50]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x140083134
mov rcx, r12
call fcn.140009a80
xor ebx, ebx
jmp 0x1400830e8
mov rcx, r12
call fcn.140009a80
mov dword [r12], 6
jmp 0x140083960
mov rcx, r12
call fcn.140009a80
mov dword [r12], 3
jmp 0x140083960
mov rcx, r12
call fcn.140009a80
mov dword [r12], 9
jmp 0x140083960
mov rcx, r12
call fcn.140009a80
mov dword [r12], 5
jmp 0x140083960
mov rcx, r12
call fcn.140009a80
mov dword [r12], 0xa
jmp 0x140083960
mov rcx, r12
call fcn.140009a80
mov dword [r12], 2
jmp 0x140083960
mov rcx, r12
call fcn.140009a80
mov dword [r12], 7
jmp 0x140083960
mov rcx, r12
call fcn.140009a80
mov dword [r12], 8
jmp 0x140083960
mov rcx, r12
call fcn.140009a80
mov dword [r12], 4
jmp 0x140083960
cmp byte [0x1400b28ea], r13b
mov rcx, r12
je 0x140083957
jmp 0x140083405
cmp byte [0x1400c3f9d], r13b
jmp 0x1400834d5
mov rcx, r12
call fcn.140009a80
mov dword [r12], 0x40
jmp 0x140083960
mov rcx, r12
call fcn.140009a80
mov dword [r12], 0x41
jmp 0x140083960
mov rcx, r12
call fcn.140009a80
mov dword [r12], 0x42
jmp 0x140083960
mov rcx, r12
call fcn.140009a80
mov dword [r12], 0x43
jmp 0x140083960
mov rdx, qword [rbx + 0x170]
jmp 0x1400830a4
mov rdx, qword [rbx + 0x150]
jmp 0x1400830a4
mov rdx, qword [rbx + 0x190]
jmp 0x1400830a4
mov ecx, dword [rbx + 0x1c0]
call fcn.14003c3e0
mov ebx, eax
jmp 0x1400830e0
lea rdx, [rbp - 0x50]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
jmp 0x140083134
mov rax, qword [0x1400c5d28]
movzx ecx, word [rax + 0x42]
test ecx, ecx
je 0x1400835c2
cmp ecx, 6
je 0x1400835b6
cmp ecx, 9
mov rcx, r12
jne 0x1400836b1
lea rdx, [0x14009fca8]
jmp 0x1400830a7
lea rdx, str.IA64
jmp 0x1400830a4
lea rdx, [0x14009fc90]
jmp 0x1400830a4
mov eax, 0x80000001
xor ecx, ecx
cpuid
bt edx, 0x1d
mov dword [rbp - 0x80], eax
lea rdx, [0x14009fca8]
lea rax, [0x14009fc90]
mov dword [rbp - 0x7c], ebx
mov dword [rbp - 0x78], ecx
cmovae rdx, rax
jmp 0x1400830a4
lea rdx, str.WIN32_NT
jmp 0x1400830a4
mov rax, qword [0x1400c5d28]
cmp byte [rax + 0x3e], r13b
jne 0x140083620
lea rdx, str.WIN_8
jmp 0x1400830a4
cmp byte [rax + 0x3c], r13b
jne 0x140083632
lea rdx, str.WIN_2008R2
jmp 0x1400830a4
cmp byte [rax + 0x3a], r13b
jne 0x140083644
lea rdx, str.WIN_7
jmp 0x1400830a4
cmp byte [rax + 0x38], r13b
jne 0x140083656
lea rdx, str.WIN_2008
jmp 0x1400830a4
cmp byte [rax + 0x36], r13b
jne 0x140083668
lea rdx, str.WIN_VISTA
jmp 0x1400830a4
cmp byte [rax + 0x34], r13b
jne 0x14008367a
lea rdx, str.WIN_2003
jmp 0x1400830a4
cmp byte [rax + 0x32], r13b
jne 0x14008369c
xor ebx, ebx
lea rdx, str.WIN_XPe
lea rcx, str.WIN_XP
cmp byte [rax + 0x44], bl
cmove rdx, rcx
jmp 0x1400830a4
mov rcx, r12
cmp byte [rax + 0x30], r13b
jne 0x1400836b1
lea rdx, str.WIN_2000
jmp 0x1400830a7
lea rdx, str.UNKNOWN
jmp 0x1400830a7
mov rax, qword [0x1400c5d28]
mov ebx, dword [rax + 8]
jmp 0x1400830e0
mov rdx, qword [0x1400c5d28]
mov rcx, r12
add rdx, 0x10
call fcn.140010ef0
jmp case.0x14008309b.87
lea rax, [rbp - 0x50]
lea r8, str.InstallLanguage
lea rdx, str.SYSTEMCurrentControlSetControlNlsLanguage
mov r9d, 0x104
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
call fcn.140011e60
jmp 0x140083134
lea rax, [rbp - 0x50]
lea r8, str.SchemeLangID
lea rdx, str.Control_PanelAppearance
mov r9d, 0x104
mov rcx, 0xffffffff80000001
mov qword [rsp + 0x20], rax
call fcn.140011e60
movzx edx, word [rbp - 0x50]
mov r8d, 4
mov dword [rbp + 0x548], edx
mov ecx, edx
lea rdx, [rbp - 0x50]
call fcn.14003a630
jmp 0x140083134
lea rcx, [rbp - 0x70]
call qword [sym.imp.USER32.dll_GetKeyboardLayoutNameW]
lea rdx, [rbp - 0x70]
jmp 0x1400830a4
lea rdx, [0x14009fe58]
lea rcx, [rbp + 0x2d0]
call fcn.140014a94
xor eax, eax
lea rcx, [rbp + 0x2d0]
mov edi, eax
mov r15d, eax
call fcn.140014a44
xor ecx, ecx
test eax, eax
jle 0x1400837e4
lea rbx, [rbp + 0x2d0]
lea r14, [rbp + 0x2d0]
lea esi, [rcx + 0x2e]
movzx eax, word [r14]
cmp ax, 0x20
je 0x1400837ca
add edi, r13d
cmp ax, 0x2c
jne 0x1400837c3
mov word [rbx], si
jmp 0x1400837c6
mov word [rbx], ax
add rbx, 2
lea rcx, [rbp + 0x2d0]
add r15d, r13d
add r14, 2
call fcn.140014a44
cmp r15d, eax
jl 0x1400837ab
xor ecx, ecx
movsxd rax, edi
lea rdx, [rbp + 0x2d0]
mov word [rbp + rax*2 + 0x2d0], cx
mov rcx, r12
call fcn.140010b80
mov r15, qword [rbp + 0x538]
jmp case.0x14008309b.87
lea rdx, [rbp - 0x50]
mov r8d, 0x104
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
jmp 0x140083134
mov ecx, r13d
lea rdx, [rsp + 0x60]
call fcn.14003ac30
lea rdx, [rsp + 0x60]
jmp 0x1400830a4
mov ecx, 2
jmp 0x140083824
mov ecx, 3
jmp 0x140083824
mov ecx, 4
jmp 0x140083824
call qword [sym.imp.USER32.dll_GetDesktopWindow]
lea rdx, [rsp + 0x38]
mov rcx, rax
call qword [sym.imp.USER32.dll_GetWindowRect]
mov ebx, dword [rsp + 0x40]
jmp 0x1400830e0
call qword [sym.imp.USER32.dll_GetDesktopWindow]
lea rdx, [rsp + 0x38]
mov rcx, rax
call qword [sym.imp.USER32.dll_GetWindowRect]
mov ebx, dword [rsp + 0x44]
jmp 0x1400830e0
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
mov rcx, rax
mov rdi, rax
call qword [sym.imp.GDI32.dll_GetDeviceCaps]
mov rcx, r12
mov ebx, eax
call fcn.140009a80
mov rdx, rdi
mov rcx, rsi
mov dword [r12 + 8], r13d
mov dword [r12], ebx
call qword [sym.imp.USER32.dll_ReleaseDC]
jmp case.0x14008309b.87
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
jmp 0x14008389e
lea rcx, str.COMSPEC
lea rdx, [rbp - 0x50]
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
jmp 0x140083134
lea rdx, [rbp - 0x50]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
lea rcx, [rbp - 0x50]
call fcn.140013350
jmp 0x140083134
lea rdx, [rbp + 0x548]
lea rcx, [rbp - 0x50]
mov dword [rbp + 0x548], 0x104
call qword [sym.imp.ADVAPI32.dll_GetUserNameW]
jmp 0x140083134
mov eax, dword [0x1400c3398]
cmp eax, 3
je case.0x14008309b.43
cmp eax, 4
jne case.0x14008309b.30
mov rcx, r12
call fcn.140009a80
mov dword [r12], r13d
mov dword [r12 + 8], r13d
xor r12d, r12d
mov r13d, r12d
mov rcx, r15
call fcn.140002bd0
lea r11, [rsp + 0x5f0]
mov eax, r13d
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 rcx, str.USERPROFILE
jmp 0x1400838ee
lea rcx, str.HOMEDRIVE
jmp 0x1400838ee
lea rcx, str.HOMEPATH
jmp 0x1400838ee
lea rcx, str.HOMESHARE
jmp 0x1400838ee
lea rcx, str.LOGONSERVER
jmp 0x1400838ee
lea rcx, str.USERDOMAIN
jmp 0x1400838ee
lea rcx, str.USERDNSDOMAIN
jmp 0x1400838ee
mov ebx, dword [rbx + 0x23c]
jmp 0x1400830e0
mov rdx, qword [rbx + 0x240]
jmp 0x1400830a4
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
pxor xmm6, xmm6
mov rcx, r12
mov edx, eax
cvtsi2sd xmm6, rdx
call fcn.140009a80
movsd qword [r12], xmm6
mov dword [r12 + 8], 3
jmp case.0x14008309b.87