Function at 0x140080ff0
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.140015500
lea rcx, [rbp + 0x2d2]
mov r8d, edi
xor edx, edx
mov word [rbp + 0x2d0], si
call fcn.140015500
mov edi, esi
lea rsi, str.ERROR
mov r13d, 1
mov rcx, qword [rsi]
mov rdx, r14
call fcn.140015770
test eax, eax
je 0x140081083
lea rax, [0x1400a9740]
add rsi, 8
add edi, r13d
cmp rsi, rax
jl 0x140081061
mov r15, qword [rbp + 0x538]
cmp edi, 0x60
jne 0x1400810ee
lea rdx, [0x14009cb38]
lea rcx, [rbp - 0x70]
call fcn.140001ce0
lea rcx, [rbp - 0x70]
xor ebx, ebx
mov rdx, r15
mov dword [rbp + 0x538], ebx
call fcn.1400047d0
lea r8, [rbp + 0x538]
lea rdx, [rsp + 0x30]
lea rcx, [rbp - 0x70]
xor r9d, r9d
call fcn.14000e800
mov rdx, qword [rsp + 0x30]
test rdx, rdx
je 0x1400810e0
mov rcx, r12
call fcn.140007870
mov r13d, ebx
lea rcx, [rbp - 0x70]
call fcn.140002530
jmp 0x1400819c7
cmp edi, 0x5f
ja case.0x14008110b.87
lea rdx, [0x140000000]
movsxd rax, edi
mov ecx, dword [rdx + rax*4 + 0x81a8c]
add rcx, rdx
jmp rcx
lea rdx, [0x14009cb94]
mov rcx, r12
call fcn.140010e30
jmp case.0x14008110b.87
lea rdx, reloc.WSOCK32.dll_inet_addr
jmp 0x140081114
lea rdx, [0x1400982bc]
jmp 0x140081114
lea rdx, reloc.WSOCK32.dll_htons
jmp 0x140081114
mov rax, qword [rbx]
movsxd rcx, dword [rax + 4]
lea rcx, [rcx + rbx + 8]
call fcn.14000dfc0
mov ebx, dword [rax + 0x1c]
mov rcx, r12
call fcn.1400077c0
mov dword [r12], ebx
jmp 0x1400819bc
mov rax, qword [rbx]
movsxd rcx, dword [rax + 4]
lea rcx, [rcx + rbx + 8]
call fcn.14000dfc0
mov rcx, r12
lea rdx, [rax + 0x28]
call fcn.140007870
jmp case.0x14008110b.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.1400158c0
lea rdx, [rbp - 0x50]
jmp 0x140081114
lea rcx, [rsp + 0x30]
call fcn.14004a730
lea r8, [0x14009cbac]
lea rdx, [rbp + 0x290]
mov rcx, rax
call fcn.14005ccc0
mov rcx, r12
mov rdx, rax
call fcn.140010fc0
lea rcx, [rbp + 0x290]
call fcn.140002530
jmp case.0x14008110b.87
lea rcx, [rbp + 0x1e0]
call fcn.14004a730
lea r8, [0x14009cbb4]
lea rdx, [rbp + 0x1f0]
mov rcx, rax
call fcn.14005ccc0
mov rcx, r12
mov rdx, rax
call fcn.140010fc0
lea rcx, [rbp + 0x1f0]
jmp 0x1400811df
lea rcx, [rbp + 0x1d0]
call fcn.14004a730
lea r8, [0x14009cbbc]
lea rdx, [rbp + 0x230]
mov rcx, rax
call fcn.14005ccc0
mov rcx, r12
mov rdx, rax
call fcn.140010fc0
lea rcx, [rbp + 0x230]
jmp 0x1400811df
lea rcx, [rbp + 0x1c0]
call fcn.14004a730
lea r8, [0x140096560]
lea rdx, [rbp + 0x2b0]
mov rcx, rax
call fcn.14005ccc0
mov rcx, r12
mov rdx, rax
call fcn.140010fc0
lea rcx, [rbp + 0x2b0]
jmp 0x1400811df
lea rcx, [rbp + 0x1c8]
call fcn.14004a730
lea r8, [0x14009cbc4]
lea rdx, [rbp + 0x270]
mov rcx, rax
call fcn.14005ccc0
mov rcx, r12
mov rdx, rax
call fcn.140010fc0
lea rcx, [rbp + 0x270]
jmp 0x1400811df
lea rcx, [rbp + 0x1d8]
call fcn.14004a730
lea r8, [0x14009cbcc]
lea rdx, [rbp + 0x210]
mov rcx, rax
call fcn.14005ccc0
mov rcx, r12
mov rdx, rax
call fcn.140010fc0
lea rcx, [rbp + 0x210]
jmp 0x1400811df
lea rcx, [rbp + 0x1e8]
call fcn.14004a730
mov rcx, rax
call fcn.14005cd40
lea rdx, [0x140096560]
mov r8d, eax
jmp 0x14008119b
lea rcx, [rbp - 0x80]
call fcn.14004a730
lea r8, [0x14009cbd4]
lea rdx, [rbp + 0x250]
mov rcx, rax
call fcn.14005ccc0
mov rcx, r12
mov rdx, rax
call fcn.140010fc0
lea rcx, [rbp + 0x250]
jmp 0x1400811df
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 0x1400811a4
mov edx, 0x2b
jmp 0x14008135e
mov edx, 5
jmp 0x14008135e
mov edx, reloc.OLEAUT32.dll_SafeArrayAllocDescriptor
jmp 0x14008135e
mov edx, 0x19
jmp 0x14008135e
mov edx, 0x2e
jmp 0x14008135e
mov edx, reloc.OLEAUT32.dll_CreateStdDispatch
jmp 0x14008135e
mov edx, reloc.WSOCK32.dll_socket
jmp 0x14008135e
mov edx, SafeArrayGetElement
jmp 0x14008135e
mov edx, reloc.OLEAUT32.dll_SafeArrayGetElement
jmp 0x14008135e
mov edx, 0x1a
jmp 0x14008135e
mov edx, reloc.WSOCK32.dll_recv
jmp 0x14008135e
mov edx, 6
jmp 0x14008135e
mov edx, 2
jmp 0x14008135e
mov edx, reloc.WSOCK32.dll_inet_ntoa
jmp 0x14008135e
mov edx, 7
jmp 0x14008135e
lea rdx, [rbp + 0x548]
lea rcx, [rbp - 0x50]
mov dword [rbp + 0x548], 0x104
call qword [sym.imp.KERNEL32.dll_GetComputerNameW]
jmp 0x1400811a4
lea rcx, [rbp - 0x50]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je case.0x14008110b.87
jmp 0x1400811a4
mov rax, qword [0x1400c2d18]
xor ecx, ecx
cmp byte [rax + 0x3e], cl
je 0x14008145e
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0x58], rcx
lea rcx, [rsp + 0x48]
call fcn.140038120
lea rcx, [rbp - 0x50]
mov edx, 0x104
call rax
lea rcx, [rsp + 0x48]
call fcn.140038740
jmp 0x1400811a4
lea rcx, [rbp - 0x50]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x1400811a4
mov rcx, r12
call fcn.1400077c0
xor ebx, ebx
jmp 0x140081158
mov rcx, r12
call fcn.1400077c0
mov dword [r12], 6
jmp 0x1400819bc
mov rcx, r12
call fcn.1400077c0
mov dword [r12], 3
jmp 0x1400819bc
mov rcx, r12
call fcn.1400077c0
mov dword [r12], 9
jmp 0x1400819bc
mov rcx, r12
call fcn.1400077c0
mov dword [r12], 5
jmp 0x1400819bc
mov rcx, r12
call fcn.1400077c0
mov dword [r12], 0xa
jmp 0x1400819bc
mov rcx, r12
call fcn.1400077c0
mov dword [r12], 2
jmp 0x1400819bc
mov rcx, r12
call fcn.1400077c0
mov dword [r12], 7
jmp 0x1400819bc
mov rcx, r12
call fcn.1400077c0
mov dword [r12], 8
jmp 0x1400819bc
mov rcx, r12
call fcn.1400077c0
mov dword [r12], 4
jmp 0x1400819bc
cmp byte [0x1400af8ea], r13b
mov rcx, r12
je 0x1400819b3
jmp 0x140081475
cmp byte [0x1400c0fcd], r13b
jmp 0x140081545
mov rcx, r12
call fcn.1400077c0
mov dword [r12], 0x40
jmp 0x1400819bc
mov rcx, r12
call fcn.1400077c0
mov dword [r12], 0x41
jmp 0x1400819bc
mov rcx, r12
call fcn.1400077c0
mov dword [r12], 0x42
jmp 0x1400819bc
mov rcx, r12
call fcn.1400077c0
mov dword [r12], 0x43
jmp 0x1400819bc
mov rdx, qword [rbx + 0x170]
jmp 0x140081114
mov rdx, qword [rbx + 0x150]
jmp 0x140081114
mov rdx, qword [rbx + 0x190]
jmp 0x140081114
mov ecx, dword [rbx + 0x1c0]
call fcn.14003c4f0
mov ebx, eax
jmp 0x140081150
lea rdx, [rbp - 0x50]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
jmp 0x1400811a4
mov rax, qword [0x1400c2d18]
movzx ecx, word [rax + 0x40]
test ecx, ecx
je 0x140081632
cmp ecx, 6
je 0x140081626
cmp ecx, 9
mov rcx, r12
jne 0x14008170f
lea rdx, [0x14009cbf8]
jmp 0x140081117
lea rdx, str.IA64
jmp 0x140081114
lea rdx, [0x14009cbe0]
jmp 0x140081114
mov eax, 0x80000001
xor ecx, ecx
cpuid
bt edx, 0x1d
mov dword [rbp - 0x80], eax
lea rdx, [0x14009cbf8]
lea rax, [0x14009cbe0]
mov dword [rbp - 0x7c], ebx
mov dword [rbp - 0x78], ecx
cmovae rdx, rax
jmp 0x140081114
lea rdx, str.WIN32_NT
jmp 0x140081114
mov rax, qword [0x1400c2d18]
cmp byte [rax + 0x3c], r13b
jne 0x140081690
lea rdx, str.WIN_2008R2
jmp 0x140081114
cmp byte [rax + 0x3a], r13b
jne 0x1400816a2
lea rdx, str.WIN_7
jmp 0x140081114
cmp byte [rax + 0x38], r13b
jne 0x1400816b4
lea rdx, str.WIN_2008
jmp 0x140081114
cmp byte [rax + 0x36], r13b
jne 0x1400816c6
lea rdx, str.WIN_VISTA
jmp 0x140081114
cmp byte [rax + 0x34], r13b
jne 0x1400816d8
lea rdx, str.WIN_2003
jmp 0x140081114
cmp byte [rax + 0x32], r13b
jne 0x1400816fa
xor ebx, ebx
lea rdx, str.WIN_XPe
lea rcx, str.WIN_XP
cmp byte [rax + 0x42], bl
cmove rdx, rcx
jmp 0x140081114
mov rcx, r12
cmp byte [rax + 0x30], r13b
jne 0x14008170f
lea rdx, str.WIN_2000
jmp 0x140081117
lea rdx, str.UNKNOWN
jmp 0x140081117
mov rax, qword [0x1400c2d18]
mov ebx, dword [rax + 8]
jmp 0x140081150
mov rdx, qword [0x1400c2d18]
mov rcx, r12
add rdx, 0x10
call fcn.140010fc0
jmp case.0x14008110b.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.140011f40
jmp 0x1400811a4
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.140011f40
movzx ecx, word [rbp - 0x50]
lea rdx, [rbp - 0x50]
mov r8d, 4
mov dword [rbp + 0x548], ecx
call fcn.14003a620
jmp 0x1400811a4
lea rcx, [rbp - 0x70]
call qword [sym.imp.USER32.dll_GetKeyboardLayoutNameW]
lea rdx, [rbp - 0x70]
jmp 0x140081114
lea rdx, str.3__3__7__15
lea rcx, [rbp + 0x2d0]
call fcn.140014e5c
xor eax, eax
lea rcx, [rbp + 0x2d0]
mov edi, eax
mov r15d, eax
call fcn.140014a74
xor ecx, ecx
test eax, eax
jle 0x140081840
lea rbx, [rbp + 0x2d0]
lea r14, [rbp + 0x2d0]
lea esi, [rcx + 0x2e]
movzx eax, word [r14]
cmp ax, 0x20
je 0x140081826
add edi, r13d
cmp ax, 0x2c
jne 0x14008181f
mov word [rbx], si
jmp 0x140081822
mov word [rbx], ax
add rbx, 2
lea rcx, [rbp + 0x2d0]
add r15d, r13d
add r14, 2
call fcn.140014a74
cmp r15d, eax
jl 0x140081807
xor ecx, ecx
movsxd rax, edi
lea rdx, [rbp + 0x2d0]
mov word [rbp + rax*2 + 0x2d0], cx
mov rcx, r12
call fcn.140010e30
mov r15, qword [rbp + 0x538]
jmp case.0x14008110b.87
lea rdx, [rbp - 0x50]
mov r8d, 0x104
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
jmp 0x1400811a4
mov ecx, r13d
lea rdx, [rsp + 0x60]
call fcn.14003ad20
lea rdx, [rsp + 0x60]
jmp 0x140081114
mov ecx, 2
jmp 0x140081880
mov ecx, 3
jmp 0x140081880
mov ecx, 4
jmp 0x140081880
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 0x140081150
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 0x140081150
call qword [sym.imp.USER32.dll_GetDesktopWindow]
mov rcx, rax
mov rsi, rax
call qword [sym.imp.USER32.dll_GetDC]
mov edx, listen
mov rcx, rax
mov rdi, rax
call qword [sym.imp.GDI32.dll_GetDeviceCaps]
mov rcx, r12
mov ebx, eax
call fcn.1400077c0
mov rdx, rdi
mov rcx, rsi
mov dword [r12 + 8], r13d
mov dword [r12], ebx
call qword [sym.imp.USER32.dll_ReleaseDC]
jmp case.0x14008110b.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 0x1400818fa
lea rcx, str.COMSPEC
lea rdx, [rbp - 0x50]
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
jmp 0x1400811a4
lea rdx, [rbp - 0x50]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
lea rcx, [rbp - 0x50]
call fcn.1400135e0
jmp 0x1400811a4
lea rdx, [rbp + 0x548]
lea rcx, [rbp - 0x50]
mov dword [rbp + 0x548], 0x104
call qword [sym.imp.ADVAPI32.dll_GetUserNameW]
jmp 0x1400811a4
mov eax, dword [0x1400c0398]
cmp eax, 3
je case.0x14008110b.43
cmp eax, 4
jne case.0x14008110b.30
mov rcx, r12
call fcn.1400077c0
mov dword [r12], r13d
mov dword [r12 + 8], r13d
xor r12d, r12d
mov r13d, r12d
mov rcx, r15
call fcn.140002530
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 0x14008194a
lea rcx, str.HOMEDRIVE
jmp 0x14008194a
lea rcx, str.HOMEPATH
jmp 0x14008194a
lea rcx, str.HOMESHARE
jmp 0x14008194a
lea rcx, str.LOGONSERVER
jmp 0x14008194a
lea rcx, str.USERDOMAIN
jmp 0x14008194a
lea rcx, str.USERDNSDOMAIN
jmp 0x14008194a
mov ebx, dword [rbx + 0x23c]
jmp 0x140081150
mov rdx, qword [rbx + 0x240]
jmp 0x140081114
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
pxor xmm6, xmm6
mov rcx, r12
mov edx, eax
cvtsi2sd xmm6, rdx
call fcn.1400077c0
movsd qword [r12], xmm6
mov dword [r12 + 8], 3
jmp case.0x14008110b.87