Function at 0x1016aaa0
Capabilities:
Connect socket
Get socket status
Set socket configuration

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x224
mov eax, dword [esp + 0x23c]
mov edi, dword [esp + 0x238]
lea ebx, [esp + 0x1c]
mov dword [esp + 0x1c], 1
mov ebp, dword [eax]
push ebx
push 0x8004667e
push ebp
call dword [sym.imp.ws2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
je 0x1016aafd
mov eax, dword [esp + 0x240]
cmp word [eax], 0
je 0x1016ab08
movups xmm0, xmmword [eax + 4]
mov edi, dword [eax + 0x18]
lea ecx, [eax + 0x14]
add eax, 0x1c
mov edx, 0x1c
mov si, 0x17
jmp 0x1016ab1a
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
jmp 0x1016abf1
lea ecx, [eax + 2]
add eax, 6
xorps xmm0, xmm0
mov edx, 0x10
mov si, 2
movzx eax, word [eax]
mov ecx, dword [ecx]
mov word [esp + 0x1c], si
rol ax, 8
mov word [esp + 0x1e], ax
mov dword [esp + 0x20], ecx
movups xmmword [esp + 0x24], xmm0
mov dword [esp + 0x34], edi
push edx
push ebx
push ebp
call dword [sym.imp.ws2_32.dll_connect]
cmp eax, 0xffffffff
je 0x1016ab68
mov byte [esp], 4
mov dword [esp + 0x1c], 0
push ebx
push 0x8004667e
push ebp
call dword [sym.imp.ws2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
jne 0x1016abd2
jmp 0x1016abe4
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
mov edi, eax
mov dword [esp + 4], eax
mov dword [esp], 0
mov dword [esp + 0x1c], 0
push ebx
push 0x8004667e
push ebp
call dword [sym.imp.ws2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
je 0x1016abe4
push edi
call fcn.1016d1d0
add esp, 4
cmp al, 0xd
jne 0x1016abd2
mov esi, dword [esp + 0x244]
mov eax, dword [esp + 0x248]
mov ecx, dword [esp + 0x24c]
mov edi, dword [esp + 0x238]
or eax, esi
jne 0x1016ac18
test ecx, ecx
jne 0x1016ac18
mov byte [edi], 2
mov dword [edi + 4], 0x1023c0d8
jmp 0x1016ac0b
mov edi, dword [esp + 0x238]
movsd xmm0, qword [esp]
movsd qword [edi], xmm0
jmp 0x1016ac0b
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
mov edi, dword [esp + 0x238]
mov ecx, eax
mov edx, eax
shr ecx, 8
shl edx, 0x18
shr eax, 0x18
mov byte [edi], 0
mov dword [edi + 1], edx
mov word [edi + 5], cx
mov byte [edi + 7], al
mov eax, edi
add esp, 0x224
pop esi
pop edi
pop ebx
pop ebp
ret
mov edx, 0x10624dd3
mov eax, ecx
mov dword [esp + 8], esi
mul edx
mov eax, 1
shr edx, 6
cmp ecx, 0x3e8
cmovae eax, edx
test esi, esi
cmovne eax, edx
mov dword [esp + 0xc], eax
lea eax, [esp + 0x24]
push 0xfc
push 0
push eax
call fcn.101934e0
add esp, 0xc
lea eax, [esp + 0x128]
mov dword [esp + 0x120], 1
mov dword [esp + 0x124], ebp
push 0xfc
push 0
push eax
call fcn.101934e0
add esp, 0xc
lea eax, [esp + 8]
mov dword [esp + 0x1c], 1
mov dword [esp + 0x20], ebp
lea ecx, [esp + 0x120]
push eax
push ebx
push ecx
push 0
push 1
call dword [sym.imp.ws2_32.dll_select]
test eax, eax
je 0x1016acc4
cmp eax, 0xffffffff
jne 0x1016acd0
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
mov byte [edi], 0
mov byte [edi + 3], 0
mov word [edi + 1], 0
mov dword [edi + 4], eax
jmp 0x1016ac0b
mov byte [edi], 2
mov dword [edi + 4], 0x1023c0f8
jmp 0x1016ad05
cmp dword [esp + 0x120], 1
je 0x1016ad02
lea eax, [esp + 0x10]
push dword [esp + 0x23c]
push eax
call fcn.1016ad20
add esp, 8
cmp dword [esp + 0x10], 0
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
jne 0x1016ad15
cmp cl, 4
jne 0x1016ad15
mov byte [edi], 4
mov eax, esp
push eax
call fcn.1015d060
add esp, 4
jmp 0x1016ac0b
mov dword [edi], ecx
mov dword [edi + 4], eax
jmp 0x1016ac0b