Function at 0x401142
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x428004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
test ebx, ebx
je 0x401426
push ebx
call fcn.00401488
cmp dword [0x428d54], 0
pop ecx
je 0x401426
cmp dword [0x428d58], 0
je 0x401426
cmp dword [0x428d5c], 0
je 0x401426
cmp dword [0x428d4c], 0
je 0x401426
cmp dword [0x428d50], 0
je 0x401426
mov esi, dword [0x428024]
mov eax, esi
imul eax, eax, 0x14
cdq
mov ecx, 0x3e8
idiv ecx
push edi
push 0x14
pop ecx
movss xmm2, dword [0x41b418]
movd xmm1, esi
shl esi, 7
cvtdq2ps xmm1, xmm1
movaps xmm0, xmm2
divss xmm0, xmm1
lea edi, [eax + 3]
mov eax, dword [0x428028]
cdq
idiv ecx
and edi, 0xfffffffc
movss dword [0x431d58], xmm0
push 0x5800
push 0
mov dword [0x431d54], edi
mov ecx, eax
mov eax, esi
imul ecx, edi
cdq
mov esi, 0xac44
idiv esi
add ecx, ecx
mov esi, 0x42ae20
push esi
mov dword [0x431da8], ecx
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mov dword [0x428d6c], eax
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x425c20]
mov eax, ecx
cdq
idiv edi
cvtpd2ps xmm0, xmm0
divss xmm2, xmm0
mov edi, eax
movss dword [0x428d70], xmm2
call fcn.0040ae80
xor eax, eax
add esp, 0xc
xor edx, edx
mov ecx, 0x42ae54
inc eax
mov dword [ecx - 0x34], edx
mov dword [ecx], eax
add ecx, 0x58
inc edx
cmp ecx, 0x430654
jl 0x401259
movzx eax, byte [ebx + 0x128]
or dword [ebx + 0x150], 0xffffffff
or dword [ebx + 0x14c], 0xffffffff
mov dword [ebx + 0x12c], eax
movsx eax, word [ebx + 0x24]
mov dword [ebx + 0x138], eax
xor eax, eax
mov dword [ebx + 0x140], eax
mov dword [ebx + 0x144], eax
mov dword [ebx + 8], eax
mov dword [ebx + 0x134], eax
mov dword [ebx + 0x148], eax
mov dword [ebx + 0x154], eax
movsx eax, word [ebx + 0x26]
push eax
push ebx
call fcn.00401436
movsx eax, word [ebx + 0x14]
imul eax, eax, 0xac
push eax
push 0
push 0x430640
call fcn.0040ae80
xor eax, eax
add esp, 0x14
xor edx, edx
cmp ax, word [ebx + 0x14]
jge 0x4012fa
mov ecx, 0x430644
mov dword [ecx], esi
movsx eax, word [ebx + 0x14]
inc edx
add esi, 0x58
lea ecx, [ecx + 0xac]
cmp edx, eax
jl 0x4012e6
imul edi, edi, 6
mov dword [0x428d48], ebx
xor ebx, ebx
inc ebx
push ebx
push edi
call fcn.0040cfa3
pop ecx
pop ecx
push 2
mov dword [0x430620], eax
pop eax
push 0x10
mov word [ebp - 0x16], ax
pop eax
push 4
mov word [ebp - 0xa], ax
pop eax
mov word [ebp - 0xc], ax
mov eax, dword [0x428024]
mov dword [ebp - 0x14], eax
shl eax, 2
mov word [ebp - 0x18], bx
xor ebx, ebx
push ebx
mov dword [ebp - 0x10], eax
push ebx
xor eax, eax
push ebx
mov word [ebp - 8], ax
lea eax, [ebp - 0x18]
push eax
push 0xffffffffffffffff
push 0x431da4
call dword [sym.imp.WINMM.dll_waveOutOpen]
pop edi
test eax, eax
jne 0x401426
mov esi, dword [0x431da8]
shl esi, 2
push 1
push esi
call fcn.0040cfa3
or dword [0x431d94], 0xffffffff
pop ecx
pop ecx
mov dword [0x431d84], esi
push 0x20
mov esi, 0x431d80
push esi
push dword [0x431da4]
mov dword [0x431da0], eax
mov dword [0x431d90], 0xc
mov dword [0x431d80], eax
mov dword [0x431d88], ebx
mov dword [0x431d8c], ebx
call dword [sym.imp.WINMM.dll_waveOutPrepareHeader]
mov eax, dword [0x431da8]
push 1
lea eax, [eax*8 + 0x100]
push eax
call fcn.0040cfa3
mov dword [0x431d60], eax
add eax, 0xf
pop ecx
and eax, 0xfffffff0
pop ecx
mov dword [0x431d5c], eax
call fcn.0040172c
cmp dword [0x428d68], ebx
jne 0x4013da
push 0x20
push esi
push dword [0x431da4]
call dword [sym.imp.WINMM.dll_waveOutWrite]
lea eax, [ebp - 0x1c]
push eax
push ebx
push ebx
push 0x40166b
push ebx
mov byte [0x428d60], bl
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0xf
mov dword [0x428d64], eax
push dword [0x428d64]
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov al, 1
jmp 0x401428
xor al, al
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.00409883
leave
ret