Function at 0x40a140
Capabilities:
Capture microphone audio

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov ebx, ecx
push edi
mov edi, dword [ebp + 8]
lea eax, [ebx + 0x32]
cmp edi, eax
je 0x40a15c
lea ecx, [ebx + 0x52]
cmp edi, ecx
jne 0x40a166
xor esi, esi
cmp dword [0x41f600], esi
je 0x40a17d
push 0xcd
push 1
mov ecx, ebx
call fcn.00406580
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp dword [ebx + 0x8c], esi
je 0x40a47b
test byte [edi + 0x10], 1
mov dword [0x41f600], 1
je 0x40a421
mov eax, dword [edi + 8]
xor edx, edx
mov dword [ebp - 4], esi
movzx esi, word [ebx + 0x2c]
div esi
movzx edi, word [ebx + 0x22]
xor ecx, ecx
mov dword [ebp - 8], eax
mov eax, esi
cdq
idiv edi
xor edx, edx
cmp eax, 1
setg dl
xor eax, eax
cmp edi, 2
sete al
mov esi, edx
test esi, esi
jne 0x40a2fd
test eax, eax
jne 0x40a280
cmp dword [ebp - 8], ecx
jle 0x40a219
mov eax, dword [ebp + 8]
mov edi, dword [eax]
movzx eax, byte [edi + esi]
cmp eax, 0x80
jl 0x40a1f5
lea edx, [eax - 0x80]
jmp 0x40a1fc
mov edx, 0x80
sub edx, eax
cmp ecx, edx
jg 0x40a213
cmp eax, 0x80
jl 0x40a20c
lea ecx, [eax - 0x80]
jmp 0x40a213
mov ecx, 0x80
sub ecx, eax
inc esi
cmp esi, dword [ebp - 8]
jl 0x40a1e5
mov dword [ebp - 4], ecx
mov esi, dword [sym.imp.KERNEL32.dll_MulDiv]
push 0x80
push 0x64
push ecx
call esi
mov ecx, dword [ebp - 4]
push 0x80
push 0x64
mov edi, eax
push ecx
call esi
mov edx, dword [ebx + 0x74]
mov dword [ebp - 4], eax
test edx, edx
je 0x40a39c
mov ecx, dword [ebp + 8]
mov eax, dword [ebx + 0x78]
mov ecx, dword [ecx + 8]
lea esi, [eax + ecx]
cmp esi, edx
ja 0x40a37e
mov esi, dword [ebp + 8]
mov edx, dword [esi]
push ecx
mov ecx, dword [ebx + 0x84]
push edx
add ecx, eax
push ecx
call fcn.0040bc90
mov edx, dword [esi + 8]
add esp, 0xc
add dword [ebx + 0x78], edx
jmp 0x40a39c
mov eax, dword [ebp - 8]
test eax, eax
jle 0x40a21c
mov edx, dword [ebp + 8]
mov esi, dword [edx]
mov edi, eax
mov edi, edi
movzx eax, byte [esi]
cmp eax, 0x80
jl 0x40a29f
lea edx, [eax - 0x80]
jmp 0x40a2a6
mov edx, 0x80
sub edx, eax
cmp ecx, edx
jg 0x40a2bd
cmp eax, 0x80
jl 0x40a2b6
lea ecx, [eax - 0x80]
jmp 0x40a2bd
mov ecx, 0x80
sub ecx, eax
movzx eax, byte [esi + 1]
cmp eax, 0x80
jl 0x40a2cd
lea edx, [eax - 0x80]
jmp 0x40a2d4
mov edx, 0x80
sub edx, eax
cmp dword [ebp - 4], edx
jg 0x40a2f2
cmp eax, 0x80
jl 0x40a2e8
add eax, 0xffffff80
mov dword [ebp - 4], eax
jmp 0x40a2f2
mov edx, 0x80
sub edx, eax
mov dword [ebp - 4], edx
add esi, 2
dec edi
jne 0x40a290
jmp 0x40a21c
test eax, eax
jne 0x40a329
mov edi, dword [ebp - 8]
test edi, edi
jle 0x40a324
mov eax, dword [ebp + 8]
mov esi, dword [eax]
lea ecx, [ecx]
movsx eax, word [esi]
cdq
xor eax, edx
sub eax, edx
cmp ecx, eax
jg 0x40a31e
mov ecx, eax
add esi, 2
dec edi
jne 0x40a310
mov dword [ebp - 4], ecx
jmp 0x40a35c
mov eax, dword [ebp - 8]
test eax, eax
jle 0x40a35c
mov edx, dword [ebp + 8]
mov esi, dword [edx]
mov edi, eax
movsx eax, word [esi]
cdq
xor eax, edx
sub eax, edx
cmp ecx, eax
jg 0x40a345
mov ecx, eax
movsx eax, word [esi + 2]
cdq
xor eax, edx
sub eax, edx
cmp dword [ebp - 4], eax
jg 0x40a356
mov dword [ebp - 4], eax
add esi, 4
dec edi
jne 0x40a337
mov esi, dword [sym.imp.KERNEL32.dll_MulDiv]
push 0x8000
push 0x64
push ecx
call esi
push 0x8000
mov edi, eax
mov eax, dword [ebp - 4]
push 0x64
push eax
jmp 0x40a239
mov ecx, dword [ebx + 0x7c]
mov edx, dword [ebx + 0x88]
push ecx
push eax
push 0x14e7
push edx
call dword [sym.imp.USER32.dll_PostMessageA]
mov dword [ebx + 0x74], 0
movzx eax, word [ebx + 0x94]
cmp eax, edi
jne 0x40a3c2
movzx ecx, word [ebx + 0x96]
cmp ecx, dword [ebp - 4]
jne 0x40a3c2
cmp dword [ebx + 0x7c], 0
jne 0x40a3c2
cmp dword [ebx + 0x90], 0
jne 0x40a41c
mov dx, word [ebp - 4]
push ebx
push 0x24f0
mov word [ebx + 0x94], di
mov word [ebx + 0x96], dx
mov dword [ebx + 0x90], 1
call fcn.004031b0
mov eax, dword [ebx + 0x88]
add esp, 8
test eax, eax
je 0x40a41c
movzx ecx, byte [ebx + 0x96]
shl cx, 8
movzx edx, cx
movzx ecx, byte [ebx + 0x94]
push 0
or edx, ecx
push edx
push 0x14e6
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
mov edi, dword [ebp + 8]
xor esi, esi
mov edx, dword [ebx + 0x14]
push 0x20
push edi
push edx
call dword [sym.imp.WINMM.dll_waveInUnprepareHeader]
cmp eax, esi
je 0x40a439
push 0x128
jmp 0x40a46d
push 0x20
mov dword [edi + 0x10], esi
mov dword [edi + 8], esi
mov eax, dword [ebx + 0x14]
push edi
push eax
call dword [sym.imp.WINMM.dll_waveInPrepareHeader]
cmp eax, esi
je 0x40a457
push 0x131
jmp 0x40a46d
mov ecx, dword [ebx + 0x14]
push 0x20
push edi
push ecx
call dword [sym.imp.WINMM.dll_waveInAddBuffer]
cmp eax, esi
je 0x40a475
push 0x138
push eax
mov ecx, ebx
call fcn.00406580
mov dword [0x41f600], esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4