Function at 0x402310
Capabilities:
Read .ini file
Set socket configuration

Disassembly:
push 0xffffffffffffffff
push 0x41c712
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x280
push esi
push edi
call fcn.00407160
mov ecx, dword [0x42819c]
mov dword [ecx + 0x82], eax
mov edx, dword [0x42819c]
lea ecx, [esp + 0x1c]
mov eax, dword [edx + 0x82]
push eax
push ecx
call fcn.004071d0
mov eax, dword [0x42819c]
mov edx, dword [esp + 0x24]
push 0xc
add eax, 0x86
push edx
push eax
mov dword [esp + 0x2a4], 0
call fcn.00409430
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x198]
add esp, 0x14
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x184]
push 0x104
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp + 0x184]
push 0x5c
push edx
call fcn.00409c60
add esp, 8
mov byte [eax + 1], 0
lea eax, [esp + 0x184]
mov ecx, 0x4281d0
push eax
call fcn.00415ec9
mov eax, dword [0x42819c]
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov ecx, dword [eax + 2]
test ecx, ecx
jne 0x402437
mov ecx, 0xc
xor eax, eax
lea edi, [esp + 0x20]
push str.server.ini
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x10]
push 0x4281d0
push ecx
stosw word es:[edi], ax
call fcn.00415f6f
mov eax, dword [eax]
lea edx, [esp + 0x20]
push eax
push 0x32
push edx
push str.0.0.0.0
push 0x4241a8
push str.SERVER
call esi
lea ecx, [esp + 0xc]
call fcn.00415d8c
lea eax, [esp + 0x20]
push eax
call sub.WSOCK32.dll_inet_addr
mov ecx, dword [0x42819c]
mov dword [ecx + 2], eax
mov eax, dword [0x42819c]
cmp word [eax + 6], 0
jne 0x4024a1
mov ecx, 0xc
xor eax, eax
lea edi, [esp + 0x20]
push str.server.ini
rep stosd dword es:[edi], eax
lea edx, [esp + 0x10]
push 0x4281d0
push edx
stosw word es:[edi], ax
call fcn.00415f6f
mov eax, dword [eax]
push eax
lea eax, [esp + 0x24]
push 0x32
push eax
push 0x424240
push str.PORT
push str.SERVER
call esi
lea ecx, [esp + 0xc]
call fcn.00415d8c
lea ecx, [esp + 0x20]
push ecx
call fcn.00409c4a
mov edx, dword [0x42819c]
add esp, 4
mov word [edx + 6], ax
mov eax, dword [0x42819c]
mov ecx, dword [eax + 0x34]
mov esi, 0x1e
cmp ecx, esi
jae 0x4024b5
mov dword [eax + 0x34], esi
mov eax, dword [0x42819c]
mov edx, dword [eax + 0x34]
mov ecx, 0x12c
cmp edx, ecx
jbe 0x4024c4
mov dword [eax + 0x34], ecx
lea eax, [esp + 0x10]
push eax
call fcn.004076b0
lea edx, [esp + 0x14]
mov ecx, esp
mov dword [esp + 0x10], esp
push edx
mov byte [esp + 0x298], 1
call fcn.00415b01
push str.pcid
push str.Local
push str.Contact.ini
call fcn.00407080
mov ecx, dword [0x42819c]
mov eax, dword [esp + 0x20]
push esi
add ecx, 0xb2
push eax
push ecx
call fcn.00409430
mov ecx, 0x19
xor eax, eax
lea edi, [esp + 0xd8]
lea edx, [esp + 0xa4]
rep stosd dword es:[edi], eax
mov ecx, 0x19
lea edi, [esp + 0x13c]
rep stosd dword es:[edi], eax
mov ecx, 0xc
lea edi, [esp + 0x70]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0xc
xor eax, eax
lea edi, [esp + 0xa4]
push edx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x74]
lea ecx, [esp + 0x140]
push eax
lea edx, [esp + 0xe0]
push ecx
push edx
call fcn.004078d0
mov ecx, dword [0x42819c]
lea eax, [esp + 0xe8]
push 0x63
add ecx, 0x237
push eax
push ecx
call fcn.00409430
mov eax, dword [0x42819c]
lea edx, [esp + 0x158]
push 0x63
add eax, 0x2cd
push edx
push eax
call fcn.00409430
mov edx, dword [0x42819c]
add esp, 0x44
lea ecx, [esp + 0x54]
add edx, 0x205
push 0x31
push ecx
push edx
call fcn.00409430
add esp, 0xc
lea eax, [esp + 0x88]
lea ecx, [esp + 8]
push eax
call fcn.00415dfa
push 0x42422c
lea ecx, [esp + 0xc]
mov byte [esp + 0x294], 2
call fcn.00415015
test eax, eax
jle 0x402624
inc eax
lea ecx, [esp + 0xc]
push eax
push ecx
lea ecx, [esp + 0x10]
call fcn.00414f7b
push eax
lea ecx, [esp + 0xc]
mov byte [esp + 0x294], 3
call fcn.00415e79
lea ecx, [esp + 0xc]
mov byte [esp + 0x290], 2
call fcn.00415d8c
mov eax, dword [0x424ad8]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
lea edx, [esp + 0x14]
lea eax, [esp + 0x18]
push edx
push eax
mov byte [esp + 0x298], 5
call fcn.00407fc0
add esp, 8
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0xc]
call fcn.0041607e
push 0x424228
lea ecx, [esp + 0xc]
call fcn.00416042
lea edx, [esp + 0x14]
lea ecx, [esp + 8]
push edx
call fcn.0041607e
mov ecx, dword [0x42819c]
mov eax, dword [esp + 8]
push 0x31
add ecx, 0x29b
push eax
push ecx
call fcn.00409430
add esp, 0xc
lea ecx, [esp + 0x14]
mov byte [esp + 0x290], 4
call fcn.00415d8c
lea ecx, [esp + 0x18]
mov byte [esp + 0x290], 2
call fcn.00415d8c
lea ecx, [esp + 8]
mov byte [esp + 0x290], 1
call fcn.00415d8c
lea ecx, [esp + 0x10]
mov byte [esp + 0x290], 0
call fcn.00415d8c
lea ecx, [esp + 0x1c]
mov dword [esp + 0x290], 0xffffffff
call fcn.00415d8c
mov ecx, dword [esp + 0x288]
pop edi
mov dword fs:[0], ecx
pop esi
add esp, 0x28c
ret