Function at 0x501300
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x502ff2
mov eax, dword fs:[0]
push eax
sub esp, 0x20c
mov eax, dword [0x546190]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
xor ebx, ebx
mov dword [ebp - 0x218], esi
mov dword [ebp - 0x1f8], ebx
call fcn.0043a920
mov eax, dword [ebp + 8]
mov dword [esi], vtable.audio::AudioInputImpl.0
mov ecx, dword [eax]
mov dword [esi + 8], ecx
mov edx, dword [eax + 4]
mov dword [esi + 0xc], edx
mov eax, dword [eax + 8]
mov dword [esi + 0x10], eax
mov dword [ebp - 4], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x18], ebx
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x20], ebx
mov dword [esi + 0x24], ebx
mov dword [esi + 0x28], ebx
mov dword [esi + 0x2c], ebx
lea edi, [esi + 0x30]
mov dword [edi], ebx
mov dword [esi + 0x34], ebx
mov dword [esi + 0x38], ebx
lea ecx, [esi + 0x3c]
mov byte [ebp - 4], 4
call fcn.0043af70
lea ecx, [esi + 0x40]
mov byte [ebp - 4], 5
call fcn.0043af70
mov eax, dword [esi + 8]
mov byte [ebp - 4], 6
mov dword [esi + 0x44], ebx
mov dword [esi + 0x48], ebx
mov byte [esi + 0x4c], bl
cmp eax, 1
jl 0x50171d
cmp eax, 2
jg 0x50171d
mov eax, dword [esi + 0xc]
cmp eax, 8
je 0x501404
cmp eax, 0x10
je 0x501404
push str.Unsupported_bits_per_sample_while_creating_AudioInput
lea ecx, [ebp - 0x3c]
call fcn.00401050
lea ecx, [ebp - 0x3c]
push ecx
lea ecx, [ebp - 0x1ec]
mov byte [ebp - 4], 9
call fcn.00438880
mov byte [ebp - 4], 0xa
sub esp, 0x1b0
mov dword [ebp - 0x1f0], esp
mov ecx, esp
push eax
call fcn.00438600
call fcn.004036c0
mov eax, dword [esi + 0x10]
cmp eax, 0x1f40
je 0x501484
cmp eax, 0x2b11
je 0x501484
cmp eax, 0x3e80
je 0x501484
cmp eax, 0x5622
je 0x501484
cmp eax, 0x7d00
je 0x501484
cmp eax, 0xac44
je 0x501484
cmp eax, 0xbb80
je 0x501484
cmp eax, 0x15888
je 0x501484
cmp eax, 0x17700
je 0x501484
cmp eax, 0x2ee0
je 0x501484
cmp eax, 0x5dc0
je 0x501484
cmp eax, 0xfa00
je 0x501484
push str.Unsupported_samples_per_second_while_creating_AudioInput
lea ecx, [ebp - 0x3c]
call fcn.00401050
lea edx, [ebp - 0x3c]
push edx
lea ecx, [ebp - 0x1ec]
mov byte [ebp - 4], 0xb
call fcn.00438880
mov byte [ebp - 4], 0xc
jmp 0x5013eb
push ebx
push edi
push ebx
call sub.DSOUND.dll_DirectSoundCaptureCreate8
mov edi, dword [esi + 0xc]
xor eax, eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov word [ebp - 0x14], ax
mov eax, 1
mov word [ebp - 0x24], ax
mov ax, word [esi + 8]
mov word [ebp - 0x22], ax
movzx eax, ax
imul eax, edi
mov ecx, dword [esi + 0x10]
cdq
and edx, 7
add eax, edx
sar eax, 3
movzx edx, ax
imul edx, ecx
mov word [ebp - 0x18], ax
movzx eax, di
mov word [ebp - 0x16], ax
mov dword [ebp - 0x1c], edx
mov eax, edi
cdq
and edx, 7
lea edi, [edx + eax]
sar edi, 3
imul edi, dword [esi + 8]
mov dword [ebp - 0x20], ecx
imul ecx, edi
mov eax, 0x66666667
imul ecx
sar edx, 3
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
xor edx, edx
mov eax, ecx
div edi
mov dword [esi + 0x48], ecx
cmp edx, ebx
je 0x501513
sub ecx, edx
add ecx, edi
mov dword [esi + 0x48], ecx
mov ecx, dword [esi + 0x48]
xor eax, eax
mov dword [ebp - 0x20c], eax
mov dword [ebp - 0x20c], ecx
push ebx
mov dword [ebp - 0x214], eax
mov dword [ebp - 0x210], eax
mov dword [ebp - 0x208], eax
mov dword [ebp - 0x204], eax
mov dword [ebp - 0x200], eax
mov dword [ebp - 0x1fc], eax
mov eax, dword [esi + 0x30]
lea ecx, [esi + 0x34]
push ecx
lea edx, [ebp - 0x24]
mov dword [ebp - 0x204], edx
lea ecx, [ebp - 0x214]
mov dword [ebp - 0x214], 0x1c
mov dword [ebp - 0x210], ebx
mov dword [ebp - 0x208], ebx
mov dword [ebp - 0x200], ebx
mov dword [ebp - 0x1fc], ebx
mov edx, dword [eax]
mov edx, dword [edx + 0xc]
push ecx
push eax
call edx
push 0x5a
push str......._source_audiowin32AudioInputImpl_WIN32.cpp
push 1
push 0x1c
call sub.MSVCR100.dll_void____cdecl_operator_new_unsigned_int__int__char_const___int_
mov edi, eax
add esp, 0x10
mov dword [ebp - 0x1f0], edi
mov byte [ebp - 4], 0xd
cmp edi, ebx
je 0x50165e
mov ecx, edi
call fcn.0043a920
mov dword [edi], vtable.audio::RecordInfo.0
mov dword [edi + 8], 0xffffffff
mov dword [edi + 0xc], ebx
mov dword [edi + 0x10], ebx
mov dword [edi + 0x14], ebx
mov dword [edi + 0x18], ebx
inc dword [edi + 4]
mov dword [ebp - 0x1f0], edi
mov byte [ebp - 4], 0xe
cmp edi, ebx
je 0x5015e5
inc dword [edi + 4]
mov ecx, dword [esi + 0x2c]
cmp ecx, ebx
je 0x5015f9
dec dword [ecx + 4]
jne 0x5015f9
mov eax, dword [ecx]
mov edx, dword [eax]
push 1
call edx
mov dword [esi + 0x2c], edi
mov byte [ebp - 4], 6
cmp edi, ebx
je 0x501613
dec dword [edi + 4]
jne 0x501613
mov eax, dword [edi]
mov edx, dword [eax]
push 1
mov ecx, edi
call edx
lea ecx, [esi + 0x3c]
call fcn.0043b030
push 0x60
push str......._source_audiowin32AudioInputImpl_WIN32.cpp
push 1
push 0x14
call sub.MSVCR100.dll_void____cdecl_operator_new_unsigned_int__int__char_const___int_
mov edi, eax
add esp, 0x10
mov dword [ebp - 0x1f4], edi
mov byte [ebp - 4], 0xf
cmp edi, ebx
je 0x50168f
push 0xc
call fcn.004fff18
add esp, 4
cmp eax, ebx
je 0x501665
mov dword [eax], vtable.._AV__Func1_XP8AudioInputImpl_audio__AEXXZPAV12__lang__.0
mov dword [eax + 4], 0x5010b0
mov dword [eax + 8], esi
jmp 0x501667
xor edi, edi
jmp 0x5015d4
xor eax, eax
mov dword [ebp - 0x1f0], eax
push 1
lea eax, [ebp - 0x1f0]
push eax
mov ecx, edi
mov byte [ebp - 4], 0x10
mov dword [ebp - 0x1f8], 1
call fcn.0043a940
mov edi, eax
jmp 0x501691
xor edi, edi
cmp edi, ebx
je 0x501698
inc dword [edi + 4]
mov dword [ebp - 0x1f4], edi
mov dword [ebp - 4], 0x12
cmp edi, ebx
je 0x5016ac
inc dword [edi + 4]
mov ecx, dword [esi + 0x38]
cmp ecx, ebx
je 0x5016c0
dec dword [ecx + 4]
jne 0x5016c0
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
call eax
mov dword [esi + 0x38], edi
mov byte [ebp - 4], 0x11
cmp edi, ebx
je 0x5016da
dec dword [edi + 4]
jne 0x5016da
mov edx, dword [edi]
mov eax, dword [edx]
push 1
mov ecx, edi
call eax
test byte [ebp - 0x1f8], 1
mov dword [ebp - 4], 6
je 0x5016fd
mov ecx, dword [ebp - 0x1f0]
cmp ecx, ebx
je 0x5016fd
mov edx, dword [ecx]
mov eax, dword [edx + 8]
push 1
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004ffd1c
mov esp, ebp
pop ebp
ret 4
push 0x37
push str.Unsupported_count_of_channels_while_creating_AudioInput
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], 0xf
call fcn.00439740
lea ecx, [ebp - 0x3c]
push ecx
lea ecx, [ebp - 0x1ec]
mov byte [ebp - 4], 7
call fcn.00438880
sub esp, 0x1b0
mov byte [ebp - 4], 8
mov dword [ebp - 0x1f4], esp
jmp 0x5013f7