Function at 0x40a490
Capabilities:
Capture microphone audio

Disassembly:
sub esp, 8
push ebx
push ebp
push esi
mov esi, ecx
push edi
xor edi, edi
cmp byte [esi + 0x78], 0
mov dword [esi + 0x74], edi
mov dword [esp + 0x10], edi
je 0x40a64c
mov eax, dword [0x454574]
push eax
mov byte [esi + 0x34], 1
call dword [sym.imp.KERNEL32.dll_ResetEvent]
cmp dword [esi + 0x70], edi
je 0x40a5cf
mov ebp, dword [esi + 0x6c]
mov ecx, dword [esi + 0x70]
add ecx, ebp
cmp ebp, ecx
jbe 0x40a4d7
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov edx, dword [esi + 0x70]
add edx, dword [esi + 0x6c]
mov ebx, ebp
mov eax, ebp
and eax, 3
shr ebx, 2
mov dword [esp + 0x14], eax
cmp ebp, edx
jb 0x40a4f9
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov eax, dword [esp + 0x14]
mov ecx, dword [esi + 0x68]
cmp ecx, ebx
ja 0x40a502
sub ebx, ecx
mov ecx, dword [esi + 0x64]
mov edx, dword [ecx + ebx*4]
mov ebx, dword [edx + eax*4]
mov eax, dword [esi + 0x70]
xor edx, edx
mov dword [esp + 0x14], ebx
cmp eax, edx
je 0x40a535
mov ebp, dword [esi + 0x68]
inc dword [esi + 0x6c]
add ebp, ebp
add ebp, ebp
cmp ebp, dword [esi + 0x6c]
ja 0x40a52a
mov dword [esi + 0x6c], edx
dec eax
mov dword [esi + 0x70], eax
cmp eax, edx
jne 0x40a535
mov dword [esi + 0x6c], edx
push 0x20
mov dword [ebx + 0x10], edx
mov eax, dword [esi + 0x40]
push ebx
push eax
call dword [sym.imp.WINMM.dll_waveInPrepareHeader]
mov ecx, dword [esi + 0x40]
push 0x20
push ebx
push ecx
call dword [sym.imp.WINMM.dll_waveInAddBuffer]
mov eax, dword [esi + 0x5c]
mov edx, dword [esi + 0x58]
add edx, eax
test dl, 3
jne 0x40a574
add eax, 4
shr eax, 2
cmp dword [esi + 0x54], eax
ja 0x40a574
push 1
lea ecx, [esi + 0x4c]
call fcn.00409970
mov ebx, dword [esi + 0x5c]
add ebx, dword [esi + 0x58]
mov eax, dword [esi + 0x54]
mov ebp, ebx
shr ebp, 2
cmp eax, ebp
ja 0x40a588
sub ebp, eax
mov eax, dword [esi + 0x50]
cmp dword [eax + ebp*4], edi
jne 0x40a5a0
push 0x10
call sub.MSVCR80.dll_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [esi + 0x50]
add esp, 4
mov dword [ecx + ebp*4], eax
mov edx, dword [esi + 0x50]
mov eax, dword [edx + ebp*4]
and ebx, 3
lea ebx, [eax + ebx*4]
test ebx, ebx
je 0x40a5b6
mov ecx, dword [esp + 0x14]
mov dword [ebx], ecx
mov eax, 1
add dword [esi + 0x5c], eax
add dword [esp + 0x10], eax
cmp dword [esi + 0x70], edi
jne 0x40a4c5
mov edi, dword [esp + 0x10]
cmp edi, 3
jge 0x40a642
mov ebx, 3
sub ebx, edi
jmp 0x40a5e0
mov ebp, dword [sym.imp.MSVCR80.dll_malloc]
push 0x20
call ebp
mov edi, eax
pxor xmm0, xmm0
movq qword [edi], xmm0
movq qword [edi + 8], xmm0
movq qword [edi + 0x10], xmm0
movq qword [edi + 0x18], xmm0
mov edx, dword [esi + 0x44]
push edx
mov dword [esp + 0x1c], edi
call ebp
add esp, 8
mov dword [edi], eax
mov eax, dword [esi + 0x44]
push 0x20
mov dword [edi + 4], eax
mov ecx, dword [esi + 0x40]
push edi
push ecx
call dword [sym.imp.WINMM.dll_waveInPrepareHeader]
mov edx, dword [esi + 0x40]
push 0x20
push edi
push edx
call dword [sym.imp.WINMM.dll_waveInAddBuffer]
lea eax, [esp + 0x14]
push eax
lea ecx, [esi + 0x4c]
call fcn.0040a230
dec ebx
jne 0x40a5e0
mov ecx, dword [esi + 0x40]
push ecx
call dword [sym.imp.WINMM.dll_waveInStart]
cmp byte [esi + 0xc4], 0
je 0x40a943
mov edx, dword [0x454570]
push edx
mov dword [esp + 0x14], 0
mov byte [esi + 0x34], 1
call dword [sym.imp.KERNEL32.dll_ResetEvent]
cmp dword [esi + 0xbc], 0
je 0x40a7eb
nop
mov ebp, dword [esi + 0xb8]
mov eax, dword [esi + 0xbc]
add eax, ebp
cmp ebp, eax
jbe 0x40a698
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov edx, dword [esi + 0xbc]
add edx, dword [esi + 0xb8]
mov ebx, ebp
mov eax, ebp
and eax, 3
shr ebx, 2
mov dword [esp + 0x14], eax
cmp ebp, edx
jb 0x40a6c0
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov eax, dword [esp + 0x14]
mov ecx, dword [esi + 0xb4]
cmp ecx, ebx
ja 0x40a6cc
sub ebx, ecx
mov ecx, dword [esi + 0xb0]
mov edx, dword [ecx + ebx*4]
mov ebx, dword [edx + eax*4]
mov eax, dword [esi + 0xbc]
xor ebp, ebp
mov dword [esp + 0x14], ebx
cmp eax, ebp
je 0x40a717
mov edx, dword [esi + 0xb4]
inc dword [esi + 0xb8]
add edx, edx
add edx, edx
cmp edx, dword [esi + 0xb8]
ja 0x40a706
mov dword [esi + 0xb8], ebp
dec eax
mov dword [esi + 0xbc], eax
cmp eax, ebp
jne 0x40a717
mov dword [esi + 0xb8], ebp
mov eax, dword [esi + 0x8c]
mov ecx, dword [ebx]
push eax
push ebp
push ecx
call sub.MSVCR80.dll_memset
add esp, 0xc
push 0x20
mov dword [ebx + 0x10], ebp
mov edx, dword [esi + 0x7c]
push ebx
push edx
call dword [sym.imp.WINMM.dll_waveOutPrepareHeader]
mov eax, dword [esi + 0x7c]
push 0x20
push ebx
push eax
call dword [sym.imp.WINMM.dll_waveOutWrite]
mov eax, dword [esi + 0xa8]
mov ecx, dword [esi + 0xa4]
add ecx, eax
test cl, 3
jne 0x40a775
add eax, 4
shr eax, 2
cmp dword [esi + 0xa0], eax
ja 0x40a775
push 1
lea ecx, [esi + 0x98]
call fcn.00409970
mov ebx, dword [esi + 0xa8]
add ebx, dword [esi + 0xa4]
mov eax, dword [esi + 0xa0]
mov ebp, ebx
shr ebp, 2
cmp eax, ebp
ja 0x40a792
sub ebp, eax
mov edx, dword [esi + 0x9c]
cmp dword [edx + ebp*4], 0
jne 0x40a7b1
push 0x10
call sub.MSVCR80.dll_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [esi + 0x9c]
add esp, 4
mov dword [ecx + ebp*4], eax
mov edx, dword [esi + 0x9c]
mov eax, dword [edx + ebp*4]
and ebx, 3
lea ebx, [eax + ebx*4]
test ebx, ebx
je 0x40a7ca
mov ecx, dword [esp + 0x14]
mov dword [ebx], ecx
mov eax, dword [esp + 0x10]
inc dword [esi + 0xa8]
inc eax
mov dword [esp + 0x10], eax
cmp eax, 3
jge 0x40a7eb
cmp dword [esi + 0xbc], 0
jne 0x40a680
mov ecx, dword [esp + 0x10]
cmp ecx, 3
jge 0x40a908
mov eax, 3
sub eax, ecx
mov dword [esp + 0x10], eax
push 0x20
call dword [sym.imp.MSVCR80.dll_malloc]
mov edi, eax
pxor xmm0, xmm0
movq qword [edi], xmm0
movq qword [edi + 8], xmm0
movq qword [edi + 0x10], xmm0
movq qword [edi + 0x18], xmm0
mov ebx, dword [esi + 0x8c]
push 0x20
push ebx
call dword [sym.imp.MSVCR80.dll__aligned_malloc]
push ebx
push 0
push eax
mov dword [esp + 0x2c], eax
call sub.MSVCR80.dll_memset
mov edx, dword [esp + 0x2c]
add esp, 0x18
mov dword [edi], edx
mov eax, dword [esi + 0x8c]
push 0x20
mov dword [edi + 4], eax
mov ecx, dword [esi + 0x7c]
push edi
push ecx
call dword [sym.imp.WINMM.dll_waveOutPrepareHeader]
mov edx, dword [esi + 0x7c]
push 0x20
push edi
push edx
call dword [sym.imp.WINMM.dll_waveOutWrite]
mov eax, dword [esi + 0xa8]
mov ecx, dword [esi + 0xa4]
add ecx, eax
test cl, 3
jne 0x40a89a
add eax, 4
shr eax, 2
cmp dword [esi + 0xa0], eax
ja 0x40a89a
push 1
lea ecx, [esi + 0x98]
call fcn.00409970
mov eax, dword [esi + 0xa8]
add eax, dword [esi + 0xa4]
mov ecx, dword [esi + 0xa0]
mov ebx, eax
shr ebx, 2
mov dword [esp + 0x14], eax
cmp ecx, ebx
ja 0x40a8bb
sub ebx, ecx
mov edx, dword [esi + 0x9c]
cmp dword [edx + ebx*4], 0
jne 0x40a8de
push 0x10
call sub.MSVCR80.dll_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [esi + 0x9c]
mov dword [ecx + ebx*4], eax
mov eax, dword [esp + 0x18]
add esp, 4
mov edx, dword [esi + 0x9c]
mov ecx, dword [edx + ebx*4]
and eax, 3
lea eax, [ecx + eax*4]
test eax, eax
je 0x40a8f3
mov dword [eax], edi
mov eax, 1
add dword [esi + 0xa8], eax
sub dword [esp + 0x10], eax
jne 0x40a803
lea edi, [esi + 0x84]
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov eax, dword [edi]
mov ecx, dword [esi + 0x88]
mov edx, dword [esi + 0x80]
push 0
push 0
push 0
push 0
add eax, 0x249f00
push edi
adc ecx, 0
push edx
mov dword [edi], eax
mov dword [esi + 0x88], ecx
call dword [sym.imp.KERNEL32.dll_SetWaitableTimer]
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret