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

Disassembly:
sub esp, 0x21c
push ebp
mov ebp, ecx
push esi
mov eax, dword [ebp + 4]
test eax, eax
jne 0x4049e8
mov esi, str.SystemCurrentControlSetServicesClassUSB
jmp 0x4049f5
mov esi, str.SystemCurrentControlSetControlClass36FC9E60_C465_11CF_8056_444553540000
mov ecx, ebp
push esi
call fcn.00405dc0
lea eax, [esp + 0x14]
push eax
push 0xf003f
push 0
push esi
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x404cb0
mov edx, dword [esp + 0x14]
push edi
mov edi, 0x104
lea ecx, [esp + 0x124]
push edi
push ecx
push eax
push edx
mov dword [esp + 0x2c], 1
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
jne 0x404c9b
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x14]
xor esi, esi
push eax
push 0xf003f
lea ecx, [esp + 0x130]
push esi
push ecx
push edx
mov dword [esp + 0x28], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x404c72
lea eax, [esp + 0x10]
lea ecx, [esp + 0x24]
push eax
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x1c]
push ecx
push edx
push esi
push str.DriverDesc
push eax
mov dword [esp + 0x28], edi
call ebx
test eax, eax
jne 0x404b0c
cmp dword [esp + 0x10], 4
jbe 0x404b0c
lea ecx, [esp + 0x24]
push ecx
mov ecx, ebp
call fcn.00405d90
push 0x1b
lea edx, [esp + 0x28]
push str.moschip_usb_compound_device
push edx
mov dword [esp + 0x1c], edi
call fcn.00410430
add esp, 0xc
test eax, eax
jne 0x404acb
mov esi, 1
push 0x23
lea eax, [esp + 0x28]
push str.moschipcompound_parallel_interface
push eax
call fcn.00410430
add esp, 0xc
test eax, eax
jne 0x404ae8
mov esi, 1
push 0x1e
lea ecx, [esp + 0x28]
push str.moschipusb_parallel_interface
push ecx
call fcn.00410430
add esp, 0xc
test eax, eax
je 0x404c29
test esi, esi
jne 0x404c2e
lea edx, [esp + 0x10]
lea eax, [esp + 0x24]
push edx
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x1c]
push eax
push ecx
push 0
push str.DriverDesc
push edx
mov dword [esp + 0x28], edi
call ebx
test eax, eax
jne 0x404b64
cmp dword [esp + 0x10], 4
jbe 0x404b64
lea eax, [esp + 0x24]
mov ecx, ebp
push eax
call fcn.00405d90
push 0x1b
lea ecx, [esp + 0x28]
push str.vscom_usb_compound_device
push ecx
mov dword [esp + 0x1c], edi
call fcn.00410430
add esp, 0xc
test eax, eax
je 0x404c29
lea edx, [esp + 0x10]
lea eax, [esp + 0x24]
push edx
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x1c]
push eax
push ecx
push 0
push str.DriverDesc
push edx
mov dword [esp + 0x28], edi
call ebx
test eax, eax
jne 0x404bd9
cmp dword [esp + 0x10], 4
jbe 0x404bd9
lea eax, [esp + 0x24]
mov ecx, ebp
push eax
call fcn.00405d90
push 0x13
lea ecx, [esp + 0x28]
push str.usb_compound_device
push ecx
mov dword [esp + 0x1c], edi
call fcn.00410430
add esp, 0xc
test eax, eax
jne 0x404bbd
mov esi, 1
push 0x1b
lea edx, [esp + 0x28]
push str.moschip_usb_compound_device
push edx
call fcn.00410430
add esp, 0xc
test eax, eax
je 0x404c29
test esi, esi
jne 0x404c2e
lea eax, [esp + 0x10]
lea ecx, [esp + 0x24]
push eax
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x1c]
push ecx
push edx
push 0
push str.NTMPDriver
push eax
mov dword [esp + 0x28], edi
call ebx
test eax, eax
jne 0x404c2e
cmp dword [esp + 0x10], 4
jbe 0x404c2e
lea ecx, [esp + 0x24]
push ecx
mov ecx, ebp
call fcn.00405d90
push 8
lea edx, [esp + 0x28]
push str.mosusbsr
push edx
call fcn.00410430
add esp, 0xc
test eax, eax
jne 0x404c2e
mov esi, 1
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
mov dword [esp + 0x14], 0
je 0x404c72
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x128]
push ecx
push edx
mov ecx, ebp
call fcn.00405f20
test eax, eax
je 0x404c72
mov eax, dword [esp + 0x20]
sub eax, 2
mov dword [esp + 0x20], eax
jns 0x404c72
mov dword [esp + 0x20], 0
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
mov eax, ecx
inc ecx
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0x128]
push edi
push ecx
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
je 0x404a47
pop ebx
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
add esp, 0x21c
ret
cmp eax, 2
je 0x404cf9
push 0
lea ecx, [esp + 0x14]
push 0
push ecx
push 0x400
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov eax, dword [0x43acf0]
test eax, eax
je 0x404cee
mov edx, dword [esp + 0x10]
push 0x40
push str.Registry_Error
push edx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop esi
pop ebp
add esp, 0x21c
ret