Function at 0x40a010
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 0x40a1cc
mov eax, dword [0x45c5d4]
push eax
mov byte [esi + 0x34], 1
call dword [sym.imp.KERNEL32.DLL_ResetEvent]
cmp dword [esi + 0x70], edi
je 0x40a14f
mov ebp, dword [esi + 0x6c]
mov ecx, dword [esi + 0x70]
add ecx, ebp
cmp ebp, ecx
jbe 0x40a057
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 0x40a079
call dword [sym.imp.MSVCR80.DLL__invalid_parameter_noinfo]
mov eax, dword [esp + 0x14]
mov ecx, dword [esi + 0x68]
cmp ecx, ebx
ja 0x40a082
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 0x40a0b5
mov ebp, dword [esi + 0x68]
inc dword [esi + 0x6c]
add ebp, ebp
add ebp, ebp
cmp ebp, dword [esi + 0x6c]
ja 0x40a0aa
mov dword [esi + 0x6c], edx
dec eax
mov dword [esi + 0x70], eax
cmp eax, edx
jne 0x40a0b5
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 0x40a0f4
add eax, 4
shr eax, 2
cmp dword [esi + 0x54], eax
ja 0x40a0f4
push 1
lea ecx, [esi + 0x4c]
call fcn.004094f0
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 0x40a108
sub ebp, eax
mov eax, dword [esi + 0x50]
cmp dword [eax + ebp*4], edi
jne 0x40a120
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 0x40a136
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 0x40a045
mov edi, dword [esp + 0x10]
cmp edi, 3
jge 0x40a1c2
mov ebx, 3
sub ebx, edi
jmp 0x40a160
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.00409db0
dec ebx
jne 0x40a160
mov ecx, dword [esi + 0x40]
push ecx
call dword [sym.imp.WINMM.DLL_waveInStart]
cmp byte [esi + 0xc4], 0
je 0x40a4c3
mov edx, dword [0x45c5d0]
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 0x40a36b
nop
mov ebp, dword [esi + 0xb8]
mov eax, dword [esi + 0xbc]
add eax, ebp
cmp ebp, eax
jbe 0x40a218
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 0x40a240
call dword [sym.imp.MSVCR80.DLL__invalid_parameter_noinfo]
mov eax, dword [esp + 0x14]
mov ecx, dword [esi + 0xb4]
cmp ecx, ebx
ja 0x40a24c
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 0x40a297
mov edx, dword [esi + 0xb4]
inc dword [esi + 0xb8]
add edx, edx
add edx, edx
cmp edx, dword [esi + 0xb8]
ja 0x40a286
mov dword [esi + 0xb8], ebp
dec eax
mov dword [esi + 0xbc], eax
cmp eax, ebp
jne 0x40a297
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 0x40a2f5
add eax, 4
shr eax, 2
cmp dword [esi + 0xa0], eax
ja 0x40a2f5
push 1
lea ecx, [esi + 0x98]
call fcn.004094f0
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 0x40a312
sub ebp, eax
mov edx, dword [esi + 0x9c]
cmp dword [edx + ebp*4], 0
jne 0x40a331
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 0x40a34a
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 0x40a36b
cmp dword [esi + 0xbc], 0
jne 0x40a200
mov ecx, dword [esp + 0x10]
cmp ecx, 3
jge 0x40a488
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 0x40a41a
add eax, 4
shr eax, 2
cmp dword [esi + 0xa0], eax
ja 0x40a41a
push 1
lea ecx, [esi + 0x98]
call fcn.004094f0
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 0x40a43b
sub ebx, ecx
mov edx, dword [esi + 0x9c]
cmp dword [edx + ebx*4], 0
jne 0x40a45e
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 0x40a473
mov dword [eax], edi
mov eax, 1
add dword [esi + 0xa8], eax
sub dword [esp + 0x10], eax
jne 0x40a383
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