Function at 0x42f870
Capabilities:
Create thread
Resume thread

Disassembly:
mov eax, dword [0x481a98]
push ebx
push ebp
xor ebp, ebp
push esi
cmp eax, ebp
push edi
jne 0x42fca8
mov esi, dword [esp + 0x14]
mov ecx, esi
call fcn.004204d0
cmp eax, 1
jb 0x42fca8
mov ecx, esi
call fcn.00428240
test eax, eax
je 0x42fca8
mov eax, dword [esi + 0x2b38]
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
cmp eax, ebp
jne 0x42f8fc
push ebp
push ebp
push ebp
push ebp
call dword [sym.imp.KERNEL32.dll_CreateEventA]
cmp eax, ebp
mov dword [esi + 0x2b38], eax
je 0x42f8fc
lea eax, [esp + 0x14]
mov dword [esp + 0x14], ebp
push eax
push 4
push esi
push 0x432090
push ebp
push ebp
call fcn.0045233c
mov ebx, eax
add esp, 0x18
cmp ebx, ebp
je 0x42f8fc
push ebx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call edi
cmp dword [esi + 0x2b3c], ebp
jne 0x42f950
push ebp
push ebp
push ebp
push ebp
mov dword [esi + 0x2b44], ebp
call dword [sym.imp.KERNEL32.dll_CreateEventA]
cmp eax, ebp
mov dword [esi + 0x2b3c], eax
je 0x42f950
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], ebp
push ecx
push 4
push esi
push 0x432580
push ebp
push ebp
call fcn.0045233c
mov ebx, eax
add esp, 0x18
cmp ebx, ebp
je 0x42f950
push ebx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call edi
cmp dword [esi + 0x2b44], ebp
jne 0x42fca8
mov eax, dword [0x481978]
mov ebx, dword [esp + 0x18]
cmp eax, ebp
mov ebp, dword [esp + 0x1c]
jne 0x42fb1a
lea eax, [ebx - 2]
cmp eax, 5
ja case.default.0x42f97d
jmp dword [eax*4 + 0x42fcb0]
mov eax, dword [esi + 0x2b3c]
test eax, eax
je 0x42fca8
push eax
mov dword [esi + 0x2b44], 4
call dword [sym.imp.KERNEL32.dll_SetEvent]
pop edi
pop esi
pop ebp
pop ebx
ret
mov eax, dword [esi + 0x2b3c]
test eax, eax
je 0x42fca8
push eax
mov dword [esi + 0x2b44], 3
call dword [sym.imp.KERNEL32.dll_SetEvent]
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, dword [esp + 0x1c]
xor eax, eax
cmp ecx, eax
jne 0x42fc75
pop edi
pop esi
pop ebp
mov dword [0x481978], eax
mov dword [0x48197c], eax
mov dword [0x481980], eax
pop ebx
ret
push ebp
call fcn.004328c0
add esp, 4
test eax, eax
je 0x42fa59
push 0x1ea
mov ecx, esi
call fcn.0041f1f0
push 0
mov ecx, esi
call fcn.0041ecf0
push 0
mov ecx, esi
call fcn.0041ed00
push 0
mov ecx, esi
call fcn.00425d10
mov ecx, esi
call fcn.0041f2b0
test eax, eax
je 0x42fa35
push ebx
mov ecx, esi
call fcn.0041f090
mov eax, dword [esi + 0x2b3c]
test eax, eax
je 0x42fca8
push eax
mov dword [esi + 0x2b44], 6
call dword [sym.imp.KERNEL32.dll_SetEvent]
pop edi
pop esi
pop ebp
pop ebx
ret
test ebp, ebp
jbe 0x42fb0d
mov eax, 1
push 0x1ea
mov ecx, esi
mov dword [0x481980], eax
mov dword [0x481978], eax
mov dword [0x48197c], eax
call fcn.0041f1f0
push 0
mov ecx, esi
call fcn.0041ecf0
push 0
mov ecx, esi
call fcn.0041ed00
push 0
mov ecx, esi
call fcn.00425d10
push ebx
mov ecx, esi
call fcn.0041f090
mov ecx, esi
call fcn.0041f2b0
test eax, eax
je 0x42fca8
push 0
call edi
push 0x19
call edi
mov eax, dword [0x485b0c]
test eax, eax
jne 0x42fca8
mov eax, dword [0x485b08]
test eax, eax
je 0x42fca8
mov ecx, esi
call fcn.0041f2b0
test eax, eax
jne 0x42fab3
pop edi
pop esi
pop ebp
pop ebx
ret
push 0x1ea
mov ecx, esi
call fcn.0041f1f0
test ebp, ebp
jne 0x42fb0d
push ebp
mov ecx, esi
call fcn.0041ecf0
push ebp
mov ecx, esi
call fcn.0041ed00
push ebp
mov ecx, esi
call fcn.00425d10
mov eax, dword [0x481978]
test eax, eax
je case.default.0x42f97d
mov eax, ebx
dec eax
je 0x42fbb5
sub eax, 5
jne case.default.0x42f97d
test ebp, ebp
mov dword [0x481978], 1
jbe 0x42fca8
push 0x1ea
mov ecx, esi
call fcn.0041f1f0
push 0
mov ecx, esi
call fcn.0041ecf0
push 0
mov ecx, esi
call fcn.0041ed00
push 0
mov ecx, esi
call fcn.00425d10
push 6
mov ecx, esi
call fcn.0041f090
push 0
push esi
call fcn.00430a50
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
ret
mov eax, dword [esp + 0x1c]
mov dword [0x481978], 0
test eax, eax
jbe case.default.0x42f97d
push 0x1ea
mov ecx, esi
call fcn.0041f1f0
push 0
mov ecx, esi
call fcn.0041ecf0
push 0
mov ecx, esi
call fcn.0041ed00
push ebx
jmp 0x42fb67
mov eax, dword [0x48197c]
mov dword [0x481978], 0
test eax, eax
je 0x42fc86
test ebp, ebp
je 0x42fc86
push 0
mov dword [0x48197c], 0
call edi
push 1
mov ecx, esi
call fcn.0041f090
mov ecx, esi
call fcn.0041f2b0
test eax, eax
je 0x42fc1b
push 0
call edi
push 0x19
call edi
mov eax, dword [0x485b0c]
test eax, eax
jne 0x42fc1b
mov eax, dword [0x485b08]
test eax, eax
je 0x42fc1b
mov ecx, esi
call fcn.0041f2b0
test eax, eax
jne 0x42fbf6
xor ebx, ebx
call fcn.00431790
test eax, eax
jne 0x42fc58
mov edx, ebx
inc ebx
cmp edx, 0xa
jg 0x42fc58
mov eax, dword [0x485b0c]
test eax, eax
jne 0x42fc58
mov eax, dword [0x485b08]
test eax, eax
je 0x42fc58
push 0
call edi
push 0x1f4
call edi
push 0
call edi
call fcn.00431790
test eax, eax
je 0x42fc26
push 0
call edi
push 0x1f4
call edi
push 0
push esi
call fcn.00430a50
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
ret
xor eax, eax
cmp ebx, 1
je 0x42fc88
cmp ebx, 5
je 0x42fc88
cmp ebx, 4
jne 0x42fca8
jmp 0x42fc88
xor eax, eax
mov dword [0x481978], eax
mov dword [0x48197c], eax
mov dword [0x481980], eax
mov esi, dword [esi + 0x2b38]
cmp esi, eax
je 0x42fca8
push esi
call dword [sym.imp.KERNEL32.dll_SetEvent]
pop edi
pop esi
pop ebp
pop ebx
ret