Function at 0x406b70
Capabilities:
Check mutex on windows
Initialize winsock library
Read .ini file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x314
mov eax, dword [0x41f018]
xor eax, esp
mov dword [esp + 0x310], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
jmp 0x406ba2
push 1
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x4104a0
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov esi, dword [sym.imp.USER32.dll_LoadStringA]
push 0x64
push 0x4227c8
push 0x65
push edi
mov dword [0x422850], eax
call esi
push 0x64
push 0x422760
push 0x69
push edi
call esi
mov eax, edi
call fcn.00406fc0
mov eax, dword [ebp + 0x14]
push eax
mov ecx, edi
call fcn.00407040
add esp, 4
test eax, eax
jne 0x406c08
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x310]
xor ecx, esp
call fcn.00415bda
mov esp, ebp
pop ebp
ret 0x10
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push str..DataServer.ini
push 0
push str.CustomerLicenseId
push str.DataServerInfo
call ebx
push 0x1c
mov ecx, 0x4eb878
mov word [0x422758], ax
call fcn.00412220
push str.STANDBY
push 0x419124
push str.Season_4_Episode_1
lea ecx, [esp + 0x224]
push str._DataServer__SSeMU___s__s___Ver:_2.1.7_
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [0x42275c]
add esp, 0x14
lea edx, [esp + 0x218]
push edx
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov ecx, dword [0x42275c]
push ecx
mov ecx, 0x420968
call fcn.00413b90
lea edx, [esp + 0x28]
push edx
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x406edb
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push str..DataServer.ini
push 0x20
mov byte [esp + 0x1c0], al
mov dword [esp + 0x1c1], eax
mov dword [esp + 0x1c5], eax
mov dword [esp + 0x1c9], eax
mov dword [esp + 0x1cd], eax
mov dword [esp + 0x1d1], eax
mov dword [esp + 0x1d5], eax
mov dword [esp + 0x1d9], eax
mov word [esp + 0x1dd], ax
mov byte [esp + 0x1df], al
mov byte [esp + 0x200], al
mov dword [esp + 0x201], eax
mov dword [esp + 0x205], eax
mov dword [esp + 0x209], eax
mov dword [esp + 0x20d], eax
mov dword [esp + 0x211], eax
mov dword [esp + 0x215], eax
mov dword [esp + 0x219], eax
mov word [esp + 0x21d], ax
mov byte [esp + 0x21f], al
mov byte [esp + 0x1e0], al
mov dword [esp + 0x1e1], eax
mov dword [esp + 0x1e5], eax
mov dword [esp + 0x1e9], eax
mov dword [esp + 0x1ed], eax
mov dword [esp + 0x1f1], eax
mov dword [esp + 0x1f5], eax
mov dword [esp + 0x1f9], eax
mov word [esp + 0x1fd], ax
mov byte [esp + 0x1ff], al
lea eax, [esp + 0x1c0]
push eax
push 0x419366
push str.DataServerODBC
push str.DataServerInfo
call esi
push str..DataServer.ini
push 0x20
lea ecx, [esp + 0x200]
push ecx
push 0x419366
push str.DataServerUSER
push str.DataServerInfo
call esi
push str..DataServer.ini
push 0x20
lea edx, [esp + 0x1e0]
push edx
push 0x419366
push str.DataServerPASS
push str.DataServerInfo
call esi
push str..DataServer.ini
push 0xda98
push str.DataServerPort
push str.DataServerInfo
call ebx
movzx esi, ax
lea eax, [esp + 0x1b8]
push eax
push 0x191
lea ecx, [esp + 0x220]
push str.DataServer_EX_d__s
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea edx, [esp + 0x218]
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
test eax, eax
je 0x406ecc
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x406ecc
lea eax, [esp + 0x1d8]
push eax
lea ecx, [esp + 0x1fc]
push ecx
lea eax, [esp + 0x1c0]
mov ecx, 0x4eb8c0
call fcn.00412cb0
test al, al
jne 0x406e70
push str.Could_not_connect_to_database__ODBC_Error_
push 1
call fcn.00415360
add esp, 8
jmp 0x406ef1
lea edx, [esp + 0x1b8]
push edx
lea eax, [esp + 0x1dc]
lea ecx, [esp + 0x1fc]
call fcn.0040f880
test al, al
jne 0x406ea0
push str.Could_not_connect_to_database__ODBC_Error_
push 1
call fcn.00415360
add esp, 8
jmp 0x406ef1
push esi
mov ecx, 0x5b5030
call fcn.004143f0
test al, al
jne 0x406ebb
mov esi, 0x4eb8c0
call fcn.00412d40
jmp 0x406ef1
call fcn.00401fd0
call fcn.00402e60
call fcn.0040d090
jmp 0x406ef1
lea eax, [esp + 0x1b8]
push eax
push str.Could_not_open_DataServer__Already_Exists____s_
jmp 0x406ee7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.WSAStartup___failed_with_error:__d
push 1
call fcn.00415360
add esp, 0xc
mov ecx, dword [0x42275c]
mov esi, dword [sym.imp.USER32.dll_SetTimer]
push 0
push 0x7d0
push 0x64
push ecx
call esi
mov edx, dword [0x42275c]
push 0
push 0x7530
push 0x65
push edx
call esi
push 0x69
push edi
call dword [sym.imp.USER32.dll_LoadAcceleratorsA]
mov edi, dword [sym.imp.USER32.dll_GetMessageA]
push 0
push 0
mov esi, eax
push 0
lea eax, [esp + 0x18]
push eax
call edi
test eax, eax
je 0x406f7b
mov ebx, dword [sym.imp.USER32.dll_TranslateAcceleratorA]
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0xc]
push ecx
push esi
push edx
call ebx
test eax, eax
jne 0x406f6a
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea ecx, [esp + 0xc]
push ecx
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 0
push 0
push 0
lea edx, [esp + 0x18]
push edx
call edi
test eax, eax
jne 0x406f43
mov eax, dword [0x422850]
push eax
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
jmp 0x406f99
mov ecx, dword [esp + 0x31c]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00415bda
mov esp, ebp
pop ebp
ret 0x10