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

Disassembly:
push 0x5c
mov eax, 0x4fc5b5
call fcn.004e2dfc
mov esi, ecx
mov eax, dword [ebp + 8]
mov dword [esi], vtable.juce::WasapiClasses::WASAPIDeviceBase.0
mov dword [ebp - 0x68], esi
mov ecx, dword [eax]
mov dword [esi + 8], ecx
test ecx, ecx
je 0x40d842
mov eax, dword [ecx]
push ecx
call dword [eax + 4]
xor ecx, ecx
mov dword [ebp - 4], ecx
mov dword [esi + 0xc], ecx
mov al, byte [ebp + 0xc]
lea ebx, [esi + 0x3c]
xorps xmm0, xmm0
mov dword [esi + 0x20], ecx
movups xmmword [esi + 0x10], xmm0
mov dword [esi + 0x24], ecx
mov dword [esi + 0x28], ecx
mov dword [esi + 0x2c], ecx
mov dword [esi + 0x30], ecx
mov byte [esi + 0x38], al
mov dword [ebx], ecx
mov dword [ebx + 4], ecx
mov dword [ebx + 8], ecx
lea ecx, [esi + 0x4c]
call fcn.00429308
xor eax, eax
mov dword [esi + 0x5c], eax
mov dword [esi + 0x60], eax
mov dword [esi + 0x64], eax
mov byte [esi + 0x70], al
mov dword [esi + 0x74], eax
mov dword [esi + 0x78], eax
push str.JuceWASAPI
push eax
push eax
push eax
mov byte [ebp - 4], 6
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esi + 0x48], eax
mov ecx, esi
lea eax, [ebp - 0x40]
push eax
call fcn.0040dd8d
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x40da2f
mov ecx, dword [eax]
lea edx, [ebp - 0x54]
push edx
lea edx, [ebp - 0x5c]
push edx
push eax
call dword [ecx + 0x24]
test eax, eax
jns 0x40d8e8
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x40da2f
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x40da2f
mov eax, dword [ebp - 0x40]
lea edx, [ebp - 0x44]
and dword [ebp - 0x44], 0
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x20]
test eax, eax
js 0x40d8ce
mov edx, dword [ebp - 0x44]
lea ecx, [ebp - 0x3c]
call fcn.0040d7f8
push dword [ebp - 0x44]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
movzx eax, word [ebp - 0x3a]
mov edx, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x54]
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], eax
mov eax, dword [ebp - 0x38]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x52f570]
movsd qword [ebp - 0x64], xmm0
movsd qword [esi + 0x18], xmm0
call fcn.004fae8f
mulsd xmm0, qword [ebp - 0x64]
mov edx, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x5c]
mulsd xmm0, qword [0x52f010]
addsd xmm0, qword [0x52f378]
movsd qword [ebp - 0x4c], xmm0
mov eax, dword [ebp - 0x4c]
mov dword [esi + 0x28], eax
call fcn.004fae8f
mulsd xmm0, qword [ebp - 0x64]
push ecx
movsd xmm2, qword [ebp - 0x64]
mov ecx, ebx
mulsd xmm0, qword [0x52f010]
addsd xmm0, qword [0x52f378]
movsd qword [ebp - 0x4c], xmm0
mov eax, dword [ebp - 0x4c]
mov dword [esi + 0x2c], eax
mov eax, dword [ebp - 0x28]
mov dword [esi + 0x34], eax
call fcn.00413131
mov edi, 0x521970
mov ecx, dword [edi]
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
ucomisd xmm0, qword [esi + 0x18]
lahf
test ah, 0x44
jnp 0x40da13
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x38], ecx
lea ecx, [ebp - 0x3c]
push 0
push ecx
mov edx, dword [eax]
xor ecx, ecx
cmp byte [esi + 0x38], cl
setne cl
push ecx
push eax
call dword [edx + 0x1c]
test eax, eax
js 0x40da13
mov ecx, dword [ebx]
mov eax, dword [ebx + 8]
lea edx, [ecx + eax*8]
cmp ecx, edx
je 0x40da03
movd xmm0, dword [edi]
cvtdq2pd xmm0, xmm0
ucomisd xmm0, qword [ecx]
lahf
test ah, 0x44
jnp 0x40da13
add ecx, 8
cmp ecx, edx
jne 0x40d9f2
movd xmm0, dword [edi]
cvtdq2pd xmm2, xmm0
push ecx
mov ecx, ebx
call fcn.00413131
add edi, 4
cmp edi, 0x521988
jl 0x40d9aa
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x40]
test ecx, ecx
je 0x40da2f
mov edx, dword [ecx]
push ecx
call dword [edx + 8]
mov eax, esi
call fcn.004e2dab
ret 8