Function at 0x412441
Capabilities:
Create thread

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
movzx eax, byte [ebp + 0x14]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
push eax
push dword [ebp + 0x10]
mov dword [ebp - 4], ecx
push esi
push edi
push 0x412498
push 8
call fcn.004015a0
and dword [ebp + 0xc], 0
add esp, 0x18
test esi, esi
je 0x4338ac
add esi, edi
push ebx
mov ebx, edi
mov dword [ebp - 0x10], esi
cmp edi, esi
mov dword [ebp - 8], ebx
jb 0x412558
mov eax, dword [ebp + 0xc]
pop ebx
pop edi
pop esi
leave
ret 0x10
mov edi, dword [ebp - 4]
add edi, 0x24
push ebx
mov ecx, edi
call fcn.00402770
cmp byte [ebp + 0x14], 0
mov esi, dword [eax]
je 0x412581
push dword [esi + 0x20]
mov ecx, dword [ebp - 4]
call fcn.00418b14
test eax, eax
je 0x4338c1
mov eax, dword [ebp + 0x10]
xor ecx, ecx
sub eax, ecx
jne 0x4338d8
cmp dword [esi + 0x38], ecx
jne 0x4338ef
mov eax, dword [esi + 4]
cmp eax, ecx
jge 0x4338fe
cmp eax, 0x80070037
je 0x433908
push ebx
mov ecx, edi
call fcn.00402770
mov eax, dword [eax]
cmp dword [eax + 0x38], 0
jne 0x433912
test byte [esi + 0x10c], 1
jne 0x43394a
mov ebx, dword [sym.imp.KERNEL32.dll_CreateEventW]
xor eax, eax
push eax
push eax
push 1
push eax
call ebx
mov dword [ebp - 0xc], eax
lea edi, [esi + 0x14]
lea eax, [ebp - 0xc]
push eax
mov ecx, edi
mov dword [ebp + 8], edi
call fcn.0040eaa2
cmp dword [edi], 0
je 0x433978
mov eax, dword [ebp - 4]
push dword [eax + 0xa4]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push dword [esi]
push 0x4126a0
push 8
call fcn.004015a0
add esp, 0xc
xor eax, eax
push eax
push eax
push 1
push eax
call ebx
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
lea edi, [esi + 0x18]
push eax
mov ecx, edi
call fcn.0040eaa2
xor eax, eax
cmp dword [edi], eax
je 0x4339a1
push eax
push eax
push eax
push eax
call ebx
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
lea ebx, [esi + 0x174]
push eax
mov ecx, ebx
call fcn.0040eaa2
xor eax, eax
cmp dword [ebx], eax
je 0x4339dd
lea ecx, [esi + 8]
push ecx
push eax
push esi
push 0x40cba2
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ebx, eax
test ebx, ebx
je 0x433a18
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 8]
inc ebx
cmp ebx, dword [ebp - 0x10]
jmp 0x412483
push 0x433f30
push 8
call fcn.004015a0
pop ecx
pop ecx
xor eax, eax
jmp 0x412490
push dword [esi + 0x58]
push 0x433ea8
push 4
call fcn.004015a0
add esp, 0xc
jmp 0x41268e
dec eax
jne 0x412597
cmp dword [esi + 0x38], ecx
jne 0x412597
push 0x433e58
jmp 0x4338f4
push 0x433e08
call fcn.0040619b
jmp 0x41268e
push dword [esi + 0x58]
push 0x433d90
jmp 0x4338c9
push dword [esi + 0x58]
push 0x433d08
jmp 0x4338c9
push ebx
mov ecx, edi
call fcn.00402770
mov eax, dword [eax]
cmp dword [eax + 0x50], 2
push ebx
mov ecx, edi
jne 0x433957
call fcn.00402770
mov eax, dword [eax]
mov dword [eax + 0x50], 3
push dword [esi + 0x58]
push 0x433bf0
push 4
call fcn.004015a0
add esp, 0xc
jmp 0x4125c1
push dword [esi + 0x58]
push 0x433b88
jmp 0x4338c9
call fcn.00402770
mov eax, dword [eax]
push dword [eax + 0x50]
push dword [esi + 0x58]
push 0x433ab8
push 4
call fcn.004015a0
add esp, 0x10
jmp 0x41268e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0xc], eax
test eax, eax
jle 0x433992
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp + 0xc], eax
push dword [ebp + 0xc]
push dword [esi + 0x58]
push 0x433a58
push 1
jmp 0x43396b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0xc], eax
test eax, eax
jle 0x4339bb
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp + 0xc], eax
push dword [ebp + 0xc]
push dword [esi + 0x58]
push 0x433a58
push 1
call fcn.004015a0
add esp, 0x10
mov ecx, dword [ebp + 8]
call fcn.0040ea89
jmp 0x41268e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0xc], eax
test eax, eax
jle 0x4339f7
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp + 0xc], eax
push dword [ebp + 0xc]
push dword [esi + 0x58]
push 0x433a58
push 1
call fcn.004015a0
mov ecx, dword [ebp + 8]
add esp, 0x10
call fcn.0040ea89
mov ecx, edi
jmp 0x4339d3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0xc], eax
test eax, eax
jle 0x433a32
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp + 0xc], eax
push eax
push dword [esi + 0x58]
mov dword [esi + 4], eax
push 0x433a58
push 1
call fcn.004015a0
add esp, 0x10
mov ecx, edi
call fcn.0040ea89
jmp 0x4339d0