#include <idc.idc>

static main(void)
{
   auto ea, oldname, testname, name, name_;
   for ( ea=here; ea < 0x0000; ea=ea+4 )
   {
      MakeDword(ea);
      oldname = Name(Qword(ea));
      testname = substr(oldname, 0, 4);
      if (testname != "unk_" && testname != "sub_")
      {
         name = substr(oldname, strstr(oldname, "_")+1, -1);
         name_ = name + "_";
         if (MakeNameEx(ea, name, SN_NOWARN) == 0)
            MakeName(ea, name_);
      }
   }
}