Function at 0x404610
Capabilities:
Enumerate devices by category

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov al, byte [0x415014]
push ebx
push esi
push edi
test al, al
jne 0x404a32
mov eax, dword [0x4146c8]
xor esi, esi
push 1
push eax
mov byte [0x415014], 1
mov dword [0x4151cc], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], esi
call dword [sym.imp.USER32.dll_GetMenu]
push eax
call dword [sym.imp.USER32.dll_GetSubMenu]
mov ebx, eax
push ebx
call dword [sym.imp.USER32.dll_GetMenuItemCount]
cmp eax, 0xffffffff
jne 0x404675
push str.Error_Cleaning_Devices_Menu
call fcn.00405860
add esp, 4
lea esp, [ebp - 0x40]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, esi
jle 0x40468e
mov edi, dword [sym.imp.USER32.dll_RemoveMenu]
mov esi, eax
push 0x400
push 0
push ebx
call edi
dec esi
jne 0x404681
mov esi, 0x415018
mov edi, 0xa
push esi
call fcn.00401400
add esp, 4
add esi, 4
dec edi
jne 0x404698
mov esi, 0x415040
mov edi, 0xa
push esi
call fcn.00401400
add esp, 4
add esi, 4
dec edi
jne 0x4046b1
lea ecx, [ebp - 0x14]
push ecx
push 0x40f3b8
push 1
push 0
push 0x40f4c8
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
je 0x4046f3
push str.Error_Creating_Device_Enumerator
call fcn.00405860
add esp, 4
lea esp, [ebp - 0x40]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 8]
push 0
push ecx
mov edx, dword [eax]
push 0x40f4b8
push eax
call dword [edx + 0xc]
test eax, eax
je 0x40471d
push str.Sorry__you_have_no_video_capture_hardware
call fcn.00405860
add esp, 4
jmp 0x40489b
mov eax, dword [ebp - 8]
push eax
mov edx, dword [eax]
call dword [edx + 0x14]
mov eax, dword [ebp - 8]
lea edx, [ebp - 0x1c]
push edx
lea edx, [ebp - 4]
mov ecx, dword [eax]
push edx
push 1
push eax
call dword [ecx + 0xc]
test eax, eax
jne 0x404879
mov edi, 0x10
mov dword [ebp - 0x24], edi
mov eax, dword [ebp - 4]
lea edx, [ebp - 0x20]
push edx
push 0x40f558
mov ecx, dword [eax]
push 0
push 0
push eax
call dword [ecx + 0x24]
test eax, eax
jl 0x40484a
mov eax, dword [ebp - 0x20]
lea edx, [ebp - 0x34]
push 0
mov word [ebp - 0x34], 8
mov ecx, dword [eax]
push edx
push str.FriendlyName
push eax
call dword [ecx + 0xc]
test eax, eax
jne 0x404841
mov eax, dword [ebp - 0x2c]
test eax, eax
mov dword [ebp - 0x18], eax
jne 0x404797
xor esi, esi
jmp 0x4047cb
push eax
call fcn.004078f0
lea edi, [eax + eax + 2]
mov eax, edi
add eax, 3
and al, 0xfc
call fcn.00408010
mov eax, dword [ebp - 0x18]
mov esi, esp
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
push eax
push 0
push 0
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, dword [ebp - 0x24]
push esi
push edi
push 0
push ebx
call dword [sym.imp.USER32.dll_AppendMenuA]
mov eax, dword [0x415068]
test eax, eax
je 0x4047f4
mov edx, dword [ebp - 4]
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x34]
test eax, eax
jne 0x4047f4
mov dword [ebp - 0xc], 1
mov eax, dword [ebp - 0xc]
neg eax
sbb eax, eax
and eax, 8
push eax
push edi
push ebx
call dword [sym.imp.USER32.dll_CheckMenuItem]
mov ecx, dword [0x414ffc]
mov dword [ebp - 0xc], 0
neg ecx
sbb ecx, ecx
and ecx, 2
push ecx
push edi
push ebx
call dword [sym.imp.USER32.dll_EnableMenuItem]
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
push eax
mov dword [ecx*4 + 0x415018], eax
mov edx, dword [eax]
call dword [edx + 4]
mov eax, dword [ebp - 0x20]
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 ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
lea edx, [ebp - 0x1c]
inc ecx
push edx
lea edx, [ebp - 4]
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax]
push edx
inc edi
push 1
push eax
mov dword [ebp - 0x24], edi
call dword [ecx + 0xc]
test eax, eax
je 0x404749
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov edx, dword [ebp - 0x10]
push 0
push 0
push 0x800
push ebx
mov dword [0x4151cc], edx
call dword [sym.imp.USER32.dll_AppendMenuA]
mov eax, dword [ebp - 0x14]
lea edx, [ebp - 8]
push 0
push edx
mov ecx, dword [eax]
push 0x40f4a8
push eax
mov dword [ebp - 0xc], 0
call dword [ecx + 0xc]
mov esi, eax
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
test esi, esi
jne 0x404a32
mov eax, dword [ebp - 8]
push eax
mov edx, dword [eax]
call dword [edx + 0x14]
mov eax, dword [ebp - 8]
lea edx, [ebp - 0x1c]
push edx
lea edx, [ebp - 4]
mov ecx, dword [eax]
push edx
push 1
push eax
call dword [ecx + 0xc]
test eax, eax
jne 0x404a29
mov edi, 0x1a
mov dword [ebp - 0x10], 0x415040
mov dword [ebp - 0x20], edi
mov eax, dword [ebp - 4]
lea edx, [ebp - 0x24]
push edx
push 0x40f558
mov ecx, dword [eax]
push 0
push 0
push eax
call dword [ecx + 0x24]
test eax, eax
jl 0x4049f8
mov eax, dword [ebp - 0x24]
lea edx, [ebp - 0x34]
push 0
mov word [ebp - 0x34], 8
mov ecx, dword [eax]
push edx
push str.FriendlyName
push eax
call dword [ecx + 0xc]
test eax, eax
jne 0x4049ef
mov eax, dword [ebp - 0x2c]
test eax, eax
mov dword [ebp - 0x18], eax
jne 0x40494a
xor esi, esi
jmp 0x40497e
push eax
call fcn.004078f0
lea edi, [eax + eax + 2]
mov eax, edi
add eax, 3
and al, 0xfc
call fcn.00408010
mov eax, dword [ebp - 0x18]
mov esi, esp
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
push eax
push 0
push 0
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, dword [ebp - 0x20]
push esi
push edi
push 0
push ebx
call dword [sym.imp.USER32.dll_AppendMenuA]
mov eax, dword [0x41506c]
test eax, eax
je 0x4049a7
mov edx, dword [ebp - 4]
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x34]
test eax, eax
jne 0x4049a7
mov dword [ebp - 0xc], 1
mov eax, dword [ebp - 0xc]
neg eax
sbb eax, eax
and eax, 8
push eax
push edi
push ebx
call dword [sym.imp.USER32.dll_CheckMenuItem]
mov ecx, dword [0x414ffc]
mov dword [ebp - 0xc], 0
neg ecx
sbb ecx, ecx
and ecx, 2
push ecx
push edi
push ebx
call dword [sym.imp.USER32.dll_EnableMenuItem]
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
push eax
mov dword [ecx], eax
mov edx, dword [eax]
call dword [edx + 4]
mov eax, dword [ebp - 0x24]
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 - 0x10]
lea edx, [ebp - 0x1c]
add eax, 4
push edx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 8]
lea edx, [ebp - 4]
inc edi
mov ecx, dword [eax]
push edx
push 1
push eax
mov dword [ebp - 0x20], edi
call dword [ecx + 0xc]
test eax, eax
je 0x4048fc
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
lea esp, [ebp - 0x40]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret