Function at 0x406a30
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1018
call fcn.00414550
mov eax, dword [0x41e008]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
push 0x400
lea eax, [ebp - 0x404]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea eax, [ebp - 0x1008]
add esp, 0xc
push eax
push 0x20019
push 0
push str.SoftwareGMCL_Upgrade
push 0x80000002
call edi
test eax, eax
jne 0x406af9
lea eax, [ebp - 0x100c]
mov dword [ebp - 0x100c], 0x400
push eax
lea eax, [ebp - 0x804]
push eax
lea eax, [ebp - 0x1018]
push eax
push 0
push 0x418384
push dword [ebp - 0x1008]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 0x1008]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x406af9
xor ecx, ecx
nop dword [eax]
mov al, byte [ebp + ecx - 0x804]
lea ecx, [ecx + 1]
mov byte [ecx + 0x420d2f], al
test al, al
jne 0x406ad0
pop edi
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00412814
mov esp, ebp
pop ebp
ret
push ebx
lea eax, [ebp - 0x1008]
push eax
push 0x20019
push 0
push str.HardwareDeviceMapSerialComm
push 0x80000002
call edi
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
test eax, eax
jne 0x406c88
lea eax, [ebp - 0x100c]
mov dword [ebp - 0x100c], 0x400
push eax
lea eax, [ebp - 0x804]
mov dword [ebp - 0x1014], 0x400
push eax
xor ebx, ebx
lea eax, [ebp - 0x1014]
push ebx
push ebx
push eax
lea eax, [ebp - 0x1004]
push eax
push ebx
push dword [ebp - 0x1008]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
test eax, eax
jne 0x406c7c
nop dword [eax + eax]
push 3
lea eax, [ebp - 0x1004]
push 0x419b10
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strnicmp]
add esp, 0xc
test eax, eax
jne 0x406c2c
lea eax, [ebp - 0x804]
push eax
lea eax, [ebp - 0x1004]
push eax
call esi
add esp, 8
test eax, eax
jne 0x406c2c
lea ecx, [ebp - 0x404]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x406bb3
sub ecx, edx
jne 0x406bdb
movq xmm0, qword [str._create]
mov al, byte [0x419b1c]
movq qword [ebp - 0x404], xmm0
mov byte [ebp - 0x3fc], al
jmp 0x406bf5
lea edi, [ebp - 0x404]
dec edi
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x406be2
mov ax, word [0x419b20]
mov word [edi], ax
lea edx, [ebp - 0x801]
mov esi, edx
nop dword [eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x406c00
lea edi, [ebp - 0x404]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x406c10
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
lea eax, [ebp - 0x100c]
mov dword [ebp - 0x100c], 0x400
push eax
lea eax, [ebp - 0x804]
mov dword [ebp - 0x1014], 0x400
push eax
push 0
push 0
lea eax, [ebp - 0x1014]
inc ebx
push eax
lea eax, [ebp - 0x1004]
push eax
push ebx
push dword [ebp - 0x1008]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
test eax, eax
je 0x406b70
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push dword [ebp - 0x1008]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x1008]
mov byte [ebp - 0xc04], 0
push eax
push 0x20019
push 0
push str.SoftwareG._Michaels_Consulting_Ltd.DBDOC_CIUMonVSP
push 0x80000002
call edi
test eax, eax
jne 0x406dc2
mov ebx, 1
push ebx
lea eax, [ebp - 0x1004]
mov dword [ebp - 0x1018], 1
push str.VirtualConnection_d
push eax
mov dword [ebp - 0x100c], 0x400
call fcn.004010e0
add esp, 0xc
lea eax, [ebp - 0x100c]
push eax
lea eax, [ebp - 0x804]
push eax
lea eax, [ebp - 0x1018]
push eax
push 0
lea eax, [ebp - 0x1004]
push eax
push dword [ebp - 0x1008]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x406da6
lea eax, [ebp - 0x804]
push str.COM0:COM0
push eax
call esi
add esp, 8
test eax, eax
je 0x406da6
lea ecx, [ebp - 0xc04]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x406d33
sub ecx, edx
jne 0x406d5d
movq xmm0, qword [str._connect]
mov ax, word [0x419b84]
movq qword [ebp - 0xc04], xmm0
mov word [ebp - 0xbfc], ax
jmp 0x406d77
lea edi, [ebp - 0xc04]
dec edi
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x406d64
mov ax, word [0x419b20]
mov word [edi], ax
lea edx, [ebp - 0x804]
mov esi, edx
nop
mov al, byte [edx]
inc edx
test al, al
jne 0x406d80
lea edi, [ebp - 0xc04]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x406d90
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
inc ebx
cmp ebx, 0x10
jl 0x406cb6
push dword [ebp - 0x1008]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0xc04]
lea edx, [ecx + 1]
pop ebx
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x406dd0
sub ecx, edx
je 0x406e37
lea ecx, [ebp - 0x404]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x406de4
sub ecx, edx
je 0x406e09
lea edi, [ebp - 0x404]
dec edi
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x406df6
mov ax, word [0x41925c]
mov word [edi], ax
lea edx, [ebp - 0xc04]
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x406e11
lea edi, [ebp - 0x404]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x406e21
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x404]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x406e40
sub ecx, edx
je 0x406e89
lea ecx, [ebp - 0x404]
call fcn.00406ea0
xor ecx, ecx
nop dword [eax + eax]
mov al, byte [ebp + ecx - 0x404]
lea ecx, [ecx + 1]
mov byte [ecx + 0x420d2f], al
test al, al
jne 0x406e60
pop edi
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00412814
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
xor ecx, ebp
pop esi
call fcn.00412814
mov esp, ebp
pop ebp
ret