Function at 0x40ca30
Capabilities:
Query or enumerate registry value
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x198
mov eax, dword [0x625e6c]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x158], ecx
push 0x104
push 0
lea eax, [ebp - 0x134]
push eax
call fcn.00586690
add esp, 0xc
mov dword [ebp - 0x160], 0
push 0x5fc184
mov ecx, dword [ebp + 8]
push ecx
call fcn.00588e5a
add esp, 8
mov dword [ebp - 0x174], eax
cmp dword [ebp - 0x174], 0
jne 0x40caa7
push 0x30
push str.Can_NOT_Open_File
push str.Open_File_Fail
mov ecx, dword [ebp - 0x158]
call fcn.0043e7ea
jmp 0x40d2c2
mov edx, dword [ebp - 0x174]
push edx
call fcn.0058964a
add esp, 4
push 0x655b10
push 0
push str.Auto
push 0x5fc1b4
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov byte [0x656358], al
mov eax, dword [ebp + 8]
push eax
push 0
push 0x5fc1c0
push 0x5fc1d0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov byte [0x656359], al
movzx ecx, byte [0x656359]
push ecx
push 0x45e
mov ecx, dword [ebp - 0x158]
call fcn.004432ac
mov ecx, eax
call fcn.0040b680
movzx edx, byte [0x656359]
cmp edx, 1
jne 0x40cb3e
push 1
push 0x41f
mov ecx, dword [ebp - 0x158]
call fcn.004432ac
mov ecx, eax
call fcn.00443d45
mov ecx, dword [ebp - 0x158]
call fcn.0040fcb0
jmp 0x40cb57
push 0
push 0x41f
mov ecx, dword [ebp - 0x158]
call fcn.004432ac
mov ecx, eax
call fcn.00443d45
mov eax, dword [ebp + 8]
push eax
push 0x104
lea ecx, [ebp - 0x134]
push ecx
push 0
push str.MESUrl
push 0x5fc1e4
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov dword [ebp - 0x160], eax
lea edx, [ebp - 0x134]
mov dword [ebp - 0x164], edx
mov eax, dword [ebp - 0x164]
add eax, 1
mov dword [ebp - 0x184], eax
mov ecx, dword [ebp - 0x164]
mov dl, byte [ecx]
mov byte [ebp - 0x15a], dl
add dword [ebp - 0x164], 1
cmp byte [ebp - 0x15a], 0
jne 0x40cb9a
mov eax, dword [ebp - 0x164]
sub eax, dword [ebp - 0x184]
mov dword [ebp - 0x188], eax
mov ecx, dword [ebp - 0x188]
push ecx
lea edx, [ebp - 0x134]
push edx
push 0x65618b
call fcn.00586110
add esp, 0xc
mov eax, dword [ebp + 8]
push eax
push 1
push str.ConnectType
push 0x5fc1fc
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov byte [0x656366], al
movzx ecx, byte [0x656366]
test ecx, ecx
jne 0x40cc12
mov byte [0x656366], 1
mov edx, dword [ebp + 8]
push edx
push 0
push 0x5fc208
push 0x5fc210
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov byte [0x656078], al
movzx eax, byte [0x656078]
push eax
push 0x449
mov ecx, dword [ebp - 0x158]
call fcn.004432ac
mov ecx, eax
call fcn.0040b620
mov ecx, dword [ebp + 8]
push ecx
push 0
push 0x5fc21c
push 0x5fc228
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov byte [0x65607a], al
movzx edx, byte [0x65607a]
push edx
push 0x44a
mov ecx, dword [ebp - 0x158]
call fcn.004432ac
mov ecx, eax
call fcn.0040b620
mov eax, dword [ebp + 8]
push eax
push 0
push 0x5fc234
push 0x5fc240
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov byte [0x65607b], al
movzx ecx, byte [0x65607b]
push ecx
push 0x44b
mov ecx, dword [ebp - 0x158]
call fcn.004432ac
mov ecx, eax
call fcn.0040b620
mov edx, dword [ebp + 8]
push edx
push 0
push 0x5fc24c
push 0x5fc250
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov byte [0x656079], al
movzx eax, byte [0x656079]
push eax
push 0x448
mov ecx, dword [ebp - 0x158]
call fcn.004432ac
mov ecx, eax
call fcn.0040b620
mov ecx, dword [ebp + 8]
push ecx
push 0
push 0x5fc25c
push 0x5fc268
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov byte [0x65607c], al
movzx edx, byte [0x65607c]
push edx
push 0x44c
mov ecx, dword [ebp - 0x158]
call fcn.004432ac
mov ecx, eax
call fcn.0040b620
mov eax, dword [ebp + 8]
push eax
push 0
push 0x5fc274
push 0x5fc284
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov byte [0x65607d], al
movzx ecx, byte [0x65607d]
push ecx
push 0x44d
mov ecx, dword [ebp - 0x158]
call fcn.004432ac
mov ecx, eax
call fcn.0040b620
mov edx, dword [ebp + 8]
push edx
push 0
push str.MaxPoweron
push 0x5fc29c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov byte [0x65607e], al
movzx eax, byte [0x65607e]
push eax
push 0x44e
mov ecx, dword [ebp - 0x158]
call fcn.004432ac
mov ecx, eax
call fcn.0040b620
mov ecx, dword [ebp + 8]
push ecx
push 0
push 0x5fc2a8
push 0x5fc2b4
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov byte [0x65607f], al
movzx edx, byte [0x65607f]
push edx
push 0x472
mov ecx, dword [ebp - 0x158]
call fcn.004432ac
mov ecx, eax
call fcn.0040b620
mov eax, dword [ebp + 8]
push eax
push 0
push 0x5fc2c0
push 0x5fc2cc
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov byte [0x656080], al
movzx ecx, byte [0x656080]
push ecx
push 0x473
mov ecx, dword [ebp - 0x158]
call fcn.004432ac
mov ecx, eax
call fcn.0040b620
mov edx, dword [ebp + 8]
push edx
push 0
push 0x5fc2d8
push 0x5fc2e8
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov byte [0x656081], al
movzx eax, byte [0x656081]
push eax
push 0x474
mov ecx, dword [ebp - 0x158]
call fcn.004432ac
mov ecx, eax
call fcn.0040b620
mov ecx, dword [ebp + 8]
push ecx
push 0
push str.EUI64
push 0x5fc2fc
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov byte [0x656082], al
movzx edx, byte [0x656082]
push edx
push 0x479
mov ecx, dword [ebp - 0x158]
call fcn.004432ac
mov ecx, eax
call fcn.0040b620
mov eax, dword [ebp + 8]
push eax
push 0x104
lea ecx, [ebp - 0x134]
push ecx
push 0
push 0x5fc308
push 0x5fc314
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov dword [ebp - 0x160], eax
lea edx, [ebp - 0x134]
push edx
push 0x3fe
mov ecx, dword [ebp - 0x158]
call fcn.004432ac
mov ecx, eax
call fcn.00443cf3
mov eax, dword [ebp + 8]
push eax
push 0x104
lea ecx, [ebp - 0x134]
push ecx
push 0
push 0x5fc320
push 0x5fc328
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov dword [ebp - 0x160], eax
lea edx, [ebp - 0x134]
push edx
push 0x406
mov ecx, dword [ebp - 0x158]
call fcn.004432ac
mov ecx, eax
call fcn.00443cf3
mov eax, dword [ebp + 8]
push eax
push 0x104
lea ecx, [ebp - 0x134]
push ecx
push 0
push 0x5fc334
push 0x5fc33c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov dword [ebp - 0x160], eax
lea edx, [ebp - 0x134]
push edx
push 0x408
mov ecx, dword [ebp - 0x158]
call fcn.004432ac
mov ecx, eax
call fcn.00443cf3
mov eax, dword [ebp + 8]
push eax
push 0
push 0x5fc348
push 0x5fc354
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov dword [0x634f74], eax
mov ecx, dword [ebp + 8]
push ecx
push 0x104
lea edx, [ebp - 0x134]
push edx
push 0
push 0x5fc364
push 0x5fc370
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov dword [ebp - 0x160], eax
lea eax, [ebp - 0x134]
push eax
mov ecx, 0x655e3c
call fcn.00406ab0
mov ecx, dword [ebp + 8]
push ecx
push 0
push 0x5fc380
push 0x5fc38c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov byte [0x656083], al
movzx edx, byte [0x656083]
push edx
push 0x486
mov ecx, dword [ebp - 0x158]
call fcn.004432ac
mov ecx, eax
call fcn.0040b620
mov eax, dword [ebp + 8]
push eax
push 0
push 0x5fc398
push 0x5fc3a8
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov byte [0x656084], al
movzx ecx, byte [0x656084]
push ecx
push 0x489
mov ecx, dword [ebp - 0x158]
call fcn.004432ac
mov ecx, eax
call fcn.0040b620
mov dword [ebp - 0x18c], str.HARDWAREDEVICEMAPSERIALCOMM_
lea edx, [ebp - 0x180]
push edx
push 0x20019
push 0
mov eax, dword [ebp - 0x18c]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 0x190], eax
cmp dword [ebp - 0x190], 0
jne 0x40d174
mov dword [ebp - 0x178], 0x19
mov dword [ebp - 0x17c], 0x19
mov dword [ebp - 0x16c], 0
mov dword [ebp - 0x170], 0
mov ecx, dword [ebp - 0x170]
mov dword [ebp - 0x194], ecx
lea edx, [ebp - 0x17c]
push edx
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x198]
push ecx
push 0
lea edx, [ebp - 0x178]
push edx
lea eax, [ebp - 0x150]
push eax
mov ecx, dword [ebp - 0x194]
push ecx
mov edx, dword [ebp - 0x180]
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
mov dword [ebp - 0x168], eax
mov eax, dword [ebp - 0x170]
add eax, 1
mov dword [ebp - 0x170], eax
cmp dword [ebp - 0x168], 0
je 0x40d0fb
cmp dword [ebp - 0x168], 0xea
jne 0x40d12b
mov ecx, 1
imul edx, ecx, 3
lea eax, [ebp + edx - 0x30]
push eax
call fcn.0058e780
add esp, 4
mov ecx, dword [ebp - 0x16c]
mov byte [ecx + 0x656380], al
mov edx, dword [ebp - 0x16c]
add edx, 1
mov dword [ebp - 0x16c], edx
mov dword [ebp - 0x178], 0x19
mov dword [ebp - 0x17c], 0x19
cmp dword [ebp - 0x168], 0
je 0x40d08f
cmp dword [ebp - 0x168], 0xea
je 0x40d08f
mov al, byte [ebp - 0x16c]
mov byte [0x65637f], al
mov ecx, dword [ebp - 0x180]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x655b10
push 0xff
push 0x5fc3d4
push 0x5fc3e8
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov byte [ebp - 0x15b], al
mov byte [0x6563c0], 0xff
mov byte [ebp - 0x151], 0
jmp 0x40d1b3
mov dl, byte [ebp - 0x151]
add dl, 1
mov byte [ebp - 0x151], dl
movzx eax, byte [ebp - 0x151]
movzx ecx, byte [0x65637f]
cmp eax, ecx
jge 0x40d1ec
movzx edx, byte [ebp - 0x15b]
movzx eax, byte [ebp - 0x151]
movzx ecx, byte [eax + 0x656380]
cmp edx, ecx
jne 0x40d1ea
mov dl, byte [ebp - 0x151]
mov byte [0x6563c0], dl
jmp 0x40d1a4
mov dword [0x6563c3], 0x1c200
mov byte [0x6563c7], 8
mov byte [0x6563c9], 0
mov byte [0x6563c8], 0
xor eax, eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov byte [ebp - 0x159], 0
jmp 0x40d231
mov cl, byte [ebp - 0x159]
add cl, 1
mov byte [ebp - 0x159], cl
movzx edx, byte [ebp - 0x159]
movzx eax, byte [0x65637f]
cmp edx, eax
jge 0x40d280
movzx ecx, byte [ebp - 0x159]
movzx edx, byte [ecx + 0x656380]
push edx
push str.COM_d
lea eax, [ebp - 0x14]
push eax
call fcn.00402210
add esp, 0xc
lea ecx, [ebp - 0x14]
push ecx
push 0x45f
mov ecx, dword [ebp - 0x158]
call fcn.004432ac
mov ecx, eax
call fcn.0040b6b0
jmp 0x40d222
movzx edx, byte [0x6563c0]
push edx
push 0x45f
mov ecx, dword [ebp - 0x158]
call fcn.004432ac
mov ecx, eax
call fcn.0040b680
mov eax, dword [ebp + 8]
push eax
push 0x28
push 0x6563ca
push 0
push 0x5fc3fc
push 0x5fc408
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov dword [ebp - 0x160], eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00582196
mov esp, ebp
pop ebp
ret 4