Function at 0x76aa8696
Capabilities:
Check for peb beingdebugged flag

Disassembly:
push 0x38
push 0x76aa88f0
call fcn.76aa13c1
mov eax, dword [0x76aae004]
mov dword [ebp - 0x1c], eax
and dword [ebp - 0x30], 0
lea eax, [ebp - 0x30]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call sub.ADVAPI32.dll_OpenProcessToken
mov dword [ebp - 0x34], eax
test eax, eax
je 0x76aa88dc
push 0x50
pop eax
mov dword [ebp - 0x2c], eax
and dword [ebp - 4], 0
call fcn.76aa171e
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [ebp - 0x48], esi
jmp 0x76aa86fa
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x34], 0
je 0x76aa88d3
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x2c]
push esi
push 1
push dword [ebp - 0x30]
call sub.ADVAPI32.dll_GetTokenInformation
mov dword [ebp - 0x34], eax
test eax, eax
je 0x76aa88d3
mov byte [ebp - 0x28], 1
mov byte [ebp - 0x27], 1
mov byte [ebp - 0x26], 0
mov byte [ebp - 0x25], 0
mov byte [ebp - 0x24], 0
mov byte [ebp - 0x23], 0
mov byte [ebp - 0x22], 0
mov byte [ebp - 0x21], 5
mov dword [ebp - 0x20], 0x12
mov esi, dword [esi]
mov dword [ebp - 0x3c], esi
push esi
call sub.ADVAPI32.dll_GetLengthSid
mov dword [ebp - 0x2c], eax
lea ecx, [eax + 0x24]
mov dword [ebp - 0x38], ecx
lea ecx, [ecx + eax*2 + 0x14]
mov dword [ebp - 0x40], ecx
mov eax, dword fs:[0x18]
push ecx
push 8
mov eax, dword [eax + 0x30]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov ebx, eax
test ebx, ebx
je 0x76aa87fb
mov byte [ebx], 1
mov word [ebx + 2], 0x8004
mov ecx, dword [ebp - 0x2c]
lea edi, [ebx + 0x14]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebx + 4], 0x14
mov ecx, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x3c]
lea edi, [ebx + ecx + 0x14]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp - 0x2c]
add eax, 0x14
mov dword [ebx + 8], eax
mov eax, dword fs:[0x18]
push dword [ebp - 0x38]
push 8
mov eax, dword [eax + 0x30]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov edi, eax
mov dword [ebp - 0x44], edi
test edi, edi
jne 0x76aa880b
mov eax, dword fs:[0x18]
push ebx
push edi
mov eax, dword [eax + 0x30]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x76aa88df
push 2
push dword [ebp - 0x38]
push edi
call sub.ADVAPI32.dll_InitializeAcl
mov dword [ebp - 0x34], eax
test eax, eax
je 0x76aa88a9
lea eax, [ebp - 0x28]
push eax
mov esi, 0x1f0001
push esi
push 0
push 2
push edi
call sub.ADVAPI32.dll_AddAccessAllowedAceEx
mov dword [ebp - 0x34], eax
test eax, eax
je 0x76aa88a9
push dword [ebp - 0x3c]
push esi
push 0
push 2
push edi
call sub.ADVAPI32.dll_AddAccessAllowedAceEx
mov dword [ebp - 0x34], eax
test eax, eax
je 0x76aa88a9
mov ecx, dword [ebp - 0x38]
mov esi, edi
mov eax, dword [ebp - 0x2c]
lea edi, [ebx + eax*2 + 0x14]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp - 0x2c]
lea eax, [eax + eax + 0x14]
mov dword [ebx + 0x10], eax
push 7
mov esi, dword [ebp - 0x40]
push esi
push ebx
call dword [sym.imp.ntdll.dll_RtlValidRelativeSecurityDescriptor]
test al, al
je 0x76aa88a5
mov dword [0x76aae564], esi
mov ecx, esi
mov esi, ebx
mov edi, 0x76aaec00
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x76aa88a9
and dword [ebp - 0x34], 0
mov eax, dword fs:[0x18]
push ebx
push 0
mov eax, dword [eax + 0x30]
push dword [eax + 0x18]
mov esi, dword [sym.imp.ntdll.dll_RtlFreeHeap]
call esi
mov eax, dword fs:[0x18]
push dword [ebp - 0x44]
push 0
mov eax, dword [eax + 0x30]
push dword [eax + 0x18]
call esi
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x34]
lea esp, [ebp - 0x54]
mov ecx, dword [ebp - 0x1c]
call fcn.76aac8aa
call fcn.76aa16ac
ret