Function at 0x140039790
Capabilities:
Acquire debug privileges
Get token membership

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
lea rbp, [rsp - 0x47]
sub rsp, 0xf0
mov rax, qword [0x140098080]
xor rax, rsp
mov qword [rbp + 0x37], rax
mov rdi, rdx
mov rbx, rcx
xor esi, esi
mov dword [rbp - 9], esi
mov word [rbp - 5], 0x500
lea rax, [rbp - 0x49]
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x48], esi
mov dword [rsp + 0x40], esi
mov dword [rsp + 0x38], esi
mov dword [rsp + 0x30], esi
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], esi
mov r9d, 0x220
mov r8d, 0x20
mov dl, 2
lea rcx, [rbp - 9]
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x14003997e
mov dword [rbp - 0x35], esi
lea r8, [rbp - 0x35]
mov rdx, qword [rbp - 0x49]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
test eax, eax
jne 0x14003981e
mov dword [rbp - 0x35], esi
mov rcx, qword [rbp - 0x49]
call qword [sym.imp.ADVAPI32.dll_FreeSid]
cmp dword [rbp - 0x35], 1
jne 0x14003997e
mov qword [rbp - 0x29], 0xffffffffffffffff
mov dword [rbp - 0x31], esi
lea rax, [rbp - 0x29]
mov qword [rbp - 0x19], rax
mov byte [rbp - 0x11], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rbp - 0x29]
mov edx, 0x28
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
cmp eax, 1
je 0x14003987a
lea rax, str.EnableSeDebugPrivilege_OpenProcessToken_
mov qword [rbp - 0x41], 0x29
jmp 0x140039929
lea rax, [rbp - 0x31]
mov qword [rsp + 0x20], rax
mov r9d, 4
mov r8, rbx
mov edx, 0xc
mov rcx, qword [rbp - 0x29]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
cmp eax, 1
je 0x1400398b1
lea rax, str.EnableSeDebugPrivilege_GetTokenInformation_
mov qword [rbp - 0x41], 0x2c
jmp 0x140039929
lea r8, [rbp - 0x21]
lea rdx, str.SeDebugPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
cmp eax, 1
je 0x1400398d2
lea rax, str.EnableSeDebugPrivilege_LookupPrivilegeValueW_
jmp 0x140039921
mov dword [rbp + 0x27], 1
mov rax, qword [rbp - 0x21]
mov qword [rbp + 0x2b], rax
mov dword [rbp + 0x33], 2
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], rsi
mov r9d, 0x10
lea r8, [rbp + 0x27]
xor edx, edx
mov rcx, qword [rbp - 0x29]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
cmp eax, 1
jne 0x14003991a
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x514
jne 0x140039964
lea rax, str.EnableSeDebugPrivilege_AdjustTokenPrivileges_
mov qword [rbp - 0x41], 0x2e
mov qword [rbp - 0x49], rax
movaps xmm0, xmmword [rbp - 0x49]
movdqa xmmword [rbp - 0x49], xmm0
lea rdx, [rbp - 0x49]
lea rcx, [rbp - 1]
call fcn.140001310
mov rbx, rax
mov rdx, rax
mov rcx, rdi
call fcn.140002cc0
mov eax, dword [rbx + 0x20]
mov dword [rdi + 0x20], eax
lea rcx, [rbp - 1]
call fcn.1400012a0
xor bl, bl
jmp 0x140039966
mov bl, 1
mov rcx, qword [rbp - 0x29]
cmp rcx, 0xffffffffffffffff
je 0x140039976
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movzx eax, bl
jmp 0x140039a0a
xorps xmm0, xmm0
movups xmmword [rbp - 1], xmm0
movdqa xmm1, xmmword [0x14008ea00]
movdqu xmmword [rbp + 0xf], xmm1
mov word [rbp - 1], si
mov dword [rbp + 0x1f], esi
lea r9, [0x14005c4a0]
movzx r8d, byte [rbp - 0x39]
mov edx, 0x2b
lea rcx, [rbp - 1]
call fcn.14000bcc0
mov dword [rbp + 0x1f], 1
lea rdx, [rbp - 1]
mov rcx, rdi
call fcn.140002cc0
mov eax, dword [rbp + 0x1f]
mov dword [rdi + 0x20], eax
mov rdx, qword [rbp + 0x17]
cmp rdx, 7
jbe 0x140039a08
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 1]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140039a03
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140039a29
call fcn.14003bb8c
xor al, al
mov rcx, qword [rbp + 0x37]
xor rcx, rsp
call fcn.14003bb30
mov rbx, qword [rsp + 0x120]
add rsp, 0xf0
pop rdi
pop rsi
pop rbp
ret
call fcn.140041a3c
int3