Function at 0x14005ee70
Capabilities:
Acquire debug privileges
Check for debugger via api
Check for outputdebugstring error
Get token privileges
Print debug messages

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
lea rbp, [rsp - 0x4c0]
sub rsp, 0x5c0
mov rax, qword [0x1400a8fc0]
xor rax, rsp
mov qword [rbp + 0x4b0], rax
call fcn.14005eab0
test al, al
jne 0x14005f102
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
jne 0x14005f102
xor esi, esi
mov dword [rsp + 0x38], esi
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea rdx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_CheckRemoteDebuggerPresent]
cmp dword [rsp + 0x38], esi
jne 0x14005f102
lea rcx, str.ntdll.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rdi, rax
test rax, rax
je 0x14005ef49
lea rdx, str.NtQueryInformationProcess
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rbx, rax
test rax, rax
je 0x14005ef49
mov dword [rsp + 0x38], esi
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov r9d, 4
mov qword [rsp + 0x20], rsi
mov rcx, rax
lea r8, [rsp + 0x38]
mov edx, 7
call rbx
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
test ebx, ebx
jne 0x14005ef49
cmp dword [rsp + 0x38], esi
jne 0x14005f102
call fcn.14005ee20
test al, al
jne 0x14005f102
call fcn.14005ee40
test al, al
jne 0x14005f102
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rcx, str.DebuggerCheck
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x14005f102
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x38]
mov edx, 8
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x14005f01e
lea r8, [rsp + 0x50]
xor ecx, ecx
lea rdx, str.SeDebugPrivilege
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov rcx, qword [rsp + 0x38]
test eax, eax
jne 0x14005efc8
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14005f01e
mov rax, qword [rsp + 0x50]
lea r8, [rsp + 0x40]
mov r9d, 0x10
mov qword [rsp + 0x44], rax
mov edx, 3
mov dword [rsp + 0x40], 1
mov dword [rsp + 0x4c], esi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov rcx, qword [rsp + 0x38]
test eax, eax
jne 0x14005f00a
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14005f01e
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsp + 0x4c]
shr eax, 1
test al, 1
jne 0x14005f102
xor edx, edx
lea rcx, [rsp + 0x60]
mov r8d, 0x4d0
call sub.VCRUNTIME140.dll_memset
mov dword [rbp - 0x70], 0x100010
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rcx, rax
lea rdx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x14005f077
cmp qword [rbp - 0x58], rsi
jne 0x14005f102
cmp qword [rbp - 0x50], rsi
jne 0x14005f102
cmp qword [rbp - 0x48], rsi
jne 0x14005f102
cmp qword [rbp - 0x40], rsi
jne 0x14005f102
lea rcx, str.ntdll.dll
mov dword [rsp + 0x38], esi
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14005f0d4
lea rdx, str.NtQueryInformationProcess
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rbx, rax
test rax, rax
je 0x14005f0d4
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov r9d, 0x80
lea r8, [rbp + 0x430]
mov rcx, rax
xor edx, edx
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
call rbx
test eax, eax
js 0x14005f0d4
cmp dword [rsp + 0x38], 2
ja 0x14005f102
mov dword [rsp + 0x38], esi
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea rdx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_CheckRemoteDebuggerPresent]
test eax, eax
je 0x14005f0fe
cmp dword [rsp + 0x38], esi
setne al
test al, al
setne al
jmp 0x14005f104
xor al, al
jmp 0x14005f104
mov al, 1
mov rcx, qword [rbp + 0x4b0]
xor rcx, rsp
call fcn.140070f30
lea r11, [rsp + 0x5c0]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret