Function at 0x10189917
Capabilities:
Inspect section memory permissions
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xcc
mov edx, dword [ebp + 8]
mov eax, dword [edx + 8]
push ebx
push esi
push edi
mov dword [esp + 0x20], eax
xor eax, eax
mov ecx, 0x18
lea edi, [esp + 0x78]
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 0xc]
mov ax, word [ecx]
cmp ax, 0x40
mov dword [esp + 0x78], edx
jle 0x10189967
push 0x40
push 0x10189da4
mov edi, edx
call fcn.1014d297
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0x1c]
and ecx, 0x40
mov dword [esp + 0x40], ecx
je 0x1018997d
mov dword [esp + 0x10], 1
jmp 0x10189984
movsx edx, ax
mov dword [esp + 0x10], edx
mov ebx, dword [esp + 0x10]
mov eax, dword [ebp + 8]
imul ebx, ebx, 0x58
mov edi, dword [eax]
add ebx, 0x3f
and ebx, 0xfffffff8
lea ecx, reloc.WINMM.dll_midiStreamOut
mov esi, edi
mov dword [esp + 0x2c], edi
call fcn.10143be7
mov esi, eax
test esi, esi
mov dword [esp + 0x14], esi
je 0x101899cd
lea ecx, reloc.WINMM.dll_midiStreamOut
mov edx, ecx
shr ecx, 2
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x2c]
mov al, byte [edi + 0x38]
test al, al
je 0x101899e6
mov eax, esi
mov ecx, edi
call fcn.101394e7
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x10]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov dword [esi + 0x1c], eax
mov eax, dword [esp + 0x20]
mov dword [esi], ecx
mov dword [esi + 4], edx
call fcn.10147467
mov edx, dword [ebp + 0x1c]
mov dword [esi + 0x18], eax
mov eax, dword [ebp + 8]
add ebx, esi
mov dword [esp + 0x7c], ebx
mov dword [esi + 0x20], ebx
mov word [esi + 0xa], dx
fld qword [eax + 0x1b8]
fstp qword [esi + 0x28]
mov ecx, dword [esp + 0x7c]
add esi, 0x38
mov dword [esp + 0xac], esi
mov al, byte [edi + 0x34]
add ecx, 0x168
test al, 0x20
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x3c], esi
je 0x10189a4a
mov dword [ebp + 0x18], 0
mov esi, dword [esp + 0x1c]
xor eax, eax
mov ecx, 0x41
mov edi, esi
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x7c]
mov ecx, dword [ebp + 8]
lea edi, [eax + 0x28]
xor ebx, ebx
mov dword [eax + 0x20], edi
mov edi, dword [ebp + 0x10]
mov dword [eax], ecx
mov dword [eax + 4], esi
mov dword [eax + 0x10], ebx
mov dword [eax + 0x18], ebx
mov dword [eax + 0x1c], 8
mov dword [eax + 8], ebx
mov dword [eax + 0xc], ebx
mov word [eax + 0x16], dx
push edi
mov eax, ecx
call fcn.10181be7
mov edx, dword [esp + 0x80]
push 0x45
push edi
push edx
call fcn.1014aef7
add esp, 0x10
cmp edi, ebx
je 0x10189ad0
cmp dword [esp + 0x10], ebx
je 0x10189ab7
mov eax, edi
call fcn.10148da7
test eax, eax
je 0x10189ad0
mov ebx, dword [esp + 0x14]
mov eax, dword [ebx + 0x18]
mov ecx, dword [ebp + 8]
push 8
push eax
push edi
push ecx
call fcn.1017e097
add esp, 0x10
jmp 0x10189ad4
mov ebx, dword [esp + 0x14]
mov edi, dword [ebp + 0xc]
cmp word [edi], 0
mov dword [esp + 0x24], 0
jle 0x10189b41
lea eax, [edi + 0x18]
mov dword [esp + 0x38], eax
mov ecx, dword [eax + 0x1c]
mov edx, dword [esi]
mov dword [esi + edx*4 + 4], ecx
inc dword [esi]
mov ecx, dword [eax]
test ecx, ecx
je 0x10189b2a
test byte [ecx + 0x2a], 0x10
je 0x10189b2a
mov edi, dword [esp + 0x7c]
mov ecx, dword [esp + 0x24]
mov eax, 1
xor edx, edx
add edi, 8
call fcn.101aa457
mov ecx, dword [edi]
or ecx, eax
or dword [edi + 4], edx
mov eax, dword [esp + 0x38]
mov dword [edi], ecx
mov edi, dword [ebp + 0xc]
mov ecx, dword [esp + 0x24]
movsx edx, word [edi]
inc ecx
add eax, 0x48
cmp ecx, edx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x38], eax
jl 0x10189aec
mov eax, dword [esp + 0x7c]
mov esi, dword [eax + 0x18]
dec esi
mov dword [esp + 0x44], eax
js 0x10189b65
mov eax, dword [esp + 0x44]
push esi
push eax
push edi
call fcn.10182047
add esp, 0xc
dec esi
jns 0x10189b4f
mov eax, dword [esp + 0x7c]
mov ecx, dword [esp + 0x2c]
mov dl, byte [ecx + 0x38]
test dl, dl
jne 0x1018a020
mov edi, dword [ebp + 0x18]
test edi, edi
je 0x10189b96
mov edx, dword [ebp + 8]
push edi
push eax
mov eax, dword [ebp + 0xc]
push edx
call fcn.10167267
add esp, 0xc
test eax, eax
je 0x10189b96
xor edi, edi
mov byte [ebx + 0xe], 1
mov esi, dword [esp + 0x10]
mov eax, dword [ebp + 0x14]
or ecx, reloc.WINMM.dll_midiStreamOut
mov dword [esp + 0x90], ecx
mov dword [esp + 0x94], ecx
mov dword [esp + 0x38], ecx
xor ecx, ecx
cmp esi, ecx
mov dword [esp + 0x9c], edi
mov edi, dword [esp + 0x3c]
mov dword [esp + 0x98], eax
mov dword [esp + 0xa8], esi
mov dword [esp + 0x28], ecx
mov dword [esp + 0xa4], ecx
mov dword [esp + 0xc], edi
jle 0x10189fd8
dec esi
mov dword [esp + 0x44], esi
mov ebx, dword [esp + 0x28]
fld qword [0x10188aa0]
mov edi, dword [esp + 0x44]
xor ecx, ecx
mov eax, ecx
mov dword [esp + 0x54], ecx
mov dword [esp + 0x58], ecx
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x60], ecx
mov dword [esp + 0x64], ecx
mov dword [esp + 0x68], ecx
mov dword [esp + 0x6c], ecx
fstp qword [esp + 0x68]
mov dword [esp + 0x70], ecx
or esi, reloc.WINMM.dll_midiStreamOut
cmp ebx, edi
mov dword [esp + 0x74], ecx
mov dword [esp + 0x4c], ecx
setl cl
mov dword [esp + 0x18], esi
mov dword [esp + 0x50], eax
test ecx, ecx
mov dword [esp + 0x48], ecx
jl 0x10189e8f
jmp 0x10189c49
mov ebx, dword [esp + 0x28]
test esi, esi
jge 0x10189e8f
mov eax, dword [ebp + 0xc]
lea edx, [ebx + ebx*8]
lea edi, [eax + edx*8 + 8]
cmp ebx, dword [esp + 0x10]
mov dword [esp + 0x80], edi
jge 0x10189e78
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x14]
imul ecx, ecx, 0x58
lea eax, [ecx + edx + 0x80]
mov dword [esp + 0x24], eax
jmp 0x10189c87
mov al, byte [edi + 0x20]
mov ecx, dword [esp + 0x28]
and al, 0xa
neg al
sbb eax, eax
neg eax
cmp ebx, ecx
mov dword [esp + 0x30], eax
je 0x10189ca6
test eax, eax
jne 0x10189e78
mov esi, dword [esp + 0x1c]
mov eax, dword [esi]
xor ecx, ecx
test eax, eax
jle 0x10189cc4
mov edx, dword [edi + 0x2c]
lea eax, [esi + 4]
cmp dword [eax], edx
je 0x10189cf6
inc ecx
add eax, 4
cmp ecx, dword [esi]
jl 0x10189cb8
xor eax, eax
xor edx, edx
mov esi, dword [esp + 0x90]
mov ecx, eax
and ecx, esi
mov esi, edx
and esi, dword [esp + 0x94]
or ecx, esi
jne 0x10189d04
mov eax, dword [esp + 0x28]
cmp ebx, eax
jne 0x10189e56
inc eax
mov dword [esp + 0x28], eax
jmp 0x10189e56
mov eax, 1
xor edx, edx
call fcn.101aa457
jmp 0x10189cc8
mov esi, dword [esp + 0x48]
test esi, esi
je 0x10189d15
mov dword [esp + 0x88], eax
jmp 0x10189d2a
mov ecx, dword [esp + 0x90]
mov edx, dword [esp + 0x94]
mov dword [esp + 0x88], ecx
mov dword [esp + 0x8c], edx
mov eax, dword [edi + 0x44]
test eax, eax
jne 0x10189d3c
inc dword [esp + 0x4c]
mov eax, dword [edi + 0x10]
test byte [eax + 0x2a], 0x10
je 0x10189d5f
mov edi, dword [esp + 0x24]
lea edx, [esp + 0x78]
lea ecx, [edi + 8]
push edx
mov dword [esp + 0xa4], ecx
call fcn.1016da67
jmp 0x10189d6d
lea eax, [esp + 0x78]
push eax
call fcn.101676e7
mov edi, dword [esp + 0x28]
add esp, 4
test esi, esi
je 0x10189d7f
fld qword [esp + 0xc8]
fstp qword [edi]
jmp 0x10189d99
mov ecx, dword [esp + 0x44]
cmp dword [esp + 0x28], ecx
jge 0x10189d99
fld qword [esp + 0xc8]
fdiv qword [edi]
fstp qword [esp + 0xc8]
mov edi, dword [esp + 0x90]
mov eax, dword [esp + 0xd0]
mov ecx, dword [esp + 0xd4]
mov esi, dword [esp + 0x94]
and eax, edi
mov edi, dword [esp + 0x80]
and ecx, esi
or eax, ecx
jne 0x10189e4e
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x10189de4
mov eax, dword [edi + 0x44]
test eax, eax
je 0x10189de4
test dword [esp + 0xb0], reloc.WINMM.dll_midiStreamOut
je 0x10189e4e
mov eax, dword [esp + 0x18]
test eax, eax
jl 0x10189e31
fld qword [esp + 0xc8]
fcomp qword [esp + 0x68]
fnstsw ax
test ah, 5
jnp 0x10189e31
fld qword [esp + 0xc8]
fcomp qword [esp + 0x68]
fnstsw ax
test ah, 0x41
je 0x10189e4e
mov dx, word [esp + 0xb6]
cmp dx, word [esp + 0x56]
ja 0x10189e31
fld qword [esp + 0xb8]
fcomp qword [esp + 0x58]
fnstsw ax
test ah, 5
jp 0x10189e4e
mov ecx, 0xa
lea esi, [esp + 0xb0]
lea edi, [esp + 0x50]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x80]
mov dword [esp + 0x18], ebx
mov eax, dword [esp + 0x30]
test eax, eax
jne 0x10189e78
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x10]
inc ebx
add edx, 0x58
add edi, 0x48
cmp ebx, eax
mov dword [esp + 0x24], edx
mov dword [esp + 0x80], edi
jl 0x10189c87
mov eax, dword [esp + 0x48]
mov esi, dword [esp + 0x18]
dec eax
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x50]
jns 0x10189c45
test eax, 0x40000000
je 0x10189e9e
mov ecx, dword [esp + 0x14]
mov byte [ecx + 0xe], 2
mov edi, dword [esp + 0x38]
mov ecx, dword [esp + 0xc]
and edi, eax
test eax, 0x200f0000
mov dword [esp + 0x38], edi
mov edi, dword [esp + 0x54]
mov edx, ecx
mov dword [edx], eax
mov dword [edx + 4], edi
mov edi, dword [esp + 0x58]
mov dword [edx + 8], edi
mov edi, dword [esp + 0x5c]
mov dword [edx + 0xc], edi
mov edi, dword [esp + 0x60]
mov dword [edx + 0x10], edi
mov edi, dword [esp + 0x64]
mov dword [edx + 0x14], edi
lea edx, [esi + esi*8]
mov esi, dword [ebp + 0xc]
lea esi, [esi + edx*8]
mov edx, dword [esi + 0x34]
mov dword [ecx + 0x1c], edx
je 0x10189f0e
cmp word [esp + 0x40], 0
je 0x10189f00
test eax, 0x20000000
jne 0x10189f00
mov eax, dword [ebp + 0x20]
mov dword [ecx + 0x20], eax
jmp 0x10189f15
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x48]
mov dword [ecx + 0x20], edx
inc dword [eax + 0x48]
jmp 0x10189f15
mov dword [ecx + 0x20], reloc.WINMM.dll_midiStreamOut
mov eax, dword [esp + 0x1c]
mov edx, dword [eax]
xor ecx, ecx
test edx, edx
jle 0x10189f3b
mov edx, dword [esi + 0x34]
mov edi, eax
lea eax, [edi + 4]
cmp dword [eax], edx
je 0x10189ffc
mov ebx, dword [edi]
inc ecx
add eax, 4
cmp ecx, ebx
jl 0x10189f29
xor eax, eax
xor edx, edx
mov ecx, dword [esp + 0x90]
fld qword [esp + 0x58]
fcomp qword [0x10187488]
not eax
and ecx, eax
mov eax, dword [esp + 0x94]
not edx
and eax, edx
mov edx, dword [esp + 0xc]
mov dword [esp + 0x94], eax
fnstsw ax
mov dword [esp + 0x90], ecx
test ah, 1
mov cl, byte [esp + 0x18]
mov byte [edx + 0x34], cl
jne 0x10189f92
mov eax, dword [ebp + 8]
fld qword [esp + 0x58]
fmul qword [eax + 0x1b8]
fstp qword [eax + 0x1b8]
mov esi, dword [esi + 0x4c]
test esi, esi
je 0x10189fa3
test dword [esp + 0x50], reloc.WINMM.dll_midiStreamOut
je 0x1018a00d
mov eax, dword [esp + 0xa4]
mov edx, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
inc eax
add edx, 0x58
cmp eax, ecx
mov dword [esp + 0xa4], eax
mov dword [esp + 0xc], edx
jl 0x10189be9
mov ebx, dword [esp + 0x14]
mov eax, dword [ebp + 0x14]
mov edi, dword [esp + 0x3c]
mov esi, ecx
xor ecx, ecx
mov edx, dword [ebp + 8]
cmp dword [edx + 0x44], ecx
jne 0x1018a020
mov edx, dword [esp + 0x2c]
cmp byte [edx + 0x38], 0
jne 0x1018a020
cmp esi, ecx
je 0x1018a046
mov edx, dword [esp + 0xc]
mov dx, word [edx - 0x52]
mov word [ebx + 8], dx
jmp 0x1018a04a
mov eax, 1
xor edx, edx
call fcn.101aa457
jmp 0x10189f3f
mov eax, dword [esi]
mov edi, dword [ebp + 8]
push eax
push 0x10189d8c
call fcn.1014d297
add esp, 8
mov ebx, dword [esp + 0x14]
mov edx, dword [esp + 0x2c]
fld qword [ebx + 0x28]
mov ecx, dword [ebp + 8]
push edx
fstp qword [ecx + 0x1b8]
call fcn.1014b4b7
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov word [ebx + 8], cx
mov edx, dword [esp + 0x38]
and edx, 0x2000000
je 0x1018a061
cmp eax, ecx
je 0x1018a061
mov ax, word [eax]
mov word [ebx + 8], ax
test byte [ebp + 0x1c], 4
je 0x1018a078
cmp edx, ecx
je 0x1018a078
mov eax, dword [edi]
and eax, 0xffbfffff
mov byte [ebx + 0xc], 1
mov dword [edi], eax
mov eax, dword [ebp + 8]
push 0xffffffffffffffff
call fcn.1017ba17
fld qword [0x10187488]
or eax, reloc.WINMM.dll_midiStreamOut
fstp qword [ebx + 0x30]
add esp, 4
test esi, esi
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0xc], edi
jle 0x1018a3d0
mov dword [esp + 0x3c], esi
movzx eax, byte [edi + 0x34]
fld qword [edi + 8]
mov edx, dword [ebp + 0xc]
fmul qword [ebx + 0x30]
lea ecx, [eax + eax*8]
mov esi, dword [edx + ecx*8 + 0x18]
lea eax, [edx + ecx*8 + 8]
fstp qword [ebx + 0x30]
mov edx, dword [esi + 0x40]
test edx, edx
mov dword [esp + 0x1c], eax
mov eax, 0xfff0bdc0
mov dword [esp + 0x18], eax
je 0x1018a109
mov ecx, dword [esp + 0x2c]
mov ecx, dword [ecx + 0x14]
xor eax, eax
test ecx, ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x40], ecx
jle 0x1018a109
mov ecx, dword [esp + 0x2c]
mov ecx, dword [ecx + 0x10]
add ecx, 0xc
cmp dword [ecx], edx
je 0x1018a105
inc eax
add ecx, 0x10
cmp eax, dword [esp + 0x40]
jl 0x1018a0f7
mov dword [esp + 0x18], eax
mov cl, byte [esi + 0x2a]
test cl, 2
jne 0x1018a291
mov edx, dword [esi + 0xc]
test edx, edx
jne 0x1018a291
mov edi, dword [edi]
test edi, 0x8000000
je 0x1018a1fe
mov ebx, dword [esi + 0x38]
xor ecx, ecx
cmp ebx, ecx
je 0x1018a146
mov eax, dword [esp + 0x2c]
cmp dword [ebx], eax
je 0x1018a146
mov ebx, dword [ebx + 0x18]
cmp ebx, ecx
jne 0x1018a13b
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + 0x2c]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x20]
mov esi, dword [eax + 0x1c]
cmp dword [eax + 0x20], esi
jg 0x1018a175
mov edi, eax
call fcn.101472c7
test eax, eax
je 0x1018a16f
mov eax, 1
jmp 0x1018a19e
mov eax, dword [esp + 0x20]
xor ecx, ecx
inc dword [eax + 0x1c]
mov eax, dword [eax + 4]
lea edx, [esi + esi*4]
lea eax, [eax + edx*4]
mov edx, dword [esp + 0x40]
mov byte [eax], 0x87
mov byte [eax + 3], 0
mov dword [eax + 4], edx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov byte [eax + 1], 0
mov eax, esi
mov ecx, dword [esp + 0x20]
mov esi, dword [ecx + 4]
test esi, esi
mov edi, dword [ecx]
je 0x1018a291
mov cl, byte [edi + 0x38]
test cl, cl
jne 0x1018a291
test eax, eax
jge 0x1018a1c6
mov eax, dword [esp + 0x20]
mov eax, dword [eax + 0x1c]
dec eax
lea ecx, [eax + eax*4]
movsx eax, byte [esi + ecx*4 + 1]
lea esi, [esi + ecx*4]
mov ecx, dword [esi + 0x10]
call fcn.10147587
test ebx, ebx
mov dword [esi + 0x10], 0
jne 0x1018a1ef
mov dword [esi + 0x10], ebx
mov byte [esi + 1], bl
jmp 0x1018a291
mov dword [esi + 0x10], ebx
mov byte [esi + 1], 0xf6
inc dword [ebx + 0xc]
jmp 0x1018a291
test cl, 0x10
jne 0x1018a291
test edi, 0x400000
jne 0x1018a27c
test byte [ebp + 0x1c], 0x10
jne 0x1018a27c
mov cl, byte [ebx + 0xc]
mov edi, dword [esp + 0x1c]
xor edx, edx
test cl, cl
mov ecx, dword [ebp + 8]
setne dl
add edx, 0x27
push edx
push eax
mov eax, dword [edi + 0x2c]
push eax
mov eax, esi
call fcn.1015ab57
mov al, byte [ebx + 0xc]
add esp, 0xc
test al, al
jne 0x1018a291
cmp word [esi + 0x26], 0x40
jge 0x1018a291
mov eax, dword [edi + 0x38]
mov ecx, dword [edi + 0x3c]
mov esi, eax
xor edx, edx
or esi, ecx
je 0x1018a264
mov edi, edi
shrd eax, ecx, 1
shr ecx, 1
mov esi, eax
inc edx
or esi, ecx
jne 0x1018a257
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx + 0x1c]
push ecx
dec eax
mov ecx, 0xfffffff2
call fcn.101476b7
add esp, 4
jmp 0x1018a291
mov ecx, dword [esi]
mov edx, dword [esi + 0x20]
push ecx
push 0
push edx
push eax
mov eax, dword [ebp + 8]
call fcn.10149697
add esp, 0x10
mov edi, dword [esp + 0xc]
mov eax, dword [edi]
test eax, 0x20000000
je 0x1018a2c7
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x1c]
push edi
push eax
mov eax, dword [esp + 0x84]
push ecx
mov ecx, dword [ebp + 8]
push edx
push eax
push ecx
call fcn.1016d3c7
add esp, 0x18
jmp 0x1018a35b
test eax, 0xf0000
je 0x1018a35b
mov esi, dword [edi + 0x10]
mov edx, dword [ebp + 8]
push esi
push edx
call fcn.101625b7
mov ecx, dword [esp + 0x20]
mov esi, dword [esi + 0x28]
push ecx
mov ebx, eax
mov eax, dword [edi + 0x20]
mov edi, dword [esp + 0x2c]
push esi
push eax
push 0x27
mov eax, edi
call fcn.10147347
mov esi, dword [edi + 4]
mov edx, dword [edi]
add esp, 0x18
test esi, esi
je 0x1018a349
mov cl, byte [edx + 0x38]
test cl, cl
jne 0x1018a349
test eax, eax
jge 0x1018a316
mov eax, dword [edi + 0x1c]
dec eax
lea eax, [eax + eax*4]
mov ecx, dword [esi + eax*4 + 0x10]
lea esi, [esi + eax*4]
movsx eax, byte [esi + 1]
mov edi, edx
call fcn.10147587
mov edi, dword [esp + 0xc]
xor eax, eax
cmp ebx, eax
mov dword [esi + 0x10], eax
jne 0x1018a340
mov dword [esi + 0x10], eax
mov byte [esi + 1], al
jmp 0x1018a35b
mov dword [esi + 0x10], ebx
mov byte [esi + 1], 0xfa
jmp 0x1018a35b
mov ecx, ebx
mov eax, 0xfffffff0
mov edi, edx
call fcn.10147587
mov edi, dword [esp + 0xc]
mov ecx, dword [esp + 0x18]
mov eax, dword [ebp + 8]
push ecx
call fcn.1017ba17
mov edx, dword [esp + 0x80]
mov eax, dword [edx + 4]
mov edx, dword [eax]
add esp, 4
xor ecx, ecx
test edx, edx
jle 0x1018a397
mov esi, dword [esp + 0x1c]
mov esi, dword [esi + 0x2c]
add eax, 4
cmp dword [eax], esi
je 0x1018a452
inc ecx
add eax, 4
cmp ecx, edx
jl 0x1018a387
xor eax, eax
xor edx, edx
mov ebx, dword [esp + 0x30]
mov esi, dword [esp + 0x34]
not eax
and ebx, eax
mov eax, dword [esp + 0x3c]
not edx
and esi, edx
add edi, 0x58
dec eax
mov dword [esp + 0x30], ebx
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x34], esi
mov dword [esp + 0xc], edi
mov dword [esp + 0x3c], eax
jne 0x1018a0a9
or eax, reloc.WINMM.dll_midiStreamOut
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx + 0x1c]
mov ecx, dword [esp + 0x2c]
mov dword [ebx + 0x10], edx
mov dl, byte [ecx + 0x38]
test dl, dl
jne 0x1018a020
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x10]
xor esi, esi
test eax, eax
jle 0x1018a449
lea edi, [ebx + 0x64]
movzx eax, byte [edi + 8]
mov edx, dword [ebp + 0x1c]
push edx
mov edx, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push esi
lea ecx, [edi - 0x2c]
push ecx
push edx
call fcn.10154b27
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x44]
mov edx, dword [ebp + 0x1c]
push eax
push ecx
push edx
push esi
push ebx
call fcn.10182c67
mov dword [esp + 0x58], eax
mov eax, dword [edi]
add esp, 0x28
mov dword [ebx + 0x14], eax
mov eax, dword [esp + 0x10]
inc esi
add edi, 0x58
cmp esi, eax
mov dword [esp + 0x34], edx
jl 0x1018a3fe
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 1
xor edx, edx
call fcn.101aa457
jmp 0x1018a39b