Function at 0x10182047
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x3c
xor eax, eax
push ebp
mov ebp, dword [esp + 0x48]
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov eax, dword [ebp]
mov dword [esp + 0x48], eax
mov eax, dword [eax]
mov cl, byte [eax + 0x38]
test cl, cl
mov dword [esp + 8], eax
jne 0x10182820
mov eax, dword [esp + 0x4c]
push ebx
push esi
mov esi, dword [ebp + 4]
push edi
mov edi, dword [ebp + 0x20]
lea eax, [eax + eax*4]
shl eax, 3
mov ebx, dword [edi + eax]
add edi, eax
mov dword [esp + 0x1c], eax
mov eax, dword [ebx + 8]
push eax
push esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x20], ebx
call fcn.1014af47
mov dword [esp + 0x4c], eax
movzx eax, byte [ebx]
add esp, 8
cmp eax, 0x48
mov dword [esp + 0x48], edx
mov dword [esp + 0x24], eax
jne 0x101820e6
test byte [ebx + 3], 8
je 0x101820d4
mov ecx, dword [ebx + 0x10]
push ecx
push esi
call fcn.10141b97
jmp 0x101820fc
push esi
mov esi, dword [ebx + 0x10]
call fcn.1014b037
mov esi, dword [esp + 0x14]
add esp, 4
jmp 0x101820ff
cmp eax, 0x49
jne 0x101820f2
xor eax, eax
mov dword [edi + 0x1c], eax
jmp 0x10182102
mov edx, dword [ebx + 0xc]
push edx
push esi
call fcn.1014af47
add esp, 8
mov dword [edi + 0x1c], edx
push ebx
push esi
mov dword [edi + 0x18], eax
call fcn.1014af47
mov dword [esp + 0x3c], eax
mov al, byte [ebx + 2]
add esp, 8
test al, 1
mov dword [esp + 0x38], edx
je 0x10182151
movsx esi, word [ebx + 0x20]
mov edx, dword [esp + 0x10]
call fcn.10141b67
mov esi, dword [esp + 0x34]
mov ecx, dword [esp + 0x38]
or esi, eax
or ecx, edx
add eax, reloc.WINMM.dll_midiStreamOut
adc edx, reloc.WINMM.dll_midiStreamOut
mov dword [esp + 0x34], esi
mov esi, dword [esp + 0x10]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], edx
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x38]
mov dword [edi + 0x20], eax
or eax, reloc.WINMM.dll_midiStreamOut
mov dword [edi + 8], eax
mov dword [edi + 4], eax
mov eax, dword [esp + 0x24]
xor edx, edx
cmp eax, 0x48
mov dword [edi + 0x24], ecx
mov word [edi + 0x10], dx
je 0x1018218a
cmp eax, 0x4c
jl 0x10182181
cmp eax, 0x50
jle 0x1018218a
cmp eax, 0x49
jne 0x101822c5
mov ecx, dword [esp + 0x44]
mov eax, dword [edi + 0x18]
and eax, ecx
mov ecx, dword [edi + 0x1c]
and ecx, dword [esp + 0x48]
or eax, ecx
jne 0x101822c5
mov eax, dword [ebx + 8]
call fcn.1013f5a7
mov edx, eax
mov eax, dword [ebx + 0xc]
call fcn.1013f5a7
cmp byte [edx], 0x98
mov dword [esp + 0x30], eax
jne 0x101821db
mov eax, dword [edx + 0x18]
mov dword [edi + 8], eax
movsx ecx, word [edx + 0x1c]
mov eax, dword [esp + 0x24]
mov dword [edi + 0xc], ecx
call fcn.10141da7
mov word [edi + 0x10], ax
mov eax, dword [esp + 0x30]
test eax, eax
je 0x101823a8
cmp byte [eax], 0x98
jne 0x101823a8
mov eax, dword [edi + 8]
test eax, eax
jl 0x10182260
mov edx, dword [esp + 0x14]
push 0
push 0
push ebx
push edx
call fcn.10157e77
mov esi, eax
mov eax, dword [esp + 0x24]
mov cl, byte [eax + 0x38]
add esp, 0x10
test cl, cl
je 0x10182224
push esi
push eax
call fcn.10148957
add esp, 8
pop edi
pop esi
pop ebx
pop ebp
add esp, 0x3c
ret
push 3
push esi
push ebp
call fcn.1014ade7
add esp, 0xc
test eax, eax
je 0x1018281d
mov ecx, dword [ebp + 0x20]
mov edx, dword [esp + 0x58]
lea eax, [eax + eax*4]
lea ebx, [ecx + eax*8]
mov ecx, dword [esp + 0x1c]
mov dword [ebx + 4], edx
mov edi, dword [ebp + 0x20]
mov al, byte [edi + ecx + 0x12]
add edi, ecx
or al, 8
mov byte [edi + 0x13], 1
mov byte [edi + 0x12], al
jmp 0x10182264
mov esi, ebx
mov ebx, edi
mov eax, dword [esp + 0x54]
push eax
call fcn.10166e07
mov eax, dword [esi + 8]
add esp, 4
call fcn.1013f5a7
mov ecx, dword [eax + 0x18]
mov dword [ebx + 8], ecx
movsx edx, word [eax + 0x1c]
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x44]
or eax, ecx
mov ecx, dword [esp + 0x48]
mov dword [ebx + 0xc], edx
or ecx, dword [esp + 0x40]
mov dword [ebx + 0x18], eax
mov eax, dword [esp + 0x34]
mov dword [ebx + 0x1c], ecx
mov ecx, dword [esp + 0x38]
mov dword [ebx + 0x20], eax
mov dword [ebx + 0x24], ecx
movzx eax, byte [esi]
call fcn.10141da7
mov esi, dword [esp + 0x10]
mov word [ebx + 0x10], ax
mov ebx, dword [esp + 0x18]
jmp 0x101823a8
mov al, byte [ebx]
cmp al, 0x47
jne 0x10182388
cmp byte [ebp + 0x14], 0x45
jne 0x10182388
mov eax, dword [ebx + 0x10]
mov dword [esp + 0x30], eax
mov dword [esp + 0x24], edx
xor ebx, ebx
nop
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x18]
mov edx, dword [ecx + 8]
mov eax, dword [eax + 8]
mov ecx, dword [esp + 0x14]
mov esi, dword [ebx + edx]
push 0
push 0
push eax
push ecx
call fcn.10157e77
mov edx, dword [esp + 0x24]
add esp, 0x10
push 0
push 0
push 0
push esi
push edx
mov edi, eax
call fcn.10157e77
add esp, 0x10
push eax
mov eax, dword [esp + 0x2c]
movzx ecx, byte [eax + 0x10183c14]
mov eax, dword [esp + 0x5c]
push edi
call fcn.10157db7
push 3
push eax
push ebp
call fcn.1014ade7
mov ecx, dword [esp + 0x68]
mov esi, eax
push esi
push ebp
push ecx
call fcn.10182047
mov eax, dword [ebp + 0x20]
mov edx, dword [esp + 0x40]
lea edi, [edx + eax]
mov edx, dword [esp + 0x7c]
lea ecx, [esi + esi*4]
mov dword [eax + ecx*8 + 4], edx
mov edx, dword [esp + 0x48]
add esp, 0x24
inc edx
add ebx, 0x14
cmp ebx, 0x28
mov dword [esp + 0x24], edx
jl 0x101822e7
mov ebx, dword [esp + 0x18]
mov esi, dword [esp + 0x10]
mov byte [edi + 0x13], 2
jmp 0x101823a8
cmp al, 0x44
jne 0x101823a8
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x50]
push eax
push ebp
push ecx
call fcn.1015c907
mov edi, dword [ebp + 0x20]
mov eax, dword [esp + 0x28]
add esp, 0xc
add edi, eax
cmp byte [ebp + 0x14], 0x45
jne 0x1018267f
mov ecx, dword [esp + 0x54]
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x24]
push eax
push ecx
lea ecx, [esp + 0x38]
mov eax, ebx
call fcn.10181e47
add esp, 0xc
test eax, eax
je 0x1018267f
mov edx, dword [ebx + 0x10]
mov ecx, dword [esp + 0x20]
mov eax, dword [edx + 8]
mov edi, dword [eax + 0x14]
mov esi, dword [esp + 0x14]
push 0
push 0
push ecx
push esi
mov dword [esp + 0x44], edi
call fcn.10157e77
mov cl, byte [esi + 0x38]
mov ebx, dword [esp + 0x3c]
add esp, 0x10
test cl, cl
mov dword [esp + 0x30], eax
jne 0x10182434
mov ecx, dword [eax + 4]
call fcn.101396e7
test ebx, ebx
lea ecx, [eax + ecx - 1]
mov al, byte [ecx]
je 0x10182430
cmp al, 0x40
jne 0x10182427
mov dword [esp + 0x28], 0
movzx edx, al
mov al, byte [edx + 0x10182d30]
inc al
mov byte [ecx], al
test ebx, ebx
mov dword [esp + 0x44], 0x10189a94
jne 0x10182448
mov dword [esp + 0x44], 0x10187d90
push 0
push 0
push edi
push esi
mov dword [esp + 0x58], 6
call fcn.10157e77
mov edi, eax
mov eax, dword [esp + 0x64]
mov ecx, dword [eax]
push 1
push 0x5c
push ecx
lea ebx, [esp + 0x60]
mov dword [esp + 0x40], edi
call fcn.1014f747
add esp, 0x1c
test eax, eax
je 0x10182489
or byte [eax + 3], 1
mov dword [eax + 8], edi
mov dword [esp + 0x24], eax
mov edi, eax
mov ebx, dword [esp + 0x54]
mov esi, dword [ebx]
mov ecx, 0x2c
call fcn.10143be7
mov esi, eax
test esi, esi
je 0x101824be
mov ecx, 0xb
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x24]
mov byte [esi], 0x50
mov word [esi + 0x1e], 0xffff
mov dword [esi + 0x14], 1
test esi, esi
mov eax, dword [ebx]
mov dword [esp + 0x2c], eax
jne 0x101824e3
push edi
push eax
call fcn.10148957
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x34]
push edx
push eax
call fcn.10148957
add esp, 0x10
jmp 0x10182534
mov eax, dword [esp + 0x20]
test eax, eax
je 0x101824fe
xor ecx, ecx
mov dword [esi + 0xc], eax
mov cx, word [eax + 2]
and ecx, 0x100
or word [esi + 2], cx
test edi, edi
je 0x10182515
xor edx, edx
mov dword [esi + 8], edi
mov dx, word [edi + 2]
and edx, 0x100
or word [esi + 2], dx
call fcn.1013f677
mov eax, dword [ebx]
mov eax, dword [eax + 0x5c]
cmp dword [esi + 0x14], eax
jle 0x10182534
push eax
push 0x101879e4
mov edi, ebx
call fcn.1014d297
add esp, 8
push 3
push esi
push ebp
call fcn.1014ade7
mov ecx, dword [esp + 0x5c]
push eax
push ebp
push ecx
mov dword [esp + 0x44], eax
call fcn.10182047
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x2c]
push 0
push 0
push edx
push eax
call fcn.10157e77
mov ecx, dword [ebx]
push 1
mov edi, eax
push 0x5c
push ecx
lea ebx, [esp + 0x78]
mov dword [esp + 0x58], edi
call fcn.1014f747
add esp, 0x34
test eax, eax
je 0x1018258a
or byte [eax + 3], 1
mov dword [eax + 8], edi
mov dword [esp + 0x24], eax
mov edi, eax
mov ebx, dword [esp + 0x54]
mov esi, dword [ebx]
mov ecx, 0x2c
call fcn.10143be7
mov esi, eax
test esi, esi
je 0x101825bf
mov ecx, 0xb
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x24]
mov byte [esi], 0x4f
mov word [esi + 0x1e], 0xffff
mov dword [esi + 0x14], 1
test esi, esi
mov ebx, dword [ebx]
jne 0x101825dc
push edi
push ebx
call fcn.10148957
mov edx, dword [esp + 0x38]
push edx
push ebx
call fcn.10148957
add esp, 0x10
jmp 0x1018262c
mov eax, dword [esp + 0x30]
test eax, eax
je 0x101825f4
mov dword [esi + 0xc], eax
movzx eax, word [eax + 2]
and eax, 0x100
or word [esi + 2], ax
test edi, edi
je 0x1018260b
xor ecx, ecx
mov dword [esi + 8], edi
mov cx, word [edi + 2]
and ecx, 0x100
or word [esi + 2], cx
call fcn.1013f677
mov edi, dword [esp + 0x54]
mov edx, dword [edi]
mov eax, dword [edx + 0x5c]
cmp dword [esi + 0x14], eax
jle 0x1018262c
push eax
push 0x101879e4
call fcn.1014d297
add esp, 8
push 3
push esi
push ebp
call fcn.1014ade7
mov esi, eax
mov eax, dword [esp + 0x5c]
push esi
push ebp
push eax
call fcn.10182047
mov edi, dword [ebp + 0x20]
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x40]
mov ebx, dword [esp + 0x30]
add esp, 0x18
add edi, ecx
test eax, eax
je 0x1018267b
mov eax, dword [esp + 0x2c]
mov edx, dword [ebp + 0x20]
lea ecx, [eax + eax*4]
mov eax, dword [esp + 0x58]
mov dword [edx + ecx*8 + 4], eax
mov edx, dword [ebp + 0x20]
lea ecx, [esi + esi*4]
mov dword [edx + ecx*8 + 4], eax
mov byte [edi + 0x13], 2
mov esi, dword [esp + 0x10]
cmp byte [ebx], 0x97
jne 0x10182805
mov eax, dword [ebx + 4]
push 0x101875e4
push eax
call fcn.101397b7
add esp, 8
test eax, eax
jne 0x10182805
mov eax, dword [ebx + 0x10]
cmp dword [eax], 2
jne 0x10182805
mov ecx, dword [eax + 8]
mov edx, dword [ecx + 0x14]
cmp byte [edx], 0x98
jne 0x10182805
mov eax, dword [ebx + 0x10]
mov eax, dword [eax + 8]
mov ecx, dword [eax]
mov ebx, dword [eax + 0x14]
push ecx
push esi
mov dword [esp + 0x3c], ecx
call fcn.1014af47
push ebx
push esi
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], edx
call fcn.1014af47
mov ecx, dword [esp + 0x54]
mov esi, dword [esp + 0x58]
and eax, ecx
and edx, esi
add esp, 0x10
or eax, edx
jne 0x10182805
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x14]
push 0
push 0
push ecx
push edx
call fcn.10157e77
mov edi, eax
mov eax, dword [esp + 0x64]
mov esi, dword [eax]
add esp, 0x10
mov ecx, 0x2c
mov dword [esp + 0x34], edi
call fcn.10143be7
mov esi, eax
test esi, esi
je 0x10182749
mov ecx, 0xb
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x34]
mov byte [esi], 0x32
mov word [esi + 0x1e], 0xffff
mov dword [esi + 0x14], 1
test esi, esi
mov ecx, dword [esp + 0x54]
mov eax, dword [ecx]
mov dword [esp + 0x34], eax
jne 0x1018276e
push esi
push eax
call fcn.10148957
mov edx, dword [esp + 0x3c]
push edi
push edx
call fcn.10148957
add esp, 0x10
jmp 0x101827a5
test edi, edi
je 0x10182784
xor eax, eax
mov dword [esi + 0xc], edi
mov ax, word [edi + 2]
and eax, 0x100
or word [esi + 2], ax
call fcn.1013f677
mov edi, dword [esp + 0x54]
mov ecx, dword [edi]
mov eax, dword [ecx + 0x5c]
cmp dword [esi + 0x14], eax
jle 0x101827a5
push eax
push 0x101879e4
call fcn.1014d297
add esp, 8
push 3
push esi
push ebp
call fcn.1014ade7
mov ecx, dword [esp + 0x50]
lea edx, [eax + eax*4]
mov eax, dword [ebp + 0x20]
lea eax, [eax + edx*8]
mov edx, dword [esp + 0x54]
mov dword [eax + 0x18], ecx
mov dword [eax + 0x1c], edx
mov ecx, dword [ebx + 0x18]
mov dword [eax + 8], ecx
movsx edx, word [ebx + 0x1c]
mov ecx, dword [esp + 0x64]
mov dword [eax + 0xc], edx
mov edx, dword [esp + 0x28]
mov dword [eax + 4], ecx
mov word [eax + 0x10], 0x40
mov edi, dword [ebp + 0x20]
mov cl, byte [edi + edx + 0x12]
add edi, edx
mov edx, dword [edi + 0x20]
add esp, 0xc
or cl, 8
mov byte [edi + 0x12], cl
mov byte [edi + 0x13], 1
mov dword [eax + 0x20], edx
mov ecx, dword [edi + 0x24]
mov dword [eax + 0x24], ecx
mov esi, dword [edi + 0x18]
mov edx, dword [esp + 0x3c]
mov ecx, dword [edi + 0x1c]
mov eax, dword [esp + 0x40]
or esi, edx
or ecx, eax
mov dword [edi + 0x18], esi
mov dword [edi + 0x1c], ecx
pop edi
pop esi
pop ebx
pop ebp
add esp, 0x3c
ret