Function at 0x4277f0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5ca8b8
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x40
mov eax, dword [0x647138]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x4c], ecx
call fcn.00501920
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 1
push 0
push 0
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov edi, eax
call fcn.00501920
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x28], esi
mov ecx, eax
mov dword [ebp - 0x2c], ecx
cmp edi, 0xffffffff
jne 0x427870
or edi, edi
jmp 0x42787d
call fcn.00501920
xor ecx, ecx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x50], edi
mov dword [ebp - 4], 0
cmp edi, 0xffffffff
jne 0x4278aa
xor edx, edx
mov eax, fcn.0040e670
test ecx, ecx
cmove eax, edx
test eax, eax
je 0x4278aa
push str.socket_select_interrupter
lea eax, [ebp - 0x2c]
push eax
call fcn.00422af0
mov dword [ebp - 0x44], 1
cmp edi, 0xffffffff
je 0x4278e3
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 4
lea eax, [ebp - 0x44]
push eax
push 4
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov esi, eax
call fcn.00501920
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test esi, esi
jne 0x4278e8
call fcn.00501920
xorps xmm0, xmm0
mov dword [ebp - 0x38], 0x10
mov eax, 2
movups xmmword [ebp - 0x24], xmm0
push 0x7f000001
mov word [ebp - 0x24], ax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [ebp - 0x20], eax
xor eax, eax
mov word [ebp - 0x22], ax
cmp edi, 0xffffffff
jne 0x42792a
call fcn.00501920
mov ecx, 0x2719
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], ecx
jmp 0x427982
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 0x10
lea eax, [ebp - 0x24]
push eax
push edi
call dword [sym.imp.WS2_32.dll_bind]
mov dword [ebp - 0x34], eax
call fcn.00501920
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov dword [ebp - 0x28], esi
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x2c], ecx
test eax, eax
jne 0x42797d
call fcn.00501920
cmp edi, 0xffffffff
jne 0x4279a0
call fcn.00501920
mov ecx, 0x2719
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], ecx
jmp 0x427a20
cmp eax, 0xffffffff
jne 0x427963
xor edx, edx
mov eax, fcn.0040e670
test ecx, ecx
cmove eax, edx
test eax, eax
je 0x427963
push str.socket_select_interrupter
lea eax, [ebp - 0x2c]
push eax
call fcn.00422af0
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x3c], 0x10
push eax
lea eax, [ebp - 0x24]
push eax
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x38], eax
call fcn.00501920
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov dword [ebp - 0x28], esi
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x2c], ecx
test eax, eax
jne 0x427a1b
call fcn.00501920
mov esi, dword [sym.imp.WS2_32.dll_htonl]
push 0
call esi
cmp dword [ebp - 0x20], eax
jne 0x427a01
push 0x7f000001
call esi
mov dword [ebp - 0x20], eax
cmp edi, 0xffffffff
jne 0x427a3e
call fcn.00501920
mov ecx, 0x2719
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], ecx
jmp 0x427abc
cmp eax, 0xffffffff
jne 0x4279e8
xor edx, edx
mov eax, fcn.0040e670
test ecx, ecx
cmove eax, edx
test eax, eax
je 0x4279e8
push str.socket_select_interrupter
lea eax, [ebp - 0x2c]
push eax
call fcn.00422af0
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push bind
push edi
call dword [sym.imp.WS2_32.dll_listen]
mov dword [ebp - 0x34], eax
call fcn.00501920
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov dword [ebp - 0x28], esi
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x2c], ecx
test eax, eax
jne 0x427ab7
call fcn.00501920
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 1
push 0
push 0
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov dword [ebp - 0x40], eax
call fcn.00501920
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x28], esi
mov ecx, eax
mov esi, dword [ebp - 0x40]
mov dword [ebp - 0x2c], ecx
cmp esi, 0xffffffff
jne 0x427ada
or esi, esi
mov dword [ebp - 0x40], esi
jmp 0x427ae7
cmp eax, 0xffffffff
jne 0x427a76
xor edx, edx
mov eax, fcn.0040e670
test ecx, ecx
cmove eax, edx
test eax, eax
je 0x427a76
push str.socket_select_interrupter
lea eax, [ebp - 0x2c]
push eax
call fcn.00422af0
call fcn.00501920
xor ecx, ecx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x34], esi
mov byte [ebp - 4], 1
cmp esi, 0xffffffff
jne 0x427b23
xor edx, edx
mov eax, fcn.0040e670
test ecx, ecx
cmove eax, edx
test eax, eax
je 0x427b11
push str.socket_select_interrupter
lea eax, [ebp - 0x2c]
push eax
call fcn.00422af0
call fcn.00501920
mov ecx, 0x2719
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], ecx
jmp 0x427b9e
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push dword [ebp - 0x38]
lea eax, [ebp - 0x24]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x38], eax
call fcn.00501920
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov dword [ebp - 0x28], esi
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x2c], ecx
test eax, eax
jne 0x427b99
call fcn.00501920
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x2c]
push eax
push ecx
mov ecx, edi
call fcn.00426d60
add esp, 8
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov byte [ebp - 4], 2
cmp eax, 0xffffffff
jne 0x427bbc
cmp dword [ebp - 0x2c], 0
je 0x427bbc
push str.socket_select_interrupter
lea eax, [ebp - 0x2c]
push eax
call fcn.00422af0
cmp eax, 0xffffffff
jne 0x427b67
xor edx, edx
mov eax, fcn.0040e670
test ecx, ecx
cmove eax, edx
test eax, eax
je 0x427b67
push str.socket_select_interrupter
lea eax, [ebp - 0x2c]
push eax
call fcn.00422af0
mov edi, dword [ebp - 0x40]
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x48]
mov dword [ebp - 0x48], 1
push eax
push ecx
lea edx, [ebp - 0x2d]
mov byte [ebp - 0x2d], 0
mov ecx, edi
call fcn.00427580
add esp, 0xc
test eax, eax
je 0x427bf8
cmp dword [ebp - 0x2c], 0
je 0x427bf8
push str.socket_select_interrupter
lea eax, [ebp - 0x2c]
push eax
call fcn.00422af0
mov dword [ebp - 0x44], 1
cmp edi, 0xffffffff
jne 0x427c15
call fcn.00501920
mov dword [ebp - 0x2c], 0x2719
mov dword [ebp - 0x28], eax
jmp 0x427c55
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 4
lea eax, [ebp - 0x44]
push eax
push 1
push 6
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov edi, eax
call fcn.00501920
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], esi
test edi, edi
jne 0x427c52
call fcn.00501920
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x28], eax
mov edi, dword [ebp - 0x40]
mov esi, dword [ebp - 0x3c]
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x48]
mov dword [ebp - 0x48], 1
push eax
push ecx
lea edx, [ebp - 0x2d]
mov byte [ebp - 0x2d], 0
mov ecx, esi
call fcn.00427580
add esp, 0xc
test eax, eax
je 0x427c91
cmp dword [ebp - 0x2c], 0
je 0x427c91
push str.socket_select_interrupter
lea eax, [ebp - 0x2c]
push eax
call fcn.00422af0
mov dword [ebp - 0x44], 1
cmp esi, 0xffffffff
jne 0x427ca4
call fcn.00501920
jmp 0x427cd6
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 4
lea eax, [ebp - 0x44]
push eax
push 1
push 6
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov esi, eax
call fcn.00501920
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test esi, esi
jne 0x427cd3
call fcn.00501920
mov esi, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x4c]
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x38], 0xffffffff
mov dword [ebp - 0x34], 0xffffffff
mov dword [eax], esi
mov dword [eax + 4], edi
call fcn.004277a0
lea ecx, [ebp - 0x34]
call fcn.004277a0
lea ecx, [ebp - 0x50]
call fcn.004277a0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00501f98
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret