Function at 0x405f90
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x230
mov eax, dword [0x427298]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x240]
push edi
mov edi, dword [esp + 0x248]
xor ebx, ebx
lea edx, [esp + 0x4c]
mov dword [edi], eax
mov dword [edi + 4], ebx
mov ecx, dword [0x427298]
push edx
mov dword [esi], ecx
mov dword [esi + 4], ebx
call fcn.00406900
mov ecx, eax
mov eax, 0x88888889
mul ecx
shr edx, 5
add esp, 4
xor ebp, ebp
xor eax, eax
cmp edx, ebx
mov dword [esp + 0x48], edx
mov dword [esp + 0x24], ebp
mov dword [esp + 0x10], eax
mov dword [esp + 0x34], ebx
jle 0x40673a
jmp 0x405ffd
mov edi, dword [esp + 0x248]
lea ebx, [ebx + ebx*2]
xor ecx, ecx
mov eax, 0x4222e0
lea ebx, [ebx + ebx*4]
shl ebx, 2
xor edx, edx
mov dl, byte [esp + ebx + 0x64]
cmp edx, dword [eax]
je 0x406028
add eax, 8
inc ecx
cmp eax, 0x422318
jl 0x406013
mov esi, dword [esp + 0x28]
jmp 0x40603c
mov si, word [ecx*8 + 0x4222e4]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], esi
cmp ecx, 7
jne 0x406076
xor ecx, ecx
mov eax, 0x422318
cmp edx, dword [eax]
je 0x406059
add eax, 8
inc ecx
cmp eax, str.Settings
jl 0x406048
jmp 0x40606d
mov si, word [ecx*8 + 0x42231c]
mov dword [esp + 0x2c], 1
mov dword [esp + 0x28], esi
cmp ecx, 0xe
je 0x406702
cmp word [esp + 0x2c], 0
jne 0x406237
mov edx, ebp
mov eax, 0x4228cc
shl edx, 0xa
add edi, edx
xor ecx, ecx
mov word [edi + 8], si
mov dword [edi + 0x10], ecx
mov dx, word [edi + 8]
cmp dx, word [eax]
je 0x4060ad
add eax, 0x18
inc ecx
cmp eax, 0x422974
jl 0x40609b
jmp 0x4060bd
lea eax, [ecx + ecx*2]
mov edx, dword [eax*8 + 0x4228d4]
mov dword [edi + 0x1b4], edx
cmp ecx, 7
je 0x406702
mov eax, dword [esp + ebx + 0x5c]
mov cx, word [esp + ebx + 0x58]
mov dword [edi + 0xc], eax
xor eax, eax
mov word [edi + 0x130], cx
mov word [edi + 0x2fe], ax
mov word [edi + 0x300], ax
mov word [edi + 0x2fc], ax
cmp dword [edi + 0x1b4], eax
jle 0x40622d
lea ecx, [esp + ebx + 0x76]
lea edx, [edi + 0x134]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], edx
lea ecx, [esp + ebx + 0x66]
lea edx, [edi + 0x120]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x20], edx
mov cx, word [esp + ebx + 0x54]
mov edx, dword [esp + 0x20]
lea ecx, [ecx + eax*8]
mov word [edx], cx
mov edx, dword [esp + 0x14]
xor ecx, ecx
mov cx, word [edx]
mov edx, dword [esp + 0x18]
mov dword [edx], ecx
mov ecx, dword [esp + 0x1c]
xor edx, edx
movsx esi, byte [ecx]
mov ecx, 0x422c88
cmp esi, dword [ecx]
je 0x40615e
add ecx, 0xc
inc edx
cmp ecx, 0x422cac
jl 0x40614c
jmp 0x40617d
mov esi, dword [esp + 0x248]
lea ecx, [esp + ebx + 0x76]
shl ebp, 8
movsx ecx, byte [ecx + eax]
add ebp, eax
mov dword [esi + ebp*4 + 0x2b8], ecx
mov ebp, dword [esp + 0x24]
cmp edx, 3
jne 0x40619b
mov ecx, dword [esp + 0x248]
mov edx, ebp
shl edx, 8
add edx, eax
mov dword [ecx + edx*4 + 0x2b8], 0xe
lea ecx, [esp + ebx + 0x7e]
xor edx, edx
movsx esi, byte [ecx + eax]
mov ecx, 0x422c60
cmp esi, dword [ecx]
je 0x4061bc
add ecx, 0xc
inc edx
cmp ecx, 0x422c84
jl 0x4061aa
jmp 0x4061d3
mov ecx, dword [esp + 0x248]
shl ebp, 8
add ebp, eax
mov dword [ecx + ebp*4 + 0x2d8], esi
mov ebp, dword [esp + 0x24]
cmp edx, 3
jne 0x4061f1
mov ecx, dword [esp + 0x248]
mov edx, ebp
shl edx, 8
add edx, eax
mov dword [ecx + edx*4 + 0x2d8], 0x10
mov esi, dword [esp + 0x20]
mov edx, dword [esp + 0x14]
mov ecx, 2
inc eax
add esi, ecx
add edx, ecx
mov ecx, dword [edi + 0x1b4]
mov dword [esp + 0x20], esi
mov esi, dword [esp + 0x18]
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x1c]
add esi, 4
inc edx
cmp eax, ecx
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], edx
jl 0x406120
inc ebp
mov dword [esp + 0x24], ebp
jmp 0x406702
xor ecx, ecx
mov eax, 0x4227ea
cmp si, word [eax]
je 0x406250
add eax, 0x10
inc ecx
cmp eax, 0x4228ca
jl 0x40623e
jmp 0x406261
mov edx, ecx
shl edx, 4
mov ax, word [edx + 0x4227ec]
mov word [esp + 0x44], ax
cmp ecx, 0xe
je 0x406702
mov edx, dword [esp + 0x24c]
xor ecx, ecx
mov edx, dword [edx]
test edx, edx
jle 0x4062cf
mov eax, dword [esp + 0x24c]
mov di, word [esp + ebx + 0x4e]
add eax, 0x24
cmp di, word [eax - 0x10]
jne 0x4062a3
mov si, word [esp + ebx + 0x50]
cmp si, word [eax]
jne 0x4062a3
mov si, word [esp + ebx + 0x4c]
cmp si, word [eax - 0x20]
je 0x4062ad
inc ecx
add eax, 2
cmp ecx, edx
jl 0x406288
jmp 0x4062cf
mov eax, dword [esp + 0x24c]
mov esi, dword [eax + ecx*4 + 0x34]
mov dword [esp + ebx + 0x54], esi
mov esi, dword [eax + ecx*4 + 0x54]
mov eax, dword [eax + ecx*4 + 0x94]
mov dword [esp + ebx + 0x58], esi
mov dword [esp + ebx + 0x5c], eax
cmp ecx, edx
je 0x406702
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x244]
mov ax, word [esp + 0x28]
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
shl ecx, 0xa
mov dword [esp + 0x38], 3
mov dword [esp + 0x20], 0x104
lea edi, [ecx + edx]
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + ebx + 0x5c]
and ecx, 0xffff
mov word [edi + 8], ax
mov ax, word [esp + ebx + 0x58]
mov dword [edi + 0x10], 1
mov dword [edi + 0x1b4], ecx
mov cx, word [esp + ebx + 0x4e]
mov dword [edi + 0xc], edx
mov dx, word [esp + ebx + 0x50]
mov word [edi + 0x130], ax
mov ax, word [esp + ebx + 0x4c]
mov word [edi + 0x2fe], cx
mov ecx, dword [esp + ebx + 0x58]
mov word [edi + 0x300], dx
mov edx, dword [esp + ebx + 0x54]
mov word [edi + 0x2fc], ax
push ecx
push edx
lea eax, [esp + 0x144]
push str.Device_d_d
push eax
call esi
mov edx, dword [str.SYSTEMCurrentControlSetServicesMxserpParameters]
add esp, 0x10
lea ecx, [esp + 0x30]
push ecx
push 0x20019
push 0
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea eax, [esp + 0x20]
lea ecx, [esp + 0x3c]
push eax
lea edx, [esp + 0x3c]
push ecx
mov ecx, dword [esp + 0x38]
push edx
lea eax, [esp + 0x148]
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [esp + 0x30]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ax, word [esp + 0x3c]
cmp ax, word [esp + ebx + 0x54]
jne 0x40644e
mov cx, word [esp + 0x3e]
cmp cx, word [esp + ebx + 0x58]
jne 0x40644e
mov ax, word [esp + 0x42]
cmp ax, 2
jne 0x406405
push str.MOXA_MU860
push 0x42729c
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push str.MOXA_MU860
lea edx, [edi + 0x14]
push 0x42222c
push edx
jmp 0x406449
cmp ax, 1
jne 0x40642b
push str.MOXA_MU150
push 0x42729c
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push str.MOXA_MU150
lea eax, [edi + 0x14]
push 0x42222c
push eax
jmp 0x406449
push str.16550C
push 0x42729c
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push str.16550C
lea ecx, [edi + 0x14]
push 0x42222c
push ecx
call esi
add esp, 0xc
mov eax, dword [edi + 0x1b4]
xor esi, esi
test eax, eax
jle 0x4066fe
lea edx, [edi + 0x134]
lea eax, [esp + ebx + 0x66]
lea ecx, [edi + 0x120]
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ecx
mov eax, dword [esp + 0x1c]
lea edx, [esi*8]
add dx, word [esp + ebx + 0x54]
xor ecx, ecx
lea ebp, [edi + 0x14]
push str.MOXA_MU860
mov word [eax], dx
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
push ebp
mov cx, word [edx]
mov dword [eax], ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x406563
lea edx, [ebx + esi]
xor ecx, ecx
mov eax, 0x422d28
movsx edx, byte [esp + edx + 0x76]
cmp edx, dword [eax]
je 0x4064da
add eax, 0xc
inc ecx
cmp eax, 0x422d4c
jl 0x4064c2
mov ebp, dword [esp + 0x244]
jmp 0x4064f1
mov eax, dword [esp + 0x10]
mov ebp, dword [esp + 0x244]
shl eax, 8
add eax, esi
mov dword [ebp + eax*4 + 0x2b8], edx
cmp ecx, 3
jne 0x40650a
mov ecx, dword [esp + 0x10]
shl ecx, 8
add ecx, esi
mov dword [ebp + ecx*4 + 0x2b8], 0x78
lea edx, [esp + ebx + 0x7e]
xor ecx, ecx
mov eax, 0x422d00
movsx edx, byte [edx + esi]
cmp edx, dword [eax]
je 0x40652a
add eax, 0xc
inc ecx
cmp eax, 0x422d24
jl 0x406519
jmp 0x40653a
mov eax, dword [esp + 0x10]
shl eax, 8
add eax, esi
mov dword [ebp + eax*4 + 0x2d8], edx
cmp ecx, 3
jne 0x4066c7
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x244]
shl ecx, 8
add ecx, esi
mov dword [edx + ecx*4 + 0x2d8], 0x80
jmp 0x4066c7
push str.MOXA_MU150
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x406627
lea eax, [ebx + esi]
xor ecx, ecx
movsx edx, byte [esp + eax + 0x76]
mov eax, 0x422cd8
cmp edx, dword [eax]
je 0x40659e
add eax, 0xc
inc ecx
cmp eax, 0x422cfc
jl 0x406586
mov ebp, dword [esp + 0x244]
jmp 0x4065b5
mov eax, dword [esp + 0x10]
mov ebp, dword [esp + 0x244]
shl eax, 8
add eax, esi
mov dword [ebp + eax*4 + 0x2b8], edx
cmp ecx, 3
jne 0x4065ce
mov ecx, dword [esp + 0x10]
shl ecx, 8
add ecx, esi
mov dword [ebp + ecx*4 + 0x2b8], 0x38
lea edx, [esp + ebx + 0x7e]
xor ecx, ecx
mov eax, 0x422cb0
movsx edx, byte [edx + esi]
cmp edx, dword [eax]
je 0x4065ee
add eax, 0xc
inc ecx
cmp eax, 0x422cd4
jl 0x4065dd
jmp 0x4065fe
mov eax, dword [esp + 0x10]
shl eax, 8
add eax, esi
mov dword [ebp + eax*4 + 0x2d8], edx
cmp ecx, 3
jne 0x4066c7
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x244]
shl ecx, 8
add ecx, esi
mov dword [edx + ecx*4 + 0x2d8], 0x40
jmp 0x4066c7
lea eax, [ebx + esi]
xor ecx, ecx
movsx edx, byte [esp + eax + 0x76]
mov eax, 0x422c88
cmp edx, dword [eax]
je 0x40664e
add eax, 0xc
inc ecx
cmp eax, 0x422cac
jl 0x406636
mov ebp, dword [esp + 0x244]
jmp 0x406665
mov eax, dword [esp + 0x10]
mov ebp, dword [esp + 0x244]
shl eax, 8
add eax, esi
mov dword [ebp + eax*4 + 0x2b8], edx
cmp ecx, 3
jne 0x40667e
mov ecx, dword [esp + 0x10]
shl ecx, 8
add ecx, esi
mov dword [ebp + ecx*4 + 0x2b8], 0xe
lea edx, [esp + ebx + 0x7e]
xor ecx, ecx
mov eax, 0x422c60
movsx edx, byte [edx + esi]
cmp edx, dword [eax]
je 0x40669e
add eax, 0xc
inc ecx
cmp eax, 0x422c84
jl 0x40668d
jmp 0x4066ae
mov eax, dword [esp + 0x10]
shl eax, 8
add eax, esi
mov dword [ebp + eax*4 + 0x2d8], edx
cmp ecx, 3
jne 0x4066c7
mov ecx, dword [esp + 0x10]
shl ecx, 8
add ecx, esi
mov dword [ebp + ecx*4 + 0x2d8], 0x10
mov ebp, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov eax, 2
add ebp, eax
add edx, eax
mov eax, dword [edi + 0x1b4]
inc esi
add ecx, 4
cmp esi, eax
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], ecx
jl 0x40647a
mov ebp, dword [esp + 0x24]
inc dword [esp + 0x10]
mov ebx, dword [esp + 0x34]
mov eax, dword [esp + 0x48]
inc ebx
cmp ebx, eax
mov dword [esp + 0x34], ebx
jl 0x405ff6
mov edx, dword [esp + 0x248]
mov ecx, dword [esp + 0x244]
mov eax, dword [esp + 0x10]
pop edi
mov dword [edx + 4], ebp
pop esi
pop ebp
mov dword [ecx + 4], eax
pop ebx
add esp, 0x230
ret
mov dword [edi + 4], ebp
mov dword [esi + 4], eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x230
ret