Function at 0x420420
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x14]
push ebx
push esi
push edi
push dword [ebp + 0xc]
mov esi, ecx
mov byte [eax], 0
push dword [ebp + 8]
lea ecx, [esi - 4]
call fcn.0041feb0
xor ebx, ebx
lea ecx, [esi + 0x60]
mov dword [ebp + 0xc], ecx
cmp dword [esi + 0x78], ebx
jbe 0x420581
mov edx, dword [sym.imp.KERNEL32.dll_CreateEventA]
cmp ebx, dword [ecx]
je 0x420531
mov eax, dword [esi + 0x74]
mov edi, dword [eax + ebx*4]
cmp dword [edi + 4], 0
jne 0x420496
push 0
push 0
push 0
push 0
call edx
mov dword [edi + 4], eax
test eax, eax
jne 0x420490
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov ecx, 1
cmovne ecx, eax
test ecx, ecx
jne 0x420578
mov edx, dword [sym.imp.KERNEL32.dll_CreateEventA]
cmp dword [edi + 8], 0
jne 0x4204c5
push 0
push 0
push 0
push 0
call edx
mov dword [edi + 8], eax
test eax, eax
jne 0x4204c5
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov ecx, 1
cmovne ecx, eax
test ecx, ecx
jne 0x420578
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
test eax, eax
jne 0x4204d8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
test eax, eax
jne 0x4204eb
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [edi + 0xc], 0
mov byte [edi + 0x10], 0
jne 0x420528
lea eax, [ebp + 8]
push eax
push 0
push edi
push 0x425b10
push 0
push 0
call fcn.00442845
add esp, 0x18
mov dword [edi + 0xc], eax
test eax, eax
jne 0x420528
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov ecx, 1
cmovne ecx, eax
test ecx, ecx
jne 0x420578
mov edx, dword [sym.imp.KERNEL32.dll_CreateEventA]
lea ecx, [esi + 0x60]
mov eax, dword [esi + 0x78]
inc ebx
cmp ebx, eax
jb 0x420453
xor edi, edi
test eax, eax
je 0x420584
mov ebx, dword [sym.imp.KERNEL32.dll_SetEvent]
nop dword [eax]
cmp edi, dword [ecx]
je 0x420570
mov eax, dword [esi + 0x74]
mov eax, dword [eax + edi*4]
push dword [eax + 4]
mov byte [eax + 0x10], 0
call ebx
test eax, eax
jne 0x42056d
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esi + 0x60]
inc edi
cmp edi, dword [esi + 0x78]
jb 0x420550
jmp 0x420584
pop edi
pop esi
mov eax, ecx
pop ebx
pop ebp
ret 0x10
mov dword [ebp + 0xc], ecx
mov eax, dword [ecx]
mov ecx, dword [esi + 0x74]
push dword [ebp + 0x10]
mov ecx, dword [ecx + eax*4]
call fcn.0041f800
mov ecx, dword [esi + 0x78]
xor edi, edi
test ecx, ecx
je 0x4205bd
mov ebx, dword [ebp + 0xc]
cmp edi, dword [ebx]
je 0x4205b5
mov eax, dword [esi + 0x74]
push 0xffffffffffffffff
mov eax, dword [eax + edi*4]
push dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esi + 0x78]
inc edi
cmp edi, ecx
jb 0x4205a0
xor edi, edi
test ecx, ecx
je 0x42068b
mov edx, dword [esi + 0x74]
nop word [eax + eax]
mov eax, dword [edx]
cmp dword [eax + 0x6c], 0x80004004
je 0x4206ac
inc edi
add edx, 4
cmp edi, ecx
jb 0x4205d0
mov edx, dword [esi + 0x74]
xor edi, edi
nop dword [eax]
mov eax, dword [edx]
cmp dword [eax + 0x6c], 0x8007000e
je 0x4206a0
inc edi
add edx, 4
cmp edi, ecx
jb 0x4205f0
mov edi, dword [esi + 0x74]
xor edx, edx
nop dword [eax]
mov eax, dword [edi]
mov eax, dword [eax + 0x6c]
test eax, eax
je 0x42062c
cmp eax, 0x20000010
je 0x42062c
cmp eax, 1
je 0x42062c
cmp eax, 0x80004005
jne 0x42068d
inc edx
add edi, 4
cmp edx, ecx
jb 0x420610
mov edi, dword [esi + 0x74]
xor edx, edx
nop dword [eax]
mov eax, dword [edi]
cmp dword [eax + 0x6c], 1
je 0x420694
inc edx
add edi, 4
cmp edx, ecx
jb 0x420640
mov edi, dword [esi + 0x74]
xor edx, edx
mov eax, dword [edi]
mov eax, dword [eax + 0x6c]
test eax, eax
je 0x420665
cmp eax, 0x20000010
jne 0x42068d
inc edx
add edi, 4
cmp edx, ecx
jb 0x420655
xor edi, edi
nop
mov eax, dword [esi + 0x74]
push dword [ebp + 0x14]
mov ecx, dword [eax + edi*4]
add ecx, 0x18
call fcn.0041ef60
test eax, eax
jne 0x42068d
inc edi
cmp edi, dword [esi + 0x78]
jb 0x420670
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret 0x10
pop edi
pop esi
mov eax, 1
pop ebx
pop ebp
ret 0x10
pop edi
pop esi
mov eax, 0x8007000e
pop ebx
pop ebp
ret 0x10
pop edi
pop esi
mov eax, 0x80004004
pop ebx
pop ebp
ret 0x10