forked from opsxcq/packer-ah
-
Notifications
You must be signed in to change notification settings - Fork 0
/
aplibud.pas
103 lines (81 loc) · 3.5 KB
/
aplibud.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
(*
* aPLib compression library - the smaller the better :)
*
* Delphi interface to aPLib dll
*
* Copyright (c) 1998-2004 by Joergen Ibsen / Jibz
* All Rights Reserved
*
* http://www.ibsensoftware.com/
*
* -> Delphi by Solodovnikov Alexey 21.03.1999 (alenka@mail.line.ru)
*)
unit aPLibud;
interface
uses
Windows;
const
aP_pack_break : DWORD = 0;
aP_pack_continue : DWORD = 1;
aPLib_Error : DWORD = DWORD(-1); (* indicates error compressing/decompressing *)
type
TaPack_Status = function(w0, w1, w2 : DWORD;
cbparam : Pointer) : DWORD;stdcall;
function _aP_pack(var Source;
var Destination;
Length : DWORD;
var WorkMem;
Callback : TaPack_Status;
cbparam : Pointer) : DWORD;stdcall;
function _aP_workmem_size(InputSize : DWORD) : DWORD;stdcall;
function _aP_max_packed_size(InputSize : DWORD) : DWORD;stdcall;
function _aP_depack_asm(var Source, Destination) : DWORD;stdcall;
function _aP_depack_asm_fast(var Source, Destination) : DWORD;stdcall;
function _aP_depack_asm_safe(var Source;
SrcLen : DWORD;
var Destination;
DstLen :DWORD) : DWORD;stdcall;
function _aP_crc32(var Source; Length : DWORD) : DWORD;stdcall;
function _aPsafe_pack(var Source;
var Destination;
Length : DWORD;
var WorkMem;
Callback : TaPack_Status;
cbparam : Pointer) : DWORD;stdcall;
function _aPsafe_check(var Source) : DWORD;stdcall;
function _aPsafe_get_orig_size(var Source) : DWORD;stdcall;
function _aPsafe_depack(var Source;
SrcLen : DWORD;
var Destination;
DstLen :DWORD) : DWORD;stdcall;
implementation
const
DLL = 'aplib.dll';
function _aP_pack(var Source;
var Destination;
Length : DWORD;
var WorkMem;
CallBack : TaPack_Status;
cbparam : Pointer) : DWORD;stdcall;external DLL;
function _aP_workmem_size(InputSize : DWORD) : DWORD;stdcall;external DLL;
function _aP_max_packed_size(InputSize : DWORD) : DWORD;stdcall;external DLL;
function _aP_depack_asm(var Source, Destination) : DWORD;stdcall;external DLL;
function _aP_depack_asm_fast(var Source, Destination) : DWORD;stdcall;external DLL;
function _aP_depack_asm_safe(var Source;
SrcLen : DWORD;
var Destination;
DstLen :DWORD) : DWORD;external DLL;
function _aP_crc32(var Source; Length : DWORD) : DWORD;stdcall;external DLL;
function _aPsafe_pack(var Source;
var Destination;
Length : DWORD;
var WorkMem;
CallBack : TaPack_Status;
cbparam : Pointer) : DWORD;stdcall;external DLL;
function _aPsafe_check(var Source) : DWORD;stdcall;external DLL;
function _aPsafe_get_orig_size(var Source) : DWORD;stdcall;external DLL;
function _aPsafe_depack(var Source;
SrcLen : DWORD;
var Destination;
DstLen :DWORD) : DWORD;external DLL;
end.