aptest.asm

来自「Cracker终结者——提供最优秀的软件保护技术」· 汇编 代码 · 共 63 行

ASM
63
字号
;;
;; aPLib compression library  -  the smaller the better :)
;;
;; TASM32/TLINK32 example, using aplib.dll
;;
;; Copyright (c) 1998-2002 by Joergen Ibsen / Jibz
;; All Rights Reserved
;;

.386p
.model flat

locals
jumps

.data?

 dest    db 128      dup (?)
 check   db 128      dup (?)
 workmem db 640*1024 dup (?)

.data

 src    db 'This is just a simple little test, to see if aPLib works!!!',0
 srclen dd ($-src)

 capt   db 'aPLib DLL Test',0

.code

 extrn _aP_pack            : near
 extrn _aP_depack_asm      : near
 extrn _aP_depack_asm_fast : near

 extrn MessageBoxA         : proc
 extrn ExitProcess         : proc

aplib_asm_test:
        ; compress src -> dest
        push  0                   ; no callback, hence NULL
        push  offset workmem      ; 1mb of workmem
        push  [srclen]            ; length
        push  offset dest         ; destination
        push  offset src          ; source
        call  _aP_pack            ; compress

        ; decompress dest -> check
        push  offset check        ; destination
        push  offset dest         ; source
        call  _aP_depack_asm_fast ; decompress

        ; print out check to verify
        push  0                   ; uType
        push  offset capt         ; caption
        push  offset check        ; text
        push  0                   ; master handle
        call  MessageBoxA         ; show message

        ; exit
        call  ExitProcess

END aplib_asm_test

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?