Function at 0x109cd40
Capabilities:
Create thread

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push esi
xor ebx, ebx
push edi
mov edi, dword [ebp + 8]
cmp dword [ebp + 0x2c], ebx
je 0x109cd69
mov eax, dword [edi]
cmp dword [eax + 0x26a8c], 6
jb 0x109cd66
push eax
call fcn.01088850
jmp 0x109cd69
mov dword [ebp + 0x2c], ebx
mov esi, dword [ebp + 0x20]
mov eax, dword [ebp + 0x2c]
mov dword [esi], ebx
mov ecx, dword [edi]
push eax
push ecx
mov dword [ebp + 8], ebx
call fcn.0108b8e0
mov dword [ebp - 4], eax
cmp eax, ebx
je 0x109cf9d
mov ecx, dword [edi]
cmp dword [ecx + 0x2f1a4], ebx
jne 0x109cf72
mov ebx, dword [ebp + 0x18]
lea esp, [esp]
mov eax, dword [ebp + 0x24]
test eax, eax
je 0x109cdb0
cmp dword [eax], 0
jne 0x109cf42
mov eax, dword [ebp + 8]
test eax, eax
je 0x109cdcc
cmp eax, 0xffffffff
je 0x109cdcc
mov edx, dword [ecx + 0x1bc]
push eax
call edx
mov dword [ebp + 8], 0
cmp dword [ebp + 0x1c], 0
jne 0x109cde1
mov eax, dword [esi]
test eax, eax
je 0x109cde1
cmp eax, 0xffffffff
jne 0x109ce71
cmp dword [ebp + 0x2c], 0
je 0x109ce4f
mov ecx, dword [ebp - 4]
mov eax, dword [edi + 8]
mov edx, dword [ebp + 0x14]
mov eax, dword [eax + 0x47c]
push ecx
push 0
push ebx
push ebx
push 0xff
push 6
push 3
push edx
call eax
mov dword [esi], eax
mov esi, dword [edi]
lea ecx, [esi + 0x20]
push ecx
call dword [sym.imp.KERNEL32.DLL_InterlockedIncrement]
push 0
push 1
push 0x40
push esi
call fcn.01087c30
mov edx, dword [ebp + 0x20]
mov eax, dword [edx]
mov ecx, dword [edi]
push 0x1000
push 6
push eax
push ecx
call fcn.0101c550
push 0x40
call fcn.0101c4b0
mov edx, dword [edi]
lea eax, [edx + eax*4 + 8]
push eax
call dword [sym.imp.KERNEL32.DLL_InterlockedDecrement]
mov esi, dword [ebp + 0x20]
jmp 0x109ce71
mov edx, dword [ebp - 4]
mov ecx, dword [edi + 8]
mov eax, dword [ebp + 0x14]
mov ecx, dword [ecx + 0x47c]
push edx
push 0
push ebx
push ebx
push 0xff
push 6
push 3
push eax
call ecx
mov dword [esi], eax
mov eax, dword [esi]
test eax, eax
je 0x109cf33
cmp eax, 0xffffffff
je 0x109cf33
mov edx, dword [edi + 8]
push 0
push eax
mov eax, dword [edx + 0x4ec]
call eax
test eax, eax
jne 0x109ceb7
mov ecx, dword [edi + 8]
mov edx, dword [ecx + 0x314]
call edx
cmp eax, 0x217
je 0x109ceb7
mov eax, dword [edi]
mov ecx, dword [esi]
mov edx, dword [eax + 0x1bc]
push ecx
call edx
jmp 0x109cf22
push 0x1d
push 8
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.DLL_HeapAlloc]
mov esi, eax
test esi, esi
je 0x109cf1f
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x20]
mov dword [esi + 8], eax
mov dword [esi + 0xc], ebx
mov edx, dword [ecx]
mov ecx, dword [ebp + 0xc]
mov dword [esi + 4], edx
mov edx, dword [ebp + 0x10]
mov dword [esi + 0x14], ecx
mov ecx, dword [ebp + 0x28]
mov dword [esi + 0x18], edx
mov dword [esi], edi
mov dword [esi + 0x10], ecx
test eax, eax
je 0x109cf19
lea edx, [ebp + 0x18]
push edx
push 0
push esi
push fcn.0109cbd0
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_CreateThread]
mov dword [ebp + 8], eax
test eax, eax
je 0x109cf19
cmp eax, 0xffffffff
jne 0x109cf1f
push esi
call fcn.0109cbd0
mov esi, dword [ebp + 0x20]
mov ecx, dword [edi]
cmp dword [ecx + 0x2f1a4], 0
je 0x109cda0
jmp 0x109cf5a
mov eax, dword [edi + 8]
mov ecx, dword [eax + 0x124]
push 0xa
call ecx
jmp 0x109cf22
mov eax, dword [ebp + 8]
test eax, eax
je 0x109cf72
cmp eax, 0xffffffff
je 0x109cf5d
mov eax, dword [edi]
lea edx, [ebp + 8]
push edx
push eax
call fcn.0101cc40
mov eax, dword [ebp + 8]
test eax, eax
je 0x109cf72
cmp eax, 0xffffffff
je 0x109cf72
mov edx, dword [edi]
lea ecx, [ebp + 8]
push ecx
push edx
call fcn.0101cc40
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov esi, dword [sym.imp.KERNEL32.DLL_HeapFree]
test eax, eax
je 0x109cf8e
push eax
push 0
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push eax
call esi
mov ecx, dword [ebp - 4]
push ecx
push 0
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push eax
call esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28