Function at 0x406e30
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 0x428b7d
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x48
mov eax, dword [0x4360e4]
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 - 0x54], esi
mov eax, dword [ebx + 0x14]
mov edx, dword [ebx + 8]
mov edi, dword [ebx + 0x1c]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebx + 0x20]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x48], edx
cmp eax, 2
je 0x406e99
cmp eax, 0x17
jne 0x40703d
mov eax, dword [ebx + 0x10]
cmp eax, 1
je 0x406eaa
cmp eax, 5
jne 0x40703d
xor ecx, ecx
lea edx, [esi + 0xc]
xor eax, eax
lock cmpxchg dword [edx], ecx
mov edx, dword [ebp - 0x48]
mov dword [ebp - 0x40], eax
test eax, eax
jne 0x406f16
push 0
push 0
lea eax, [ebp - 0x18]
mov dword [ebp - 0x30], 0x25a207b9
push eax
push 4
lea eax, [ebp - 0x40]
mov dword [ebp - 0x2c], 0x4660ddf3
push eax
push 0x10
lea eax, [ebp - 0x30]
mov dword [ebp - 0x28], 0xe576e98e
push eax
push 0xc8000006
push dword [edx]
mov dword [ebp - 0x24], 0x3e06748c
mov dword [ebp - 0x18], 0
call dword [sym.imp.WS2_32.dll_WSAIoctl]
mov ecx, dword [ebp - 0x40]
test eax, eax
lea eax, [esi + 0xc]
cmovne ecx, esi
mov dword [ebp - 0x40], ecx
xchg dword [eax], ecx
mov eax, dword [ebp - 0x40]
xor ecx, ecx
cmp eax, esi
cmove eax, ecx
mov dword [ebp - 0x18], eax
test eax, eax
je 0x40703d
xorps xmm0, xmm0
mov dword [ebp - 0x24], ecx
mov ecx, dword [ebx + 0xc]
lea eax, [edi + 0x20]
cmp ecx, 2
movq qword [ebp - 0x2c], xmm0
movups xmmword [ebp - 0x3c], xmm0
mov word [ebp - 0x3c], cx
mov edx, 0x10
mov ecx, dword [ebp - 0x48]
push eax
mov eax, 0x1c
cmove eax, edx
lea edx, [ebp - 0x3c]
mov ecx, dword [ecx]
push eax
call fcn.00404450
add esp, 8
cmp dword [edi + 0x20], 0
je 0x406fcd
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov eax, dword [0x4384c8]
cmp eax, dword [ecx + 4]
jle 0x406fae
push 0x4384c8
call fcn.0040f975
add esp, 4
cmp dword [0x4384c8], 0xffffffff
jne 0x406fae
push 0x429950
call fcn.0040fdcc
add esp, 4
push 0x4384c8
call fcn.0040f92b
add esp, 4
mov eax, dword [edi + 0x24]
mov eax, dword [eax + 4]
cmp eax, dword [0x4369ac]
jne 0x406fc5
cmp dword [edi + 0x20], 0x2726
je 0x406fcd
mov esi, dword [esi + 4]
jmp 0x4070fd
mov byte [edi + 0x38], 1
mov eax, dword [esi + 4]
add eax, 0x18
lock inc dword [eax]
mov edi, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x48]
push edi
push 0
push 0
push 0
push dword [ebx + 0x18]
push dword [ebp - 0x4c]
push dword [eax]
call dword [ebp - 0x18]
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test esi, esi
jne 0x407018
cmp eax, 0x3e5
je 0x407018
push esi
push eax
mov eax, dword [ebp - 0x54]
push edi
mov ecx, dword [eax + 4]
call fcn.00403940
jmp 0x407370
mov eax, dword [ebp - 0x54]
lea ecx, [edi + 0x1c]
mov edx, 1
mov esi, dword [eax + 4]
xor eax, eax
lock cmpxchg dword [ecx], edx
cmp eax, 1
jne 0x407370
push edi
push 2
jmp 0x40710b
lea edx, [esi + 8]
xor ecx, ecx
xor eax, eax
lock cmpxchg dword [edx], ecx
mov ecx, eax
mov dword [ebp - 0x40], ecx
test ecx, ecx
jne 0x40708a
mov eax, dword [esi]
push 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov ecx, dword [eax]
lea eax, [ebp - 0x20]
push eax
call fcn.0040ab10
add esp, 8
lea eax, [ebp - 0x20]
push dword [ecx + 0x18]
push 0x40ab30
push eax
call fcn.00402840
mov dword [ebp - 0x40], eax
lea ecx, [esi + 8]
xchg dword [ecx], eax
mov ecx, dword [ebp - 0x48]
lea esi, [edi + 0x20]
test byte [ecx + 4], 3
jne 0x407176
mov eax, dword [ecx]
cmp eax, 0xffffffff
jne 0x407142
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov eax, dword [0x4384c8]
cmp eax, dword [ecx + 4]
jle 0x4070ea
push 0x4384c8
call fcn.0040f975
add esp, 4
cmp dword [0x4384c8], 0xffffffff
jne 0x4070ea
push 0x429950
call fcn.0040fdcc
add esp, 4
push 0x4384c8
call fcn.0040f92b
add esp, 4
mov dword [esi], 0x2719
mov dword [esi + 4], 0x4369a8
mov esi, dword [ebp - 0x40]
mov esi, dword [esi + 0x14]
lock inc dword [esi + 0x18]
push edi
mov dword [edi + 0x1c], 1
push 0
push 0
push dword [esi + 0x14]
call dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
jne 0x407370
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 0x407356
mov dword [eax + 0x14], edi
jmp 0x407359
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x1c], 1
push ecx
push 0x8004667e
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov esi, eax
lea ecx, [edi + 0x20]
test esi, esi
sets dl
call fcn.004043e0
test esi, esi
js 0x4070f7
mov ecx, dword [ebp - 0x48]
lea esi, [edi + 0x20]
or byte [ecx + 4], 2
mov edx, dword [ebp - 0x4c]
mov ecx, dword [ecx]
push esi
push dword [ebx + 0x18]
call fcn.00404680
add esp, 8
test eax, eax
je 0x4070f7
mov eax, dword fs:[0x2c]
mov ecx, dword [0x4384c8]
mov edx, dword [eax]
mov dword [ebp - 0x4c], edx
cmp ecx, dword [edx + 4]
jle 0x4071e3
push 0x4384c8
call fcn.0040f975
mov ecx, dword [0x4384c8]
add esp, 4
cmp ecx, 0xffffffff
jne 0x4071e0
push 0x429950
call fcn.0040fdcc
add esp, 4
push 0x4384c8
call fcn.0040f92b
mov ecx, dword [0x4384c8]
add esp, 4
mov edx, dword [ebp - 0x4c]
mov eax, dword [esi + 4]
mov dword [ebp - 0x1c], 0x4369a8
mov eax, dword [eax + 4]
cmp eax, dword [0x4369ac]
jne 0x407200
cmp dword [esi], 0x2734
je 0x40725d
cmp ecx, dword [edx + 4]
jle 0x407238
push 0x4384c8
call fcn.0040f975
add esp, 4
cmp dword [0x4384c8], 0xffffffff
jne 0x407238
push 0x429950
call fcn.0040fdcc
add esp, 4
push 0x4384c8
call fcn.0040f92b
add esp, 4
mov eax, dword [esi + 4]
mov dword [ebp - 0x1c], 0x4369a8
mov eax, dword [eax + 4]
cmp eax, dword [0x4369ac]
jne 0x4070f7
cmp dword [esi], 0x2733
jne 0x4070f7
mov eax, dword [ebp - 0x48]
mov dword [esi], 0
mov dword [esi + 4], 0x436998
mov esi, dword [ebp - 0x40]
mov eax, dword [eax]
mov dword [ebp - 0x18], eax
lea eax, [esi + 0x18]
push eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x50], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov al, 1
mov byte [ebp - 0x41], al
mov byte [ebp - 0x4c], al
mov dword [ebp - 4], 0
cmp byte [esi + 0xfc], 0
je 0x407321
mov esi, dword [esi + 0x14]
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
mov eax, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 0x4c], eax
jne 0x407312
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 0x4072e6
mov dword [eax + 0x14], edi
jmp 0x4072e9
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]
mov esi, dword [ebp - 0x4c]
push eax
call esi
cmp byte [ebp - 0x41], 0
je 0x40734f
mov eax, dword [ebp - 0x1c]
push eax
call esi
mov eax, 3
jmp 0x407373
mov esi, eax
mov eax, dword [ebp - 0x1c]
push eax
call esi
mov eax, 3
jmp 0x407373
push edi
push dword [ebp - 0x18]
lea ecx, [esi + 0x8c]
call fcn.00408fd0
mov ecx, dword [esi + 0x14]
add ecx, 0x18
lock inc dword [ecx]
test al, al
je 0x407345
lea ecx, [esi + 0x30]
call fcn.004056b0
lea eax, [esi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 3
jmp 0x407373
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]
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.0040f853
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x1c