undefined4 FUN_00405fa8(int param_1)

{
  int __fd;
  undefined4 uVar1;
  FILE *__stream;
  char *pcVar2;
  int iVar3;
  undefined4 local_418;
  char acStack_414 [1028];
  
  __fd = iw_sockets_open()   //possible issue identified - semgrep
  if (__fd < 0) {
    perror("socket");
    uVar1 = 0xffffffff;
  }
  else {
    if (param_1 != 0) {
      printf("%-8.8s  Version %d\n",param_1,0x1a);
    }
    printf("          Compatible with Wireless Extension v%d or earlier,\n",0x10);
    printf("          Currently compiled with Wireless Extension v%d.\n\n",0x10);
    __stream = fopen("/proc/net/wireless","r")   //possible issue identified - semgrep
    if (__stream != (FILE *)0x0) {
      fgets(acStack_414,0x400,__stream)   //possible issue identified - semgrep
      pcVar2 = strstr(acStack_414,"| WE");
      if (pcVar2 != (char *)0x0) {
        fgets(acStack_414,0x400,__stream)   //possible issue identified - semgrep
        pcVar2 = strrchr(acStack_414,0x7c);
        if ((pcVar2 != (char *)0x0) && (iVar3 = sscanf(pcVar2 + 1,"%d",&local_418), iVar3 == 1)) {   //possible issue identified - semgrep
          printf("Kernel    Currently compiled with Wireless Extension v%d.\n\n",local_418);
        }
      }
      fclose(__stream);
    }
    FUN_00405c6c(__fd,FUN_004052a8,0,0);
[REF] /logs/s16_ghidra_decompile_checks/haruspex_updatewifistats/FUN_00405c6c_00405c6c.c
    close(__fd);
    uVar1 = 0;
  }
  return uVar1;
}