Function at 0x40371b
Capabilities:
Create thread

Disassembly:
call fcn.0040388d
pop eax
pop edx
pop dword [0x8acd14]
pop ecx
test edx, edx
push eax
jne 0x40372f
ret
push ebx
push esi
push edi
mov ebx, 0x88ccf4
xor eax, eax
mov dword [0x8acd18], eax
dec ecx
mov esi, 0x4036ef
js 0x40374e
lea esi, [esi + 0xc]
je 0x40374e
lea esi, [esi + 0x10]
mov edi, 0x8acd20
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, edx
push eax
push eax
push eax
push 0x4036df
dec eax
push eax
push ebx
call dword [sym.imp.WINMM.DLL_waveOutOpen]
cdq
test eax, eax
xchg edx, eax
jne 0x403889
push edi
mov ecx, 0x8c0
mov edi, 0x88a890
rep stosd dword es:[edi], eax
push eax
push eax
push eax
call dword [sym.imp.KERNEL32.DLL_HeapCreate]
test eax, eax
mov dword [0x88ccec], eax
je 0x403890
call dword [0x8acd20]
mov esi, edi
push eax
push 0x150
push esi
call dword [0x8acd24]
xor eax, eax
cmp dword [esi], 0x65747845
jne 0x4037bb
call fcn.00404db3
xchg edi, eax
call dword [0x8acd2c]
test edi, edi
je 0x403890
xor eax, eax
push 0x3f
mov edx, 0x88bb90
mov ecx, 0x8bcdec
cmp dword [ecx], eax
jne 0x4037df
mov byte [ecx], 0x10
inc eax
pop ecx
sub edx, 0x4c
mov dword [edx], ecx
mov dword [edx + 0x20], eax
dec ecx
jns 0x4037e1
dec eax
movzx ecx, word [esi + 0x4c]
push 0x40
mov dword [esi + 0x14], ecx
pop dword [esi + 0xc]
mov dword [esi + 8], eax
mov dword [esi + 0x10], eax
lea edi, [esi + 0x20]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov ecx, dword [esi + 0x30]
jecxz 0x40381b
mov dword [eax + 0x88bb94], edx
add edx, 0x4c
add eax, 0x80
loop 0x40380b
movzx ecx, word [esi + 0x4e]
call fcn.00404253
mov esi, 0x8bcd30
mov dword [esi + 4], 0x10000
or dword [esi + 0x14], 0xffffffff
push 0xc
mov dword [esi], 0x8acd30
pop dword [esi + 0x10]
push 0x20
push esi
push dword [ebx]
call dword [sym.imp.WINMM.DLL_waveOutPrepareHeader]
xor edi, edi
call fcn.0040395a
cmp dword [ebx + 4], edi
jne 0x40384c
mov dword [ebx + 8], edi
push 0x20
push esi
push dword [ebx]
call dword [sym.imp.WINMM.DLL_waveOutWrite]
push eax
push esp
push edi
push edi
push 0x40390a
push edi
push edi
call dword [sym.imp.KERNEL32.DLL_CreateThread]
test eax, eax
pop edx
mov dword [0x88ccf0], eax
je 0x403890
push 0xf
push eax
call dword [sym.imp.KERNEL32.DLL_SetThreadPriority]
xchg ebx, eax
pop edi
pop esi
pop ebx
ret
xor ebx, ebx
mov eax, dword [0x88ccf0]
test eax, eax
mov dword [0x88ccf0], ebx
je 0x4038b6
mov dword [0x88ccfc], eax
push eax
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
xor eax, eax
mov ecx, 0x22
mov edi, 0x8bcd50
rep stosd dword es:[edi], eax
mov esi, 0x88ccf4
mov dword [0x88ccf8], ebx
mov edi, dword [esi]
test edi, edi
je 0x4038f1
push edi
push 0x20
push 0x8bcd30
push edi
push edi
call dword [sym.imp.WINMM.DLL_waveOutReset]
call dword [sym.imp.WINMM.DLL_waveOutUnprepareHeader]
call dword [sym.imp.WINMM.DLL_waveOutClose]
mov dword [esi], ebx
mov eax, dword [esi - 8]
test eax, eax
je 0x403904
push eax
call dword [sym.imp.KERNEL32.DLL_HeapDestroy]
mov dword [esi - 8], ebx
xor eax, eax
pop edi
pop esi
pop ebx
ret