Function at 0x140008650
Capabilities:
Get hostname
Get session user name
Get token membership
Get token privileges
Terminate process

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x250]
sub rsp, 0x350
mov rax, qword [0x140032040]
xor rax, rsp
mov qword [rbp + 0x240], rax
mov rsi, rcx
mov qword [rsp + 0x68], rcx
xor r15d, r15d
mov dword [rsp + 0x60], r15d
xor edx, edx
mov r8d, 0xe8
lea rcx, [rbp + 0x20]
call sub.VCRUNTIME140.dll_memset
lea rax, [0x1400293e0]
mov qword [rbp + 0x20], rax
lea rcx, [rbp + 0xa8]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::constructor_void____ptr64]
nop
mov dword [rsp + 0x60], 8
xor r9d, r9d
xor r8d, r8d
lea rdx, [rbp + 0x28]
lea rcx, [rbp + 0x20]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char______ptr64__bool____ptr64]
nop
mov rax, qword [rbp + 0x20]
movsxd rcx, dword [rax + 4]
lea r12, vtable.std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rbp + rcx + 0x20], r12
mov rax, qword [rbp + 0x20]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x88]
mov dword [rbp + rcx + 0x1c], edx
lea rcx, [rbp + 0x28]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void____ptr64]
lea rax, vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rbp + 0x28], rax
mov qword [rbp + 0x90], r15
mov dword [rbp + 0x98], 4
lea rcx, [rbp - 0x20]
call fcn.140003980
nop
cmp qword [rbp - 0x10], r15
jne 0x140008764
lea rdx, str.Public_IP_is_empty._Exiting...
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140012ec0
lea rdx, [0x140013090]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_ExitProcess]
mov dword [rsp + 0x78], 0x10
lea r8, [rsp + 0x78]
lea rdx, [rbp + 0x110]
mov ecx, 2
call qword [sym.imp.KERNEL32.dll_GetComputerNameExA]
mov rbx, 0xffffffffffffffff
xorps xmm0, xmm0
mov qword [rbp - 0x70], r15
mov qword [rbp - 0x68], r15
movups xmmword [rbp - 0x80], xmm0
test eax, eax
jne 0x1400087a9
xor r8d, r8d
lea rdx, [0x140026c01]
jmp 0x1400087c4
lea rax, [rbp + 0x110]
mov r8, rbx
inc r8
cmp byte [rax + r8], 0
jne 0x1400087b3
lea rdx, [rbp + 0x110]
lea rcx, [rbp - 0x80]
call fcn.140004410
nop
mov dword [rsp + 0x78], 0x101
lea rdx, [rsp + 0x78]
lea rcx, [rbp + 0x130]
call qword [sym.imp.ADVAPI32.dll_GetUserNameA]
xorps xmm0, xmm0
movups xmmword [rbp - 0x40], xmm0
mov qword [rbp - 0x30], r15
mov qword [rbp - 0x28], r15
lea rax, [rbp + 0x130]
mov r8, rbx
inc r8
cmp byte [rax + r8], 0
jne 0x140008801
lea rdx, [rbp + 0x130]
lea rcx, [rbp - 0x40]
call fcn.140004410
nop
mov dword [rsp + 0x78], r15d
mov dword [rsp + 0x70], 0
mov word [rsp + 0x74], 0x500
lea rax, [rbp + 0x110]
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x48], r15d
mov dword [rsp + 0x40], r15d
mov dword [rsp + 0x38], r15d
mov dword [rsp + 0x30], r15d
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], r15d
mov r9d, 0x220
mov r8d, 0x20
mov dl, 2
lea rcx, [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x140008898
lea r8, [rsp + 0x78]
mov rdx, qword [rbp + 0x110]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
mov rcx, qword [rbp + 0x110]
call qword [sym.imp.ADVAPI32.dll_FreeSid]
cmp dword [rsp + 0x78], 0
setne r14b
mov qword [rsp + 0x70], r15
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rsp + 0x70]
mov edx, 8
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x14000893b
mov dword [rsp + 0x78], r15d
lea rax, [rsp + 0x78]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, 3
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x140008930
mov ecx, dword [rsp + 0x78]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
mov rcx, qword [rsp + 0x70]
test rax, rax
je 0x140008935
lea rax, [rsp + 0x78]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x78]
mov r8, rdi
mov edx, 3
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [rsp + 0x78], 0x100
lea rdx, [rsp + 0x78]
lea rcx, [rbp + 0x130]
call qword [sym.imp.KERNEL32.dll_GetComputerNameA]
xorps xmm0, xmm0
movups xmmword [rbp - 0x60], xmm0
mov qword [rbp - 0x50], r15
mov qword [rbp - 0x48], r15
lea rax, [rbp + 0x130]
nop dword [rax + rax]
inc rbx
cmp byte [rax + rbx], 0
jne 0x140008970
mov r8, rbx
lea rdx, [rbp + 0x130]
lea rcx, [rbp - 0x60]
call fcn.140004410
nop
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp], xmm0
mov qword [rbp + 0x10], rax
lea rcx, [rbp]
call fcn.140004d60
nop
lea rax, [rsp + 0x78]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x70]
xor edx, edx
xor ecx, ecx
mov r8d, 1
call qword [sym.imp.WTSAPI32.dll_WTSEnumerateSessionsW]
test eax, eax
je 0x140008a1a
mov ebx, r15d
mov r8d, dword [rsp + 0x78]
mov rdx, qword [rsp + 0x70]
test r8d, r8d
je 0x140008a11
nop dword [rax]
mov eax, ebx
lea rcx, [rax + rax*2]
lea rdi, [rcx*8]
cmp dword [rdi + rdx + 0x10], 0
jne 0x140008a0a
call qword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
mov rdx, qword [rsp + 0x70]
cmp dword [rdx + rdi], eax
jne 0x140008a1a
mov r8d, dword [rsp + 0x78]
inc ebx
cmp ebx, r8d
jb 0x1400089e0
mov rcx, rdx
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
lea rdx, str.Username:
lea rcx, [rbp + 0x20]
call fcn.140012ec0
lea rdx, [rbp - 0x40]
cmp qword [rbp - 0x28], 0xf
cmova rdx, qword [rbp - 0x40]
mov r8, qword [rbp - 0x30]
mov rcx, rax
call fcn.140018150
lea rdx, [0x1400270c0]
mov rcx, rax
call fcn.140012ec0
lea rax, [0x14002745c]
lea rbx, [0x140027460]
test r14b, r14b
cmovne rbx, rax
lea rdx, str.Is_Admin:
lea rcx, [rbp + 0x20]
call fcn.140012ec0
mov rcx, rax
mov rdx, rbx
call fcn.140012ec0
mov rcx, rax
lea rdx, [0x1400270c0]
call fcn.140012ec0
lea rdx, str.Hostname:
lea rcx, [rbp + 0x20]
call fcn.140012ec0
lea rdx, [rbp - 0x60]
cmp qword [rbp - 0x48], 0xf
cmova rdx, qword [rbp - 0x60]
mov r8, qword [rbp - 0x50]
mov rcx, rax
call fcn.140018150
lea rdx, [0x1400270c0]
mov rcx, rax
call fcn.140012ec0
lea rdx, str.Domain:
lea rcx, [rbp + 0x20]
call fcn.140012ec0
lea rdx, [rbp - 0x80]
cmp qword [rbp - 0x68], 0xf
cmova rdx, qword [rbp - 0x80]
mov r8, qword [rbp - 0x70]
mov rcx, rax
call fcn.140018150
lea rdx, [0x1400270c0]
mov rcx, rax
call fcn.140012ec0
lea rdx, str.Public_IP:
lea rcx, [rbp + 0x20]
call fcn.140012ec0
lea rdx, [rbp - 0x20]
cmp qword [rbp - 8], 0xf
cmova rdx, qword [rbp - 0x20]
mov r8, qword [rbp - 0x10]
mov rcx, rax
call fcn.140018150
lea rdx, [0x1400270c0]
mov rcx, rax
call fcn.140012ec0
lea rdx, str.Local_IPs:
lea rcx, [rbp + 0x20]
call fcn.140012ec0
mov rdi, qword [rbp + 8]
mov rbx, qword [rbp]
cmp rbx, rdi
je 0x140008b92
nop word [rax + rax]
mov rdx, rbx
cmp qword [rbx + 0x18], 0xf
jbe 0x140008b6d
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x10]
lea rcx, [rbp + 0x20]
call fcn.140018150
lea rdx, [0x1400274b4]
mov rcx, rax
call fcn.140012ec0
add rbx, 0x20
cmp rbx, rdi
jne 0x140008b60
lea rdx, [0x1400270c0]
lea rcx, [rbp + 0x20]
call fcn.140012ec0
nop
xorps xmm0, xmm0
movups xmmword [rsi], xmm0
mov qword [rsi + 0x10], r15
mov qword [rsi + 0x18], 0xf
mov byte [rsi], 0
mov dword [rsp + 0x60], 0x7c
movups xmmword [rbp + 0x110], xmm0
mov ecx, dword [rbp + 0x98]
mov eax, ecx
and al, 0x22
cmp al, 2
je 0x140008bfc
mov rax, qword [rbp + 0x68]
mov r8, qword [rax]
test r8, r8
je 0x140008bfc
mov rax, qword [rbp + 0x48]
mov rdx, qword [rax]
cmp r8, qword [rbp + 0x90]
cmovb r8, qword [rbp + 0x90]
sub r8, rdx
jmp 0x140008c31
test cl, 4
jne 0x140008c23
mov rax, qword [rbp + 0x60]
mov rcx, qword [rax]
test rcx, rcx
je 0x140008c23
mov rax, qword [rbp + 0x40]
mov rdx, qword [rax]
mov rax, qword [rbp + 0x78]
movsxd r8, dword [rax]
sub r8, rdx
add r8, rcx
jmp 0x140008c31
mov r8, qword [rbp + 0x118]
mov rdx, qword [rbp + 0x110]
test rdx, rdx
je 0x140008c3f
mov rcx, rsi
call fcn.140012970
nop
lea rcx, [rbp]
call fcn.140010d20
nop
mov rdx, qword [rbp - 0x48]
cmp rdx, 0xf
jbe 0x140008c87
inc rdx
mov rcx, qword [rbp - 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140008c82
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140008c82
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140022240
mov qword [rbp - 0x50], r15
mov qword [rbp - 0x48], 0xf
mov byte [rbp - 0x60], 0
mov rdx, qword [rbp - 0x28]
cmp rdx, 0xf
jbe 0x140008cd5
inc rdx
mov rcx, qword [rbp - 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140008cd0
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140008cd0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140022240
mov qword [rbp - 0x30], r15
mov qword [rbp - 0x28], 0xf
mov byte [rbp - 0x40], 0
mov rdx, qword [rbp - 0x68]
cmp rdx, 0xf
jbe 0x140008d23
inc rdx
mov rcx, qword [rbp - 0x80]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140008d1e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140008d1e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140022240
mov qword [rbp - 0x70], r15
mov qword [rbp - 0x68], 0xf
mov byte [rbp - 0x80], 0
mov rdx, qword [rbp - 8]
cmp rdx, 0xf
jbe 0x140008d71
inc rdx
mov rcx, qword [rbp - 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140008d6c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140008d6c
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140022240
mov qword [rbp - 0x10], r15
mov qword [rbp - 8], 0xf
mov byte [rbp - 0x20], 0
mov rcx, qword [rbp + 0x20]
movsxd rdx, dword [rcx + 4]
mov qword [rbp + rdx + 0x20], r12
mov rcx, qword [rbp + 0x20]
movsxd rdx, dword [rcx + 4]
lea r8d, [rdx - 0x88]
mov dword [rbp + rdx + 0x1c], r8d
lea rcx, [rbp + 0x28]
call fcn.140011520
lea rcx, [rbp + 0x30]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rbp + 0xa8]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
mov rax, rsi
mov rcx, qword [rbp + 0x240]
xor rcx, rsp
call fcn.140022220
lea r11, [rsp + 0x350]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret