Function at 0x66315c
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x10
push 0
push 0
dec ecx
jne 0x663164
push ecx
push ebx
push esi
push edi
mov edi, eax
xor eax, eax
push ebp
push 0x6634b3
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x7133a8]
cmp dword [eax], 0xa
jl 0x66319a
mov eax, dword [0x713660]
cmp dword [eax], 0x3fab
jge 0x66326c
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 0x663486
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, 0x6634d0
call fcn.0040b0a8
mov edx, dword [ebp - 0x48]
mov ecx, 0x6634f8
mov eax, 2
call fcn.0065b0b0
jmp 0x663486
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 0x663305
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, 0x6634d0
call fcn.0040b0a8
mov edx, dword [ebp - 0x6c]
mov ecx, 0x663570
mov eax, 2
call fcn.0065b0b0
jmp 0x663486
cmp byte [edi + 0x19], 0
je 0x663486
cmp dword [edi + 0x1c], 0
je 0x663389
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 0x663389
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, 0x6634d0
call fcn.0040b0a8
mov edx, dword [ebp - 0x74]
mov ecx, 0x6635d0
mov eax, 2
call fcn.0065b0b0
cmp dword [edi + 0x20], 0
je 0x663403
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 0x663403
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, 0x6634d0
call fcn.0040b0a8
mov edx, dword [ebp - 0x7c]
mov ecx, 0x663630
mov eax, 2
call fcn.0065b0b0
cmp dword [edi + 0x24], 0
je 0x663486
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 0x663486
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, 0x6634d0
call fcn.0040b0a8
mov edx, dword [ebp - 0x84]
mov ecx, 0x663694
mov eax, 2
call fcn.0065b0b0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x6634ba
lea eax, [ebp - 0x84]
mov edx, 9
call fcn.0040a23c
lea eax, [ebp - 0x48]
mov edx, 3
call fcn.0040a23c
pop eax
jmp eax