Function at 0x419a50
Capabilities:
Check for peb beingdebugged flag

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x46ba30
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x4860f0]
xor eax, esp
mov dword [esp + 0x30], eax
push ebx
push esi
push edi
mov eax, dword [0x4860f0]
xor eax, esp
push eax
lea eax, [esp + 0x48]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push eax
lea eax, [esp + 0x1c]
mov edi, ecx
push eax
mov ebx, 0x4781ac
mov dword [esp + 0x18], edi
call fcn.00405cd0
add esp, 8
xor ecx, ecx
mov dword [esp + 0x50], ecx
mov eax, dword [eax]
mov dword [esp + 0x38], ecx
mov word [esp + 0x28], cx
mov ecx, eax
mov dword [esp + 0x3c], 7
lea esi, [ecx + 2]
mov ebx, 2
mov dx, word [ecx]
add ecx, ebx
test dx, dx
jne 0x419ac6
sub ecx, esi
sar ecx, 1
push ecx
lea esi, [esp + 0x28]
call fcn.0040c3e0
mov byte [esp + 0x50], bl
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x419b02
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 5
push str.dtid
lea eax, [esp + 0x2c]
call fcn.00415000
mov ecx, dword [edi + 0x60]
mov eax, ecx
lea esi, [eax + 2]
lea ebx, [ebx]
mov dx, word [eax]
add eax, ebx
test dx, dx
jne 0x419b20
sub eax, esi
sar eax, 1
push eax
push ecx
lea eax, [esp + 0x2c]
call fcn.00415000
push 1
push 0x4781ac
lea eax, [esp + 0x2c]
call fcn.00415000
push ebx
push 0x4781c8
lea eax, [esp + 0x2c]
call fcn.00415000
mov ecx, dword [edi + 0x1c]
mov eax, ecx
lea edx, [eax + 2]
mov si, word [eax]
add eax, ebx
test si, si
jne 0x419b60
sub eax, edx
sar eax, 1
push eax
push ecx
lea eax, [esp + 0x2c]
call fcn.00415000
push 1
push 0x4781ac
lea eax, [esp + 0x2c]
call fcn.00415000
mov edx, dword [0x488da4]
mov eax, dword [edx + 0xc]
mov ecx, 0x488da4
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x1c]
push ecx
mov byte [esp + 0x54], 3
call fcn.00457458
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
add esp, 4
push edx
push eax
push 0x472e24
lea edi, [esp + 0x20]
call fcn.00405f00
add esp, 0xc
push 5
push 0x4781b0
lea eax, [esp + 0x2c]
call fcn.00415000
mov esi, dword [esp + 0x14]
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, ebx
test cx, cx
jne 0x419be6
sub eax, edx
sar eax, 1
push eax
push esi
lea eax, [esp + 0x2c]
call fcn.00415000
push 1
push 0x4781ac
lea eax, [esp + 0x2c]
call fcn.00415000
add esi, 0xfffffff0
mov byte [esp + 0x50], bl
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x419c2f
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov edi, dword [esp + 0x10]
lea esi, [edi + 0x28]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [esp + 0x10], esi
lea ebx, [edi + 0x40]
mov byte [esp + 0x50], 4
mov eax, dword [ebx + 0x1c]
inc eax
cmp dword [ebx + 0x14], eax
ja 0x419c57
call fcn.0041a380
mov esi, dword [ebx + 0x18]
add esi, dword [ebx + 0x1c]
mov eax, dword [ebx + 0x14]
cmp eax, esi
ja 0x419c66
sub esi, eax
mov ecx, dword [ebx + 0x10]
cmp dword [ecx + esi*4], 0
jne 0x419c7f
mov ecx, 1
call fcn.0041a550
mov edx, dword [ebx + 0x10]
mov dword [edx + esi*4], eax
mov ecx, dword [ebx + 0x10]
mov ecx, dword [ecx + esi*4]
lea eax, [esp + 0x24]
push eax
call fcn.0041a5b0
inc dword [ebx + 0x1c]
mov edx, dword [edi + 0x24]
add esp, 4
push edx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [esp + 0x3c], 8
jb 0x419cbe
mov ecx, dword [esp + 0x28]
push ecx
call fcn.004567f0
add esp, 4
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.004567fb
mov esp, ebp
pop ebp
ret 4