Function at 0x140001670
Capabilities:
Get token privileges

Disassembly:
mov r11, rsp
push rbp
push rsi
push r14
mov rbp, rsp
sub rsp, 0x70
mov rax, qword [0x140007008]
xor rax, rsp
mov qword [rbp - 0x10], rax
mov qword [r11 + 0x18], r12
mov r12, 0xffffffffffffffff
mov qword [r11 + 0x20], r15
xor r15d, r15d
mov r14d, r15d
mov dword [rbp - 0x40], r15d
mov esi, r15d
mov qword [rbp - 0x38], r12
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rbp - 0x38]
lea edx, [r15 + 0x28]
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x1400016e0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Open_Proce_ssToken___failed._Error:__d_n
call fcn.140001010
jmp 0x1400018ca
mov r9d, dword [rbp - 0x40]
lea rax, [rbp - 0x40]
mov rcx, qword [rbp - 0x38]
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea edx, [r8 + 3]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x140001726
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x140001726
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.GetT_okenInfo_rmation___failed._Error:__d_n
call fcn.140001010
jmp 0x1400018ca
mov ecx, dword [rbp - 0x40]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rsi, rax
test rax, rax
je 0x1400018ca
mov r9d, dword [rbp - 0x40]
lea rax, [rbp - 0x40]
mov rcx, qword [rbp - 0x38]
mov r8, rsi
mov edx, 3
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x140001777
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.GetToke_nInformati_on___failed._Error:__d_n
call fcn.140001010
jmp 0x1400018ca
mov qword [rsp + 0x90], rbx
mov ebx, r15d
cmp dword [rsi], ebx
jbe 0x1400018c2
mov qword [rsp + 0x98], rdi
mov eax, ebx
lea r9, [rbp - 0x3c]
xor r8d, r8d
mov dword [rbp - 0x3c], r15d
lea rdx, [rbp - 0x30]
lea rcx, [rax + rax*2]
movsd xmm0, qword [rsi + rcx*4 + 4]
mov eax, dword [rsi + rcx*4 + 0xc]
xor ecx, ecx
movsd qword [rbp - 0x30], xmm0
mov dword [rbp - 0x28], eax
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeNameW]
test eax, eax
jne 0x1400017d4
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x140001888
mov eax, dword [rbp - 0x3c]
inc eax
mov ecx, eax
mov dword [rbp - 0x3c], eax
mov eax, 2
mul rcx
cmovo rax, r12
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
test rax, rax
je 0x1400018ba
lea r9, [rbp - 0x3c]
mov r8, rax
lea rdx, [rbp - 0x30]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeNameW]
test eax, eax
je 0x1400018a6
lea rdx, str.SeImpersonatePrivilege
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x14000186e
mov rax, qword [rbp - 0x30]
lea r8, [rbp - 0x20]
mov rcx, qword [rbp - 0x38]
mov r9d, 0x10
mov qword [rsp + 0x28], r15
xor edx, edx
mov qword [rbp - 0x1c], rax
mov dword [rbp - 0x20], 1
mov dword [rbp - 0x14], 2
mov qword [rsp + 0x20], r15
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x140001897
mov r14d, 1
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
test r14d, r14d
jne 0x1400018ba
inc ebx
cmp ebx, dword [rsi]
jb 0x140001792
jmp 0x1400018ba
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Lo_okupP_rivile_geN_ame___failed._Error:__d_n
jmp 0x1400018b3
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Ad_justT_oken_Privile_ges___failed._Error:__d_n
jmp 0x1400018b3
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Looku_pPrivi_lege_Name___failed._Error:__d_n
mov edx, eax
call fcn.140001010
mov rdi, qword [rsp + 0x98]
mov rbx, qword [rsp + 0x90]
mov rcx, qword [rbp - 0x38]
mov r15, qword [rsp + 0xa8]
mov r12, qword [rsp + 0xa0]
test rcx, rcx
je 0x1400018e9
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rsi, rsi
je 0x1400018f7
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, r14d
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.140002010
add rsp, 0x70
pop r14
pop rsi
pop rbp
ret