Function at 0x49e2c0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x571089
mov eax, dword fs:[0]
push eax
sub esp, 0x628
mov eax, dword [0x640040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
cmp byte [ebx + 0x8c], 0
mov eax, dword [ebp + 8]
jne 0x49e65f
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea ecx, [ebp - 0x628]
push ecx
push 0x20019
push 0
push str.SOFTWARE
push eax
mov dword [ebp - 0x628], 0
mov dword [ebp - 0x630], 0
mov dword [ebp - 0x62c], 0
call esi
test eax, eax
je 0x49e360
mov eax, dword [0x641a88]
push str.Failed_to_open_registry_key_SOFTWARE
add eax, 0x32c
push 0x3e9
push eax
call fcn.004ec2c0
add esp, 0xc
jmp 0x49e65f
lea eax, [ebp - 0x630]
push eax
push 0x20019
push 0
push str.EUROTHERM
push dword [ebp - 0x628]
call esi
test eax, eax
je 0x49e3ad
mov eax, dword [0x641a88]
push str.Failed_to_open_registry_key_EUROTHERM
add eax, 0x32c
push 0x3e9
push eax
call fcn.004ec2c0
add esp, 0xc
push dword [ebp - 0x628]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x49e65f
lea eax, [ebp - 0x62c]
push eax
push 0x20019
push 0
push str.PORTNAMES
push dword [ebp - 0x630]
call esi
test eax, eax
je 0x49e3e7
push dword [ebp - 0x630]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call esi
push dword [ebp - 0x628]
call esi
jmp 0x49e65f
lea ecx, [ebp - 0x618]
call dword [sym.imp.mfc140u.dll_Ordinal_296]
mov dword [ebp - 4], 0
mov ecx, ebx
mov eax, dword [ebx]
call dword [eax + 0x80]
push eax
push str.EuroMBus
lea eax, [ebp - 0x618]
push 0x5c0ff4
push eax
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__31]
add esp, 0x10
lea ecx, [ebp - 0x618]
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__23]
lea ecx, [ebp - 0x614]
call dword [sym.imp.mfc140u.dll_Ordinal_296]
mov byte [ebp - 4], 1
lea eax, [ebp - 0x61c]
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
xor esi, esi
push eax
lea eax, [ebp - 0x110]
mov dword [ebp - 0x61c], 0x100
push eax
lea eax, [ebp - 0x624]
mov dword [ebp - 0x620], 0x100
push eax
push esi
lea eax, [ebp - 0x620]
push eax
lea eax, [ebp - 0x410]
push eax
push esi
push dword [ebp - 0x62c]
call edi
test eax, eax
jne 0x49e61e
nop dword [eax]
mov eax, dword [ebp - 0x624]
sub eax, 1
je 0x49e4b1
push 0x587818
lea ecx, [ebp - 0x614]
call dword [sym.imp.mfc140u.dll_ATL::CSimpleStringT_wchar_t_1_::operator]
jmp 0x49e5b9
xor edx, edx
mov edi, 0x100
nop dword [eax + eax]
movzx ecx, byte [ebp + edx - 0x10f]
movzx eax, byte [ebp + edx - 0x110]
imul ecx, edi
add cx, ax
movzx eax, byte [ebp + edx - 0x10e]
mov word [ebp + edx - 0x610], cx
movzx ecx, byte [ebp + edx - 0x10d]
imul ecx, edi
add cx, ax
movzx eax, byte [ebp + edx - 0x10c]
mov word [ebp + edx - 0x60e], cx
movzx ecx, byte [ebp + edx - 0x10b]
imul ecx, edi
add cx, ax
movzx eax, byte [ebp + edx - 0x10a]
mov word [ebp + edx - 0x60c], cx
movzx ecx, byte [ebp + edx - 0x109]
imul ecx, edi
add cx, ax
mov word [ebp + edx - 0x60a], cx
add edx, 8
cmp edx, edi
jl 0x49e4c0
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
xor eax, eax
cmp eax, 0x100
jae 0x49e746
mov byte [ebp + eax - 0x210], 0
inc eax
cmp eax, 0x100
jl 0x49e54c
push 0
push 0
push 0x100
lea eax, [ebp - 0x210]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x610]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea eax, [ebp - 0x210]
push eax
lea ecx, [ebp - 0x634]
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__20]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x614]
push eax
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__27]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x634]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
push dword [ebp - 0x618]
lea ecx, [ebp - 0x614]
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__29]
test eax, eax
je 0x49e67f
lea eax, [ebp - 0x61c]
mov dword [ebp - 0x61c], 0x100
push eax
lea eax, [ebp - 0x110]
mov dword [ebp - 0x620], 0x100
push eax
lea eax, [ebp - 0x624]
inc esi
push eax
push 0
lea eax, [ebp - 0x620]
push eax
lea eax, [ebp - 0x410]
push eax
push esi
push dword [ebp - 0x62c]
call edi
test eax, eax
je 0x49e490
push dword [ebp - 0x62c]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call esi
push dword [ebp - 0x630]
call esi
push dword [ebp - 0x628]
call esi
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x614]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x618]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0055c86d
mov esp, ebp
pop ebp
ret 4
mov ax, word [ebp - 0x410]
lea ecx, [ebp - 0x410]
test ax, ax
je 0x49e6df
movzx esi, ax
mov edi, 0x78
nop dword [eax]
movzx eax, si
mov edx, ecx
sub eax, 0x2d
je 0x49e6b9
sub eax, 1
je 0x49e6b4
sub eax, 0xc
jne 0x49e6d1
mov word [ecx], di
jmp 0x49e6d1
lea eax, [ebp - 0x410]
cmp ecx, eax
jbe 0x49e6d1
cmp word [ecx - 2], 0x20
jne 0x49e6d1
mov word [ecx - 2], di
mov word [edx], di
movzx eax, word [edx + 2]
lea ecx, [edx + 2]
mov esi, eax
test ax, ax
jne 0x49e6a0
mov eax, dword [ebx + 8]
test eax, eax
je 0x49e6f0
push eax
call dword [sym.imp.mfc140u.dll_operator_2]
add esp, 4
lea ecx, [ebp - 0x410]
call fcn.00519590
push dword [ebp - 0x62c]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebx + 8], eax
call esi
push dword [ebp - 0x630]
call esi
push dword [ebp - 0x628]
call esi
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x614]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x618]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
mov al, 1
jmp 0x49e661
call fcn.0055c99e
int3