Function at 0x663160
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x10
push 0
push 0
dec ecx
jne 0x663168
push ecx
push ebx
push esi
push edi
mov edi, eax
xor eax, eax
push ebp
push 0x6634b7
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x7133d0]
cmp dword [eax], 0xa
jl 0x66319e
mov eax, dword [0x713688]
cmp dword [eax], 0x3fab
jge 0x663270
movzx eax, byte [edi + 0x19]
mov dword [ebp - 0x14], eax
imul eax, dword [edi + 0x1c], 0x3e8
mov dword [ebp - 0x10], eax
imul eax, dword [edi + 0x20], 0x3e8
mov dword [ebp - 0xc], eax
xor eax, eax
mov dword [ebp - 8], eax
push 0
push 0
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0xc
lea eax, [ebp - 0x14]
push eax
mov eax, dword [0x710b8c]
push eax
mov eax, dword [edi + 0x28]
push eax
call sub.ws2_32.dll_WSAIoctl
test eax, eax
sete bl
test bl, bl
jne 0x66348a
call sub.ws2_32.dll_WSAGetLastError
mov esi, eax
lea ecx, [ebp - 0x40]
movzx eax, byte [edi + 0x19]
mov dl, 1
call fcn.00425600
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x3c], eax
mov byte [ebp - 0x38], 0x11
mov eax, dword [edi + 0x1c]
mov dword [ebp - 0x34], eax
mov byte [ebp - 0x30], 0
mov eax, dword [edi + 0x20]
mov dword [ebp - 0x2c], eax
mov byte [ebp - 0x28], 0
mov dword [ebp - 0x24], esi
mov byte [ebp - 0x20], 0
lea ecx, [ebp - 0x44]
xor edx, edx
mov eax, esi
call fcn.0042b2b4
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x1c], eax
mov byte [ebp - 0x18], 0x11
lea eax, [ebp - 0x3c]
push eax
push 4
lea edx, [ebp - 0x48]
mov eax, dword [edi]
call fcn.00408494
lea eax, [ebp - 0x48]
mov edx, 0x6634d4
call fcn.0040b0a8
mov edx, dword [ebp - 0x48]
mov ecx, 0x6634fc
mov eax, 2
call fcn.0065b0b4
jmp 0x66348a
cmp byte [edi + 0x19], 1
cmc
sbb eax, eax
mov dword [ebp - 4], eax
push 4
lea eax, [ebp - 4]
push eax
push 8
push 0xffff
mov eax, dword [edi + 0x28]
push eax
call sub.ws2_32.dll_setsockopt
test eax, eax
sete bl
test bl, bl
jne 0x663309
call sub.ws2_32.dll_WSAGetLastError
mov esi, eax
lea ecx, [ebp - 0x64]
movzx eax, byte [edi + 0x19]
mov dl, 1
call fcn.00425600
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0x60], eax
mov byte [ebp - 0x5c], 0x11
mov dword [ebp - 0x58], esi
mov byte [ebp - 0x54], 0
lea ecx, [ebp - 0x68]
xor edx, edx
mov eax, esi
call fcn.0042b2b4
mov eax, dword [ebp - 0x68]
mov dword [ebp - 0x50], eax
mov byte [ebp - 0x4c], 0x11
lea eax, [ebp - 0x60]
push eax
push 2
lea edx, [ebp - 0x6c]
mov eax, dword [edi]
call fcn.00408494
lea eax, [ebp - 0x6c]
mov edx, 0x6634d4
call fcn.0040b0a8
mov edx, dword [ebp - 0x6c]
mov ecx, 0x663574
mov eax, 2
call fcn.0065b0b4
jmp 0x66348a
cmp byte [edi + 0x19], 0
je 0x66348a
cmp dword [edi + 0x1c], 0
je 0x66338d
push 4
lea eax, [edi + 0x1c]
push eax
push 3
push 6
mov eax, dword [edi + 0x28]
push eax
call sub.ws2_32.dll_setsockopt
test eax, eax
je 0x66338d
call sub.ws2_32.dll_WSAGetLastError
mov esi, eax
mov eax, dword [edi + 0x1c]
mov dword [ebp - 0x60], eax
mov byte [ebp - 0x5c], 0
mov dword [ebp - 0x58], esi
mov byte [ebp - 0x54], 0
lea ecx, [ebp - 0x70]
xor edx, edx
mov eax, esi
call fcn.0042b2b4
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x50], eax
mov byte [ebp - 0x4c], 0x11
lea eax, [ebp - 0x60]
push eax
push 2
lea edx, [ebp - 0x74]
mov eax, dword [edi]
call fcn.00408494
lea eax, [ebp - 0x74]
mov edx, 0x6634d4
call fcn.0040b0a8
mov edx, dword [ebp - 0x74]
mov ecx, 0x6635d4
mov eax, 2
call fcn.0065b0b4
cmp dword [edi + 0x20], 0
je 0x663407
push 4
lea eax, [edi + 0x20]
push eax
push 0x11
push 6
mov eax, dword [edi + 0x28]
push eax
call sub.ws2_32.dll_setsockopt
test eax, eax
je 0x663407
call sub.ws2_32.dll_WSAGetLastError
mov esi, eax
mov eax, dword [edi + 0x20]
mov dword [ebp - 0x60], eax
mov byte [ebp - 0x5c], 0
mov dword [ebp - 0x58], esi
mov byte [ebp - 0x54], 0
lea ecx, [ebp - 0x78]
xor edx, edx
mov eax, esi
call fcn.0042b2b4
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x50], eax
mov byte [ebp - 0x4c], 0x11
lea eax, [ebp - 0x60]
push eax
push 2
lea edx, [ebp - 0x7c]
mov eax, dword [edi]
call fcn.00408494
lea eax, [ebp - 0x7c]
mov edx, 0x6634d4
call fcn.0040b0a8
mov edx, dword [ebp - 0x7c]
mov ecx, 0x663634
mov eax, 2
call fcn.0065b0b4
cmp dword [edi + 0x24], 0
je 0x66348a
push 4
lea eax, [edi + 0x24]
push eax
push 0x10
push 6
mov eax, dword [edi + 0x28]
push eax
call sub.ws2_32.dll_setsockopt
test eax, eax
je 0x66348a
call sub.ws2_32.dll_WSAGetLastError
mov esi, eax
mov eax, dword [edi + 0x24]
mov dword [ebp - 0x60], eax
mov byte [ebp - 0x5c], 0
mov dword [ebp - 0x58], esi
mov byte [ebp - 0x54], 0
lea ecx, [ebp - 0x80]
xor edx, edx
mov eax, esi
call fcn.0042b2b4
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x50], eax
mov byte [ebp - 0x4c], 0x11
lea eax, [ebp - 0x60]
push eax
push 2
lea edx, [ebp - 0x84]
mov eax, dword [edi]
call fcn.00408494
lea eax, [ebp - 0x84]
mov edx, 0x6634d4
call fcn.0040b0a8
mov edx, dword [ebp - 0x84]
mov ecx, 0x663698
mov eax, 2
call fcn.0065b0b4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x6634be
lea eax, [ebp - 0x84]
mov edx, 9
call fcn.0040a23c
lea eax, [ebp - 0x48]
mov edx, 3
call fcn.0040a23c
pop eax
jmp eax