Function at 0x4096e0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
push 0xffffffffffffffff
push 0x4e2818
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x51a744]
xor eax, esp
mov dword [esp + 0x54], eax
push esi
push edi
mov eax, dword [0x51a744]
xor eax, esp
push eax
lea eax, [esp + 0x68]
mov dword fs:[0], eax
mov dword [esp + 0x24], ecx
call fcn.00458e30
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
mov dword [esp + 0x20], edi
call fcn.00458e30
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], esi
cmp edi, 0xffffffff
jne 0x409761
or edi, edi
mov dword [esp + 0x20], edi
jmp 0x409774
call fcn.00458e30
mov dword [esp + 0x38], eax
xor eax, eax
mov dword [esp + 0x34], 0
mov dword [esp + 0x28], edi
mov dword [esp + 0x70], 0
cmp edi, 0xffffffff
jne 0x409797
test eax, eax
je 0x409797
mov edx, str.socket_select_interrupter
lea ecx, [esp + 0x34]
call fcn.00407250
mov dword [esp + 0x3c], 1
cmp edi, 0xffffffff
je 0x4097d2
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 4
lea eax, [esp + 0x40]
push eax
push 4
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov esi, eax
call fcn.00458e30
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test esi, esi
jne 0x4097d7
call fcn.00458e30
xorps xmm0, xmm0
mov dword [esp + 0x1c], 0x10
mov eax, 2
movdqa xmmword [esp + 0x44], xmm0
push 0x7f000001
mov word [esp + 0x48], ax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esp + 0x48], eax
xor eax, eax
mov word [esp + 0x46], ax
cmp edi, 0xffffffff
jne 0x409824
call fcn.00458e30
mov ecx, 0x2719
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], ecx
jmp 0x4098a5
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 0x10
lea eax, [esp + 0x48]
push eax
push edi
call dword [sym.imp.WS2_32.dll_bind]
mov dword [esp + 0x18], eax
call fcn.00458e30
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov dword [esp + 0x38], esi
mov eax, dword [esp + 0x18]
mov dword [esp + 0x34], ecx
test eax, eax
jne 0x4098a0
call fcn.00458e30
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], eax
lea eax, [esp + 0x34]
mov ecx, edi
push eax
lea eax, [esp + 0x20]
push eax
lea edx, [esp + 0x4c]
call fcn.004092c0
add esp, 8
cmp eax, 0xffffffff
jne 0x4098b7
cmp dword [esp + 0x34], 0
je 0x4098b7
mov edx, str.socket_select_interrupter
lea ecx, [esp + 0x34]
call fcn.00407250
cmp eax, 0xffffffff
jne 0x40986e
test ecx, ecx
je 0x40986e
mov edx, str.socket_select_interrupter
lea ecx, [esp + 0x34]
call fcn.00407250
push 0x7f000001
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esp + 0x48], eax
cmp edi, 0xffffffff
jne 0x4098e2
call fcn.00458e30
mov ecx, 0x2719
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], ecx
jmp 0x409967
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push accept
push edi
call dword [sym.imp.WS2_32.dll_listen]
mov dword [esp + 0x18], eax
call fcn.00458e30
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov dword [esp + 0x38], esi
mov eax, dword [esp + 0x18]
mov dword [esp + 0x34], ecx
test eax, eax
jne 0x409962
call fcn.00458e30
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 [esp + 0x18], eax
call fcn.00458e30
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 0x38], esi
mov esi, dword [esp + 0x18]
mov dword [esp + 0x34], eax
cmp esi, 0xffffffff
jne 0x409979
or esi, esi
mov dword [esp + 0x18], esi
jmp 0x40998c
cmp eax, 0xffffffff
jne 0x40991e
test ecx, ecx
je 0x40991e
mov edx, str.socket_select_interrupter
lea ecx, [esp + 0x34]
call fcn.00407250
call fcn.00458e30
mov dword [esp + 0x38], eax
xor eax, eax
mov dword [esp + 0x34], 0
mov dword [esp + 0x2c], esi
mov byte [esp + 0x70], 1
cmp esi, 0xffffffff
jne 0x4099c3
test eax, eax
je 0x4099ac
mov edx, str.socket_select_interrupter
lea ecx, [esp + 0x34]
call fcn.00407250
call fcn.00458e30
mov ecx, 0x2719
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], ecx
jmp 0x409a49
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push dword [esp + 0x1c]
lea eax, [esp + 0x48]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
mov dword [esp + 0x1c], eax
call fcn.00458e30
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov dword [esp + 0x38], esi
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x34], ecx
test eax, eax
jne 0x409a44
call fcn.00458e30
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], eax
lea eax, [esp + 0x34]
push eax
push ecx
mov ecx, edi
call fcn.00408ba0
mov esi, eax
add esp, 8
mov dword [esp + 0x30], esi
mov byte [esp + 0x70], 2
cmp esi, 0xffffffff
jne 0x409a5b
cmp dword [esp + 0x34], 0
je 0x409a5b
mov edx, str.socket_select_interrupter
lea ecx, [esp + 0x34]
call fcn.00407250
cmp eax, 0xffffffff
jne 0x409a0f
test ecx, ecx
je 0x409a0f
mov edx, str.socket_select_interrupter
lea ecx, [esp + 0x34]
call fcn.00407250
mov edi, dword [esp + 0x18]
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x44]
mov dword [esp + 0x44], 1
push eax
push ecx
lea edx, [esp + 0x23]
mov byte [esp + 0x23], 0
mov ecx, edi
call fcn.00409360
add esp, 0xc
test eax, eax
je 0x409a9e
cmp dword [esp + 0x34], 0
je 0x409a9e
mov edx, str.socket_select_interrupter
lea ecx, [esp + 0x34]
call fcn.00407250
mov dword [esp + 0x3c], 1
cmp edi, 0xffffffff
jne 0x409aba
call fcn.00458e30
mov dword [esp + 0x34], 0x2719
jmp 0x409b01
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 4
lea eax, [esp + 0x40]
push eax
push 1
push 6
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov dword [esp + 0x1c], eax
call fcn.00458e30
mov edi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp dword [esp + 0x1c], 0
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], edi
jne 0x409b05
call fcn.00458e30
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], eax
lea eax, [esp + 0x34]
mov dword [esp + 0x40], 1
push eax
lea eax, [esp + 0x44]
mov byte [esp + 0x1b], 0
push eax
push ecx
lea edx, [esp + 0x23]
mov ecx, esi
call fcn.00409360
add esp, 0xc
test eax, eax
je 0x409b44
cmp dword [esp + 0x34], 0
je 0x409b44
mov edx, str.socket_select_interrupter
lea ecx, [esp + 0x34]
call fcn.00407250
mov dword [esp + 0x3c], 1
cmp esi, 0xffffffff
je 0x409b7c
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 4
lea eax, [esp + 0x40]
push eax
push 1
push 6
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov edi, eax
call fcn.00458e30
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test edi, edi
jne 0x409b81
call fcn.00458e30
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x70], 0xffffffff
mov dword [ecx], esi
mov esi, dword [esp + 0x20]
mov dword [ecx + 4], eax
cmp esi, 0xffffffff
je 0x409bd3
xorps xmm0, xmm0
movq qword [esp + 0x34], xmm0
mov dword [esp + 0x34], 0
call fcn.00458e30
mov dword [esp + 0x38], eax
lea edx, [esp + 0x17]
lea eax, [esp + 0x34]
mov byte [esp + 0x17], 0
push eax
push 1
mov ecx, esi
call fcn.00408cb0
add esp, 8
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.0045a560
mov esp, ebp
pop ebp
ret