Function at 0x5128c0
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58e0f8
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x5ed80c]
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
mov dword [ebp - 0x44], ecx
call fcn.00535e40
mov ebx, dword [sym.imp.WS2_32.dll_WSASetLastError]
push 0
call ebx
push 1
push 0
push 0
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov esi, eax
call fcn.00535e40
mov edi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], edi
cmp esi, 0xffffffff
jne 0x51292d
or esi, esi
jmp 0x51293e
xor edi, edi
call fcn.00535e40
mov ecx, eax
mov eax, edi
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x4c], esi
mov dword [ebp - 4], 0
cmp esi, 0xffffffff
jne 0x512962
test eax, eax
je 0x512962
push str.socket_select_interrupter
lea eax, [ebp - 0x28]
push eax
call fcn.004380c0
mov dword [ebp - 0x38], 1
cmp esi, 0xffffffff
jne 0x51297d
call fcn.00535e40
mov ecx, 0x2719
mov dword [ebp - 0x28], ecx
jmp 0x5129ba
push 0
call ebx
push 4
lea ecx, [ebp - 0x38]
push ecx
push 4
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov edi, eax
call fcn.00535e40
mov dword [ebp - 0x2c], eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], edx
test edi, edi
jne 0x5129bd
call fcn.00535e40
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], eax
mov edi, dword [sym.imp.WS2_32.dll_inet_addr]
xor eax, eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov eax, 2
push str.127.0.0.1
mov dword [ebp - 0x2c], 0x10
mov word [ebp - 0x20], ax
call edi
lea edx, [ebp - 0x28]
push edx
mov dword [ebp - 0x1c], eax
push 0x10
lea eax, [ebp - 0x20]
push eax
xor ecx, ecx
push esi
mov word [ebp - 0x1e], cx
call fcn.005091d0
add esp, 0x10
cmp eax, 0xffffffff
jne 0x512a1d
cmp dword [ebp - 0x28], 0
je 0x512a1d
push str.socket_select_interrupter
lea ecx, [ebp - 0x28]
push ecx
call fcn.004380c0
lea edx, [ebp - 0x28]
push edx
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x20]
push ecx
push esi
call fcn.005094e0
add esp, 0x10
cmp eax, 0xffffffff
jne 0x512a4b
cmp dword [ebp - 0x28], 0
je 0x512a4b
push str.socket_select_interrupter
lea edx, [ebp - 0x28]
push edx
call fcn.004380c0
push str.127.0.0.1
call edi
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x28]
push eax
push SysReAllocString
push esi
call fcn.005092b0
add esp, 0xc
cmp eax, 0xffffffff
jne 0x512a80
cmp dword [ebp - 0x28], 0
je 0x512a80
push str.socket_select_interrupter
lea ecx, [ebp - 0x28]
push ecx
call fcn.004380c0
push 0
call ebx
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.00535e40
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], esi
cmp edi, 0xffffffff
jne 0x512ab7
mov dword [ebp - 0x34], edi
jmp 0x512ac9
xor esi, esi
call fcn.00535e40
mov ecx, esi
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x34], edi
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x54], eax
mov byte [ebp - 4], 1
cmp eax, 0xffffffff
jne 0x512aea
test ecx, ecx
je 0x512aea
push str.socket_select_interrupter
lea edx, [ebp - 0x28]
push edx
call fcn.004380c0
mov edx, dword [ebp - 0x2c]
lea ecx, [ebp - 0x28]
push ecx
push edx
lea ecx, [ebp - 0x20]
push ecx
push eax
call fcn.00509240
add esp, 0x10
cmp eax, 0xffffffff
jne 0x512b18
cmp dword [ebp - 0x28], 0
je 0x512b18
push str.socket_select_interrupter
lea edx, [ebp - 0x28]
push edx
call fcn.004380c0
mov esi, dword [ebp - 0x3c]
cmp esi, 0xffffffff
jne 0x512b2e
call fcn.00535e40
mov ecx, 0x2719
or esi, esi
jmp 0x512b6d
push 0
call ebx
push 0
push 0
push esi
mov dword [ebp - 0x50], 0
call dword [sym.imp.WS2_32.dll_accept]
mov esi, eax
call fcn.00535e40
mov edi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], edi
cmp esi, 0xffffffff
jne 0x512b64
or esi, esi
jmp 0x512b73
xor edi, edi
call fcn.00535e40
mov ecx, edi
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x48], esi
mov byte [ebp - 4], 2
cmp esi, 0xffffffff
jne 0x512b91
test ecx, ecx
je 0x512b91
push str.socket_select_interrupter
lea eax, [ebp - 0x28]
push eax
call fcn.004380c0
mov edi, dword [ebp - 0x34]
mov dword [ebp - 0x40], 1
cmp edi, 0xffffffff
jne 0x512bb2
call fcn.00535e40
mov ecx, 0x2719
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], eax
jmp 0x512bf6
push 0
call ebx
lea ecx, [ebp - 0x40]
push ecx
push 0x8004667e
push edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov edi, eax
call fcn.00535e40
mov dword [ebp - 0x2c], eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [ebp - 0x2c]
mov ecx, eax
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], edx
test edi, edi
js 0x512bf4
call fcn.00535e40
xor ecx, ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], eax
test edi, edi
je 0x512c08
test ecx, ecx
je 0x512c08
push str.socket_select_interrupter
lea eax, [ebp - 0x28]
push eax
call fcn.004380c0
mov edi, dword [ebp - 0x34]
mov dword [ebp - 0x38], 1
cmp edi, 0xffffffff
je 0x512c3d
push 0
call ebx
push 4
lea ecx, [ebp - 0x38]
push ecx
push 1
push 6
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov edi, eax
call fcn.00535e40
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test edi, edi
jne 0x512c42
call fcn.00535e40
mov dword [ebp - 0x40], 1
cmp esi, 0xffffffff
jne 0x512c60
call fcn.00535e40
mov ecx, 0x2719
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], eax
jmp 0x512ca4
push 0
call ebx
lea edx, [ebp - 0x40]
push edx
push 0x8004667e
push esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov edi, eax
call fcn.00535e40
mov dword [ebp - 0x2c], eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], eax
test edi, edi
js 0x512ca2
call fcn.00535e40
xor ecx, ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], eax
test edi, edi
je 0x512cb6
test ecx, ecx
je 0x512cb6
push str.socket_select_interrupter
lea ecx, [ebp - 0x28]
push ecx
call fcn.004380c0
mov dword [ebp - 0x38], 1
cmp esi, 0xffffffff
je 0x512ce8
push 0
call ebx
push 4
lea edx, [ebp - 0x38]
push edx
push 1
push 6
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ebx, eax
call fcn.00535e40
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test ebx, ebx
jne 0x512ced
call fcn.00535e40
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x34]
mov dword [eax], esi
mov esi, dword [ebp - 0x3c]
mov dword [eax + 4], ecx
mov dword [ebp - 4], 0xffffffff
cmp esi, 0xffffffff
je 0x512d2d
mov dword [ebp - 0x28], 0
call fcn.00535e40
lea edx, [ebp - 0x28]
push edx
mov dword [ebp - 0x24], eax
push 1
lea eax, [ebp - 0x2d]
push eax
push esi
mov byte [ebp - 0x2d], 0
call fcn.0050a6c0
add esp, 0x10
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.0055bc32
mov esp, ebp
pop ebp
ret