Function at 0x403002
Capabilities:
Create thread

Disassembly:
call fcn.00403162
pop eax
pop edx
pop dword [0x428584]
pop ecx
test edx, edx
push eax
jne 0x403016
ret
push ebx
push esi
push edi
push ebp
mov ebx, 0x408574
mov ebp, 0x428598
xor eax, eax
mov dword [ebp - 0x10], eax
test cl, 8
setne byte [ebp - 0x18]
test cl, 1
mov esi, 0x402edc
jne 0x403045
test cl, 2
lea esi, [esi + 0x10]
jne 0x403045
lea esi, [esi - 0x1c]
and cl, 0x10
mov byte [ebp - 0x17], cl
mov edi, ebp
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 esi, edx
mov ecx, 0x8c0
mov edi, 0x406110
rep stosd dword es:[edi], eax
push eax
push eax
push eax
push eax
push eax
push eax
push 0x402ec0
push 0xffffffffffffffff
push ebx
call dword [sym.imp.winmm.dll_waveOutOpen]
call dword [sym.imp.kernel32.dll_HeapCreate]
test eax, eax
mov dword [ebx - 8], eax
je 0x40309d
mov dword [ebp - 0xc], esi
call dword [ebp]
mov esi, edi
mov eax, edi
mov edx, 0x150
call dword [ebp + 4]
call fcn.00404530
xchg edi, eax
call dword [ebp + 0xc]
test edi, edi
je 0x403166
xor eax, eax
push pe_nt_image_headers32
mov edx, 0x407410
cmp dword [ebp - 4], eax
jne 0x4030b5
mov byte [ebp - 4], 0x10
pop ecx
inc eax
mov dword [esi + 0xc], ecx
sub edx, 0x4c
dec ecx
mov dword [edx + 0x20], eax
mov dword [edx], ecx
jne 0x4030ba
dec eax
movzx ecx, word [esi + 0x4c]
mov dword [esi + 0x14], ecx
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]
mov dword [eax + 0x407414], edx
add edx, 0x4c
add eax, 0x80
loop 0x4030dd
movzx ecx, word [esi + 0x4e]
call fcn.00403a70
mov esi, 0x4385a8
mov dword [esi + 4], 0x10000
or dword [esi + 0x14], 0xffffffff
push 0xc
mov dword [esi], 0x4285a8
pop dword [esi + 0x10]
push 0x20
push esi
push dword [ebx]
call dword [sym.imp.winmm.dll_waveOutPrepareHeader]
xor edi, edi
call fcn.00403232
cmp dword [ebx + 4], edi
jne 0x40311e
mov dword [ebx + 8], edi
push 0x20
push esi
push dword [ebx]
call dword [sym.imp.winmm.dll_waveOutWrite]
test eax, eax
jne 0x403166
push eax
push esp
push edi
push edi
push 0x4031dc
push edi
push edi
call dword [sym.imp.kernel32.dll_CreateThread]
test eax, eax
pop edx
mov dword [ebx - 4], eax
je 0x403166
push 0xf
push eax
call dword [sym.imp.kernel32.dll_SetThreadPriority]
xchg ebx, eax
pop ebp
pop edi
pop esi
pop ebx
ret
mov ebp, 0x408570
mov eax, dword [ebp]
test eax, eax
je 0x403185
mov dword [ebp + 0xc], eax
push eax
push 0xffffffffffffffff
push eax
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
call dword [sym.imp.kernel32.dll_CloseHandle]
mov ebp, 0x408570
xor ebx, ebx
mov dword [ebp], ebx
mov edi, dword [ebp + 4]
mov dword [ebp + 8], ebx
test edi, edi
je 0x4031b8
mov dword [ebp + 4], ebx
push edi
push 0x20
push 0x4385a8
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 eax, dword [ebp - 4]
test eax, eax
je 0x4031d7
mov dword [ebp - 4], ebx
push eax
call dword [sym.imp.kernel32.dll_HeapDestroy]
xor eax, eax
mov ecx, 0x22
mov edi, 0x4385c8
rep stosd dword es:[edi], eax
pop ebp
pop edi
pop esi
pop ebx
ret