Function at 0x140101930
Capabilities:
Link many functions at runtime

Disassembly:
mov rax, rsp
push rbx
push rbp
push rsi
push rdi
push r12
sub rsp, 0x70
mov qword [rsp + 0x30], 0xfffffffffffffffe
xor r12d, r12d
mov qword [rax + 0x18], r12
mov qword [rax + 0x10], r12
lea rcx, str.Kernel32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rbx, rax
mov qword [rsp + 0x38], rax
lea rdx, str.WTSGetActiveConsoleSessionId
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x40], rax
lea rdx, [0x14023ef50]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rbp, rax
mov qword [rsp + 0x48], rax
lea rcx, str.Wtsapi32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rdi, rax
mov qword [rsp + 0x50], rax
lea rdx, str.WTSQueryUserToken
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rsi, rax
mov qword [rsp + 0x58], rax
lea rdx, str.WTSQuerySessionInformationW
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.WTSFreeMemory
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
nop
test rbp, rbp
je 0x140101aaf
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, eax
lea rdx, [rsp + 0xa0]
call rbp
test eax, eax
je 0x140101aaf
mov ecx, dword [rsp + 0xa0]
test ecx, ecx
je 0x140101aaf
test rsi, rsi
je 0x140101aaf
lea rdx, [rsp + 0xb0]
call rsi
test eax, eax
je 0x140101aaf
lea rax, [rsp + 0xa8]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 1
lea r9d, [r12 + 2]
xor r8d, r8d
mov edx, 0xf01ff
mov rcx, qword [rsp + 0xb0]
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
mov rcx, qword [rsp + 0xa8]
test eax, eax
cmove rcx, r12
mov qword [rsp + 0xa8], rcx
mov rcx, qword [rsp + 0xb0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rsi, qword [rsp + 0xa8]
test rdi, rdi
je 0x140101a99
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
nop
test rbx, rbx
je 0x140101aa7
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rax, rsi
jmp 0x140101cbb
lea rcx, str.explorer.exe
call fcn.140101020
test eax, eax
jne 0x140101aec
mov rsi, qword [rsp + 0xa8]
test rdi, rdi
je 0x140101ad6
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
nop
test rbx, rbx
je 0x140101ae4
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rax, rsi
jmp 0x140101cbb
mov r8d, eax
xor edx, edx
mov ecx, 0x400
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rsi, rax
test rax, rax
jne 0x140101b60
cmp dword [reloc.WS2_32.dll_accept], 3
jg 0x140101b33
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
lea r9, str.OpenProcess_err__d
mov r8d, 0x7ff
lea rdx, str..Service.cpp
lea ecx, [rsi + 3]
call fcn.1400045f0
mov rsi, qword [rsp + 0xa8]
test rdi, rdi
je 0x140101b4a
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
nop
test rbx, rbx
je 0x140101b58
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rax, rsi
jmp 0x140101cbb
lea r8, [rsp + 0xb0]
mov edx, reloc.WS2_32.dll_inet_addr
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x140101be1
cmp dword [reloc.WS2_32.dll_accept], 3
jg 0x140101bab
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
lea r9, str.OpenProcessToken_err__d
mov r8d, 0x803
lea rdx, str..Service.cpp
mov ecx, 3
call fcn.1400045f0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rsi, qword [rsp + 0xa8]
test rdi, rdi
je 0x140101bcb
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
nop
test rbx, rbx
je 0x140101bd9
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rax, rsi
jmp 0x140101cbb
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea r11, [rsp + 0xa8]
mov qword [rsp + 0x28], r11
mov dword [rsp + 0x20], 1
xor r9d, r9d
xor r8d, r8d
mov edx, 0x2000000
mov rcx, qword [rsp + 0xb0]
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x140101c80
mov rcx, qword [rsp + 0xb0]
test rcx, rcx
je 0x140101c2f
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [reloc.WS2_32.dll_accept], 3
jg 0x140101c56
lea r9, str.DuplicateTokenEx_err
mov r8d, 0x80d
lea rdx, str..Service.cpp
mov ecx, 3
call fcn.1400045f0
mov rsi, qword [rsp + 0xa8]
test rdi, rdi
je 0x140101c6d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
nop
test rbx, rbx
je 0x140101c7b
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rax, rsi
jmp 0x140101cbb
mov rcx, qword [rsp + 0xb0]
test rcx, rcx
je 0x140101c93
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rsi, qword [rsp + 0xa8]
test rdi, rdi
je 0x140101caa
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
nop
test rbx, rbx
je 0x140101cb8
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rax, rsi
add rsp, 0x70
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret