void FUN_00409c58(void)

{
  FILE *__stream;
  size_t sVar1;
  char *pcVar2;
  char *__dest;
  int iVar3;
  char *local_38;
  char local_34 [32];
  
  __stream = fopen("/proc/net/dev","r")   //possible issue identified - semgrep
  if (__stream == (FILE *)0x0) {
    warn("get_raw_samples: failed opening /proc/dev for device statistics!\n");
    g_tpkts = 0;
    g_tbytes = 0;
    g_rpkts = 0;
    g_rbytes = 0;
  }
  else {
    __dest = local_34 + 0xc;
    strncpy(__dest,g_interface,0xe)   //possible issue identified - semgrep
    strcat(__dest,":")   //possible issue identified - semgrep
    do {
      pcVar2 = fgets(&g_buf,0xa0,__stream)   //possible issue identified - semgrep
      if (pcVar2 != &g_buf) {
        g_tpkts = 0xffffffff;
        g_rbytes = 0xffffffff;
        g_rpkts = 0xffffffff;
        g_tbytes = 0xffffffff;
        goto LAB_00409e78;
      }
      pcVar2 = strstr(&g_buf,__dest);
    } while (pcVar2 == (char *)0x0);
    builtin_strncpy(local_34,"0 0 0 0 0 0",0xc)   //possible issue identified - semgrep
    local_38 = pcVar2;
    sVar1 = strlen(__dest);
    local_38 = pcVar2 + sVar1;
    strtoul(local_38,&local_38,10);
    strtoul(local_38,&local_38,10);
    iVar3 = 0;
    do {
      strtoul(local_38,&local_38,10);
      iVar3 = iVar3 + 1;
      if (*local_38 == '\0') {
        warn("get_raw_samples: using dummy values due to parse error!\n");
        local_38 = local_34;
        break;
      }
    } while (iVar3 != 6);
    strtoul(local_38,&local_38,10);
    strtoul(local_38,(char **)0x0,10);
    warn("get_raw_samples: failed reading /proc/dev for device statistics!\n");
    g_tpkts = 0;
    g_tbytes = 0;
    g_rpkts = 0;
    g_rbytes = 0;
LAB_00409e78:
    fclose(__stream);
  }
  return;
}