Function at 0x858a08
Capabilities:
Capture microphone audio

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x8c9268
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x368
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], ebx
mov al, byte [ecx + 0x14c]
mov dl, byte [ebp + 8]
mov dword [ebp - 0x14], ecx
test al, al
je 0x859002
test dl, dl
je 0x858f24
mov eax, dword [ecx]
call dword [eax + 0x14]
movzx eax, al
test eax, eax
je 0x858a6f
mov ebx, dword [ebp - 0x1c]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x14]
movzx ecx, word [edi + 0x194]
mov edx, dword [edi + 0x140]
mov eax, 1
mov word [edi + 0x118], ax
mov word [edi + 0x11a], cx
mov dword [edi + 0x11c], edx
add edx, edx
imul edx, ecx
add ecx, ecx
mov word [edi + 0x124], cx
mov dword [edi + 0x120], edx
mov ebx, 0x10
mov word [edi + 0x126], bx
mov esi, 0x12
mov word [edi + 0x128], si
xor edx, edx
push edx
push edx
push eax
push edx
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov edx, edi
mov dword [edx + 0x164], eax
xor eax, eax
push eax
push eax
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov edx, edi
mov dword [edx + 0x15c], eax
xor eax, eax
push eax
push eax
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov edx, edi
mov dword [edx + 0x160], eax
xor eax, eax
push eax
push eax
push 1
push eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov edx, edi
lea ecx, [ebp - 0x24c]
push 0
mov dword [edx + 0x158], eax
call fcn.00412808
mov ecx, edi
mov eax, dword [ebp - 0x24c]
mov esi, dword [ecx + 0xdc]
lea edx, [ecx + 0xd0]
lea ebx, [ecx + 0xdc]
test esi, esi
jne 0x858b61
mov esi, ecx
mov dword [ebp - 0x370], eax
xor edi, edi
mov dword [esi + 0xd4], edi
mov dword [esi + 0xd8], eax
push edi
push edi
mov ecx, ebx
push eax
push edx
call fcn.004128cc
lea ecx, [ebp - 0x248]
push 0
call fcn.00412808
mov dword [ebp - 0x248], 0xf
push 0xf
mov ecx, ebx
mov dword [ebp - 0x360], 0xf
call fcn.0041cbc8
push 0x50000
mov eax, dword [ebp - 0x14]
lea esi, [eax + 0x118]
lea edx, [eax + 0x110]
push eax
push dword [eax + 0x15c]
push esi
push dword [eax + 0x108]
push edx
call dword [sym.imp.WINMM.dll_waveOutOpen]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
mov dword [eax + 0x220], 0
test edx, edx
jne 0x858d65
xor ebx, ebx
mov eax, dword [ebp - 0x14]
push 0x20
push dword [eax + ebx*4 + 0x12c]
push dword [eax + 0x110]
call dword [sym.imp.WINMM.dll_waveOutPrepareHeader]
add ebx, 1
cmp ebx, 2
jl 0x858bd1
mov eax, dword [ebp - 0x14]
push dword [eax + 0x110]
call dword [sym.imp.WINMM.dll_waveOutPause]
xor ebx, ebx
mov eax, dword [ebp - 0x14]
push 0x20
push dword [eax + ebx*4 + 0x12c]
push dword [eax + 0x110]
call dword [sym.imp.WINMM.dll_waveOutWrite]
add ebx, 1
cmp ebx, 2
jl 0x858c02
mov eax, dword [ebp - 0x14]
push dword [eax + 0x110]
mov dword [eax + 0x150], 0
call dword [sym.imp.WINMM.dll_waveOutRestart]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x10c]
cmp eax, 0xffffffff
je 0x858d34
push 0x50000
mov edx, dword [ebp - 0x14]
movzx edi, word [edx + 0x198]
mov ebx, dword [edx + 0x140]
push edx
push dword [edx + 0x160]
mov ecx, 1
mov word [edx + 0x118], cx
push esi
push eax
mov word [edx + 0x11a], di
mov dword [edx + 0x11c], ebx
add ebx, ebx
imul ebx, edi
add edi, edi
mov word [edx + 0x124], di
mov dword [edx + 0x120], ebx
mov ecx, 0x10
mov word [edx + 0x126], cx
mov ecx, 0x12
mov word [edx + 0x128], cx
lea ecx, [edx + 0x114]
push ecx
call dword [sym.imp.WINMM.dll_waveInOpen]
mov dword [ebp - 0x18], eax
test eax, eax
jne 0x859017
xor ebx, ebx
mov eax, dword [ebp - 0x14]
push 0x20
push dword [eax + ebx*4 + 0x134]
push dword [eax + 0x114]
call dword [sym.imp.WINMM.dll_waveInPrepareHeader]
add ebx, 1
cmp ebx, 2
jl 0x858cca
mov eax, dword [ebp - 0x14]
push dword [eax + 0x114]
call dword [sym.imp.WINMM.dll_waveInStop]
xor ebx, ebx
mov eax, dword [ebp - 0x14]
push 0x20
push dword [eax + ebx*4 + 0x134]
push dword [eax + 0x114]
call dword [sym.imp.WINMM.dll_waveInAddBuffer]
add ebx, 1
cmp ebx, 2
jl 0x858cfb
mov eax, dword [ebp - 0x14]
push dword [eax + 0x114]
mov dword [eax + 0x154], 0
call dword [sym.imp.WINMM.dll_waveInStart]
call dword [sym.imp.WINMM.dll_timeGetTime]
mov edx, dword [ebp - 0x14]
mov byte [edx + 0x14d], 1
mov dword [edx + 0x19c], eax
mov edi, dword [ebp - 0x24]
mov esi, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x1c]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
push dword [eax + 0x158]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [ebp - 0x14]
push 0x1388
push dword [eax + 0x164]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, ebx
call fcn.00412870
mov ecx, ebx
call fcn.00412930
mov edx, dword [ebp - 0x14]
push dword [edx + 0x164]
xor eax, eax
mov dword [edx + 0xe0], eax
mov dword [edx + 0xdc], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x14]
push dword [eax + 0x15c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x14]
push dword [eax + 0x160]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x14]
push dword [eax + 0x158]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x14]
xor eax, eax
mov dword [ebp - 0x240], eax
mov dword [ebp - 0x23c], eax
mov dword [ebp - 0x238], eax
mov byte [esi + 0x14d], al
mov edi, 0xa463a0
xor eax, eax
mov dh, byte [edi]
mov ecx, edi
test dh, dh
je 0x858e15
add ecx, 1
add eax, 1
mov dl, byte [ecx]
test dl, dl
jne 0x858e09
lea ecx, [ebp - 0x244]
push 1
mov ebx, eax
push ebx
call fcn.00404278
movzx edx, al
test edx, edx
je 0x858e59
mov edi, dword [ebp - 0x240]
mov esi, 0xa463a0
mov ecx, ebx
push ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
pop ecx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [ebp - 0x240]
mov dword [ebp - 0x23c], ebx
mov byte [ebx + edx], 0
mov dword [ebp - 4], 1
mov edx, dword [ebp - 0x18]
lea eax, [ebp - 0x234]
push 0x100
push eax
push edx
call dword [sym.imp.WINMM.dll_waveOutGetErrorTextA]
lea edi, [ebp - 0x234]
xor eax, eax
mov dh, byte [edi]
mov ecx, edi
test dh, dh
je 0x858e92
add ecx, 1
add eax, 1
mov dl, byte [ecx]
test dl, dl
jne 0x858e86
mov edx, dword [ebp - 0x23c]
mov ebx, eax
neg edx
add edx, 0xffffffff
cmp edx, ebx
ja 0x858ea8
call fcn.008898cf
test ebx, ebx
ja 0x8591ec
mov eax, dword [ebp - 0x240]
test eax, eax
je 0x8591e2
push 7
push 0
push eax
call fcn.004124c4
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x240]
test ecx, ecx
je 0x858ef2
movzx edx, byte [ecx - 1]
lea eax, [ecx - 1]
test edx, edx
jne 0x8591cc
push eax
call fcn.00888fb0
pop ecx
mov edi, dword [ebp - 0x24]
mov esi, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x1c]
xor edx, edx
mov eax, 0xffffdb68
mov dword [ebp - 0x240], edx
mov dword [ebp - 0x23c], edx
mov dword [ebp - 0x238], edx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ecx]
call dword [eax + 0x14]
movzx eax, al
test eax, eax
jne 0x858f45
mov ebx, dword [ebp - 0x1c]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp - 0x14]
push dword [eax + 0x110]
call dword [sym.imp.WINMM.dll_waveOutReset]
mov eax, dword [ebp - 0x14]
mov edx, dword [eax + 0x10c]
cmp edx, 0xffffffff
je 0x858f6e
push dword [eax + 0x114]
call dword [sym.imp.WINMM.dll_waveInReset]
mov eax, dword [ebp - 0x14]
push dword [eax + 0x158]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [ebp - 0x14]
push 0x1388
push dword [eax + 0x164]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp - 0x14]
lea ebx, [eax + 0xdc]
mov ecx, ebx
call fcn.00412870
mov ecx, ebx
call fcn.00412930
mov edx, dword [ebp - 0x14]
mov ecx, dword [edx + 0x10c]
xor eax, eax
mov dword [edx + 0xe0], eax
mov dword [edx + 0xdc], eax
cmp ecx, 0xffffffff
je 0x859275
xor esi, esi
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + esi*4 + 0x134]
mov edx, dword [eax + 0x10]
lea ebx, [esi + esi]
test dl, 1
jne 0x859248
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + ebx*2 + 0x134]
mov edx, dword [eax + 0x10]
test dl, 1
je 0x858fe3
jmp 0x859248
mov eax, 0xffffdb68
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
xor eax, eax
mov dword [ebp - 0x130], eax
mov dword [ebp - 0x12c], eax
mov edi, 0xa463c4
mov dword [ebp - 0x128], eax
xor eax, eax
mov dh, byte [edi]
mov ecx, edi
test dh, dh
je 0x859046
add ecx, 1
add eax, 1
mov dl, byte [ecx]
test dl, dl
jne 0x85903a
lea ecx, [ebp - 0x134]
push 1
mov ebx, eax
push ebx
call fcn.00404278
movzx edx, al
test edx, edx
je 0x85908a
mov edi, dword [ebp - 0x130]
mov esi, 0xa463c4
mov ecx, ebx
push ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
pop ecx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [ebp - 0x130]
mov dword [ebp - 0x12c], ebx
mov byte [ebx + edx], 0
mov dword [ebp - 4], 2
mov edx, dword [ebp - 0x18]
lea eax, [ebp - 0x124]
push 0x100
push eax
push edx
call dword [sym.imp.WINMM.dll_waveInGetErrorTextA]
lea edi, [ebp - 0x124]
xor eax, eax
mov dh, byte [edi]
mov ecx, edi
test dh, dh
je 0x8590c3
add ecx, 1
add eax, 1
mov dl, byte [ecx]
test dl, dl
jne 0x8590b7
mov edx, dword [ebp - 0x12c]
mov ebx, eax
neg edx
add edx, 0xffffffff
cmp edx, ebx
ja 0x8590d9
call fcn.008898cf
test ebx, ebx
ja 0x859170
mov eax, dword [ebp - 0x130]
test eax, eax
je 0x859166
push 7
push 0
push eax
call fcn.004124c4
add esp, 0xc
mov eax, dword [ebp - 0x14]
mov byte [eax + 0x14d], 1
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x130]
test ecx, ecx
je 0x859125
movzx edx, byte [ecx - 1]
lea eax, [ecx - 1]
test edx, edx
jne 0x859157
push eax
call fcn.00888fb0
pop ecx
mov edi, dword [ebp - 0x24]
mov esi, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x1c]
xor edx, edx
mov eax, 0xffffdb68
mov dword [ebp - 0x130], edx
mov dword [ebp - 0x12c], edx
mov dword [ebp - 0x128], edx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
cmp edx, 0xff
je 0x85911e
dec dl
mov byte [ecx - 1], dl
jmp 0x859125
mov eax, 0x9eebb8
jmp 0x8590eb
mov edx, dword [ebp - 0x12c]
lea ecx, [ebp - 0x134]
push 0
add edx, ebx
mov dword [ebp - 0x18], edx
push edx
call fcn.00404278
movzx edx, al
test edx, edx
je 0x8590e1
mov edi, dword [ebp - 0x130]
add edi, dword [ebp - 0x12c]
lea esi, [ebp - 0x124]
mov ecx, ebx
push ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
pop ecx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x130]
mov dword [ebp - 0x12c], eax
mov byte [eax + edx], 0
jmp 0x8590e1
cmp edx, 0xff
je 0x858eeb
dec dl
mov byte [ecx - 1], dl
jmp 0x858ef2
mov eax, 0x9eebb8
jmp 0x858ebe
mov edx, dword [ebp - 0x23c]
lea ecx, [ebp - 0x244]
push 0
add edx, ebx
mov dword [ebp - 0x18], edx
push edx
call fcn.00404278
movzx edx, al
test edx, edx
je 0x858eb0
mov edi, dword [ebp - 0x240]
add edi, dword [ebp - 0x23c]
lea esi, [ebp - 0x234]
mov ecx, ebx
push ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
pop ecx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x240]
mov dword [ebp - 0x23c], eax
mov byte [eax + edx], 0
jmp 0x858eb0
push 0x20
push eax
mov eax, dword [ebp - 0x14]
push dword [eax + 0x114]
call dword [sym.imp.WINMM.dll_waveInUnprepareHeader]
add esi, 1
cmp esi, 2
jl 0x858fca
mov eax, dword [ebp - 0x14]
push dword [eax + 0x114]
call dword [sym.imp.WINMM.dll_waveInClose]
xor esi, esi
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + esi*4 + 0x12c]
mov edx, dword [eax + 0x10]
lea ebx, [esi + esi]
test dl, 1
jne 0x8592a6
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + ebx*2 + 0x12c]
mov edx, dword [eax + 0x10]
test dl, 1
je 0x85928c
push 0x20
push eax
mov eax, dword [ebp - 0x14]
push dword [eax + 0x110]
call dword [sym.imp.WINMM.dll_waveOutUnprepareHeader]
add esi, 1
cmp esi, 2
jl 0x859277
mov eax, dword [ebp - 0x14]
push dword [eax + 0x110]
call dword [sym.imp.WINMM.dll_waveOutClose]
mov dword [ebp - 0x18], eax
test eax, eax
jne 0x859321
mov eax, dword [ebp - 0x14]
push dword [eax + 0x164]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x14]
push dword [eax + 0x15c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x14]
push dword [eax + 0x160]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x14]
push dword [eax + 0x158]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x14]
mov byte [eax + 0x14d], 0
jmp 0x858d4a
xor eax, eax
mov dword [ebp - 0x358], eax
mov dword [ebp - 0x354], eax
mov edi, 0xa463e8
mov dword [ebp - 0x350], eax
xor eax, eax
mov dh, byte [edi]
mov ecx, edi
test dh, dh
je 0x859350
add ecx, 1
add eax, 1
mov dl, byte [ecx]
test dl, dl
jne 0x859344
lea ecx, [ebp - 0x35c]
push 1
mov ebx, eax
push ebx
call fcn.00404278
movzx edx, al
test edx, edx
je 0x859394
mov edi, dword [ebp - 0x358]
mov esi, 0xa463e8
mov ecx, ebx
push ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
pop ecx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [ebp - 0x358]
mov dword [ebp - 0x354], ebx
mov byte [ebx + edx], 0
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x18]
lea eax, [ebp - 0x34c]
push 0x100
push eax
push edx
call dword [sym.imp.WINMM.dll_waveOutGetErrorTextA]
lea edi, [ebp - 0x34c]
xor eax, eax
mov dh, byte [edi]
mov ecx, edi
test dh, dh
je 0x8593cd
add ecx, 1
add eax, 1
mov dl, byte [ecx]
test dl, dl
jne 0x8593c1
mov edx, dword [ebp - 0x354]
mov ebx, eax
neg edx
add edx, 0xffffffff
cmp edx, ebx
ja 0x8593e3
call fcn.008898cf
test ebx, ebx
ja 0x859450
mov eax, dword [ebp - 0x358]
test eax, eax
je 0x859449
push 7
push 0
push eax
call fcn.004124c4
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x358]
test ecx, ecx
je 0x859421
movzx edx, byte [ecx - 1]
lea eax, [ecx - 1]
test edx, edx
jne 0x85943a
push eax
call fcn.00888fb0
pop ecx
xor eax, eax
mov dword [ebp - 0x358], eax
mov dword [ebp - 0x354], eax
mov dword [ebp - 0x350], eax
jmp 0x8592d6
cmp edx, 0xff
je 0x85941a
dec dl
mov byte [ecx - 1], dl
jmp 0x859421
mov eax, 0x9eebb8
jmp 0x8593f1
mov edx, dword [ebp - 0x354]
lea ecx, [ebp - 0x35c]
push 0
add edx, ebx
mov dword [ebp - 0x18], edx
push edx
call fcn.00404278
movzx edx, al
test edx, edx
je 0x8593e7
mov edi, dword [ebp - 0x358]
add edi, dword [ebp - 0x354]
lea esi, [ebp - 0x34c]
mov ecx, ebx
push ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
pop ecx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x358]
mov dword [ebp - 0x354], eax
mov byte [eax + edx], 0
jmp 0x8593e7