Function at 0x402150
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Delete file
Get local ipv4 addresses
Get socket information
Link many functions at runtime

Disassembly:
push 0xffffffffffffffff
push 0x41210b
mov eax, dword fs:[0]
push eax
sub esp, 0x90
mov eax, dword [0x417044]
xor eax, esp
mov dword [esp + 0x88], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x417044]
xor eax, esp
push eax
lea eax, [esp + 0xa4]
mov dword fs:[0], eax
mov ebp, dword [esp + 0xb4]
xor ebx, ebx
cmp dword [ebp + 0x2c], ebx
jne 0x40226b
push str.gicconn.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp + 0x2c], eax
cmp eax, ebx
je 0x402381
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str._GICConnStartup__YAXPBG_Z
push eax
call esi
mov dword [ebp], eax
mov eax, dword [ebp + 0x2c]
push str._GICConnCleanup__YGXXZ
push eax
call esi
mov ecx, dword [ebp + 0x2c]
push str._GICConnShutdown__YAXXZ
push ecx
mov dword [ebp + 4], eax
call esi
mov edx, dword [ebp + 0x2c]
push str._GICConnSetNs__YGXKKKI_Z
push edx
mov dword [ebp + 8], eax
call esi
mov dword [ebp + 0xc], eax
mov eax, dword [ebp + 0x2c]
push str._GICConnSignin__YAHPBUBUDDYITEM__PBD_Z
push eax
call esi
mov ecx, dword [ebp + 0x2c]
push str._GICConnSignout__YAXXZ
push ecx
mov dword [ebp + 0x10], eax
call esi
mov edx, dword [ebp + 0x2c]
push str._GICConnConnectGidEx__YGH_KIIPAXKPAU_OVERLAPPED___Z
push edx
mov dword [ebp + 0x14], eax
call esi
mov dword [ebp + 0x18], eax
mov eax, dword [ebp + 0x2c]
push str._GICConnGetOverlappedResult__YGHPAU_OVERLAPPED__PAI1H_Z
push eax
call esi
mov ecx, dword [ebp + 0x2c]
push str._GICConnAcceptService__YGIIPAXKP6GHII0_Z0_Z
push ecx
mov dword [ebp + 0x1c], eax
call esi
mov edx, dword [ebp + 0x2c]
push str._GICConnGetBuddyItemEx__YAHPAUBUDDYITEMEX___Z
push edx
mov dword [ebp + 0x20], eax
call esi
mov dword [ebp + 0x24], eax
mov eax, dword [ebp + 0x2c]
push str._GICConnSetBuddyItemEx__YAHPBUBUDDYITEMEX___Z
push eax
call esi
mov dword [ebp + 0x28], eax
xor eax, eax
cmp dword [ebp + eax*4], ebx
je 0x402374
inc eax
cmp eax, 0xb
jb 0x402252
mov edx, dword [ebp]
push ebx
call edx
add esp, 4
mov eax, dword [0x418ee0]
or eax, dword [0x418ee4]
jne 0x4024d9
push 1
push ebx
push ebx
push 6
push 1
push 2
lea edi, [ebp + 0x3c]
call dword [sym.imp.WS2_32.dll_WSASocketW]
lea esi, [esp + 0x5c]
mov dword [edi + 0x14], eax
call fcn.00404810
test eax, eax
je 0x4023ad
mov edx, dword [edi + 0x14]
push 0x10
mov ecx, esi
push ecx
push edx
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x4023ad
mov dword [edi + 0x18], ebx
cmp dword [ebp + 0x30], ebx
je 0x402381
push 0x14
push ebx
lea edx, [eax + 8]
mov dword [ebp + 0x70], 0xffffffff
mov dword [ebp + 0x78], ebx
call fcn.00401dc0
test eax, eax
je 0x402381
cmp dword [ebp + 0x30], ebx
je 0x402381
cmp dword [ebp + 0x6c], 0x40
jb 0x402381
mov edx, dword [ebp + 0x50]
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x70]
push ecx
push edx
mov dword [esp + 0x2c], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
mov eax, dword [esp + 0x70]
mov dword [ebp + 0x74], eax
lea edi, [ebp + 0x84]
mov dword [esp + 0x14], 0x414ef8
lea esi, [esp + 0x14]
mov dword [esp + 0xac], ebx
call fcn.00403ec0
push str.appdataconfipx.ini
mov ecx, esi
push ecx
or eax, 0xffffffff
call fcn.00403df0
mov esi, dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0x4152bc
push esi
call fcn.00404f54
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x4023b8
lea esi, [esp + 0x14]
call fcn.004047f0
or eax, 0xffffffff
jmp 0x402383
mov ecx, dword [ebp + 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [ebp + 0x2c], ebx
xor eax, eax
mov ecx, dword [esp + 0xa4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0040490f
add esp, 0x9c
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi + 0x18], eax
jmp 0x402381
mov eax, dword [edi]
push eax
push str._ver__nver_u_n
push esi
call fcn.00404f6b
mov eax, dword [edi + 4]
add edi, 4
add esp, 0xc
add edi, 4
mov dword [esp + 0x1c], eax
cmp eax, ebx
je 0x40244d
mov ebx, dword [sym.imp.WS2_32.dll_inet_ntoa]
mov eax, dword [edi]
push eax
push str.__u__n
push esi
call fcn.00404f6b
mov eax, dword [edi + 4]
add edi, 4
add esp, 0xc
add edi, 4
test eax, eax
jbe 0x402444
mov dword [esp + 0x18], eax
mov edx, dword [edi]
push edx
call ebx
lea edx, [esp + 0x7c]
jmp 0x402410
mov cl, byte [eax]
mov byte [edx], cl
inc eax
inc edx
test cl, cl
jne 0x402410
mov eax, dword [edi + 4]
add edi, 4
push eax
call ebx
push eax
lea ecx, [esp + 0x80]
push ecx
push str._s_s_n
push esi
call fcn.00404f6b
add esp, 0x10
add edi, 4
sub dword [esp + 0x18], 1
jne 0x402402
sub dword [esp + 0x1c], 1
jne 0x4023e0
xor ebx, ebx
push esi
call fcn.004050fe
mov edx, dword [ebp + 0x74]
mov eax, dword [ebp + 0x70]
mov ecx, dword [ebp + 0xc]
add esp, 4
push ebx
push ebx
push edx
push eax
call ecx
push 0x34
lea edx, [esp + 0x2c]
push ebx
push edx
call fcn.0040cf00
add esp, 0xc
lea esi, [esp + 0x2c]
mov dword [esp + 0x24], 3
mov dword [esp + 0x38], 5
call fcn.00401d90
mov edx, dword [ebp + 0x10]
lea ecx, [esp + 0x24]
xor eax, eax
push str.passport
push ecx
mov dword [esp + 0x4c], 0x100007f
mov word [esp + 0x50], ax
call edx
add esp, 8
lea esi, [esp + 0x14]
test eax, eax
jne 0x4024c1
call fcn.004047f0
jmp 0x402381
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
mov dword [0x418ee0], eax
mov dword [0x418ee4], ecx
call fcn.004047f0
mov eax, 1
jmp 0x402383