Function at 0x404fa0
Capabilities:
Read .ini file

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4134ec
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x3b8
mov eax, dword [0x435040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov edi, ecx
push 0x80
lea eax, [ebp - 0x118]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x98]
push 0x80
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov eax, esi
cmp dword [esi + 0x14], 0xf
jbe 0x40501b
mov eax, dword [esi]
push eax
push 0
push str.ENABLE
push str.61850_SERVER
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
cmp dword [esi + 0x14], 0xf
mov ecx, esi
mov dword [ebp - 0x120], eax
jbe 0x40503e
mov ecx, dword [esi]
push ecx
push 0x80
lea eax, [ebp - 0x118]
push eax
push 0x431532
push 0x4315d8
push str.61850_SERVER
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
cmp dword [esi + 0x14], 0xf
mov eax, esi
jbe 0x40506a
mov eax, dword [esi]
push eax
push 0x80
lea eax, [ebp - 0x98]
push eax
push 0x431532
push 0x4315dc
push str.61850_SERVER
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea ecx, [ebp - 0x98]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405095
sub ecx, edx
cmp ecx, 1
jae 0x405100
cmp dword [esi + 0x14], 0xf
mov eax, esi
jbe 0x4050ad
mov eax, dword [esi]
mov edi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
push eax
push 0x4315e0
push str.ENABLE
push str.61850_SERVER
call edi
cmp dword [esi + 0x14], 0xf
mov eax, esi
jbe 0x4050cf
mov eax, dword [esi]
push eax
push str.127.0.0.1
push 0x4315d8
push str.61850_SERVER
call edi
cmp dword [esi + 0x14], 0xf
jbe 0x4050e9
mov esi, dword [esi]
push esi
push str.GB_DU.icd
push 0x4315dc
push str.61850_SERVER
call edi
jmp 0x40578d
cmp dword [ebp - 0x120], 1
jb 0x40578d
push dword [0x43509c]
lea ecx, [ebp - 0x394]
mov byte [ebp - 0x369], 1
call fcn.00406ce0
lea ecx, [ebp - 0x394]
mov dword [ebp - 4], 0
call fcn.004042c0
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x380]
mov byte [ebp - 0x36a], al
cmp ecx, 0xf
jbe 0x405186
mov edx, dword [ebp - 0x394]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x405176
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x405176
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00412050
mov al, byte [ebp - 0x36a]
add esp, 8
test al, al
je 0x405485
push 0x210
lea eax, [ebp - 0x368]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
xor eax, eax
mov dword [ebp - method.regUtil.virtual_0], vtable.regUtil.0
add esp, 0xc
mov dword [ebp - 0x360], 0
mov dword [ebp - 0x35c], 0
mov word [ebp - 0x358], ax
mov dword [ebp - 4], 1
xor ecx, ecx
mov dword [ebp - 0x120], eax
nop word [eax + eax]
movzx eax, word [ecx + str.SoftwareGABOWATCHDOG]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x35a], ax
test ax, ax
jne 0x4051e0
mov eax, dword [ebp - 0x368]
lea ecx, [ebp - 0x358]
push 0xf013f
push ecx
push 0x80000001
mov eax, dword [eax + 8]
lea ecx, [ebp - 0x368]
mov dword [ebp - 0x364], 0x80000001
call eax
mov dword [ebp - 0x360], eax
mov dword [ebp - 0x35c], 0
test eax, eax
jne 0x405293
xor ecx, ecx
nop dword [eax]
movzx eax, word [ecx + str.SoftwareGABOWATCHDOG]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x35a], ax
test ax, ax
jne 0x405240
mov eax, dword [ebp - 0x368]
lea ecx, [ebp - 0x358]
push 0xf013f
push ecx
push 0x80000001
mov eax, dword [eax + 4]
lea ecx, [ebp - 0x368]
mov dword [ebp - 0x364], 0x80000001
call eax
mov dword [ebp - 0x360], eax
mov dword [ebp - 0x35c], 0
mov ecx, dword [ebp - 0x368]
mov dword [ebp - 0x11c], 4
mov edx, dword [ecx + 0x24]
lea ecx, [ebp - 0x11c]
push ecx
lea ecx, [ebp - 0x120]
push ecx
push 0
push str.AliveSvr
push eax
lea ecx, [ebp - 0x368]
call edx
mov ecx, dword [ebp - 0x120]
cmp ecx, 1
je 0x4053f2
xorps xmm0, xmm0
mov byte [ebp - 0x369], 0
movups xmmword [ebp - 0x13c], xmm0
mov dword [ebp - 0x12c], 0
mov dword [ebp - 0x128], 0xf
mov byte [ebp - 0x13c], 0
mov eax, dword [str.DiagnosisSvr.exe]
sub esp, 8
mov dword [ebp - 0x374], eax
mov eax, esp
mov dword [ebp - 0x370], ecx
lea ecx, [ebp - 0x37c]
movq qword [ebp - 0x37c], xmm0
mov dword [ebp - 0x37c], 0xb0000000
mov dword [ebp - 0x378], 0x10000004
mov byte [ebp - 4], 2
mov dword [eax + 4], ecx
lea ecx, [ebp - 0x394]
push 0x1b
push str._E____alive_check_fail.
mov dword [eax], 2
call fcn.00409940
add esp, 0x10
lea eax, [ebp - 0x394]
lea ecx, [ebp - 0x13c]
push eax
call fcn.00406c60
mov ecx, dword [ebp - 0x380]
cmp ecx, 0xf
jbe 0x4053a7
mov edx, dword [ebp - 0x394]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40539d
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40539d
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00412050
add esp, 8
lea ecx, [ebp - 0x13c]
call fcn.00404650
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x128]
cmp ecx, 0xf
jbe 0x4053f2
mov edx, dword [ebp - 0x13c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4053e8
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4053e8
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00412050
add esp, 8
mov eax, dword [ebp - 0x368]
lea ecx, [ebp - 0x11c]
push 4
push ecx
push 4
push str.AliveSvr
push dword [ebp - 0x360]
lea ecx, [ebp - 0x368]
mov dword [ebp - 0x11c], 2
call dword [eax + 0x28]
mov dword [ebp - 4], 4
mov eax, vtable.regUtil.0
mov esi, dword [ebp - 0x35c]
mov dword [ebp - 0x368], eax
test esi, esi
je 0x405456
push esi
lea ecx, [ebp - 0x368]
call fcn.00401410
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x368]
mov esi, dword [ebp - 0x360]
test esi, esi
je 0x405471
push esi
lea ecx, [ebp - 0x368]
call dword [eax + 0x20]
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [ebp - 0x369], 0
mov dword [ebp - 4], 0xffffffff
jne 0x40578d
cmp dword [edi + 0x14], 0xf
xorps xmm0, xmm0
movups xmmword [ebp - 0x3ac], xmm0
mov dword [ebp - 0x39c], 0
mov eax, edi
jbe 0x4054a3
mov eax, dword [edi]
mov edx, dword [edi + 0x10]
mov dword [ebp - 0x398], eax
mov eax, dword [str.DiagnosisSvr.exe]
mov dword [ebp - 0x390], eax
lea eax, [ebp - 0x118]
mov dword [ebp - 0x394], edx
mov dword [ebp - 0x3ac], 0xc0000000
mov dword [ebp - 0x3a8], 0xb0000008
mov dword [ebp - 0x38c], eax
mov dword [ebp - 0x3a4], 0xb000000c
jbe 0x4054eb
mov edi, dword [edi]
lea eax, [ebp - 0x98]
mov dword [ebp - 0x388], edi
mov dword [ebp - 0x380], eax
lea ecx, [ebp - 0x3ac]
sub esp, 8
mov dword [ebp - 0x384], edx
mov eax, esp
mov dword [ebp - 0x3a0], 0xc0000010
mov dword [ebp - 0x39c], 0xb0000018
mov dword [ebp - 4], 0xffffffff
push 0x37
mov dword [eax + 4], ecx
lea ecx, [ebp - 0x154]
push str.IEC61850_Server__IEC61850_ServerGABO_CID
mov dword [eax], 5
call fcn.00409940
add esp, 0x10
mov dword [ebp - 4], 6
xorps xmm0, xmm0
movups xmmword [ebp - 0x13c], xmm0
mov dword [ebp - 0x12c], 0
mov dword [ebp - 0x128], 0xf
mov byte [ebp - 0x13c], 0
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x154]
cmp dword [ebp - 0x140], 0xf
cmova ecx, dword [ebp - 0x154]
call fcn.00404e00
test al, al
je 0x405643
mov eax, dword [str.DiagnosisSvr.exe]
lea ecx, [ebp - 0x124]
mov dword [ebp - 0x120], eax
sub esp, 8
mov eax, esp
mov dword [ebp - 0x124], 0xb0000000
mov byte [ebp - 4], 7
push 0x11
mov dword [eax + 4], ecx
lea ecx, [ebp - 0x394]
push str.StartProcess___
mov dword [eax], 1
call fcn.00409940
add esp, 0x10
lea eax, [ebp - 0x394]
lea ecx, [ebp - 0x13c]
push eax
call fcn.00406c60
mov ecx, dword [ebp - 0x380]
cmp ecx, 0xf
jbe 0x405628
mov edx, dword [ebp - 0x394]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40561e
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40561e
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00412050
add esp, 8
lea ecx, [ebp - 0x13c]
call fcn.00404650
push 0x3a98
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x405700
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [str.DiagnosisSvr.exe]
sub esp, 8
mov dword [ebp - 0x370], eax
xorps xmm0, xmm0
mov eax, esp
mov dword [ebp - 0x374], ecx
movq qword [ebp - 0x37c], xmm0
lea ecx, [ebp - 0x37c]
mov dword [ebp - 0x37c], 0xb0000000
mov dword [ebp - 0x378], 0x20000004
mov byte [ebp - 4], 7
mov dword [eax + 4], ecx
lea ecx, [ebp - 0x3c4]
push 0x1e
push str._E__StartProcess____Fail__
mov dword [eax], 2
call fcn.00409940
add esp, 0x10
lea eax, [ebp - 0x3c4]
lea ecx, [ebp - 0x13c]
push eax
call fcn.00406c60
mov ecx, dword [ebp - 0x3b0]
cmp ecx, 0xf
jbe 0x4056f5
mov edx, dword [ebp - 0x3c4]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4056eb
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4056eb
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00412050
add esp, 8
lea ecx, [ebp - 0x13c]
call fcn.00404650
mov ecx, dword [ebp - 0x128]
cmp ecx, 0xf
jbe 0x405736
mov edx, dword [ebp - 0x13c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40572c
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40577d
push ecx
push edx
call fcn.00412050
add esp, 8
mov ecx, dword [ebp - 0x140]
mov dword [ebp - 0x12c], 0
mov dword [ebp - 0x128], 0xf
mov byte [ebp - 0x13c], 0
cmp ecx, 0xf
jbe 0x40578d
mov edx, dword [ebp - 0x154]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x405783
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x405783
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00412050
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00412042
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret