Function at 0x10022ee0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1015fc6f
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x1024ed04]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
cmp dword [ebx + 0x40], 0
jne 0x10022f29
mov eax, 0x80004005
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
lea eax, [ebx + 0x14]
mov dword [ebp - 0x30], eax
mov byte [ebp - 0x2c], 0
mov dword [ebp - 4], 0
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebx + 0xc]
mov eax, dword [ebp + 8]
mov byte [ebp - 0x2c], 1
cmp eax, ecx
je 0x10023029
jge 0x10023065
sub ecx, eax
mov dword [ebp + 8], 0
mov dword [ebp - 0x14], ecx
test ecx, ecx
jle 0x10023029
push dword [ebx + 0x3c]
lea esi, [ebx + 0x38]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov eax, 1
xchg dword [esi], eax
push 0xffffffffffffffff
push 0
push 0
push dword [ebx + 0x40]
call dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
push dword [ebp + 0xc]
push dword [ebx + 0x3c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x10022fb8
xor eax, eax
xchg dword [esi], eax
test eax, eax
je 0x10022fc0
mov ecx, 0x102
call fcn.10022a10
mov edi, eax
jmp 0x1002302b
test eax, eax
jne 0x1002305c
mov ecx, dword [ebx + 0xc]
xor esi, esi
test ecx, ecx
jle 0x10023019
mov edx, dword [ebx + 0x10]
mov eax, dword [ebx + 4]
nop
cmp dword [eax], edx
je 0x10022fde
inc esi
add eax, 4
cmp esi, ecx
jl 0x10022fd0
jmp 0x10023019
cmp esi, 0xffffffff
je 0x10023019
test esi, esi
js 0x10023190
cmp esi, ecx
jge 0x10023190
mov eax, dword [ebx + 8]
push 0xea60
mov edi, dword [eax + esi*4]
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x10023055
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
lea ecx, [ebx + 4]
call fcn.10023400
mov esi, dword [ebp + 8]
inc esi
mov dword [ebp + 8], esi
cmp esi, dword [ebp - 0x14]
jl 0x10022f6d
xor edi, edi
mov dword [ebp - 4], 0xffffffff
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [ebp - 0x2c], 0
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edi, 0x80004005
jmp 0x1002302b
call fcn.100229f0
mov edi, eax
jmp 0x1002302b
sub eax, ecx
mov dword [ebp - 0x14], 0
mov dword [ebp + 8], eax
test eax, eax
jle 0x10023029
push dword [ebx + 0x3c]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
lea eax, [ebp - 0x18]
push eax
push 0
push ebx
push 0x10023310
push dword [ebx + 0x2c]
push 0
call fcn.1013df2b
mov esi, eax
add esp, 0x18
mov dword [ebp - 0x10], esi
mov byte [ebp - 4], 1
test esi, esi
je 0x1002316a
push dword [ebp + 0xc]
push dword [ebx + 0x3c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x1002315c
lea edi, [ebx + 4]
mov dword [ebp - 0x1c], edi
mov eax, dword [edi + 8]
push 4
inc eax
push eax
push dword [edi]
call fcn.1013dd57
add esp, 0xc
test eax, eax
je 0x10023131
mov dword [edi], eax
mov eax, dword [edi + 8]
push 4
inc eax
push eax
push dword [edi + 4]
call fcn.1013dd57
add esp, 0xc
test eax, eax
je 0x10023131
mov dword [edi + 4], eax
mov eax, dword [edi + 8]
mov dword [ebp - 0x20], eax
mov ecx, dword [edi]
lea edx, [eax*4]
add ecx, edx
mov dword [ebp - 0x24], ecx
mov byte [ebp - 4], 2
je 0x10023111
mov eax, dword [ebp - 0x18]
mov dword [ecx], eax
mov byte [ebp - 4], 1
mov eax, dword [edi + 4]
add eax, edx
mov dword [ebp - 0x28], eax
mov byte [ebp - 4], 3
je 0x10023125
mov dword [eax], esi
mov byte [ebp - 4], 1
inc dword [edi + 8]
xor esi, esi
mov dword [ebp - 0x10], esi
mov byte [ebp - 4], 0
test esi, esi
je 0x10023147
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x10], 0
mov edi, dword [ebp - 0x14]
inc edi
mov dword [ebp - 0x14], edi
cmp edi, dword [ebp + 8]
jl 0x10023075
jmp 0x10023029
cmp eax, 0x102
jne 0x1002316a
mov edi, 0x80070102
jmp 0x10023171
call fcn.100229f0
mov edi, eax
mov byte [ebp - 4], 0
test esi, esi
je 0x1002302b
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x10], 0
jmp 0x1002302b
push 1
push 0xc000008c
call fcn.100019f0
int3