Function at 0x10016f20
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
sub esp, 0x92c
push ebx
push ebp
push esi
push edi
push 0x3e8
push 2
push 6
call fcn.10006e40
mov edi, eax
add esp, 0xc
cmp edi, 0xffffffff
mov dword [esp + 0x10], edi
jne 0x10016f56
pop edi
pop esi
pop ebp
mov eax, 0x3f
pop ebx
add esp, 0x92c
ret
push edi
call fcn.10016e50
add esp, 4
push 1
call fcn.10016e40
push eax
call fcn.100185a0
add esp, 8
cmp eax, 0xffffffff
jne 0x10016f84
pop edi
pop esi
pop ebp
mov eax, 0x41
pop ebx
add esp, 0x92c
ret
mov eax, dword [0x1005f8c8]
mov ebp, dword [sym.imp.MSVCR100.dll_malloc]
xor ebx, ebx
cmp eax, ebx
je 0x1001705d
push 0x1006510c
call fcn.10019760
push 0xe
call ebp
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x10016fd5
push ebx
call fcn.10016e40
push eax
call fcn.100185a0
add esp, 8
push edi
call sub.WS2_32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 0x40
pop ebx
add esp, 0x92c
ret
mov ecx, esi
xor eax, eax
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
mov word [ecx + 0xc], ax
mov word [esi], 6
call fcn.10016e60
push eax
call fcn.10006f70
lea edx, [esi + 2]
mov word [esi + 0xc], ax
lea ecx, [esi + 6]
or eax, 0xffffffff
mov dword [edx], ebx
push esi
mov dword [ecx], eax
push 0x1006510c
mov word [ecx + 4], ax
call fcn.10019770
mov edx, dword [0x1006510c]
mov dword [0x10065910], 0x1006510c
push edx
call fcn.10019730
add esp, 0x10
test eax, eax
je 0x10017057
push ebx
call fcn.10016e40
push eax
call fcn.100185a0
add esp, 8
push edi
call sub.WS2_32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 0x41
pop ebx
add esp, 0x92c
ret
mov dword [0x1005f8c8], ebx
mov esi, dword [sym.imp.MSVCR100.dll__time32]
push ebx
call esi
add esp, 4
test eax, eax
jge 0x1001707d
pop edi
pop esi
pop ebp
mov eax, 0x4a
pop ebx
add esp, 0x92c
ret
push ebx
call esi
add esp, 4
and eax, 0x80001fff
jns 0x10017091
dec eax
or eax, 0xffffe000
inc eax
mov dword [esp + 0x150], eax
mov esi, dword [esp + 0x944]
mov ecx, 0xfa
xor eax, eax
lea edi, [esp + 0x15c]
mov dword [esp + 0x158], 0xffffffff
mov dword [esp + 0x14c], 0x2c6
mov dword [esp + 0x154], ebx
rep stosd dword es:[edi], eax
mov edi, esi
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3e8
ja 0x100170f2
mov eax, ecx
lea edi, [esp + 0x15c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x1006510c]
mov dword [esp + 0x18], ebx
push eax
mov edi, eax
call fcn.10019730
add esp, 4
test eax, eax
jne 0x100171cd
push edi
call fcn.10019740
add esp, 4
cmp eax, ebx
je 0x1001706d
push 0x10
push eax
call fcn.10016e40
push eax
call sub.WS2_32.dll_connect
push ebx
lea ecx, [esp + 0x150]
push 0x1a0
push ecx
call fcn.10016e40
push eax
call sub.WS2_32.dll_send
cmp eax, 0x1a0
jne 0x10017153
inc dword [esp + 0x18]
jmp 0x100171ae
push 0x10
mov dword [esp + 0x18], 0xe
call ebp
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x100171f6
mov word [esi], 6
call fcn.10016e60
push eax
call fcn.10006f70
add esp, 4
lea edx, [esp + 0x14]
mov word [esi + 0xc], ax
mov dword [esp + 0x14], 0x10
push edx
push esi
call fcn.10016e40
push eax
call sub.WS2_32.dll_getsockname
test eax, eax
push esi
jne 0x1001721f
push 0x10064d08
call fcn.10019770
add esp, 8
push edi
call fcn.10019750
mov edi, eax
push edi
call fcn.10019730
add esp, 8
test eax, eax
je 0x1001710e
cmp dword [esp + 0x18], ebx
jne 0x10017242
push ebx
call fcn.10016e40
push eax
call fcn.100185a0
mov edx, dword [esp + 0x18]
add esp, 8
push edx
call sub.WS2_32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 0x3e
pop ebx
add esp, 0x92c
ret
push ebx
call fcn.10016e40
push eax
call fcn.100185a0
mov eax, dword [esp + 0x18]
add esp, 8
push eax
call sub.WS2_32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x92c
ret
call dword [sym.imp.MSVCR100.dll_free]
mov ecx, dword [esp + 0x14]
add esp, 4
push ecx
call sub.WS2_32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x92c
ret
push ebx
call dword [sym.imp.MSVCR100.dll__time32]
mov ecx, dword [esp + 0x94c]
mov edi, dword [esp + 0x95c]
mov ebp, dword [esp + 0x958]
mov ebx, dword [esp + 0x954]
mov esi, dword [esp + 0x950]
add esp, 4
add eax, ecx
mov dword [esp + 0x14], eax
push 0
mov dword [esp + 0x28], 0
call dword [sym.imp.MSVCR100.dll__time32]
mov ecx, dword [esp + 0x18]
add esp, 4
sub ecx, eax
mov dword [esp + 0x20], ecx
jns 0x1001729c
mov dword [esp + 0x20], 0
mov dword [esp + 0x48], 0
call fcn.10016e40
mov edx, dword [esp + 0x48]
lea ecx, [esp + 0x48]
mov dword [esp + edx*4 + 0x4c], eax
mov edx, dword [esp + 0x48]
lea eax, [esp + 0x20]
inc edx
push eax
push 0
push 0
push ecx
mov dword [esp + 0x58], edx
call fcn.10016e40
inc eax
push eax
call fcn.10006e70
add esp, 0x14
cmp eax, 0xffffffff
je 0x1001736b
test eax, eax
je 0x100173c4
push 0
lea edx, [esp + 0x548]
push 0x3f8
push edx
mov dword [esp + 0x28], 0xe
call fcn.10016e40
push eax
call sub.WS2_32.dll_recv
cmp eax, 0x3f8
jne 0x10017275
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x38]
push eax
push ecx
mov dword [esp + 0x24], 0x10
call fcn.10016e40
push eax
call sub.WS2_32.dll_getpeername
lea edx, [esp + 0x28]
push edx
call fcn.10006880
push edi
push ebp
push ebx
push esi
push eax
lea eax, [esp + 0x56c]
push eax
call fcn.100173f0
add esp, 0x1c
cmp esi, 4
jne 0x1001735d
cmp word [edi + 0x40], 0
ja 0x100173c4
cmp eax, 0x40
je 0x1001737c
test eax, eax
je 0x100173c4
jmp 0x10017275
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2714
jne 0x10017396
jmp 0x10017275
mov ecx, dword [esp + 0x10]
push ecx
call sub.WS2_32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 0x40
pop ebx
add esp, 0x92c
ret
push 0
call fcn.10016e40
push eax
call fcn.100185a0
mov edx, dword [esp + 0x18]
add esp, 8
push edx
call sub.WS2_32.dll_closesocket
mov ecx, dword [ebx]
xor eax, eax
pop edi
pop esi
test ecx, ecx
pop ebp
pop ebx
setle al
add esp, 0x92c
ret
push 0
call fcn.10016e40
push eax
call fcn.100185a0
mov eax, dword [esp + 0x18]
add esp, 8
push eax
call sub.WS2_32.dll_closesocket
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x92c
ret