Function at 0x7b334480
Capabilities:
Suspend thread

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x84
mov edi, dword [ebp + 8]
test byte [0x7b33c1d4], 8
jne 0x7b33487d
test edi, edi
je 0x7b33474f
mov dword [esp + 8], 0
mov dword [esp + 4], 3
mov eax, dword [edi]
mov dword [esp], eax
call sym._MMDRV_Get
mov dword [ebp - 0x54], eax
test eax, eax
je 0x7b334746
lea esi, [ebp - 0x2c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], esi
call sym._PeekMessageA_20
mov eax, dword [edi + 0x24]
sub esp, 0x14
mov dword [esp], eax
call sym._SetEvent_4
push ebx
test byte [0x7b33c1d4], 8
jne 0x7b334ad4
mov eax, dword [edi + 4]
mov dword [esp], eax
call sym._SuspendThread_4
push ecx
test byte [0x7b33c1d4], 8
jne 0x7b334a9b
mov eax, dword [ebp - 0x54]
mov dword [edi + 0x1c], 0
mov dword [edi + 0x18], 0
lea ecx, [eax + 0x24]
add eax, 0x20
mov dword [edi + 0x28], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x5c], ecx
mov dword [ebp - 0x4c], eax
mov ebx, dword [edi + 0x28]
test ebx, ebx
je 0x7b3348c2
mov edx, dword [ebp - 0x50]
test edx, edx
je 0x7b334652
mov eax, dword [ebp - 0x50]
add eax, dword [ebx + 0x1c]
mov dword [ebp - 0x40], eax
mov eax, dword [eax]
test eax, eax
jne 0x7b33466a
mov eax, dword [ebp - 0x40]
mov edx, dword [eax + 8]
mov eax, edx
shr eax, 0x18
and eax, 0xbf
cmp eax, 2
je 0x7b3345c2
jle 0x7b334791
cmp eax, 0x82
je 0x7b334812
cmp eax, 0x84
je 0x7b3345c2
cmp eax, 0x80
je 0x7b334831
test byte [0x7b33c1d4], 1
jne 0x7b334a58
and edx, 0x40000000
jne 0x7b3347b2
mov eax, dword [ebx + 0x1c]
mov ecx, dword [ebp - 0x40]
add eax, 0xc
mov dword [ebx + 0x1c], eax
mov edx, dword [ecx + 8]
test edx, edx
jns 0x7b3345f2
and edx, 0xffffff
add edx, 3
and edx, 0xfffffffc
add eax, edx
mov dword [ebx + 0x1c], eax
cmp dword [ebx + 4], eax
ja 0x7b334554
mov eax, dword [ebx + 0x10]
mov ecx, dword [ebp - 0x54]
and eax, 0xfffffffb
or eax, 1
mov dword [ebx + 0x10], eax
mov eax, dword [ebx + 0x14]
mov dword [edi + 0x28], eax
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], 0
mov eax, dword [ecx + 0x24]
mov dword [esp + 0xc], 0x3c9
mov dword [esp + 0x10], eax
mov eax, dword [edi]
mov dword [esp + 8], eax
movzx eax, word [edi + 0x20]
mov dword [esp + 4], eax
mov eax, dword [ecx + 0x20]
mov dword [esp], eax
call sym.winmm.dll_DriverCallback
mov ebx, dword [edi + 0x28]
sub esp, 0x1c
test ebx, ebx
je 0x7b3348c2
mov eax, dword [ebx]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x50]
add eax, dword [ebx + 0x1c]
mov dword [ebp - 0x40], eax
mov eax, dword [eax]
test eax, eax
je 0x7b33457d
mov ecx, dword [edi + 0x10]
mov dword [ebp - 0x58], ecx
test ecx, ecx
jne 0x7b33493a
movzx eax, byte [0x7b33c1d4]
test al, 1
jne 0x7b3349ba
mov ecx, dword [ebp - 0x58]
mov edx, dword [ebp - 0x40]
add ecx, dword [edi + 0x14]
mov dword [edi + 0x14], ecx
add ecx, dword [edi + 0x1c]
mov edx, dword [edx]
mov dword [ebp - 0x58], ecx
add dword [edi + 0x18], edx
test al, 8
jne 0x7b3349fa
mov dword [ebp - 0x68], ebx
mov ebx, dword [ebp - 0x5c]
call sym._GetTickCount_0
cmp dword [ebp - 0x58], eax
jbe 0x7b334b0d
mov ecx, dword [ebp - 0x58]
mov dword [esp + 0x10], 0x4ff
mov dword [esp + 8], 0
sub ecx, eax
mov dword [esp + 4], 0
mov dword [esp + 0xc], ecx
mov dword [esp], 0
call sym._MsgWaitForMultipleObjects_20
sub esp, 0x14
test eax, eax
jne 0x7b334b0d
mov dword [ebp - 0x50], 0
lea esi, [esi]
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], esi
call sym._PeekMessageA_20
sub esp, 0x14
test eax, eax
je 0x7b3346ac
mov dword [esp], esi
mov edx, dword [ebp - 0x4c]
mov ecx, ebx
mov eax, edi
call sym._MMSYSTEM_MidiStream_MessageHandler.isra.5
test eax, eax
jne 0x7b334700
test byte [0x7b33c1d4], 8
jne 0x7b33475b
mov dword [esp], 0
call sym._ExitThread_4
mov dword [esp + 0x14], str.End_of_thread_n
mov dword [esp + 0x10], 0x6d5
mov dword [esp + 0xc], str.MMSYSTEM_MidiStream_Player
mov dword [esp + 8], 0x7b340175
mov dword [esp + 4], 0x7b33c1d4
mov dword [esp], 3
call sym._ros_dbg_log
jmp 0x7b33474f
test eax, eax
je 0x7b3347f1
cmp eax, 1
jne 0x7b3345b5
mov eax, dword [ebp - 0x40]
and edx, 0xffffff
mov dword [edi + 0xc], edx
mov edx, dword [eax + 8]
jmp 0x7b3345c2
mov ecx, dword [ebp - 0x54]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], ebx
mov eax, dword [ecx + 0x24]
mov dword [esp + 0xc], 0x3ca
mov dword [esp + 0x10], eax
mov eax, dword [edi]
mov dword [esp + 8], eax
movzx eax, word [edi + 0x20]
mov dword [esp + 4], eax
mov eax, dword [ecx + 0x20]
mov dword [esp], eax
call sym.winmm.dll_DriverCallback
sub esp, 0x1c
jmp 0x7b3345ce
and edx, 0xffffff
mov dword [esp + 4], edx
mov eax, dword [edi]
mov dword [esp], eax
call sym.winmm.dll_midiOutShortMsg
push eax
push eax
mov eax, dword [ebp - 0x40]
mov edx, dword [eax + 8]
jmp 0x7b3345c2
test byte [0x7b33c1d4], 1
je 0x7b3345c2
mov dword [esp + 0x14], str.NIY:_MEVT_COMMENT_n
mov dword [esp + 0x10], 0x6ac
jmp 0x7b33484e
test byte [0x7b33c1d4], 1
je 0x7b3345c2
mov dword [esp + 0x14], str.NIY:_MEVT_LONGMSG__aka_sending_Sysex_event_n
mov dword [esp + 0x10], 0x6b0
mov dword [esp + 0xc], str.MMSYSTEM_MidiStream_Player
mov dword [esp + 8], 0x7b340175
mov dword [esp + 4], 0x7b33c1d4
mov dword [esp], 0
call sym._ros_dbg_log
mov eax, dword [ebp - 0x40]
mov edx, dword [eax + 8]
jmp 0x7b3345c2
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], 0x7b34083f
mov dword [esp + 0x10], 0x66b
mov dword [esp + 0xc], str.MMSYSTEM_MidiStream_Player
mov dword [esp + 8], 0x7b340175
mov dword [esp + 4], 0x7b33c1d4
mov dword [esp], 3
call sym._ros_dbg_log
test edi, edi
jne 0x7b3344a4
jmp 0x7b334746
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], esi
call sym._GetMessageA_16
mov ebx, dword [ebp - 0x5c]
sub esp, 0x10
mov dword [esp], esi
mov edx, dword [ebp - 0x4c]
mov ecx, ebx
mov eax, edi
call sym._MMSYSTEM_MidiStream_MessageHandler.isra.5
test eax, eax
je 0x7b334746
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], esi
call sym._PeekMessageA_20
sub esp, 0x14
test eax, eax
jne 0x7b3348e8
mov dword [ebp - 0x50], 0
jmp 0x7b334554
mov ecx, dword [ebp - 0x58]
cmp ecx, 0x8000
jbe 0x7b334969
movsx edx, ch
imul eax, eax, 0x3e8
movzx ecx, cl
neg edx
imul ecx, edx
xor edx, edx
div ecx
mov dword [ebp - 0x58], eax
movzx eax, byte [0x7b33c1d4]
jmp 0x7b334687
mov edx, dword [edi + 0xc]
xor ecx, ecx
fnstcw word [ebp - 0x3a]
mov dword [ebp - 0x64], ecx
mov dword [ebp - 0x68], edx
fild qword [ebp - 0x68]
fdiv dword [0x7b341148]
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], 0
movzx eax, word [ebp - 0x3a]
or ah, 0xc
mov word [ebp - 0x3c], ax
fild qword [ebp - 0x68]
fmulp st(1)
fild dword [ebp - 0x58]
fdivp st(1)
fldcw word [ebp - 0x3c]
fistp qword [ebp - 0x48]
fldcw word [ebp - 0x3a]
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x58], eax
movzx eax, byte [0x7b33c1d4]
jmp 0x7b334687
mov dword [esp + 0x14], str.Shouldnt_happen._lpMidiStrm__dwTimeDiv__0_n
mov dword [esp + 0x10], 0x5d9
mov dword [esp + 0xc], str.MMSYSTEM_MidiStream_Convert
mov dword [esp + 8], 0x7b340175
mov dword [esp + 4], 0x7b33c1d4
mov dword [esp], 0
call sym._ros_dbg_log
movzx eax, byte [0x7b33c1d4]
jmp 0x7b334687
mov eax, dword [ebp - 0x40]
mov edx, dword [eax]
mov dword [ebp - 0x68], edx
call sym._GetTickCount_0
mov edx, dword [ebp - 0x68]
mov dword [esp + 0x14], str._d__d__d_n
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x58]
mov dword [esp + 0x20], edx
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], 0x69b
mov dword [esp + 0xc], str.MMSYSTEM_MidiStream_Player
mov dword [esp + 8], 0x7b340175
mov dword [esp + 4], 0x7b33c1d4
mov dword [esp], 3
call sym._ros_dbg_log
mov dword [ebp - 0x68], ebx
mov ebx, dword [ebp - 0x5c]
jmp 0x7b3346ac
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], str.Unknown_MEVT__0x_02x__n
mov dword [esp + 0x10], 0x6bd
mov dword [esp + 0xc], str.MMSYSTEM_MidiStream_Player
mov dword [esp + 8], 0x7b340175
mov dword [esp + 4], 0x7b33c1d4
mov dword [esp], 0
call sym._ros_dbg_log
mov eax, dword [ebp - 0x40]
mov edx, dword [eax + 8]
jmp 0x7b3345c2
mov dword [esp + 0x14], str.Ready_to_go_2_n
mov dword [esp + 0x10], 0x67b
mov dword [esp + 0xc], str.MMSYSTEM_MidiStream_Player
mov dword [esp + 8], 0x7b340175
mov dword [esp + 4], 0x7b33c1d4
mov dword [esp], 3
call sym._ros_dbg_log
jmp 0x7b334529
mov dword [esp + 0x14], str.Ready_to_go_1_n
mov dword [esp + 0x10], 0x678
mov dword [esp + 0xc], str.MMSYSTEM_MidiStream_Player
mov dword [esp + 8], 0x7b340175
mov dword [esp + 4], 0x7b33c1d4
mov dword [esp], 3
call sym._ros_dbg_log
jmp 0x7b334510
mov ebx, dword [ebp - 0x68]
jmp 0x7b33457d