Function at 0x4166c0
Capabilities:
Create thread

Disassembly:
sub esp, 0x174
push ebx
mov ebx, ecx
push ebp
push esi
mov eax, dword [ebx + 0x960]
push edi
test eax, eax
je 0x4169f9
push 0x80
mov dword [esp + 0x18], 0x4cc6f4
call fcn.004be967
add esp, 4
lea ecx, [esp + 0x34]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0x1f
mov dword [esp + 0x28], 0x40
mov dword [esp + 0x24], 1
call fcn.00424d70
lea ecx, [esp + 0x34]
mov dword [esp + 0x44], 0
call fcn.00422ae0
mov eax, dword [ebx + 0xc]
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push 0
push 0x1032
push eax
call edi
cmp eax, 1
mov dword [esp + 0x10], eax
jl 0x4167a9
or esi, 0xffffffff
test eax, eax
jle 0x4167a7
mov ebp, eax
mov ecx, dword [ebx + 0xc]
push 2
push esi
push 0x100c
push ecx
call edi
lea edx, [esp + 0x54]
mov esi, eax
mov eax, dword [ebx + 0xc]
push edx
push 0
push 0x1005
push eax
mov dword [esp + 0x64], 4
mov dword [esp + 0x68], esi
mov dword [esp + 0x6c], 0
call edi
mov edx, dword [esp + 0x74]
lea ecx, [esp + 0x34]
neg eax
sbb eax, eax
and eax, edx
push eax
call fcn.0043c6f0
dec ebp
jne 0x416754
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x416809
lea ecx, [esp + 0x34]
call fcn.00424ec0
mov eax, dword [esp + 0x24]
mov dword [esp + 0x14], 0x4cc6f4
test eax, eax
je 0x4167f1
mov eax, dword [esp + 0x1c]
xor esi, esi
test eax, eax
jle 0x4167f1
cmp esi, eax
jge 0x4167dd
test esi, esi
jl 0x4167dd
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx + esi*4]
jmp 0x4167df
xor eax, eax
push eax
call fcn.004be975
mov eax, dword [esp + 0x20]
add esp, 4
inc esi
cmp esi, eax
jl 0x4167d0
mov edx, dword [esp + 0x18]
push edx
call fcn.004be975
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x174
ret
mov eax, dword [esp + 0x3c]
xor esi, esi
test eax, eax
mov dword [esp + 0x10], esi
jle 0x4168ed
cmp esi, eax
jge 0x41682c
test esi, esi
jl 0x41682c
mov eax, dword [esp + 0x38]
mov eax, dword [eax + esi*4]
jmp 0x41682e
xor eax, eax
mov ecx, dword [eax + 0x68]
lea eax, [ebx + 0x20c]
push ecx
lea edx, [esp + 0x80]
push eax
push edx
call fcn.0044a2d0
lea eax, [esp + 0x88]
push eax
call fcn.0044a200
add esp, 0x10
mov dword [esp + 0x30], eax
test eax, eax
je 0x4168dc
mov ecx, dword [esp + 0x20]
mov edi, dword [esp + 0x1c]
lea edx, [ecx + 1]
cmp edi, edx
jne 0x4168c8
mov eax, dword [esp + 0x28]
add ecx, eax
lea ecx, [ecx*4 + 4]
push ecx
call fcn.004be967
mov edx, dword [esp + 0x24]
mov esi, dword [esp + 0x1c]
mov ebp, eax
lea ecx, [edx*4 + 4]
mov edi, ebp
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.004be975
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x28]
mov esi, dword [esp + 0x18]
add esp, 8
add eax, edx
mov dword [esp + 0x18], ebp
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov dword [ecx + edx*4], eax
mov eax, dword [esp + 0x1c]
inc eax
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x3c]
inc esi
cmp esi, eax
mov dword [esp + 0x10], esi
jl 0x41681f
lea ecx, [esp + 0x34]
call fcn.00424ec0
mov eax, dword [ebx + 0xbc]
mov esi, dword [sym.imp.KERNEL32.dll_SetEvent]
mov edi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x41694b
mov eax, dword [ebx + 0xb4]
push eax
call esi
mov ecx, dword [ebx + 0xbc]
push 0xbb8
push ecx
call edi
cmp eax, 0x102
jne 0x416938
push 0x40
call dword [sym.imp.USER32.dll_MessageBeep]
mov edx, dword [ebx + 0xbc]
push edx
call ebp
mov dword [ebx + 0xbc], 0
mov ecx, dword [ebx + 8]
mov edx, dword [ebx + 0x200]
lea eax, [esp + 0x14]
push eax
push ecx
push edx
call fcn.0043d440
add esp, 0xc
test eax, eax
je 0x416970
push 0
mov ecx, ebx
call fcn.0041ec00
mov eax, dword [0x4eb46c]
test eax, eax
je 0x4169f0
mov eax, dword [ebx + 0xbc]
test eax, eax
je 0x4169c6
mov eax, dword [ebx + 0xb4]
push eax
call esi
mov ecx, dword [ebx + 0xbc]
push 0xbb8
push ecx
call edi
cmp eax, 0x102
jne 0x4169a9
push 0x40
call dword [sym.imp.USER32.dll_MessageBeep]
mov edx, dword [ebx + 0xbc]
push edx
call ebp
mov dword [ebx + 0xbc], 0
mov eax, dword [ebx + 0xbc]
test eax, eax
jne 0x4169f0
mov eax, dword [ebx + 0xb4]
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
lea ecx, [esp + 0x30]
push ecx
push 0
push ebx
push 0x411fb0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebx + 0xbc], eax
lea ecx, [esp + 0x14]
call fcn.00403b80
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x174
ret