Function at 0x406b99
Capabilities:
Persist via windows service
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x150
lea eax, [ebp - 0x140]
push eax
call fcn.00401b0e
add esp, 4
test eax, eax
jge 0x406bbc
xor eax, eax
jmp 0x406fa5
lea ecx, [ebp - 0x140]
push ecx
mov edx, dword [str.SystemCurrentControlSetServicesClass_]
push edx
push 0x40e7c0
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [ebp - 0x144]
push ecx
lea edx, [ebp - 0x104]
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
mov eax, dword [str.mxsiport.dll]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
mov ecx, dword [str.mxsiport.dll]
push ecx
push 1
push 0
mov edx, dword [str.ConfigDialog]
push edx
mov eax, dword [ebp - 0x144]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push 0x1a
push 0x40dea8
push 3
push 0
mov ecx, dword [0x40de40]
push ecx
mov edx, dword [ebp - 0x144]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [str.vcomm]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
mov ecx, dword [str.vcomm]
push ecx
push 1
push 0
mov edx, dword [str.DevLoader]
push edx
mov eax, dword [ebp - 0x144]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [str.mxsiport.dll_EnumPropPages]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
mov edx, dword [str.mxsiport.dll_EnumPropPages]
push edx
push 1
push 0
mov eax, dword [str.EnumPropPages]
push eax
mov ecx, dword [ebp - 0x144]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [str.mxsiser.vxd]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
mov eax, dword [str.mxsiser.vxd]
push eax
push 1
push 0
mov ecx, dword [str.PortDriver]
push ecx
mov edx, dword [ebp - 0x144]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push 1
push 0x40dec8
push 3
push 0
mov eax, dword [str.PortSubClass]
push eax
mov ecx, dword [ebp - 0x144]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [ebp - 0x144]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [str.EnumMF_]
push ecx
push str._sCHILD00_02X
lea edx, [ebp - 0x104]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x144]
push eax
lea ecx, [ebp - 0x104]
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
mov edx, dword [ebp - 0x144]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [str.EnumMF_]
push edx
push str._sCHILD00_02X_s
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
mov ecx, dword [ebp + 8]
add ecx, 1
push ecx
push str.MX02_02d
lea edx, [ebp - 0x150]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x144]
push eax
lea ecx, [ebp - 0x104]
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
mov edx, dword [str.ports]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
mov eax, dword [str.ports]
push eax
push 1
push 0
mov ecx, dword [str.Class]
push ecx
mov edx, dword [ebp - 0x144]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push 4
push 0x4119fc
push 3
push 0
mov eax, dword [str.ConfigFlags]
push eax
mov ecx, dword [ebp - 0x144]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea edx, [ebp - 0x12c]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
lea eax, [ebp - 0x12c]
push eax
push 1
push 0
mov ecx, dword [str.DeviceDesc]
push ecx
mov edx, dword [ebp - 0x144]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea eax, [ebp - 0x140]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
lea ecx, [ebp - 0x140]
push ecx
push 1
push 0
mov edx, dword [str.Driver]
push edx
mov eax, dword [ebp - 0x144]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea ecx, [ebp - 0x150]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
lea edx, [ebp - 0x150]
push edx
push 1
push 0
mov eax, dword [str.HardwareID]
push eax
mov ecx, dword [ebp - 0x144]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [str.Moxa_Technologies]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
mov eax, dword [str.Moxa_Technologies]
push eax
push 1
push 0
mov ecx, dword [0x40de08]
push ecx
mov edx, dword [ebp - 0x144]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [ebp - 0x144]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [str.Enum_]
push eax
push str._s_sChild00_02X
lea ecx, [ebp - 0x104]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
lea edx, [ebp - 0x144]
push edx
lea eax, [ebp - 0x104]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
lea ecx, [ebp - 0x150]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
lea edx, [ebp - 0x150]
push edx
push 1
push 0
mov eax, dword [str.HardwareID]
push eax
mov ecx, dword [ebp - 0x144]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push 1
push 0x411a00
push 3
push 0
mov edx, dword [str.ResourceMap]
push edx
mov eax, dword [ebp - 0x144]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [ebp + 0x14]
push ecx
push str.COM_d
lea edx, [ebp - 0x104]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
mov dword [ebp - 0x130], eax
mov ecx, dword [ebp - 0x130]
push ecx
lea edx, [ebp - 0x104]
push edx
push 1
push 0
mov eax, dword [str.PORTNAME]
push eax
mov ecx, dword [ebp - 0x144]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [ebp - 0x144]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
mov esp, ebp
pop ebp
ret