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

Disassembly:
sub esp, 0x24
push ebx
push ebp
mov eax, ecx
not eax
xor ebp, ebp
and eax, 1
push esi
mov esi, dword [esp + 0x34]
mov dword [esp + 0x2c], eax
mov eax, dword [esi + 4]
cmp eax, 0x28
push edi
mov dword [esp + 0x10], ebp
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x24], ebp
mov dword [esp + 0x14], ebp
mov dword [esp + 0x20], 0x400
mov dword [esp + 0x28], ebp
mov dword [esp + 0x1c], ebp
jle 0x101746a3
lea edi, [eax + 7]
and edi, 0xfffffff8
mov dword [esp + 0x18], edi
jmp 0x101746af
mov dword [esp + 0x18], 0x28
mov edi, dword [esp + 0x18]
test cl, 2
mov eax, dword [esp + 0x3c]
mov ebx, dword [esp + 0x40]
mov dword [eax], ebp
je 0x101746fe
cmp ebx, ebp
mov dword [esp + 0x24], 1
je 0x101747ed
cmp byte [ebx], 0
je 0x101746fe
push ebp
call fcn.10143d37
add esp, 4
test eax, eax
mov dword [esp + 0x14], eax
je 0x101749c2
mov ecx, eax
call fcn.101396e7
mov ebp, eax
mov dword [esp + 0x40], 0
jmp 0x101747ed
cmp ebx, ebp
je 0x101747ed
cmp byte [ebx], 0
je 0x101747ed
mov ebp, dword [esi + 8]
inc ebp
lea eax, [ebp + ebp]
push eax
call fcn.101437b7
mov edi, eax
add esp, 4
test edi, edi
mov dword [esp + 0x14], edi
je 0x101749c2
push edi
push ebp
push ebx
push esi
mov byte [edi], 0
call dword [esi + 0x24]
add esp, 0x10
mov ecx, edi
mov dword [esp + 0x10], eax
call fcn.101396e7
mov ecx, ebx
mov ebp, eax
call fcn.101396e7
mov cl, byte [eax + ebx + 1]
test cl, cl
lea ebx, [eax + ebx + 1]
mov dword [esp + 0x28], ebx
mov eax, ebx
je 0x101747a5
lea ebx, [ebx]
cmp byte [eax], 0
mov ecx, eax
je 0x10174776
mov dl, byte [ecx + 1]
inc ecx
test dl, dl
jne 0x1017476e
sub ecx, eax
and ecx, 0x3fffffff
lea ecx, [eax + ecx + 1]
test ecx, ecx
mov eax, ecx
je 0x1017479c
cmp byte [ecx], 0
je 0x10174795
mov dl, byte [eax + 1]
inc eax
test dl, dl
jne 0x1017478d
sub eax, ecx
and eax, 0x3fffffff
lea eax, [ecx + eax + 1]
cmp byte [eax], 0
jne 0x10174767
sub eax, ebx
inc eax
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x101747d4
mov eax, dword [esi + 8]
lea ecx, [ebp + 8]
cmp ecx, eax
jle 0x101747e9
mov eax, 0xa30c
call fcn.10154ea7
test eax, eax
mov dword [esp + 0x10], eax
je 0x101747e9
mov edi, dword [esp + 0x14]
push edi
call fcn.10139447
mov eax, dword [esp + 0x14]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov edi, dword [esp + 0x18]
mov edx, dword [esi + 4]
mov ebx, dword [esp + 0x1c]
add edx, 7
and edx, 0xfffffff8
add edx, ebx
lea eax, [ebp + ebp*2]
lea ecx, [edx + edi*2]
lea edi, reloc.WINMM.dll_midiStreamOut
push edi
call fcn.101437b7
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x101749b5
mov ecx, edi
mov edx, ecx
shr ecx, 2
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x18]
lea edi, [ebx + 0xc0]
mov dword [ebx + 0xb4], edi
add edi, 0x30
mov dword [ebx + 0x3c], edi
mov ecx, dword [esi + 4]
add ecx, 7
and ecx, 0xfffffff8
add edi, ecx
mov dword [ebx + 0x44], edi
add edi, eax
mov dword [ebx + 0x40], edi
add edi, eax
mov eax, dword [esp + 0x14]
test eax, eax
mov dword [ebx + 0x90], edi
je 0x1017493d
mov edx, dword [esp + 0x1c]
lea ecx, [edi + edx]
lea edx, [ecx + ebp + 1]
mov ecx, ebp
mov esi, eax
mov eax, ecx
shr ecx, 2
mov dword [ebx + 0x94], edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x101748b5
mov edx, dword [ebx + 0x90]
mov esi, dword [esp + 0x28]
mov eax, ecx
shr ecx, 2
lea edi, [edx + ebp + 1]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebx + 0x94]
mov eax, dword [esp + 0x14]
mov ecx, ebp
mov edx, ecx
shr ecx, 2
mov esi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 0x94]
mov edx, dword [0x10189264]
add ecx, ebp
mov dword [ecx], edx
mov edx, dword [0x10189268]
mov dword [ecx + 4], edx
mov dx, word [0x1018926c]
mov word [ecx + 8], dx
mov ecx, dword [ebx + 0x94]
lea edi, [ecx + ebp + 9]
mov dword [ebx + 0xbc], edi
mov ecx, ebp
mov edx, ecx
shr ecx, 2
mov esi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 0xbc]
mov edx, dword [0x1018925c]
add ecx, ebp
mov dword [ecx], edx
mov dl, byte [0x10189260]
push eax
mov byte [ecx + 4], dl
call fcn.10139447
mov esi, dword [esp + 0x3c]
add esp, 4
mov ecx, dword [esp + 0x40]
test ecx, ecx
mov eax, dword [esp + 0x48]
mov dword [ebx], esi
mov dword [ebx + 0x78], eax
je 0x101749d5
cmp byte [ecx], 0
je 0x101749d5
mov ecx, dword [ebx + 0x3c]
mov edx, dword [ebx + 0x90]
lea edi, [esp + 0x38]
push edi
and eax, 0x87f7f
push eax
push ecx
push edx
push esi
mov dword [esp + 0x4c], 0
call dword [esi + 0x18]
mov ecx, dword [esp + 0x4c]
and ecx, 1
add esp, 0x14
test eax, eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x28], ecx
jne 0x10174a0d
test ecx, ecx
jne 0x101749ec
mov esi, ebx
call fcn.1013c8f7
mov eax, dword [ebx + 0x7c]
cmp eax, 0x400
add byte [eax], al
mov eax, dword [esp + 0x14]
push eax
call fcn.10139447
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 7
pop ebx
add esp, 0x24
ret
and eax, 1
mov dword [esp + 0x2c], 1
mov byte [ebx + 0xf], 1
mov byte [ebx + 0x10], 4
mov dword [esp + 0x28], eax