undefined4 DO_RACFG_CMD_IO_READ_BULK(int param_1,undefined4 param_2,int param_3)

{
  uint uVar1;
  undefined4 uVar2;
  uint uVar3;
  uint uVar4;
  ushort local_38 [2];
  uint local_34;
  uint local_30 [3];
  
  memcpy(&local_34,(void *)(param_3 + 0xc),4)   //possible issue identified - semgrep
  local_34 = ((local_34 >> 0x10) << 0x18 | (local_34 >> 0x18) << 0x10) >> 0x10;
  memcpy(local_38,(void *)(param_3 + 0x10),2)   //possible issue identified - semgrep
  uVar1 = (local_38[0] & 0xff) << 8 | (uint)(local_38[0] >> 8);
  local_38[0] = (ushort)uVar1;
  if (uVar1 < 0x174) {
    local_30[0] = 0;
    uVar4 = local_34;
    for (uVar3 = 0; uVar3 < uVar1; uVar3 = uVar3 + 1) {
      if (*(char *)(param_1 + 0xec) == '\0') {
        local_30[0] = *(uint *)(*(int *)(param_1 + 0xdc) + uVar4);
      }
      else {
        local_30[0] = 0;
      }
      uVar4 = uVar4 + 4;
      local_30[0] = (((local_30[0] >> 0x10) << 0x18 | (local_30[0] >> 0x18) << 0x10) >> 0x10) +
                    ((local_30[0] & 0xff) << 8 | local_30[0] >> 8 & 0xff) * 0x10000;
      memmove((void *)(param_3 + (uVar3 + 2) * 4 + 6),local_30,4)   //possible issue identified - semgrep
    }
    ResponseToGUI(param_3,param_2,(uint)local_38[0] * 4 + 2,0);
    uVar2 = 0;
  }
  else {
    if (2 < RTDebugLevel) {
      printk("length requested is too large, make it smaller\n");
    }
    *(undefined1 *)(param_3 + 0xd) = 1;
    *(undefined1 *)(param_3 + 9) = 2;
    *(undefined1 *)(param_3 + 8) = 0;
    *(undefined1 *)(param_3 + 0xc) = 0;
    uVar2 = 0xfffffff2;
  }
  return uVar2;
}