Function at 0x405560
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 0x405580
mov esi, str.EnumMOSCHIPCOMPOUND_SERIAL_INTERFACE
jmp 0x40558d
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 0x405622
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 0x405615
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 0x4055fc
sub esi, 2
jns 0x4055fc
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 0x4055cf
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40566b
cmp eax, 2
je 0x40566b
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 0x405660
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 0x405679
mov esi, str.EnumMOSCHIPCOMPOUND_SERIAL_INTERFACE
jmp 0x405686
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 0x4056a1
mov esi, str.EnumMOSCHIPCOMPOUND_PARALLEL_INTERFACE
jmp 0x4056ae
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 0x405734
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 0x405727
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 0x40570e
sub esi, 2
jns 0x40570e
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 0x4056e1
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40577d
cmp eax, 2
je 0x40577d
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 0x405772
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 0x40578b
mov esi, str.EnumMOSCHIPCOMPOUND_PARALLEL_INTERFACE
jmp 0x405798
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 0x4057b3
mov esi, str.EnumMOSCHIPUSB_SERIAL_INTERFACE
jmp 0x4057c0
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 0x405847
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 0x40583a
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 0x405821
sub esi, 2
jns 0x405821
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 0x4057f4
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x405890
cmp eax, 2
je 0x405890
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 0x405885
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 0x40589e
mov esi, str.EnumMOSCHIPUSB_SERIAL_INTERFACE
jmp 0x4058ab
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 0x4058c6
mov esi, str.EnumMOSCHIPUSB_PARALLEL_INTERFACE
jmp 0x4058d3
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 0x405959
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 0x40594c
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 0x405933
sub esi, 2
jns 0x405933
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 0x405906
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4059a2
cmp eax, 2
je 0x4059a2
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 0x405997
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 0x4059b2
mov esi, str.EnumMOSCHIPUSB_PARALLEL_INTERFACE
jmp 0x4059bf
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