Function at 0x40bb50
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x41c878
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xec
push ebx
push ebp
push esi
mov esi, ecx
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CString::CString_2
xor ebx, ebx
lea ecx, [esp + 0xc]
mov dword [esp + 0x100], ebx
call sub.MFC42.DLL_CString::CString_2
mov byte [esp + 0x100], 1
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x44], ebx
call sub.MFC42.DLL_AfxGetModuleState
mov ebp, dword [eax + 4]
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::Empty
mov eax, dword [esi + 0x1f0]
cmp eax, ebx
jne 0x40bbbf
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push eax
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CString::operator_1
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x20]
push eax
push 0x20019
push ebx
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x40bf70
push edi
lea ecx, [esp + 0x40]
call sub.MFC42.DLL_CString::CString_2
lea edx, [esp + 0x64]
lea eax, [esp + 0x38]
push edx
mov edx, dword [esp + 0x28]
push ebx
push ebx
push ebx
lea ecx, [esp + 0x8c]
push eax
push ecx
mov edi, 4
push ebx
push edx
mov byte [esp + 0x124], 2
mov dword [esp + 0x58], 0x80
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x50], edi
mov dword [esp + 0x40], ebx
mov dword [esp + 0x34], ebx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x40bf4d
mov ecx, dword [esp + 0x28]
lea eax, [esp + 0x7c]
push eax
push ecx
lea edx, [esp + 0x48]
push str._s_s
push edx
mov dword [esp + 0x48], 0x80
mov dword [esp + 0x40], edi
call sub.MFC42.DLL_CString::Format
mov ecx, dword [esp + 0x50]
add esp, 0x10
lea eax, [esp + 0x20]
push eax
push 0x20019
push ebx
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40bf10
lea edx, [esp + 0x30]
lea eax, [esp + 0x18]
push edx
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x50]
push eax
push ecx
push ebx
push str.DeviceNumber
push edx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x4c], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x40bcbf
mov dword [esp + 0x18], ebx
lea eax, [esp + 0x30]
lea ecx, [esp + 0x34]
push eax
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x50]
push ecx
push edx
push ebx
push str.Disable
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x40bcf0
mov dword [esp + 0x34], 1
jmp 0x40bf10
cmp dword [esp + 0x34], ebx
jne 0x40bf10
lea ecx, [esp + 0x14]
lea edx, [esp + 0x7c]
push ecx
push str.Channel_1dDevice
push edx
call dword [sym.imp.MSVCRT.dll_sscanf]
mov eax, dword [esp + 0x20]
add esp, 0xc
cmp eax, edi
jae 0x40bf10
mov eax, dword [esp + 0x18]
cmp eax, edi
ja 0x40be4b
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], ebx
push ecx
push eax
mov ecx, esi
call fcn.0040c1c0
test eax, eax
je 0x40bda6
lea ecx, [esp + 0x44]
call sub.MFC42.DLL_CString::CString_2
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x44]
push edx
push 0x4248e4
push eax
mov byte [esp + 0x110], 3
call sub.MFC42.DLL_CString::Format
mov eax, dword [esp + 0x28]
add esp, 0xc
mov byte [esp + 0x104], 2
lea ecx, [eax + eax*2 + 0x33]
mov dword [ebp + ecx*4], 1
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
mov dword [ebp + eax*4 + 0x5a8], edx
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
mov dword [ebp + ecx*4 + 0x5b8], edx
lea ecx, [esp + 0x44]
jmp 0x40bf0b
lea ecx, [esp + 0x3c]
call sub.MFC42.DLL_CString::CString_2
push 0x6e
lea ecx, [esp + 0x40]
mov byte [esp + 0x108], 4
call sub.MFC42.DLL_CString::LoadStringA
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x6c]
push eax
push ecx
mov ecx, dword [esi + 0x150]
call fcn.0040ba60
mov eax, dword [eax + 4]
mov byte [esp + 0x104], 5
cmp eax, ebx
jne 0x40bdeb
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
push edx
mov edx, dword [esp + 0x40]
push ecx
push eax
lea eax, [esp + 0x1c]
push edx
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0x14
lea ecx, [esp + 0x6c]
mov byte [esp + 0x104], 4
push 1
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov eax, dword [esi + 0x270]
cmp eax, ebx
jne 0x40be2b
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov ecx, dword [esp + 0x10]
push 0x30
push eax
push ecx
mov ecx, esi
call sub.MFC42.DLL_CWnd::MessageBoxA
mov byte [esp + 0x104], 2
lea ecx, [esp + 0x3c]
jmp 0x40bf0b
lea ecx, [esp + 0x2c]
call sub.MFC42.DLL_CString::CString_2
push 0x76
lea ecx, [esp + 0x30]
mov byte [esp + 0x108], 6
call sub.MFC42.DLL_CString::LoadStringA
mov edx, dword [esp + 0x14]
mov ecx, dword [esi + 0x150]
lea eax, [esp + 0x54]
push edx
push eax
call fcn.0040ba60
mov eax, dword [eax + 4]
mov byte [esp + 0x104], 7
cmp eax, ebx
jne 0x40be90
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x2c]
push ecx
push eax
lea eax, [esp + 0x18]
push edx
push eax
call sub.MFC42.DLL_CString::Format
mov eax, dword [esp + 0x68]
add esp, 0x10
cmp eax, ebx
mov byte [esp + 0x104], 6
je 0x40bed5
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x40becc
cmp al, 0xff
je 0x40becc
dec al
mov byte [ecx], al
jmp 0x40bed5
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, dword [esi + 0x270]
mov dword [esp + 0x58], ebx
cmp eax, ebx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x60], ebx
jne 0x40bef0
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov ecx, dword [esp + 0x10]
push 0x30
push eax
push ecx
mov ecx, esi
call sub.MFC42.DLL_CWnd::MessageBoxA
mov byte [esp + 0x104], 2
lea ecx, [esp + 0x2c]
call sub.MFC42.DLL_CString::CString
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x48]
lea ecx, [esp + 0x64]
push ecx
push ebx
push ebx
lea edx, [esp + 0x44]
push ebx
lea ecx, [esp + 0x8c]
inc eax
push edx
mov edx, dword [esp + 0x38]
push ecx
push eax
push edx
mov dword [esp + 0x68], eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
je 0x40bc44
mov eax, dword [esp + 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x40]
mov byte [esp + 0x104], 1
call sub.MFC42.DLL_CString::CString
mov esi, dword [esp + 0x50]
pop edi
jmp 0x40bf9e
push 0x78
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::LoadStringA
mov eax, dword [esi + 0x270]
cmp eax, ebx
jne 0x40bf8a
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov ecx, dword [esp + 0xc]
push 0x30
push eax
push ecx
mov ecx, esi
call sub.MFC42.DLL_CWnd::MessageBoxA
mov esi, 1
lea ecx, [esp + 0xc]
mov byte [esp + 0x100], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x24]
mov dword [esp + 0x100], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0xf8]
mov eax, esi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0xf8
ret