void RTMPMakeRsnIeCipher(undefined4 param_1,char param_2,int param_3,undefined4 param_4,char param_5
                        ,byte param_6,undefined1 *param_7,char *param_8)

{
  char cVar1;
  char cVar2;
  undefined4 *puVar3;
  
  *param_8 = '\0';
  if (Wpa2Ie == param_2) {
    *param_7 = 1;
    param_7[1] = 0;
    if (param_3 == 6) {
      if (param_5 == '\0') {
        puVar3 = &OUI_WPA2_CCMP;
      }
      else {
        puVar3 = &OUI_WPA2_TKIP;
      }
      memmove(param_7 + 2,puVar3,4)   //possible issue identified - semgrep
      param_7[6] = 1;
      param_7[7] = 0;
      memmove(param_7 + 8,&OUI_WPA2_CCMP,4)   //possible issue identified - semgrep
      cVar1 = '\f';
    }
    else {
      if (param_3 == 8) {
        memmove(param_7 + 2,&OUI_WPA2_TKIP,4)   //possible issue identified - semgrep
        memmove(param_7 + 8,&OUI_WPA2_CCMP,4)   //possible issue identified - semgrep
        cVar1 = '\x01';
        if ((param_6 & 2) != 0) {
          memmove(param_7 + 0xc,&OUI_WPA2_TKIP,4)   //possible issue identified - semgrep
          cVar1 = '\x02';
        }
        cVar2 = cVar1 + '\x02';
        param_7[6] = cVar1;
        param_7[7] = 0;
LAB_0004032c:
        *param_8 = cVar2 * '\x04';
        return;
      }
      if (param_3 != 4) {
        return;
      }
      memmove(param_7 + 2,&OUI_WPA2_TKIP,4)   //possible issue identified - semgrep
      param_7[6] = 1;
      param_7[7] = 0;
      memmove(param_7 + 8,&OUI_WPA2_TKIP,4)   //possible issue identified - semgrep
      cVar1 = '\f';
    }
  }
  else {
    memmove(param_7,&OUI_WPA_VERSION,4)   //possible issue identified - semgrep
    param_7[4] = 1;
    param_7[5] = 0;
    if (param_3 == 6) {
      if (param_5 == '\0') {
        puVar3 = &OUI_WPA_CCMP;
      }
      else {
        puVar3 = &OUI_WPA_TKIP;
      }
      memmove(param_7 + 6,puVar3,4)   //possible issue identified - semgrep
      param_7[10] = 1;
      param_7[0xb] = 0;
      memmove(param_7 + 0xc,&OUI_WPA_CCMP,4)   //possible issue identified - semgrep
      cVar1 = '\x10';
    }
    else {
      if (param_3 == 8) {
        memmove(param_7 + 6,&OUI_WPA_TKIP,4)   //possible issue identified - semgrep
        memmove(param_7 + 0xc,&OUI_WPA_CCMP,4)   //possible issue identified - semgrep
        cVar1 = '\x01';
        if ((param_6 & 8) != 0) {
          memmove(param_7 + 0x10,&OUI_WPA_TKIP,4)   //possible issue identified - semgrep
          cVar1 = '\x02';
        }
        cVar2 = cVar1 + '\x03';
        param_7[10] = cVar1;
        param_7[0xb] = 0;
        goto LAB_0004032c;
      }
      if (param_3 != 4) {
        return;
      }
      memmove(param_7 + 6,&OUI_WPA_TKIP,4)   //possible issue identified - semgrep
      param_7[10] = 1;
      param_7[0xb] = 0;
      memmove(param_7 + 0xc,&OUI_WPA_TKIP,4)   //possible issue identified - semgrep
      cVar1 = '\x10';
    }
  }
  *param_8 = cVar1;
  return;
}