⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 disio.cpp

📁 十分经典的开源反编译工具
💻 CPP
📖 第 1 页 / 共 5 页
字号:
        LastPrintBuff("ebx");
		else
        LastPrintBuff("bx");
		break;
	 case ARG_REG_CX:
		if(inst->mode32)
        LastPrintBuff("ecx");
		else
        LastPrintBuff("cx");
		break;
	 case ARG_REG_DX:
		if(inst->mode32)
        LastPrintBuff("edx");
		else
        LastPrintBuff("dx");
		break;
	 case ARG_16REG_DX:
		LastPrintBuff("dx");
		break;
	 case ARG_REG_SP:
		if(inst->mode32)
        LastPrintBuff("esp");
		else
        LastPrintBuff("sp");
		break;
	 case ARG_REG_BP:
		if(inst->mode32)
        LastPrintBuff("ebp");
		else
        LastPrintBuff("bp");
		break;
	 case ARG_REG_SI:
		if(inst->mode32)
        LastPrintBuff("esi");
		else
        LastPrintBuff("si");
		break;
	 case ARG_REG_DI:
		if(inst->mode32)
        LastPrintBuff("edi");
		else
        LastPrintBuff("di");
		break;
	 case ARG_REG_AL:
		LastPrintBuff("al");
		break;
	 case ARG_REG_AH:
		LastPrintBuff("ah");
		break;
	 case ARG_REG_BL:
		LastPrintBuff("bl");
		break;
	 case ARG_REG_BH:
		LastPrintBuff("bh");
		break;
	 case ARG_REG_CL:
		LastPrintBuff("cl");
		break;
	 case ARG_REG_CH:
		LastPrintBuff("ch");
		break;
	 case ARG_REG_DL:
		LastPrintBuff("dl");
		break;
	 case ARG_REG_DH:
		LastPrintBuff("dh");
		break;
	 case ARG_REG_ST0:
		LastPrintBuff("st(0)");
		break;
	 case ARG_REG_ES:
		LastPrintBuff("es");
		break;
	 case ARG_REG_CS:
		LastPrintBuff("cs");
		break;
	 case ARG_REG_DS:
		LastPrintBuff("ds");
		break;
	 case ARG_REG_SS:
		LastPrintBuff("ss");
		break;
	 case ARG_REG_FS:
		LastPrintBuff("fs");
		break;
	 case ARG_REG_GS:
		LastPrintBuff("gs");
		break;
	 case ARG_REG_A:
		LastPrintBuff("a");
		break;
	 case ARG_REG_B:
		LastPrintBuff("b");
		break;
	 case ARG_REG_C:
		LastPrintBuff("c");
		break;
	 case ARG_REG_D:
		LastPrintBuff("d");
		break;
	 case ARG_REG_E:
		LastPrintBuff("e");
		break;
	 case ARG_REG_H:
		LastPrintBuff("h");
		break;
	 case ARG_REG_L:
		LastPrintBuff("l");
		break;
	 case ARG_REG_I:
		LastPrintBuff("i");
		break;
	 case ARG_REG_R:
		LastPrintBuff("r");
		break;
	 case ARG_REG_HL_IND:
		LastPrintBuff("(hl)");
		break;
	 case ARG_REG_BC:
		LastPrintBuff("bc");
		break;
	 case ARG_REG_DE:
		LastPrintBuff("de");
		break;
	 case ARG_REG_HL:
		LastPrintBuff("hl");
		break;
	 case ARG_REG_BC_IND:
		LastPrintBuff("(bc)");
		break;
	 case ARG_REG_DE_IND:
		LastPrintBuff("(de)");
		break;
	 case ARG_REG_SP_IND:
		LastPrintBuff("(sp)");
		break;
	 case ARG_REG_IX:
		LastPrintBuff("ix");
		break;
	 case ARG_REG_IX_IND:
		LastPrintBuff("(ix");
		if(inst->flags&FLAGS_INDEXREG)
		{ dta=inst->data+2;
		  LastPrintBuff("+");
        LastPrintBuffLongHexValue((word)(dta[0]));
		}
		LastPrintBuff(")");
		break;
	 case ARG_REG_IY:
		LastPrintBuff("iy");
		break;
	 case ARG_REG_IY_IND:
		LastPrintBuff("(iy");
		if(inst->flags&FLAGS_INDEXREG)
		{ dta=inst->data+2;
		  LastPrintBuff("+");
        LastPrintBuffLongHexValue((word)(dta[0]));
		}
		LastPrintBuff(")");
		break;
	 case ARG_REG_C_IND:
		LastPrintBuff("(c)");
		break;
	 case ARG_REG_AF:
		LastPrintBuff("af");
		break;
	 case ARG_REG_AF2:
		LastPrintBuff("af\'");
		break;
	 case ARG_IMM:
		dta=inst->data+inst->length;
		if(inst->mode32)
		{ dta-=4;
		  switch(inst->override)
		  { case over_decimal:
            if(inst->displayflags&DISPFLAG_NEGATE)
				  LastPrintBuff("-%02lu",0-((dword *)dta)[0]);
            else
				  LastPrintBuff("%02lu",((dword *)dta)[0]);
				break;
			 case over_char:
				{ LastPrintBuff("\"");
				  for(i=3;i>=0;i--)
					 if(dta[i])
                  LastPrintBuff("%c",dta[i]);
				  LastPrintBuff("\"");
				}
				break;
			 case over_dsoffset:
				loc.assign(inst->addr.segm,((dword *)dta)[0]);
				LastPrintBuff("offset ");
				if(name.isname(loc))
              name.printname(loc);
			   else if(import.isname(loc))
              import.printname(loc);
			   else if(expt.isname(loc))
              expt.printname(loc);
				else
              LastPrintBuffLongHexValue(((dword *)dta)[0]);

				break;
          case over_single:
      		sprintf(fbuff,"(float)%g",((float *)dta)[0]);
      		LastPrintBuff(fbuff);
            break;
			 default:
            if(inst->displayflags&DISPFLAG_NEGATE)
     			{ LastPrintBuff("-");
              LastPrintBuffLongHexValue(0-((dword *)dta)[0]);
            }
            else
     			  LastPrintBuffLongHexValue(((dword *)dta)[0]);
				break;
		  }
		}
		else
		{ dta-=2;
		  if(inst->override==over_decimal)
        { if(inst->displayflags&DISPFLAG_NEGATE)
			   LastPrintBuff("-%02lu",0x10000-((word *)dta)[0]);
          else
			   LastPrintBuff("%02lu",((word *)dta)[0]);
        }
		  else if(inst->override==over_char)
		  { LastPrintBuff("\"");
			 for(i=1;i>=0;i--)
				if(dta[i])
              LastPrintBuff("%c",dta[i]);
			 LastPrintBuff("\"");
		  }
		  else
        { if(inst->displayflags&DISPFLAG_NEGATE)
			 { LastPrintBuff("-");
            LastPrintBuffLongHexValue(0x10000-((word *)dta)[0]);
          }
          else
			   LastPrintBuffLongHexValue(((word *)dta)[0]);
        }
		}
		break;
    case ARG_IMM_SINGLE:
      dta=inst->data+inst->length-4;
      sprintf(fbuff,"%g",((float *)dta)[0]);
      LastPrintBuff(fbuff);
      break;
    case ARG_IMM_DOUBLE:
      dta=inst->data+inst->length-8;
      sprintf(fbuff,"%g",((double *)dta)[0]);
      LastPrintBuff(fbuff);
      break;
    case ARG_IMM_LONGDOUBLE:
      dta=inst->data+inst->length-10;
      sprintf(fbuff,"%Lg",((long double *)dta)[0]);
      LastPrintBuff(fbuff);
      break;
	 case ARG_IMM32:
		dta=inst->data+inst->length-4;
		switch(inst->override)
		{ case over_decimal:
          if(inst->displayflags&DISPFLAG_NEGATE)
			   LastPrintBuff("-%02lu",0-((dword *)dta)[0]);
          else
			   LastPrintBuff("%02lu",((dword *)dta)[0]);
			 break;
		  case over_char:
			 LastPrintBuff("\"");
			 for(i=3;i>=0;i--)
				if(dta[i])
              LastPrintBuff("%c",dta[i]);
			 LastPrintBuff("\"");
			 break;
		  case over_dsoffset:
			 loc.assign(inst->addr.segm,((dword *)dta)[0]);
			 LastPrintBuff("offset ");
			 if(name.isname(loc))
            name.printname(loc);
	       else if(import.isname(loc))
            import.printname(loc);
		    else if(expt.isname(loc))
            expt.printname(loc);
			 else
            LastPrintBuffLongHexValue(loc.offs);
			 break;
        case over_single:
      	 sprintf(fbuff,"(float)%g",((float *)dta)[0]);
      	 LastPrintBuff(fbuff);
          break;
		  default:
          if(inst->displayflags&DISPFLAG_NEGATE)
			 { LastPrintBuff("-");
            LastPrintBuffLongHexValue(0-((dword *)dta)[0]);
          }
          else
			   LastPrintBuffLongHexValue(((dword *)dta)[0]);
			 break;
		}
		break;
	 case ARG_STRING:
      rm=0;
		LastPrintBuff("\"");
      sp=0;
      while(inst->data[rm])
      { if(inst->data[rm]<32)
        { LastPrintBuff("\",");
          LastPrintBuffHexValue(inst->data[rm]);
          LastPrintBuff(",\"");
        }
        else
      	 LastPrintBuff("%c",inst->data[rm]);
        rm++;
        sp++;
        if(sp>max_stringprint)
          break;
      }
		LastPrintBuff("\",00h");
		break;
	 case ARG_PSTRING:
		dta=inst->data;
		rm=dta[0];
		dta++;
      LastPrintBuffHexValue((unsigned char)rm);
		LastPrintBuff(",\"");
      sp=0;
		while(rm)
		{ if(dta[0]<32)
        { LastPrintBuff("\",");
          LastPrintBuffHexValue(dta[0]);
          LastPrintBuff(",\"");
        }
        else
      	 LastPrintBuff("%c",dta[0]);
		  dta++;
		  rm--;
        sp++;
        if(sp>max_stringprint)
          break;
		}
		LastPrintBuff("\"");
		break;
	 case ARG_DOSSTRING:
		dta=inst->data;
		rm=inst->length;
		rm--;
		LastPrintBuff("\"");
      sp=0;
		while(rm)
		{ if(dta[0]<32)
        { LastPrintBuff("\",");
          LastPrintBuffHexValue(dta[0]);
          LastPrintBuff(",\"");
        }
        else
          LastPrintBuff("%c",dta[0]);
		  dta++;
		  rm--;
        sp++;
        if(sp>max_stringprint)
          break;
		}
		LastPrintBuff("\"");
		break;
	 case ARG_CUNICODESTRING:
		dta=inst->data;
		rm=inst->length;
		rm-=(byte)2;
		LastPrintBuff("\"");
      sp=0;
		while(rm)
		{ if(dta[0]<32)
        { LastPrintBuff("\",");
          LastPrintBuffHexValue(dta[0]);
          LastPrintBuff(",\"");
        }
        else
          LastPrintBuff("%c",dta[0]);
		  dta+=2;
		  rm-=(byte)2;
        sp++;
        if(sp>max_stringprint)
          break;
		}
		LastPrintBuff("\"");
		break;
	 case ARG_PUNICODESTRING:
		dta=inst->data+2;
		rm=inst->length;
		rm-=(byte)2;
      sp=0;
		LastPrintBuffHexValue(rm/2);
		LastPrintBuff(",\"");
      while(rm)
		{ if(dta[0]<32)
        { LastPrintBuff("\",");
          LastPrintBuffHexValue(dta[0]);
          LastPrintBuff(",\"");
        }
        else
          LastPrintBuff("%c",dta[0]);
		  dta+=2;
		  rm-=(byte)2;
        sp++;
        if(sp>max_stringprint)
          break;
		}
		LastPrintBuff("\"");
		break;
	 case ARG_MEMLOC:
		if(inst->flags&FLAGS_SEGPREFIX)
        outprefix(pbyte);
		dta=inst->data+inst->length;
		if(options.mode32)
		{ dta-=4;
		  loc.assign(inst->addr.segm,((dword *)dta)[0]);
		  if(inst->flags&FLAGS_8BIT)
          LastPrintBuff("byte ptr ");
        else if(inst->flags&FLAGS_ADDRPREFIX)
          LastPrintBuff("word ptr");
        else
          LastPrintBuff("dword ptr");
        LastPrintBuff(" [");
		  if(name.isname(loc))
          name.printname(loc);
		  else if(import.isname(loc))
          import.printname(loc);
		  else if(expt.isname(loc))
          expt.printname(loc);
		  else
          LastPrintBuffLongHexValue(loc.offs);
        LastPrintBuff("]");
		}
		else

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -