Function at 0x140021618
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 - 0x228]
sub rsp, 0x2f0
mov r12, rdx
movaps xmmword [rax - 0x48], xmm6
mov rbx, rcx
xor r15d, r15d
mov edx, 0x104
mov word [rbp - 0x30], r15w
lea rcx, [rsp + 0x30]
mov r14, r8
call fcn.140005894
mov r13, qword [r12]
lea rsi, str.ERROR
mov edi, r15d
mov rcx, qword [rsi]
mov rdx, r13
call fcn.140029b4c
mov r8d, 1
test eax, eax
je 0x140021692
add edi, r8d
lea rax, [0x1400c9038]
add rsi, 8
cmp rsi, rax
jl 0x14002166a
cmp edi, 0x61
je 0x140069040
cmp edi, 0x60
ja case.0x1400216b4.88
lea rdx, [0x140000000]
movsxd rax, edi
mov ecx, dword [rdx + rax*4 + 0x21728]
add rcx, rdx
jmp rcx
lea rdx, [rbx + 0x190]
mov rcx, r14
call fcn.14000a1e4
lea rcx, [rsp + 0x30]
call fcn.1400054ac
lea r11, [rsp + 0x2f0]
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, [0x1400b7510]
mov rcx, r14
call fcn.14000af78
jmp case.0x1400216b4.88
lea rdx, [rbx + 0x170]
jmp 0x1400216bd
mov rcx, r14
call fcn.14000fad0
mov dword [r14], 1
mov dword [r14 + 0x10], 1
jmp case.0x1400216b4.88
lea rdx, [0x1400df068]
lea rcx, [rbp - 0x58]
call fcn.14000c6d0
mov rdx, r12
lea rcx, [rbp - 0x58]
call fcn.140004274
xor r9d, r9d
mov dword [rbp + 0x248], r15d
lea r8, [rbp + 0x248]
lea rdx, [rbp - 0x58]
call fcn.14000ac88
test rax, rax
jne 0x140069081
or r15d, 0xffffffff
jmp 0x14006908c
mov rdx, rax
mov rcx, r14
call fcn.14000c814
lea rcx, [rbp - 0x58]
jmp 0x1400691a4
lea rdx, [0x1400df0c4]
jmp 0x1400216f9
lea rdx, [0x1400c63a8]
jmp 0x1400216f9
lea rdx, reloc.WSOCK32.dll_htons
jmp 0x1400216f9
mov rax, qword [rbx]
movsxd rcx, dword [rax + 4]
add rcx, 8
add rcx, rbx
call fcn.140001de4
mov ebx, dword [rax + 0x1c]
jmp 0x1400690d7
mov ebx, dword [rbx + 0x244]
mov rcx, r14
call fcn.14000fad0
mov dword [r14], ebx
jmp 0x14002171b
mov rax, qword [rbx]
movsxd rcx, dword [rax + 4]
add rcx, 8
add rcx, rbx
call fcn.140001de4
mov rcx, r14
lea rdx, [rax + 0x28]
call fcn.14000c814
nop
jmp case.0x1400216b4.88
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx r8d, word [rsp + 0x5e]
lea rdx, str._.3d
jmp 0x140069130
mov r8d, r15d
lea rdx, [0x1400de330]
lea rcx, [rbp - 0x30]
call fcn.140024d90
jmp 0x140069156
lea rdx, [rbp + 0x238]
mov dword [rbp + 0x238], 0x104
lea rcx, [rbp - 0x30]
call qword [sym.imp.ADVAPI32.dll_GetUserNameW]
lea rdx, [rbp - 0x30]
jmp 0x1400216f9
lea rcx, [rbp + 0x248]
call fcn.14009c2d8
lea r8, [0x1400df0dc]
jmp 0x140069187
lea rcx, [rbp + 0x248]
call fcn.14009c2d8
lea r8, [0x1400df104]
mov rcx, rax
lea rdx, [rsp + 0x50]
call fcn.14009c210
mov rdx, rax
mov rcx, r14
call fcn.14000a1e4
lea rcx, [rsp + 0x50]
call fcn.1400054ac
nop
jmp case.0x1400216b4.88
lea rcx, [rbp + 0x248]
call fcn.14009c2d8
lea r8, [0x1400df0e4]
jmp 0x140069187
lea rcx, [rbp + 0x248]
call fcn.14009c2d8
lea r8, [0x1400df0ec]
jmp 0x140069187
lea rcx, [rbp + 0x248]
call fcn.14009c2d8
lea r8, [0x1400de330]
jmp 0x140069187
lea rcx, [rbp + 0x248]
call fcn.14009c2d8
lea r8, [0x1400df0f4]
jmp 0x140069187
lea rcx, [rbp + 0x248]
call fcn.14009c2d8
lea r8, [0x1400df0fc]
jmp 0x140069187
lea rcx, [rbp + 0x248]
call fcn.14009c2d8
lea rdx, [rsp + 0x50]
mov rcx, rax
call fcn.14009c288
test rax, rax
je 0x140069126
mov r8d, dword [rax + 0x18]
inc r8d
jmp 0x140069129
mov ecx, reloc.OLEAUT32.dll_SafeArrayDestroyData
jmp 0x140069255
mov ecx, 7
lea rdx, [rsp + 0x30]
call fcn.14007da38
jmp 0x14006926b
lea rcx, [rsp + 0x30]
call fcn.14001d230
lea rdx, [rsp + 0x30]
jmp 0x1400216bd
mov ecx, 0x2b
jmp 0x140069255
mov ecx, 5
jmp 0x140069255
mov ecx, SafeArrayRedim
jmp 0x140069255
mov ecx, 0x19
jmp 0x140069255
mov ecx, 0x2e
jmp 0x140069255
mov ecx, reloc.OLEAUT32.dll_CreateStdDispatch
jmp 0x140069255
mov ecx, reloc.WSOCK32.dll_socket
jmp 0x140069255
mov ecx, socket
jmp 0x140069255
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetElement
jmp 0x140069255
mov ecx, RegisterActiveObject
jmp 0x140069255
mov ecx, 0x1a
jmp 0x140069255
mov ecx, reloc.WSOCK32.dll_recv
jmp 0x140069255
mov ecx, 6
jmp 0x140069255
mov ecx, 2
jmp 0x140069255
mov ecx, reloc.WSOCK32.dll_inet_ntoa
jmp 0x140069255
lea rdx, [rbp + 0x238]
mov dword [rbp + 0x238], 0x104
lea rcx, [rbp - 0x30]
call qword [sym.imp.KERNEL32.dll_GetComputerNameW]
jmp 0x140069156
mov edx, 0x104
lea rcx, [rbp - 0x30]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je case.0x1400216b4.88
jmp 0x140069156
cmp byte [0x1400f146e], r15b
je 0x140069361
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x50], r15
mov qword [rsp + 0x60], r15
call fcn.14009c128
mov edx, 0x104
lea rcx, [rbp - 0x30]
call rax
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x140069156
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x140069156
mov edx, 0x104
lea rcx, [rbp - 0x30]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x140069156
mov rcx, r14
call fcn.14000fad0
mov dword [r14], r15d
jmp 0x14002171b
mov rcx, r14
call fcn.14000fad0
mov dword [r14], 6
jmp 0x14002171b
mov rcx, r14
call fcn.14000fad0
mov dword [r14], 9
jmp 0x14002171b
mov rcx, r14
call fcn.14000fad0
mov dword [r14], 5
jmp 0x14002171b
mov rcx, r14
call fcn.14000fad0
mov dword [r14], 0xa
jmp 0x14002171b
mov rcx, r14
call fcn.14000fad0
mov dword [r14], 3
jmp 0x14002171b
mov rcx, r14
call fcn.14000fad0
mov dword [r14], 2
jmp 0x14002171b
mov rcx, r14
call fcn.14000fad0
mov dword [r14], 7
jmp 0x14002171b
mov rcx, r14
call fcn.14000fad0
mov dword [r14], 8
jmp 0x14002171b
mov rcx, r14
call fcn.14000fad0
mov dword [r14], 4
jmp 0x14002171b
cmp byte [0x1400f13bc], r8b
jmp 0x140069449
cmp byte [0x1400f1e6d], r8b
mov ebx, r15d
sete bl
jmp 0x140069463
mov eax, dword [0x1400f14c0]
mov ebx, r15d
add eax, 0xfffffffd
cmp eax, r8d
setbe bl
mov rcx, r14
call fcn.14000fad0
mov dword [r14 + 0x10], 1
mov dword [r14], ebx
jmp case.0x1400216b4.88
mov rcx, r14
call fcn.14000fad0
mov dword [r14], 0x40
jmp 0x14002171b
mov rcx, r14
call fcn.14000fad0
mov dword [r14], 0x41
jmp 0x14002171b
mov rcx, r14
call fcn.14000fad0
mov dword [r14], 0x42
jmp 0x14002171b
mov rcx, r14
call fcn.14000fad0
mov dword [r14], 0x43
jmp 0x14002171b
lea rdx, [rbx + 0x150]
jmp 0x1400216bd
mov edx, dword [rbx + 0x1c4]
call fcn.14007856c
mov ebx, eax
jmp 0x1400690d7
lea rdx, [rbp - 0x30]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
jmp 0x140069156
movzx eax, word [0x1400f1470]
test eax, eax
je 0x140069533
cmp eax, 6
je 0x140069527
cmp eax, 9
lea rdx, str.UNKNOWN
lea rcx, [0x1400df128]
cmove rdx, rcx
jmp 0x1400216f9
lea rdx, str.IA64
jmp 0x1400216f9
lea rdx, [0x1400df110]
jmp 0x1400216f9
xor ecx, ecx
mov eax, 0x80000001
cpuid
bt edx, 0x1d
lea rcx, [0x1400df128]
lea rdx, [0x1400df110]
cmovae rcx, rdx
mov rdx, rcx
jmp 0x1400216f9
lea rdx, str.WIN32_NT
jmp 0x1400216f9
cmp byte [0x1400f1466], r8b
jne 0x140069587
lea rdx, str.WIN_11
jmp 0x1400216f9
cmp byte [0x1400f1464], r8b
jne 0x14006959c
lea rdx, str.WIN_10
jmp 0x1400216f9
cmp byte [0x1400f146c], r8b
jne 0x1400695b1
lea rdx, str.WIN_2022
jmp 0x1400216f9
cmp byte [0x1400f146a], r8b
jne 0x1400695c6
lea rdx, str.WIN_2019
jmp 0x1400216f9
cmp byte [0x1400f1468], r8b
jne 0x1400695db
lea rdx, str.WIN_2016
jmp 0x1400216f9
cmp byte [0x1400f1460], r8b
jne 0x1400695f0
lea rdx, str.WIN_81
jmp 0x1400216f9
cmp byte [0x1400f1462], r8b
jne 0x140069605
lea rdx, str.WIN_2012R2
jmp 0x1400216f9
cmp byte [0x1400f145e], r8b
jne 0x14006961a
lea rdx, str.WIN_2012
jmp 0x1400216f9
cmp byte [0x1400f145c], r8b
jne 0x14006962f
lea rdx, str.WIN_8
jmp 0x1400216f9
cmp byte [0x1400f145a], r8b
jne 0x140069644
lea rdx, str.WIN_2008R2
jmp 0x1400216f9
cmp byte [0x1400f1458], r8b
jne 0x140069659
lea rdx, str.WIN_7
jmp 0x1400216f9
cmp byte [0x1400f1456], r8b
jne 0x14006966e
lea rdx, str.WIN_2008
jmp 0x1400216f9
cmp byte [0x1400f1454], r8b
jne 0x140069683
lea rdx, str.WIN_VISTA
jmp 0x1400216f9
cmp byte [0x1400f1452], r8b
jne 0x140069698
lea rdx, str.WIN_2003
jmp 0x1400216f9
cmp byte [0x1400f1450], r8b
jne 0x1400696bf
cmp byte [0x1400f1472], r15b
lea rdx, str.WIN_XPe
lea rax, str.WIN_XP
cmove rdx, rax
jmp 0x1400216f9
lea rdx, str.UNKNOWN
jmp 0x1400216f9
mov ebx, dword [0x1400f1428]
jmp 0x1400690d7
lea rdx, [0x1400f1430]
jmp 0x1400216bd
lea rax, [rbp - 0x30]
mov r9d, 0x104
lea r8, str.InstallLanguage
mov qword [rsp + 0x20], rax
lea rdx, str.SYSTEMCurrentControlSetControlNlsLanguage
mov rcx, 0xffffffff80000002
call fcn.140023910
jmp 0x140069156
lea rax, [rbp - 0x30]
mov r9d, 0x104
lea r8, str.SchemeLangID
mov qword [rsp + 0x20], rax
lea rdx, str.Control_PanelAppearance
mov rcx, 0xffffffff80000001
call fcn.140023910
movzx ecx, word [rbp - 0x30]
lea rdx, [rbp - 0x30]
mov r8d, 4
mov dword [rbp + 0x238], ecx
call fcn.14000c760
jmp 0x140069156
lea rcx, [rbp - 0x58]
call qword [sym.imp.USER32.dll_GetKeyboardLayoutNameW]
lea rdx, [rbp - 0x58]
jmp 0x1400216f9
lea rcx, [rbp - 0x30]
call fcn.14009c178
jmp 0x140069156
mov ecx, r8d
jmp 0x140069782
mov ecx, 4
lea rdx, [rbp - 0x78]
call fcn.14007d938
lea rdx, [rbp - 0x78]
jmp 0x1400216f9
mov ecx, 2
jmp 0x140069782
mov ecx, 3
jmp 0x140069782
call qword [sym.imp.USER32.dll_GetDesktopWindow]
mov rcx, rax
lea rdx, [rsp + 0x78]
call qword [sym.imp.USER32.dll_GetWindowRect]
mov ebx, dword [rbp - 0x80]
jmp 0x1400690d7
call qword [sym.imp.USER32.dll_GetDesktopWindow]
mov rcx, rax
lea rdx, [rsp + 0x78]
call qword [sym.imp.USER32.dll_GetWindowRect]
mov ebx, dword [rbp - 0x7c]
jmp 0x1400690d7
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_ioctlsocket
jmp 0x14006980a
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.14000fad0
mov rdx, rdi
mov dword [r14 + 0x10], 1
mov rcx, rsi
mov dword [r14], ebx
call qword [sym.imp.USER32.dll_ReleaseDC]
nop
jmp case.0x1400216b4.88
lea rcx, str.COMSPEC
jmp 0x14006984d
lea rcx, str.USERDNSDOMAIN
lea rdx, [rbp - 0x30]
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
jmp 0x140069156
lea rdx, [rbp - 0x30]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
lea rcx, [rbp - 0x30]
call fcn.140023ec4
jmp 0x140069156
lea rcx, str.USERPROFILE
jmp 0x14006984d
lea rcx, str.HOMEDRIVE
jmp 0x14006984d
lea rcx, str.HOMEPATH
jmp 0x14006984d
lea rcx, str.HOMESHARE
jmp 0x14006984d
lea rcx, str.LOGONSERVER
jmp 0x14006984d
lea rcx, str.USERDOMAIN
jmp 0x14006984d
lea rdx, [rbx + 0x248]
jmp 0x1400216bd
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov eax, eax
xorps xmm6, xmm6
mov rcx, r14
cvtsi2sd xmm6, rax
call fcn.14000fad0
mov dword [r14 + 0x10], 3
movsd qword [r14], xmm6
jmp case.0x1400216b4.88