Function at 0x1012bb00
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
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 0x101f16f8
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x40
mov eax, dword [0x10285124]
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.101dfef0
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.101dfef0
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 0x1012bb80
or edi, edi
jmp 0x1012bb8d
call fcn.101dfef0
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 0x1012bbb9
xor edx, edx
mov eax, fcn.100a5110
test ecx, ecx
cmove eax, edx
test eax, eax
je 0x1012bbb9
mov edx, str.socket_select_interrupter
lea ecx, [ebp - 0x2c]
call fcn.10127780
mov dword [ebp - 0x3c], 1
cmp edi, 0xffffffff
je 0x1012bbf2
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 4
lea eax, [ebp - 0x3c]
push eax
push 4
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov esi, eax
call fcn.101dfef0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test esi, esi
jne 0x1012bbf7
call fcn.101dfef0
xorps xmm0, xmm0
mov dword [ebp - 0x34], 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 0x1012bc3c
call fcn.101dfef0
mov ecx, 0x2719
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], ecx
jmp 0x1012bcbc
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 - 0x44], eax
call fcn.101dfef0
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov dword [ebp - 0x28], esi
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x2c], ecx
test eax, eax
jne 0x1012bcb7
call fcn.101dfef0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x2c]
mov ecx, edi
push eax
lea eax, [ebp - 0x34]
push eax
lea edx, [ebp - 0x24]
call fcn.10129e90
add esp, 8
cmp eax, 0xffffffff
jne 0x1012bcd9
xor ecx, ecx
mov eax, fcn.100a5110
cmp dword [ebp - 0x2c], ecx
cmove eax, ecx
test eax, eax
je 0x1012bcd9
mov edx, str.socket_select_interrupter
lea ecx, [ebp - 0x2c]
call fcn.10127780
cmp eax, 0xffffffff
jne 0x1012bc7f
xor edx, edx
mov eax, fcn.100a5110
test ecx, ecx
cmove eax, edx
test eax, eax
je 0x1012bc7f
mov edx, str.socket_select_interrupter
lea ecx, [ebp - 0x2c]
call fcn.10127780
push 0x7f000001
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [ebp - 0x20], eax
mov ecx, edi
lea eax, [ebp - 0x2c]
push eax
call fcn.10129a50
add esp, 4
cmp eax, 0xffffffff
jne 0x1012bd18
xor ecx, ecx
mov eax, fcn.100a5110
cmp dword [ebp - 0x2c], ecx
cmove eax, ecx
test eax, eax
je 0x1012bd18
mov edx, str.socket_select_interrupter
lea ecx, [ebp - 0x2c]
call fcn.10127780
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 - 0x38], eax
call fcn.101dfef0
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x28], esi
mov ecx, eax
mov esi, dword [ebp - 0x38]
mov dword [ebp - 0x2c], ecx
cmp esi, 0xffffffff
jne 0x1012bd59
or esi, esi
mov dword [ebp - 0x38], esi
jmp 0x1012bd66
call fcn.101dfef0
xor ecx, ecx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x44], esi
mov byte [ebp - 4], 1
cmp esi, 0xffffffff
jne 0x1012bda1
xor edx, edx
mov eax, fcn.100a5110
test ecx, ecx
cmove eax, edx
test eax, eax
je 0x1012bd8f
mov edx, str.socket_select_interrupter
lea ecx, [ebp - 0x2c]
call fcn.10127780
call fcn.101dfef0
mov ecx, 0x2719
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], ecx
jmp 0x1012be1b
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push dword [ebp - 0x34]
lea eax, [ebp - 0x24]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x40], eax
call fcn.101dfef0
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov dword [ebp - 0x28], esi
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x2c], ecx
test eax, eax
jne 0x1012be16
call fcn.101dfef0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x2c]
push eax
push ecx
mov ecx, edi
call fcn.101294e0
add esp, 8
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x40], eax
mov byte [ebp - 4], 2
cmp eax, 0xffffffff
jne 0x1012be38
cmp dword [ebp - 0x2c], 0
je 0x1012be38
mov edx, str.socket_select_interrupter
lea ecx, [ebp - 0x2c]
call fcn.10127780
cmp eax, 0xffffffff
jne 0x1012bde5
xor edx, edx
mov eax, fcn.100a5110
test ecx, ecx
cmove eax, edx
test eax, eax
je 0x1012bde5
mov edx, str.socket_select_interrupter
lea ecx, [ebp - 0x2c]
call fcn.10127780
mov edi, dword [ebp - 0x38]
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.10129f10
add esp, 0xc
test eax, eax
je 0x1012be73
cmp dword [ebp - 0x2c], 0
je 0x1012be73
mov edx, str.socket_select_interrupter
lea ecx, [ebp - 0x2c]
call fcn.10127780
mov dword [ebp - 0x3c], 1
cmp edi, 0xffffffff
jne 0x1012be90
call fcn.101dfef0
mov dword [ebp - 0x2c], 0x2719
mov dword [ebp - 0x28], eax
jmp 0x1012bed0
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 4
lea eax, [ebp - 0x3c]
push eax
push 1
push 6
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov edi, eax
call fcn.101dfef0
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 0x1012becd
call fcn.101dfef0
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x28], eax
mov edi, dword [ebp - 0x38]
mov esi, dword [ebp - 0x34]
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.10129f10
add esp, 0xc
test eax, eax
je 0x1012bf0b
cmp dword [ebp - 0x2c], 0
je 0x1012bf0b
mov edx, str.socket_select_interrupter
lea ecx, [ebp - 0x2c]
call fcn.10127780
mov dword [ebp - 0x3c], 1
cmp esi, 0xffffffff
jne 0x1012bf1e
call fcn.101dfef0
jmp 0x1012bf50
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 4
lea eax, [ebp - 0x3c]
push eax
push 1
push 6
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov esi, eax
call fcn.101dfef0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test esi, esi
jne 0x1012bf4d
call fcn.101dfef0
mov esi, dword [ebp - 0x34]
mov eax, dword [ebp - 0x4c]
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x40], 0xffffffff
mov dword [ebp - 0x44], 0xffffffff
mov dword [eax], esi
mov dword [eax + 4], edi
call fcn.1012bab0
lea ecx, [ebp - 0x44]
call fcn.1012bab0
lea ecx, [ebp - 0x50]
call fcn.1012bab0
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.101b451c
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret