Function at 0x599320
Capabilities:
Capture microphone audio
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x620c86
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x144
push esi
push edi
xor edi, edi
push 0x2e
lea eax, [esp + 0x7a]
push edi
push eax
mov esi, ecx
mov word [esp + 0x80], di
call fcn.005f7e70
add esp, 0xc
push 0x30
lea ecx, [esp + 0x78]
push ecx
push 0xffffffffffffffff
call dword [sym.imp.WINMM.dll_waveInGetDevCapsA]
test eax, eax
jne 0x599680
mov eax, dword [esp + 0x9c]
cmp eax, edi
je 0x599680
test eax, 0xf00
push ebx
mov ebx, 1
mov word [esp + 0x50], bx
je 0x599398
mov ecx, 0x2b11
jmp 0x5993b2
mov cl, byte [esp + 0xa0]
and cl, 0xf0
neg cl
sbb ecx, ecx
and ecx, 0xffffa9de
add ecx, 0xac44
mov edx, eax
and edx, 0x555
neg edx
sbb edx, edx
and eax, 0x333
add edx, 2
neg eax
sbb eax, eax
and eax, 0xfffffff8
add eax, 0x10
mov word [esp + 0x5e], ax
shr ax, 3
mov word [esp + 0x5c], ax
movzx eax, ax
push edi
imul eax, ecx
push edi
push edi
mov dword [esp + 0x60], ecx
lea ecx, [esp + 0x5c]
push ecx
mov word [esp + 0x62], dx
push 0xffffffffffffffff
lea edx, [esp + 0x3c]
push edx
mov dword [esp + 0x70], eax
mov word [esp + 0x78], di
call dword [sym.imp.WINMM.dll_waveInOpen]
test eax, eax
jne 0x59967f
mov eax, dword [esp + 0x28]
push ebp
push 0xa0000000
push edi
push edi
push eax
lea ebp, [esi + 0x34]
push ebp
call dword [sym.imp.WINMM.dll_mixerOpen]
test eax, eax
jne 0x599673
push 0xa4
lea ecx, [esp + 0xb4]
push edi
push ecx
mov dword [esp + 0xb8], 0xa8
call fcn.005f7e70
mov eax, dword [ebp]
add esp, 0xc
push 3
lea edx, [esp + 0xb0]
push edx
push eax
mov dword [esp + 0xd0], 7
call dword [sym.imp.WINMM.dll_mixerGetLineInfoA]
test eax, eax
jne 0x599673
mov ecx, dword [esp + 0xb8]
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
lea eax, [esi + 0x3c]
push 2
lea edx, [esp + 0x38]
mov dword [eax], 0x94
mov dword [esp + 0x4c], eax
mov eax, dword [ebp]
push edx
mov dword [esp + 0x48], ebx
mov ebx, dword [sym.imp.WINMM.dll_mixerGetLineControlsA]
push eax
mov dword [esp + 0x40], 0x18
mov dword [esi + 0x44], edi
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], 0x70010001
mov dword [esp + 0x50], 0x94
call ebx
cmp eax, edi
je 0x5994f1
mov edx, dword [ebp]
push 2
lea ecx, [esp + 0x38]
push ecx
push edx
mov dword [esp + 0x48], 0x71010001
call ebx
test byte [esi + 0x48], 2
je 0x5994fb
cmp eax, edi
je 0x59950d
mov eax, dword [ebp]
push eax
call dword [sym.imp.WINMM.dll_mixerClose]
mov dword [ebp], edi
jmp 0x599673
mov edx, dword [esi + 0x4c]
lea ecx, [esp + 0x13]
push ecx
push edx
lea ecx, [esp + 0x54]
call fcn.0058b4d0
mov ecx, dword [esi + 0x4c]
mov edx, dword [esp + 0x4c]
xor eax, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov eax, dword [esi + 0x40]
mov dword [esp + 0x18], eax
push 1
lea eax, [esp + 0x18]
mov dword [esp + 0x24], ecx
mov ecx, dword [ebp]
push eax
push ecx
mov dword [esp + 0x168], edi
mov dword [esp + 0x20], 0x18
mov dword [esp + 0x28], 1
mov dword [esp + 0x30], 0x48
mov dword [esp + 0x34], edx
mov dword [esi + 0x38], 0xffffffff
call dword [sym.imp.WINMM.dll_mixerGetControlDetailsA]
test eax, eax
jne 0x599662
mov edx, dword [esp + 0x20]
lea ebx, [esi + 0xd0]
push edx
mov ecx, ebx
call fcn.0058c770
cmp dword [esp + 0x20], edi
mov dword [esp + 0x30], edi
jbe 0x599600
mov eax, dword [esp + 0x4c]
push 0xffffffffffffffff
lea ecx, [edi + eax + 8]
push ecx
lea edx, [esp + 0x78]
push edx
call fcn.0051b593
add esp, 0xc
push eax
mov ecx, ebx
mov byte [esp + 0x160], 1
call fcn.0058cb50
mov eax, dword [esp + 0x70]
cmp eax, 0x6575cc
mov byte [esp + 0x15c], 0
je 0x5995ea
push eax
call fcn.005f7371
add esp, 4
mov eax, dword [esp + 0x30]
add eax, 1
add edi, 0x48
cmp eax, dword [esp + 0x20]
mov dword [esp + 0x30], eax
jb 0x5995a6
xor edi, edi
mov ecx, dword [esi + 0x4c]
lea eax, [esp + 0x13]
push eax
push ecx
lea ecx, [esp + 0x70]
call fcn.0058b480
mov ecx, dword [ebp]
mov edx, dword [esp + 0x68]
push edi
lea eax, [esp + 0x18]
push eax
push ecx
mov dword [esp + 0x30], 4
mov dword [esp + 0x34], edx
call dword [sym.imp.WINMM.dll_mixerGetControlDetailsA]
test eax, eax
mov edx, dword [esp + 0x68]
jne 0x599655
mov ecx, dword [esp + 0x20]
xor eax, eax
cmp ecx, edi
jbe 0x599655
cmp dword [edx + eax*4], edi
jne 0x599652
add eax, 1
cmp eax, ecx
jb 0x599644
jmp 0x599655
mov dword [esi + 0x38], eax
cmp edx, edi
je 0x599662
push edx
call fcn.005f7a6f
add esp, 4
mov eax, dword [esp + 0x4c]
cmp eax, edi
je 0x599673
push eax
call fcn.005f7a6f
add esp, 4
mov edx, dword [esp + 0x2c]
push edx
call dword [sym.imp.WINMM.dll_waveInClose]
pop ebp
pop ebx
mov ecx, dword [esp + 0x14c]
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x150
ret