Function at 0x140004040
Capabilities:
Acquire debug privileges

Disassembly:
mov rax, rsp
mov qword [rax + 8], rcx
push rdi
sub rsp, 0x70
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rax + 0x20], rbx
mov rbx, rcx
mov qword [rcx + 0x238], 7
xor edi, edi
mov qword [rcx + 0x230], rdi
mov word [rcx + 0x220], di
mov qword [rax - 0x10], 7
mov qword [rax - 0x18], rdi
mov word [rax - 0x28], di
lea r8d, [rdi + 0x10]
lea rdx, str.SeDebugPrivilege
lea rcx, [rax - 0x30]
call fcn.140003120
lea rdx, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae rdx, qword [rsp + 0x50]
lea r8, [rsp + 0x88]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rsp + 0x90]
mov edx, 0x2000000
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov dword [rsp + 0x38], 1
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x3c], rax
mov dword [rsp + 0x44], 2
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
lea r9d, [rdi + 0x10]
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x140004130
cmp qword [rsp + 0x68], 8
jb 0x140004142
mov rcx, qword [rsp + 0x50]
call fcn.1400056a0
jmp 0x140004142
cmp qword [rsp + 0x68], 8
jb 0x140004142
mov rcx, qword [rsp + 0x50]
call fcn.1400056a0
mov qword [rsp + 0x68], 7
mov qword [rsp + 0x60], rdi
mov word [rsp + 0x50], 0
mov r8d, 0x10
lea rdx, str.SeAuditPrivilege
lea rcx, [rsp + 0x48]
call fcn.140003120
lea rdx, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae rdx, qword [rsp + 0x50]
lea r8, [rsp + 0x88]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rsp + 0x90]
mov edx, 0x2000000
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov dword [rsp + 0x38], 1
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x3c], rax
mov dword [rsp + 0x44], 2
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
mov r9d, 0x10
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x140004205
cmp qword [rsp + 0x68], 8
jb 0x140004217
mov rcx, qword [rsp + 0x50]
call fcn.1400056a0
jmp 0x140004217
cmp qword [rsp + 0x68], 8
jb 0x140004217
mov rcx, qword [rsp + 0x50]
call fcn.1400056a0
mov qword [rsp + 0x68], 7
mov qword [rsp + 0x60], rdi
mov word [rsp + 0x50], 0
mov r8d, 0x13
lea rdx, str.SeSecurityPrivilege
lea rcx, [rsp + 0x48]
call fcn.140003120
lea rdx, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae rdx, qword [rsp + 0x50]
lea r8, [rsp + 0x88]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rsp + 0x90]
mov edx, 0x2000000
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov dword [rsp + 0x38], 1
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x3c], rax
mov dword [rsp + 0x44], 2
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
mov r9d, 0x10
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x1400042da
cmp qword [rsp + 0x68], 8
jb 0x1400042ec
mov rcx, qword [rsp + 0x50]
call fcn.1400056a0
jmp 0x1400042ec
cmp qword [rsp + 0x68], 8
jb 0x1400042ec
mov rcx, qword [rsp + 0x50]
call fcn.1400056a0
mov qword [rsp + 0x68], 7
mov qword [rsp + 0x60], rdi
mov word [rsp + 0x50], 0
mov r8d, 0x18
lea rdx, str.SeTakeOwnershipPrivilege
lea rcx, [rsp + 0x48]
call fcn.140003120
lea rdx, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae rdx, qword [rsp + 0x50]
lea r8, [rsp + 0x88]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rsp + 0x90]
mov edx, 0x2000000
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov dword [rsp + 0x38], 1
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x3c], rax
mov dword [rsp + 0x44], 2
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
mov r9d, 0x10
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x1400043af
cmp qword [rsp + 0x68], 8
jb 0x1400043c1
mov rcx, qword [rsp + 0x50]
call fcn.1400056a0
jmp 0x1400043c1
cmp qword [rsp + 0x68], 8
jb 0x1400043c1
mov rcx, qword [rsp + 0x50]
call fcn.1400056a0
mov qword [rsp + 0x68], 7
mov qword [rsp + 0x60], rdi
mov word [rsp + 0x50], 0
mov r8d, 0x17
lea rdx, str.SeManageVolumePrivilege
lea rcx, [rsp + 0x48]
call fcn.140003120
lea rdx, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae rdx, qword [rsp + 0x50]
lea r8, [rsp + 0x88]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rsp + 0x90]
mov edx, 0x2000000
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov dword [rsp + 0x38], 1
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x3c], rax
mov dword [rsp + 0x44], 2
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
mov r9d, 0x10
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x140004484
cmp qword [rsp + 0x68], 8
jb 0x140004496
mov rcx, qword [rsp + 0x50]
call fcn.1400056a0
jmp 0x140004496
cmp qword [rsp + 0x68], 8
jb 0x140004496
mov rcx, qword [rsp + 0x50]
call fcn.1400056a0
mov qword [rsp + 0x68], 7
mov qword [rsp + 0x60], rdi
mov word [rsp + 0x50], 0
mov r8d, 0x12
lea rdx, str.SeRestorePrivilege
lea rcx, [rsp + 0x48]
call fcn.140003120
lea rdx, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae rdx, qword [rsp + 0x50]
lea r8, [rsp + 0x88]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rsp + 0x90]
mov edx, 0x2000000
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov dword [rsp + 0x38], 1
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x3c], rax
mov dword [rsp + 0x44], 2
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
mov r9d, 0x10
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x140004559
cmp qword [rsp + 0x68], 8
jb 0x14000456b
mov rcx, qword [rsp + 0x50]
call fcn.1400056a0
jmp 0x14000456b
cmp qword [rsp + 0x68], 8
jb 0x14000456b
mov rcx, qword [rsp + 0x50]
call fcn.1400056a0
mov qword [rsp + 0x68], 7
mov qword [rsp + 0x60], rdi
mov word [rsp + 0x50], 0
mov r8d, 0x11
lea rdx, str.SeBackupPrivilege
lea rcx, [rsp + 0x48]
call fcn.140003120
lea rdx, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae rdx, qword [rsp + 0x50]
lea r8, [rsp + 0x88]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rsp + 0x90]
mov edx, 0x2000000
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov dword [rsp + 0x38], 1
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x3c], rax
mov dword [rsp + 0x44], 2
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
mov r9d, 0x10
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x14000462e
cmp qword [rsp + 0x68], 8
jb 0x140004640
mov rcx, qword [rsp + 0x50]
call fcn.1400056a0
jmp 0x140004640
cmp qword [rsp + 0x68], 8
jb 0x140004640
mov rcx, qword [rsp + 0x50]
call fcn.1400056a0
mov qword [rsp + 0x68], 7
mov qword [rsp + 0x60], rdi
mov word [rsp + 0x50], 0
mov r8d, 0x15
lea rdx, str.SeLoadDriverPrivilege
lea rcx, [rsp + 0x48]
call fcn.140003120
lea rdx, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae rdx, qword [rsp + 0x50]
lea r8, [rsp + 0x80]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rsp + 0x88]
mov edx, 0x2000000
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov dword [rsp + 0x38], 1
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0x3c], rax
mov dword [rsp + 0x44], 2
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
mov r9d, 0x10
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x14000470c
cmp qword [rsp + 0x68], 8
jb 0x140004707
mov rcx, qword [rsp + 0x50]
call fcn.1400056a0
nop
mov rax, rbx
jmp 0x140004727
mov rax, rbx
jmp 0x140004727
cmp qword [rsp + 0x68], 8
jb 0x140004724
mov rcx, qword [rsp + 0x50]
call fcn.1400056a0
nop
mov rax, rbx
jmp 0x140004727
mov rax, rbx
mov rbx, qword [rsp + 0x98]
add rsp, 0x70
pop rdi
ret