Function at 0x403850
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x220
push ebx
push ebp
push esi
push edi
mov esi, ecx
xor edi, edi
mov dword [esp + 0x20], 0x80
xor ecx, ecx
mov edx, dword [esi + 0x90]
lea eax, [edx*8]
sub eax, edx
lea eax, [eax + eax*4]
lea edx, [ecx + eax*2]
inc ecx
cmp ecx, 4
mov dword [edx*4 + 0x435de0], edi
jl 0x403868
mov ecx, dword [esi + 0x90]
mov ebp, dword [0x436910]
mov ebx, 1
lea eax, [ecx*8]
sub eax, ecx
and ebp, 0xffff
mov dx, bp
lea eax, [eax + eax*4]
mov dword [eax*8 + 0x435dc0], edi
in al, dx
lea edx, [edi + ebp + 8]
in al, dx
test al, al
mov byte [esp + 0x14], al
jne 0x4038e6
mov ecx, dword [esi + 0x90]
lea eax, [ecx*8]
sub eax, ecx
lea ecx, [eax + eax*4]
lea edx, [edi + ecx*2]
mov dword [edx*4 + 0x435de0], ebx
jmp 0x4039c3
cmp al, 0x10
jne 0x40390f
mov ecx, dword [esi + 0x90]
lea eax, [ecx*8]
sub eax, ecx
lea eax, [eax + eax*4]
lea ecx, [edi + eax*2]
mov dword [ecx*4 + 0x435de0], 2
jmp 0x4039c3
cmp al, 0x11
jne 0x403938
mov ecx, dword [esi + 0x90]
lea eax, [ecx*8]
sub eax, ecx
lea edx, [eax + eax*4]
lea eax, [edi + edx*2]
mov dword [eax*4 + 0x435de0], 3
jmp 0x4039c3
cmp al, 0x20
jne 0x40395e
mov ecx, dword [esi + 0x90]
lea eax, [ecx*8]
sub eax, ecx
lea ecx, [eax + eax*4]
lea edx, [edi + ecx*2]
mov dword [edx*4 + 0x435de0], 4
jmp 0x4039c3
cmp al, 0x21
jne 0x403984
mov ecx, dword [esi + 0x90]
lea eax, [ecx*8]
sub eax, ecx
lea eax, [eax + eax*4]
lea ecx, [edi + eax*2]
mov dword [ecx*4 + 0x435de0], 5
jmp 0x4039c3
mov eax, dword [esi + 0x90]
mov ecx, dword [esp + 0x14]
lea edx, [edi + 1]
push ebp
inc eax
push edx
and ecx, 0xff
push eax
push ecx
lea edx, [esp + 0x140]
push str.Read_Fail_InterfaceType:0x_x__dth_Card__dth_Panel_BaseAddr:0x_x
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
lea eax, [esp + 0x130]
push 0
push 0
push eax
call fcn.0042212f
inc edi
cmp edi, 4
jl 0x4038b8
mov ecx, dword [esi + 0x90]
lea eax, [ecx*8]
sub eax, ecx
lea eax, [eax + eax*4]
shl eax, 3
lea ecx, [eax + 0x435eb8]
lea edx, [eax + 0x435e78]
push ecx
push edx
lea eax, [esp + 0x38]
push str.EnumMFCHILD0000PCI_s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [esp + 0x10]
lea edx, [esp + 0x30]
push ecx
push ebx
xor ebx, ebx
push ebx
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x403a70
lea eax, [esp + 0x20]
lea ecx, [esp + 0x18]
push eax
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x30]
push ecx
push edx
push ebx
push str.PORTNAME
push eax
mov dword [esp + 0x38], 0x80
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea ecx, [esp + 0x1b]
push ecx
call fcn.0040e5b9
mov edx, dword [esi + 0x90]
add esp, 4
lea ecx, [edx*8]
sub ecx, edx
lea edx, [ecx + ecx*4]
mov dword [edx*8 + 0x435dc0], eax
jmp 0x403acd
mov eax, dword [esi + 0x90]
cmp eax, ebx
jne 0x403a86
mov dword [0x435dc0], 5
jmp 0x403acd
mov edx, dword [eax*4 + 0x4368d8]
lea ecx, [eax*8]
cmp edx, 0x20
jne 0x403ab8
sub ecx, eax
lea eax, [ecx + ecx*4]
shl eax, 3
mov ecx, dword [eax + 0x435cd8]
mov edx, dword [eax + 0x435ca8]
lea ecx, [edx + ecx*8]
mov dword [eax + 0x435dc0], ecx
jmp 0x403acd
sub ecx, eax
lea eax, [ecx + ecx*4]
mov ecx, dword [eax*8 + 0x435ca8]
add ecx, edx
mov dword [eax*8 + 0x435dc0], ecx
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
xor edi, edi
jmp 0x403ae4
xor ebx, ebx
mov ecx, dword [esi + 0x90]
lea eax, [ecx*8]
sub eax, ecx
lea eax, [eax + eax*4]
shl eax, 3
lea ecx, [eax + 0x435eb8]
lea edx, [eax + 0x435e78]
push ecx
push edx
push edi
lea eax, [esp + 0x3c]
push str.EnumMFCHILD_04xPCI_s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
lea ecx, [esp + 0x10]
lea edx, [esp + 0x30]
push ecx
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call ebp
test eax, eax
jne 0x403c85
lea eax, [esp + 0x14]
lea ecx, [esp + 0x24]
push eax
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x1c]
push ecx
push edx
push ebx
push str.SBMPID
push eax
mov dword [esp + 0x30], 3
mov dword [esp + 0x2c], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x403c4d
mov ecx, dword [esi + 0x90]
mov edx, dword [esp + 0x26]
mov ebx, edx
lea eax, [ecx*8]
and ebx, 0xff
sub eax, ecx
lea ecx, [eax + eax*4]
lea eax, [edi + ecx*2]
mov dword [eax*4 + 0x435dc8], ebx
mov ecx, dword [esi + 0x90]
lea eax, [ecx*8]
sub eax, ecx
lea ecx, [eax + eax*4]
lea eax, [edi + ecx*2]
mov ecx, dword [eax*4 + 0x435de0]
dec ecx
cmp ecx, 4
ja case.default.0x403bba
jmp dword [ecx*4 + 0x403ca8]
mov dword [eax*4 + 0x435de0], 1
jmp 0x403c85
test dh, dh
jne 0x403be5
mov dword [eax*4 + 0x435de0], 2
jmp 0x403c85
cmp dh, 1
jne 0x403bfa
mov dword [eax*4 + 0x435de0], 3
jmp 0x403c85
push 0
push 0
push str.422_interface_fail
call fcn.0042212f
jmp 0x403c85
test dh, dh
jne 0x403c1b
mov dword [eax*4 + 0x435de0], 4
jmp 0x403c85
cmp dh, 1
jne 0x403c2d
mov dword [eax*4 + 0x435de0], 5
jmp 0x403c85
push 0
push 0
push str.485_interface_fail
call fcn.0042212f
jmp 0x403c85
push 0
push 0
push str.something_wrong_happened_to_read_interfacetype_
call fcn.0042212f
jmp 0x403c85
mov ecx, dword [esi + 0x90]
lea eax, [ecx*8]
sub eax, ecx
lea edx, [eax + eax*4]
lea eax, [edi + edx*2]
mov dword [eax*4 + 0x435dc8], ebx
mov ecx, dword [esi + 0x90]
lea eax, [ecx*8]
sub eax, ecx
lea ecx, [eax + eax*4]
lea edx, [edi + ecx*2]
mov dword [edx*4 + 0x435de0], ebx
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc edi
cmp edi, 4
jl 0x403ae2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x220
ret