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

Disassembly:
push 0xffffffffffffffff
push 0x41c6a2
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x280
push esi
push edi
call fcn.004070f0
mov ecx, dword [0x42815c]
mov dword [ecx + 0x82], eax
mov edx, dword [0x42815c]
lea ecx, [esp + 0x1c]
mov eax, dword [edx + 0x82]
push eax
push ecx
call fcn.00407160
mov eax, dword [0x42815c]
mov edx, dword [esp + 0x24]
push 0xc
add eax, 0x86
push edx
push eax
mov dword [esp + 0x2a4], 0
call fcn.004093c0
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.00409bf0
add esp, 8
mov byte [eax + 1], 0
lea eax, [esp + 0x184]
mov ecx, 0x428190
push eax
call fcn.00415e59
mov eax, dword [0x42815c]
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov ecx, dword [eax + 2]
test ecx, ecx
jne 0x402417
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 0x428190
push ecx
stosw word es:[edi], ax
call fcn.00415eff
mov eax, dword [eax]
lea edx, [esp + 0x20]
push eax
push 0x32
push edx
push str.0.0.0.0
push 0x424198
push str.SERVER
call esi
lea ecx, [esp + 0xc]
call fcn.00415d1c
lea eax, [esp + 0x20]
push eax
call sub.WSOCK32.dll_inet_addr
mov ecx, dword [0x42815c]
mov dword [ecx + 2], eax
mov eax, dword [0x42815c]
cmp word [eax + 6], 0
jne 0x402481
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 0x428190
push edx
stosw word es:[edi], ax
call fcn.00415eff
mov eax, dword [eax]
push eax
lea eax, [esp + 0x24]
push 0x32
push eax
push 0x424230
push str.PORT
push str.SERVER
call esi
lea ecx, [esp + 0xc]
call fcn.00415d1c
lea ecx, [esp + 0x20]
push ecx
call fcn.00409bda
mov edx, dword [0x42815c]
add esp, 4
mov word [edx + 6], ax
mov eax, dword [0x42815c]
mov ecx, dword [eax + 0x34]
mov esi, 0x1e
cmp ecx, esi
jae 0x402495
mov dword [eax + 0x34], esi
mov eax, dword [0x42815c]
mov edx, dword [eax + 0x34]
mov ecx, 0x12c
cmp edx, ecx
jbe 0x4024a4
mov dword [eax + 0x34], ecx
lea eax, [esp + 0x10]
push eax
call fcn.00407640
lea edx, [esp + 0x14]
mov ecx, esp
mov dword [esp + 0x10], esp
push edx
mov byte [esp + 0x298], 1
call fcn.00415a91
push str.pcid
push str.Local
push str.Contact.ini
call fcn.00407010
mov ecx, dword [0x42815c]
mov eax, dword [esp + 0x20]
push esi
add ecx, 0xb2
push eax
push ecx
call fcn.004093c0
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.00407860
mov ecx, dword [0x42815c]
lea eax, [esp + 0xe8]
push 0x63
add ecx, 0x237
push eax
push ecx
call fcn.004093c0
mov eax, dword [0x42815c]
lea edx, [esp + 0x158]
push 0x63
add eax, 0x2cd
push edx
push eax
call fcn.004093c0
mov edx, dword [0x42815c]
add esp, 0x44
lea ecx, [esp + 0x54]
add edx, 0x205
push 0x31
push ecx
push edx
call fcn.004093c0
add esp, 0xc
lea eax, [esp + 0x88]
lea ecx, [esp + 8]
push eax
call fcn.00415d8a
push 0x42421c
lea ecx, [esp + 0xc]
mov byte [esp + 0x294], 2
call fcn.00414fa5
test eax, eax
jle 0x402604
inc eax
lea ecx, [esp + 0xc]
push eax
push ecx
lea ecx, [esp + 0x10]
call fcn.00414f0b
push eax
lea ecx, [esp + 0xc]
mov byte [esp + 0x294], 3
call fcn.00415e09
lea ecx, [esp + 0xc]
mov byte [esp + 0x290], 2
call fcn.00415d1c
mov eax, dword [0x424aa0]
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.00407f50
add esp, 8
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0xc]
call fcn.0041600e
push 0x424218
lea ecx, [esp + 0xc]
call fcn.00415fd2
lea edx, [esp + 0x14]
lea ecx, [esp + 8]
push edx
call fcn.0041600e
mov ecx, dword [0x42815c]
mov eax, dword [esp + 8]
push 0x31
add ecx, 0x29b
push eax
push ecx
call fcn.004093c0
add esp, 0xc
lea ecx, [esp + 0x14]
mov byte [esp + 0x290], 4
call fcn.00415d1c
lea ecx, [esp + 0x18]
mov byte [esp + 0x290], 2
call fcn.00415d1c
lea ecx, [esp + 8]
mov byte [esp + 0x290], 1
call fcn.00415d1c
lea ecx, [esp + 0x10]
mov byte [esp + 0x290], 0
call fcn.00415d1c
lea ecx, [esp + 0x1c]
mov dword [esp + 0x290], 0xffffffff
call fcn.00415d1c
mov ecx, dword [esp + 0x288]
pop edi
mov dword fs:[0], ecx
pop esi
add esp, 0x28c
ret