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

Disassembly:
push 0xffffffffffffffff
push 0x41c6d2
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x280
push esi
push edi
call fcn.004070d0
mov ecx, dword [0x4280fc]
mov dword [ecx + 0x82], eax
mov edx, dword [0x4280fc]
lea ecx, [esp + 0x1c]
mov eax, dword [edx + 0x82]
push eax
push ecx
call fcn.00407140
mov eax, dword [0x4280fc]
mov edx, dword [esp + 0x24]
push 0xc
add eax, 0x86
push edx
push eax
mov dword [esp + 0x2a4], 0
call fcn.00409360
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.00409b90
add esp, 8
mov byte [eax + 1], 0
lea eax, [esp + 0x184]
mov ecx, 0x428130
push eax
call fcn.00415e79
mov eax, dword [0x4280fc]
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 0x428130
push ecx
stosw word es:[edi], ax
call fcn.00415f1f
mov eax, dword [eax]
lea edx, [esp + 0x20]
push eax
push 0x32
push edx
push 0x42420c
push 0x42414c
push str.SERVER
call esi
lea ecx, [esp + 0xc]
call fcn.00415d3c
lea eax, [esp + 0x20]
push eax
call sub.WSOCK32.dll_inet_addr
mov ecx, dword [0x4280fc]
mov dword [ecx + 2], eax
mov eax, dword [0x4280fc]
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 0x428130
push edx
stosw word es:[edi], ax
call fcn.00415f1f
mov eax, dword [eax]
push eax
lea eax, [esp + 0x24]
push 0x32
push eax
push 0x424208
push str.PORT
push str.SERVER
call esi
lea ecx, [esp + 0xc]
call fcn.00415d3c
lea ecx, [esp + 0x20]
push ecx
call fcn.00409b7a
mov edx, dword [0x4280fc]
add esp, 4
mov word [edx + 6], ax
mov eax, dword [0x4280fc]
mov ecx, dword [eax + 0x34]
mov esi, 0x1e
cmp ecx, esi
jae 0x402495
mov dword [eax + 0x34], esi
mov eax, dword [0x4280fc]
mov edx, dword [eax + 0x34]
mov ecx, 0x12c
cmp edx, ecx
jbe 0x4024a4
mov dword [eax + 0x34], ecx
lea eax, [esp + 0x18]
push eax
call fcn.00407460
mov edx, dword [0x4280fc]
mov ecx, dword [esp + 0x1c]
push esi
add edx, 0xb2
push ecx
push edx
mov byte [esp + 0x2a0], 1
call fcn.00409360
mov ecx, 0x19
xor eax, eax
lea edi, [esp + 0xcc]
lea edx, [esp + 0x130]
rep stosd dword es:[edi], eax
mov ecx, 0x19
lea edi, [esp + 0x130]
rep stosd dword es:[edi], eax
mov ecx, 0xc
lea edi, [esp + 0x64]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0xc
xor eax, eax
lea edi, [esp + 0x98]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x98]
lea ecx, [esp + 0x64]
push eax
push ecx
lea eax, [esp + 0xd4]
push edx
push eax
call fcn.00407800
mov edx, dword [0x4280fc]
lea ecx, [esp + 0xdc]
push 0x63
add edx, 0x237
push ecx
push edx
call fcn.00409360
mov ecx, dword [0x4280fc]
lea eax, [esp + 0x14c]
push 0x63
add ecx, 0x2cd
push eax
push ecx
call fcn.00409360
mov eax, dword [0x4280fc]
lea edx, [esp + 0x8c]
push 0x31
add eax, 0x205
push edx
push eax
call fcn.00409360
add esp, 0x44
lea ecx, [esp + 0x88]
push ecx
lea ecx, [esp + 0xc]
call fcn.00415daa
push 0x424204
lea ecx, [esp + 0xc]
mov byte [esp + 0x294], 2
call fcn.00414fc5
pop edi
pop esi
test eax, eax
jle 0x4025e2
inc eax
lea edx, [esp + 4]
push eax
push edx
lea ecx, [esp + 8]
call fcn.00414f2b
push eax
lea ecx, [esp + 4]
mov byte [esp + 0x28c], 3
call fcn.00415e29
lea ecx, [esp + 4]
mov byte [esp + 0x288], 2
call fcn.00415d3c
mov eax, dword [0x424a3c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], eax
lea eax, [esp + 8]
lea ecx, [esp + 0xc]
push eax
push ecx
mov byte [esp + 0x290], 5
call fcn.00407ef0
add esp, 8
lea edx, [esp + 0xc]
lea ecx, [esp]
push edx
call fcn.0041602e
push 0x424200
lea ecx, [esp + 4]
call fcn.00415ff2
lea eax, [esp + 8]
lea ecx, [esp]
push eax
call fcn.0041602e
mov edx, dword [0x4280fc]
mov ecx, dword [esp]
push 0x31
add edx, 0x29b
push ecx
push edx
call fcn.00409360
add esp, 0xc
lea ecx, [esp + 8]
mov byte [esp + 0x288], 4
call fcn.00415d3c
lea ecx, [esp + 0xc]
mov byte [esp + 0x288], 2
call fcn.00415d3c
lea ecx, [esp]
mov byte [esp + 0x288], 1
call fcn.00415d3c
lea ecx, [esp + 0x10]
mov byte [esp + 0x288], 0
call fcn.00415d3c
lea ecx, [esp + 0x14]
mov dword [esp + 0x288], 0xffffffff
call fcn.00415d3c
mov ecx, dword [esp + 0x280]
mov dword fs:[0], ecx
add esp, 0x28c
ret