Function at 0x41a070
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x472008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0x10]
push esi
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp + 0x14]
push edi
push eax
mov dword [ebp - 0x14], ecx
mov byte [ecx], 0
lea ecx, [ebx - 4]
push edx
call fcn.00419b50
xor edi, edi
lea ecx, [ebx + 0x60]
mov dword [ebp - 0xc], ecx
cmp dword [ebx + 0x78], edi
jbe 0x41a22f
cmp edi, dword [ecx]
je 0x41a0ef
mov eax, dword [ebx + 0x74]
mov esi, dword [eax + edi*4]
mov eax, dword [esi + 4]
test eax, eax
je 0x41a12e
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
test eax, eax
jne 0x41a143
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x41a1cf
mov eax, 1
test eax, eax
jne 0x41a1cf
lea ecx, [ebx + 0x60]
mov eax, dword [ebx + 0x78]
inc edi
cmp edi, eax
jb 0x41a0b5
xor esi, esi
test eax, eax
je 0x41a232
cmp esi, dword [ecx]
je 0x41a123
mov eax, dword [ebx + 0x74]
mov eax, dword [eax + esi*4]
push dword [eax + 4]
mov byte [eax + 0x10], 0
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
je 0x41a1f0
lea ecx, [ebx + 0x60]
inc esi
cmp esi, dword [ebx + 0x78]
jb 0x41a101
jmp 0x41a232
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esi + 4], eax
test eax, eax
je 0x41a0d1
mov eax, dword [esi + 8]
test eax, eax
je 0x41a15a
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
test eax, eax
jne 0x41a173
jmp 0x41a0d1
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esi + 8], eax
test eax, eax
je 0x41a0d1
cmp dword [esi + 0xc], 0
mov byte [esi + 0x10], 0
jne 0x41a0ec
lea eax, [ebp - 8]
push eax
push 0
push esi
push 0x41f320
push 0
push 0
call dword [sym.imp.msvcrt.dll__beginthreadex]
add esp, 0x18
mov dword [esi + 0xc], eax
test eax, eax
jne 0x41a0ec
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x41a1cf
pop edi
mov eax, 1
movzx eax, ax
pop esi
or eax, 0x80070000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045e090
mov esp, ebp
pop ebp
ret 0x10
jle 0x41a37d
pop edi
movzx eax, ax
pop esi
or eax, 0x80070000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045e090
mov esp, ebp
pop ebp
ret 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x41a20f
jg 0x41a214
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045e090
mov esp, ebp
pop ebp
ret 0x10
mov eax, 1
pop edi
movzx eax, ax
pop esi
or eax, 0x80070000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045e090
mov esp, ebp
pop ebp
ret 0x10
mov dword [ebp - 0xc], ecx
mov eax, dword [ecx]
mov ecx, dword [ebx + 0x74]
push dword [ebp - 0x10]
mov ecx, dword [ecx + eax*4]
call fcn.00419420
mov ecx, dword [ebx + 0x78]
xor edi, edi
xor esi, esi
test ecx, ecx
je 0x41a2ac
mov eax, dword [ebp - 0xc]
cmp esi, dword [eax]
je 0x41a280
mov eax, dword [ebx + 0x74]
push 0xffffffffffffffff
mov eax, dword [eax + esi*4]
push dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
jne 0x41a277
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x41a277
or eax, 0xffffffff
test edi, edi
jne 0x41a27d
mov edi, eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebx + 0x78]
inc esi
cmp esi, ecx
jb 0x41a250
test edi, edi
je 0x41a2ac
jle 0x41a297
movzx edi, di
or edi, 0x80070000
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045e090
mov esp, ebp
pop ebp
ret 0x10
xor esi, esi
test ecx, ecx
je 0x41a37b
mov edx, dword [ebx + 0x74]
lea esp, [esp]
mov eax, dword [edx]
cmp dword [eax + 0x6c], 0x80004004
je 0x41a3c0
inc esi
add edx, 4
cmp esi, ecx
jb 0x41a2c0
mov esi, dword [ebx + 0x74]
xor edx, edx
lea esp, [esp]
mov eax, dword [esi]
cmp dword [eax + 0x6c], 0x8007000e
je 0x41a3a8
inc edx
add esi, 4
cmp edx, ecx
jb 0x41a2e0
mov esi, dword [ebx + 0x74]
xor edx, edx
lea esp, [esp]
mov eax, dword [esi]
mov eax, dword [eax + 0x6c]
test eax, eax
je 0x41a31c
cmp eax, 0x20000010
je 0x41a31c
cmp eax, 1
je 0x41a31c
cmp eax, 0x80004005
jne 0x41a37d
inc edx
add esi, 4
cmp edx, ecx
jb 0x41a300
mov esi, dword [ebx + 0x74]
xor edx, edx
lea esp, [esp]
mov eax, dword [esi]
cmp dword [eax + 0x6c], 1
je 0x41a390
inc edx
add esi, 4
cmp edx, ecx
jb 0x41a330
mov esi, dword [ebx + 0x74]
xor edx, edx
mov eax, dword [esi]
mov eax, dword [eax + 0x6c]
test eax, eax
je 0x41a355
cmp eax, 0x20000010
jne 0x41a37d
inc edx
add esi, 4
cmp edx, ecx
jb 0x41a345
mov edi, dword [ebp - 0x14]
xor esi, esi
mov eax, dword [ebx + 0x74]
push edi
mov ecx, dword [eax + esi*4]
add ecx, 0x18
call fcn.00418ec0
test eax, eax
jne 0x41a37d
inc esi
cmp esi, dword [ebx + 0x78]
jb 0x41a362
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045e090
mov esp, ebp
pop ebp
ret 0x10
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045e090
mov esp, ebp
pop ebp
ret 0x10
pop edi
pop esi
mov eax, 0x8007000e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045e090
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [ebp - 4]
mov eax, 0x80004004
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0045e090
mov esp, ebp
pop ebp
ret 0x10