吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 8841|回复: 2
收起左侧

[Dongle] HASP HL Envelope IAT Fixer

[复制链接]
Hmily 发表于 2009-7-21 16:05
/*************************************************
HASP HL Envelope IAT Fixer

Author: light.phoenix
Homepage: reaonline.net

History:
+ v0.0.1: November 08, 2008.

Tools: WinXP SP2, OllyICE, OllyDbg Script 1.64.3
Notes:
- Use this script after stop at OEP.
- Some emulated functions need to be resolved manually:
GetCommandLineA
GetProcAddress
GetCurrentProcess
GetStartupInfoA
GetCurrentProcessId
**************************************************/

 /*************************************************
HASP HL Envelope IAT Fixer
  
Author: light.phoenix
Homepage: reaonline.net

History:
    + v0.0.1: November 08, 2008.
  
Tools: WinXP SP2, OllyICE, OllyDbg Script 1.64.3
Notes:
- Use this script after stop at OEP.
- Some emulated functions need to be resolved manually:
    GetCommandLineA
    GetProcAddress
    GetCurrentProcess
    GetStartupInfoA
    GetCurrentProcessId
**************************************************/

var saveEIP
var modulebase
var addrGetTickCount
var numCallGTC          
var iatStart
var iatSize
var iatEnd
var iatEntry
var addrBP
var addrAPIEntry
var protectSectionBase
var addr
var opcode

mov saveEIP, eip

gpa "GetTickCount", "kernel32.dll"
mov addrGetTickCount, $RESULT

gmi eip, MODULEBASE
mov modulebase, $RESULT

ask "Enter RVA of IAT"
cmp $RESULT, 0
je @exit
mov iatStart, $RESULT
add iatStart, modulebase

ask "IAT Size"
cmp $RESULT, 0
je @exit
mov iatSize, $RESULT

ask "Start address of `.protect` section"
cmp $RESULT, 0
je @exit
mov protectSectionBase, $RESULT

find protectSectionBase, #668BC087D387DA558BEC#
cmp  $RESULT, 0
je @signature_not_found
mov addrAPIEntry, $RESULT
mov addrBP, addrAPIEntry
sub addrBP, 20
mov opcode, [addrBP]
and opcode, FFFF
cmp opcode, C35D                          // POP EBP, RETN opcodes
jne @signature_not_found
inc addrBP                           // point to retn opcode

log addrBP
log addrAPIEntry

mov iatEnd, iatStart
add iatEnd, iatSize

mov iatEntry, iatStart

@search:
cmp iatEntry, iatEnd
jae @exit
cmp [iatEntry], 00000000
je @next

mov addr, [iatEntry]
mov opcode, [addr]
and opcode, 0FF
cmp opcode, E8
jne @next

inc addr
mov offset, [addr]
add offset, addr
add offset, 4
cmp offset, addrAPIEntry
jne @next

bphws addrBP, "x"
mov eip, [iatEntry]

mov numCallGTC, 0
@run:
run
sti
cmp numCallGTC, 1
je @fix
cmp eip, addrGetTickCount
jne @next
inc numCallGTC
jmp @run

@fix:
mov numCallGTC, 0
eval "[{iatEntry}] <- {eip}"
log $RESULT
mov [iatEntry], eip

@next:
bphwc addrBP
add iatEntry, 4
jmp @search

@signature_not_found:
msg "Signature's not found!"
jmp @exit

@exit:
bphwc
mov eip, saveEIP
an eip
pause
ret

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

server@qq.com 发表于 2010-7-7 12:14
老大搞点中文说明出来看不明白
wuqing1501 发表于 2010-7-7 12:48
回复 1# Hmily


    是1.x版本的吗? 用FLY的方法好像可以不用修复的 不知道你这个是否和那个版本一样
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 警告:本版块禁止灌水或回复与主题无关内容,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-5-25 19:27

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表