Function at 0x40a720
Capabilities:
Capture microphone audio
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x10
push ebp
push esi
mov esi, ecx
xor ebp, ebp
cmp byte [esi + 0x34], 0
mov dword [esp + 8], ebp
je 0x40ab0b
cmp byte [esi + 0x78], 0
push ebx
push edi
je 0x40a8b7
mov eax, dword [0x45c5d4]
push ebp
push eax
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
test eax, eax
jne 0x40a8b7
mov ebx, dword [esi + 0x3c]
lea ecx, [esi + 0x4c]
mov dword [esp + 0x14], ebp
call fcn.004016d0
mov ecx, dword [0x45c5d4]
mov ebp, dword [eax]
push ecx
mov dword [esp + 0x1c], ebp
call dword [sym.imp.KERNEL32.DLL_ResetEvent]
test byte [ebp + 0x10], 1
je 0x40a8b3
mov edx, dword [esi + 0x40]
push 0x20
push ebp
push edx
call dword [sym.imp.WINMM.DLL_waveInUnprepareHeader]
mov eax, dword [esi + 0x5c]
test eax, eax
je 0x40a7bb
mov edx, dword [esi + 0x54]
inc dword [esi + 0x58]
add edx, edx
add edx, edx
cmp edx, dword [esi + 0x58]
ja 0x40a7ae
mov dword [esi + 0x58], 0
dec eax
mov dword [esi + 0x5c], eax
jne 0x40a7bb
mov dword [esi + 0x58], 0
mov eax, dword [0x45c5c4]
cmp byte [eax + 8], 0
je 0x40a80c
mov edx, dword [esi + 0x48]
mov eax, dword [ebp]
push 0x1ec
lea ecx, [ebx + 9]
push ecx
push edx
push eax
mov eax, dword [esi + 0x38]
push eax
call fcn.00411aa0
add esp, 0x14
cmp eax, 2
jle 0x40a80c
add eax, 9
mov word [ebx], 0x9f8
mov word [ebx + 2], ax
mov ecx, dword [0x45c5c4]
mov dl, byte [ecx + 0xc]
mov byte [ebx + 4], dl
mov ecx, dword [esi + 0x74]
mov dword [ebx + 5], ecx
add ebx, eax
inc dword [esp + 0x14]
inc dword [esi + 0x74]
push 0x20
mov dword [ebp + 0x10], 0
mov edx, dword [esi + 0x40]
push ebp
push edx
call dword [sym.imp.WINMM.DLL_waveInPrepareHeader]
mov eax, dword [esi + 0x40]
push 0x20
push ebp
push eax
call dword [sym.imp.WINMM.DLL_waveInAddBuffer]
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esi + 0x4c]
call fcn.00409db0
mov ebp, dword [esi + 0x58]
mov edx, dword [esi + 0x5c]
add edx, ebp
cmp ebp, edx
jbe 0x40a84f
call dword [sym.imp.MSVCR80.DLL__invalid_parameter_noinfo]
mov edx, dword [esi + 0x5c]
add edx, dword [esi + 0x58]
mov eax, ebp
mov ecx, ebp
shr eax, 2
and ecx, 3
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ecx
cmp ebp, edx
jb 0x40a875
call dword [sym.imp.MSVCR80.DLL__invalid_parameter_noinfo]
mov eax, dword [esp + 0x18]
mov ecx, dword [esi + 0x54]
cmp ecx, eax
ja 0x40a87e
sub eax, ecx
mov ecx, dword [esi + 0x50]
mov edx, dword [ecx + eax*4]
mov eax, dword [esp + 0x1c]
mov ebp, dword [edx + eax*4]
test byte [ebp + 0x10], 1
mov dword [esp + 0x18], ebp
jne 0x40a784
cmp dword [esp + 0x14], 0
je 0x40a8b3
mov eax, dword [esi + 0x3c]
mov ecx, dword [esp + 0x24]
sub ebx, eax
mov dword [esp + 0x10], eax
mov dword [ecx], ebx
mov ebp, eax
jmp 0x40a8b7
mov ebp, dword [esp + 0x10]
cmp byte [esi + 0xc4], 0
je 0x40aaff
mov edx, dword [0x45c5d0]
push 0
push edx
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
test eax, eax
jne 0x40a9c2
mov eax, dword [0x45c5d0]
push eax
call dword [sym.imp.KERNEL32.DLL_ResetEvent]
cmp dword [esi + 0xa8], 0
je 0x40a9c2
jmp 0x40a900
mov ebx, dword [esi + 0xa4]
mov ecx, dword [esi + 0xa8]
add ecx, ebx
cmp ebx, ecx
jbe 0x40a918
call dword [sym.imp.MSVCR80.DLL__invalid_parameter_noinfo]
mov edx, dword [esi + 0xa8]
add edx, dword [esi + 0xa4]
mov edi, ebx
mov ebp, ebx
shr edi, 2
and ebp, 3
cmp ebx, edx
jb 0x40a938
call dword [sym.imp.MSVCR80.DLL__invalid_parameter_noinfo]
mov eax, dword [esi + 0xa0]
cmp eax, edi
ja 0x40a944
sub edi, eax
mov eax, dword [esi + 0x9c]
mov ecx, dword [eax + edi*4]
mov ebp, dword [ecx + ebp*4]
test byte [ebp + 0x10], 1
mov dword [esp + 0x24], ebp
je 0x40a9be
mov eax, dword [esi + 0xa8]
xor edi, edi
cmp eax, edi
je 0x40a995
mov edx, dword [esi + 0xa0]
inc dword [esi + 0xa4]
add edx, edx
add edx, edx
cmp edx, dword [esi + 0xa4]
ja 0x40a984
mov dword [esi + 0xa4], edi
dec eax
mov dword [esi + 0xa8], eax
cmp eax, edi
jne 0x40a995
mov dword [esi + 0xa4], edi
mov eax, dword [esi + 0x7c]
push 0x20
push ebp
push eax
call dword [sym.imp.WINMM.DLL_waveOutUnprepareHeader]
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esi + 0xac]
call fcn.00409db0
cmp dword [esi + 0xa8], edi
jne 0x40a900
mov ebp, dword [esp + 0x10]
cmp byte [esi + 0xc4], 0
je 0x40aaff
mov edx, dword [esi + 0x80]
push 0
push edx
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
test eax, eax
jne 0x40aaff
cmp dword [esi + 0xbc], eax
je 0x40aa90
lea ecx, [esi + 0xac]
call fcn.004016d0
mov ebx, dword [eax]
lea ecx, [esi + 0xac]
mov dword [esp + 0x24], ebx
call fcn.004094c0
mov eax, dword [esi + 0x8c]
mov ecx, dword [ebx]
push eax
push 0
push ecx
call sub.MSVCR80.DLL_memset
add esp, 0xc
xor edi, edi
mov ecx, dword [esi + edi*4]
test ecx, ecx
je 0x40aa59
mov edx, dword [esi + 0x90]
mov eax, dword [esi + 0xc0]
push edx
push eax
call fcn.00409790
test al, al
je 0x40aa59
mov ecx, dword [esi + 0x90]
mov edx, dword [esi + 0xc0]
mov eax, dword [ebx]
push ecx
push edx
push eax
call dword [0x45c5d8]
inc edi
cmp edi, 0xc
jle 0x40aa24
push 0x20
mov dword [ebx + 0x10], 0
mov ecx, dword [esi + 0x7c]
push ebx
push ecx
call dword [sym.imp.WINMM.DLL_waveOutPrepareHeader]
mov edx, dword [esi + 0x7c]
push 0x20
push ebx
push edx
call dword [sym.imp.WINMM.DLL_waveOutWrite]
lea eax, [esp + 0x24]
lea ecx, [esi + 0x98]
push eax
call fcn.00409db0
mov ecx, dword [esi + 0x84]
mov edx, dword [esi + 0x88]
push 0
lea eax, [esi + 0x84]
push 0
push 0
add ecx, 0x124f80
push 0
mov dword [eax], ecx
mov ecx, dword [esi + 0x80]
push eax
adc edx, 0
push ecx
mov dword [esi + 0x88], edx
call dword [sym.imp.KERNEL32.DLL_SetWaitableTimer]
mov eax, dword [0x45c5c4]
add eax, 0xe
cmp byte [eax], 0
je 0x40aaff
xor dl, dl
xchg byte [eax], dl
movsx ax, dl
shl ax, 8
mov ecx, 0xff
or ax, cx
movzx eax, ax
mov edx, eax
shl edx, 0x10
or edx, eax
mov eax, dword [esi + 0x7c]
push edx
push eax
call dword [sym.imp.WINMM.DLL_waveOutSetVolume]
pop edi
pop ebx
pop esi
mov eax, ebp
pop ebp
add esp, 0x10
ret 4
pop esi
mov eax, ebp
pop ebp
add esp, 0x10
ret 4