Function at 0x407d90
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 [0x421018]
xor eax, esp
mov dword [esp + 0x310], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
jmp 0x407dc2
push 1
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x412fa0
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov esi, dword [sym.imp.USER32.dll_LoadStringA]
push 0x64
push 0x4247c8
push 0x65
push edi
mov dword [0x424850], eax
call esi
push 0x64
push 0x424760
push 0x69
push edi
call esi
mov eax, edi
call fcn.004081e0
mov eax, dword [ebp + 0x14]
push eax
mov ecx, edi
call fcn.00408260
add esp, 4
test eax, eax
jne 0x407e28
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x310]
xor ecx, esp
call fcn.00417d4a
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 0x20
mov ecx, 0x4ed878
mov word [0x424758], ax
call fcn.004141d0
push 0x41b664
push str.Season_6_Episode_3
lea ecx, [esp + 0x220]
push str._DataServer__SSeMU___s__s___Ver:_2.1.9_
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [0x42475c]
add esp, 0x10
lea edx, [esp + 0x218]
push edx
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov ecx, dword [0x42475c]
push ecx
mov ecx, 0x422968
call fcn.00415db0
lea edx, [esp + 0x28]
push edx
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x40810b
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 0x41b8a6
push str.DataServerODBC
push str.DataServerInfo
call esi
push str..DataServer.ini
push 0x20
lea ecx, [esp + 0x200]
push ecx
push 0x41b8a6
push str.DataServerUSER
push str.DataServerInfo
call esi
push str..DataServer.ini
push 0x20
lea edx, [esp + 0x1e0]
push edx
push 0x41b8a6
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 0x25b
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 0x4080fc
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x4080fc
lea eax, [esp + 0x1d8]
push eax
lea ecx, [esp + 0x1fc]
push ecx
lea eax, [esp + 0x1c0]
mov ecx, 0x4ed8c0
call fcn.00414c60
test al, al
jne 0x40808b
push str.Could_not_connect_to_database__ODBC_Error_
push 1
call fcn.004174d0
add esp, 8
jmp 0x408121
lea edx, [esp + 0x1b8]
push edx
lea eax, [esp + 0x1dc]
lea ecx, [esp + 0x1fc]
call fcn.00411ad0
test al, al
jne 0x4080bb
push str.Could_not_connect_to_database__ODBC_Error_
push 1
call fcn.004174d0
add esp, 8
jmp 0x408121
push esi
mov ecx, 0x5b7030
call fcn.00416560
test al, al
jne 0x4080d6
mov esi, 0x4ed8c0
call fcn.00414cf0
jmp 0x408121
call fcn.00402000
call fcn.00402e90
call fcn.0040ed10
mov eax, dword [0x42475c]
push 0
push 0xea60
push 0x65
push eax
call dword [sym.imp.USER32.dll_SetTimer]
jmp 0x408121
lea ecx, [esp + 0x1b8]
push ecx
push str.Could_not_open_DataServer__Already_Exists____s_
jmp 0x408117
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.WSAStartup___failed_with_error:__d
push 1
call fcn.004174d0
add esp, 0xc
mov edx, dword [0x42475c]
push 0
push 0x7d0
push 0x64
push edx
call dword [sym.imp.USER32.dll_SetTimer]
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 0x408198
mov ebx, dword [sym.imp.USER32.dll_TranslateAcceleratorA]
nop
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0xc]
push ecx
push esi
push edx
call ebx
test eax, eax
jne 0x408187
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 0x408160
mov eax, dword [0x424850]
push eax
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
jmp 0x4081b6
mov ecx, dword [esp + 0x31c]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00417d4a
mov esp, ebp
pop ebp
ret 0x10