Function at 0x140082610
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.1400152d0
lea rcx, [rbp + 0x2d2]
mov r8d, edi
xor edx, edx
mov word [rbp + 0x2d0], si
call fcn.1400152d0
mov edi, esi
lea rsi, str.ERROR
mov r13d, 1
mov rcx, qword [rsi]
mov rdx, r14
call fcn.140015540
test eax, eax
je 0x1400826a3
lea rax, [0x1400ab740]
add rsi, 8
add edi, r13d
cmp rsi, rax
jl 0x140082681
mov r15, qword [rbp + 0x538]
cmp edi, 0x60
jne 0x14008270e
lea rdx, [0x14009ebf8]
lea rcx, [rbp - 0x70]
call fcn.140001e40
lea rcx, [rbp - 0x70]
xor ebx, ebx
mov rdx, r15
mov dword [rbp + 0x538], ebx
call fcn.14000ca70
lea r8, [rbp + 0x538]
lea rdx, [rsp + 0x30]
lea rcx, [rbp - 0x70]
xor r9d, r9d
call fcn.14000eaf0
mov rdx, qword [rsp + 0x30]
test rdx, rdx
je 0x140082700
mov rcx, r12
call fcn.140009900
mov r13d, ebx
lea rcx, [rbp - 0x70]
call fcn.140001460
jmp 0x140082ffb
cmp edi, 0x5f
ja case.0x14008272b.87
lea rdx, [0x140000000]
movsxd rax, edi
mov ecx, dword [rdx + rax*4 + 0x830c0]
add rcx, rdx
jmp rcx
lea rdx, [0x14009ec54]
mov rcx, r12
call fcn.140010ad0
jmp case.0x14008272b.87
lea rdx, reloc.WSOCK32.dll_inet_addr
jmp 0x140082734
lea rdx, [0x14009a35c]
jmp 0x140082734
lea rdx, reloc.WSOCK32.dll_htons
jmp 0x140082734
mov rax, qword [rbx]
movsxd rcx, dword [rax + 4]
lea rcx, [rcx + rbx + 8]
call fcn.140011cb0
mov ebx, dword [rax + 0x1c]
mov rcx, r12
call fcn.140009a00
mov dword [r12], ebx
jmp 0x140082ff0
mov rax, qword [rbx]
movsxd rcx, dword [rax + 4]
lea rcx, [rcx + rbx + 8]
call fcn.140011cb0
mov rcx, r12
lea rdx, [rax + 0x28]
call fcn.140009900
jmp case.0x14008272b.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.140015690
lea rdx, [rbp - 0x50]
jmp 0x140082734
lea rcx, [rsp + 0x30]
call fcn.14004b0f0
lea r8, [0x14009ec6c]
lea rdx, [rbp + 0x290]
mov rcx, rax
call fcn.14005d860
mov rcx, r12
mov rdx, rax
call fcn.140010e40
lea rcx, [rbp + 0x290]
call fcn.140001460
jmp case.0x14008272b.87
lea rcx, [rbp + 0x1e0]
call fcn.14004b0f0
lea r8, [0x14009ec74]
lea rdx, [rbp + 0x1f0]
mov rcx, rax
call fcn.14005d860
mov rcx, r12
mov rdx, rax
call fcn.140010e40
lea rcx, [rbp + 0x1f0]
jmp 0x1400827ff
lea rcx, [rbp + 0x1d0]
call fcn.14004b0f0
lea r8, [0x14009ec7c]
lea rdx, [rbp + 0x230]
mov rcx, rax
call fcn.14005d860
mov rcx, r12
mov rdx, rax
call fcn.140010e40
lea rcx, [rbp + 0x230]
jmp 0x1400827ff
lea rcx, [rbp + 0x1c0]
call fcn.14004b0f0
lea r8, [0x140098600]
lea rdx, [rbp + 0x2b0]
mov rcx, rax
call fcn.14005d860
mov rcx, r12
mov rdx, rax
call fcn.140010e40
lea rcx, [rbp + 0x2b0]
jmp 0x1400827ff
lea rcx, [rbp + 0x1c8]
call fcn.14004b0f0
lea r8, [0x14009ec84]
lea rdx, [rbp + 0x270]
mov rcx, rax
call fcn.14005d860
mov rcx, r12
mov rdx, rax
call fcn.140010e40
lea rcx, [rbp + 0x270]
jmp 0x1400827ff
lea rcx, [rbp + 0x1d8]
call fcn.14004b0f0
lea r8, [0x14009ec8c]
lea rdx, [rbp + 0x210]
mov rcx, rax
call fcn.14005d860
mov rcx, r12
mov rdx, rax
call fcn.140010e40
lea rcx, [rbp + 0x210]
jmp 0x1400827ff
lea rcx, [rbp + 0x1e8]
call fcn.14004b0f0
mov rcx, rax
call fcn.14005d8e0
lea rdx, [0x140098600]
mov r8d, eax
jmp 0x1400827bb
lea rcx, [rbp - 0x80]
call fcn.14004b0f0
lea r8, [0x14009ec94]
lea rdx, [rbp + 0x250]
mov rcx, rax
call fcn.14005d860
mov rcx, r12
mov rdx, rax
call fcn.140010e40
lea rcx, [rbp + 0x250]
jmp 0x1400827ff
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 0x1400827c4
mov edx, 0x2b
jmp 0x14008297e
mov edx, 5
jmp 0x14008297e
mov edx, reloc.OLEAUT32.dll_SafeArrayAllocDescriptor
jmp 0x14008297e
mov edx, 0x19
jmp 0x14008297e
mov edx, 0x2e
jmp 0x14008297e
mov edx, reloc.OLEAUT32.dll_CreateStdDispatch
jmp 0x14008297e
mov edx, reloc.WSOCK32.dll_socket
jmp 0x14008297e
mov edx, SafeArrayUnaccessData
jmp 0x14008297e
mov edx, reloc.OLEAUT32.dll_SafeArrayGetElement
jmp 0x14008297e
mov edx, 0x1a
jmp 0x14008297e
mov edx, reloc.WSOCK32.dll_recv
jmp 0x14008297e
mov edx, 6
jmp 0x14008297e
mov edx, 2
jmp 0x14008297e
mov edx, reloc.WSOCK32.dll_inet_ntoa
jmp 0x14008297e
mov edx, 7
jmp 0x14008297e
lea rdx, [rbp + 0x548]
lea rcx, [rbp - 0x50]
mov dword [rbp + 0x548], 0x104
call qword [sym.imp.KERNEL32.dll_GetComputerNameW]
jmp 0x1400827c4
lea rcx, [rbp - 0x50]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je case.0x14008272b.87
jmp 0x1400827c4
mov rax, qword [0x1400c4d18]
xor ecx, ecx
cmp byte [rax + 0x40], cl
je 0x140082a7e
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0x58], rcx
lea rcx, [rsp + 0x48]
call fcn.1400381c0
lea rcx, [rbp - 0x50]
mov edx, 0x104
call rax
lea rcx, [rsp + 0x48]
call fcn.14003d700
jmp 0x1400827c4
lea rcx, [rbp - 0x50]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x1400827c4
mov rcx, r12
call fcn.140009a00
xor ebx, ebx
jmp 0x140082778
mov rcx, r12
call fcn.140009a00
mov dword [r12], 6
jmp 0x140082ff0
mov rcx, r12
call fcn.140009a00
mov dword [r12], 3
jmp 0x140082ff0
mov rcx, r12
call fcn.140009a00
mov dword [r12], 9
jmp 0x140082ff0
mov rcx, r12
call fcn.140009a00
mov dword [r12], 5
jmp 0x140082ff0
mov rcx, r12
call fcn.140009a00
mov dword [r12], 0xa
jmp 0x140082ff0
mov rcx, r12
call fcn.140009a00
mov dword [r12], 2
jmp 0x140082ff0
mov rcx, r12
call fcn.140009a00
mov dword [r12], 7
jmp 0x140082ff0
mov rcx, r12
call fcn.140009a00
mov dword [r12], 8
jmp 0x140082ff0
mov rcx, r12
call fcn.140009a00
mov dword [r12], 4
jmp 0x140082ff0
cmp byte [0x1400b18ea], r13b
mov rcx, r12
je 0x140082fe7
jmp 0x140082a95
cmp byte [0x1400c2fcd], r13b
jmp 0x140082b65
mov rcx, r12
call fcn.140009a00
mov dword [r12], 0x40
jmp 0x140082ff0
mov rcx, r12
call fcn.140009a00
mov dword [r12], 0x41
jmp 0x140082ff0
mov rcx, r12
call fcn.140009a00
mov dword [r12], 0x42
jmp 0x140082ff0
mov rcx, r12
call fcn.140009a00
mov dword [r12], 0x43
jmp 0x140082ff0
mov rdx, qword [rbx + 0x170]
jmp 0x140082734
mov rdx, qword [rbx + 0x150]
jmp 0x140082734
mov rdx, qword [rbx + 0x190]
jmp 0x140082734
mov ecx, dword [rbx + 0x1c0]
call fcn.14003c520
mov ebx, eax
jmp 0x140082770
lea rdx, [rbp - 0x50]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
jmp 0x1400827c4
mov rax, qword [0x1400c4d18]
movzx ecx, word [rax + 0x42]
test ecx, ecx
je 0x140082c52
cmp ecx, 6
je 0x140082c46
cmp ecx, 9
mov rcx, r12
jne 0x140082d41
lea rdx, [0x14009ecb8]
jmp 0x140082737
lea rdx, str.IA64
jmp 0x140082734
lea rdx, [0x14009eca0]
jmp 0x140082734
mov eax, 0x80000001
xor ecx, ecx
cpuid
bt edx, 0x1d
mov dword [rbp - 0x80], eax
lea rdx, [0x14009ecb8]
lea rax, [0x14009eca0]
mov dword [rbp - 0x7c], ebx
mov dword [rbp - 0x78], ecx
cmovae rdx, rax
jmp 0x140082734
lea rdx, str.WIN32_NT
jmp 0x140082734
mov rax, qword [0x1400c4d18]
cmp byte [rax + 0x3e], r13b
jne 0x140082cb0
lea rdx, str.WIN_8
jmp 0x140082734
cmp byte [rax + 0x3c], r13b
jne 0x140082cc2
lea rdx, str.WIN_2008R2
jmp 0x140082734
cmp byte [rax + 0x3a], r13b
jne 0x140082cd4
lea rdx, str.WIN_7
jmp 0x140082734
cmp byte [rax + 0x38], r13b
jne 0x140082ce6
lea rdx, str.WIN_2008
jmp 0x140082734
cmp byte [rax + 0x36], r13b
jne 0x140082cf8
lea rdx, str.WIN_VISTA
jmp 0x140082734
cmp byte [rax + 0x34], r13b
jne 0x140082d0a
lea rdx, str.WIN_2003
jmp 0x140082734
cmp byte [rax + 0x32], r13b
jne 0x140082d2c
xor ebx, ebx
lea rdx, str.WIN_XPe
lea rcx, str.WIN_XP
cmp byte [rax + 0x44], bl
cmove rdx, rcx
jmp 0x140082734
mov rcx, r12
cmp byte [rax + 0x30], r13b
jne 0x140082d41
lea rdx, str.WIN_2000
jmp 0x140082737
lea rdx, str.UNKNOWN
jmp 0x140082737
mov rax, qword [0x1400c4d18]
mov ebx, dword [rax + 8]
jmp 0x140082770
mov rdx, qword [0x1400c4d18]
mov rcx, r12
add rdx, 0x10
call fcn.140010e40
jmp case.0x14008272b.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.140011dc0
jmp 0x1400827c4
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.140011dc0
movzx edx, word [rbp - 0x50]
mov r8d, 4
mov dword [rbp + 0x548], edx
mov ecx, edx
lea rdx, [rbp - 0x50]
call fcn.14003a6f0
jmp 0x1400827c4
lea rcx, [rbp - 0x70]
call qword [sym.imp.USER32.dll_GetKeyboardLayoutNameW]
lea rdx, [rbp - 0x70]
jmp 0x140082734
lea rdx, [0x14009ee68]
lea rcx, [rbp + 0x2d0]
call fcn.140014c2c
xor eax, eax
lea rcx, [rbp + 0x2d0]
mov edi, eax
mov r15d, eax
call fcn.140014844
xor ecx, ecx
test eax, eax
jle 0x140082e74
lea rbx, [rbp + 0x2d0]
lea r14, [rbp + 0x2d0]
lea esi, [rcx + 0x2e]
movzx eax, word [r14]
cmp ax, 0x20
je 0x140082e5a
add edi, r13d
cmp ax, 0x2c
jne 0x140082e53
mov word [rbx], si
jmp 0x140082e56
mov word [rbx], ax
add rbx, 2
lea rcx, [rbp + 0x2d0]
add r15d, r13d
add r14, 2
call fcn.140014844
cmp r15d, eax
jl 0x140082e3b
xor ecx, ecx
movsxd rax, edi
lea rdx, [rbp + 0x2d0]
mov word [rbp + rax*2 + 0x2d0], cx
mov rcx, r12
call fcn.140010ad0
mov r15, qword [rbp + 0x538]
jmp case.0x14008272b.87
lea rdx, [rbp - 0x50]
mov r8d, 0x104
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
jmp 0x1400827c4
mov ecx, r13d
lea rdx, [rsp + 0x60]
call fcn.14003adb0
lea rdx, [rsp + 0x60]
jmp 0x140082734
mov ecx, 2
jmp 0x140082eb4
mov ecx, 3
jmp 0x140082eb4
mov ecx, 4
jmp 0x140082eb4
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 0x140082770
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 0x140082770
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.140009a00
mov rdx, rdi
mov rcx, rsi
mov dword [r12 + 8], r13d
mov dword [r12], ebx
call qword [sym.imp.USER32.dll_ReleaseDC]
jmp case.0x14008272b.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 0x140082f2e
lea rcx, str.COMSPEC
lea rdx, [rbp - 0x50]
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
jmp 0x1400827c4
lea rdx, [rbp - 0x50]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
lea rcx, [rbp - 0x50]
call fcn.140013280
jmp 0x1400827c4
lea rdx, [rbp + 0x548]
lea rcx, [rbp - 0x50]
mov dword [rbp + 0x548], 0x104
call qword [sym.imp.ADVAPI32.dll_GetUserNameW]
jmp 0x1400827c4
mov eax, dword [0x1400c2398]
cmp eax, 3
je case.0x14008272b.43
cmp eax, 4
jne case.0x14008272b.30
mov rcx, r12
call fcn.140009a00
mov dword [r12], r13d
mov dword [r12 + 8], r13d
xor r12d, r12d
mov r13d, r12d
mov rcx, r15
call fcn.140001460
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 0x140082f7e
lea rcx, str.HOMEDRIVE
jmp 0x140082f7e
lea rcx, str.HOMEPATH
jmp 0x140082f7e
lea rcx, str.HOMESHARE
jmp 0x140082f7e
lea rcx, str.LOGONSERVER
jmp 0x140082f7e
lea rcx, str.USERDOMAIN
jmp 0x140082f7e
lea rcx, str.USERDNSDOMAIN
jmp 0x140082f7e
mov ebx, dword [rbx + 0x23c]
jmp 0x140082770
mov rdx, qword [rbx + 0x240]
jmp 0x140082734
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
pxor xmm6, xmm6
mov rcx, r12
mov edx, eax
cvtsi2sd xmm6, rdx
call fcn.140009a00
movsd qword [r12], xmm6
mov dword [r12 + 8], 3
jmp case.0x14008272b.87