Function at 0x40aae0
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 0x40aecb
cmp byte [esi + 0x78], 0
push ebx
push edi
je 0x40ac77
mov eax, dword [0x45357c]
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x40ac77
mov ebx, dword [esi + 0x3c]
lea ecx, [esi + 0x4c]
mov dword [esp + 0x14], ebp
call fcn.00409860
mov ecx, dword [0x45357c]
mov ebp, dword [eax]
push ecx
mov dword [esp + 0x1c], ebp
call dword [sym.imp.KERNEL32.dll_ResetEvent]
test byte [ebp + 0x10], 1
je 0x40ac73
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 0x40ab7b
mov edx, dword [esi + 0x54]
inc dword [esi + 0x58]
add edx, edx
add edx, edx
cmp edx, dword [esi + 0x58]
ja 0x40ab6e
mov dword [esi + 0x58], 0
dec eax
mov dword [esi + 0x5c], eax
jne 0x40ab7b
mov dword [esi + 0x58], 0
mov eax, dword [0x45356c]
cmp byte [eax + 8], 0
je 0x40abcc
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.0041beb4
add esp, 0x14
cmp eax, 2
jle 0x40abcc
add eax, 9
mov word [ebx], 0x9f8
mov word [ebx + 2], ax
mov ecx, dword [0x45356c]
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.0040a170
mov ebp, dword [esi + 0x58]
mov edx, dword [esi + 0x5c]
add edx, ebp
cmp ebp, edx
jbe 0x40ac0f
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 0x40ac35
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov eax, dword [esp + 0x18]
mov ecx, dword [esi + 0x54]
cmp ecx, eax
ja 0x40ac3e
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 0x40ab44
cmp dword [esp + 0x14], 0
je 0x40ac73
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 0x40ac77
mov ebp, dword [esp + 0x10]
cmp byte [esi + 0xc4], 0
je 0x40aebf
mov edx, dword [0x453578]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x40ad82
mov eax, dword [0x453578]
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
cmp dword [esi + 0xa8], 0
je 0x40ad82
jmp 0x40acc0
mov ebx, dword [esi + 0xa4]
mov ecx, dword [esi + 0xa8]
add ecx, ebx
cmp ebx, ecx
jbe 0x40acd8
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 0x40acf8
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov eax, dword [esi + 0xa0]
cmp eax, edi
ja 0x40ad04
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 0x40ad7e
mov eax, dword [esi + 0xa8]
xor edi, edi
cmp eax, edi
je 0x40ad55
mov edx, dword [esi + 0xa0]
inc dword [esi + 0xa4]
add edx, edx
add edx, edx
cmp edx, dword [esi + 0xa4]
ja 0x40ad44
mov dword [esi + 0xa4], edi
dec eax
mov dword [esi + 0xa8], eax
cmp eax, edi
jne 0x40ad55
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.0040a170
cmp dword [esi + 0xa8], edi
jne 0x40acc0
mov ebp, dword [esp + 0x10]
cmp byte [esi + 0xc4], 0
je 0x40aebf
mov edx, dword [esi + 0x80]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x40aebf
cmp dword [esi + 0xbc], eax
je 0x40ae50
lea ecx, [esi + 0xac]
call fcn.00409860
mov ebx, dword [eax]
lea ecx, [esi + 0xac]
mov dword [esp + 0x24], ebx
call fcn.004097b0
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 0x40ae19
mov edx, dword [esi + 0x90]
mov eax, dword [esi + 0xc0]
push edx
push eax
call fcn.00409b50
test al, al
je 0x40ae19
mov ecx, dword [esi + 0x90]
mov edx, dword [esi + 0xc0]
mov eax, dword [ebx]
push ecx
push edx
push eax
call dword [0x453580]
inc edi
cmp edi, 0xc
jle 0x40ade4
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.0040a170
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 [0x45356c]
add eax, 0xe
cmp byte [eax], 0
je 0x40aebf
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