Beispiel #1
0
	void Store(HKEY hKey, RegKeyType rkt)
	{
		if (!hKey || IsPredefined(hKey))
		{
			_ASSERTE(hKey!=NULL);
			_ASSERTE(!IsPredefined(hKey) || (rkt>=RKT_HKCU && rkt<=RKT_HKLM64));
			return;
		}
		//mhk_Last = hkSoftware;
		//WARNING("### Process RegKeyBlocks!");
		MSectionLock SC; SC.Lock(&mc_Lock, TRUE, 500);
		RegKeyInfo* p = FindFreeSlot();
		p->hKey = hKey;
		p->rkt = rkt;
		mp_LastKey = p;
	};
Beispiel #2
0
	void Remove(HKEY hKey)
	{
		if (!hKey || IsPredefined(hKey))
			return;
		RegKeyInfo* p = FindKey(hKey);
		if (p)
		{
			p->hKey = NULL;
			p->rkt = RKT_None;
		}
	};
Beispiel #3
0
static int out_equ(ea_t ea)
{
  char buf[MAXSTR];
  char *const end = buf + sizeof(buf);
  segment_t *s = getseg(ea);
  if ( s != NULL && s->type == SEG_IMEM && ash.a_equ != NULL)
  {
    char nbuf[MAXSTR];
    char *name = get_name(BADADDR, ea, nbuf, sizeof(nbuf));
    if ( name != NULL
      && ((ash.uflag & UAS_PBYTNODEF) == 0 || !IsPredefined(name)) )
    {
      get_colored_name(BADADDR, ea, buf, sizeof(buf));
      uchar off = uchar(ea - get_segm_base(s));
      do_out_equ(buf, ash.a_equ, off);
      if ( (ash.uflag & UAS_AUBIT) == 0 && (off & 0xF8) == off )
      {
        char *ptr = tag_on(tail(buf), end, COLOR_SYMBOL);
        APPCHAR(ptr, end, ash.uflag & UAS_NOBIT ? '_' : '.');
        APPCHAR(ptr, end, '0');
        tag_off(ptr, end, COLOR_SYMBOL);
        for ( int i=0; i < 8; i++ )
        {
          const ioport_bit_t *b = find_bit(off, i);
          char *p2 = ptr;
          if ( b == NULL || b->name == NULL )
            ptr[-1] = '0' + i;
          else
            p2 = tag_addstr(ptr-1, end, COLOR_HIDNAME, b->name);
          tag_off(p2, end, COLOR_SYMBOL);
          do_out_equ(buf, ash.a_equ, off+i);
        }
        MakeNull();
      }
    }
    else
    {
      gl_name = 0;
      MakeLine("");
    }
    return 1;
  }
  if ( ash.uflag & UAS_NODS )
  {
    if ( !isLoaded(ea) && s->type == SEG_CODE )
    {
      adiff_t org = ea - get_segm_base(s) + get_item_size(ea);
      btoa(buf, sizeof(buf), org);
      printf_line(inf.indent, COLSTR("%s %s", SCOLOR_ASMDIR), ash.origin, buf);
      return 1;
    }
  }
  return 0;
}