Function at 0x410120
Capabilities:
Check for peb beingdebugged flag

Disassembly:
push 0xffffffffffffffff
push 0x4295c8
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push ebp
push esi
push edi
mov eax, dword [0x43b14c]
xor eax, esp
push eax
lea eax, [esp + 0x18]
mov dword fs:[0], eax
mov esi, dword [esp + 0x2c]
lea edi, [esi + esi + 2]
cmp edi, dword [esp + 0x30]
mov dword [esp + 0x20], 0
mov dword [esp + 0x14], esi
jge 0x410233
mov ebx, dword [esp + 0x28]
mov ecx, dword [ebx + edi*4 - 4]
xor eax, eax
test ecx, ecx
setne al
test eax, eax
je 0x410229
mov eax, dword [ebx + edi*4]
lea ecx, [ecx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4101a6
test dx, dx
je 0x4101a2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4101a6
add eax, 4
add ecx, 4
test dx, dx
jne 0x410180
xor eax, eax
jmp 0x4101ab
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
setl al
test al, al
je 0x4101b5
dec edi
mov ecx, dword [ebx + edi*4]
lea ebp, [ebx + esi*4]
mov esi, dword [ebp]
lea eax, [ecx - 0x10]
sub esi, 0x10
cmp eax, esi
je 0x410211
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x410202
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x410202
call fcn.00401510
mov dword [esp + 0x2c], eax
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x4101f6
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ecx, dword [esp + 0x2c]
add ecx, 0x10
mov dword [ebp], ecx
jmp 0x41020d
mov ebx, dword [ecx - 0xc]
push ecx
mov eax, ebp
call fcn.00401470
mov ebx, dword [esp + 0x28]
mov dword [esp + 0x2c], edi
mov esi, dword [esp + 0x2c]
lea edi, [edi + edi + 2]
cmp edi, dword [esp + 0x30]
jl 0x410163
jmp 0x410237
push 0x80004005
call fcn.00401790
mov ebx, dword [esp + 0x28]
mov eax, dword [esp + 0x30]
cmp edi, eax
jne 0x4102a4
mov ecx, dword [ebx + eax*4 - 4]
lea edi, [ebx + esi*4]
mov esi, dword [edi]
lea eax, [ecx - 0x10]
sub esi, 0x10
cmp eax, esi
je 0x41029b
cmp dword [esi + 0xc], 0
lea ebp, [esi + 0xc]
jl 0x41028c
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x41028c
call fcn.00401510
mov dword [esp + 0x2c], eax
or eax, 0xffffffff
lock xadd dword [ebp], eax
dec eax
test eax, eax
jg 0x410281
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ecx, dword [esp + 0x2c]
add ecx, 0x10
mov dword [edi], ecx
jmp 0x41029b
mov ebx, dword [ecx - 0xc]
push ecx
mov eax, edi
call fcn.00401470
mov ebx, dword [esp + 0x28]
mov edx, dword [esp + 0x30]
dec edx
mov dword [esp + 0x2c], edx
mov esi, dword [esp + 0x34]
push ecx
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
add esi, 0xfffffff0
mov dword [esp + 0x34], esp
mov ebp, esp
call edx
cmp dword [esi + 0xc], 0
lea ecx, [esi + 0xc]
jl 0x4102d6
cmp eax, dword [esi]
jne 0x4102d6
mov edi, esi
mov eax, 1
lock xadd dword [ecx], eax
jmp 0x410312
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
jne 0x4102ef
call fcn.004015e0
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
lea ecx, [eax + eax + 2]
push ecx
add esi, 0x10
lea edx, [eax + eax + 2]
push esi
push edx
lea eax, [edi + 0x10]
push eax
call fcn.00419425
add esp, 0x10
mov ecx, dword [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x34]
add edi, 0x10
push ebx
mov dword [ebp], edi
call fcn.00410480
mov dword [esp + 0x2c], 0xffffffff
mov eax, dword [esp + 0x40]
add eax, 0xfffffff0
add esp, 0xc
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x410352
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret