Function at 0x408090
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a768e
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x4d1088]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
xor ebx, ebx
mov dword [ebp - 4], 0
mov edi, fcn.0040f3b0
test esi, esi
je 0x40820e
call fcn.00477590
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x18], esi
mov eax, dword [eax + 0x18]
mov esi, dword [eax]
cmp esi, 0xffffffff
jne 0x4080fa
call fcn.00477590
mov ecx, 0x2719
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], ecx
jmp 0x408146
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 4
lea eax, [ebp - 0x18]
push eax
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov edi, eax
call fcn.00477590
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x1c], esi
mov ecx, eax
mov dword [ebp - 0x20], ecx
test edi, edi
jne 0x408141
call fcn.00477590
xor ecx, ecx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], ecx
mov edi, fcn.0040f3b0
xor edx, edx
mov eax, edi
test ecx, ecx
cmove eax, edx
test eax, eax
je 0x40818e
mov eax, dword [0x4d1a00]
cmp eax, 0x4d1a00
je 0x408184
test byte [eax + 0x1c], 2
je 0x408184
cmp byte [eax + 0x19], 2
jb 0x408184
push ecx
push dword [eax + 0x14]
mov edx, 0x4be4d0
mov ecx, 0x73
push dword [eax + 0x10]
call fcn.00401a90
add esp, 0xc
mov ebx, 0xffffffe6
jmp 0x408315
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x28], 4
mov ecx, dword [eax + 0x18]
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x28]
push eax
mov dl, byte [ecx + 4]
lea eax, [ebp - 0x18]
mov ecx, dword [ecx]
push eax
push 0x1001
push 0xffff
call fcn.0041a6b0
add esp, 0x14
cmp dword [ebp - 0x20], ebx
sete al
mov byte [ebp - 0x21], al
test al, al
je 0x40820e
push dword [ebp - 0x28]
push ecx
call fcn.004116d0
mov al, byte [ebp - 0x21]
test al, al
je 0x40820e
mov eax, dword [0x4d1a00]
cmp eax, 0x4d1a00
je 0x40820e
test byte [eax + 0x1c], 2
je 0x40820e
cmp byte [eax + 0x19], 5
jb 0x40820e
push dword [ebp - 0x18]
mov edx, 0x4be4d0
mov ecx, 0x74
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.00401a90
add esp, 0xc
mov esi, dword [ebp + 8]
test esi, esi
je 0x408315
xorps xmm0, xmm0
movq qword [ebp - 0x20], xmm0
mov dword [ebp - 0x20], ebx
call fcn.00477590
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0xc]
push ecx
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], esi
push ecx
lea ecx, [ebp - 0x2c]
push ecx
mov ecx, dword [eax + 0x18]
call fcn.0040c9a0
mov ecx, dword [ebp - 0x20]
xor eax, eax
test ecx, ecx
cmove edi, eax
test edi, edi
je 0x408295
mov eax, dword [0x4d1a00]
cmp eax, 0x4d1a00
je 0x408184
test byte [eax + 0x1c], 2
je 0x408184
cmp byte [eax + 0x19], 2
jb 0x408184
push ecx
push dword [eax + 0x14]
mov edx, 0x4be4d0
mov ecx, 0x75
push dword [eax + 0x10]
call fcn.00401a90
mov ebx, 0xffffffe6
jmp 0x408312
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x28], 4
mov ecx, dword [eax + 0x18]
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x28]
push eax
mov dl, byte [ecx + 4]
lea eax, [ebp - 0x18]
mov ecx, dword [ecx]
push eax
push 0x1002
push 0xffff
call fcn.0041a6b0
add esp, 0x14
cmp dword [ebp - 0x20], ebx
sete al
mov byte [ebp - 0x21], al
test al, al
je 0x408315
push dword [ebp - 0x28]
push ecx
call fcn.004116d0
mov al, byte [ebp - 0x21]
test al, al
je 0x408315
mov eax, dword [0x4d1a00]
cmp eax, 0x4d1a00
je 0x408315
test byte [eax + 0x1c], 2
je 0x408315
cmp byte [eax + 0x19], 5
jb 0x408315
push dword [ebp - 0x18]
mov edx, 0x4be4d0
mov ecx, 0x76
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.00401a90
add esp, 0xc
mov dword [ebp - 4], 1
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x40834e
or edi, 0xffffffff
lea ecx, [esi + 4]
mov eax, edi
lock xadd dword [ecx], eax
cmp eax, 1
jne 0x40834e
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
lea edx, [esi + 8]
lock xadd dword [edx], edi
cmp edi, 1
jne 0x40834e
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 8]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0047aa96
mov esp, ebp
pop ebp
ret