Function at 0x4101e0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
push 0x453dc0
mov edi, edx
mov ebx, ecx
call dword [sym.imp.ntdll.dll_RtlInterlockedPopEntrySList]
test eax, eax
je 0x410205
lock dec dword [0x453dc8]
jmp 0x41021c
mov eax, dword [0x453dd0]
add eax, 8
push eax
push 4
push dword [0x453afc]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
lea esi, ds:[eax + 8]
mov eax, dword [ebp + 8]
mov dword [esi + 8], edi
lea edx, [ebx + 0x10]
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0xa80
lock bts dword [edx], 0
jae 0x41024c
mov ecx, edx
call fcn.00411400
lea edx, [ebx + 0x10]
mov eax, dword [ebx + 0xc]
lea ecx, [ebx + 8]
mov dword [esi + 4], eax
mov dword [esi], ecx
mov dword [eax], esi
lea eax, [ebx + 0x30]
mov dword [ecx + 4], esi
lock inc dword [eax]
or edi, 0xffffffff
lock xadd dword [edx], edi
mov eax, edi
and al, 6
cmp al, 2
jne 0x41028a
dec edi
mov eax, edi
lea esi, [edi + 4]
lock cmpxchg dword [edx], esi
cmp eax, edi
jne 0x41028a
lea edx, [edi + 4]
lea ecx, [ebx + 0x10]
call fcn.004112a0
mov eax, dword [ebx + 0x28]
lea esi, [ebx + 0x28]
mov dword [ebp - 4], eax
test eax, eax
jne 0x4102d0
push 0x7fffffff
push eax
push eax
push 0x1f0003
lea eax, [ebp - 4]
push eax
call dword [sym.imp.ntdll.dll_NtCreateSemaphore]
mov ecx, dword [ebp - 4]
xor eax, eax
lock cmpxchg dword [esi], ecx
test eax, eax
je 0x4102cd
push dword ds:[ebp - 4]
call dword [sym.imp.ntdll.dll_NtClose]
mov eax, dword [esi]
mov dword [ebp - 4], eax
jmp 0x4102d0
mov eax, dword [ebp - 4]
push 0
push 1
push eax
call dword [sym.imp.ntdll.dll_NtReleaseSemaphore]
mov eax, dword ds:[ebx + 0x2c]
cmp dword [ebx + 0x30], eax
jb 0x41042e
cmp eax, dword [ebx + 0x18]
jae 0x41042e
lea edi, [ebx + 0x24]
mov dword [ebp - 8], edi
lock bts dword [edi], 0
jae 0x410306
mov ecx, edi
call fcn.00411400
mov eax, dword [ebx + 0x2c]
cmp eax, dword [ebx + 0x18]
jae 0x410405
mov edx, dword [ebx]
and edx, 0xfffffffe
mov eax, edx
lea ecx, [edx + 2]
lock cmpxchg dword [ebx], ecx
cmp eax, edx
je 0x41034a
mov edx, dword [ebx]
test dl, 1
jne 0x410405
nop
lea ecx, [edx + 2]
mov eax, edx
lock cmpxchg dword [ebx], ecx
cmp eax, edx
je 0x41034a
mov edx, dword ds:[ebx]
test dl, 1
je 0x410330
jmp 0x410405
push 0x453d70
call dword [sym.imp.ntdll.dll_RtlInterlockedPopEntrySList]
mov esi, eax
test esi, esi
je 0x410364
lock dec dword [0x453d78]
jmp 0x41037d
mov eax, dword [0x453d80]
add eax, 8
push eax
push 4
push dword [0x453afc]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov esi, eax
push 0
lea ecx, [esi + 8]
lea eax, [ebp - 4]
mov dword [ecx], 0x410600
push eax
push ecx
push 0x40a020
push 0
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
mov dword [ecx + 4], ebx
call dword [sym.imp.ntdll.dll_RtlCreateUserThread]
test eax, eax
js 0x4103b9
push dword [ebp - 4]
inc dword [ebx + 0x2c]
call dword [sym.imp.ntdll.dll_NtClose]
jmp 0x410405
mov eax, dword [0x453d78]
cmp eax, dword [0x453d7c]
push esi
lfence
jae 0x4103de
push 0x453d70
call dword [sym.imp.ntdll.dll_RtlInterlockedPushEntrySList]
lock inc dword [0x453d78]
jmp 0x4103ec
push 0
push dword [0x453afc]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov edx, dword [ebx]
and edx, 0xfffffffe
mov eax, edx
lea ecx, [edx - 2]
lock cmpxchg dword [ebx], ecx
cmp eax, edx
je 0x410405
mov ecx, ebx
call fcn.00411040
or ecx, 0xffffffff
lock xadd dword [edi], ecx
mov eax, ecx
and al, 6
cmp al, 2
jne 0x41042e
lea edi, [ecx - 1]
mov ecx, dword [ebp - 8]
lea edx, [edi + 4]
mov eax, edi
mov esi, edx
lock cmpxchg dword [ecx], esi
cmp eax, edi
jne 0x41042e
call fcn.004112a0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc