uint add_option_string(int param_1,void *param_2)

{
  char cVar1;
  int iVar2;
  uint uVar3;
  char *__dest;
  
  iVar2 = 0;
  do {
    __dest = (char *)(param_1 + iVar2);
    cVar1 = *__dest;
    while( true ) {
      if (cVar1 == -1) {
        uVar3 = (uint)((int)(iVar2 + (uint)*(byte *)((int)param_2 + 1)) < 0x131);
        if (uVar3 != 0) {
          memcpy(__dest,param_2,*(byte *)((int)param_2 + 1) + 2)   //possible issue identified - semgrep
          __dest[*(byte *)((int)param_2 + 1) + 2] = -1;
          uVar3 = *(byte *)((int)param_2 + 1) + 2;
        }
        return uVar3;
      }
      if (cVar1 != '\0') break;
      iVar2 = iVar2 + 1;
      __dest = (char *)(param_1 + iVar2);
      cVar1 = *__dest;
    }
    iVar2 = iVar2 + 2 + (uint)(byte)__dest[1];
  } while( true );
}