Function at 0x140051ae0
Capabilities:
Acquire debug privileges

Disassembly:
mov rax, rsp
push rdi
sub rsp, 0x230
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov rax, qword [0x1401a1e90]
xor rax, rsp
mov qword [rsp + 0x220], rax
mov ebp, edx
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rbx, rax
call fcn.1400259f0
mov rcx, rax
lea r9, [rsp + 0x30]
mov r8d, 0x20028
mov rdx, rbx
call fcn.14003b600
test eax, eax
jne 0x140051b78
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rsp + 0x68]
call fcn.14004a000
mov r10, rax
call fcn.14004b4c0
mov rdx, rax
mov r8, r10
lea rcx, [rsp + 0x38]
call fcn.14004dec0
lea rdx, [0x14016cad8]
lea rcx, [rsp + 0x38]
call fcn.1400cb848
nop
mov ecx, dword [0x1401a9d80]
lea r8d, [rcx + 2]
lea eax, [rcx + 1]
imul r8d, eax
imul r8d, ecx
mov eax, 0x38e38e39
imul r8d
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*8]
sub r8d, eax
cmp r8d, 7
jne 0x140051c26
xor edi, edi
lea rsi, [rsp + 0x90]
nop word [rax + rax]
xor r9d, r9d
nop word [rax + rax]
lea ebx, [r9 + 1]
lea r8d, [rdi + 1]
mov eax, ecx
cdq
idiv r8d
mov r8d, edx
mov eax, ecx
sub eax, edi
imul r8d, eax
mov eax, ecx
cdq
idiv ebx
add r8d, eax
sub r8d, r9d
mov edx, r8d
lea rcx, [0x140135ea0]
call fcn.1400c4884
mov r9d, ebx
add rsi, 4
cmp ebx, 7
jge 0x140051c17
mov ecx, dword [0x1401a9d80]
jmp 0x140051bd0
inc edi
cmp edi, 0xe
jge 0x140051c26
mov ecx, dword [0x1401a9d80]
jmp 0x140051bc0
lea r8, [rsp + 0x48]
lea rdx, str.SeDebugPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x140051c85
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rsp + 0x68]
call fcn.14004a000
mov rbx, rax
call fcn.14004b8b0
mov rdx, rax
mov r8, rbx
lea rcx, [rsp + 0x38]
call fcn.14004dec0
lea rdx, [0x14016cad8]
lea rcx, [rsp + 0x38]
call fcn.1400cb848
nop
mov ecx, dword [0x1401a9d80]
lea r8d, [rcx + 2]
lea eax, [rcx + 1]
imul r8d, eax
imul r8d, ecx
mov eax, 0x2aaaaaab
imul r8d
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
add eax, eax
sub r8d, eax
cmp r8d, 5
jne 0x140051cc2
call fcn.1400c426c
mov dword [0x1401a9d80], eax
mov dword [rsp + 0x58], 1
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x5c], rax
neg ebp
sbb eax, eax
and eax, 2
mov dword [rsp + 0x64], eax
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
xor r9d, r9d
lea r8, [rsp + 0x58]
xor edx, edx
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov rcx, qword [rsp + 0x30]
test eax, eax
jne 0x140051d51
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rsp + 0x68]
call fcn.14004a000
mov r9, rax
call fcn.14004abc0
mov rdx, rax
mov r8, r9
lea rcx, [rsp + 0x38]
call fcn.14004dec0
lea rdx, [0x14016cad8]
lea rcx, [rsp + 0x38]
call fcn.1400cb848
nop
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
mov rcx, qword [rsp + 0x220]
xor rcx, rsp
call fcn.1400c3970
lea r11, [rsp + 0x230]
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret