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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ec40a
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x51e584]
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
xor esi, esi
push 0x28
mov dword [ebp - 0x2c], esi
call fcn.004819d0
add esp, 4
cmp eax, esi
je 0x40dd7e
mov dword [ebp - 0x30], eax
mov dword [eax], eax
mov eax, dword [ebp - 0x30]
mov dword [eax + 4], eax
mov eax, dword [ebp - 0x30]
mov dword [eax + 8], eax
mov eax, dword [ebp - 0x30]
mov byte [eax + 0x20], 1
mov ecx, dword [ebp - 0x30]
mov byte [ecx + 0x21], 1
lea eax, [ebp - 0x34]
mov dword [ebp - 4], esi
call fcn.0040de90
mov ecx, dword [ebp - 0x2c]
cmp ecx, esi
jne 0x40dc25
mov dword [ebp - 4], 1
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax]
push eax
push ecx
lea esi, [ebp - 0x24]
lea eax, [ebp - 0x34]
call fcn.0040e040
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x30]
push edx
call fcn.00481974
add esp, 4
xor eax, eax
xor edx, edx
jmp 0x40dc60
mov edx, dword [ebp - 0x30]
mov eax, dword [edx]
mov edi, dword [eax + 0x18]
mov ebx, dword [eax + 0x1c]
cmp ecx, 1
jne 0x40dc7c
push edx
mov dword [ebp - 4], 2
push eax
lea esi, [ebp - 0x24]
lea eax, [ebp - 0x34]
call fcn.0040e040
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x30]
push eax
call fcn.00481974
add esp, 4
mov eax, edi
mov edx, ebx
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.004815c9
mov esp, ebp
pop ebp
ret
push esi
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40dcb4
mov dword [ebp - 4], 3
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax]
push eax
push ecx
lea esi, [ebp - 0x24]
lea eax, [ebp - 0x34]
call fcn.0040e040
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x30]
push ecx
jmp 0x40dc54
xor eax, eax
mov edx, 2
mov dword [ebp - 0x20], eax
push 0x50
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov word [ebp - 0x20], dx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x1e], ax
call fcn.0040de20
test eax, eax
jne 0x40dcf3
mov dword [ebp - 4], 4
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax]
push eax
push ecx
jmp 0x40dc3e
push 0x10
lea ecx, [ebp - 0x20]
push ecx
push esi
mov dword [ebp - 0x1c], eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x40dd38
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebp - 4], 5
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax]
push eax
push ecx
lea esi, [ebp - 0x24]
lea eax, [ebp - 0x34]
call fcn.0040e040
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x30]
push edx
jmp 0x40dc54
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0x20]
push ecx
push esi
mov dword [ebp - 0x38], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
mov edx, dword [ebp - 0x1c]
push esi
mov dword [ebp - 0x3c], edx
call dword [sym.imp.WS2_32.dll_closesocket]
lea eax, [ebp - 0x3c]
lea ecx, [ebp - 0x34]
call fcn.0040dfc0
mov edi, dword [eax]
mov ebx, dword [eax + 4]
mov dword [ebp - 4], 6
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax]
push eax
push ecx
jmp 0x40dc3e
lea ecx, [ebp - 0x24]
push ecx
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x24], esi
call fcn.00481ae9
push 0x517078
lea edx, [ebp - 0x48]
push edx
mov dword [ebp - 0x48], vtable.std::bad_alloc.0
call fcn.00489e3f
int3