Function at 0x1400fd760
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, [0x14023c0a0]
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 0x1400fd8df
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, eax
lea rdx, [rsp + 0xa0]
call rbp
test eax, eax
je 0x1400fd8df
mov ecx, dword [rsp + 0xa0]
test ecx, ecx
je 0x1400fd8df
test rsi, rsi
je 0x1400fd8df
lea rdx, [rsp + 0xb0]
call rsi
test eax, eax
je 0x1400fd8df
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 0x1400fd8c9
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
nop
test rbx, rbx
je 0x1400fd8d7
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rax, rsi
jmp 0x1400fdaeb
lea rcx, str.explorer.exe
call fcn.1400fce40
test eax, eax
jne 0x1400fd91c
mov rsi, qword [rsp + 0xa8]
test rdi, rdi
je 0x1400fd906
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
nop
test rbx, rbx
je 0x1400fd914
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rax, rsi
jmp 0x1400fdaeb
mov r8d, eax
xor edx, edx
mov ecx, 0x400
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rsi, rax
test rax, rax
jne 0x1400fd990
cmp dword [reloc.WS2_32.dll_accept], 3
jg 0x1400fd963
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
lea r9, str.OpenProcess_err__d
mov r8d, 0x80a
lea rdx, str..Service.cpp
lea ecx, [rsi + 3]
call fcn.1400045a0
mov rsi, qword [rsp + 0xa8]
test rdi, rdi
je 0x1400fd97a
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
nop
test rbx, rbx
je 0x1400fd988
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rax, rsi
jmp 0x1400fdaeb
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 0x1400fda11
cmp dword [reloc.WS2_32.dll_accept], 3
jg 0x1400fd9db
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
lea r9, str.OpenProcessToken_err__d
mov r8d, 0x80e
lea rdx, str..Service.cpp
mov ecx, 3
call fcn.1400045a0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rsi, qword [rsp + 0xa8]
test rdi, rdi
je 0x1400fd9fb
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
nop
test rbx, rbx
je 0x1400fda09
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rax, rsi
jmp 0x1400fdaeb
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 0x1400fdab0
mov rcx, qword [rsp + 0xb0]
test rcx, rcx
je 0x1400fda5f
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [reloc.WS2_32.dll_accept], 3
jg 0x1400fda86
lea r9, str.DuplicateTokenEx_err
mov r8d, 0x818
lea rdx, str..Service.cpp
mov ecx, 3
call fcn.1400045a0
mov rsi, qword [rsp + 0xa8]
test rdi, rdi
je 0x1400fda9d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
nop
test rbx, rbx
je 0x1400fdaab
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rax, rsi
jmp 0x1400fdaeb
mov rcx, qword [rsp + 0xb0]
test rcx, rcx
je 0x1400fdac3
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rsi, qword [rsp + 0xa8]
test rdi, rdi
je 0x1400fdada
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
nop
test rbx, rbx
je 0x1400fdae8
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