Function at 0x4032a1
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
cmp esi, edi
je 0x403556
push esi
call fcn.0040355f
cmp dword [0x4709b8], edi
je 0x403556
cmp dword [0x4709bc], edi
je 0x403556
cmp dword [0x4709c0], edi
je 0x403556
cmp dword [0x4709c4], edi
je 0x403556
cmp dword [0x4709c8], edi
je 0x403556
mov ebx, dword [0x46f504]
mov ecx, 0x3e8
push 0x14
lea eax, [ebx + ebx*4]
shl eax, 2
cdq
fld dword [0x43b00c]
idiv ecx
fild dword [0x46f504]
fdivr st(1)
pop ecx
push 0x5800
fstp dword [0x470df8]
mov edi, eax
mov eax, dword [0x46f508]
cdq
idiv ecx
add edi, 3
and edi, 0xfffffffc
mov dword [0x470dfc], edi
mov ecx, eax
mov eax, ebx
shl eax, 7
imul ecx, edi
cdq
mov ebx, 0xac44
idiv ebx
shl ecx, 1
xor ebx, ebx
mov dword [0x470e00], ecx
mov dword [ebp - 4], ebx
push ebx
mov dword [0x470a2c], eax
mov dword [ebp - 8], eax
fild qword [ebp - 8]
mov eax, ecx
cdq
fdivr st(1)
idiv edi
mov edi, 0x470e04
push edi
fstp dword [0x470a30]
fstp st(0)
mov dword [ebp + 8], eax
call sub.MSVCRT.dll_memset
add esp, 0xc
xor ecx, ecx
mov eax, 0x470e38
mov dword [eax - 0x34], ecx
mov dword [eax], 1
add eax, 0x58
inc ecx
cmp eax, 0x476638
jl 0x403391
movzx eax, byte [esi + 0x128]
mov dword [esi + 0x12c], eax
or dword [esi + 0x150], 0xffffffff
movsx eax, word [esi + 0x24]
or dword [esi + 0x14c], 0xffffffff
mov dword [esi + 0x138], eax
movsx eax, word [esi + 0x26]
push eax
push esi
mov dword [esi + 0x140], ebx
mov dword [esi + 0x144], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0x134], ebx
mov dword [esi + 0x148], ebx
mov dword [esi + 0x154], ebx
call fcn.00403143
movsx eax, word [esi + 0x14]
imul eax, eax, 0xac
push eax
push ebx
push 0x476604
call sub.MSVCRT.dll_memset
add esp, 0xc
xor ecx, ecx
cmp word [esi + 0x14], bx
jle 0x40342f
mov eax, 0x476608
mov dword [eax], edi
inc ecx
movsx edx, word [esi + 0x14]
add edi, 0x58
add eax, 0xac
cmp ecx, edx
jl 0x40341c
mov eax, dword [ebp + 8]
push 1
pop edi
mov dword [0x4709cc], esi
lea eax, [eax + eax*2]
push edi
shl eax, 1
push eax
call sub.MSVCRT.dll_calloc
mov dword [0x477b84], eax
mov eax, dword [0x46f504]
pop ecx
mov dword [ebp - 0x18], eax
pop ecx
mov word [ebp - 0x1c], di
shl eax, 2
mov dword [ebp - 0x14], eax
push ebx
push ebx
lea eax, [ebp - 0x1c]
push ebx
push eax
push 0xffffffffffffffff
push 0x477b88
mov word [ebp - 0x1a], 2
mov word [ebp - 0xe], 0x10
mov word [ebp - 0x10], 4
mov word [ebp - 0xc], bx
call dword [sym.imp.WINMM.DLL_waveOutOpen]
test eax, eax
jne 0x403556
mov eax, dword [0x470e00]
push edi
mov esi, eax
shl esi, 2
push esi
call sub.MSVCRT.dll_calloc
pop ecx
or dword [0x477ba0], 0xffffffff
pop ecx
mov dword [0x477b90], esi
mov esi, 0x477b8c
push 0x20
push esi
mov dword [0x477bac], eax
push dword [0x477b88]
mov dword [0x477b9c], 0xc
mov dword [0x477b8c], eax
mov dword [0x477b94], ebx
mov dword [0x477b98], ebx
call dword [sym.imp.WINMM.DLL_waveOutPrepareHeader]
mov eax, dword [0x470e00]
push edi
lea eax, [eax*8 + 0x100]
push eax
call sub.MSVCRT.dll_calloc
mov dword [0x477bb0], eax
add eax, 0xf
pop ecx
and al, 0xf0
pop ecx
mov dword [0x477bb4], eax
call fcn.0040362e
cmp dword [0x4709d8], ebx
jne 0x40350a
push 0x20
push esi
push dword [0x477b88]
call dword [sym.imp.WINMM.DLL_waveOutWrite]
mov byte [0x4709d0], bl
lea eax, [ebp + 8]
push eax
push ebx
push ebx
push 0x4037a2
push ebx
push ebx
call dword [sym.imp.KERNEL32.DLL_CreateThread]
mov dword [0x4709d4], eax
push 0xf
push dword [0x4709d4]
call dword [sym.imp.KERNEL32.DLL_SetThreadPriority]
mov al, 1
jmp 0x403558
xor al, al
pop edi
pop esi
pop ebx
leave
ret 4