Function at 0x41165d
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x441980
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x490
xor eax, eax
mov al, byte [0x45b512]
and eax, 1
test eax, eax
jne 0x4116bd
mov cl, byte [0x45b512]
or cl, 1
mov byte [0x45b512], cl
lea edx, [ebp - 0x45c]
push edx
lea eax, [ebp - 0x460]
push eax
mov ecx, 0x45b518
call fcn.00412660
push 0x411a47
call fcn.00440234
add esp, 4
xor ecx, ecx
mov cl, byte [0x45b512]
and ecx, 2
test ecx, ecx
jne 0x4116ff
mov dl, byte [0x45b512]
or dl, 2
mov byte [0x45b512], dl
push 0x455ad8
push 0
push str.SERVICE_MODE
push 0x455af4
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
sub eax, 1
neg eax
sbb eax, eax
inc eax
mov byte [0x45b0e8], al
push 0x455af8
push 0
push str.AccessLevel
push 0x455b10
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
xor ecx, ecx
cmp eax, 3
sete cl
mov byte [ebp - 0x2c], cl
xor edx, edx
mov dl, byte [0x45b0e8]
test edx, edx
jne 0x411739
mov eax, dword [ebp - 0x2c]
and eax, 0xff
test eax, eax
je 0x411740
mov al, 1
jmp 0x411a39
push 0x16
mov ecx, dword [ebp + 8]
call fcn.004120e0
movsx ecx, al
cmp ecx, 0x24
jne 0x411759
mov al, 1
jmp 0x411a39
xor edx, edx
mov dl, byte [0x455a41]
test edx, edx
je 0x411874
mov byte [0x455a41], 0
push 0x455b14
push str.c:_fidiacustomcncmsgtype.dat
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x411874
mov dword [0x45b528], 1
mov eax, dword [ebp - 0x30]
push eax
push 0x400
lea ecx, [ebp - 0x430]
push ecx
call dword [sym.imp.MSVCRT.dll_fgets]
add esp, 0xc
test eax, eax
je 0x411867
mov dword [ebp - 0x438], 0
mov dword [ebp - 0x434], 0
lea edx, [ebp - 0x434]
push edx
lea eax, [ebp - 0x438]
push eax
lea ecx, [ebp - 0x458]
push ecx
push str._s__d__c
lea edx, [ebp - 0x430]
push edx
call dword [sym.imp.MSVCRT.dll_sscanf]
add esp, 0x14
cmp eax, 3
jne 0x411862
cmp dword [ebp - 0x434], 0x53
je 0x411862
lea eax, [ebp - 0x474]
push eax
lea ecx, [ebp - 0x458]
push ecx
lea ecx, [ebp - 0x470]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const___class_std::allocator_char__const__]
mov dword [ebp - 4], 0
lea edx, [ebp - 0x438]
push edx
lea eax, [ebp - 0x470]
push eax
mov ecx, 0x45b518
call fcn.004126b0
mov ecx, eax
call fcn.00412510
mov cl, byte [ebp - 0x434]
mov byte [eax], cl
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x470]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
jmp 0x41179a
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov ecx, dword [ebp + 8]
call fcn.00402550
add eax, 0xf
push eax
call fcn.0041160d
add esp, 4
and eax, 0xff
test eax, eax
je 0x411898
mov al, 1
jmp 0x411a39
cmp dword [0x45b528], 0
jne 0x4118a8
mov al, 1
jmp 0x411a39
lea eax, [ebp - 0x478]
push eax
push 3
push 0xf
lea ecx, [ebp - 0x47c]
push ecx
mov ecx, dword [ebp + 8]
call sub.MFC42.DLL_CString::Mid
mov dword [ebp - 0x498], eax
mov edx, dword [ebp - 0x498]
mov dword [ebp - 0x49c], edx
mov dword [ebp - 4], 1
mov ecx, dword [ebp - 0x49c]
call fcn.00402550
push eax
lea ecx, [ebp - 0x28]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const___class_std::allocator_char__const__]
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x47c]
call sub.MFC42.DLL_CString::CString
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x14]
push ecx
mov ecx, 0x45b518
call fcn.00412760
lea edx, [ebp - 0x14]
push edx
lea eax, [ebp - 0x480]
push eax
mov ecx, 0x45b518
call fcn.00412690
mov ecx, eax
call fcn.00412850
and eax, 0xff
test eax, eax
je 0x411958
mov byte [ebp - 0x484], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov al, byte [ebp - 0x484]
jmp 0x411a39
mov ecx, dword [ebp + 8]
call fcn.00402550
add eax, 0x12
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
mov dword [ebp - 0x18], eax
lea ecx, [ebp - 0x18]
push ecx
lea edx, [ebp - 0x10]
push edx
lea ecx, [ebp - 0x14]
call fcn.00412830
mov ecx, eax
add ecx, 0x10
call fcn.00412550
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x488]
push ecx
lea ecx, [ebp - 0x14]
call fcn.00412830
mov ecx, eax
add ecx, 0x10
call fcn.004124f0
mov ecx, eax
call fcn.00412640
and eax, 0xff
test eax, eax
je 0x4119d6
mov byte [ebp - 0x48c], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov al, byte [ebp - 0x48c]
jmp 0x411a39
lea ecx, [ebp - 0x10]
call fcn.00412620
movsx edx, byte [eax + 4]
cmp edx, 0x55
jne 0x411a06
mov byte [ebp - 0x490], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov al, byte [ebp - 0x490]
jmp 0x411a39
lea ecx, [ebp - 0x10]
call fcn.00412620
mov al, byte [eax + 4]
push eax
push 0xf
mov ecx, dword [ebp + 8]
call sub.MFC42.DLL_CString::SetAt
mov byte [ebp - 0x494], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov al, byte [ebp - 0x494]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret