Function at 0x1400d4040
Capabilities:
Get token privileges
Print debug messages

Disassembly:
mov rax, rsp
push rbp
push rdi
push r14
lea rbp, [rax - 0x2a8]
sub rsp, 0x390
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x1403542a0]
xor rax, rsp
mov qword [rbp + 0x280], rax
mov rsi, rcx
xor r14d, r14d
mov qword [rsp + 0x38], r14
mov dword [rsp + 0x30], r14d
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x38]
mov edx, 0x20018
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x1400d410c
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r14 + 3]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x1400d42c3
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1400d42c3
mov edx, dword [rsp + 0x30]
lea ecx, [rax - 0x3a]
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rdi, rax
mov rcx, qword [rsp + 0x38]
test rax, rax
jne 0x1400d4113
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.1400e1f80
mov r8, qword [rax]
lea edx, [rdi + 1]
mov rcx, rax
call qword [r8 + gethostbyaddr]
xor al, al
jmp 0x1400d42d0
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x30]
mov r8, rdi
mov edx, 3
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x1400d4155
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor al, al
jmp 0x1400d42d0
mov ebx, r14d
cmp dword [rdi], ebx
jbe 0x1400d42ba
mov dword [rsp + 0x40], Ordinal_266
movsxd rax, ebx
lea rdx, [rax*2 + 1]
add rdx, rax
lea rdx, [rdi + rdx*4]
lea r9, [rsp + 0x40]
lea r8, [rbp + 0x70]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeNameW]
test eax, eax
je 0x1400d42b0
mov qword [rbp + 0x68], 7
mov qword [rbp + 0x60], r14
mov word [rbp + 0x50], r14w
cmp word [rbp + 0x70], 0
jne 0x1400d41b0
mov r8, r14
jmp 0x1400d41cb
lea rax, [rbp + 0x70]
or r8, 0xffffffffffffffff
nop dword [rax + rax]
inc r8
cmp word [rax + r8*2], 0
jne 0x1400d41c0
lea rdx, [rbp + 0x70]
lea rcx, [rbp + 0x50]
call fcn.140004990
nop
lea rdx, [rbp + 0x50]
mov rcx, rsi
call fcn.14000c500
nop
cmp qword [rbp + 0x68], 8
jb 0x1400d41f6
mov rcx, qword [rbp + 0x50]
call sub.mfc110u.dll_Ordinal_1482
mov edx, 3
lea r8d, [rdx - 2]
lea rcx, [rsp + 0x50]
call fcn.1400034f0
nop
lea rdx, str.Privilege_Name:
lea rcx, [rsp + 0x60]
call fcn.14000f7c0
mov rcx, rax
lea rdx, [rbp + 0x70]
call fcn.14000f7c0
mov rcx, rax
lea rdx, [0x1402add04]
call fcn.14000f7c0
lea rdx, [rbp + 0x50]
lea rcx, [rsp + 0x50]
call fcn.140005c20
cmp qword [rax + 0x18], 8
jb 0x1400d424e
mov rax, qword [rax]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp qword [rbp + 0x68], 8
jb 0x1400d4267
mov rcx, qword [rbp + 0x50]
call sub.mfc110u.dll_Ordinal_1482
lea rdx, [rbp + 0x50]
lea rcx, [rsp + 0x50]
call fcn.140005c20
nop
cmp qword [rax + 0x18], 8
jb 0x1400d4280
mov rax, qword [rax]
mov r8, rax
mov edx, 2
lea rcx, [0x1402add34]
call fcn.1400e3ba0
nop
cmp qword [rbp + 0x68], 8
jb 0x1400d42a6
mov rcx, qword [rbp + 0x50]
call sub.mfc110u.dll_Ordinal_1482
nop
lea rcx, [rsp + 0x50]
call fcn.140003b30
inc ebx
cmp ebx, dword [rdi]
jb 0x1400d4160
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
mov rcx, qword [rbp + 0x280]
xor rcx, rsp
call fcn.1400f3d50
lea r11, [rsp + 0x390]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret