Function at 0x7b336520
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x44
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x10]
test byte [0x7b33c1d4], 8
jne 0x7b336781
cmp ebx, 1
setne dl
test edi, edi
sete al
or dl, al
jne 0x7b336770
mov eax, dword [ebp + 8]
test eax, eax
je 0x7b336770
mov eax, dword [ebp + 0x1c]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x14]
mov dword [esp], eax
call sym._WINMM_CheckCallback
mov esi, eax
test eax, eax
je 0x7b336590
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret 0x18
call sym._GetProcessHeap_0
mov dword [esp + 8], 0x2c
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._HeapAlloc_12
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x7b3367e0
mov dword [eax + 0xc], 0x7a120
mov dword [eax + 0x10], 0x1e0
mov dword [eax + 0x14], 0
lea eax, [ebp + 0x18]
mov esi, dword [edi]
mov dword [esp + 0x14], eax
lea eax, [ebp + 0x14]
mov dword [esp + 0x10], eax
lea eax, [ebp + 0x1c]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x14]
mov dword [esp + 8], eax
mov dword [esp + 4], 3
mov dword [esp], 0x38
call sym._MMDRV_Alloc
mov ecx, dword [ebp - 0x14]
mov edx, eax
test eax, eax
je 0x7b33662e
mov dword [eax + 0x1c], ecx
mov eax, dword [ebp + 0x14]
mov dword [edx + 0x28], 0
mov dword [edx + 0x20], eax
mov eax, dword [ebp + 0x18]
mov dword [edx + 0x2c], 1
mov dword [edx + 0x24], eax
mov dword [edx + 0x30], ebx
mov word [edx + 0x34], si
mov eax, dword [ebp + 8]
mov dword [ebx], ecx
mov dword [ebp - 0x20], ecx
mov dword [eax], ecx
mov eax, dword [edi]
mov dword [ebp - 0x1c], edx
mov dword [edx], eax
mov eax, dword [ebp + 0x1c]
mov dword [esp], edx
mov dword [esp + 0xc], eax
lea eax, [edx + 0x1c]
mov dword [esp + 8], eax
mov dword [esp + 4], 3
call sym._MMDRV_Open
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov esi, eax
mov dword [esp + 4], 0
mov dword [esp], 0
call sym._CreateEventW_16
mov dword [ebx + 0x24], eax
movzx eax, word [ebp + 0x1e]
sub esp, 0x10
mov word [ebx + 0x20], ax
lea eax, [ebx + 8]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ebx
mov dword [esp + 8], sym._MMSYSTEM_MidiStream_Player_4
mov dword [esp + 4], 0
mov dword [esp], 0
call sym._CreateThread_24
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
sub esp, 0x18
test eax, eax
mov dword [ebx + 4], eax
je 0x7b3367f0
mov dword [esp + 4], 0xf
mov dword [esp], eax
mov dword [ebp - 0x1c], edx
call sym._SetThreadPriority_8
sub esp, 8
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebx + 0x24]
mov dword [esp], eax
call sym._WaitForSingleObject_8
mov edx, dword [ebp - 0x1c]
sub esp, 8
test byte [0x7b33c1d4], 8
je 0x7b33657a
mov eax, dword [ebp + 8]
mov dword [esp + 0x28], ebx
mov dword [esp + 0x24], esi
mov eax, dword [eax]
mov dword [esp + 0x20], eax
mov eax, dword [edx]
mov dword [esp + 0x1c], eax
mov eax, dword [edi]
mov dword [esp + 0x14], str.____u__d__hMidi_p_ret_d_lpMidiStrm_p_n
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], 0x742
mov dword [esp + 0xc], str.midiStreamOpen
mov dword [esp + 8], 0x7b340175
mov dword [esp + 4], 0x7b33c1d4
mov dword [esp], 3
call sym._ros_dbg_log
jmp 0x7b33657a
lea esp, [ebp - 0xc]
mov esi, 0xb
pop ebx
mov eax, esi
pop esi
pop edi
pop ebp
ret 0x18
mov eax, dword [ebp + 0x1c]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x2c], eax
mov eax, dword [ebp + 0x18]
mov dword [esp + 0x14], str.__p___p___d__0x_08lx__0x_08lx__0x_08x___n
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x10], 0x70d
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], str.midiStreamOpen
mov dword [esp + 0x18], eax
mov dword [esp + 8], 0x7b340175
mov dword [esp + 4], 0x7b33c1d4
mov dword [esp], 3
call sym._ros_dbg_log
jmp 0x7b33653c
mov esi, 7
jmp 0x7b33657a
mov dword [esp], ecx
mov esi, 7
call sym.winmm.dll_midiStreamClose
sub esp, 4
jmp 0x7b33657a