Function at 0x40cb60
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x476c30
mov eax, dword fs:[0]
push eax
sub esp, 0x64
mov eax, dword [0x491300]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 0xc]
mov edi, ecx
mov ecx, ebx
call fcn.004028f0
mov esi, eax
test esi, esi
je 0x40ccf4
cmp dword [esi + 8], 1
jne 0x40cce9
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x40cbbb
cmp dword [esi + 4], eax
jne 0x40cce9
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 4]
push eax
push 1
push ecx
call dword [sym.imp.WS2_32.dll_socket]
mov dword [edi + 4], eax
cmp eax, 0xffffffff
je 0x40cce9
mov ecx, dword [ebp + 8]
cmp ecx, 1
jne 0x40ccb1
mov edx, dword [esi + 0x10]
mov ecx, dword [esi + 0x14]
push edx
push ecx
push eax
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x40ccd8
push 0xffffffffffffffff
push eax
push ebx
lea ecx, [edi + 8]
call fcn.00401a30
mov cx, word [ebx + 0x1c]
mov word [edi + 0x24], cx
push ebx
lea ecx, [edi + 8]
call fcn.00402920
xor eax, eax
mov dword [ebp - 0x2e], eax
mov dword [ebp - 0x2a], eax
mov dword [ebp - 0x26], eax
mov word [ebp - 0x22], ax
xor edx, edx
lea eax, [ebp - 0x6c]
push eax
lea ecx, [ebp - 0x30]
mov word [ebp - 0x30], dx
mov edx, dword [edi + 4]
push ecx
push edx
mov dword [ebp - 0x6c], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x40cc55
lea eax, [ebp - 0x30]
push eax
lea ecx, [edi + 0x34]
call fcn.00402b60
xor eax, eax
xor ecx, ecx
lea edx, [ebp - 0x70]
mov dword [ebp - 0x1e], eax
mov dword [ebp - 0x1a], eax
mov dword [ebp - 0x16], eax
mov word [ebp - 0x12], ax
push edx
lea eax, [ebp - 0x20]
mov word [ebp - 0x20], cx
mov ecx, dword [edi + 4]
push eax
push ecx
mov dword [ebp - 0x70], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x40cc93
lea edx, [ebp - 0x20]
push edx
lea ecx, [edi + 0x34]
call fcn.00402b60
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0045ea71
mov esp, ebp
pop ebp
ret 0xc
test ecx, ecx
jne 0x40ccd8
mov edx, dword [esi + 0x10]
mov ecx, dword [esi + 0x14]
push edx
push ecx
push eax
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jne 0x40ccd8
mov edx, dword [edi + 4]
push 0x32
push edx
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x40cd09
mov eax, dword [edi + 4]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi + 4], 0xffffffff
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x40cba1
push 0x488bc8
lea eax, [ebp - 0x6c]
push eax
mov dword [ebp - 0x6c], str.Could_not_resolve_HostAddress
call fcn.0045ea80
push str.TheWorld
lea ecx, [ebp - 0x3c]
call fcn.00402a10
movzx eax, word [ebx + 0x1c]
lea ecx, [ebp - 0x3c]
push ecx
push eax
lea ecx, [ebp - 0x68]
mov dword [ebp - 4], 0
call fcn.00402110
mov esi, eax
push 0xffffffffffffffff
push 0
push esi
lea ecx, [edi + 8]
mov byte [ebp - 4], 1
call fcn.00401a30
mov dx, word [esi + 0x1c]
push esi
lea ecx, [edi + 8]
mov word [edi + 0x24], dx
call fcn.00402920
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 0
call fcn.004021c0
lea ecx, [ebp - 0x3c]
mov dword [ebp - 4], 0xffffffff
call fcn.004017e0
jmp 0x40cc55