Function at 0x1001ba90
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 0x101a8198
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x50
mov eax, dword [0x1021bfec]
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 - 0x58], ecx
mov eax, dword fs:[0x2c]
mov edx, dword [0x10228880]
mov dword [ebp - 0x34], 0
mov byte [ebp - 0x30], 0
mov edx, dword [eax + edx*4]
mov eax, dword [0x1022c6ac]
cmp eax, dword [edx + 4]
jle 0x1001bb20
push 0x1022c6ac
call fcn.1016792e
add esp, 4
cmp dword [0x1022c6ac], 0xffffffff
jne 0x1001bb20
call fcn.10005060
push 0x1022c6ac
call fcn.101678ef
add esp, 4
push 1
push 0
push 0
push 6
push 1
push 2
mov dword [ebp - 0x2c], 0x1022c6d0
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov edi, eax
lea ecx, [ebp - 0x34]
cmp edi, 0xffffffff
sete dl
call fcn.10011930
or eax, 0xffffffff
cmp edi, eax
cmove edi, eax
mov dword [ebp - 0x5c], edi
mov dword [ebp - 4], 0
cmp edi, eax
jne 0x1001bb72
cmp byte [ebp - 0x30], 0
je 0x1001bb72
mov edx, str.socket_select_interrupter
lea ecx, [ebp - 0x34]
call fcn.10005d10
mov dword [ebp - 0x38], 1
cmp edi, 0xffffffff
jne 0x1001bb9c
mov edx, 0x2719
lea ecx, [ebp - 0x50]
call fcn.10010b30
movq xmm0, qword [eax]
mov eax, dword [eax + 8]
movq qword [ebp - 0x34], xmm0
mov dword [ebp - 0x2c], eax
jmp 0x1001bbbd
push 4
lea eax, [ebp - 0x38]
push eax
push 4
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
lea ecx, [ebp - 0x34]
setne dl
call fcn.10011930
xorps xmm0, xmm0
mov dword [ebp - 0x40], 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 0x1001bc0b
mov edx, 0x2719
lea ecx, [ebp - 0x50]
call fcn.10010b30
movq xmm0, qword [eax]
mov eax, dword [eax + 8]
movq qword [ebp - 0x34], xmm0
mov dword [ebp - 0x2c], eax
jmp 0x1001bc2c
push 0x10
lea eax, [ebp - 0x24]
push eax
push edi
call dword [sym.imp.WS2_32.dll_bind]
mov esi, eax
lea ecx, [ebp - 0x34]
test esi, esi
setne dl
call fcn.10011930
cmp esi, 0xffffffff
jne 0x1001bc3f
cmp byte [ebp - 0x30], 0
je 0x1001bc3f
mov edx, str.socket_select_interrupter
lea ecx, [ebp - 0x34]
call fcn.10005d10
cmp edi, 0xffffffff
jne 0x1001bc62
mov edx, 0x2719
lea ecx, [ebp - 0x50]
call fcn.10010b30
movq xmm0, qword [eax]
mov eax, dword [eax + 8]
movq qword [ebp - 0x34], xmm0
mov dword [ebp - 0x2c], eax
jmp 0x1001bc92
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 esi, eax
lea ecx, [ebp - 0x34]
mov eax, dword [ebp - 0x3c]
test esi, esi
mov dword [ebp - 0x40], eax
setne dl
call fcn.10011930
cmp esi, 0xffffffff
jne 0x1001bca5
cmp byte [ebp - 0x30], 0
je 0x1001bca5
mov edx, str.socket_select_interrupter
lea ecx, [ebp - 0x34]
call fcn.10005d10
mov esi, dword [sym.imp.WS2_32.dll_htonl]
push 0
call esi
cmp dword [ebp - 0x20], eax
jne 0x1001bcbe
push 0x7f000001
call esi
mov dword [ebp - 0x20], eax
cmp edi, 0xffffffff
jne 0x1001bce1
mov edx, 0x2719
lea ecx, [ebp - 0x50]
call fcn.10010b30
movq xmm0, qword [eax]
mov eax, dword [eax + 8]
movq qword [ebp - 0x34], xmm0
mov dword [ebp - 0x2c], eax
jmp 0x1001bd01
push SysReAllocString
push edi
call dword [sym.imp.WS2_32.dll_listen]
mov esi, eax
lea ecx, [ebp - 0x34]
test esi, esi
setne dl
call fcn.10011930
cmp esi, 0xffffffff
jne 0x1001bd14
cmp byte [ebp - 0x30], 0
je 0x1001bd14
mov edx, str.socket_select_interrupter
lea ecx, [ebp - 0x34]
call fcn.10005d10
push 1
push 0
push 0
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov esi, eax
lea ecx, [ebp - 0x34]
cmp esi, 0xffffffff
sete dl
call fcn.10011930
cmp esi, 0xffffffff
mov eax, 0xffffffff
cmove esi, eax
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x3c], esi
mov byte [ebp - 4], 1
cmp esi, eax
jne 0x1001bd80
cmp byte [ebp - 0x30], 0
je 0x1001bd62
mov edx, str.socket_select_interrupter
lea ecx, [ebp - 0x34]
call fcn.10005d10
mov edx, 0x2719
lea ecx, [ebp - 0x50]
call fcn.10010b30
movq xmm0, qword [eax]
mov eax, dword [eax + 8]
movq qword [ebp - 0x34], xmm0
mov dword [ebp - 0x2c], eax
jmp 0x1001bda2
push dword [ebp - 0x40]
lea eax, [ebp - 0x24]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
mov esi, eax
lea ecx, [ebp - 0x34]
test esi, esi
setne dl
call fcn.10011930
cmp esi, 0xffffffff
jne 0x1001bdb5
cmp byte [ebp - 0x30], 0
je 0x1001bdb5
mov edx, str.socket_select_interrupter
lea ecx, [ebp - 0x34]
call fcn.10005d10
lea eax, [ebp - 0x34]
push eax
push ecx
mov ecx, edi
call fcn.1001b2b0
mov edi, eax
add esp, 8
mov dword [ebp - 0x40], edi
mov byte [ebp - 4], 2
cmp edi, 0xffffffff
jne 0x1001bde5
cmp byte [ebp - 0x30], 0
je 0x1001bde5
mov edx, str.socket_select_interrupter
lea ecx, [ebp - 0x34]
call fcn.10005d10
mov esi, dword [ebp - 0x54]
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x44]
mov dword [ebp - 0x44], 1
push eax
push ecx
lea edx, [ebp - 0x25]
mov byte [ebp - 0x25], 0
mov ecx, esi
call fcn.1001b870
add esp, 0xc
test eax, eax
je 0x1001be20
cmp byte [ebp - 0x30], 0
je 0x1001be20
mov edx, str.socket_select_interrupter
lea ecx, [ebp - 0x34]
call fcn.10005d10
mov dword [ebp - 0x38], 1
cmp esi, 0xffffffff
jne 0x1001be4a
mov edx, 0x2719
lea ecx, [ebp - 0x50]
call fcn.10010b30
movq xmm0, qword [eax]
mov eax, dword [eax + 8]
movq qword [ebp - 0x34], xmm0
mov dword [ebp - 0x2c], eax
jmp 0x1001be68
push 4
lea eax, [ebp - 0x38]
push eax
push 1
push 6
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
lea ecx, [ebp - 0x34]
setne dl
call fcn.10011930
lea eax, [ebp - 0x34]
mov dword [ebp - 0x44], 1
push eax
lea eax, [ebp - 0x44]
mov byte [ebp - 0x25], 0
push eax
push ecx
lea edx, [ebp - 0x25]
mov ecx, edi
call fcn.1001b870
add esp, 0xc
test eax, eax
je 0x1001bea0
cmp byte [ebp - 0x30], 0
je 0x1001bea0
mov edx, str.socket_select_interrupter
lea ecx, [ebp - 0x34]
call fcn.10005d10
mov dword [ebp - 0x38], 1
cmp edi, 0xffffffff
jne 0x1001bebb
mov edx, 0x2719
lea ecx, [ebp - 0x50]
call fcn.10010b30
jmp 0x1001bed9
push 4
lea eax, [ebp - 0x38]
push eax
push 1
push 6
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
lea ecx, [ebp - 0x34]
setne dl
call fcn.10011930
mov eax, dword [ebp - 0x58]
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x40], 0xffffffff
mov dword [ebp - 0x3c], 0xffffffff
mov dword [eax], edi
mov dword [eax + 4], esi
call fcn.10011ed0
lea ecx, [ebp - 0x3c]
call fcn.10011ed0
lea ecx, [ebp - 0x5c]
call fcn.10011ed0
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.101677cc
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret