|
|
|
|
|
[求助]怎样才能知道DLL中导出函数的调用参数及返回值类型
最初由 wxfykx 发布 你的这个函数原型应该是对的 不过测试时,字符串长度不要超过100(实际有效字符最多为40) 你的问题所在是堆栈不平衡 应该是"retn 8"的问题 retn取32位偏移量作段内返回,可以跟一个立即数作为操作数,该数实际上是从堆栈上传给子程序的参数的个数(以字计)返回后自动把堆栈指针esp加上指定的数*2,从而丢弃堆栈中的参数。 当你调用该程序结束后,esp会与理论上相差16字节,所以最后只需要更改ESP即可 没有经过实际检验,纯属分析! 楼主可以具体调试观察下。 |
|
|
|
在VC下怎样获得函数大小
最初由 天涯浪人 发布 函数大小?? 是不是文件大小? DWORD GetFileSize( HANDLE hFile, // handle of file to get size of LPDWORD lpFileSizeHigh // pointer to high-order word for file size ); |
|
zt:汇编,c,c++接口
挺详细的 |
|
[求助]谁会用汇编给程序做超级链接?
最初由 dons 发布 小虾是坛子里最热心的人之一 |
|
关于xp2的ring3级获取kernel32地址[求助]
/****************************************************************** (该方法非常通用基本上在9X/NT/2K/XP/2003都可以使用) 1,获得异常处理函数链表首指针 2,遍历到最后一个节点(该节点有一个指向KERNEL32.DLL引出 函数UnhandlerExceptionFilter的函数指针) 3,获得UnhandlerExceptionFilter函数地址,这个地址并根据 PE可执行文件特征查找出KERNEL32.DLL基址. ********************************************************************/ #include <stdio.h> #include <conio.h> __inline __declspec(naked) unsigned int GetKernel32(void) { __asm { mov esi,fs:[0] lodsd FindUnExcept: cmp [eax],0xffffffff je FindedUnExcept //如果是异常链的最后一个节点 mov eax,[eax] //如果不是异常链的最后一个节点,则向前遍历 jmp FindUnExcept FindedUnExcept: mov eax,[eax+0x04] //获得UnHhndlerExceptFilter函数地址,该函数位于KERNEL32.DLL中. FindMZ_PE: and eax,0xffff0000 //根据PE执行文件的64K字节齐特征,加快查找速度 cmp word ptr [eax],'ZM'//根据PE可执行文件头部特征确定是否找到KERNEL32.DLL基址. jne MoveUp //如果与PE可执行文件头部特征不符,继续则向上查找 mov ebx,[eax+0x3c] add ebx,eax cmp word ptr [ebx],'EP' jne MoveUp //如果与PE可执行文件头部特征不符,继续则向上查找 jmp FindOK //如果与PE可执行文件头部特征相符则认为已经找到了KERNEL32.DLL的基址,并能过eax返回 MoveUp: dec eax //向上查找 jmp FindMZ_PE FindOK: ret } } int main() { printf("KERNEL32.DLL:\t%0.8X\n",GetKernel32()); getch(); return 0 ; } |
|
|
|
|
|
QQ本地消息查看器源码..
强烈建议“加精” |
|
[求助]VirtualQueryEx函数中有个参数不知道怎么用啊???
VirtualQueryEx是用来查询内存页面保护属性的 假设你需要修改PE文件头的“PE”标志,那么首先你需要取得指向文件头的指针pFileHeader,然后把pFileHeader作为第二个参数就可以了。 如果对“指针”,“取地址”等概念不清楚的话,看看那些程序设计的书籍 |
|
|
|
QQ本地消息查看器源码..
不错的东西 |
|
|
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值