Function at 0x404840
Capabilities:
Enumerate devices by category

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
mov al, byte [0x427b00]
push ebx
push esi
push edi
test al, al
jne 0x404d9f
mov eax, dword [0x427d08]
xor ebx, ebx
push 1
push eax
mov byte [0x427b00], 1
mov dword [0x427cbc], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], ebx
call dword [sym.imp.USER32.dll_GetMenu]
push eax
call dword [sym.imp.USER32.dll_GetSubMenu]
mov edi, eax
push edi
mov dword [ebp - 0x10], edi
call dword [sym.imp.USER32.dll_GetMenuItemCount]
cmp eax, 0xffffffff
jne 0x4048ab
push str.Error_Cleaning_Devices_Menu
call fcn.00405c80
add esp, 4
lea esp, [ebp - 0x88]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, ebx
jle 0x4048c6
mov ebx, dword [sym.imp.USER32.dll_RemoveMenu]
mov esi, eax
push 0x400
push 0
push edi
call ebx
dec esi
jne 0x4048b7
xor ebx, ebx
mov esi, 0x427b04
push esi
call fcn.004014f0
add esi, 4
add esp, 4
cmp esi, 0x427b2c
jb 0x4048cb
mov esi, 0x427b2c
push esi
call fcn.004014f0
add esi, 4
add esp, 4
cmp esi, 0x427b54
jb 0x4048e4
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], ebx
push ecx
push 0x41dba0
push 1
push ebx
push 0x41ee20
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
je 0x404930
push str.Error_Creating_Device_Enumerator
call fcn.00405c80
add esp, 4
lea esp, [ebp - 0x88]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 8]
push ebx
mov dword [ebp - 8], ebx
mov edx, dword [eax]
push ecx
push 0x41ee00
push eax
call dword [edx + 0xc]
test eax, eax
je 0x40495c
push str.Sorry__you_have_no_video_capture_hardware._r_n_r_nVideo_capture_will_not_function_properly.
call fcn.00405c80
add esp, 4
jmp 0x404b85
mov eax, dword [ebp - 8]
push eax
mov edx, dword [eax]
call dword [edx + 0x14]
mov eax, dword [ebp - 8]
lea edx, [ebp - 0x28]
push edx
lea edx, [ebp - 4]
mov ecx, dword [eax]
push edx
push 1
push eax
call dword [ecx + 0xc]
test eax, eax
jne 0x404b66
mov dword [ebp - 0x20], 0x10
mov dword [ebp - 0x24], 0x427b04
mov eax, dword [ebp - 4]
lea edx, [ebp - 0x1c]
push edx
push 0x41f940
mov dword [ebp - 0x1c], ebx
mov ecx, dword [eax]
push ebx
push ebx
push eax
call dword [ecx + 0x24]
test eax, eax
jl 0x404b2b
mov eax, dword [ebp - 0x1c]
lea edx, [ebp - 0x3c]
push ebx
mov word [ebp - 0x3c], 8
mov ecx, dword [eax]
push edx
push str.FriendlyName
push eax
call dword [ecx + 0xc]
test eax, eax
jne 0x404b22
mov eax, dword [ebp - 0x34]
xor edx, edx
mov dword [ebp - 0x2c], edx
test eax, eax
mov ebx, eax
jne 0x4049e0
xor esi, esi
jmp 0x404a17
push eax
call fcn.0040c7e0
lea edi, [eax + eax + 2]
mov eax, edi
add eax, 3
and al, 0xfc
call fcn.0040e210
mov esi, esp
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
push ebx
push 0
push 0
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov eax, dword [ebp - 0x34]
mov edi, dword [ebp - 0x10]
mov edx, dword [ebp - 0x2c]
mov cl, byte [esi + edx]
test cl, cl
mov byte [ebp + edx - 0x7c], cl
je 0x404a2b
inc edx
cmp edx, 0x40
mov dword [ebp - 0x2c], edx
jl 0x4049d6
mov ecx, dword [0x427d24]
test ecx, ecx
jne 0x404a72
cmp byte [ebp - 0x7c], 0x56
jne 0x404a72
cmp byte [ebp - 0x7b], 0x49
jne 0x404a72
cmp byte [ebp - 0x7a], 0x4d
jne 0x404a72
cmp byte [ebp - 0x79], 0x49
jne 0x404a72
cmp byte [ebp - 0x78], 0x43
jne 0x404a72
cmp byte [ebp - 0x77], 0x52
jne 0x404a72
cmp byte [ebp - 0x76], 0x4f
jne 0x404a72
mov ecx, dword [ebp - 0x14]
mov dword [0x427d24], 1
mov dword [0x427d20], ecx
test eax, eax
mov ebx, eax
jne 0x404a7c
xor esi, esi
jmp 0x404aad
push eax
call fcn.0040c7e0
lea edi, [eax + eax + 2]
mov eax, edi
add eax, 3
and al, 0xfc
call fcn.0040e210
mov esi, esp
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
push ebx
push 0
push 0
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, dword [ebp - 0x10]
push esi
mov esi, dword [ebp - 0x20]
push esi
push 0
push edi
call dword [sym.imp.USER32.dll_AppendMenuA]
mov eax, dword [0x427b54]
test eax, eax
je 0x404ad9
mov ecx, dword [ebp - 4]
mov edx, dword [eax]
push ecx
push eax
call dword [edx + 0x34]
test eax, eax
jne 0x404ad9
mov dword [ebp - 0xc], 1
mov edx, dword [ebp - 0xc]
neg edx
sbb edx, edx
and edx, 8
push edx
push esi
push edi
call dword [sym.imp.USER32.dll_CheckMenuItem]
mov eax, dword [0x427ae4]
neg eax
sbb eax, eax
and eax, 2
push eax
push esi
push edi
call dword [sym.imp.USER32.dll_EnableMenuItem]
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0xc], 0
push ecx
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 4]
push eax
mov dword [edx], eax
mov ecx, dword [eax]
call dword [ecx + 4]
xor ebx, ebx
mov eax, dword [ebp - 0x1c]
push eax
mov edx, dword [eax]
call dword [edx + 8]
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x24]
inc edx
inc ecx
add eax, 4
mov dword [ebp - 0x20], ecx
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 8]
push ecx
lea ecx, [ebp - 4]
mov dword [ebp - 0x14], edx
mov edx, dword [eax]
push ecx
push 1
push eax
call dword [edx + 0xc]
test eax, eax
je 0x40498e
mov eax, dword [ebp - 8]
push eax
mov edx, dword [eax]
call dword [edx + 8]
mov eax, dword [ebp - 0x14]
push ebx
push ebx
push 0x800
push edi
mov dword [0x427cbc], eax
call dword [sym.imp.USER32.dll_AppendMenuA]
mov eax, dword [ebp - 0x18]
lea edx, [ebp - 8]
push ebx
push edx
mov ecx, dword [eax]
push 0x41ed80
push eax
mov dword [ebp - 0xc], ebx
call dword [ecx + 0xc]
mov esi, eax
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
cmp esi, ebx
jne 0x404d9f
mov eax, dword [ebp - 8]
push eax
mov edx, dword [eax]
call dword [edx + 0x14]
mov eax, dword [ebp - 8]
lea edx, [ebp - 0x28]
push edx
lea edx, [ebp - 4]
mov ecx, dword [eax]
push edx
push 1
push eax
call dword [ecx + 0xc]
test eax, eax
jne 0x404d96
mov edi, 0x1a
mov dword [ebp - 0x20], 0x427b2c
mov dword [ebp - 0x24], edi
mov eax, dword [ebp - 4]
lea edx, [ebp - 0x1c]
push edx
push 0x41f940
mov ecx, dword [eax]
push 0
push 0
push eax
call dword [ecx + 0x24]
test eax, eax
jl 0x404d65
mov eax, dword [ebp - 0x1c]
lea edx, [ebp - 0x3c]
push 0
mov word [ebp - 0x3c], 8
mov ecx, dword [eax]
push edx
push str.FriendlyName
push eax
call dword [ecx + 0xc]
test eax, eax
jne 0x404d5c
mov eax, dword [ebp - 0x34]
xor edx, edx
mov dword [ebp - 0x2c], edx
test eax, eax
mov ebx, eax
jne 0x404c33
xor esi, esi
jmp 0x404c6a
push eax
call fcn.0040c7e0
lea edi, [eax + eax + 2]
mov eax, edi
add eax, 3
and al, 0xfc
call fcn.0040e210
mov esi, esp
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
push ebx
push 0
push 0
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov eax, dword [ebp - 0x34]
mov edx, dword [ebp - 0x2c]
mov edi, dword [ebp - 0x24]
mov cl, byte [esi + edx]
test cl, cl
mov byte [ebp + edx - 0x7c], cl
je 0x404c7e
inc edx
cmp edx, 0x40
mov dword [ebp - 0x2c], edx
jl 0x404c29
cmp byte [ebp - 0x7c], 0x50
jne 0x404caa
cmp byte [ebp - 0x7b], 0x43
jne 0x404caa
cmp byte [ebp - 0x79], 0x43
jne 0x404caa
cmp byte [ebp - 0x78], 0x61
jne 0x404caa
mov esi, dword [ebp - 0x10]
push str.USB_Audio_Device
push edi
push 0
push esi
call dword [sym.imp.USER32.dll_AppendMenuA]
jmp 0x404cf6
test eax, eax
mov ebx, eax
jne 0x404cb4
xor esi, esi
jmp 0x404ce5
push eax
call fcn.0040c7e0
lea edi, [eax + eax + 2]
mov eax, edi
add eax, 3
and al, 0xfc
call fcn.0040e210
mov esi, esp
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
push ebx
push 0
push 0
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, dword [ebp - 0x24]
mov eax, dword [ebp - 0x10]
push esi
push edi
push 0
push eax
call dword [sym.imp.USER32.dll_AppendMenuA]
mov esi, dword [ebp - 0x10]
mov eax, dword [0x427b58]
test eax, eax
je 0x404d14
mov edx, dword [ebp - 4]
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x34]
test eax, eax
jne 0x404d14
mov dword [ebp - 0xc], 1
mov eax, dword [ebp - 0xc]
neg eax
sbb eax, eax
and eax, 8
push eax
push edi
push esi
call dword [sym.imp.USER32.dll_CheckMenuItem]
mov ecx, dword [0x427ae4]
neg ecx
sbb ecx, ecx
and ecx, 2
push ecx
push edi
push esi
call dword [sym.imp.USER32.dll_EnableMenuItem]
mov edx, dword [ebp - 0x34]
mov dword [ebp - 0xc], 0
push edx
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 4]
push eax
mov dword [ecx], eax
mov edx, dword [eax]
call dword [edx + 4]
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 4]
push eax
mov edx, dword [eax]
call dword [edx + 8]
mov eax, dword [ebp - 8]
mov ebx, dword [ebp - 0x20]
lea edx, [ebp - 0x28]
inc edi
mov ecx, dword [eax]
push edx
lea edx, [ebp - 4]
add ebx, 4
push edx
push 1
push eax
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], ebx
call dword [ecx + 0xc]
test eax, eax
je 0x404be1
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
lea esp, [ebp - 0x88]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret