Function at 0x102f1ab0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x100386ac
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xca8
mov eax, dword [0x10046638]
push ebx
push esi
push edi
push 0xb
mov esi, ecx
xor ebx, ebx
mov edi, 0xf
push 0x1003a9b4
lea ecx, [esp + 0x28]
mov dword [esp + reloc.WINMM.dll_midiStreamOut], eax
mov dword [esp + 0x40], edi
mov dword [esp + 0x3c], ebx
mov byte [esp + 0x2c], bl
call fcn.102eee00
mov eax, dword [esi]
push ebx
push 0x100451b8
push 0x100451a0
push ebx
lea ecx, [esp + 0x30]
push ecx
mov ecx, esi
mov dword [esp + reloc.WINMM.dll_midiStreamOut], ebx
call dword [eax + 0xc]
push eax
call fcn.1030bd56
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x4c]
add esp, 0x14
cmp eax, 0x10
mov dword [esp + reloc.WINMM.dll_midiStreamOut], 0xffffffff
jb 0x102f1b52
mov edx, dword [esp + 0x24]
push edx
call fcn.10319193
add esp, 4
mov dword [esp + 0x38], edi
lea edi, reloc.WINMM.dll_midiStreamOut
lea eax, reloc.WINMM.dll_midiStreamOut
push edi
push eax
mov dword [esp + 0x3c], ebx
mov byte [esp + 0x2c], bl
call fcn.10301480
add esp, 8
push 0x1003a99c
push 0x1003ad3c
mov ecx, edi
call fcn.102ff500
lea eax, [esp + 0x3c]
push 0x1003ad34
push eax
call fcn.102fec80
mov ecx, eax
add ecx, 0x30
call fcn.102ff7c0
push ebx
push 0x80
push 3
push ebx
push ebx
push 0x80000000
mov ecx, eax
mov dword [esp + reloc.WINMM.dll_midiStreamOut], 1
call fcn.102fed50
push eax
call dword [fcn.1003a32c]
mov edi, eax
lea ecx, [esp + 0x3c]
mov dword [esp + 0x10], edi
mov dword [esp + reloc.WINMM.dll_midiStreamOut], 0xffffffff
call fcn.102fece0
cmp edi, reloc.WINMM.dll_midiStreamOut
je 0x102f1c48
xor eax, eax
mov byte [esp + 0xa8], bl
mov ecx, 0xff
lea edi, [esp + 0xa9]
rep stosd dword es:[edi], eax
push ebx
stosw word es:[edi], ax
lea ecx, [esp + 0x18]
push ecx
push 0x400
lea edx, [esp + 0xb4]
stosb byte es:[edi], al
mov eax, dword [esp + 0x1c]
push edx
push eax
mov dword [esp + 0x28], ebx
call dword [fcn.1003a334]
lea ecx, [esp + 0xa8]
lea edi, reloc.WINMM.dll_midiStreamOut
push ecx
mov ecx, edi
call fcn.102ff040
mov ecx, edi
call fcn.102ff260
mov edx, dword [esp + 0x10]
push edx
call dword [fcn.1003a33c]
xor eax, eax
mov dword [esp + 0x89], eax
mov dword [esp + 0x8d], eax
mov dword [esp + 0x91], eax
mov dword [esp + 0x95], eax
mov dword [esp + 0x99], eax
mov dword [esp + 0x9d], eax
mov dword [esp + 0xa1], eax
lea ecx, [esp + 0x88]
mov word [esp + 0xa5], ax
push 0x20
push ecx
mov byte [esp + 0x90], bl
mov byte [esp + 0xaf], al
call fcn.10308240
add esp, 8
lea edx, [esp + 0x88]
lea ecx, reloc.WINMM.dll_midiStreamOut
push edx
call fcn.102ff040
call fcn.1031919d
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0xc], eax
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0x1c]
push ecx
mov dword [esp + reloc.WINMM.dll_midiStreamOut], 2
call fcn.103089e2
add esp, 8
mov eax, dword [eax]
lea edi, reloc.WINMM.dll_midiStreamOut
push eax
mov ecx, edi
mov byte [esp + 0xcc0], 3
call fcn.102ff040
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0xcbc], 2
lea edx, [eax + 0xc]
or ecx, reloc.WINMM.dll_midiStreamOut
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x102f1d24
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0xc]
push eax
lea ecx, reloc.WINMM.dll_midiStreamOut
call fcn.102ff040
mov ecx, edi
call fcn.102fed30
test eax, eax
je 0x102f1d69
lea ecx, reloc.WINMM.dll_midiStreamOut
call fcn.102fed40
test al, al
je 0x102f1d69
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
push 0x1003ad2c
push 4
push eax
call dword [ecx + 0x20]
add esp, 0xc
mov ecx, esi
call fcn.102f16e0
mov byte [esp + 0x4a8], bl
xor eax, eax
mov ecx, 0xff
lea edi, reloc.WINMM.dll_midiStreamOut
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, reloc.WINMM.dll_midiStreamOut
stosb byte es:[edi], al
call fcn.102fed50
push eax
lea ecx, reloc.WINMM.dll_midiStreamOut
call fcn.102fed50
push eax
lea ecx, reloc.WINMM.dll_midiStreamOut
call fcn.102fed50
push eax
lea ecx, reloc.WINMM.dll_midiStreamOut
call fcn.102fed50
push eax
lea ecx, reloc.WINMM.dll_midiStreamOut
call fcn.102fed50
push eax
push 0x1003ad1c
lea edx, reloc.WINMM.dll_midiStreamOut
push 0x400
push edx
call fcn.102eded0
xor eax, eax
mov byte [esp + 0x8c8], bl
mov ecx, 0xff
lea edi, reloc.WINMM.dll_midiStreamOut
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, reloc.WINMM.dll_midiStreamOut
push eax
lea ecx, reloc.WINMM.dll_midiStreamOut
push ecx
call fcn.10307d6f
add esp, 0x28
lea edx, reloc.WINMM.dll_midiStreamOut
add esi, 0x3b4
push edx
mov ecx, esi
call fcn.102ff040
push 0x1003ad18
push 0x1003ad14
mov ecx, esi
call fcn.102ff500
push 0x1003ad10
push 0x1003ad0c
mov ecx, esi
call fcn.102ff500
push 0x1003ad08
push 0x1003ad04
mov ecx, esi
call fcn.102ff500
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
mov dword [esp + reloc.WINMM.dll_midiStreamOut], 0xffffffff
lea ecx, [eax + 0xc]
or edx, reloc.WINMM.dll_midiStreamOut
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x102f1e79
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + reloc.WINMM.dll_midiStreamOut]
mov dword fs:[0], ecx
mov ecx, dword [esp + reloc.WINMM.dll_midiStreamOut]
mov al, 1
call fcn.1030b41a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret