Function at 0x40d750
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x314
mov eax, dword [0x57f7c4]
xor eax, esp
mov dword [esp + 0x30c], eax
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push esi
push edi
push str..Configps_game.ini
push 0xff
lea eax, [esp + 0x20]
push eax
push 0
push str.MaxConnection
push str.SERVER
call ebp
test eax, eax
ja 0x40d79d
mov ecx, 0x7fff
mov word [0x5827cc], cx
jmp 0x40d7b0
lea edx, [esp + 0x18]
push edx
call fcn.0051ba99
add esp, 4
mov word [0x5827cc], ax
push str..Configps_game.ini
push 0xff
lea eax, [esp + 0x20]
push eax
push 0
push str.ServerPort
push str.SERVER
call ebp
test eax, eax
ja 0x40d7d8
mov eax, 0x785a
jmp 0x40d7e5
lea ecx, [esp + 0x18]
push ecx
call fcn.0051ba99
add esp, 4
movzx edx, word [0x5827cc]
mov word [0x5827ca], ax
movzx eax, ax
push edx
push eax
mov ebx, 0x109ced0
call fcn.00401f90
test al, al
jne 0x40d80f
push str.main_thread_init_failed
jmp 0x40dc5d
push str..Configps_game.ini
push 0xff
lea edx, [esp + 0x20]
push edx
xor ebx, ebx
push ebx
push str.Session
push str.CONNECTION
call ebp
test eax, eax
jbe 0x40dc7c
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x11c]
lea edi, [esp + 0x1c]
call fcn.004e14a0
mov eax, dword [esp + 0x18]
add esp, 4
cmp eax, ebx
jne 0x40d85e
mov eax, 0x78b4
mov dword [esp + 0x14], eax
push eax
lea ecx, [esp + 0x11c]
push ecx
mov ecx, 0x10a2540
call fcn.004ec950
test al, al
je 0x40d8a7
mov edx, dword [0x10a25a8]
mov eax, dword [0x587970]
push edx
add eax, 0xe0
push str.connect_mgr__d
push eax
call fcn.004efdc0
add esp, 0xc
push 0x10a2540
mov ecx, 0x109e730
call fcn.004ef360
test al, al
jne 0x40d8b1
push str.session_connect_failed
jmp 0x40dc5d
push str..Configps_game.ini
push 0xff
lea edx, [esp + 0x20]
push edx
push ebx
push str.GameVersion
push str.GAMEINFO
call ebp
test eax, eax
ja 0x40d8d9
mov dword [0x5828d0], ebx
jmp 0x40d8f0
push 0x5828d0
lea eax, [esp + 0x1c]
push 0x570bd8
push eax
call fcn.0051b920
add esp, 0xc
mov ecx, dword [0x5828d0]
mov edx, dword [0x587970]
push ecx
add edx, 0xe0
push str.Server_Version_:__X
push edx
call fcn.004efdc0
add esp, 0xc
push str..Configps_game.ini
push 0xff
lea eax, [esp + 0x220]
push eax
push ebx
push str.GameName
push str.GAMEINFO
call ebp
test eax, eax
ja 0x40d952
xor eax, eax
jmp 0x40d940
mov cl, byte [esp + eax + 0x218]
mov byte [eax + 0x5827ce], cl
inc eax
test cl, cl
jne 0x40d940
push str..Configps_game.ini
push 0xff
lea ecx, [esp + 0x20]
push ecx
push ebx
push str.GamePublicIP
push str.GAMEINFO
call ebp
test eax, eax
ja 0x40d97e
lea edx, [esp + 0x218]
push edx
xor esi, esi
jmp 0x40d98a
lea eax, [esp + 0x218]
push eax
lea esi, [esp + 0x1c]
call fcn.00407730
xor eax, eax
mov cl, byte [esp + eax + 0x218]
mov byte [eax + 0x5879c8], cl
inc eax
test cl, cl
jne 0x40d991
xor eax, eax
mov cl, byte [esp + eax + 0x18]
mov byte [eax + 0x587ac8], cl
inc eax
test cl, cl
jne 0x40d9a5
push str..Configps_game.ini
push 0xff
lea ecx, [esp + 0x20]
push ecx
push ebx
push str.DBAgent
push str.CONNECTION
call ebp
test eax, eax
jbe 0x40dc7c
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x11c]
lea edi, [esp + 0x1c]
call fcn.004e14a0
mov eax, dword [esp + 0x18]
add esp, 4
cmp eax, ebx
jne 0x40da01
mov eax, 0x78bf
mov dword [esp + 0x14], eax
push eax
lea eax, [esp + 0x11c]
push eax
mov ecx, 0x10a2628
call fcn.004ec950
test al, al
je 0x40da26
mov esi, 0x109ced0
call fcn.00402580
test al, al
jne 0x40da30
push str.DB_agent_connect_failed
jmp 0x40dc5d
mov ecx, dword [0x58795c]
call fcn.004e9710
push 0x5827ce
call fcn.00405a60
push str..Configps_game.ini
push 0xff
lea edx, [esp + 0x20]
push edx
push ebx
push str.UserLog
push str.CONNECTION
call ebp
test eax, eax
jbe 0x40dc7c
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x11c]
lea edi, [esp + 0x1c]
call fcn.004e14a0
mov eax, dword [esp + 0x18]
add esp, 4
cmp eax, ebx
jne 0x40da92
mov eax, 0x78b5
mov dword [esp + 0x14], eax
push eax
lea ecx, [esp + 0x11c]
push ecx
mov ecx, 0x10a2710
call fcn.004ec950
test al, al
je 0x40dab7
mov eax, 0x109ced0
call fcn.004025c0
test al, al
jne 0x40dace
mov edx, dword [0x587970]
push str.userlog_connect_failed
add edx, 0xe0
push edx
jmp 0x40dc6a
push 0x5827ce
call fcn.004e13b0
push str..Configps_game.ini
push 0xff
lea eax, [esp + 0x20]
push eax
push ebx
push str.GameLogDBID
push str.GAMEINFO
call ebp
test eax, eax
jbe 0x40db08
lea ecx, [esp + 0x18]
push ecx
call fcn.0051ba99
mov ebx, eax
add esp, 4
dec ebx
push str..Configps_game.ini
push 0xff
lea edx, [esp + 0x20]
push edx
push 0
push str.GameLog
push str.CONNECTION
mov dword [0x587bc8], ebx
call ebp
test eax, eax
jbe 0x40dc7c
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x11c]
lea edi, [esp + 0x1c]
call fcn.004e14a0
mov eax, dword [esp + 0x18]
add esp, 4
test eax, eax
jne 0x40db58
mov eax, 0x78c0
push eax
lea ecx, [esp + 0x11c]
push ecx
mov ecx, 0x10a2818
call fcn.004ec950
test al, al
je 0x40db7d
mov esi, 0x109ced0
call fcn.00402620
test al, al
jne 0x40db94
mov edx, dword [0x587970]
push str.gamelog_connect_failed
add edx, 0xe0
push edx
jmp 0x40dc6a
push ebx
push 0x5827ce
call fcn.00406830
call fcn.0041a010
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebx
mov esi, eax
mov eax, dword [0x58796c]
add esi, 0x493e0
cmp byte [eax + 0xe0], 0
jne 0x40dbed
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
or ebp, 0xffffffff
jmp 0x40dbd0
cmp dword [eax + 0x68], ebp
je 0x40dc0a
call ebx
cmp eax, esi
jae 0x40dc1c
push 0x64
call edi
mov eax, dword [0x58796c]
cmp byte [eax + 0xe0], 0
je 0x40dbd0
call fcn.0041ac90
test al, al
jne 0x40dc23
mov edx, dword [0x587970]
push str.InitZones_failed...
add edx, 0xe0
push edx
jmp 0x40dc6a
mov eax, dword [0x587970]
push str.InitServer__:DBAgent__m_bReady__disconnected...
add eax, 0xe0
push eax
jmp 0x40dc6a
push str.InitServer__:DBAgent__m_bReady__timeout...
jmp 0x40dc5d
mov esi, 0x109ced0
call fcn.00402b60
test al, al
jne 0x40dc43
mov eax, dword [0x587970]
push str.StartWorldThread_failed...
add eax, 0xe0
push eax
jmp 0x40dc6a
mov ecx, 0x109e8a0
mov byte [0x58794c], 1
call fcn.004e9980
test al, al
jne 0x40dc80
push str.InitServer__:g_Server.StartAcception
mov ecx, dword [0x587970]
add ecx, 0xe0
push ecx
call fcn.004efdc0
add esp, 8
mov esi, 0x109ced0
call fcn.00402120
xor al, al
jmp 0x40dc8e
call fcn.00407800
mov byte [0x10a2994], 0
mov al, 1
mov ecx, dword [esp + 0x31c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0051a8be
add esp, 0x314
ret