Function at 0x1400d5390
Capabilities:
Get token privileges

Disassembly:
push rbp
push rsi
push r12
push r13
lea rbp, [rsp - 0x198]
sub rsp, 0x298
mov rax, qword [0x1403542a0]
xor rax, rsp
mov qword [rbp + 0x180], rax
xor r13d, r13d
mov r12, rcx
mov dword [rsp + 0x40], r13d
mov qword [rsp + 0x38], r13
mov dword [rsp + 0x30], r13d
mov esi, r13d
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x38]
mov rcx, rax
mov edx, 0x20018
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x1400d55d7
mov rcx, qword [rsp + 0x38]
mov qword [rsp + 0x2c8], rbx
xor r9d, r9d
lea rax, [rsp + 0x30]
mov qword [rsp + 0x2d0], rdi
lea edx, [r9 + 3]
xor r8d, r8d
mov qword [rsp + 0x2d8], r14
mov qword [rsp + 0x290], r15
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x1400d55aa
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1400d55aa
mov edx, dword [rsp + 0x30]
lea ecx, [rax - 0x3a]
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rcx, qword [rsp + 0x38]
mov rdi, rax
test rax, rax
jne 0x1400d547d
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.1400e1f80
lea edx, [rdi + 1]
mov r8, qword [rax]
mov rcx, rax
call qword [r8 + gethostbyaddr]
jmp 0x1400d55b5
mov r9d, dword [rsp + 0x30]
lea rax, [rsp + 0x30]
mov r8, rdi
mov edx, 3
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x1400d54bd
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]
jmp 0x1400d55b5
mov r14d, r13d
cmp dword [rdi], esi
jbe 0x1400d55a1
lea r15, [rdi + 0xc]
nop dword [rax]
movsxd rax, r14d
lea r9, [rsp + 0x40]
lea r8, [rsp + 0x70]
lea rdx, [rax*2 + 1]
xor ecx, ecx
mov dword [rsp + 0x40], Ordinal_266
add rdx, rax
lea rdx, [rdi + rdx*4]
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeNameW]
test eax, eax
je 0x1400d5591
mov qword [rsp + 0x60], 7
mov qword [rsp + 0x58], r13
mov word [rsp + 0x48], r13w
cmp word [rsp + 0x70], r13w
jne 0x1400d5525
mov r8, r13
jmp 0x1400d553a
lea rax, [rsp + 0x70]
or r8, 0xffffffffffffffff
nop
inc r8
cmp word [rax + r8*2], r13w
jne 0x1400d5530
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x48]
call fcn.140004990
lea rdx, [rsp + 0x48]
mov rcx, r12
or esi, 1
call fcn.140028450
test eax, eax
jne 0x1400d5570
mov eax, dword [r15]
test al, 1
jne 0x1400d556c
test al, 2
jne 0x1400d556c
test eax, eax
jns 0x1400d5570
mov bl, 1
jmp 0x1400d5572
xor bl, bl
test sil, 1
je 0x1400d558d
and esi, 0xfffffffe
cmp qword [rsp + 0x60], 8
jb 0x1400d558d
mov rcx, qword [rsp + 0x48]
call sub.mfc110u.dll_Ordinal_1482
test bl, bl
jne 0x1400d55f4
inc r14d
add r15, 0xc
cmp r14d, dword [rdi]
jb 0x1400d54d0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
mov r14, qword [rsp + 0x2d8]
mov rdi, qword [rsp + 0x2d0]
mov rbx, qword [rsp + 0x2c8]
mov r15, qword [rsp + 0x290]
mov rcx, qword [rbp + 0x180]
xor rcx, rsp
call fcn.1400f3d50
add rsp, 0x298
pop r13
pop r12
pop rsi
pop rbp
ret
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
jmp 0x1400d55b7