Function at 0x1000d2870
Capabilities:
Check for peb beingdebugged flag

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x120
mov rax, qword [0x100165138]
xor rax, rsp
mov qword [rsp + 0x110], rax
mov rbp, qword [rsp + 0x188]
mov rbx, qword [rsp + 0x190]
xor edi, edi
mov r14, rdi
mov dword [rsp + 0x50], edi
mov byte [rsp + 0x40], dil
mov r12, r9
mov dword [rsp + 0x54], r8d
mov r13, rcx
mov rcx, qword [0x1001653b8]
lea r15, [0x1001653b8]
cmp rcx, r15
je 0x1000d2926
test byte [rcx + 0x1c], 4
je 0x1000d28fd
cmp byte [rcx + 0x19], 4
jb 0x1000d28fd
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003198]
mov edx, 0x1cb
call fcn.10001c7b8
mov rcx, qword [0x1001653b8]
cmp rcx, r15
je 0x1000d2926
test byte [rcx + 0x1c], 4
je 0x1000d2926
cmp byte [rcx + 0x19], 5
jb 0x1000d2926
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003198]
mov edx, 0x1cc
mov r9, r13
call fcn.10001da24
xor r9d, r9d
mov qword [rsp + 0x30], rdi
lea rcx, [0x10000d510]
lea r8d, [r9 + 7]
mov edx, 0xc0000000
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x48], rax
cmp rax, 0xffffffffffffffff
jne 0x1000d2a18
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 0x10
mov dword [rbx], eax
mov rcx, qword [0x1001653b8]
cmp rcx, r15
je 0x1000d29a0
test byte [rcx + 0x1c], 4
je 0x1000d29a0
cmp byte [rcx + 0x19], 2
jb 0x1000d29a0
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003198]
mov edx, 0x1cd
mov r9d, eax
call fcn.10001c7dc
mov r15, qword [rsp + 0x48]
lea rbx, [0x1001653b8]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x1001653b8]
cmp rcx, rbx
je 0x1000d29eb
test byte [rcx + 0x1c], 4
je 0x1000d29eb
cmp byte [rcx + 0x19], 4
jb 0x1000d29eb
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003198]
mov edx, 0x1cf
call fcn.10001c7b8
mov eax, edi
mov rcx, qword [rsp + 0x110]
xor rcx, rsp
call fcn.10014e480
mov rbx, qword [rsp + 0x168]
add rsp, 0x120
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea rdx, [rsp + 0x58]
xor r9d, r9d
xor r8d, r8d
mov rcx, r13
call qword [sym.imp.ntdll.dll_RtlDosPathNameToNtPathName_U]
cmp al, dil
jne 0x1000d2a41
mov dword [rbx], 0x7b
mov edi, 2
jmp 0x1000d29a0
movzx esi, word [rsp + 0x58]
xor ecx, ecx
add esi, 0xc
mov edx, esi
mov r15d, esi
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r14, rax
cmp rax, rdi
jne 0x1000d2a8e
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor edx, edx
mov dword [rbx], eax
mov rax, qword gs:[0x30]
mov r8, qword [rsp + 0x60]
mov rcx, qword [rax + 0x60]
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
mov edi, 3
jmp 0x1000d29a0
cmp rbp, 0xffffffffffffffff
je 0x1000d2ab8
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
cmp eax, edi
jne 0x1000d2ab3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 0x13
mov dword [rbx], eax
jmp 0x1000d29a0
mov byte [rsp + 0x40], 1
mov r8, r15
xor edx, edx
mov rcx, r14
call sub.msvcrt.dll_memset
movzx r11d, word [rsp + 0x58]
mov eax, dword [rsp + 0x54]
mov word [r14], r11w
mov dword [r14 + 4], eax
mov byte [r14 + 2], 1
mov rdx, qword [rsp + 0x60]
lea rcx, [r14 + 0xa]
movzx r8d, r11w
call sub.msvcrt.dll_memcpy
mov r11, qword gs:[0x30]
mov r8, qword [rsp + 0x60]
mov rcx, qword [r11 + 0x60]
xor edx, edx
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
mov r15, qword [rsp + 0x48]
mov qword [rsp + 0x38], rdi
lea rax, [rsp + 0x50]
mov r9d, esi
mov r8, r14
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x80]
mov edx, 0x42c000
mov rcx, r15
mov dword [rsp + 0x28], 0x84
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov esi, eax
cmp byte [rsp + 0x40], dil
je 0x1000d2bae
cmp rbp, 0xffffffffffffffff
jne 0x1000d2b70
lea r8, [0x10000d558]
lea rcx, [0x10000d130]
mov edx, 0x26a6
call fcn.100099ad8
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
cmp eax, edi
jne 0x1000d2bae
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
mov dword [rbx], eax
or ecx, 0x80070000
cmp eax, edi
cmovle ecx, eax
cmp ecx, edi
jge 0x1000d2ba4
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_RaiseException]
mov edi, 0x13
jmp 0x1000d29a5
cmp esi, edi
jne 0x1000d2bc4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 0x11
mov dword [rbx], eax
jmp 0x1000d29a5
lea rdx, [0x1000060a0]
lea rcx, [rsp + 0x68]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
movzx ecx, word [rsp + 0x68]
movzx eax, word [rsp + 0x80]
add ecx, eax
cmp ecx, 0x208
jae 0x1000d2c3a
movzx ebx, word [rsp + 0x68]
mov rdx, qword [rsp + 0x70]
mov rcx, r12
mov r8, rbx
call sub.msvcrt.dll_memcpy
movzx r8d, word [rsp + 0x80]
shr rbx, 1
lea rcx, [r12 + rbx*2]
lea rdx, [rsp + 0x84]
call sub.msvcrt.dll_memcpy
movzx eax, word [rsp + 0x80]
movzx r11d, word [rsp + 0x68]
add eax, r11d
cdqe
shr rax, 1
mov word [r12 + rax*2], di
mov rcx, qword [0x1001653b8]
lea rbx, [0x1001653b8]
cmp rcx, rbx
je 0x1000d29ac
test byte [rcx + 0x1c], 4
je 0x1000d29ac
cmp byte [rcx + 0x19], 4
jb 0x1000d29ac
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003198]
mov edx, 0x1ce
mov r9, r12
mov qword [rsp + 0x20], r13
call fcn.10001df38
jmp 0x1000d29ac