Function at 0x101e5ab9
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x419540
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push ebp
push edi
mov eax, dword [reloc.WINMM.dll_waveOutGetNumDevs]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [esp + 0x30]
mov dword [esi + 0x50], eax
mov dword [esi + 0x4c], edi
mov edx, dword [reloc.WINMM.dll_waveOutGetNumDevs]
mov eax, dword [edx + 0xc]
mov ecx, 0x422b74
call eax
lea ecx, [eax + 0x10]
mov dword [esp + 0x10], ecx
test edi, edi
mov dword [esp + 0x28], 0
je 0x101e5ccc
cmp dword [ecx - 0xc], 0
mov edx, dword [esi + 0x34]
mov ebx, dword [esi + 0x3c]
mov edi, dword [ecx - 0x10]
lea eax, [ecx - 0x10]
mov dword [esp + 0x14], edx
lea ebp, [esi + 0x44]
je 0x101e5b80
cmp dword [eax + 0xc], 0
lea edx, [eax + 0xc]
jge 0x101e5b5a
cmp dword [ecx - 8], 0
jge 0x101e5b44
push 0x80070057
call fcn.101e2bd9
mov dword [ecx - 0xc], 0
mov eax, dword [esp + 0x10]
mov word [eax], 0
mov ecx, dword [esp + 0x10]
jmp 0x101e5b80
or ecx, reloc.WINMM.dll_waveOutGetNumDevs
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x101e5b70
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [edi]
mov eax, dword [edx + 0xc]
mov ecx, edi
call eax
lea ecx, [eax + 0x10]
mov dword [esp + 0x10], ecx
cmp dword [ebx + 4], 0
je 0x101e5cbd
mov edx, dword [reloc.WINMM.dll_waveOutGetNumDevs]
mov eax, dword [edx + 0xc]
mov ecx, 0x422b74
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov byte [esp + 0x28], 1
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x101e5bd1
mov eax, dword [esp + 0x14]
mov edx, dword [ecx]
mov edx, dword [edx + 0xc]
push eax
lea eax, [esp + 0x20]
push eax
call edx
test eax, eax
je 0x101e5bd1
lea eax, [esp + 0x1c]
lea edi, [esp + 0x10]
call fcn.101e2799
jmp 0x101e5be6
mov edx, dword [esp + 0x14]
mov ecx, dword [ebx + 4]
mov eax, dword [ecx]
mov eax, dword [eax + 0x10]
push edx
lea edx, [esp + 0x14]
push edx
push ebp
call eax
mov ecx, dword [esp + 0x10]
cmp dword [ecx - 0xc], 0
je 0x101e5c94
mov edx, dword [reloc.WINMM.dll_waveOutGetNumDevs]
mov eax, dword [edx + 0xc]
mov ecx, 0x422b74
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov byte [esp + 0x28], 2
mov ebx, dword [ebx + 4]
test ebx, ebx
je 0x101e5c2a
mov eax, dword [esp + 0x14]
mov edx, dword [ebx]
mov edx, dword [edx + 0x14]
push eax
lea ecx, [esp + 0x1c]
push ecx
mov ecx, ebx
call edx
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x18]
push ecx
mov ebx, ebp
call fcn.101e2869
add esp, 8
mov edi, ebp
mov byte [esp + 0x28], 3
call fcn.101e2799
mov byte [esp + 0x28], 2
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, reloc.WINMM.dll_waveOutGetNumDevs
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x101e5c6f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x28], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, reloc.WINMM.dll_waveOutGetNumDevs
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x101e5c94
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x28], 0
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, reloc.WINMM.dll_waveOutGetNumDevs
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x101e5cb9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx - 0xc]
xor edx, edx
test eax, eax
setne dl
mov eax, edx
mov dword [esi + 0x54], eax
cmp dword [esp + 0x30], 0
je 0x101e5cf1
mov eax, dword [esi + 0x34]
push eax
lea eax, [esp + 0x14]
push eax
lea ecx, [esi + 0x48]
push ecx
mov ecx, dword [esi + 0x3c]
push 1
call fcn.101e6d09
mov ecx, dword [esp + 0x10]
mov dword [esi + 0x58], eax
lea eax, [ecx - 0x10]
mov dword [esp + 0x28], reloc.WINMM.dll_waveOutGetNumDevs
lea edx, [eax + 0xc]
or ecx, reloc.WINMM.dll_waveOutGetNumDevs
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x101e5d15
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebp
pop ebx
add esp, 0x1c
ret 4