Function at 0x140004fb0
Capabilities:
Get token privileges

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0x178
mov rax, qword [0x14000f040]
xor rax, rsp
mov qword [rsp + 0x160], rax
mov dword [rsp + 0x34], 0
mov dword [rsp + 0x13c], 0
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x138], 0
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x140], 0
lea rax, [rsp + 0x144]
mov rdi, rax
xor eax, eax
mov ecx, 8
rep stosb byte [rdi], al
lea rax, [rsp + 0x150]
mov rdi, rax
xor eax, eax
mov ecx, 0x10
rep stosb byte [rdi], al
mov qword [rsp + 0x40], 0
lea rax, [rsp + 0x13c]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x13c]
xor r8d, r8d
mov edx, 3
mov rcx, qword [rsp + 0x198]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x1400050dc
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x1400050dc
lea rdx, [0x14000b8c0]
lea rcx, [rsp + 0x98]
call fcn.140002b80
nop
lea rdx, [0x14000b8d8]
lea rcx, [rsp + 0x48]
call fcn.140002be0
lea r9, [rsp + 0x98]
lea r8, [rsp + 0x48]
mov edx, 0xc
lea rcx, [0x14000f170]
call fcn.1400021a0
nop
lea rcx, [rsp + 0x98]
call fcn.140003340
nop
jmp 0x14000543e
mov eax, dword [rsp + 0x13c]
mov edx, eax
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsp + 0x38], rax
cmp qword [rsp + 0x38], 0
jne 0x140005102
jmp 0x14000543e
lea rax, [rsp + 0x13c]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x13c]
mov r8, qword [rsp + 0x38]
mov edx, 3
mov rcx, qword [rsp + 0x198]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x14000518b
lea rdx, [0x14000b900]
lea rcx, [rsp + 0xb8]
call fcn.140002b80
nop
lea rdx, [0x14000b918]
lea rcx, [rsp + 0x58]
call fcn.140002be0
lea r9, [rsp + 0xb8]
lea r8, [rsp + 0x58]
mov edx, 0xc
lea rcx, [0x14000f170]
call fcn.1400021a0
nop
lea rcx, [rsp + 0xb8]
call fcn.140003340
nop
jmp 0x14000543e
mov dword [rsp + 0x30], 0
jmp 0x14000519f
mov eax, dword [rsp + 0x30]
inc eax
mov dword [rsp + 0x30], eax
mov rax, qword [rsp + 0x38]
mov eax, dword [rax]
cmp dword [rsp + 0x30], eax
jae 0x14000543e
mov eax, dword [rsp + 0x30]
imul rax, rax, 0xc
lea rcx, [rsp + 0x140]
mov rdx, qword [rsp + 0x38]
mov rdi, rcx
lea rsi, [rdx + rax + 4]
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov dword [rsp + 0x138], 0
lea r9, [rsp + 0x138]
xor r8d, r8d
lea rdx, [rsp + 0x140]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeNameW]
test eax, eax
jne 0x140005261
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x140005261
lea rdx, [0x14000b940]
lea rcx, [rsp + 0xd8]
call fcn.140002b80
nop
lea rdx, [0x14000b958]
lea rcx, [rsp + 0x68]
call fcn.140002be0
lea r9, [rsp + 0xd8]
lea r8, [rsp + 0x68]
mov edx, 0xc
lea rcx, [0x14000f170]
call fcn.1400021a0
nop
lea rcx, [rsp + 0xd8]
call fcn.140003340
nop
jmp 0x14000543e
mov eax, dword [rsp + 0x138]
inc eax
mov dword [rsp + 0x138], eax
mov eax, dword [rsp + 0x138]
shl rax, 1
mov rdx, rax
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0
je 0x140005439
lea r9, [rsp + 0x138]
mov r8, qword [rsp + 0x40]
lea rdx, [rsp + 0x140]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeNameW]
test eax, eax
je 0x1400053d4
mov rdx, qword [rsp + 0x1a0]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x1400053d2
cmp dword [rsp + 0x1a8], 0
je 0x1400053c8
mov r8d, 0x10
xor edx, edx
lea rcx, [rsp + 0x150]
call sub.VCRUNTIME140.dll_memset
mov dword [rsp + 0x150], 1
mov eax, 0xc
imul rax, rax, 0
mov rcx, qword [rsp + 0x140]
mov qword [rsp + rax + 0x154], rcx
mov eax, 0xc
imul rax, rax, 0
mov dword [rsp + rax + 0x15c], 2
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0x10
lea r8, [rsp + 0x150]
xor edx, edx
mov rcx, qword [rsp + 0x198]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x140005373
mov dword [rsp + 0x34], 1
jmp 0x1400053c6
lea rdx, [0x14000b980]
lea rcx, [rsp + 0xf8]
call fcn.140002b80
nop
lea rdx, [0x14000b998]
lea rcx, [rsp + 0x78]
call fcn.140002be0
lea r9, [rsp + 0xf8]
lea r8, [rsp + 0x78]
mov edx, 0xc
lea rcx, [0x14000f170]
call fcn.1400021a0
nop
lea rcx, [rsp + 0xf8]
call fcn.140003340
nop
jmp 0x1400053d0
mov dword [rsp + 0x34], 1
jmp 0x14000543e
jmp 0x14000542d
lea rdx, str.LookupPrivilegeName
lea rcx, [rsp + 0x118]
call fcn.140002b80
nop
lea rdx, str.c_impersonate::token_check_privilege
lea rcx, [rsp + 0x88]
call fcn.140002be0
lea r9, [rsp + 0x118]
lea r8, [rsp + 0x88]
mov edx, 0xc
lea rcx, [0x14000f170]
call fcn.1400021a0
nop
lea rcx, [rsp + 0x118]
call fcn.140003340
nop
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalFree]
nop
jmp 0x140005195
cmp qword [rsp + 0x38], 0
je 0x140005452
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_LocalFree]
nop
mov eax, dword [rsp + 0x34]
mov rcx, qword [rsp + 0x160]
xor rcx, rsp
call fcn.140009940
add rsp, 0x178
pop rdi
pop rsi
ret