Function at 0x77ca9850
Capabilities:
Check for peb beingdebugged flag

Disassembly:
cmp dword [ebp + 0x10], 2
je 0x77ca9924
cmp dword [ebp + 0x10], 7
jne 0x77ca993d
jmp 0x77ca9924
push 0x57
pop eax
jmp 0x77ca9986
xor ecx, ecx
jmp 0x77ca98e1
push 0x30
push 0x77ca9990
call fcn.77cc73d0
xor ebx, ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x28], ebx
cmp dword [ebp + 0x18], ebx
jne 0x77ca4075
cmp dword [ebp + 0x20], ebx
je 0x77ca987e
cmp dword [ebp + 0x24], ebx
je 0x77ca4075
mov edi, dword [ebp + 0x14]
cmp edi, ebx
je 0x77ca4075
mov esi, dword [ebp + 0x10]
cmp esi, ebx
je 0x77ca4075
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x24]
push eax
push dword [ebp + 8]
call fcn.77cc741a
cmp eax, ebx
je 0x77cd6850
mov word [ebp - 0x40], bx
mov ecx, dword [edi]
and ecx, 0x7fffffff
cmp ecx, 0x7fff
ja 0x77cd685c
mov cx, word [edi]
add cx, cx
mov word [ebp - 0x3e], cx
mov dword [ebp - 0x3c], esi
mov dword [ebp + 8], ebx
mov ecx, dword [ebp + 0x24]
cmp ecx, ebx
je 0x77ca9095
mov ecx, dword [ecx]
mov dword [ebp + 0x18], ecx
mov dword [ebp - 0x34], ecx
test al, 1
jne 0x77cd6867
lea ecx, [ebp + 8]
push ecx
lea ecx, [ebp + 0x18]
push ecx
push dword [ebp + 0x20]
lea ecx, [ebp + 0x10]
push ecx
lea ecx, [ebp - 0x40]
push ecx
push dword [ebp + 0xc]
push eax
call fcn.77ca95e4
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], ebx
jne 0x77ca993d
mov ecx, dword [ebp + 0x20]
cmp ecx, ebx
je 0x77ca993d
cmp dword [ebp + 0x10], 1
jne 0x77ca405c
mov edx, dword [ebp + 0x18]
cmp edx, 2
jbe 0x77ca993d
mov eax, edx
shr eax, 1
lea eax, [ecx + eax*2]
cmp word [eax - 2], bx
jne 0x77cd6a03
cmp word [ebp - 0x40], 2
jb 0x77ca9950
movzx eax, word [ebp - 0x40]
shr eax, 1
dec eax
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
mov eax, dword [ebp + 0x24]
cmp eax, ebx
je 0x77ca995c
mov ecx, dword [ebp + 0x18]
mov dword [eax], ecx
mov eax, dword [ebp + 0x1c]
cmp eax, ebx
je 0x77ca9968
mov ecx, dword [ebp + 0x10]
mov dword [eax], ecx
cmp dword [ebp - 0x20], ebx
jne 0x77cd6a19
cmp dword [ebp - 0x24], ebx
jne 0x77cd6a34
cmp dword [ebp - 0x28], ebx
jne 0x77cd6a42
mov eax, dword [ebp - 0x1c]
call fcn.77cc73b0
ret 0x20
mov dword [ebp - 0x1c], 6
jmp 0x77ca9968
mov word [ebp - 0x3e], 0xfffe
jmp 0x77ca98ce
mov esi, eax
push 0xfffffffffffffffe
pop edi
and esi, edi
lea eax, [ebp - 0x2c]
push eax
push esi
call fcn.77d05cde
test eax, eax
jne 0x77cd698a
cmp dword [ebp - 0x2c], 5
jb 0x77cd6890
cmp dword [ebp - 0x2c], 0xa
jbe 0x77cd698a
mov eax, dword fs:[0x18]
mov ecx, dword [ebp + 0x18]
add ecx, 2
push ecx
push ebx
mov eax, dword [eax + 0x30]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov dword [ebp - 0x20], eax
cmp eax, ebx
jne 0x77cd68bd
mov dword [ebp - 0x1c], 8
jmp 0x77ca9968
mov dword [ebp - 4], ebx
lea ecx, [ebp + 8]
push ecx
lea ecx, [ebp + 0x18]
push ecx
push eax
lea eax, [ebp + 0x10]
push eax
lea eax, [ebp - 0x40]
push eax
push dword [ebp + 0xc]
push esi
call fcn.77d03848
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], edi
jmp 0x77cd690c
cmp eax, ebx
je 0x77cd6917
cmp eax, 0xea
jne 0x77cd692c
cmp dword [ebp + 0x18], 0x7fff0000
jbe 0x77cd692c
mov dword [ebp - 0x1c], 0xd
jmp 0x77ca9968
cmp eax, ebx
jne 0x77cd696c
cmp dword [ebp + 0x10], 1
je 0x77cd6942
cmp dword [ebp + 0x10], 7
je 0x77cd6942
cmp dword [ebp + 0x10], 2
jne 0x77cd694c
cmp dword [ebp + 0x18], 2
jb 0x77cd694c
sub dword [ebp + 0x18], 2
mov eax, dword [ebp + 0x18]
cmp eax, dword [ebp - 0x34]
ja 0x77cd6965
push eax
push dword [ebp - 0x20]
push dword [ebp + 0x20]
call sub.ntdll.dll_memcpy
add esp, 0xc
jmp 0x77cd696c
mov dword [ebp - 0x1c], 0xd
push dword [ebp - 0x20]
push ebx
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov dword [ebp - 0x20], ebx
jmp 0x77ca990e
mov dword [ebp - 4], 1
lea eax, [ebp + 8]
push eax
lea eax, [ebp + 0x18]
push eax
push dword [ebp + 0x20]
lea eax, [ebp + 0x10]
push eax
lea eax, [ebp - 0x40]
push eax
push dword [ebp + 0xc]
push esi
call fcn.77d03848
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], edi
jmp 0x77cd69df
cmp dword [ebp - 0x1c], ebx
je 0x77cd69f1
cmp dword [ebp - 0x1c], 0xea
jne 0x77ca990e
cmp dword [ebp + 0x18], 0x7fff0000
jbe 0x77ca990e
jmp 0x77cd6920
add edx, 2
mov ecx, dword [ebp + 0x24]
cmp edx, dword [ecx]
ja 0x77ca993d
mov word [eax], bx
jmp 0x77ca993d
push dword [ebp - 0x20]
push ebx
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
jmp 0x77ca9971
lea eax, [ebp - 0x24]
push eax
call fcn.77cc7890
jmp 0x77ca997a
mov esi, 0x77d1a580
push esi
call dword [sym.imp.ntdll.dll_RtlEnterCriticalSection]
push dword [ebp - 0x28]
call fcn.77cc7d61
push esi
call dword [sym.imp.ntdll.dll_RtlLeaveCriticalSection]
jmp 0x77ca9983