Function at 0x408470
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0x10]
xor ecx, ecx
test eax, eax
setne cl
mov dword [ebp - 4], ecx
mov ecx, dword [ebp + 0xc]
cmp ecx, 0x40
push esi
jg 0x4086c3
je 0x40869b
dec ecx
cmp ecx, 0xf
ja case.0x4084a6.6
xor edx, edx
mov dl, byte [ecx + 0x4087d0]
jmp dword [edx*4 + 0x4087b8]
mov esi, dword [ebp + 8]
xor edx, edx
mov ecx, dword [esi + 0x38]
and ecx, 2
cmp cl, 2
sete dl
cmp eax, edx
je 0x4084f1
mov ecx, dword [esi + 4]
lea eax, [ebp - 4]
push 4
push eax
push 8
push 0xffff
push ecx
call dword [sym.imp.WSOCK32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x408725
mov eax, dword [ebp + 0x10]
test eax, eax
mov eax, dword [esi + 0x38]
je 0x4084fa
or al, 2
mov dword [esi + 0x38], eax
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0xc
and al, 0xfd
mov dword [esi + 0x38], eax
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0xc
mov esi, dword [ebp + 8]
xor ecx, ecx
mov edx, dword [esi + 0x38]
and edx, 4
cmp dl, 4
sete cl
cmp eax, ecx
je 0x4084f1
mov eax, dword [esi + 4]
lea edx, [ebp - 4]
push 4
push edx
push 1
push 0xffff
push eax
call dword [sym.imp.WSOCK32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x408725
mov eax, dword [ebp + 0x10]
test eax, eax
mov eax, dword [esi + 0x38]
je 0x408555
or al, 4
mov dword [esi + 0x38], eax
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0xc
and al, 0xfb
mov dword [esi + 0x38], eax
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0xc
mov esi, dword [ebp + 8]
xor edx, edx
mov ecx, dword [esi + 0x38]
and ecx, 0x10
cmp cl, 0x10
sete dl
cmp eax, edx
je 0x4084f1
mov ecx, dword [esi + 4]
lea eax, [ebp - 4]
push 4
push eax
push 4
push 0xffff
push ecx
call dword [sym.imp.WSOCK32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x408725
mov eax, dword [ebp + 0x10]
test eax, eax
mov eax, dword [esi + 0x38]
je 0x4085b4
or al, 0x10
mov dword [esi + 0x38], eax
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0xc
and al, 0xef
mov dword [esi + 0x38], eax
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0xc
mov esi, dword [ebp + 8]
xor ecx, ecx
mov edx, dword [esi + 0x38]
and edx, 8
cmp dl, 8
sete cl
cmp ecx, eax
je 0x4084f1
test eax, eax
je 0x4085f6
mov edx, dword [esi + 4]
push edx
call fcn.004082e0
add esp, 4
test eax, eax
je 0x40860a
pop esi
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [esi + 4]
push eax
call fcn.00408290
add esp, 4
test eax, eax
jne 0x4087af
mov eax, dword [ebp + 0x10]
test eax, eax
mov eax, dword [esi + 0x38]
je 0x408622
or al, 8
mov dword [esi + 0x38], eax
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0xc
and al, 0xf7
mov dword [esi + 0x38], eax
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0xc
mov esi, dword [ebp + 8]
mov ecx, dword [esi + 0x38]
and ecx, 1
dec cl
neg cl
sbb ecx, ecx
inc ecx
cmp ecx, eax
je 0x4084f1
lea edx, [ebp + 8]
push 4
mov word [ebp + 8], ax
mov eax, dword [esi + 4]
push edx
push 0x80
push 0xffff
push eax
mov word [ebp + 0xa], 0x1e
call dword [sym.imp.WSOCK32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x408725
mov eax, dword [ebp + 0x10]
test eax, eax
mov eax, dword [esi + 0x38]
je 0x40868d
or al, 1
mov dword [esi + 0x38], eax
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0xc
and al, 0xfe
mov dword [esi + 0x38], eax
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [ebp + 8]
lea ecx, [ebp + 0x10]
push 4
push ecx
mov eax, dword [edx + 4]
push 0x1001
push 0xffff
push eax
call dword [sym.imp.WSOCK32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x4084f1
jmp 0x408725
cmp ecx, 0x4000
jg 0x408796
je 0x4087aa
cmp ecx, 0x80
je 0x40876e
cmp ecx, 0x200
jne case.0x4084a6.6
mov esi, dword [ebp + 8]
xor edx, edx
mov ecx, dword [esi + 0x38]
and ecx, 0x200
cmp ecx, 0x200
sete dl
cmp edx, eax
je 0x4084f1
mov ecx, dword [esi + 4]
lea eax, [ebp + 0x10]
push 4
push eax
push 1
push 6
push ecx
call dword [sym.imp.WSOCK32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x408746
mov esi, dword [sym.imp.WSOCK32.dll_WSAGetLastError]
call esi
test eax, eax
jne 0x408738
pop esi
mov esp, ebp
pop ebp
ret 0xc
call esi
add eax, 0xafc80
pop esi
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp + 0x10]
test eax, eax
mov eax, dword [esi + 0x38]
je 0x40875f
or ah, 2
mov dword [esi + 0x38], eax
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0xc
and ah, 0xfd
mov dword [esi + 0x38], eax
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp + 8]
lea edx, [ebp + 0x10]
push 4
push edx
mov ecx, dword [eax + 4]
push 0x1002
push 0xffff
push ecx
call dword [sym.imp.WSOCK32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x4084f1
jmp 0x408725
cmp ecx, 0x8000
je 0x4087aa
mov eax, 0x16
pop esi
mov esp, ebp
pop ebp
ret 0xc
mov eax, 0x11187
pop esi
mov esp, ebp
pop ebp
ret 0xc