一种破dll内存补丁的办法  

1257 45
| 发表于 2020-8-18 14:00:01 | 只看该作者 |复制链接
  1. #import "kernel32.dll"
  2.    int  GetCurrentProcess();
  3.    int  WriteProcessMemory(int handle, int address, int& buffer[], int size, int& written);
  4.    int  GetModuleHandleA(string module);
  5.    int  LoadLibraryA(string module);
  6. #import
  7. int ProcessPatch(string module, int address, int byte)
  8. {
  9.    int mem[1];
  10.    int out;
  11.    mem[0] = byte;
  12.    int hproc = GetCurrentProcess();
  13.    int hmod = GetModuleHandleA(module);
  14.    int addr = address + hmod;
  15.    int result = WriteProcessMemory(hproc, addr, mem, 1, out);
  16.    return (result);
  17. }
  18.    LoadLibraryA("experts\libraries\Fusion.dll");
  19.    ProcessPatch("Fusion.dll", 0x6d37, 0xeb);
  20.    ProcessPatch("Fusion.dll", 0x6d38, 0x11);
  21.    ProcessPatch("Fusion.dll", 0x6e37, 0xeb);
  22.    ProcessPatch("Fusion.dll", 0x6e38, 0x11);
  23.    ProcessPatch("Fusion.dll", 0x6f3d, 0xeb);
  24.    ProcessPatch("Fusion.dll", 0x6f3e, 0x11);
  25.    ProcessPatch("Fusion.dll", 0x723d, 0xeb);
  26.    ProcessPatch("Fusion.dll", 0x723e, 0x11);
  27.    ProcessPatch("Fusion.dll", 0x7376, 0xeb);
  28.    ProcessPatch("Fusion.dll", 0x7377, 0x11);
  29.    ProcessPatch("Fusion.dll", 0x412c4, 1);
  30.    ProcessPatch("Fusion.dll", 0x412c8, 0);
  31.    ProcessPatch("Fusion.dll", 0x412c9, 0x40);
  32.    ProcessPatch("Fusion.dll", 0x412ca, 0);
  33.    ProcessPatch("Fusion.dll", 0x412cb, 0);
复制代码


从该例可以看出,先调用dll,之后要找出所有dll的多处位点,然后改掉。
举报

收藏 5 点赞 2 评论 使用道具

精彩评论45

跳转到指定楼层
sk678
D
2#
| 发表于 2020-8-18 19:51:04 来自手机 | 只看该作者
感谢分享,学习了
举报

点赞 评论 使用道具

鸿运当归
DD
3#
| 发表于 2020-9-4 15:35:38 | 只看该作者
点赞,能说更详细点就好了
举报

点赞 评论 使用道具

kk123
DD
4#
| 发表于 2020-9-4 19:10:15 | 只看该作者
确实不错,值得学习
举报

点赞 评论 使用道具

wj710000
DD
5#
| 发表于 2020-9-5 07:17:49 | 只看该作者
普及一下
举报

点赞 评论 使用道具

悠悠72
C
6#
| 发表于 2020-9-5 07:35:06 | 只看该作者
真的有用么。。。?
举报

点赞 评论 使用道具

chun
DDD
7#
| 发表于 2020-9-26 22:17:40 | 只看该作者
感谢分享,学习学习.
举报

点赞 评论 使用道具

zhz358578823
C
8#
| 发表于 2020-10-1 06:36:39 来自手机 | 只看该作者
复制代码到哪个地方?
举报

点赞 评论 使用道具

singming
DD
9#
| 发表于 2020-10-2 21:22:28 | 只看该作者
感谢分享
举报

点赞 评论 使用道具

Johnny
B
10#
| 发表于 2020-10-3 08:46:30 | 只看该作者
感谢分享,学习了
举报

点赞 评论 使用道具

thekof32
CC
11#
| 发表于 2021-3-8 14:54:43 | 只看该作者
感谢分享
举报

点赞 评论 使用道具

latage
未及格
12#
| 发表于 2021-3-8 15:58:29 | 只看该作者
谢谢分享
举报

点赞 评论 使用道具

STONE1968
DD
13#
| 发表于 2021-9-25 12:49:28 | 只看该作者
谢谢分享
举报

点赞 评论 使用道具

allensky
DDD
14#
| 发表于 2021-9-25 13:28:25 | 只看该作者
学习了
举报

点赞 评论 使用道具

mydiis
DDD
15#
| 发表于 2021-9-25 13:34:36 | 只看该作者
感谢分享
举报

点赞 评论 使用道具

cdebjihong
DDD
16#
| 发表于 2021-11-5 00:52:39 | 只看该作者
感谢分享,学习学习
举报

点赞 评论 使用道具

小森森
DD
17#
| 发表于 2021-11-28 06:12:38 来自手机 | 只看该作者
不明觉厉
举报

点赞 评论 使用道具

EA1314
D
18#
| 发表于 2021-11-28 19:05:33 | 只看该作者
谢谢分享!
举报

点赞 评论 使用道具

交易者
DDD
19#
| 发表于 2022-1-8 21:04:36 | 只看该作者
感谢分享
举报

点赞 评论 使用道具

neeo
DDD
20#
| 发表于 2022-2-4 15:02:59 | 只看该作者
感谢分享
举报

点赞 评论 使用道具

123下一页
发新帖
EA交易
您需要登录后才可以评论 登录 | 立即注册