Function at 0x4bd576
Capabilities:
Check if file exists
Get file attributes
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x575325
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x390
mov dword [ebp - 0x39c], ecx
mov byte [ebp - 0x154], 0
lea ecx, [ebp - 0x110]
call fcn.00401420
mov dword [ebp - 4], 0
push 0x6784a8
push 0
push str.EnableHT3315Connect
push 0x5c62d0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov dword [0x5edf44], eax
push 0x6784a8
push 0
push 0x5c62dc
push 0x5c62ec
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov dword [0x5edf40], eax
cmp dword [0x5edf40], 0
je 0x4bd6e0
push 0x104
push 0
lea eax, [ebp - 0x258]
push eax
call fcn.0054bf90
add esp, 0xc
push 0x6784a8
push 0x104
lea ecx, [ebp - 0x258]
push ecx
push str.C:MPEVNSMIHandler.ini
push str.HandlerEnable_ReferenceFile
push 0x5c6328
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push pe_nt_image_headers32
push 0
lea edx, [ebp - 0x10c]
push edx
call fcn.0054bf90
add esp, 0xc
push 0x6784a8
push pe_nt_image_headers32
lea eax, [ebp - 0x10c]
push eax
push 0x5c6334
push str.HandlerEnable_ReferenceSection
push 0x5c635c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push pe_nt_image_headers32
push 0
lea ecx, [ebp - 0x358]
push ecx
call fcn.0054bf90
add esp, 0xc
push 0x6784a8
push pe_nt_image_headers32
lea edx, [ebp - 0x358]
push edx
push str.HandlerEnable
push str.HandlerEnable_ReferenceKeyName
push 0x5c6398
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [ebp - 0x258]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4bd6e0
lea ecx, [ebp - 0x258]
push ecx
push 0
lea edx, [ebp - 0x358]
push edx
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov dword [0x5edf44], eax
cmp dword [0x5edf44], 0
jne 0x4bd700
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x110]
call fcn.0056206c
jmp 0x4bd8b1
push 0x40
push 0
lea ecx, [ebp - 0x398]
push ecx
call fcn.0054bf90
add esp, 0xc
lea edx, [ebp - 0x258]
push edx
push 0x40
lea eax, [ebp - 0x398]
push eax
push str.192.168.0.1
push 0x5c63b0
push 0x5c63b4
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push 0x40
push 0
lea ecx, [ebp - 0x150]
push ecx
call fcn.0054bf90
add esp, 0xc
lea edx, [ebp - 0x258]
push edx
push 0x40
lea eax, [ebp - 0x150]
push eax
push str.7000
push str.PORT
push str.Handler
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
cmp dword [0x5edf3c], 0
je 0x4bd783
mov ecx, 0x5edf18
call fcn.00527693
push 1
push 2
lea ecx, [ebp - 0x150]
push ecx
lea edx, [ebp - 0x398]
push edx
mov ecx, 0x5edf18
call fcn.0052747e
mov byte [ebp - 0x154], al
mov eax, dword [ebp - 0x154]
and eax, 0xff
test eax, eax
je 0x4bd839
mov ecx, 0x5edf18
call fcn.00527620
and eax, 0xff
test eax, eax
je 0x4bd839
mov dword [0x5edf3c], 1
push str.TEST_Command
lea ecx, [ebp - 0x110]
call fcn.005621f5
push 0xffffffffffffffff
lea ecx, [ebp - 0x110]
call fcn.00401440
push eax
lea ecx, [ebp - 0x110]
call fcn.00401440
push eax
lea ecx, [ebp - 0x110]
call fcn.0056249c
push eax
mov ecx, 0x5edf18
call fcn.00527a75
lea ecx, [ebp - 0x150]
push ecx
lea edx, [ebp - 0x398]
push edx
push str.Net_PLC_Connect____s___port_:__s
lea eax, [ebp - 0x110]
push eax
call fcn.0055f827
add esp, 0x10
jmp 0x4bd857
mov dword [0x5edf3c], 0
push str.Ethernet_PLC_DisConnected
lea ecx, [ebp - 0x110]
push ecx
call fcn.0055f827
add esp, 8
push 0
push 4
lea ecx, [ebp - 0x110]
call fcn.005287a0
push eax
mov ecx, 0x5eaa08
call fcn.004be2d0
lea ecx, [ebp - 0x110]
call fcn.00401440
push eax
push 0
lea ecx, [ebp - 0x110]
call fcn.00401440
push eax
lea ecx, [ebp - 0x110]
call fcn.0056249c
push eax
call fcn.004b74bd
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x110]
call fcn.0056206c
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4