UIF小BUG修复
UIF小BUG修复 by csjwamanhttp://www.unpack.cn/thread-85379-1-1.html
0045C47B .8B06 MOV EAX,DWORD PTR DS:
0045C47D .2B07 SUB EAX,DWORD PTR DS:
0045C47F .8B15 481C4600 MOV EDX,DWORD PTR DS:
0045C485 .807C02 FF 90CMP BYTE PTR DS:,0x90 //这里就是出现异常的地方
0045C48A .74 20 JE SHORT 0045C4AC //因为指针前移一个字节后的地址可能会出现在未知空间或禁止访问的空间
0045C48C .8B06 MOV EAX,DWORD PTR DS:
0045C48E .2B07 SUB EAX,DWORD PTR DS:
0045C490 .8B15 481C4600 MOV EDX,DWORD PTR DS:
0045C496 .807C02 05 90CMP BYTE PTR DS:,0x90
0045C49B .75 0F JNZ SHORT 0045C4AC ;0045C4AC
0045C49D .8B06 MOV EAX,DWORD PTR DS:
0045C49F .2B07 SUB EAX,DWORD PTR DS:
0045C4A1 .8B15 481C4600 MOV EDX,DWORD PTR DS:
0045C4A7 .C64402 05 00MOV BYTE PTR DS:,0x0
0045C4AC >8B06 MOV EAX,DWORD PTR DS:
0045C4AE .2B07 SUB EAX,DWORD PTR DS:
0045C4B0 .8B15 481C4600 MOV EDX,DWORD PTR DS:
0045C4B6 .807C02 FF 90CMP BYTE PTR DS:,0x90 //还有这里
0045C4BB .75 0A JNZ SHORT 0045C4C7 ;0045C4C7
0045B75B > \6A 40 PUSH 0x40 ; /Protect = PAGE_EXECUTE_READWRITE
0045B75D .68 00100000 PUSH 0x1000 ; |AllocationType = MEM_COMMIT
0045B762 .A1 681C4600 MOV EAX,DWORD PTR DS: ; | //这里改成add eax,0x2000
0045B767 .05 00100000 ADD EAX,0x1000 ; | //也就是多申请0x1000
0045B76C .50 PUSH EAX ; |Size //用于后面将内存指针往前移0x1000
0045B76D .6A 00 PUSH 0x0 ; |Address = NULL
0045B76F .E8 B4ABFAFF CALL 00406328 ; \VirtualAlloc //申请内存
0045B774 .E9 2C300000 JMP 0045E7A5 ;跳到补丁处
0045B779 >833D 481C4600>CMP DWORD PTR DS:,0x0
0045B780 .75 14 JNZ SHORT 0045B796 ;0045B796
0045B782 .B8 F8D74500 MOV EAX,0x45D7F8 ;ASCII "Error! Virtual Memory is Low or Invalid 'Code Start','Code End'."
补丁代码:
0045E7A5 > \83F8 00 CMP EAX,0x0
0045E7A8 .74 09 JE SHORT 0045E7B3 ;0045E7B3
0045E7AA .90 NOP
0045E7AB .90 NOP
0045E7AC .90 NOP
0045E7AD .90 NOP
0045E7AE .05 00100000 ADD EAX,0x1000 //内存指针前移0x1000以避免地址减1时出现内存不能读的异常问题
0045E7B3 >A3 481C4600 MOV DWORD PTR DS:,EAX
0045E7B8 .^ E9 BCCFFFFF JMP 0045B779 ;0045B779 多谢热心的小H 多谢大大分享,小白又受教了。。呵呵。 这个比较不错。 这个不错。。。。 刚用了好几个UIF都出现一个,试了下这个,没问题了。~ 不懂啊.-.- 非常好用的工具,感谢楼主分享{:1_921:}
页:
[1]