Function at 0x4f1860
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x689300]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, ecx
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x1c]
cmp eax, 2
je 0x4f1895
cmp eax, 0x17
jne 0x4f1988
push ecx
push esi
mov ecx, ebx
call fcn.004decd0
mov dword [ebp - 0x24], eax
test eax, eax
je 0x4f1988
mov ecx, dword [ebp + 0xc]
lea eax, [edi + 0x20]
push eax
cmp ecx, 2
mov dword [ebp - 8], 0
mov edx, 0x10
mov eax, 0x1c
cmove eax, edx
xorps xmm0, xmm0
push eax
lea eax, [ebp - 0x20]
movq qword [ebp - 0x10], xmm0
push eax
push dword [esi]
movdqu xmmword [ebp - 0x20], xmm0
mov word [ebp - 0x20], cx
call fcn.004d3e60
add esp, 0x10
cmp byte [edi + 0x24], 0
je 0x4f1918
push 0
push 0x2726
lea ecx, [ebp - 0x34]
call fcn.0048c1b0
lea eax, [ebp - 0x34]
push eax
lea eax, [edi + 0x20]
push eax
call fcn.004c7960
add esp, 8
test al, al
je 0x4f1918
mov ecx, dword [ebx + 4]
jmp 0x4f19de
mov byte [edi + 0x38], 1
mov eax, dword [ebx + 4]
add eax, 0x18
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
push edi
push 0
push 0
push 0
push dword [ebp + 0x18]
push dword [ebp - 0x28]
push dword [esi]
call dword [ebp - 0x24]
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test esi, esi
jne 0x4f196c
cmp eax, 0x3e5
je 0x4f196c
mov ecx, dword [ebx + 4]
push esi
push eax
push edi
call fcn.004e42f0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b8774
mov esp, ebp
pop ebp
ret 0x18
mov ecx, dword [ebx + 4]
push edi
call fcn.004e43a0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b8774
mov esp, ebp
pop ebp
ret 0x18
push 0
lea eax, [ebx + 8]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
mov dword [ebp - 0x24], eax
test eax, eax
jne 0x4f19b5
mov ecx, dword [ebx]
push ecx
mov ecx, dword [ecx]
call fcn.004b36b0
push eax
mov dword [ebp - 0x24], eax
lea eax, [ebx + 8]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test byte [esi + 4], 3
jne 0x4f1a42
mov eax, dword [esi]
lea ebx, [edi + 0x20]
mov dword [ebp - 0x3c], eax
cmp eax, 0xffffffff
jne 0x4f19f9
push 0x2719
mov ecx, ebx
call fcn.0048c2d0
mov ecx, dword [ebp - 0x24]
mov ecx, dword [ecx + 0x14]
push 0
push edi
call fcn.004e92c0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b8774
mov esp, ebp
pop ebp
ret 0x18
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push ebx
lea eax, [ebp - 0x38]
mov dword [ebp - 0x38], 1
push eax
push 0x8004667e
push dword [ebp - 0x3c]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push eax
call fcn.004a4dd0
add esp, 8
test eax, eax
js 0x4f19d8
lea ecx, [ebp - 0x34]
call fcn.00487e10
movq xmm0, qword [eax]
movq qword [ebx], xmm0
mov eax, dword [eax + 8]
mov dword [ebx + 8], eax
or byte [esi + 4], 2
lea ebx, [edi + 0x20]
push ebx
push dword [ebp + 0x18]
push dword [ebp - 0x28]
push dword [esi]
call fcn.004d5de0
add esp, 0x10
test eax, eax
je 0x4f19d8
push 0
push 0x2734
lea ecx, [ebp - 0x34]
call fcn.0048c1b0
mov eax, dword [ebx]
cmp eax, dword [ebp - 0x34]
jne 0x4f1a9d
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebx + 8]
mov eax, dword [edx + 8]
or eax, dword [edx + 0xc]
jne 0x4f1a8d
cmp ecx, edx
sete al
test al, al
jne 0x4f1ac1
jmp 0x4f1a9d
mov eax, dword [edx + 8]
cmp dword [ecx + 8], eax
jne 0x4f1a9d
mov eax, dword [edx + 0xc]
cmp dword [ecx + 0xc], eax
je 0x4f1ac1
push 0
push 0x2733
lea ecx, [ebp - 0x34]
call fcn.0048c1b0
lea eax, [ebp - 0x34]
push eax
push ebx
call fcn.004c7840
add esp, 8
test al, al
je 0x4f19d8
lea ecx, [ebp - 0x34]
call fcn.00487e10
mov ecx, dword [ebp - 0x24]
push 0
push 0
movq xmm0, qword [eax]
movq qword [ebx], xmm0
mov eax, dword [eax + 8]
mov dword [ebx + 8], eax
lea eax, [esi + 0x10]
push edi
push eax
push dword [esi]
push 3
call fcn.004f1b00
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005b8774
mov esp, ebp
pop ebp
ret 0x18