Function at 0x10187fe0
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x10254be4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov dword [ebp - 0x18], 0xffffffff
mov dword [ebp - 0x20], 0xffffffff
mov dword [ebp - 0x1c], 0xffffffff
mov dword [ebp - 0x2c], 0xffffffff
cmp dword [0x1026ce54], 0
jne 0x1018801b
call fcn.10184350
mov eax, dword [ebp + 8]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 2
je 0x10188029
jmp 0x10188055
mov ecx, 2
mov word [ebp - 0x14], cx
xor edx, edx
mov word [ebp - 0x12], dx
push 0x7f000001
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], 0x10
jmp 0x10188069
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], 0x66
or eax, 0xffffffff
jmp 0x101881ef
cmp dword [ebp + 0xc], 1
je 0x10188083
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], 0x88
or eax, 0xffffffff
jmp 0x101881ef
mov ecx, 4
imul edx, ecx, 0
mov eax, dword [ebp + 0x14]
mov dword [eax + edx], 0xffffffff
mov ecx, 4
shl ecx, 0
mov edx, dword [ebp + 0x14]
mov dword [edx + ecx], 0xffffffff
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.10187e70
add esp, 0xc
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
jne 0x101880c9
jmp 0x10188171
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jge 0x101880e4
jmp 0x10188171
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jge 0x101880fc
jmp 0x10188171
cmp dword [ebp + 0xc], 1
jne 0x1018810e
push 5
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.WS2_32.dll_listen]
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.10187e70
add esp, 0xc
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0xffffffff
jne 0x1018812d
jmp 0x10188171
mov ecx, dword [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x28]
push edx
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jge 0x10188145
jmp 0x10188171
lea ecx, [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x28]
push edx
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.WS2_32.dll_accept]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0xffffffff
jne 0x10188162
jmp 0x10188171
mov dword [ebp - 0x2c], 0
xor ecx, ecx
jne 0x101880a7
cmp dword [ebp - 0x2c], 0
jge 0x101881b2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call sym.ruby.dll_rb_w32_map_errno
add esp, 4
mov esi, eax
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], esi
cmp dword [ebp - 0x20], 0xffffffff
je 0x101881a0
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
cmp dword [ebp - 0x1c], 0xffffffff
je 0x101881b0
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x101881d4
mov ecx, 4
imul edx, ecx, 0
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x20]
mov dword [eax + edx], ecx
mov edx, 4
shl edx, 0
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x1c]
mov dword [eax + edx], ecx
cmp dword [ebp - 0x18], 0xffffffff
je 0x101881e4
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jne 0x101880a7
mov eax, dword [ebp - 0x2c]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.101949b1
mov esp, ebp
pop ebp
ret