欢迎来到 嗅灵易学

零基础也能上手的脚本技术课,一对一答疑带你入门

crackcode代码分享笔记(二) (5千字)

crackcode代码分享笔记(二) (5千字)

感谢你们看我的笔记,能够互相交流提高!谁能告诉我上一篇留下的问题吗??谢谢!!
接着上一回继续看代码。看代码之前我们先来认识一个API函数:
功能:获取INI文件中与指定关键字对应的参数(字符串性)并将此参数拷贝
到lpReturnedString中。
DWORD GetPrivateProfileString(
  LPCTSTR lpAppName,        // points to section name
  LPCTSTR lpKeyName,        // points to key name
  LPCTSTR lpDefault,        // points to default string
  LPTSTR lpReturnedString,  // points to destination buffer
  DWORD nSize,              // size of destination buffer
  LPCTSTR lpFileName        // points to initialization filename
);
参  数
lpApplicationName  String 待寻找的关键字所在的段
lpKeyName          String  与参数相对应的关键字名
lpDefault          String 指定的关键字不存在时返回的缺省值
lpReturnedString  String  预先分配好的长度至少为nSize字节的字符串缓冲区
nSized            Integer 将要装入lpReturnedString缓冲区的最大字符数
lpFileName        String 初始化文件的名字
返回值  Integer 拷贝到lpReturnedString缓冲区的字符数

* Possible StringData Ref from Data Obj ->"Options"
                                  |
:00401049 BB30604000              mov ebx, 00406030
:0040104E 56                      push esi          //==> INI FILENAME
:0040104F 57                      push edi          //==>SIZE OF BUFFER
* Reference To: KERNEL32.GetPrivateProfileStringA, Ord:0000h
                                  |
:00401050 8B3D60504000            mov edi, dword ptr [00405060]
:00401056 6824A54000              push 0040A524    //==>POINT FOR BUFFER
:0040105B 55                      push ebp          //==>DEFAULT STRING
* Possible StringData Ref from Data Obj ->"CommandLine"
                                  |
:0040105C 68D0604000              push 004060D0        //==>KEY NAME    
:00401061 53                      push ebx          //==>SECTION NAME
:00401062 FFD7                    call edi          //==>GetPrivateProfileStringA
:00401064 56                      push esi
:00401065 6A02                    push 00000002
:00401067 6840A64000              push 0040A640
:0040106C 55                      push ebp
* Possible StringData Ref from Data Obj ->"Mode"
                                  |
:0040106D 685C624000              push 0040625C
:00401072 53                      push ebx
:00401073 FFD7                    call edi
:00401075 56                      push esi
:00401076 6A09                    push 00000009
:00401078 6888974000              push 00409788
:0040107D 55                      push ebp
* Possible StringData Ref from Data Obj ->"First_Break_Address"
                                  |
:0040107E 6848624000              push 00406248
:00401083 53                      push ebx
:00401084 FFD7                    call edi
:00401086 56                      push esi
:00401087 6A03                    push 00000003
:00401089 6884974000              push 00409784
:0040108E 55                      push ebp
* Possible StringData Ref from Data Obj ->"First_Break_Address_Code"
                                  |
:0040108F 682C624000              push 0040622C
:00401094 53                      push ebx
:00401095 FFD7                    call edi
:00401097 56                      push esi
:00401098 6A03                    push 00000003
:0040109A 6880974000              push 00409780
:0040109F 55                      push ebp
* Possible StringData Ref from Data Obj ->"First_Break_Address_Code_Lenth"
                                  |
:004010A0 680C624000              push 0040620C
:004010A5 53                      push ebx
:004010A6 FFD7                    call edi
:004010A8 56                      push esi
:004010A9 6A09                    push 00000009
:004010AB 6874974000              push 00409774
:004010B0 55                      push ebp
* Possible StringData Ref from Data Obj ->"Second_Break_Address"
                                  |
:004010B1 68F4614000              push 004061F4
:004010B6 53                      push ebx
:004010B7 FFD7                    call edi
:004010B9 56                      push esi
:004010BA 6A03                    push 00000003
:004010BC 6870974000              push 00409770
:004010C1 55                      push ebp
* Possible StringData Ref from Data Obj ->"Second_Break_Address_Code_Lenth"
                                  |
:004010C2 68D4614000              push 004061D4
:004010C7 53                      push ebx
:004010C8 FFD7                    call edi
:004010CA 56                      push esi
:004010CB BE64974000              mov esi, 00409764
:004010D0 6A09                    push 00000009
:004010D2 56                      push esi
:004010D3 55                      push ebp
* Possible StringData Ref from Data Obj ->"Save_Code_Address"
                                  |
:004010D4 68C0614000              push 004061C0
:004010D9 53                      push ebx
:004010DA FFD7                    call edi
:004010DC 6888974000              push 00409788
通过GetPrivateProfileStringA获得各个参数的值。也就是读出crackcode.ini的内容。
[Options]
CommandLine=winzip32.exe
Mode=2
First_Break_Address=407C1C
First_Break_Address_Code=BE
First_Break_Address_Code_Lenth=5
Second_Break_Address=457923
Second_Break_Address_Code_Lenth=2
Save_Code_Address=EDI
今天就到这里,就到这里。。。。。。                (待续)豆豆虾
                        2001.8.10 18:36完成
                        历时:0.5个小时。

注意:上传附件及图片大小不得大于30M。

⚠️ 版权声明:
本博客所有内容(含教程、源码、工具)仅供个人技术学习与研究交流使用,严禁商用、倒卖、二次分发及非法用途
未经作者书面授权,任何组织或个人不得转载、复制或用于其他平台,违者将追究相关责任。

0 0 0 举报
复制成功