Function at 0x180035f90
Capabilities:
Get hostname
Get session information
Get session user name
Query or enumerate registry value

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
sub rsp, 0x4c0
mov qword [rsp + 0x68], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov rax, qword [0x180295a70]
xor rax, rsp
mov qword [rsp + 0x4b0], rax
mov rsi, rcx
xor r13d, r13d
mov qword [rsp + 0x50], r13
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rcx, rax
lea r9, [rsp + 0x50]
mov ebp, 1
mov r8d, ebp
lea edx, [rbp + 0xb]
call qword [sym.imp.ADVAPI32.dll_OpenThreadToken]
cmp qword [rsp + 0x50], r13
je 0x180035ffe
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
nop
mov rdi, qword [rsi]
test rdi, rdi
je 0x18003601d
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov qword [rsi], r13
mov rdi, qword [rsi + 8]
test rdi, rdi
je 0x18003603e
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov qword [rsi + 8], r13
mov rcx, qword [rsi + 0x10]
test rcx, rcx
je 0x180036051
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov qword [rsi + 0x10], r13
mov rcx, qword [rsi + 0x18]
test rcx, rcx
je 0x180036064
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsi + 0x18], r13
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [rsp + 0x40], r13d
lea rdx, [rsp + 0x40]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
je 0x180036414
mov word [rsp + 0x70], 0
xor eax, eax
mov qword [rsp + 0x72], rax
mov qword [rsp + 0x7a], rax
mov qword [rsp + 0x82], rax
mov dword [rsp + 0x8a], eax
mov word [rsp + 0x8e], ax
mov dword [rsp + 0x58], reloc.OLEAUT32.dll_SafeArrayGetDim
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_GetComputerNameW]
lea rcx, [rsp + 0x70]
call sub.WTSAPI32.dll_WTSOpenServerW
mov rdi, rax
test rax, rax
je 0x18003619c
mov qword [rsp + 0x38], r13
mov dword [rsp + 0x30], r13d
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x38]
mov r8d, 5
mov edx, dword [rsp + 0x40]
mov rcx, rdi
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
mov ebx, eax
test eax, eax
je 0x18003618c
cmp qword [rsp + 0x38], 0
je 0x18003618c
mov qword [rsp + 0x48], r13
mov dword [rsp + 0x30], r13d
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x48]
mov r8d, 7
mov edx, dword [rsp + 0x40]
mov rcx, rdi
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
mov r8, qword [rsp + 0x48]
mov rdx, qword [rsp + 0x38]
mov rcx, rsi
call fcn.180035280
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x180036166
call sub.WTSAPI32.dll_WTSFreeMemory
mov qword [rsp + 0x48], r13
mov rcx, qword [rsp + 0x38]
call sub.WTSAPI32.dll_WTSFreeMemory
mov qword [rsp + 0x38], r13
mov rdx, qword [rsi]
test rdx, rdx
je 0x18003618c
cmp word [rdx], 0
je 0x18003618c
lea rcx, [rsi + 0x20]
call fcn.180038d00
mov rcx, rdi
call sub.WTSAPI32.dll_WTSCloseServer
test ebx, ebx
jne 0x180036414
lea rcx, [rsi + 0x20]
call fcn.180038df0
test rax, rax
je 0x1800361c3
cmp word [rax], 0
je 0x1800361c3
xor r8d, r8d
mov rdx, rax
mov rcx, rsi
call fcn.180035280
jmp 0x180036414
cmp dword [rsp + 0x40], 0
jne 0x180036414
mov rbx, r13
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x48], r13
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
mov r9d, 0x2001f
xor r8d, r8d
lea rdx, str.SoftwareMicrosoftWindows_NTCurrentVersionWinlogon
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1800363d8
mov rbx, qword [rsp + 0x48]
mov qword [rsp + 0x60], rbx
mov word [rsp + 0x90], ax
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0x92]
call fcn.1801603e0
mov dword [rsp + 0x30], 0x208
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x90]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x38]
xor r8d, r8d
lea rdx, str.AltDefaultUserName
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1800363d8
mov eax, dword [rsp + 0x38]
cmp eax, 1
je 0x180036282
cmp eax, 2
jne 0x1800363d8
mov eax, dword [rsp + 0x30]
test eax, eax
je 0x1800363d8
test al, 1
jne 0x1800363d8
shr rax, 1
cmp word [rsp + rax*2 + 0x8e], 0
jne 0x1800363d8
cmp word [rsp + 0x90], 0
je 0x1800363d8
mov word [rsp + 0x2a0], 0
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0x2a2]
call fcn.1801603e0
mov dword [rsp + 0x30], 0x208
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x2a0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x38]
xor r8d, r8d
lea rdx, str.AltDefaultDomainName
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x180036332
mov eax, dword [rsp + 0x38]
cmp eax, 1
je 0x18003631f
cmp eax, 2
jne 0x180036332
cmp dword [rsp + 0x30], 0
jne 0x180036332
mov word [rsp + 0x2a0], 0
jmp 0x180036341
cmp word [rsp + 0x2a0], 0
jne 0x1800363c0
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x90]
repne scasw ax, word [rdi]
not rcx
sub rcx, 1
mov edx, r13d
test ecx, ecx
je 0x1800363c0
lea rax, [rsp + 0x90]
cmp word [rax], 0x40
je 0x18003637b
add edx, 1
add rax, 2
cmp edx, ecx
jb 0x180036368
jmp 0x1800363c0
mov eax, edx
mov word [rsp + rax*2 + 0x90], 0
lea eax, [rdx + 1]
mov ecx, eax
lea rdx, [rsp + rax*2 + 0x90]
add rcx, rcx
lea rdi, [rsp + 0x2a0]
sub rdi, rcx
lea rax, [rsp + 0x90]
sub rdi, rax
nop
movzx eax, word [rdx]
mov word [rdi + rdx], ax
add rdx, 2
test ax, ax
jne 0x1800363b0
lea r8, [rsp + 0x2a0]
lea rdx, [rsp + 0x90]
mov rcx, rsi
call fcn.180035280
mov rax, qword [rsi]
test rax, rax
je 0x1800363e6
cmp word [rax], 0
jne 0x1800363ee
mov rcx, rsi
call fcn.180035390
mov rdx, qword [rsi]
test rdx, rdx
je 0x180036406
cmp word [rdx], 0
je 0x180036406
lea rcx, [rsi + 0x20]
call fcn.180038d00
nop
test rbx, rbx
je 0x180036414
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rax, qword [rsi]
test rax, rax
je 0x180036422
cmp word [rax], 0
jne 0x180036425
mov ebp, r13d
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x180036444
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebp
jmp 0x180036446
mov eax, ebp
mov rcx, qword [rsp + 0x4b0]
xor rcx, rsp
call fcn.1801604e0
lea r11, [rsp + 0x4c0]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r13
pop r12
pop rdi
ret