Function at 0x411380
Capabilities:
Set socket configuration

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47e41d
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x50
mov eax, dword [0x49d140]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x44], esi
mov eax, dword [ebx + 0x14]
mov edx, dword [ebx + 0xc]
mov ecx, dword [ebx + 8]
mov edi, dword [ebx + 0x1c]
mov dword [ebp - 0x50], eax
mov eax, dword [ebx + 0x20]
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x58], eax
cmp edx, 2
je 0x4113e9
cmp edx, 0x17
jne 0x4115eb
mov eax, dword [ebx + 0x10]
cmp eax, 1
je 0x4113fd
cmp eax, 5
je 0x4113fd
xor eax, eax
jmp 0x411482
lea eax, [esi + 0xc]
xor ecx, ecx
mov dword [ebp - 0x48], eax
xor eax, eax
mov esi, dword [ebp - 0x48]
lock cmpxchg dword [esi], ecx
mov esi, dword [ebp - 0x44]
mov dword [ebp - 0x54], eax
test eax, eax
jne 0x411478
push 0
push 0
lea eax, [ebp - 0x48]
mov dword [ebp - 0x24], 0x25a207b9
push eax
push 4
lea eax, [ebp - 0x54]
mov dword [ebp - 0x20], 0x4660ddf3
push eax
push 0x10
lea eax, [ebp - 0x24]
mov dword [ebp - 0x1c], 0xe576e98e
push eax
mov eax, dword [ebp - 0x4c]
push 0xc8000006
mov dword [ebp - 0x18], 0x3e06748c
mov dword [ebp - 0x48], 0
push dword [eax]
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x41146a
mov eax, esi
mov dword [ebp - 0x54], eax
jmp 0x41146d
mov eax, dword [ebp - 0x54]
lea ecx, [esi + 0xc]
xchg dword [ecx], eax
mov eax, dword [ebp - 0x54]
mov edx, dword [ebx + 0xc]
xor ecx, ecx
cmp eax, esi
cmove eax, ecx
mov ecx, dword [ebp - 0x4c]
mov dword [ebp - 0x48], eax
test eax, eax
je 0x4115eb
mov ecx, dword [ecx]
lea eax, [edi + 0x20]
push eax
cmp edx, 2
mov dword [ebp - 0x18], 0x10
xorps xmm0, xmm0
mov dword [ebp - 0x28], 0
mov eax, 0x1c
movq qword [ebp - 0x30], xmm0
cmove eax, dword [ebp - 0x18]
movups xmmword [ebp - 0x40], xmm0
mov word [ebp - 0x40], dx
lea edx, [ebp - 0x40]
push eax
call fcn.0040e660
add esp, 8
cmp dword [edi + 0x20], 0
je 0x41158f
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov eax, dword [0x4a2a0c]
cmp eax, dword [ecx + 4]
jle 0x411518
push 0x4a2a0c
call fcn.004584c4
add esp, 4
cmp dword [0x4a2a0c], 0xffffffff
jne 0x411518
push 0x484d10
call fcn.00458aa9
add esp, 4
push 0x4a2a0c
call fcn.00458473
add esp, 4
mov eax, dword [edi + 0x24]
mov eax, dword [eax + 4]
cmp eax, dword [0x49dc2c]
jne 0x41152f
cmp dword [edi + 0x20], 0x2726
je 0x41158f
mov esi, dword [esi + 4]
lock inc dword [esi + 0x18]
push edi
push 0
push 0
mov dword [edi + 0x1c], 1
push dword [esi + 0x14]
call dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
jne 0x4116ad
lea eax, [esi + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [edi + 0x14], 0
mov eax, dword [esi + 0x58]
test eax, eax
je 0x411570
mov dword [eax + 0x14], edi
jmp 0x411573
mov dword [esi + 0x54], edi
mov dword [esi + 0x58], edi
lea eax, [esi + 0x34]
mov ecx, 1
xchg dword [eax], ecx
lea eax, [esi + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x4116ad
mov byte [edi + 0x38], 1
mov eax, dword [esi + 4]
add eax, 0x18
lock inc dword [eax]
mov edi, dword [ebp - 0x58]
mov eax, dword [ebp - 0x4c]
push edi
push 0
push 0
push 0
push dword [ebx + 0x18]
push dword [ebp - 0x50]
push dword [eax]
call dword [ebp - 0x48]
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test esi, esi
jne 0x4115da
cmp eax, 0x3e5
je 0x4115da
mov ecx, dword [ebp - 0x44]
push esi
push eax
push edi
mov ecx, dword [ecx + 4]
call fcn.0040db70
jmp 0x4116ad
mov ecx, dword [ebp - 0x44]
push edi
mov ecx, dword [ecx + 4]
call fcn.0040db00
jmp 0x4116ad
lea edx, [esi + 8]
xor ecx, ecx
xor eax, eax
lock cmpxchg dword [edx], ecx
mov ecx, eax
mov dword [ebp - 0x44], ecx
test ecx, ecx
jne 0x411638
mov eax, dword [esi]
push 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 0
mov ecx, dword [eax]
lea eax, [ebp - 0x5c]
push eax
call fcn.0042f8f0
add esp, 8
lea eax, [ebp - 0x5c]
push dword [ecx + 0x18]
push 0x42f910
push eax
call fcn.0040ccd0
mov dword [ebp - 0x44], eax
lea ecx, [esi + 8]
xchg dword [ecx], eax
mov esi, dword [ebp - 0x4c]
test byte [esi + 4], 3
jne 0x411701
mov eax, dword [esi]
cmp eax, 0xffffffff
jne 0x4116d0
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov eax, dword [0x4a2a0c]
cmp eax, dword [ecx + 4]
jle 0x411695
push 0x4a2a0c
call fcn.004584c4
add esp, 4
cmp dword [0x4a2a0c], 0xffffffff
jne 0x411695
push 0x484d10
call fcn.00458aa9
add esp, 4
push 0x4a2a0c
call fcn.00458473
add esp, 4
mov dword [edi + 0x20], 0x2719
mov dword [edi + 0x24], 0x49dc28
push ecx
mov ecx, dword [ebp - 0x44]
push edi
call fcn.0040fee0
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00458460
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x1c
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x58], 1
push ecx
push 0x8004667e
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov esi, eax
lea ecx, [edi + 0x20]
mov edx, esi
shr edx, 0x1f
call fcn.0040e5f0
test esi, esi
js 0x4116a3
mov esi, dword [ebp - 0x4c]
or byte [esi + 4], 2
mov edx, dword [ebp - 0x50]
lea eax, [edi + 0x20]
mov ecx, dword [esi]
push eax
push dword [ebx + 0x18]
call fcn.0040e870
add esp, 8
test eax, eax
je 0x4116a3
mov eax, dword fs:[0x2c]
mov ecx, dword [0x4a2a0c]
mov edx, dword [eax]
mov dword [ebp - 0x50], edx
cmp ecx, dword [edx + 4]
jle 0x41176d
push 0x4a2a0c
call fcn.004584c4
mov ecx, dword [0x4a2a0c]
add esp, 4
cmp ecx, 0xffffffff
jne 0x41176a
push 0x484d10
call fcn.00458aa9
add esp, 4
push 0x4a2a0c
call fcn.00458473
mov ecx, dword [0x4a2a0c]
add esp, 4
mov edx, dword [ebp - 0x50]
mov eax, dword [edi + 0x24]
mov eax, dword [eax + 4]
cmp eax, dword [0x49dc2c]
jne 0x411784
cmp dword [edi + 0x20], 0x2734
je 0x4117db
cmp ecx, dword [edx + 4]
jle 0x4117bc
push 0x4a2a0c
call fcn.004584c4
add esp, 4
cmp dword [0x4a2a0c], 0xffffffff
jne 0x4117bc
push 0x484d10
call fcn.00458aa9
add esp, 4
push 0x4a2a0c
call fcn.00458473
add esp, 4
mov eax, dword [edi + 0x24]
mov eax, dword [eax + 4]
cmp eax, dword [0x49dc2c]
jne 0x4116a3
cmp dword [edi + 0x20], 0x2733
jne 0x4116a3
mov dword [edi + 0x20], 0
mov dword [edi + 0x24], 0x49dbf8
mov eax, dword [esi]
mov esi, dword [ebp - 0x44]
mov dword [ebp - 0x58], eax
lea eax, [esi + 0x18]
push eax
mov dword [ebp - 0x1c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 0x18], 1
mov dword [ebp - 4], 0
cmp byte [esi + 0xfc], 0
je 0x41182f
push ecx
push edi
mov ecx, esi
call fcn.0040fee0
lea eax, [esi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 3
jmp 0x4116b0
push edi
push dword [ebp - 0x58]
lea ecx, [esi + 0x8c]
call fcn.00415960
mov ecx, dword [esi + 0x14]
add ecx, 0x18
lock inc dword [ecx]
test al, al
je 0x411853
lea ecx, [esi + 0x30]
call fcn.0040fb70
lea eax, [esi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 3
jmp 0x4116b0