Function at 0x4050e0
Capabilities:
Query or enumerate registry key

Disassembly:
sub esp, 0x10c
push esi
push edi
mov edi, ecx
mov dword [esp + 8], 0
mov eax, dword [edi + 4]
test eax, eax
jne 0x405100
mov esi, str.EnumMOSCHIPCOMPOUND_SERIAL_INTERFACE
jmp 0x40510d
mov esi, str.SystemCurrentControlSetEnumMOSCHIPCOMPOUND_SERIAL_INTERFACE
mov ecx, edi
push esi
call fcn.00405dc0
push ebx
lea eax, [esp + 0xc]
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push eax
push 0xf003f
push 0
push esi
push reloc.OLEAUT32.dll_SysReAllocString
call ebp
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
jne 0x4051a2
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x18]
push 0x104
push ecx
push 0
push edx
mov esi, 1
call ebx
test eax, eax
jne 0x405195
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x18]
push eax
push ecx
mov ecx, edi
call fcn.00406000
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x18]
push edx
push eax
mov ecx, edi
call fcn.00405f20
test eax, eax
je 0x40517c
sub esi, 2
jns 0x40517c
xor esi, esi
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x18]
mov eax, esi
push 0x104
push ecx
push eax
push edx
inc esi
call ebx
test eax, eax
je 0x40514f
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4051eb
cmp eax, 2
je 0x4051eb
push 0
lea ecx, [esp + 0x18]
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 0x4051e0
mov edx, dword [esp + 0x14]
push 0x40
push str.Registry_Error
push edx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [edi + 4]
test eax, eax
jne 0x4051f9
mov esi, str.EnumMOSCHIPCOMPOUND_PARALLEL_INTERFACE
jmp 0x405206
mov esi, str.SystemCurrentControlSetEnumMOSCHIPCOMPOUND_PARALLEL_INTERFACE
mov ecx, edi
push esi
call fcn.00405dc0
lea ecx, [esp + 0x10]
push ecx
push 0xf003f
push 0
push esi
push reloc.OLEAUT32.dll_SysReAllocString
call ebp
test eax, eax
jne 0x40528c
lea edx, [esp + 0x18]
push 0x104
push edx
push eax
mov eax, dword [esp + 0x1c]
mov esi, 1
push eax
call ebx
test eax, eax
jne 0x40527f
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x18]
push ecx
push edx
mov ecx, edi
call fcn.00406000
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x18]
push eax
push ecx
mov ecx, edi
call fcn.00405f20
test eax, eax
je 0x405266
sub esi, 2
jns 0x405266
xor esi, esi
lea edx, [esp + 0x18]
mov eax, esi
push 0x104
push edx
push eax
mov eax, dword [esp + 0x1c]
push eax
inc esi
call ebx
test eax, eax
je 0x405239
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4052d5
cmp eax, 2
je 0x4052d5
push 0
lea edx, [esp + 0x18]
push 0
push edx
push 0x400
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov eax, dword [0x43acf0]
test eax, eax
je 0x4052ca
mov eax, dword [esp + 0x14]
push 0x40
push str.Registry_Error
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [edi + 4]
test eax, eax
jne 0x4052e3
mov esi, str.EnumMOSCHIPCOMPOUND_SERIAL_INTERFACE
jmp 0x4052f0
mov esi, str.SystemCurrentControlSetEnumMOSCHIPCOMPOUND_SERIAL_INTERFACE
mov ecx, edi
push esi
call fcn.00405dc0
push esi
push reloc.OLEAUT32.dll_SysReAllocString
mov ecx, edi
call fcn.00405f20
mov eax, dword [edi + 4]
test eax, eax
jne 0x40530b
mov esi, str.EnumMOSCHIPCOMPOUND_PARALLEL_INTERFACE
jmp 0x405318
mov esi, str.SystemCurrentControlSetEnumMOSCHIPCOMPOUND_PARALLEL_INTERFACE
mov ecx, edi
push esi
call fcn.00405dc0
push esi
push reloc.OLEAUT32.dll_SysReAllocString
mov ecx, edi
call fcn.00405f20
mov eax, dword [edi + 4]
test eax, eax
jne 0x405333
mov esi, str.EnumMOSCHIPUSB_SERIAL_INTERFACE
jmp 0x405340
mov esi, str.SystemCurrentControlSetEnumMOSCHIPUSB_SERIAL_INTERFACE
mov ecx, edi
push esi
call fcn.00405dc0
lea edx, [esp + 0x10]
push edx
push 0xf003f
push 0
push esi
push reloc.OLEAUT32.dll_SysReAllocString
call ebp
test eax, eax
jne 0x4053c7
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x18]
push 0x104
push eax
push 0
push ecx
mov esi, 1
call ebx
test eax, eax
jne 0x4053ba
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x18]
push edx
push eax
mov ecx, edi
call fcn.00406000
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x18]
push ecx
push edx
mov ecx, edi
call fcn.00405f20
test eax, eax
je 0x4053a1
sub esi, 2
jns 0x4053a1
xor esi, esi
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x18]
mov eax, esi
push 0x104
push ecx
push eax
push edx
inc esi
call ebx
test eax, eax
je 0x405374
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x405410
cmp eax, 2
je 0x405410
push 0
lea ecx, [esp + 0x18]
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 0x405405
mov edx, dword [esp + 0x14]
push 0x40
push str.Registry_Error
push edx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [edi + 4]
test eax, eax
jne 0x40541e
mov esi, str.EnumMOSCHIPUSB_PARALLEL_INTERFACE
jmp 0x40542b
mov esi, str.SystemCurrentControlSetEnumMOSCHIPUSB_PARALLEL_INTERFACE
mov ecx, edi
push esi
call fcn.00405dc0
lea ecx, [esp + 0x10]
push ecx
push 0xf003f
push 0
push esi
push reloc.OLEAUT32.dll_SysReAllocString
call ebp
test eax, eax
jne 0x4054b1
lea edx, [esp + 0x18]
push 0x104
push edx
push eax
mov eax, dword [esp + 0x1c]
mov esi, 1
push eax
call ebx
test eax, eax
jne 0x4054a4
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x18]
push ecx
push edx
mov ecx, edi
call fcn.00406000
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x18]
push eax
push ecx
mov ecx, edi
call fcn.00405f20
test eax, eax
je 0x40548b
sub esi, 2
jns 0x40548b
xor esi, esi
lea edx, [esp + 0x18]
mov eax, esi
push 0x104
push edx
push eax
mov eax, dword [esp + 0x1c]
push eax
inc esi
call ebx
test eax, eax
je 0x40545e
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4054fa
cmp eax, 2
je 0x4054fa
push 0
lea edx, [esp + 0x18]
push 0
push edx
push 0x400
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov eax, dword [0x43acf0]
test eax, eax
je 0x4054ef
mov eax, dword [esp + 0x14]
push 0x40
push str.Registry_Error
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [edi + 4]
pop ebp
test eax, eax
pop ebx
jne 0x40550a
mov esi, str.EnumMOSCHIPUSB_SERIAL_INTERFACE
jmp 0x405517
mov esi, str.SystemCurrentControlSetEnumMOSCHIPUSB_SERIAL_INTERFACE
mov ecx, edi
push esi
call fcn.00405dc0
push esi
push reloc.OLEAUT32.dll_SysReAllocString
mov ecx, edi
call fcn.00405f20
mov eax, dword [edi + 4]
test eax, eax
jne 0x405532
mov esi, str.EnumMOSCHIPUSB_PARALLEL_INTERFACE
jmp 0x40553f
mov esi, str.SystemCurrentControlSetEnumMOSCHIPUSB_PARALLEL_INTERFACE
mov ecx, edi
push esi
call fcn.00405dc0
push esi
push reloc.OLEAUT32.dll_SysReAllocString
mov ecx, edi
call fcn.00405f20
pop edi
pop esi
add esp, 0x10c
ret