Function at 0x408db0
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 0x409003
je 0x408fdb
dec ecx
cmp ecx, 0xf
ja case.0x408de6.6
xor edx, edx
mov dl, byte [ecx + 0x409110]
jmp dword [edx*4 + 0x4090f8]
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 0x408e31
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 0x409065
mov eax, dword [ebp + 0x10]
test eax, eax
mov eax, dword [esi + 0x38]
je 0x408e3a
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 0x408e31
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 0x409065
mov eax, dword [ebp + 0x10]
test eax, eax
mov eax, dword [esi + 0x38]
je 0x408e95
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 0x408e31
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 0x409065
mov eax, dword [ebp + 0x10]
test eax, eax
mov eax, dword [esi + 0x38]
je 0x408ef4
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 0x408e31
test eax, eax
je 0x408f36
mov edx, dword [esi + 4]
push edx
call fcn.00408c20
add esp, 4
test eax, eax
je 0x408f4a
pop esi
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [esi + 4]
push eax
call fcn.00408bd0
add esp, 4
test eax, eax
jne 0x4090ef
mov eax, dword [ebp + 0x10]
test eax, eax
mov eax, dword [esi + 0x38]
je 0x408f62
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 0x408e31
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 0x409065
mov eax, dword [ebp + 0x10]
test eax, eax
mov eax, dword [esi + 0x38]
je 0x408fcd
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 0x408e31
jmp 0x409065
cmp ecx, 0x4000
jg 0x4090d6
je 0x4090ea
cmp ecx, 0x80
je 0x4090ae
cmp ecx, 0x200
jne case.0x408de6.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 0x408e31
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 0x409086
mov esi, dword [sym.imp.WSOCK32.dll_WSAGetLastError]
call esi
test eax, eax
jne 0x409078
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 0x40909f
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 0x408e31
jmp 0x409065
cmp ecx, 0x8000
je 0x4090ea
mov eax, 0x16
pop esi
mov esp, ebp
pop ebp
ret 0xc
mov eax, 0x11187
pop esi
mov esp, ebp
pop ebp
ret 0xc