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

Disassembly:
sub esp, 0x16c
push ebx
mov ebx, dword [esp + 0x17c]
mov dword [esp + 8], 0
push ebp
push esi
test ebx, ebx
jne 0x514d63
push 0x530a
push str.C:PureBasicSvn_v6.10LibrariesSoundMiniAudiominiaudiominiaudio.h
push str.pAudioClient_____void__0_
call fcn.00581dd0
add esp, 0xc
mov ebp, dword [esp + 0x188]
test ebp, ebp
jne 0x514d85
push 0x530b
push str.C:PureBasicSvn_v6.10LibrariesSoundMiniAudiominiaudiominiaudio.h
push str.pInfo_____void__0_
call fcn.00581dd0
add esp, 0xc
mov eax, dword [ebx]
lea ecx, [esp + 0x10]
push ecx
push ebx
mov eax, dword [eax + 0x20]
call eax
mov esi, eax
test esi, esi
js 0x5151d7
mov esi, dword [esp + 0x10]
test esi, esi
jne 0x514dbb
push 0x52f7
push str.C:PureBasicSvn_v6.10LibrariesSoundMiniAudiominiaudiominiaudio.h
push str.pWF_____void__0_
call fcn.00581dd0
add esp, 0xc
test ebp, ebp
jne 0x514dd6
push 0x52f8
push str.C:PureBasicSvn_v6.10LibrariesSoundMiniAudiominiaudiominiaudio.h
push str.pInfo_____void__0_
call fcn.00581dd0
add esp, 0xc
cmp dword [ebp + 0x204], 0x40
jae 0x514e35
push esi
call fcn.00528850
mov ecx, dword [ebp + 0x204]
add esp, 4
add ecx, ecx
mov dword [ebp + ecx*8 + 0x208], eax
mov eax, dword [ebp + 0x204]
movzx ecx, word [esi + 2]
add eax, eax
mov dword [ebp + eax*8 + 0x20c], ecx
mov ecx, dword [ebp + 0x204]
mov eax, dword [esi + 4]
add ecx, 0x21
add ecx, ecx
mov dword [ebp + ecx*8], eax
mov eax, dword [ebp + 0x204]
add eax, eax
mov dword [ebp + eax*8 + 0x214], 0
inc dword [ebp + 0x204]
mov eax, dword [esp + 0x180]
lea edx, [esp + 0x1c]
push edx
push 0
push eax
mov ecx, dword [eax]
mov eax, dword [ecx + 0x10]
call eax
test eax, eax
js 0x5151a9
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x60]
push edi
xorps xmm0, xmm0
movups xmmword [esp + 0x64], xmm0
push edx
movq qword [esp + 0x78], xmm0
mov ecx, dword [eax]
push 0x5cde40
push eax
mov eax, dword [ecx + 0x14]
call eax
test eax, eax
js 0x51516e
mov eax, dword [esp + 0x70]
mov ecx, dword [ebx]
push 0
push eax
push 1
mov dword [esp + 0x20], eax
mov eax, dword [ecx + 0x1c]
push ebx
call eax
test eax, eax
js 0x514f38
mov esi, dword [esp + 0x14]
test esi, esi
jne 0x514ebc
push 0x52f7
push str.C:PureBasicSvn_v6.10LibrariesSoundMiniAudiominiaudiominiaudio.h
push str.pWF_____void__0_
call fcn.00581dd0
add esp, 0xc
cmp dword [ebp + 0x204], 0x40
jae 0x515190
push esi
call fcn.00528850
mov ecx, dword [ebp + 0x204]
add esp, 4
add ecx, ecx
mov dword [ebp + ecx*8 + 0x208], eax
mov eax, dword [ebp + 0x204]
movzx ecx, word [esi + 2]
add eax, eax
mov dword [ebp + eax*8 + 0x20c], ecx
mov ecx, dword [ebp + 0x204]
mov eax, dword [esi + 4]
add ecx, 0x21
add ecx, ecx
mov dword [ebp + ecx*8], eax
mov eax, dword [ebp + 0x204]
add eax, eax
mov dword [ebp + eax*8 + 0x214], 2
mov eax, dword [esp + 0x20]
inc dword [ebp + 0x204]
push eax
mov ecx, dword [eax]
mov eax, dword [ecx + 8]
call eax
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x16c
ret
mov eax, dword [esp + 0x14]
movzx edi, word [eax + 2]
mov dword [esp + 0x1c], edi
cmp edi, 0xfe
jbe 0x514f5f
mov edi, 0xfe
xor esi, esi
mov eax, edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x10], eax
jmp 0x514f80
mov dword [esp + 0x18], edi
mov ecx, edi
test edi, edi
je 0x514fa5
xor esi, esi
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edi
mov eax, 0xfe
mov dword [esp + 0x10], eax
test ecx, ecx
je 0x514fa5
test eax, eax
je 0x514fa5
push esi
push edi
push 0
call fcn.00511050
mov byte [esp + esi + 0x88], al
add esp, 0xc
mov eax, dword [esp + 0x10]
inc esi
dec eax
mov dword [esp + 0x10], eax
cmp esi, edi
jb 0x514f80
mov eax, 0xfffe
mov dword [esp + 0x18], 0
mov word [esp + 0x24], ax
lea eax, [esp + 0x7c]
push edi
push eax
mov dword [esp + 0x3a], 0x280000
mov word [esp + 0x2e], di
call fcn.00512010
mov ecx, dword [esp + 0x24]
add esp, 8
mov dword [esp + 0x38], eax
xor eax, eax
mov dword [esp + 0x10], eax
mov edi, dword [eax + 0xf7db28]
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], 1
mov dword [esp + 0x54], 2
mov dword [esp + 0x58], 3
mov dword [esp + 0x5c], 4
mov dword [esp + 0x60], 4
mov si, word [esp + edi*4 + 0x4c]
shl si, 3
movzx eax, si
movzx ecx, cx
imul eax, ecx
mov word [esp + 0x32], si
mov word [esp + 0x36], si
cdq
and edx, 7
add eax, edx
sar eax, 3
movzx eax, ax
mov word [esp + 0x30], ax
imul eax, dword [esp + 0x18]
mov dword [esp + 0x2c], eax
cmp edi, 5
jne 0x51505a
movups xmm0, xmmword [0xf7dbf8]
jmp 0x515061
movups xmm0, xmmword [0xf7dbe8]
movups xmmword [esp + 0x3c], xmm0
xor esi, esi
nop dword [eax + eax]
mov eax, dword [esi + 0xf7daf0]
lea ecx, [esp + 0x24]
push 0
mov dword [esp + 0x2c], eax
mov eax, dword [ebx]
push ecx
push 1
push ebx
mov eax, dword [eax + 0x1c]
call eax
test eax, eax
jns 0x5150dc
add esi, 4
cmp esi, 0x38
jb 0x515070
mov eax, dword [esp + 0x10]
add eax, 4
mov dword [esp + 0x10], eax
cmp eax, 0x14
jae 0x5150b9
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x18], ecx
mov cx, word [esp + 0x26]
jmp 0x514fe0
mov esi, dword [esp + 0x180]
lea eax, [esp + 0x64]
push eax
mov eax, dword [esi + 0x148]
call eax
push str._WASAPI__Failed_to_find_suitable_device_format_for_device_info_retrieval.
push 2
push dword [esi + 0x38]
jmp 0x515188
cmp dword [ebp + 0x204], 0x40
jae 0x515141
lea eax, [esp + 0x24]
push eax
call fcn.00528850
mov ecx, dword [ebp + 0x204]
add esp, 4
add ecx, ecx
mov dword [ebp + ecx*8 + 0x208], eax
mov eax, dword [ebp + 0x204]
movzx ecx, word [esp + 0x26]
add eax, eax
mov dword [ebp + eax*8 + 0x20c], ecx
mov ecx, dword [ebp + 0x204]
mov eax, dword [esp + 0x28]
add ecx, 0x21
add ecx, ecx
mov dword [ebp + ecx*8], eax
mov eax, dword [ebp + 0x204]
add eax, eax
mov dword [ebp + eax*8 + 0x214], 2
inc dword [ebp + 0x204]
mov esi, dword [esp + 0x180]
lea eax, [esp + 0x64]
push eax
mov eax, dword [esi + 0x148]
call eax
mov eax, dword [esp + 0x20]
push eax
mov ecx, dword [eax]
mov eax, dword [ecx + 8]
call eax
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x16c
ret
mov esi, dword [esp + 0x180]
test esi, esi
jne 0x51517d
xor eax, eax
jmp 0x515180
mov eax, dword [esi + 0x38]
push str._WASAPI__Failed_to_retrieve_device_format_for_device_info_retrieval.
push 2
push eax
call fcn.0052d6c0
add esp, 0xc
mov eax, dword [esp + 0x20]
push eax
mov ecx, dword [eax]
mov eax, dword [ecx + 8]
call eax
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x16c
ret
mov esi, dword [esp + 0x17c]
test esi, esi
jne 0x5151b8
xor eax, eax
jmp 0x5151bb
mov eax, dword [esi + 0x38]
push str._WASAPI__Failed_to_open_property_store_for_device_info_retrieval.
push 2
push eax
call fcn.0052d6c0
add esp, 0xc
xor eax, eax
pop esi
pop ebp
pop ebx
add esp, 0x16c
ret
mov eax, dword [esp + 0x17c]
test eax, eax
je 0x5151e5
mov eax, dword [eax + 0x38]
push str._WASAPI__Failed_to_retrieve_mix_format_for_device_info_retrieval.
push 1
push eax
call fcn.0052d6c0
push esi
call fcn.0053aad0
add esp, 0x10
pop esi
pop ebp
pop ebx
add esp, 0x16c
ret