Function at 0x1400220a0
Capabilities:
Get session information
Query or enumerate registry value

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x2c0]
sub rsp, 0x3c0
mov rax, qword [0x1400e9010]
xor rax, rsp
mov qword [rbp + 0x2b0], rax
mov r15, r9
mov rdi, r8
mov rsi, rdx
mov qword [rsp + 0x50], rdx
mov qword [rsp + 0x58], r8
xor r12d, r12d
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x60], r12d
mov dword [rsp + 0x64], r12d
lea r14d, [r12 - 1]
cmp byte [rbp + 0x328], r12b
je 0x1400222af
call qword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
mov ebx, eax
lea rax, [rsp + 0x68]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x70]
lea r8d, [r12 + 5]
mov edx, ebx
xor ecx, ecx
call qword [sym.imp.WTSAPI32.dll_WTSQuerySessionInformationW]
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x48], r12
lea rax, [rsp + 0x38]
mov qword [rsp + 0x78], rax
lea rdx, [rsp + 0x38]
mov ecx, ebx
call qword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
je 0x14002229f
lea rax, [rsp + 0x48]
mov qword [rbp - 0x80], rax
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 1
lea r9d, [r12 + 2]
xor r8d, r8d
mov edx, 0xf01ff
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x140022293
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
je 0x140022293
lea rdx, [rsp + 0x30]
mov ecx, 0x20019
call qword [sym.imp.ADVAPI32.dll_RegOpenCurrentUser]
lea rcx, [rsp + 0x30]
mov qword [rbp - 0x78], rcx
test eax, eax
jne 0x140022280
mov qword [rsp + 0x40], r12
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, str.SoftwareIntelIGN_
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x70], rcx
test eax, eax
jne 0x140022275
mov rdx, rdi
cmp qword [rdi + 0x18], 8
jb 0x140022204
mov rdx, qword [rdi]
lea rax, [rsp + 0x60]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x64]
xor r8d, r8d
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov r14d, eax
cmp eax, 0xea
je 0x140022234
test eax, eax
jne 0x140022275
mov edx, dword [rsp + 0x60]
mov rcx, r15
call fcn.14000dea0
mov rax, qword [r15]
mov rdx, rdi
cmp qword [rdi + 0x18], 8
jb 0x140022250
mov rdx, qword [rdi]
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x64]
xor r8d, r8d
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov r14d, eax
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
nop
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14002236e
cmp qword [rdx + 0x18], 8
jb 0x1400222b9
mov rdx, qword [rdx]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
mov rcx, 0xffffffff80000001
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea rcx, [rsp + 0x30]
mov qword [rsp + 0x70], rcx
test eax, eax
jne 0x140022362
mov rdx, rdi
cmp qword [rdi + 0x18], 8
jb 0x1400222f4
mov rdx, qword [rdi]
lea rax, [rsp + 0x60]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x64]
xor r8d, r8d
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, 0xea
je 0x140022321
test eax, eax
jne 0x140022362
mov edx, dword [rsp + 0x60]
mov rcx, r15
call fcn.14000dea0
mov rax, qword [r15]
mov rdx, rdi
cmp qword [rdi + 0x18], 8
jb 0x14002233d
mov rdx, qword [rdi]
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x64]
xor r8d, r8d
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov r14d, eax
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
mov rcx, rsi
call fcn.140005140
nop
mov rcx, rdi
call fcn.140005140
mov eax, r14d
mov rcx, qword [rbp + 0x2b0]
xor rcx, rsp
call fcn.1400a6140
add rsp, 0x3c0
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret