|
|
|
[求助]如何用delphi 对其它程进行反汇编修改
// CE具有将汇编指令转换成机器码的能力,所以你可以在CE里直接使用汇编指令修改程序。而Delphi可不带有这个功能。像你这样写只是你的Delphi程序有这段代码存在,和你要修改的程序完全没有关系联系。要修改其他程序,要像下面的代码那样写才行(注:下面的代码机器码指令长度比原来的指令长度要长,肯定会破坏你的游戏后面的指令完整性,如果你修改时不注意这个,估计这样修改会Down掉你的游戏,而如果你在CE里这样修改不会出错,应该是CE里用NOP处理了被破坏的指令,这样做结果程序是不会Down掉,但执行指令也肯定已经缺少一两条指令了。) 。 var lpAsmByte:Array[1..7] of Byte = ($C7,$41,$66,01,00,00,00); // 全局变量,是mov DWORD ptr [ecx+66],1的机器码 var dwProcessID,NumberOfBytesWritten:DWORD; hProcess:THANDLE; begin hWindow := FindWindow('游戏窗口类名','游戏窗口标题名'); // 根据游戏窗口类名或游戏窗口标题名找到要修改的游戏窗口句柄。 GetWindowThreadProcessId(hWindow,dwProcessID); // 取得游戏窗口进程ID hProcess := OpenProcess(PROCESS_ALL_ACCESS,FALSE,dwProcessID); // 打开游戏进程,以便下面进行修改游戏。 WriteProcessMemory(hProcess,Pointer($510bed),@lpAsmByte,sizeof(lpAsmByte),NumberOfBytesWritten); // 在510bed处写入mov dword ptr [ecx+66],1指令。 end; |
|
[求助][求助]简单反汇编代码含义?
1、那个36是main函数空出来的36个字节的缓冲区,主要作用是保存一些临时变量数据而用。 2、计算机是根据编译程序编译定义好的指令操作来执行任务,计算机本身并不知道那些东西是什么类型,他所执行的操作,只是根据编译器将制作者写好的代码转换成相应的执行指令忠实的执行任务,而如何编写判断数据类型的操作只能由编写代码的制作者自己自由设定,和计算机没有任务关系。 |
|
[求助]怎样把hbitmap直接转为JPG?
// 下载了ijl库,看了看说明文档和例子程序而写下的例子。 #include <windows.h> #include "ijl.h" // 包含ijl.h文件,并在VC中设置包含入静态ijl15l.lib库或动态ijl15.lib库 // 将hBitmap图像转换成内存DIB数据图像。 BYTE* CreateFromHBITMAP(HBITMAP hBitmap) { HDC hdc=GetDC(NULL); HDC memdc=CreateCompatibleDC(hdc); SelectObject(memdc,hBitmap); BITMAP bm; GetObject(hBitmap,sizeof(BITMAP),&bm); BITMAPINFO bi; bi.bmiHeader.biSize=sizeof(bi.bmiHeader); bi.bmiHeader.biWidth=bm.bmWidth; bi.bmiHeader.biHeight=bm.bmHeight; bi.bmiHeader.biPlanes=1; bi.bmiHeader.biBitCount=24; bi.bmiHeader.biCompression=BI_RGB; bi.bmiHeader.biSizeImage=0; bi.bmiHeader.biXPelsPerMeter=bm.bmWidth; bi.bmiHeader.biYPelsPerMeter=bm.bmHeight; bi.bmiHeader.biClrUsed=0; bi.bmiHeader.biClrImportant=0; int bitsize=bm.bmWidth*bm.bmHeight*3; BYTE* buff=new BYTE[sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFO) + bitsize]; BYTE* tmpbuff = buff; RtlZeroMemory(buff,sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFO) + bitsize); BITMAPFILEHEADER bf; bf.bfType=0x4d42; bf.bfSize=bitsize+14+sizeof(BITMAPINFOHEADER); bf.bfOffBits=sizeof(bi.bmiHeader)+sizeof(bf); bf.bfReserved1=0; bf.bfReserved2=0; RtlMoveMemory(tmpbuff,&bf,sizeof(BITMAPFILEHEADER)); tmpbuff += sizeof(BITMAPFILEHEADER); RtlMoveMemory(tmpbuff,&bi,sizeof(BITMAPINFO)); tmpbuff += sizeof(BITMAPINFO); GetDIBits(memdc,hBitmap,0,bm.bmHeight,tmpbuff,&bi,DIB_PAL_COLORS); DeleteObject(memdc); ReleaseDC(0,hdc); return buff; } int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nShowCmd) { BYTE* pBuff,*pJpgBuf; BITMAP bm; JPEG_CORE_PROPERTIES jcp; // 自己添加的测试用的图像 HBITMAP hBitmap = LoadBitmap(GetModuleHandle(NULL),(char*)101); // 将hBitmap图像句柄转换成DIB图像 pBuff = CreateFromHBITMAP(hBitmap); // 获取图像头信息 GetObject(hBitmap,sizeof(BITMAP),&bm); // 初始化ijl库 ijlInit(&jcp); // 初始化ijl JPEG_CORE_PROPERTIES结构 jcp.DIBBytes = (UCHAR *)pBuff; jcp.DIBHeight = bm.bmHeight; jcp.DIBWidth = bm.bmWidth; jcp.DIBPadBytes = IJL_DIB_PAD_BYTES(jcp.DIBWidth,jcp.DIBChannels); // 新建一个保存转换后的jpg数据缓冲。 pJpgBuf = new BYTE[jcp.DIBWidth * jcp.DIBHeight * 3 + sizeof(BITMAPINFO) + sizeof(BITMAPFILEHEADER)]; // 数据缓冲清零初始化 RtlZeroMemory(pJpgBuf,jcp.DIBWidth * jcp.DIBHeight * 3 + sizeof(BITMAPINFO) + sizeof(BITMAPFILEHEADER)); // 继续初始化ijl JPEG_CORE_PROPERTIES结构 jcp.JPGBytes = pJpgBuf; jcp.JPGHeight = bm.bmHeight; jcp.JPGWidth = bm.bmWidth; jcp.JPGSizeBytes = jcp.DIBWidth * jcp.DIBHeight * 3 + sizeof(BITMAPINFO) + sizeof(BITMAPFILEHEADER); // 将BMP DIB数据压缩成JPG数据 ijlWrite(&jcp,IJL_JBUFF_WRITEWHOLEIMAGE); // 创造一个*.jpg文件 HANDLE hFile=CreateFile("a.jpg",GENERIC_WRITE,FILE_SHARE_READ,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL); DWORD num=0; SetFilePointer(hFile,0,NULL,0); // 写入JPG数据到*.jpg文件。 WriteFile(hFile,pJpgBuf,jcp.JPGSizeBytes,&num,NULL); // 内存BMP DIB数据转换JPG成功,打扫清除对象操作 MessageBox(0,"转换成功!","BMP转JPG",MB_OK); CloseHandle(hFile); ijlFree(&jcp); delete pBuff; delete pJpgBuf; return 0; } |
|
看编程区比较冷清,小弟不才想搞个比赛,有兴趣的进来试试吧!
那是C++的语法。改成C语法也很简单。 int ustrlen(char *lpszStr) { int i; for(i = -1; lpszStr[++i];); return i; } |
|
[求助]怎样把hbitmap直接转为JPG?
// 下面的函数只需传入hBitmap图像句柄,就可以取得图像数据到内存缓冲区中,取得内存图像数据后就可以使用ijl编码了。 // 注,返回的内存位图数据缓冲不用之后要用delete操作数删除缓冲,以免造成内存泄漏。 BYTE* CreateFromHBITMAP(HBITMAP hBitmap) { HDC hdc=GetDC(NULL); HDC memdc=CreateCompatibleDC(hdc); SelectObject(memdc,hBitmap); BITMAP bm; GetObject(hBitmap,sizeof(BITMAP),&bm); BITMAPINFO bi; bi.bmiHeader.biSize=sizeof(bi.bmiHeader); bi.bmiHeader.biWidth=bm.bmWidth; bi.bmiHeader.biHeight=bm.bmHeight; bi.bmiHeader.biPlanes=1; bi.bmiHeader.biBitCount=24; bi.bmiHeader.biCompression=BI_RGB; bi.bmiHeader.biSizeImage=0; bi.bmiHeader.biXPelsPerMeter=bm.bmWidth; bi.bmiHeader.biYPelsPerMeter=bm.bmHeight; bi.bmiHeader.biClrUsed=0; bi.bmiHeader.biClrImportant=0; int bitsize=bm.bmWidth*bm.bmHeight*3; BYTE* buff=new BYTE[sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFO) + bitsize]; BYTE* tmpbuff = buff; RtlZeroMemory(buff,sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFO) + bitsize); BITMAPFILEHEADER bf; bf.bfType=0x4d42; bf.bfSize=bitsize+14+sizeof(BITMAPINFOHEADER); bf.bfOffBits=sizeof(bi.bmiHeader)+sizeof(bf); bf.bfReserved1=0; bf.bfReserved2=0; RtlMoveMemory(tmpbuff,&bf,sizeof(BITMAPFILEHEADER)); tmpbuff += sizeof(BITMAPFILEHEADER); RtlMoveMemory(tmpbuff,&bi,sizeof(BITMAPINFO)); tmpbuff += sizeof(BITMAPINFO); GetDIBits(memdc,hBitmap,0,bm.bmHeight,tmpbuff,&bi,DIB_PAL_COLORS); return buff; } |
|
看编程区比较冷清,小弟不才想搞个比赛,有兴趣的进来试试吧!
如果只是英文的话。 int ustrlen(char *lpszStr) { for(int i = -1; lpszStr[++i];); return i; } |
|
[求助]于VB程序脱壳后修复成VB开头的问题!
在OD中直接改push 00402214不行(试试不要加"unpack.")? |
|
[求助]如何生成exe文件和swf文件
看不懂你意思? 你说的意思是下面那样? 自己写一个打包程序,然后打包一个用flash软件制作的外部flash文件生成一个EXE程序,最后只需运行那个生成的EXE程序就可以释放出那个打包的flash文件? |
|
[求助]问一个函数的小问题
天书,看不懂你们的对话。 |
|
[求助]问一个函数的小问题
DllMain入口地址就是程序OPE入口地址,用PEID就可以看到。 |
|
[求助]问一个函数的小问题
LoadLibrary只是装载你的Dll,在装载Dll之后会执行Dll的DllMain入口代码,并不会执行其他函数。其他函数要你自己在DllMain入口调用或在EXE中调用。 |
|
[求助]什么是OEP的RVA值?
RVA = VA - ImageBase = 00578F4 = 004578F4 - 00400000 |
|
[求助]请问这个怎么算 mov [eax], 1
用OD就可以转换。 0041A12B C600 01 mov byte ptr [eax], 1 0041A12E BB 01000000 mov ebx, 1 0041A133 8918 mov dword ptr [eax], ebx |
|
[求助]delphi 程序是怎样处理按钮事件的?
用dede来找注册按钮的Click入口比较方便快捷。 |
|
[已解决]这个问题怎么解决?
Private Sub Command1_Click() sName = Text1.Text scode = Text2.Text For i = 1 To Len(sName) For j = 1 To Len(scode) n = n + (Asc(Mid(sName, i, 1)) Or Asc(Mid(scode, j, 1))) Next j Next i Text3.Text = n End Sub |
|
|
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值