wenlin_db_scanner 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.document +5 -0
- data/Gemfile +13 -0
- data/Gemfile.lock +23 -0
- data/LICENSE.txt +122 -0
- data/README.md +102 -0
- data/Rakefile +36 -0
- data/VERSION +1 -0
- data/bin/wenlin_dbdump +24 -0
- data/bin/wenlin_dict +24 -0
- data/bin/wenlin_hanzi +13 -0
- data/bin/wenlin_parts +23 -0
- data/lib/wenlin_db_scanner.rb +13 -0
- data/lib/wenlin_db_scanner/chars.rb +210 -0
- data/lib/wenlin_db_scanner/db.rb +453 -0
- data/lib/wenlin_db_scanner/db_record.rb +43 -0
- data/lib/wenlin_db_scanner/dict.rb +373 -0
- data/lib/wenlin_db_scanner/speech_parts.rb +68 -0
- data/reversed/README.md +38 -0
- data/reversed/code.asm +1616 -0
- data/reversed/magic.txt +27 -0
- data/reversed/notes.txt +235 -0
- metadata +147 -0
data/reversed/README.md
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# Wenlin Reverse Engineering Log
|
2
|
+
|
3
|
+
I documented my reverse engineering efforts, so that I wouldn't have to keep
|
4
|
+
everything in my head. My notes are shared here, in the hope that they will be
|
5
|
+
helpful to others attempting similar things.
|
6
|
+
|
7
|
+
## Inventory
|
8
|
+
|
9
|
+
The files in this directory are as follows.
|
10
|
+
|
11
|
+
* `notes.txt` - describes the .db file format
|
12
|
+
* `magic.txt` - the magic constants used to decode .db record data
|
13
|
+
* `code.asm` - annotated disassembly of the .db record extracting procedures
|
14
|
+
|
15
|
+
## Method
|
16
|
+
|
17
|
+
I used the Mac build of Wenlin Dictionary, version 4.02. It should be fairly
|
18
|
+
easy to obtain.
|
19
|
+
|
20
|
+
The code was disassembled with the evaluation version of
|
21
|
+
[IDA Pro](http://www.hex-rays.com/products/ida/), which can be downloaded for
|
22
|
+
free. I made extensive use of the graph view, and of the variable naming
|
23
|
+
feature.
|
24
|
+
|
25
|
+
Fairly late (too late) in the process, I also used
|
26
|
+
[Affinic Debugger GUI](http://www.affinic.com/?page_id=109), which is a `gdb`
|
27
|
+
front-end. It can also be downloaded for free. I would have preferred to use
|
28
|
+
IDA's debugging features, but I couldn't figure out how to set a gdb server
|
29
|
+
on OSX 10.8 fast enough. I used the live debugger to prove or disprove the
|
30
|
+
hypotheses produced by the disassembly.
|
31
|
+
|
32
|
+
I also used the [Hex Fiend](http://ridiculousfish.com/hexfiend/) OSX hex editor
|
33
|
+
to take a look at the .db files.
|
34
|
+
|
35
|
+
At the end of the process, I learned about
|
36
|
+
[iosnoop](http://www.brendangregg.com/DTrace/iosnoop_example.html), which is
|
37
|
+
a DTrace script that traces filesystem operations. It is built into OSX, and it
|
38
|
+
might have been very useful, had I known about it.
|
data/reversed/code.asm
ADDED
@@ -0,0 +1,1616 @@
|
|
1
|
+
__text:0002B95E ; =============== S U B R O U T I N E =======================================
|
2
|
+
__text:0002B95E
|
3
|
+
__text:0002B95E ; Attributes: bp-based frame
|
4
|
+
__text:0002B95E
|
5
|
+
__text:0002B95E _FunnyMask proc near ; CODE XREF: _DecompressDBRec+49p
|
6
|
+
__text:0002B95E ; _CompressDBRec+43p
|
7
|
+
__text:0002B95E
|
8
|
+
__text:0002B95E returnValue = dword ptr -14h
|
9
|
+
__text:0002B95E recordTagCopy = byte ptr -10h
|
10
|
+
__text:0002B95E recordLengthCopy= word ptr -0Ch
|
11
|
+
__text:0002B95E recordLength = dword ptr 8
|
12
|
+
__text:0002B95E recordTag = dword ptr 0Ch
|
13
|
+
__text:0002B95E
|
14
|
+
__text:0002B95E push ebp
|
15
|
+
__text:0002B95F mov ebp, esp
|
16
|
+
__text:0002B961 sub esp, 18h
|
17
|
+
__text:0002B964 mov eax, [ebp+recordLength]
|
18
|
+
__text:0002B967 mov edx, [ebp+recordTag]
|
19
|
+
__text:0002B96A mov [ebp+recordLengthCopy], ax
|
20
|
+
__text:0002B96E mov [ebp+recordTagCopy], dl
|
21
|
+
__text:0002B971 movzx eax, ds:_versionOneDB
|
22
|
+
__text:0002B978 test al, al
|
23
|
+
__text:0002B97A jz short loc_2B990
|
24
|
+
__text:0002B97C movzx eax, [ebp+recordLengthCopy]
|
25
|
+
__text:0002B980 and eax, 7
|
26
|
+
__text:0002B983 shl eax, 3
|
27
|
+
__text:0002B986 add eax, offset _versionOneFunnyMasks
|
28
|
+
__text:0002B98B mov [ebp+returnValue], eax
|
29
|
+
__text:0002B98E jmp short loc_2B9CB
|
30
|
+
__text:0002B990 ; ---------------------------------------------------------------------------
|
31
|
+
__text:0002B990
|
32
|
+
__text:0002B990 loc_2B990: ; CODE XREF: _FunnyMask+1Cj
|
33
|
+
__text:0002B990 movzx eax, ds:_archiveDifferent
|
34
|
+
__text:0002B997 test al, al
|
35
|
+
__text:0002B999 jz short loc_2B9B9
|
36
|
+
__text:0002B99B movzx edx, [ebp+recordLengthCopy]
|
37
|
+
__text:0002B99F movzx eax, [ebp+recordTagCopy]
|
38
|
+
__text:0002B9A3 and eax, 1
|
39
|
+
__text:0002B9A6 lea eax, [edx+eax]
|
40
|
+
__text:0002B9A9 and eax, 7
|
41
|
+
__text:0002B9AC shl eax, 3
|
42
|
+
__text:0002B9AF add eax, offset _versionTwoFunnyMasks
|
43
|
+
__text:0002B9B4 mov [ebp+returnValue], eax
|
44
|
+
__text:0002B9B7 jmp short loc_2B9CB
|
45
|
+
__text:0002B9B9 ; ---------------------------------------------------------------------------
|
46
|
+
__text:0002B9B9
|
47
|
+
__text:0002B9B9 loc_2B9B9: ; CODE XREF: _FunnyMask+3Bj
|
48
|
+
__text:0002B9B9 movzx eax, [ebp+recordLengthCopy]
|
49
|
+
__text:0002B9BD and eax, 7
|
50
|
+
__text:0002B9C0 shl eax, 3
|
51
|
+
__text:0002B9C3 add eax, offset _versionTwoFunnyMasks
|
52
|
+
__text:0002B9C8 mov [ebp+returnValue], eax
|
53
|
+
__text:0002B9CB
|
54
|
+
__text:0002B9CB loc_2B9CB: ; CODE XREF: _FunnyMask+30j
|
55
|
+
__text:0002B9CB ; _FunnyMask+59j
|
56
|
+
__text:0002B9CB mov eax, [ebp+returnValue]
|
57
|
+
__text:0002B9CE leave
|
58
|
+
__text:0002B9CF retn
|
59
|
+
__text:0002B9CF _FunnyMask endp
|
60
|
+
|
61
|
+
__text:0002B901 ; =============== S U B R O U T I N E =======================================
|
62
|
+
__text:0002B901
|
63
|
+
__text:0002B901 ; Attributes: bp-based frame
|
64
|
+
__text:0002B901
|
65
|
+
__text:0002B901 _CrypOfs proc near ; CODE XREF: _DecompressDBRec+62p
|
66
|
+
__text:0002B901 ; _CompressDBRec+5Cp
|
67
|
+
__text:0002B901
|
68
|
+
__text:0002B901 returnValue = dword ptr -14h
|
69
|
+
__text:0002B901 recordTagCopy = byte ptr -10h
|
70
|
+
__text:0002B901 recordLengthCopy= word ptr -0Ch
|
71
|
+
__text:0002B901 recordLength = dword ptr 8
|
72
|
+
__text:0002B901 recordTag = dword ptr 0Ch
|
73
|
+
__text:0002B901
|
74
|
+
__text:0002B901 push ebp
|
75
|
+
__text:0002B902 mov ebp, esp
|
76
|
+
__text:0002B904 sub esp, 18h
|
77
|
+
__text:0002B907 mov eax, [ebp+recordLength]
|
78
|
+
__text:0002B90A mov edx, [ebp+recordTag]
|
79
|
+
__text:0002B90D mov [ebp+recordLengthCopy], ax
|
80
|
+
__text:0002B911 mov [ebp+recordTagCopy], dl
|
81
|
+
__text:0002B914 movzx eax, ds:_archiveDifferent
|
82
|
+
__text:0002B91B test al, al
|
83
|
+
__text:0002B91D jz short loc_2B94A
|
84
|
+
__text:0002B91F movzx eax, ds:_versionOneDB
|
85
|
+
__text:0002B926 test al, al
|
86
|
+
__text:0002B928 jnz short loc_2B94A
|
87
|
+
__text:0002B92A movzx eax, [ebp+recordLengthCopy]
|
88
|
+
__text:0002B92E mov edx, eax
|
89
|
+
__text:0002B930 movzx eax, [ebp+recordTagCopy]
|
90
|
+
__text:0002B934 and eax, 1
|
91
|
+
__text:0002B937 shl eax, 3
|
92
|
+
__text:0002B93A lea eax, [edx+eax]
|
93
|
+
__text:0002B93D movzx eax, al
|
94
|
+
__text:0002B940 mov edx, eax
|
95
|
+
__text:0002B942 and edx, 3Fh
|
96
|
+
__text:0002B945 mov [ebp+returnValue], edx
|
97
|
+
__text:0002B948 jmp short loc_2B959
|
98
|
+
__text:0002B94A ; ---------------------------------------------------------------------------
|
99
|
+
__text:0002B94A
|
100
|
+
__text:0002B94A loc_2B94A: ; CODE XREF: _CrypOfs+1Cj
|
101
|
+
__text:0002B94A ; _CrypOfs+27j
|
102
|
+
__text:0002B94A movzx eax, [ebp+recordLengthCopy]
|
103
|
+
__text:0002B94E movzx eax, al
|
104
|
+
__text:0002B951 mov edx, eax
|
105
|
+
__text:0002B953 and edx, 3Fh
|
106
|
+
__text:0002B956 mov [ebp+returnValue], edx
|
107
|
+
__text:0002B959
|
108
|
+
__text:0002B959 loc_2B959: ; CODE XREF: _CrypOfs+47j
|
109
|
+
__text:0002B959 mov eax, [ebp+returnValue]
|
110
|
+
__text:0002B95C leave
|
111
|
+
__text:0002B95D retn
|
112
|
+
__text:0002B95D _CrypOfs endp
|
113
|
+
__text:0002B95D
|
114
|
+
__text:0002B95E
|
115
|
+
|
116
|
+
__text:0002B8DB ; =============== S U B R O U T I N E =======================================
|
117
|
+
__text:0002B8DB
|
118
|
+
__text:0002B8DB ; Attributes: bp-based frame
|
119
|
+
__text:0002B8DB
|
120
|
+
__text:0002B8DB _CrypMask proc near ; CODE XREF: _DecompressDBRec+6Ap
|
121
|
+
__text:0002B8DB ; _CompressDBRec+64p
|
122
|
+
__text:0002B8DB
|
123
|
+
__text:0002B8DB cryptOffset = dword ptr -0Ch
|
124
|
+
__text:0002B8DB
|
125
|
+
__text:0002B8DB push ebp
|
126
|
+
__text:0002B8DC mov ebp, esp
|
127
|
+
__text:0002B8DE sub esp, 18h
|
128
|
+
__text:0002B8E1 movzx eax, ds:_versionOneDB
|
129
|
+
__text:0002B8E8 test al, al
|
130
|
+
__text:0002B8EA jz short loc_2B8F5
|
131
|
+
__text:0002B8EC mov [ebp+cryptOffset], offset _versionOneCrypMask
|
132
|
+
__text:0002B8F3 jmp short loc_2B8FC
|
133
|
+
__text:0002B8F5 ; ---------------------------------------------------------------------------
|
134
|
+
__text:0002B8F5
|
135
|
+
__text:0002B8F5 loc_2B8F5: ; CODE XREF: _CrypMask+Fj
|
136
|
+
__text:0002B8F5 mov [ebp+cryptOffset], offset _versionTwoCrypMask
|
137
|
+
__text:0002B8FC
|
138
|
+
__text:0002B8FC loc_2B8FC: ; CODE XREF: _CrypMask+18j
|
139
|
+
__text:0002B8FC mov eax, [ebp+cryptOffset]
|
140
|
+
__text:0002B8FF leave
|
141
|
+
__text:0002B900 retn
|
142
|
+
__text:0002B900 _CrypMask endp
|
143
|
+
|
144
|
+
__text:0002AB8C ; =============== S U B R O U T I N E =======================================
|
145
|
+
__text:0002AB8C
|
146
|
+
__text:0002AB8C ; Attributes: bp-based frame
|
147
|
+
__text:0002AB8C
|
148
|
+
__text:0002AB8C _DecompressDBRec proc near ; CODE XREF: _DBRecordReadIntoTextBuf+B3p
|
149
|
+
__text:0002AB8C
|
150
|
+
__text:0002AB8C returnValue = dword ptr -60h
|
151
|
+
__text:0002AB8C recordTagCopy = byte ptr -5Ch
|
152
|
+
__text:0002AB8C ziNumberLenBuffer= dword ptr -4Ch
|
153
|
+
__text:0002AB8C decompressedChar= byte ptr -45h
|
154
|
+
__text:0002AB8C fpCopy = dword ptr -40h
|
155
|
+
__text:0002AB8C recordLengthInBits2= dword ptr -38h
|
156
|
+
__text:0002AB8C recordLengthInBits= dword ptr -34h
|
157
|
+
__text:0002AB8C lineOffset = byte ptr -27h
|
158
|
+
__text:0002AB8C funnyMaskValue = dword ptr -24h
|
159
|
+
__text:0002AB8C cryptOffset = byte ptr -20h
|
160
|
+
__text:0002AB8C cryptMask = dword ptr -1Ch
|
161
|
+
__text:0002AB8C decompressedByte= word ptr -18h
|
162
|
+
__text:0002AB8C easyBufferAppendStat= word ptr -16h
|
163
|
+
__text:0002AB8C charOffset = dword ptr -14h
|
164
|
+
__text:0002AB8C mbCharLen = dword ptr -10h
|
165
|
+
__text:0002AB8C bufferAppendStat= word ptr -0Ah
|
166
|
+
__text:0002AB8C buffer = dword ptr 8
|
167
|
+
__text:0002AB8C fp = dword ptr 0Ch
|
168
|
+
__text:0002AB8C recordLength = dword ptr 10h
|
169
|
+
__text:0002AB8C recordTag = dword ptr 14h
|
170
|
+
__text:0002AB8C
|
171
|
+
__text:0002AB8C push ebp
|
172
|
+
__text:0002AB8D mov ebp, esp
|
173
|
+
__text:0002AB8F push edi
|
174
|
+
__text:0002AB90 sub esp, 74h
|
175
|
+
__text:0002AB93 mov eax, [ebp+recordTag]
|
176
|
+
__text:0002AB96 mov [ebp+recordTagCopy], al
|
177
|
+
__text:0002AB99 lea eax, [ebp+fpCopy]
|
178
|
+
__text:0002AB9C mov edi, eax
|
179
|
+
__text:0002AB9E cld
|
180
|
+
__text:0002AB9F mov edx, 0
|
181
|
+
__text:0002ABA4 mov eax, 0Ah
|
182
|
+
__text:0002ABA9 mov ecx, eax
|
183
|
+
__text:0002ABAB mov eax, edx
|
184
|
+
__text:0002ABAD rep stosd
|
185
|
+
__text:0002ABAF mov eax, [ebp+fp]
|
186
|
+
__text:0002ABB2 mov [ebp+fpCopy], eax
|
187
|
+
__text:0002ABB5 mov eax, [ebp+recordLength]
|
188
|
+
__text:0002ABB8 shl eax, 3
|
189
|
+
__text:0002ABBB mov [ebp+recordLengthInBits], eax
|
190
|
+
__text:0002ABBE mov eax, [ebp+recordLengthInBits]
|
191
|
+
__text:0002ABC1 mov [ebp+recordLengthInBits2], eax
|
192
|
+
__text:0002ABC4 movzx edx, [ebp+recordTagCopy]
|
193
|
+
__text:0002ABC8 mov eax, [ebp+recordLength]
|
194
|
+
__text:0002ABCB movzx eax, ax
|
195
|
+
__text:0002ABCE mov [esp+4], edx
|
196
|
+
__text:0002ABD2 mov [esp], eax
|
197
|
+
__text:0002ABD5 call _FunnyMask
|
198
|
+
__text:0002ABDA mov [ebp+funnyMaskValue], eax
|
199
|
+
__text:0002ABDD movzx edx, [ebp+recordTagCopy]
|
200
|
+
__text:0002ABE1 mov eax, [ebp+recordLength]
|
201
|
+
__text:0002ABE4 movzx eax, ax
|
202
|
+
__text:0002ABE7 mov [esp+4], edx
|
203
|
+
__text:0002ABEB mov [esp], eax
|
204
|
+
__text:0002ABEE call _CrypOfs
|
205
|
+
__text:0002ABF3 mov [ebp+cryptOffset], al
|
206
|
+
__text:0002ABF6 call _CrypMask
|
207
|
+
__text:0002ABFB mov [ebp+cryptMask], eax
|
208
|
+
__text:0002ABFE cmp [ebp+recordLength], 8
|
209
|
+
__text:0002AC02 jbe short loc_2AC0F
|
210
|
+
__text:0002AC04 movzx eax, ds:_versionOneDB
|
211
|
+
__text:0002AC0B test al, al
|
212
|
+
__text:0002AC0D jz short loc_2AC17
|
213
|
+
__text:0002AC0F
|
214
|
+
__text:0002AC0F loc_2AC0F: ; CODE XREF: _DecompressDBRec+76j
|
215
|
+
__text:0002AC0F mov [ebp+lineOffset], 9
|
216
|
+
__text:0002AC13 jmp short loc_2AC17
|
217
|
+
__text:0002AC15 ; ---------------------------------------------------------------------------
|
218
|
+
__text:0002AC15
|
219
|
+
__text:0002AC15 loc_2AC15: ; CODE XREF: _DecompressDBRec+F0j
|
220
|
+
__text:0002AC15 ; _DecompressDBRec+1D0j
|
221
|
+
__text:0002AC15 jmp short $+2
|
222
|
+
__text:0002AC17 ; ---------------------------------------------------------------------------
|
223
|
+
__text:0002AC17
|
224
|
+
__text:0002AC17 loc_2AC17: ; CODE XREF: _DecompressDBRec+81j
|
225
|
+
__text:0002AC17 ; _DecompressDBRec+87j ...
|
226
|
+
__text:0002AC17 lea eax, [ebp+fpCopy]
|
227
|
+
__text:0002AC1A mov [esp], eax
|
228
|
+
__text:0002AC1D call _DecompressByte
|
229
|
+
__text:0002AC22 mov [ebp+decompressedByte], ax
|
230
|
+
__text:0002AC26 cmp [ebp+decompressedByte], 0
|
231
|
+
__text:0002AC2B jg short loc_2AC4C
|
232
|
+
__text:0002AC2D cmp [ebp+decompressedByte], 0FFFFh
|
233
|
+
__text:0002AC32 jnz short loc_2AC40
|
234
|
+
__text:0002AC34 mov [ebp+returnValue], 0FFFFFFEDh
|
235
|
+
__text:0002AC3B jmp loc_2AD61
|
236
|
+
__text:0002AC40 ; ---------------------------------------------------------------------------
|
237
|
+
__text:0002AC40
|
238
|
+
__text:0002AC40 loc_2AC40: ; CODE XREF: _DecompressDBRec+A6j
|
239
|
+
__text:0002AC40 mov [ebp+returnValue], 0
|
240
|
+
__text:0002AC47 jmp loc_2AD61
|
241
|
+
__text:0002AC4C ; ---------------------------------------------------------------------------
|
242
|
+
__text:0002AC4C
|
243
|
+
__text:0002AC4C loc_2AC4C: ; CODE XREF: _DecompressDBRec+9Fj
|
244
|
+
__text:0002AC4C movsx eax, [ebp+decompressedByte]
|
245
|
+
__text:0002AC50 shr eax, 7
|
246
|
+
__text:0002AC53 xor eax, 1
|
247
|
+
__text:0002AC56 and eax, 1
|
248
|
+
__text:0002AC59 test al, al
|
249
|
+
__text:0002AC5B jz short loc_2AC8A
|
250
|
+
__text:0002AC5D movzx eax, [ebp+decompressedByte]
|
251
|
+
__text:0002AC61 movsx eax, al
|
252
|
+
__text:0002AC64 mov [esp+4], eax
|
253
|
+
__text:0002AC68 mov eax, [ebp+buffer]
|
254
|
+
__text:0002AC6B mov [esp], eax
|
255
|
+
__text:0002AC6E call _TBPutC
|
256
|
+
__text:0002AC73 mov [ebp+easyBufferAppendStat], ax
|
257
|
+
__text:0002AC77 cmp [ebp+easyBufferAppendStat], 0
|
258
|
+
__text:0002AC7C jz short loc_2AC15
|
259
|
+
__text:0002AC7E movsx eax, [ebp+easyBufferAppendStat]
|
260
|
+
__text:0002AC82 mov [ebp+returnValue], eax
|
261
|
+
__text:0002AC85 jmp loc_2AD61
|
262
|
+
__text:0002AC8A ; ---------------------------------------------------------------------------
|
263
|
+
__text:0002AC8A
|
264
|
+
__text:0002AC8A loc_2AC8A: ; CODE XREF: _DecompressDBRec+CFj
|
265
|
+
__text:0002AC8A movzx eax, [ebp+decompressedByte]
|
266
|
+
__text:0002AC8E mov [ebp+decompressedChar], al
|
267
|
+
__text:0002AC91 movzx eax, [ebp+decompressedByte]
|
268
|
+
__text:0002AC95 movsx eax, al
|
269
|
+
__text:0002AC98 mov [esp], eax
|
270
|
+
__text:0002AC9B call _MBCLenFromFirstByte
|
271
|
+
__text:0002ACA0 mov [ebp+mbCharLen], eax
|
272
|
+
__text:0002ACA3 mov [ebp+charOffset], 1
|
273
|
+
__text:0002ACAA jmp short loc_2ACDE
|
274
|
+
__text:0002ACAC ; ---------------------------------------------------------------------------
|
275
|
+
__text:0002ACAC
|
276
|
+
__text:0002ACAC loc_2ACAC: ; CODE XREF: _DecompressDBRec+158j
|
277
|
+
__text:0002ACAC lea eax, [ebp+fpCopy]
|
278
|
+
__text:0002ACAF mov [esp], eax
|
279
|
+
__text:0002ACB2 call _DecompressSixBits
|
280
|
+
__text:0002ACB7 mov [ebp+decompressedByte], ax
|
281
|
+
__text:0002ACBB cmp [ebp+decompressedByte], 0
|
282
|
+
__text:0002ACC0 jg short loc_2ACCE
|
283
|
+
__text:0002ACC2 mov [ebp+returnValue], 0FFFFDFFFh
|
284
|
+
__text:0002ACC9 jmp loc_2AD61
|
285
|
+
__text:0002ACCE ; ---------------------------------------------------------------------------
|
286
|
+
__text:0002ACCE
|
287
|
+
__text:0002ACCE loc_2ACCE: ; CODE XREF: _DecompressDBRec+134j
|
288
|
+
__text:0002ACCE mov edx, [ebp+charOffset]
|
289
|
+
__text:0002ACD1 movzx eax, [ebp+decompressedByte]
|
290
|
+
__text:0002ACD5 mov [ebp+edx+decompressedChar], al
|
291
|
+
__text:0002ACD9 lea eax, [ebp+charOffset]
|
292
|
+
__text:0002ACDC inc dword ptr [eax]
|
293
|
+
__text:0002ACDE
|
294
|
+
__text:0002ACDE loc_2ACDE: ; CODE XREF: _DecompressDBRec+11Ej
|
295
|
+
__text:0002ACDE mov eax, [ebp+charOffset]
|
296
|
+
__text:0002ACE1 cmp eax, [ebp+mbCharLen]
|
297
|
+
__text:0002ACE4 jb short loc_2ACAC
|
298
|
+
__text:0002ACE6 mov eax, [ebp+mbCharLen]
|
299
|
+
__text:0002ACE9 mov [ebp+eax+decompressedChar], 0
|
300
|
+
__text:0002ACEE lea eax, [ebp+ziNumberLenBuffer]
|
301
|
+
__text:0002ACF1 mov [esp+4], eax
|
302
|
+
__text:0002ACF5 lea eax, [ebp+decompressedChar]
|
303
|
+
__text:0002ACF8 mov [esp], eax
|
304
|
+
__text:0002ACFB call _ZiNumberLen
|
305
|
+
__text:0002AD00 cmp eax, 0FFFEh
|
306
|
+
__text:0002AD05 jz short loc_2AD0F
|
307
|
+
__text:0002AD07 mov eax, [ebp+ziNumberLenBuffer]
|
308
|
+
__text:0002AD0A cmp eax, [ebp+mbCharLen]
|
309
|
+
__text:0002AD0D jz short loc_2AD18
|
310
|
+
__text:0002AD0F
|
311
|
+
__text:0002AD0F loc_2AD0F: ; CODE XREF: _DecompressDBRec+179j
|
312
|
+
__text:0002AD0F mov [ebp+returnValue], 0FFFFDFFFh
|
313
|
+
__text:0002AD16 jmp short loc_2AD61
|
314
|
+
__text:0002AD18 ; ---------------------------------------------------------------------------
|
315
|
+
__text:0002AD18
|
316
|
+
__text:0002AD18 loc_2AD18: ; CODE XREF: _DecompressDBRec+181j
|
317
|
+
__text:0002AD18 mov [ebp+charOffset], 0
|
318
|
+
__text:0002AD1F jmp short loc_2AD54
|
319
|
+
__text:0002AD21 ; ---------------------------------------------------------------------------
|
320
|
+
__text:0002AD21
|
321
|
+
__text:0002AD21 loc_2AD21: ; CODE XREF: _DecompressDBRec+1CEj
|
322
|
+
__text:0002AD21 mov eax, [ebp+charOffset]
|
323
|
+
__text:0002AD24 movzx eax, [ebp+eax+decompressedChar]
|
324
|
+
__text:0002AD29 movsx eax, al
|
325
|
+
__text:0002AD2C mov [esp+4], eax
|
326
|
+
__text:0002AD30 mov eax, [ebp+buffer]
|
327
|
+
__text:0002AD33 mov [esp], eax
|
328
|
+
__text:0002AD36 call _TBPutC
|
329
|
+
__text:0002AD3B mov [ebp+bufferAppendStat], ax
|
330
|
+
__text:0002AD3F cmp [ebp+bufferAppendStat], 0
|
331
|
+
__text:0002AD44 jz short loc_2AD4F
|
332
|
+
__text:0002AD46 movsx eax, [ebp+bufferAppendStat]
|
333
|
+
__text:0002AD4A
|
334
|
+
__text:0002AD4A loc_2AD4A: ; DATA XREF: _KXRadicalFromZin+F7o
|
335
|
+
__text:0002AD4A mov [ebp+returnValue], eax
|
336
|
+
__text:0002AD4D jmp short loc_2AD61
|
337
|
+
__text:0002AD4F ; ---------------------------------------------------------------------------
|
338
|
+
__text:0002AD4F
|
339
|
+
__text:0002AD4F loc_2AD4F: ; CODE XREF: _DecompressDBRec+1B8j
|
340
|
+
__text:0002AD4F lea eax, [ebp+charOffset]
|
341
|
+
__text:0002AD52 inc dword ptr [eax]
|
342
|
+
__text:0002AD54
|
343
|
+
__text:0002AD54 loc_2AD54: ; CODE XREF: _DecompressDBRec+193j
|
344
|
+
__text:0002AD54 mov eax, [ebp+charOffset]
|
345
|
+
__text:0002AD57 cmp eax, [ebp+mbCharLen]
|
346
|
+
__text:0002AD5A jb short loc_2AD21
|
347
|
+
__text:0002AD5C jmp loc_2AC15
|
348
|
+
__text:0002AD61 ; ---------------------------------------------------------------------------
|
349
|
+
__text:0002AD61
|
350
|
+
__text:0002AD61 loc_2AD61: ; CODE XREF: _DecompressDBRec+AFj
|
351
|
+
__text:0002AD61 ; _DecompressDBRec+BBj ...
|
352
|
+
__text:0002AD61 mov eax, [ebp+returnValue]
|
353
|
+
__text:0002AD64 add esp, 74h
|
354
|
+
__text:0002AD67 pop edi
|
355
|
+
__text:0002AD68 leave
|
356
|
+
__text:0002AD69 retn
|
357
|
+
__text:0002AD69 _DecompressDBRec endp
|
358
|
+
|
359
|
+
__text:0002AD6A ; =============== S U B R O U T I N E =======================================
|
360
|
+
__text:0002AD6A
|
361
|
+
__text:0002AD6A ; Attributes: bp-based frame
|
362
|
+
__text:0002AD6A
|
363
|
+
__text:0002AD6A _DecompressByte proc near ; CODE XREF: _DecompressDBRec+91p
|
364
|
+
__text:0002AD6A
|
365
|
+
__text:0002AD6A currentBit = word ptr -1Eh
|
366
|
+
__text:0002AD6A returnValue = dword ptr -1Ch
|
367
|
+
__text:0002AD6A node = word ptr -0Ch
|
368
|
+
__text:0002AD6A currentBitCopy = word ptr -0Ah
|
369
|
+
__text:0002AD6A pStruct = dword ptr 8
|
370
|
+
__text:0002AD6A
|
371
|
+
__text:0002AD6A push ebp
|
372
|
+
__text:0002AD6B mov ebp, esp
|
373
|
+
__text:0002AD6D push ebx
|
374
|
+
__text:0002AD6E sub esp, 34h
|
375
|
+
__text:0002AD71 mov [ebp+node], 0FEh
|
376
|
+
__text:0002AD77
|
377
|
+
__text:0002AD77 loc_2AD77: ; CODE XREF: _DecompressByte+AAj
|
378
|
+
__text:0002AD77 mov eax, [ebp+pStruct]
|
379
|
+
__text:0002AD7A mov eax, [eax+4]
|
380
|
+
__text:0002AD7D and eax, 7
|
381
|
+
__text:0002AD80 test eax, eax
|
382
|
+
__text:0002AD82 jnz short loc_2AD95
|
383
|
+
__text:0002AD84 mov eax, [ebp+pStruct]
|
384
|
+
__text:0002AD87 mov [esp], eax
|
385
|
+
__text:0002AD8A call _GetBitX
|
386
|
+
__text:0002AD8F mov [ebp+currentBit], ax
|
387
|
+
__text:0002AD93 jmp short loc_2ADCD
|
388
|
+
__text:0002AD95 ; ---------------------------------------------------------------------------
|
389
|
+
__text:0002AD95
|
390
|
+
__text:0002AD95 loc_2AD95: ; CODE XREF: _DecompressByte+18j
|
391
|
+
__text:0002AD95 mov eax, [ebp+pStruct]
|
392
|
+
__text:0002AD98 movzx ebx, byte ptr [eax+1Ah]
|
393
|
+
__text:0002AD9C mov eax, [ebp+pStruct]
|
394
|
+
__text:0002AD9F mov edx, [eax+1Ch]
|
395
|
+
__text:0002ADA2 mov eax, [ebp+pStruct]
|
396
|
+
__text:0002ADA5 mov ecx, [eax+4]
|
397
|
+
__text:0002ADA8 mov eax, ecx
|
398
|
+
__text:0002ADAA movzx eax, ax
|
399
|
+
__text:0002ADAD and eax, 7
|
400
|
+
__text:0002ADB0 lea eax, [edx+eax]
|
401
|
+
__text:0002ADB3 movzx eax, byte ptr [eax]
|
402
|
+
__text:0002ADB6 and eax, ebx
|
403
|
+
__text:0002ADB8 test al, al
|
404
|
+
__text:0002ADBA setnz al
|
405
|
+
__text:0002ADBD movzx eax, al
|
406
|
+
__text:0002ADC0 mov [ebp+currentBit], ax
|
407
|
+
__text:0002ADC4 lea edx, [ecx+1]
|
408
|
+
__text:0002ADC7 mov eax, [ebp+pStruct]
|
409
|
+
__text:0002ADCA mov [eax+4], edx
|
410
|
+
__text:0002ADCD
|
411
|
+
__text:0002ADCD loc_2ADCD: ; CODE XREF: _DecompressByte+29j
|
412
|
+
__text:0002ADCD movzx eax, [ebp+currentBit]
|
413
|
+
__text:0002ADD1 mov [ebp+currentBitCopy], ax
|
414
|
+
__text:0002ADD5 cmp [ebp+currentBitCopy], 0
|
415
|
+
__text:0002ADDA jz short loc_2ADFE
|
416
|
+
__text:0002ADDC cmp [ebp+currentBitCopy], 0
|
417
|
+
__text:0002ADE1 jns short loc_2ADEC
|
418
|
+
__text:0002ADE3 movsx eax, [ebp+currentBitCopy]
|
419
|
+
__text:0002ADE7 mov [ebp+returnValue], eax
|
420
|
+
__text:0002ADEA jmp short loc_2AE26
|
421
|
+
__text:0002ADEC ; ---------------------------------------------------------------------------
|
422
|
+
__text:0002ADEC
|
423
|
+
__text:0002ADEC loc_2ADEC: ; CODE XREF: _DecompressByte+77j
|
424
|
+
__text:0002ADEC movsx eax, [ebp+node]
|
425
|
+
__text:0002ADF0 movzx eax, ds:_rightNode[eax+eax]
|
426
|
+
__text:0002ADF8 mov [ebp+node], ax
|
427
|
+
__text:0002ADFC jmp short loc_2AE0E
|
428
|
+
__text:0002ADFE ; ---------------------------------------------------------------------------
|
429
|
+
__text:0002ADFE
|
430
|
+
__text:0002ADFE loc_2ADFE: ; CODE XREF: _DecompressByte+70j
|
431
|
+
__text:0002ADFE movsx eax, [ebp+node]
|
432
|
+
__text:0002AE02 movzx eax, ds:_leftNode[eax+eax]
|
433
|
+
__text:0002AE0A mov [ebp+node], ax
|
434
|
+
__text:0002AE0E
|
435
|
+
__text:0002AE0E loc_2AE0E: ; CODE XREF: _DecompressByte+92j
|
436
|
+
__text:0002AE0E cmp [ebp+node], 0FFh
|
437
|
+
__text:0002AE14 jle loc_2AD77
|
438
|
+
__text:0002AE1A movzx eax, [ebp+node]
|
439
|
+
__text:0002AE1E sub ax, 100h
|
440
|
+
__text:0002AE22 cwde
|
441
|
+
__text:0002AE23 mov [ebp+returnValue], eax
|
442
|
+
__text:0002AE26
|
443
|
+
__text:0002AE26 loc_2AE26: ; CODE XREF: _DecompressByte+80j
|
444
|
+
__text:0002AE26 mov eax, [ebp+returnValue]
|
445
|
+
__text:0002AE29 add esp, 34h
|
446
|
+
__text:0002AE2C pop ebx
|
447
|
+
__text:0002AE2D leave
|
448
|
+
__text:0002AE2E retn
|
449
|
+
__text:0002AE2E _DecompressByte end
|
450
|
+
|
451
|
+
__text:0002AE2F _DecompressSixBits proc near ; CODE XREF: _DecompressDBRec+126p
|
452
|
+
__text:0002AE2F
|
453
|
+
__text:0002AE2F firstBit = word ptr -2Ch
|
454
|
+
__text:0002AE2F secondBit = word ptr -2Ah
|
455
|
+
__text:0002AE2F thirdBit = word ptr -28h
|
456
|
+
__text:0002AE2F fourthBit = word ptr -26h
|
457
|
+
__text:0002AE2F fifthBit = word ptr -24h
|
458
|
+
__text:0002AE2F sixthBit = word ptr -22h
|
459
|
+
__text:0002AE2F returnValue = dword ptr -20h
|
460
|
+
__text:0002AE2F currentBit = word ptr -1Ah
|
461
|
+
__text:0002AE2F decompressedByte= byte ptr -9
|
462
|
+
__text:0002AE2F pStruct = dword ptr 8
|
463
|
+
__text:0002AE2F
|
464
|
+
__text:0002AE2F push ebp
|
465
|
+
__text:0002AE30 mov ebp, esp
|
466
|
+
__text:0002AE32 push ebx
|
467
|
+
__text:0002AE33 sub esp, 44h
|
468
|
+
__text:0002AE36 mov [ebp+decompressedByte], 80h
|
469
|
+
__text:0002AE3A mov eax, [ebp+pStruct]
|
470
|
+
__text:0002AE3D mov eax, [eax+4]
|
471
|
+
__text:0002AE40 and eax, 7
|
472
|
+
__text:0002AE43 test eax, eax
|
473
|
+
__text:0002AE45 jnz short loc_2AE58
|
474
|
+
__text:0002AE47 mov eax, [ebp+pStruct]
|
475
|
+
__text:0002AE4A mov [esp], eax
|
476
|
+
__text:0002AE4D call _GetBitX
|
477
|
+
__text:0002AE52 mov [ebp+firstBit], ax
|
478
|
+
__text:0002AE56 jmp short loc_2AE90
|
479
|
+
__text:0002AE58 ; ---------------------------------------------------------------------------
|
480
|
+
__text:0002AE58
|
481
|
+
__text:0002AE58 loc_2AE58: ; CODE XREF: _DecompressSixBits+16j
|
482
|
+
__text:0002AE58 mov eax, [ebp+pStruct]
|
483
|
+
__text:0002AE5B movzx ebx, byte ptr [eax+1Ah]
|
484
|
+
__text:0002AE5F mov eax, [ebp+pStruct]
|
485
|
+
__text:0002AE62 mov edx, [eax+1Ch]
|
486
|
+
__text:0002AE65 mov eax, [ebp+pStruct]
|
487
|
+
__text:0002AE68 mov ecx, [eax+4]
|
488
|
+
__text:0002AE6B mov eax, ecx
|
489
|
+
__text:0002AE6D movzx eax, ax
|
490
|
+
__text:0002AE70 and eax, 7
|
491
|
+
__text:0002AE73 lea eax, [edx+eax]
|
492
|
+
__text:0002AE76 movzx eax, byte ptr [eax]
|
493
|
+
__text:0002AE79 and eax, ebx
|
494
|
+
__text:0002AE7B test al, al
|
495
|
+
__text:0002AE7D setnz al
|
496
|
+
__text:0002AE80 movzx eax, al
|
497
|
+
__text:0002AE83 mov [ebp+firstBit], ax
|
498
|
+
__text:0002AE87 lea edx, [ecx+1]
|
499
|
+
__text:0002AE8A mov eax, [ebp+pStruct]
|
500
|
+
__text:0002AE8D mov [eax+4], edx
|
501
|
+
__text:0002AE90
|
502
|
+
__text:0002AE90 loc_2AE90: ; CODE XREF: _DecompressSixBits+27j
|
503
|
+
__text:0002AE90 movzx eax, [ebp+firstBit]
|
504
|
+
__text:0002AE94 mov [ebp+currentBit], ax
|
505
|
+
__text:0002AE98 cmp [ebp+currentBit], 0
|
506
|
+
__text:0002AE9D jz short loc_2AEB0
|
507
|
+
__text:0002AE9F cmp [ebp+currentBit], 0
|
508
|
+
__text:0002AEA4 js loc_2B103
|
509
|
+
__text:0002AEAA lea eax, [ebp+decompressedByte]
|
510
|
+
__text:0002AEAD or byte ptr [eax], 20h
|
511
|
+
__text:0002AEB0
|
512
|
+
__text:0002AEB0 loc_2AEB0: ; CODE XREF: _DecompressSixBits+6Ej
|
513
|
+
__text:0002AEB0 mov eax, [ebp+pStruct]
|
514
|
+
__text:0002AEB3 mov eax, [eax+4]
|
515
|
+
__text:0002AEB6 and eax, 7
|
516
|
+
__text:0002AEB9 test eax, eax
|
517
|
+
__text:0002AEBB jnz short loc_2AECE
|
518
|
+
__text:0002AEBD mov eax, [ebp+pStruct]
|
519
|
+
__text:0002AEC0 mov [esp], eax
|
520
|
+
__text:0002AEC3 call _GetBitX
|
521
|
+
__text:0002AEC8 mov [ebp+secondBit], ax
|
522
|
+
__text:0002AECC jmp short loc_2AF06
|
523
|
+
__text:0002AECE ; ---------------------------------------------------------------------------
|
524
|
+
__text:0002AECE
|
525
|
+
__text:0002AECE loc_2AECE: ; CODE XREF: _DecompressSixBits+8Cj
|
526
|
+
__text:0002AECE mov eax, [ebp+pStruct]
|
527
|
+
__text:0002AED1 movzx ebx, byte ptr [eax+1Ah]
|
528
|
+
__text:0002AED5 mov eax, [ebp+pStruct]
|
529
|
+
__text:0002AED8 mov edx, [eax+1Ch]
|
530
|
+
__text:0002AEDB mov eax, [ebp+pStruct]
|
531
|
+
__text:0002AEDE mov ecx, [eax+4]
|
532
|
+
__text:0002AEE1 mov eax, ecx
|
533
|
+
__text:0002AEE3 movzx eax, ax
|
534
|
+
__text:0002AEE6 and eax, 7
|
535
|
+
__text:0002AEE9 lea eax, [edx+eax]
|
536
|
+
__text:0002AEEC movzx eax, byte ptr [eax]
|
537
|
+
__text:0002AEEF and eax, ebx
|
538
|
+
__text:0002AEF1 test al, al
|
539
|
+
__text:0002AEF3 setnz al
|
540
|
+
__text:0002AEF6 movzx eax, al
|
541
|
+
__text:0002AEF9 mov [ebp+secondBit], ax
|
542
|
+
__text:0002AEFD lea edx, [ecx+1]
|
543
|
+
__text:0002AF00 mov eax, [ebp+pStruct]
|
544
|
+
__text:0002AF03 mov [eax+4], edx
|
545
|
+
__text:0002AF06
|
546
|
+
__text:0002AF06 loc_2AF06: ; CODE XREF: _DecompressSixBits+9Dj
|
547
|
+
__text:0002AF06 movzx eax, [ebp+secondBit]
|
548
|
+
__text:0002AF0A mov [ebp+currentBit], ax
|
549
|
+
__text:0002AF0E cmp [ebp+currentBit], 0
|
550
|
+
__text:0002AF13 jz short loc_2AF26
|
551
|
+
__text:0002AF15 cmp [ebp+currentBit], 0
|
552
|
+
__text:0002AF1A js loc_2B103
|
553
|
+
__text:0002AF20 lea eax, [ebp+decompressedByte]
|
554
|
+
__text:0002AF23 or byte ptr [eax], 10h
|
555
|
+
__text:0002AF26
|
556
|
+
__text:0002AF26 loc_2AF26: ; CODE XREF: _DecompressSixBits+E4j
|
557
|
+
__text:0002AF26 mov eax, [ebp+pStruct]
|
558
|
+
__text:0002AF29 mov eax, [eax+4]
|
559
|
+
__text:0002AF2C and eax, 7
|
560
|
+
__text:0002AF2F test eax, eax
|
561
|
+
__text:0002AF31 jnz short loc_2AF44
|
562
|
+
__text:0002AF33 mov eax, [ebp+pStruct]
|
563
|
+
__text:0002AF36 mov [esp], eax
|
564
|
+
__text:0002AF39 call _GetBitX
|
565
|
+
__text:0002AF3E mov [ebp+thirdBit], ax
|
566
|
+
__text:0002AF42 jmp short loc_2AF7C
|
567
|
+
__text:0002AF44 ; ---------------------------------------------------------------------------
|
568
|
+
__text:0002AF44
|
569
|
+
__text:0002AF44 loc_2AF44: ; CODE XREF: _DecompressSixBits+102j
|
570
|
+
__text:0002AF44 mov eax, [ebp+pStruct]
|
571
|
+
__text:0002AF47 movzx ebx, byte ptr [eax+1Ah]
|
572
|
+
__text:0002AF4B mov eax, [ebp+pStruct]
|
573
|
+
__text:0002AF4E mov edx, [eax+1Ch]
|
574
|
+
__text:0002AF51 mov eax, [ebp+pStruct]
|
575
|
+
__text:0002AF54 mov ecx, [eax+4]
|
576
|
+
__text:0002AF57 mov eax, ecx
|
577
|
+
__text:0002AF59 movzx eax, ax
|
578
|
+
__text:0002AF5C and eax, 7
|
579
|
+
__text:0002AF5F lea eax, [edx+eax]
|
580
|
+
__text:0002AF62 movzx eax, byte ptr [eax]
|
581
|
+
__text:0002AF65 and eax, ebx
|
582
|
+
__text:0002AF67 test al, al
|
583
|
+
__text:0002AF69 setnz al
|
584
|
+
__text:0002AF6C movzx eax, al
|
585
|
+
__text:0002AF6F mov [ebp+thirdBit], ax
|
586
|
+
__text:0002AF73 lea edx, [ecx+1]
|
587
|
+
__text:0002AF76 mov eax, [ebp+pStruct]
|
588
|
+
__text:0002AF79 mov [eax+4], edx
|
589
|
+
__text:0002AF7C
|
590
|
+
__text:0002AF7C loc_2AF7C: ; CODE XREF: _DecompressSixBits+113j
|
591
|
+
__text:0002AF7C movzx eax, [ebp+thirdBit]
|
592
|
+
__text:0002AF80 mov [ebp+currentBit], ax
|
593
|
+
__text:0002AF84 cmp [ebp+currentBit], 0
|
594
|
+
__text:0002AF89 jz short loc_2AF9C
|
595
|
+
__text:0002AF8B cmp [ebp+currentBit], 0
|
596
|
+
__text:0002AF90 js loc_2B103
|
597
|
+
__text:0002AF96 lea eax, [ebp+decompressedByte]
|
598
|
+
__text:0002AF99 or byte ptr [eax], 8
|
599
|
+
__text:0002AF9C
|
600
|
+
__text:0002AF9C loc_2AF9C: ; CODE XREF: _DecompressSixBits+15Aj
|
601
|
+
__text:0002AF9C mov eax, [ebp+pStruct]
|
602
|
+
__text:0002AF9F mov eax, [eax+4]
|
603
|
+
__text:0002AFA2 and eax, 7
|
604
|
+
__text:0002AFA5 test eax, eax
|
605
|
+
__text:0002AFA7 jnz short loc_2AFBA
|
606
|
+
__text:0002AFA9 mov eax, [ebp+pStruct]
|
607
|
+
__text:0002AFAC mov [esp], eax
|
608
|
+
__text:0002AFAF call _GetBitX
|
609
|
+
__text:0002AFB4 mov [ebp+fourthBit], ax
|
610
|
+
__text:0002AFB8 jmp short loc_2AFF2
|
611
|
+
__text:0002AFBA ; ---------------------------------------------------------------------------
|
612
|
+
__text:0002AFBA
|
613
|
+
__text:0002AFBA loc_2AFBA: ; CODE XREF: _DecompressSixBits+178j
|
614
|
+
__text:0002AFBA mov eax, [ebp+pStruct]
|
615
|
+
__text:0002AFBD movzx ebx, byte ptr [eax+1Ah]
|
616
|
+
__text:0002AFC1 mov eax, [ebp+pStruct]
|
617
|
+
__text:0002AFC4 mov edx, [eax+1Ch]
|
618
|
+
__text:0002AFC7 mov eax, [ebp+pStruct]
|
619
|
+
__text:0002AFCA mov ecx, [eax+4]
|
620
|
+
__text:0002AFCD mov eax, ecx
|
621
|
+
__text:0002AFCF movzx eax, ax
|
622
|
+
__text:0002AFD2 and eax, 7
|
623
|
+
__text:0002AFD5 lea eax, [edx+eax]
|
624
|
+
__text:0002AFD8 movzx eax, byte ptr [eax]
|
625
|
+
__text:0002AFDB and eax, ebx
|
626
|
+
__text:0002AFDD test al, al
|
627
|
+
__text:0002AFDF
|
628
|
+
__text:0002AFDF loc_2AFDF: ; DATA XREF: _FT_MulDiv+77o
|
629
|
+
__text:0002AFDF setnz al
|
630
|
+
__text:0002AFE2 movzx eax, al
|
631
|
+
__text:0002AFE5 mov [ebp+fourthBit], ax
|
632
|
+
__text:0002AFE9 lea edx, [ecx+1]
|
633
|
+
__text:0002AFEC mov eax, [ebp+pStruct]
|
634
|
+
__text:0002AFEF mov [eax+4], edx
|
635
|
+
__text:0002AFF2
|
636
|
+
__text:0002AFF2 loc_2AFF2: ; CODE XREF: _DecompressSixBits+189j
|
637
|
+
__text:0002AFF2 movzx eax, [ebp+fourthBit]
|
638
|
+
__text:0002AFF6 mov [ebp+currentBit], ax
|
639
|
+
__text:0002AFFA cmp [ebp+currentBit], 0
|
640
|
+
__text:0002AFFF jz short loc_2B012
|
641
|
+
__text:0002B001 cmp [ebp+currentBit], 0
|
642
|
+
__text:0002B006 js loc_2B103
|
643
|
+
__text:0002B00C lea eax, [ebp+decompressedByte]
|
644
|
+
__text:0002B00F or byte ptr [eax], 4
|
645
|
+
__text:0002B012
|
646
|
+
__text:0002B012 loc_2B012: ; CODE XREF: _DecompressSixBits+1D0j
|
647
|
+
__text:0002B012 mov eax, [ebp+pStruct]
|
648
|
+
__text:0002B015 mov eax, [eax+4]
|
649
|
+
__text:0002B018 and eax, 7
|
650
|
+
__text:0002B01B test eax, eax
|
651
|
+
__text:0002B01D jnz short loc_2B030
|
652
|
+
__text:0002B01F mov eax, [ebp+pStruct]
|
653
|
+
__text:0002B022 mov [esp], eax
|
654
|
+
__text:0002B025 call _GetBitX
|
655
|
+
__text:0002B02A mov [ebp+fifthBit], ax
|
656
|
+
__text:0002B02E jmp short loc_2B068
|
657
|
+
__text:0002B030 ; ---------------------------------------------------------------------------
|
658
|
+
__text:0002B030
|
659
|
+
__text:0002B030 loc_2B030: ; CODE XREF: _DecompressSixBits+1EEj
|
660
|
+
__text:0002B030 mov eax, [ebp+pStruct]
|
661
|
+
__text:0002B033 movzx ebx, byte ptr [eax+1Ah]
|
662
|
+
__text:0002B037 mov eax, [ebp+pStruct]
|
663
|
+
__text:0002B03A mov edx, [eax+1Ch]
|
664
|
+
__text:0002B03D mov eax, [ebp+pStruct]
|
665
|
+
__text:0002B040 mov ecx, [eax+4]
|
666
|
+
__text:0002B043 mov eax, ecx
|
667
|
+
__text:0002B045 movzx eax, ax
|
668
|
+
__text:0002B048 and eax, 7
|
669
|
+
__text:0002B04B lea eax, [edx+eax]
|
670
|
+
__text:0002B04E movzx eax, byte ptr [eax]
|
671
|
+
__text:0002B051 and eax, ebx
|
672
|
+
__text:0002B053 test al, al
|
673
|
+
__text:0002B055 setnz al
|
674
|
+
__text:0002B058 movzx eax, al
|
675
|
+
__text:0002B05B mov [ebp+fifthBit], ax
|
676
|
+
__text:0002B05F lea edx, [ecx+1]
|
677
|
+
__text:0002B062 mov eax, [ebp+pStruct]
|
678
|
+
__text:0002B065 mov [eax+4], edx
|
679
|
+
__text:0002B068
|
680
|
+
__text:0002B068 loc_2B068: ; CODE XREF: _DecompressSixBits+1FFj
|
681
|
+
__text:0002B068 movzx eax, [ebp+fifthBit]
|
682
|
+
__text:0002B06C mov [ebp+currentBit], ax
|
683
|
+
__text:0002B070 cmp [ebp+currentBit], 0
|
684
|
+
__text:0002B075 jz short loc_2B088
|
685
|
+
__text:0002B077 cmp [ebp+currentBit], 0
|
686
|
+
__text:0002B07C js loc_2B103
|
687
|
+
__text:0002B082 lea eax, [ebp+decompressedByte]
|
688
|
+
__text:0002B085 or byte ptr [eax], 2
|
689
|
+
__text:0002B088
|
690
|
+
__text:0002B088 loc_2B088: ; CODE XREF: _DecompressSixBits+246j
|
691
|
+
__text:0002B088 mov eax, [ebp+pStruct]
|
692
|
+
__text:0002B08B mov eax, [eax+4]
|
693
|
+
__text:0002B08E and eax, 7
|
694
|
+
__text:0002B091 test eax, eax
|
695
|
+
__text:0002B093 jnz short loc_2B0A6
|
696
|
+
__text:0002B095 mov eax, [ebp+pStruct]
|
697
|
+
__text:0002B098 mov [esp], eax
|
698
|
+
__text:0002B09B call _GetBitX
|
699
|
+
__text:0002B0A0 mov [ebp+sixthBit], ax
|
700
|
+
__text:0002B0A4 jmp short loc_2B0DE
|
701
|
+
__text:0002B0A6 ; ---------------------------------------------------------------------------
|
702
|
+
__text:0002B0A6
|
703
|
+
__text:0002B0A6 loc_2B0A6: ; CODE XREF: _DecompressSixBits+264j
|
704
|
+
__text:0002B0A6 mov eax, [ebp+pStruct]
|
705
|
+
__text:0002B0A9 movzx ebx, byte ptr [eax+1Ah]
|
706
|
+
__text:0002B0AD mov eax, [ebp+pStruct]
|
707
|
+
__text:0002B0B0 mov edx, [eax+1Ch]
|
708
|
+
__text:0002B0B3 mov eax, [ebp+pStruct]
|
709
|
+
__text:0002B0B6 mov ecx, [eax+4]
|
710
|
+
__text:0002B0B9 mov eax, ecx
|
711
|
+
__text:0002B0BB movzx eax, ax
|
712
|
+
__text:0002B0BE and eax, 7
|
713
|
+
__text:0002B0C1 lea eax, [edx+eax]
|
714
|
+
__text:0002B0C4 movzx eax, byte ptr [eax]
|
715
|
+
__text:0002B0C7 and eax, ebx
|
716
|
+
__text:0002B0C9 test al, al
|
717
|
+
__text:0002B0CB setnz al
|
718
|
+
__text:0002B0CE movzx eax, al
|
719
|
+
__text:0002B0D1 mov [ebp+sixthBit], ax
|
720
|
+
__text:0002B0D5 lea edx, [ecx+1]
|
721
|
+
__text:0002B0D8 mov eax, [ebp+pStruct]
|
722
|
+
__text:0002B0DB mov [eax+4], edx
|
723
|
+
__text:0002B0DE
|
724
|
+
__text:0002B0DE loc_2B0DE: ; CODE XREF: _DecompressSixBits+275j
|
725
|
+
__text:0002B0DE movzx eax, [ebp+sixthBit]
|
726
|
+
__text:0002B0E2 mov [ebp+currentBit], ax
|
727
|
+
__text:0002B0E6 cmp [ebp+currentBit], 0
|
728
|
+
__text:0002B0EB jz short loc_2B0FA
|
729
|
+
__text:0002B0ED cmp [ebp+currentBit], 0
|
730
|
+
__text:0002B0F2 js short loc_2B103
|
731
|
+
__text:0002B0F4 lea eax, [ebp+decompressedByte]
|
732
|
+
__text:0002B0F7 or byte ptr [eax], 1
|
733
|
+
__text:0002B0FA
|
734
|
+
__text:0002B0FA loc_2B0FA: ; CODE XREF: _DecompressSixBits+2BCj
|
735
|
+
__text:0002B0FA movzx eax, [ebp+decompressedByte]
|
736
|
+
__text:0002B0FE mov [ebp+returnValue], eax
|
737
|
+
__text:0002B101 jmp short loc_2B10A
|
738
|
+
__text:0002B103 ; ---------------------------------------------------------------------------
|
739
|
+
__text:0002B103
|
740
|
+
__text:0002B103 loc_2B103: ; CODE XREF: _DecompressSixBits+75j
|
741
|
+
__text:0002B103 ; _DecompressSixBits+EBj ...
|
742
|
+
__text:0002B103 movsx eax, [ebp+currentBit]
|
743
|
+
__text:0002B107 mov [ebp+returnValue], eax
|
744
|
+
__text:0002B10A
|
745
|
+
__text:0002B10A loc_2B10A: ; CODE XREF: _DecompressSixBits+2D2j
|
746
|
+
__text:0002B10A mov eax, [ebp+returnValue]
|
747
|
+
__text:0002B10D add esp, 44h
|
748
|
+
__text:0002B110 pop ebx
|
749
|
+
__text:0002B111 leave
|
750
|
+
__text:0002B112 retn
|
751
|
+
__text:0002B112 _DecompressSixBits endp
|
752
|
+
__text:0002B112
|
753
|
+
__text:0002B113
|
754
|
+
__text:0002B113 ; =============== S U B R O U T I N E =======================================
|
755
|
+
__text:0002B113
|
756
|
+
__text:0002B113 ; Attributes: bp-based frame
|
757
|
+
__text:0002B113
|
758
|
+
__text:0002B113 _CompressDBRec proc near ; CODE XREF: _DBRecordWrite+BEp
|
759
|
+
__text:0002B113
|
760
|
+
__text:0002B113 var_60 = dword ptr -60h
|
761
|
+
__text:0002B113 var_5C = byte ptr -5Ch
|
762
|
+
__text:0002B113 var_50 = dword ptr -50h
|
763
|
+
__text:0002B113 var_49 = byte ptr -49h
|
764
|
+
__text:0002B113 var_44 = dword ptr -44h
|
765
|
+
__text:0002B113 var_38 = dword ptr -38h
|
766
|
+
__text:0002B113 var_2B = byte ptr -2Bh
|
767
|
+
__text:0002B113 var_28 = dword ptr -28h
|
768
|
+
__text:0002B113 var_24 = byte ptr -24h
|
769
|
+
__text:0002B113 var_20 = dword ptr -20h
|
770
|
+
__text:0002B113 var_1C = dword ptr -1Ch
|
771
|
+
__text:0002B113 var_16 = word ptr -16h
|
772
|
+
__text:0002B113 var_14 = dword ptr -14h
|
773
|
+
__text:0002B113 var_10 = dword ptr -10h
|
774
|
+
__text:0002B113 var_C = word ptr -0Ch
|
775
|
+
__text:0002B113 var_A = word ptr -0Ah
|
776
|
+
__text:0002B113 arg_0 = dword ptr 8
|
777
|
+
__text:0002B113 arg_4 = dword ptr 0Ch
|
778
|
+
__text:0002B113 arg_8 = dword ptr 10h
|
779
|
+
__text:0002B113 arg_C = dword ptr 14h
|
780
|
+
__text:0002B113
|
781
|
+
__text:0002B113 push ebp
|
782
|
+
__text:0002B114 mov ebp, esp
|
783
|
+
__text:0002B116 push edi
|
784
|
+
__text:0002B117 sub esp, 74h
|
785
|
+
__text:0002B11A mov eax, [ebp+arg_C]
|
786
|
+
__text:0002B11D mov [ebp+var_5C], al
|
787
|
+
__text:0002B120 lea eax, [ebp+var_44]
|
788
|
+
__text:0002B123 mov edi, eax
|
789
|
+
__text:0002B125 cld
|
790
|
+
__text:0002B126 mov edx, 0
|
791
|
+
__text:0002B12B mov eax, 0Ah
|
792
|
+
__text:0002B130 mov ecx, eax
|
793
|
+
__text:0002B132 mov eax, edx
|
794
|
+
__text:0002B134 rep stosd
|
795
|
+
__text:0002B136 mov eax, [ebp+arg_4]
|
796
|
+
__text:0002B139 mov [ebp+var_44], eax
|
797
|
+
__text:0002B13C mov eax, [ebp+arg_8]
|
798
|
+
__text:0002B13F shl eax, 3
|
799
|
+
__text:0002B142 mov [ebp+var_38], eax
|
800
|
+
__text:0002B145 movzx edx, [ebp+var_5C]
|
801
|
+
__text:0002B149 mov eax, [ebp+arg_8]
|
802
|
+
__text:0002B14C movzx eax, ax
|
803
|
+
__text:0002B14F mov [esp+4], edx
|
804
|
+
__text:0002B153 mov [esp], eax
|
805
|
+
__text:0002B156 call _FunnyMask
|
806
|
+
__text:0002B15B mov [ebp+var_28], eax
|
807
|
+
__text:0002B15E movzx edx, [ebp+var_5C]
|
808
|
+
__text:0002B162 mov eax, [ebp+arg_8]
|
809
|
+
__text:0002B165 movzx eax, ax
|
810
|
+
__text:0002B168 mov [esp+4], edx
|
811
|
+
__text:0002B16C mov [esp], eax
|
812
|
+
__text:0002B16F call _CrypOfs
|
813
|
+
__text:0002B174 mov [ebp+var_24], al
|
814
|
+
__text:0002B177 call _CrypMask
|
815
|
+
__text:0002B17C mov [ebp+var_20], eax
|
816
|
+
__text:0002B17F cmp [ebp+arg_8], 8
|
817
|
+
__text:0002B183 ja loc_2B301
|
818
|
+
__text:0002B189 mov [ebp+var_2B], 9
|
819
|
+
__text:0002B18D jmp loc_2B301
|
820
|
+
__text:0002B192 ; ---------------------------------------------------------------------------
|
821
|
+
__text:0002B192
|
822
|
+
__text:0002B192 loc_2B192: ; CODE XREF: _CompressDBRec+200j
|
823
|
+
__text:0002B192 mov eax, [ebp+var_1C]
|
824
|
+
__text:0002B195 shr eax, 7
|
825
|
+
__text:0002B198 xor eax, 1
|
826
|
+
__text:0002B19B and eax, 1
|
827
|
+
__text:0002B19E test al, al
|
828
|
+
__text:0002B1A0 jz short loc_2B1D2
|
829
|
+
__text:0002B1A2 mov eax, [ebp+var_1C]
|
830
|
+
__text:0002B1A5 movzx eax, al
|
831
|
+
__text:0002B1A8 mov [esp+4], eax
|
832
|
+
__text:0002B1AC lea eax, [ebp+var_44]
|
833
|
+
__text:0002B1AF mov [esp], eax
|
834
|
+
__text:0002B1B2 call _CompressByte
|
835
|
+
__text:0002B1B7 mov [ebp+var_16], ax
|
836
|
+
__text:0002B1BB cmp [ebp+var_16], 0
|
837
|
+
__text:0002B1C0 jz loc_2B2FF
|
838
|
+
__text:0002B1C6 movsx eax, [ebp+var_16]
|
839
|
+
__text:0002B1CA mov [ebp+var_60], eax
|
840
|
+
__text:0002B1CD jmp loc_2B328
|
841
|
+
__text:0002B1D2 ; ---------------------------------------------------------------------------
|
842
|
+
__text:0002B1D2
|
843
|
+
__text:0002B1D2 loc_2B1D2: ; CODE XREF: _CompressDBRec+8Dj
|
844
|
+
__text:0002B1D2 mov eax, [ebp+var_1C]
|
845
|
+
__text:0002B1D5 mov [ebp+var_49], al
|
846
|
+
__text:0002B1D8 mov eax, [ebp+var_1C]
|
847
|
+
__text:0002B1DB movsx eax, al
|
848
|
+
__text:0002B1DE mov [esp], eax
|
849
|
+
__text:0002B1E1 call _MBCLenFromFirstByte
|
850
|
+
__text:0002B1E6 mov [ebp+var_10], eax
|
851
|
+
__text:0002B1E9 mov [ebp+var_14], 1
|
852
|
+
__text:0002B1F0 jmp short loc_2B230
|
853
|
+
__text:0002B1F2 ; ---------------------------------------------------------------------------
|
854
|
+
__text:0002B1F2
|
855
|
+
__text:0002B1F2 loc_2B1F2: ; CODE XREF: _CompressDBRec+123j
|
856
|
+
__text:0002B1F2 mov eax, [ebp+arg_0]
|
857
|
+
__text:0002B1F5 mov [esp], eax
|
858
|
+
__text:0002B1F8 call _TwxtGetByte
|
859
|
+
__text:0002B1FD mov [ebp+var_1C], eax
|
860
|
+
__text:0002B200 cmp [ebp+var_1C], 0FFFFFFFFh
|
861
|
+
__text:0002B204 jz short loc_2B215
|
862
|
+
__text:0002B206 mov eax, [ebp+var_1C]
|
863
|
+
__text:0002B209 and eax, 0C0h
|
864
|
+
__text:0002B20E cmp eax, 80h
|
865
|
+
__text:0002B213 jz short loc_2B221
|
866
|
+
__text:0002B215
|
867
|
+
__text:0002B215 loc_2B215: ; CODE XREF: _CompressDBRec+F1j
|
868
|
+
__text:0002B215 mov [ebp+var_60], 0FFFFDFFFh
|
869
|
+
__text:0002B21C jmp loc_2B328
|
870
|
+
__text:0002B221 ; ---------------------------------------------------------------------------
|
871
|
+
__text:0002B221
|
872
|
+
__text:0002B221 loc_2B221: ; CODE XREF: _CompressDBRec+100j
|
873
|
+
__text:0002B221 mov edx, [ebp+var_14]
|
874
|
+
__text:0002B224 mov eax, [ebp+var_1C]
|
875
|
+
__text:0002B227 mov [ebp+edx+var_49], al
|
876
|
+
__text:0002B22B lea eax, [ebp+var_14]
|
877
|
+
__text:0002B22E inc dword ptr [eax]
|
878
|
+
__text:0002B230
|
879
|
+
__text:0002B230 loc_2B230: ; CODE XREF: _CompressDBRec+DDj
|
880
|
+
__text:0002B230 mov eax, [ebp+var_14]
|
881
|
+
__text:0002B233 cmp eax, [ebp+var_10]
|
882
|
+
__text:0002B236 jb short loc_2B1F2
|
883
|
+
__text:0002B238 mov eax, [ebp+var_10]
|
884
|
+
__text:0002B23B mov [ebp+eax+var_49], 0
|
885
|
+
__text:0002B240 lea eax, [ebp+var_50]
|
886
|
+
__text:0002B243 mov [esp+4], eax
|
887
|
+
__text:0002B247 lea eax, [ebp+var_49]
|
888
|
+
__text:0002B24A mov [esp], eax
|
889
|
+
__text:0002B24D call _ZiNumberLen
|
890
|
+
__text:0002B252 cmp eax, 0FFFEh
|
891
|
+
__text:0002B257 jz short loc_2B261
|
892
|
+
__text:0002B259 mov eax, [ebp+var_50]
|
893
|
+
__text:0002B25C cmp eax, [ebp+var_10]
|
894
|
+
__text:0002B25F jz short loc_2B26D
|
895
|
+
__text:0002B261
|
896
|
+
__text:0002B261 loc_2B261: ; CODE XREF: _CompressDBRec+144j
|
897
|
+
__text:0002B261 mov [ebp+var_60], 0FFFFDFFFh
|
898
|
+
__text:0002B268 jmp loc_2B328
|
899
|
+
__text:0002B26D ; ---------------------------------------------------------------------------
|
900
|
+
__text:0002B26D
|
901
|
+
__text:0002B26D loc_2B26D: ; CODE XREF: _CompressDBRec+14Cj
|
902
|
+
__text:0002B26D movzx eax, [ebp+var_49]
|
903
|
+
__text:0002B271 movzx eax, al
|
904
|
+
__text:0002B274 mov [esp+4], eax
|
905
|
+
__text:0002B278 lea eax, [ebp+var_44]
|
906
|
+
__text:0002B27B mov [esp], eax
|
907
|
+
__text:0002B27E call _CompressByte
|
908
|
+
__text:0002B283 mov [ebp+var_C], ax
|
909
|
+
__text:0002B287 cmp [ebp+var_C], 0
|
910
|
+
__text:0002B28C jz short loc_2B29A
|
911
|
+
__text:0002B28E movsx eax, [ebp+var_C]
|
912
|
+
__text:0002B292 mov [ebp+var_60], eax
|
913
|
+
__text:0002B295 jmp loc_2B328
|
914
|
+
__text:0002B29A ; ---------------------------------------------------------------------------
|
915
|
+
__text:0002B29A
|
916
|
+
__text:0002B29A loc_2B29A: ; CODE XREF: _CompressDBRec+179j
|
917
|
+
__text:0002B29A mov [ebp+var_14], 1
|
918
|
+
__text:0002B2A1 jmp short loc_2B2F7
|
919
|
+
__text:0002B2A3 ; ---------------------------------------------------------------------------
|
920
|
+
__text:0002B2A3
|
921
|
+
__text:0002B2A3 loc_2B2A3: ; CODE XREF: _CompressDBRec+1EAj
|
922
|
+
__text:0002B2A3 mov [ebp+var_A], 20h
|
923
|
+
__text:0002B2A9
|
924
|
+
__text:0002B2A9 loc_2B2A9: ; CODE XREF: _CompressDBRec+1DDj
|
925
|
+
__text:0002B2A9 mov eax, [ebp+var_14]
|
926
|
+
__text:0002B2AC movzx eax, [ebp+eax+var_49]
|
927
|
+
__text:0002B2B1 movsx edx, al
|
928
|
+
__text:0002B2B4 movsx eax, [ebp+var_A]
|
929
|
+
__text:0002B2B8 and eax, edx
|
930
|
+
__text:0002B2BA test eax, eax
|
931
|
+
__text:0002B2BC setnz al
|
932
|
+
__text:0002B2BF movzx eax, al
|
933
|
+
__text:0002B2C2 mov [esp+4], eax
|
934
|
+
__text:0002B2C6 lea eax, [ebp+var_44]
|
935
|
+
__text:0002B2C9 mov [esp], eax
|
936
|
+
__text:0002B2CC call _PutBit
|
937
|
+
__text:0002B2D1 mov [ebp+var_C], ax
|
938
|
+
__text:0002B2D5 cmp [ebp+var_C], 0
|
939
|
+
__text:0002B2DA jz short loc_2B2E5
|
940
|
+
__text:0002B2DC movsx eax, [ebp+var_C]
|
941
|
+
__text:0002B2E0 mov [ebp+var_60], eax
|
942
|
+
__text:0002B2E3 jmp short loc_2B328
|
943
|
+
__text:0002B2E5 ; ---------------------------------------------------------------------------
|
944
|
+
__text:0002B2E5
|
945
|
+
__text:0002B2E5 loc_2B2E5: ; CODE XREF: _CompressDBRec+1C7j
|
946
|
+
__text:0002B2E5 lea eax, [ebp+var_A]
|
947
|
+
__text:0002B2E8 sar word ptr [eax], 1
|
948
|
+
__text:0002B2EB cmp [ebp+var_A], 0
|
949
|
+
__text:0002B2F0 jnz short loc_2B2A9
|
950
|
+
__text:0002B2F2 lea eax, [ebp+var_14]
|
951
|
+
__text:0002B2F5 inc dword ptr [eax]
|
952
|
+
__text:0002B2F7
|
953
|
+
__text:0002B2F7 loc_2B2F7: ; CODE XREF: _CompressDBRec+18Ej
|
954
|
+
__text:0002B2F7 mov eax, [ebp+var_14]
|
955
|
+
__text:0002B2FA cmp eax, [ebp+var_10]
|
956
|
+
__text:0002B2FD jb short loc_2B2A3
|
957
|
+
__text:0002B2FF
|
958
|
+
__text:0002B2FF loc_2B2FF: ; CODE XREF: _CompressDBRec+ADj
|
959
|
+
__text:0002B2FF jmp short $+2
|
960
|
+
__text:0002B301 ; ---------------------------------------------------------------------------
|
961
|
+
__text:0002B301
|
962
|
+
__text:0002B301 loc_2B301: ; CODE XREF: _CompressDBRec+70j
|
963
|
+
__text:0002B301 ; _CompressDBRec+7Aj ...
|
964
|
+
__text:0002B301 mov eax, [ebp+arg_0]
|
965
|
+
__text:0002B304 mov [esp], eax
|
966
|
+
__text:0002B307 call _TwxtGetByte
|
967
|
+
__text:0002B30C mov [ebp+var_1C], eax
|
968
|
+
__text:0002B30F cmp [ebp+var_1C], 0FFFFFFFFh
|
969
|
+
__text:0002B313 jnz loc_2B192
|
970
|
+
__text:0002B319 lea eax, [ebp+var_44]
|
971
|
+
__text:0002B31C mov [esp], eax
|
972
|
+
__text:0002B31F call _FlushBitStream
|
973
|
+
__text:0002B324 cwde
|
974
|
+
__text:0002B325 mov [ebp+var_60], eax
|
975
|
+
__text:0002B328
|
976
|
+
__text:0002B328 loc_2B328: ; CODE XREF: _CompressDBRec+BAj
|
977
|
+
__text:0002B328 ; _CompressDBRec+109j ...
|
978
|
+
__text:0002B328 mov eax, [ebp+var_60]
|
979
|
+
__text:0002B32B add esp, 74h
|
980
|
+
__text:0002B32E pop edi
|
981
|
+
__text:0002B32F leave
|
982
|
+
__text:0002B330 retn
|
983
|
+
__text:0002B330 _CompressDBRec endp
|
984
|
+
|
985
|
+
__text:0002B4A6 ; =============== S U B R O U T I N E =======================================
|
986
|
+
__text:0002B4A6
|
987
|
+
__text:0002B4A6 ; Attributes: bp-based frame
|
988
|
+
__text:0002B4A6
|
989
|
+
__text:0002B4A6 _GetBitX proc near ; CODE XREF: _DecompressByte+20p
|
990
|
+
__text:0002B4A6 ; _DecompressSixBits+1Ep ...
|
991
|
+
__text:0002B4A6
|
992
|
+
__text:0002B4A6 returnValue = dword ptr -1Ch
|
993
|
+
__text:0002B4A6 fChar = dword ptr -0Ch
|
994
|
+
__text:0002B4A6 pStruct = dword ptr 8
|
995
|
+
__text:0002B4A6
|
996
|
+
__text:0002B4A6 push ebp
|
997
|
+
__text:0002B4A7 mov ebp, esp
|
998
|
+
__text:0002B4A9 push ebx
|
999
|
+
__text:0002B4AA sub esp, 34h
|
1000
|
+
__text:0002B4AD mov eax, [ebp+pStruct]
|
1001
|
+
__text:0002B4B0 mov edx, [eax+4]
|
1002
|
+
__text:0002B4B3 mov eax, [ebp+pStruct]
|
1003
|
+
__text:0002B4B6 mov eax, [eax+0Ch]
|
1004
|
+
__text:0002B4B9 cmp edx, eax
|
1005
|
+
__text:0002B4BB jl short loc_2B4C9
|
1006
|
+
__text:0002B4BD mov [ebp+returnValue], 0FFFFFFFEh
|
1007
|
+
__text:0002B4C4 jmp loc_2B54E
|
1008
|
+
__text:0002B4C9 ; ---------------------------------------------------------------------------
|
1009
|
+
__text:0002B4C9
|
1010
|
+
__text:0002B4C9 loc_2B4C9: ; CODE XREF: _GetBitX+15j
|
1011
|
+
__text:0002B4C9 mov eax, [ebp+pStruct]
|
1012
|
+
__text:0002B4CC mov [esp], eax
|
1013
|
+
__text:0002B4CF call _MatrixFGetC
|
1014
|
+
__text:0002B4D4 mov [ebp+fChar], eax
|
1015
|
+
__text:0002B4D7 cmp [ebp+fChar], 0FFFFFFFFh
|
1016
|
+
__text:0002B4DB jnz short loc_2B4E6
|
1017
|
+
__text:0002B4DD mov [ebp+returnValue], 0FFFFFFFFh
|
1018
|
+
__text:0002B4E4 jmp short loc_2B54E
|
1019
|
+
__text:0002B4E6 ; ---------------------------------------------------------------------------
|
1020
|
+
__text:0002B4E6
|
1021
|
+
__text:0002B4E6 loc_2B4E6: ; CODE XREF: _GetBitX+35j
|
1022
|
+
__text:0002B4E6 mov eax, [ebp+pStruct]
|
1023
|
+
__text:0002B4E9 mov edx, [eax+24h]
|
1024
|
+
__text:0002B4EC mov eax, [ebp+pStruct]
|
1025
|
+
__text:0002B4EF movzx ecx, byte ptr [eax+20h]
|
1026
|
+
__text:0002B4F3 movzx eax, cl
|
1027
|
+
__text:0002B4F6 and eax, 3Fh
|
1028
|
+
__text:0002B4F9 lea eax, [edx+eax]
|
1029
|
+
__text:0002B4FC movzx eax, byte ptr [eax]
|
1030
|
+
__text:0002B4FF mov edx, eax
|
1031
|
+
__text:0002B501 mov eax, [ebp+fChar]
|
1032
|
+
__text:0002B504 xor eax, edx
|
1033
|
+
__text:0002B506 mov edx, eax
|
1034
|
+
__text:0002B508 mov eax, [ebp+pStruct]
|
1035
|
+
__text:0002B50B mov [eax+1Ah], dl
|
1036
|
+
__text:0002B50E lea edx, [ecx-1]
|
1037
|
+
__text:0002B511 mov eax, [ebp+pStruct]
|
1038
|
+
__text:0002B514 mov [eax+20h], dl
|
1039
|
+
__text:0002B517 mov eax, [ebp+pStruct]
|
1040
|
+
__text:0002B51A movzx ebx, byte ptr [eax+1Ah]
|
1041
|
+
__text:0002B51E mov eax, [ebp+pStruct]
|
1042
|
+
__text:0002B521 mov edx, [eax+1Ch]
|
1043
|
+
__text:0002B524 mov eax, [ebp+pStruct]
|
1044
|
+
__text:0002B527 mov ecx, [eax+4]
|
1045
|
+
__text:0002B52A mov eax, ecx
|
1046
|
+
__text:0002B52C movzx eax, ax
|
1047
|
+
__text:0002B52F and eax, 7
|
1048
|
+
__text:0002B532 lea eax, [edx+eax]
|
1049
|
+
__text:0002B535 movzx eax, byte ptr [eax]
|
1050
|
+
__text:0002B538 and eax, ebx
|
1051
|
+
__text:0002B53A test al, al
|
1052
|
+
__text:0002B53C setnz al
|
1053
|
+
__text:0002B53F movzx eax, al
|
1054
|
+
__text:0002B542 mov [ebp+returnValue], eax
|
1055
|
+
__text:0002B545 lea edx, [ecx+1]
|
1056
|
+
__text:0002B548 mov eax, [ebp+pStruct]
|
1057
|
+
__text:0002B54B mov [eax+4], edx
|
1058
|
+
__text:0002B54E
|
1059
|
+
__text:0002B54E loc_2B54E: ; CODE XREF: _GetBitX+1Ej
|
1060
|
+
__text:0002B54E ; _GetBitX+3Ej
|
1061
|
+
__text:0002B54E mov eax, [ebp+returnValue]
|
1062
|
+
__text:0002B551 add esp, 34h
|
1063
|
+
__text:0002B554 pop ebx
|
1064
|
+
__text:0002B555 leave
|
1065
|
+
__text:0002B556 retn
|
1066
|
+
__text:0002B556 _GetBitX endp
|
1067
|
+
|
1068
|
+
__text:0002B72E ; =============== S U B R O U T I N E =======================================
|
1069
|
+
__text:0002B72E
|
1070
|
+
__text:0002B72E ; Attributes: bp-based frame
|
1071
|
+
__text:0002B72E
|
1072
|
+
__text:0002B72E _MatrixFGetC proc near ; CODE XREF: _GetBitX+29p
|
1073
|
+
__text:0002B72E
|
1074
|
+
__text:0002B72E returnValue = dword ptr -1Ch
|
1075
|
+
__text:0002B72E buffer = byte ptr -11h
|
1076
|
+
__text:0002B72E arg_0 = dword ptr 8
|
1077
|
+
__text:0002B72E
|
1078
|
+
__text:0002B72E push ebp
|
1079
|
+
__text:0002B72F mov ebp, esp
|
1080
|
+
__text:0002B731 sub esp, 38h
|
1081
|
+
__text:0002B734
|
1082
|
+
__text:0002B734 loc_2B734: ; DATA XREF: _FiveIndex+1F8o
|
1083
|
+
__text:0002B734 ; _KXRadicalFromZin+EEo ...
|
1084
|
+
__text:0002B734 mov eax, [ebp+arg_0]
|
1085
|
+
__text:0002B737 movzx eax, byte ptr [eax+19h]
|
1086
|
+
__text:0002B73B cmp al, 9
|
1087
|
+
__text:0002B73D jnz short loc_2B751
|
1088
|
+
__text:0002B73F
|
1089
|
+
__text:0002B73F loc_2B73F: ; DATA XREF: _KXRadicalFromZin:loc_9EE60o
|
1090
|
+
__text:0002B73F ; _AppendUnihanBlockVersion:loc_A2097o ...
|
1091
|
+
__text:0002B73F mov eax, [ebp+arg_0]
|
1092
|
+
__text:0002B742 mov eax, [eax]
|
1093
|
+
__text:0002B744 mov [esp], eax ; FILE *
|
1094
|
+
__text:0002B747 call _getc
|
1095
|
+
__text:0002B74C mov [ebp+returnValue], eax
|
1096
|
+
__text:0002B74F jmp short loc_2B7CD
|
1097
|
+
__text:0002B751 ; ---------------------------------------------------------------------------
|
1098
|
+
__text:0002B751
|
1099
|
+
__text:0002B751 loc_2B751: ; CODE XREF: _MatrixFGetC+Fj
|
1100
|
+
__text:0002B751 mov eax, [ebp+arg_0]
|
1101
|
+
__text:0002B754 movzx eax, byte ptr [eax+19h]
|
1102
|
+
__text:0002B758 test al, al
|
1103
|
+
__text:0002B75A jnz short loc_2B7AC
|
1104
|
+
__text:0002B75C mov eax, [ebp+arg_0]
|
1105
|
+
__text:0002B75F mov eax, [eax]
|
1106
|
+
__text:0002B761 mov [esp+0Ch], eax ; FILE *
|
1107
|
+
__text:0002B765 mov dword ptr [esp+8], 9 ; size_t
|
1108
|
+
__text:0002B76D mov dword ptr [esp+4], 1 ; size_t
|
1109
|
+
__text:0002B775 lea eax, [ebp+buffer]
|
1110
|
+
__text:0002B778 mov [esp], eax ; void *
|
1111
|
+
__text:0002B77B call _fread
|
1112
|
+
__text:0002B780 cmp eax, 9
|
1113
|
+
__text:0002B783 jz short loc_2B78E
|
1114
|
+
__text:0002B785 mov [ebp+returnValue], 0FFFFFFFFh
|
1115
|
+
__text:0002B78C jmp short loc_2B7CD
|
1116
|
+
__text:0002B78E ; ---------------------------------------------------------------------------
|
1117
|
+
__text:0002B78E
|
1118
|
+
__text:0002B78E loc_2B78E: ; CODE XREF: _MatrixFGetC+55j
|
1119
|
+
__text:0002B78E mov eax, [ebp+arg_0]
|
1120
|
+
__text:0002B791 add eax, 10h
|
1121
|
+
__text:0002B794 lea edx, [ebp+buffer]
|
1122
|
+
__text:0002B797 mov [esp+8], edx
|
1123
|
+
__text:0002B79B mov edx, offset _inverseMatrix
|
1124
|
+
__text:0002B7A0 mov [esp+4], edx
|
1125
|
+
__text:0002B7A4 mov [esp], eax
|
1126
|
+
__text:0002B7A7 call _MatrixMultiply
|
1127
|
+
__text:0002B7AC
|
1128
|
+
__text:0002B7AC loc_2B7AC: ; CODE XREF: _MatrixFGetC+2Cj
|
1129
|
+
__text:0002B7AC mov eax, [ebp+arg_0]
|
1130
|
+
__text:0002B7AF movzx ecx, byte ptr [eax+19h]
|
1131
|
+
__text:0002B7B3 movzx edx, cl
|
1132
|
+
__text:0002B7B6 mov eax, [ebp+arg_0]
|
1133
|
+
__text:0002B7B9 movzx eax, byte ptr [edx+eax+10h]
|
1134
|
+
__text:0002B7BE movzx eax, al
|
1135
|
+
__text:0002B7C1 mov [ebp+returnValue], eax
|
1136
|
+
__text:0002B7C4 lea edx, [ecx+1]
|
1137
|
+
__text:0002B7C7 mov eax, [ebp+arg_0]
|
1138
|
+
__text:0002B7CA mov [eax+19h], dl
|
1139
|
+
__text:0002B7CD
|
1140
|
+
__text:0002B7CD loc_2B7CD: ; CODE XREF: _MatrixFGetC+21j
|
1141
|
+
__text:0002B7CD ; _MatrixFGetC+5Ej
|
1142
|
+
__text:0002B7CD mov eax, [ebp+returnValue]
|
1143
|
+
__text:0002B7D0 leave
|
1144
|
+
__text:0002B7D1 retn
|
1145
|
+
__text:0002B7D1 _MatrixFGetC endp
|
1146
|
+
|
1147
|
+
__text:0002B7D2 ; =============== S U B R O U T I N E =======================================
|
1148
|
+
__text:0002B7D2
|
1149
|
+
__text:0002B7D2 ; Attributes: bp-based frame
|
1150
|
+
__text:0002B7D2
|
1151
|
+
__text:0002B7D2 _MatrixMultiply proc near ; CODE XREF: _MatrixFPutC+92p
|
1152
|
+
__text:0002B7D2 ; _MatrixFGetC+79p
|
1153
|
+
__text:0002B7D2
|
1154
|
+
__text:0002B7D2 i = dword ptr -0Ch
|
1155
|
+
__text:0002B7D2 result = dword ptr 8
|
1156
|
+
__text:0002B7D2 matrix = dword ptr 0Ch
|
1157
|
+
__text:0002B7D2 vector = dword ptr 10h
|
1158
|
+
__text:0002B7D2
|
1159
|
+
__text:0002B7D2 push ebp
|
1160
|
+
__text:0002B7D3 mov ebp, esp
|
1161
|
+
__text:0002B7D5 push ebx
|
1162
|
+
__text:0002B7D6 sub esp, 14h
|
1163
|
+
__text:0002B7D9 mov [ebp+i], 9
|
1164
|
+
__text:0002B7E0 jmp loc_2B8C6
|
1165
|
+
__text:0002B7E5 ; ---------------------------------------------------------------------------
|
1166
|
+
__text:0002B7E5
|
1167
|
+
__text:0002B7E5 loc_2B7E5: ; CODE XREF: _MatrixMultiply+FDj
|
1168
|
+
__text:0002B7E5 mov eax, [ebp+matrix]
|
1169
|
+
__text:0002B7E8 movzx edx, byte ptr [eax]
|
1170
|
+
__text:0002B7EB mov eax, [ebp+vector]
|
1171
|
+
__text:0002B7EE movzx eax, byte ptr [eax]
|
1172
|
+
__text:0002B7F1 imul eax, edx
|
1173
|
+
__text:0002B7F4 mov ecx, eax
|
1174
|
+
__text:0002B7F6 mov eax, [ebp+matrix]
|
1175
|
+
__text:0002B7F9 inc eax
|
1176
|
+
__text:0002B7FA movzx edx, byte ptr [eax]
|
1177
|
+
__text:0002B7FD mov eax, [ebp+vector]
|
1178
|
+
__text:0002B800 inc eax
|
1179
|
+
__text:0002B801 movzx eax, byte ptr [eax]
|
1180
|
+
__text:0002B804 imul eax, edx
|
1181
|
+
__text:0002B807 lea ebx, [ecx+eax]
|
1182
|
+
__text:0002B80A mov eax, [ebp+matrix]
|
1183
|
+
__text:0002B80D add eax, 3
|
1184
|
+
__text:0002B810 movzx edx, byte ptr [eax]
|
1185
|
+
__text:0002B813 mov eax, [ebp+vector]
|
1186
|
+
__text:0002B816 add eax, 3
|
1187
|
+
__text:0002B819 movzx eax, byte ptr [eax]
|
1188
|
+
__text:0002B81C imul eax, edx ; DATA XREF: _FiveIndex+205o
|
1189
|
+
__text:0002B81F mov ecx, eax
|
1190
|
+
__text:0002B821 mov eax, [ebp+matrix]
|
1191
|
+
__text:0002B824 add eax, 2
|
1192
|
+
__text:0002B827 movzx edx, byte ptr [eax]
|
1193
|
+
__text:0002B82A mov eax, [ebp+vector]
|
1194
|
+
__text:0002B82D add eax, 2
|
1195
|
+
__text:0002B830 movzx eax, byte ptr [eax]
|
1196
|
+
__text:0002B833 imul eax, edx
|
1197
|
+
__text:0002B836 lea eax, [ecx+eax]
|
1198
|
+
__text:0002B839 add ebx, eax
|
1199
|
+
__text:0002B83B mov eax, [ebp+matrix]
|
1200
|
+
__text:0002B83E add eax, 5
|
1201
|
+
__text:0002B841 movzx edx, byte ptr [eax]
|
1202
|
+
__text:0002B844 mov eax, [ebp+vector]
|
1203
|
+
__text:0002B847 add eax, 5
|
1204
|
+
__text:0002B84A movzx eax, byte ptr [eax]
|
1205
|
+
__text:0002B84D imul eax, edx
|
1206
|
+
__text:0002B850 mov ecx, eax
|
1207
|
+
__text:0002B852 mov eax, [ebp+matrix]
|
1208
|
+
__text:0002B855 add eax, 4
|
1209
|
+
__text:0002B858 movzx edx, byte ptr [eax]
|
1210
|
+
__text:0002B85B mov eax, [ebp+vector]
|
1211
|
+
__text:0002B85E add eax, 4
|
1212
|
+
__text:0002B861 movzx eax, byte ptr [eax]
|
1213
|
+
__text:0002B864 imul eax, edx
|
1214
|
+
__text:0002B867 lea eax, [ecx+eax]
|
1215
|
+
__text:0002B86A add ebx, eax
|
1216
|
+
__text:0002B86C mov eax, [ebp+matrix]
|
1217
|
+
__text:0002B86F add eax, 7
|
1218
|
+
__text:0002B872 movzx edx, byte ptr [eax]
|
1219
|
+
__text:0002B875 mov eax, [ebp+vector]
|
1220
|
+
__text:0002B878 add eax, 7
|
1221
|
+
__text:0002B87B movzx eax, byte ptr [eax]
|
1222
|
+
__text:0002B87E imul eax, edx
|
1223
|
+
__text:0002B881 mov ecx, eax
|
1224
|
+
__text:0002B883 mov eax, [ebp+matrix]
|
1225
|
+
__text:0002B886 add eax, 6
|
1226
|
+
__text:0002B889 movzx edx, byte ptr [eax]
|
1227
|
+
__text:0002B88C mov eax, [ebp+vector]
|
1228
|
+
__text:0002B88F add eax, 6
|
1229
|
+
__text:0002B892 movzx eax, byte ptr [eax]
|
1230
|
+
__text:0002B895 imul eax, edx
|
1231
|
+
__text:0002B898 lea eax, [ecx+eax]
|
1232
|
+
__text:0002B89B lea ecx, [ebx+eax]
|
1233
|
+
__text:0002B89E mov eax, [ebp+matrix]
|
1234
|
+
__text:0002B8A1 add eax, 8
|
1235
|
+
__text:0002B8A4 movzx edx, byte ptr [eax]
|
1236
|
+
__text:0002B8A7 mov eax, [ebp+vector]
|
1237
|
+
__text:0002B8AA add eax, 8
|
1238
|
+
__text:0002B8AD movzx eax, byte ptr [eax]
|
1239
|
+
__text:0002B8B0 imul eax, edx
|
1240
|
+
__text:0002B8B3 lea eax, [ecx+eax]
|
1241
|
+
__text:0002B8B6 mov edx, eax
|
1242
|
+
__text:0002B8B8 mov eax, [ebp+result]
|
1243
|
+
__text:0002B8BB mov [eax], dl
|
1244
|
+
__text:0002B8BD inc [ebp+result]
|
1245
|
+
__text:0002B8C0 lea eax, [ebp+matrix]
|
1246
|
+
__text:0002B8C3 add dword ptr [eax], 9
|
1247
|
+
__text:0002B8C6
|
1248
|
+
__text:0002B8C6 loc_2B8C6: ; CODE XREF: _MatrixMultiply+Ej
|
1249
|
+
__text:0002B8C6 lea eax, [ebp+i]
|
1250
|
+
__text:0002B8C9 dec dword ptr [eax]
|
1251
|
+
__text:0002B8CB cmp [ebp+i], 0FFFFFFFFh
|
1252
|
+
__text:0002B8CF jnz loc_2B7E5
|
1253
|
+
__text:0002B8D5 add esp, 14h
|
1254
|
+
__text:0002B8D8 pop ebx
|
1255
|
+
__text:0002B8D9 leave
|
1256
|
+
__text:0002B8DA retn
|
1257
|
+
__text:0002B8DA _MatrixMultiply endp
|
1258
|
+
|
1259
|
+
__text:000A218D ; =============== S U B R O U T I N E =======================================
|
1260
|
+
__text:000A218D
|
1261
|
+
__text:000A218D ; Attributes: bp-based frame
|
1262
|
+
__text:000A218D
|
1263
|
+
__text:000A218D _ZiNumberLen proc near ; CODE XREF: _ConstructPinyinFromChars+2Dp
|
1264
|
+
__text:000A218D ; _ConvertHanziToOtherHomophone+62p ...
|
1265
|
+
__text:000A218D
|
1266
|
+
__text:000A218D returnValue = dword ptr -0Ch
|
1267
|
+
__text:000A218D decompressedChar= dword ptr 8
|
1268
|
+
__text:000A218D lenBuffer = dword ptr 0Ch
|
1269
|
+
__text:000A218D
|
1270
|
+
__text:000A218D push ebp
|
1271
|
+
__text:000A218E mov ebp, esp
|
1272
|
+
__text:000A2190 sub esp, 18h
|
1273
|
+
__text:000A2193 mov eax, [ebp+decompressedChar]
|
1274
|
+
__text:000A2196 movzx eax, byte ptr [eax]
|
1275
|
+
__text:000A2199 test al, al
|
1276
|
+
__text:000A219B js short loc_A21B7
|
1277
|
+
__text:000A219D mov eax, [ebp+lenBuffer]
|
1278
|
+
__text:000A21A0 mov dword ptr [eax], 1
|
1279
|
+
__text:000A21A6 mov eax, [ebp+decompressedChar]
|
1280
|
+
__text:000A21A9 movzx eax, byte ptr [eax]
|
1281
|
+
__text:000A21AC movzx eax, al
|
1282
|
+
__text:000A21AF mov [ebp+returnValue], eax
|
1283
|
+
__text:000A21B2 jmp loc_A23CB
|
1284
|
+
__text:000A21B7 ; ---------------------------------------------------------------------------
|
1285
|
+
__text:000A21B7
|
1286
|
+
__text:000A21B7 loc_A21B7: ; CODE XREF: _ZiNumberLen+Ej
|
1287
|
+
__text:000A21B7 mov eax, [ebp+decompressedChar]
|
1288
|
+
__text:000A21BA movzx eax, byte ptr [eax]
|
1289
|
+
__text:000A21BD cmp al, 0DFh
|
1290
|
+
__text:000A21BF ja short loc_A221C
|
1291
|
+
__text:000A21C1 mov eax, [ebp+decompressedChar]
|
1292
|
+
__text:000A21C4 movzx eax, byte ptr [eax]
|
1293
|
+
__text:000A21C7 cmp al, 0C1h
|
1294
|
+
__text:000A21C9 jbe loc_A23BB
|
1295
|
+
__text:000A21CF mov eax, [ebp+decompressedChar]
|
1296
|
+
__text:000A21D2 inc eax
|
1297
|
+
__text:000A21D3 movzx eax, byte ptr [eax]
|
1298
|
+
__text:000A21D6 movzx eax, al
|
1299
|
+
__text:000A21D9 and eax, 0C0h
|
1300
|
+
__text:000A21DE cmp eax, 80h
|
1301
|
+
__text:000A21E3 jnz loc_A23BB
|
1302
|
+
__text:000A21E9 mov eax, [ebp+lenBuffer]
|
1303
|
+
__text:000A21EC mov dword ptr [eax], 2
|
1304
|
+
__text:000A21F2 mov eax, [ebp+decompressedChar]
|
1305
|
+
__text:000A21F5 movzx eax, byte ptr [eax]
|
1306
|
+
__text:000A21F8 movzx eax, al
|
1307
|
+
__text:000A21FB and eax, 1Fh
|
1308
|
+
__text:000A21FE mov edx, eax
|
1309
|
+
__text:000A2200 shl edx, 6
|
1310
|
+
__text:000A2203 mov eax, [ebp+decompressedChar]
|
1311
|
+
__text:000A2206 inc eax
|
1312
|
+
__text:000A2207 movzx eax, byte ptr [eax]
|
1313
|
+
__text:000A220A movzx eax, al
|
1314
|
+
__text:000A220D and eax, 3Fh
|
1315
|
+
__text:000A2210 mov ecx, edx
|
1316
|
+
__text:000A2212 or ecx, eax
|
1317
|
+
__text:000A2214 mov [ebp+returnValue], ecx
|
1318
|
+
__text:000A2217 jmp loc_A23CB
|
1319
|
+
__text:000A221C ; ---------------------------------------------------------------------------
|
1320
|
+
__text:000A221C
|
1321
|
+
__text:000A221C loc_A221C: ; CODE XREF: _ZiNumberLen+32j
|
1322
|
+
__text:000A221C mov eax, [ebp+decompressedChar]
|
1323
|
+
__text:000A221F movzx eax, byte ptr [eax]
|
1324
|
+
__text:000A2222 cmp al, 0EFh
|
1325
|
+
__text:000A2224 ja loc_A22D9
|
1326
|
+
__text:000A222A mov eax, [ebp+decompressedChar]
|
1327
|
+
__text:000A222D movzx eax, byte ptr [eax]
|
1328
|
+
__text:000A2230 cmp al, 0E0h
|
1329
|
+
__text:000A2232 jnz short loc_A2243
|
1330
|
+
__text:000A2234 mov eax, [ebp+decompressedChar]
|
1331
|
+
__text:000A2237 inc eax
|
1332
|
+
__text:000A2238 movzx eax, byte ptr [eax]
|
1333
|
+
__text:000A223B cmp al, 9Fh
|
1334
|
+
__text:000A223D jbe loc_A23BB
|
1335
|
+
__text:000A2243
|
1336
|
+
__text:000A2243 loc_A2243: ; CODE XREF: _ZiNumberLen+A5j
|
1337
|
+
__text:000A2243 mov eax, [ebp+decompressedChar]
|
1338
|
+
__text:000A2246 movzx eax, byte ptr [eax]
|
1339
|
+
__text:000A2249 cmp al, 0EDh
|
1340
|
+
__text:000A224B jnz short loc_A225C
|
1341
|
+
__text:000A224D mov eax, [ebp+decompressedChar]
|
1342
|
+
__text:000A2250 inc eax
|
1343
|
+
__text:000A2251 movzx eax, byte ptr [eax]
|
1344
|
+
__text:000A2254 cmp al, 9Fh
|
1345
|
+
__text:000A2256 ja loc_A23BB
|
1346
|
+
__text:000A225C
|
1347
|
+
__text:000A225C loc_A225C: ; CODE XREF: _ZiNumberLen+BEj
|
1348
|
+
__text:000A225C mov eax, [ebp+decompressedChar]
|
1349
|
+
__text:000A225F inc eax
|
1350
|
+
__text:000A2260 movzx eax, byte ptr [eax]
|
1351
|
+
__text:000A2263 movzx eax, al
|
1352
|
+
__text:000A2266 and eax, 0C0h
|
1353
|
+
__text:000A226B cmp eax, 80h
|
1354
|
+
__text:000A2270 jnz loc_A23BB
|
1355
|
+
__text:000A2276 mov eax, [ebp+decompressedChar]
|
1356
|
+
__text:000A2279 add eax, 2
|
1357
|
+
__text:000A227C movzx eax, byte ptr [eax]
|
1358
|
+
__text:000A227F movzx eax, al
|
1359
|
+
__text:000A2282 and eax, 0C0h
|
1360
|
+
__text:000A2287 cmp eax, 80h
|
1361
|
+
__text:000A228C jnz loc_A23BB
|
1362
|
+
__text:000A2292 mov eax, [ebp+lenBuffer]
|
1363
|
+
__text:000A2295 mov dword ptr [eax], 3
|
1364
|
+
__text:000A229B mov eax, [ebp+decompressedChar]
|
1365
|
+
__text:000A229E movzx eax, byte ptr [eax]
|
1366
|
+
__text:000A22A1 movzx eax, al
|
1367
|
+
__text:000A22A4 and eax, 0Fh
|
1368
|
+
__text:000A22A7 mov edx, eax
|
1369
|
+
__text:000A22A9 shl edx, 0Ch
|
1370
|
+
__text:000A22AC mov eax, [ebp+decompressedChar]
|
1371
|
+
__text:000A22AF inc eax
|
1372
|
+
__text:000A22B0 movzx eax, byte ptr [eax]
|
1373
|
+
__text:000A22B3 movzx eax, al
|
1374
|
+
__text:000A22B6 and eax, 3Fh
|
1375
|
+
__text:000A22B9 shl eax, 6
|
1376
|
+
__text:000A22BC or edx, eax
|
1377
|
+
__text:000A22BE mov eax, [ebp+decompressedChar]
|
1378
|
+
__text:000A22C1 add eax, 2
|
1379
|
+
__text:000A22C4 movzx eax, byte ptr [eax]
|
1380
|
+
__text:000A22C7 movzx eax, al
|
1381
|
+
__text:000A22CA and eax, 3Fh
|
1382
|
+
__text:000A22CD mov ecx, edx
|
1383
|
+
__text:000A22CF or ecx, eax
|
1384
|
+
__text:000A22D1 mov [ebp+returnValue], ecx
|
1385
|
+
__text:000A22D4 jmp loc_A23CB
|
1386
|
+
__text:000A22D9 ; ---------------------------------------------------------------------------
|
1387
|
+
__text:000A22D9
|
1388
|
+
__text:000A22D9 loc_A22D9: ; CODE XREF: _ZiNumberLen+97j
|
1389
|
+
__text:000A22D9 mov eax, [ebp+decompressedChar]
|
1390
|
+
__text:000A22DC movzx eax, byte ptr [eax]
|
1391
|
+
__text:000A22DF cmp al, 0F4h
|
1392
|
+
__text:000A22E1 ja loc_A23BB
|
1393
|
+
__text:000A22E7 mov eax, [ebp+decompressedChar]
|
1394
|
+
__text:000A22EA movzx eax, byte ptr [eax]
|
1395
|
+
__text:000A22ED cmp al, 0F0h
|
1396
|
+
__text:000A22EF jnz short loc_A2300
|
1397
|
+
__text:000A22F1 mov eax, [ebp+decompressedChar]
|
1398
|
+
__text:000A22F4 inc eax
|
1399
|
+
__text:000A22F5 movzx eax, byte ptr [eax]
|
1400
|
+
__text:000A22F8 cmp al, 8Fh
|
1401
|
+
__text:000A22FA jbe loc_A23BB
|
1402
|
+
__text:000A2300
|
1403
|
+
__text:000A2300 loc_A2300: ; CODE XREF: _ZiNumberLen+162j
|
1404
|
+
__text:000A2300 mov eax, [ebp+decompressedChar]
|
1405
|
+
__text:000A2303 movzx eax, byte ptr [eax]
|
1406
|
+
__text:000A2306 cmp al, 0F4h
|
1407
|
+
__text:000A2308 jnz short loc_A2319
|
1408
|
+
__text:000A230A mov eax, [ebp+decompressedChar]
|
1409
|
+
__text:000A230D inc eax
|
1410
|
+
__text:000A230E movzx eax, byte ptr [eax]
|
1411
|
+
__text:000A2311 cmp al, 8Fh
|
1412
|
+
__text:000A2313 ja loc_A23BB
|
1413
|
+
__text:000A2319
|
1414
|
+
__text:000A2319 loc_A2319: ; CODE XREF: _ZiNumberLen+17Bj
|
1415
|
+
__text:000A2319 mov eax, [ebp+decompressedChar]
|
1416
|
+
__text:000A231C inc eax
|
1417
|
+
__text:000A231D movzx eax, byte ptr [eax]
|
1418
|
+
__text:000A2320 movzx eax, al
|
1419
|
+
__text:000A2323 and eax, 0C0h
|
1420
|
+
__text:000A2328 cmp eax, 80h
|
1421
|
+
__text:000A232D jnz loc_A23BB
|
1422
|
+
__text:000A2333 mov eax, [ebp+decompressedChar]
|
1423
|
+
__text:000A2336 add eax, 2
|
1424
|
+
__text:000A2339 movzx eax, byte ptr [eax]
|
1425
|
+
__text:000A233C movzx eax, al
|
1426
|
+
__text:000A233F and eax, 0C0h
|
1427
|
+
__text:000A2344 cmp eax, 80h
|
1428
|
+
__text:000A2349 jnz short loc_A23BB
|
1429
|
+
__text:000A234B mov eax, [ebp+decompressedChar]
|
1430
|
+
__text:000A234E add eax, 3
|
1431
|
+
__text:000A2351 movzx eax, byte ptr [eax]
|
1432
|
+
__text:000A2354 movzx eax, al
|
1433
|
+
__text:000A2357 and eax, 0C0h
|
1434
|
+
__text:000A235C cmp eax, 80h
|
1435
|
+
__text:000A2361 jnz short loc_A23BB
|
1436
|
+
__text:000A2363 mov eax, [ebp+lenBuffer]
|
1437
|
+
__text:000A2366 mov dword ptr [eax], 4
|
1438
|
+
__text:000A236C mov eax, [ebp+decompressedChar]
|
1439
|
+
__text:000A236F movzx eax, byte ptr [eax]
|
1440
|
+
__text:000A2372 movzx eax, al
|
1441
|
+
__text:000A2375 and eax, 7
|
1442
|
+
__text:000A2378 mov edx, eax
|
1443
|
+
__text:000A237A shl edx, 12h
|
1444
|
+
__text:000A237D mov eax, [ebp+decompressedChar]
|
1445
|
+
__text:000A2380 inc eax
|
1446
|
+
__text:000A2381 movzx eax, byte ptr [eax]
|
1447
|
+
__text:000A2384 movzx eax, al
|
1448
|
+
__text:000A2387 and eax, 3Fh
|
1449
|
+
__text:000A238A shl eax, 0Ch
|
1450
|
+
__text:000A238D or edx, eax
|
1451
|
+
__text:000A238F mov eax, [ebp+decompressedChar]
|
1452
|
+
__text:000A2392 add eax, 2
|
1453
|
+
__text:000A2395 movzx eax, byte ptr [eax]
|
1454
|
+
__text:000A2398 movzx eax, al
|
1455
|
+
__text:000A239B and eax, 3Fh
|
1456
|
+
__text:000A239E shl eax, 6
|
1457
|
+
__text:000A23A1 or edx, eax
|
1458
|
+
__text:000A23A3 mov eax, [ebp+decompressedChar]
|
1459
|
+
__text:000A23A6 add eax, 3
|
1460
|
+
__text:000A23A9 movzx eax, byte ptr [eax]
|
1461
|
+
__text:000A23AC movzx eax, al
|
1462
|
+
__text:000A23AF and eax, 3Fh
|
1463
|
+
__text:000A23B2 mov ecx, edx
|
1464
|
+
__text:000A23B4 or ecx, eax
|
1465
|
+
__text:000A23B6 mov [ebp+returnValue], ecx
|
1466
|
+
__text:000A23B9 jmp short loc_A23CB
|
1467
|
+
__text:000A23BB ; ---------------------------------------------------------------------------
|
1468
|
+
__text:000A23BB
|
1469
|
+
__text:000A23BB loc_A23BB: ; CODE XREF: _ZiNumberLen+3Cj
|
1470
|
+
__text:000A23BB ; _ZiNumberLen+56j ...
|
1471
|
+
__text:000A23BB mov eax, [ebp+lenBuffer]
|
1472
|
+
__text:000A23BE mov dword ptr [eax], 1
|
1473
|
+
__text:000A23C4 mov [ebp+returnValue], 0FFFEh
|
1474
|
+
__text:000A23CB
|
1475
|
+
__text:000A23CB loc_A23CB: ; CODE XREF: _ZiNumberLen+25j
|
1476
|
+
__text:000A23CB ; _ZiNumberLen+8Aj ...
|
1477
|
+
__text:000A23CB mov eax, [ebp+returnValue]
|
1478
|
+
__text:000A23CE leave
|
1479
|
+
__text:000A23CF retn
|
1480
|
+
__text:000A23CF _ZiNumberLen endp
|
1481
|
+
|
1482
|
+
__text:0002A8C4 ; =============== S U B R O U T I N E =======================================
|
1483
|
+
__text:0002A8C4
|
1484
|
+
__text:0002A8C4 ; Attributes: bp-based frame
|
1485
|
+
__text:0002A8C4
|
1486
|
+
__text:0002A8C4 ; int __cdecl DBRecordReadIntoTextBuf(int buffer, FILE *fp, __int32 offset)
|
1487
|
+
__text:0002A8C4 _DBRecordReadIntoTextBuf proc near ; CODE XREF: _DBRecordRead+3Ep
|
1488
|
+
__text:0002A8C4 ; _DBRecordReadOneLine+4Ap
|
1489
|
+
__text:0002A8C4
|
1490
|
+
__text:0002A8C4 returnValue = dword ptr -1Ch
|
1491
|
+
__text:0002A8C4 recordLength = word ptr -16h
|
1492
|
+
__text:0002A8C4 recordTag = dword ptr -14h
|
1493
|
+
__text:0002A8C4 rawRecordByte = dword ptr -10h
|
1494
|
+
__text:0002A8C4 appendBufferStat= word ptr -0Ah
|
1495
|
+
__text:0002A8C4 buffer = dword ptr 8
|
1496
|
+
__text:0002A8C4 fp = dword ptr 0Ch
|
1497
|
+
__text:0002A8C4 offset = dword ptr 10h
|
1498
|
+
__text:0002A8C4
|
1499
|
+
__text:0002A8C4 push ebp
|
1500
|
+
__text:0002A8C5 mov ebp, esp
|
1501
|
+
__text:0002A8C7 sub esp, 38h
|
1502
|
+
__text:0002A8CA mov dword ptr [esp+8], 0 ; int
|
1503
|
+
__text:0002A8D2 mov eax, [ebp+offset]
|
1504
|
+
__text:0002A8D5 mov [esp+4], eax ; __int32
|
1505
|
+
__text:0002A8D9 mov eax, [ebp+fp]
|
1506
|
+
__text:0002A8DC mov [esp], eax ; FILE *
|
1507
|
+
__text:0002A8DF call _fseek
|
1508
|
+
__text:0002A8E4 test eax, eax
|
1509
|
+
__text:0002A8E6 jz short loc_2A8F4
|
1510
|
+
__text:0002A8E8 mov [ebp+returnValue], 0FFFFFFB0h
|
1511
|
+
__text:0002A8EF jmp loc_2A9F0
|
1512
|
+
__text:0002A8F4 ; ---------------------------------------------------------------------------
|
1513
|
+
__text:0002A8F4
|
1514
|
+
__text:0002A8F4 loc_2A8F4: ; CODE XREF: _DBRecordReadIntoTextBuf+22j
|
1515
|
+
__text:0002A8F4 lea eax, [ebp+recordLength]
|
1516
|
+
__text:0002A8F7 mov [esp+4], eax ; void *
|
1517
|
+
__text:0002A8FB mov eax, [ebp+fp]
|
1518
|
+
__text:0002A8FE mov [esp], eax ; FILE *
|
1519
|
+
__text:0002A901 call _ReadBigEndianShort
|
1520
|
+
__text:0002A906 test eax, eax
|
1521
|
+
__text:0002A908 jz short loc_2A914
|
1522
|
+
__text:0002A90A movzx eax, [ebp+recordLength]
|
1523
|
+
__text:0002A90E cmp ax, 7530h
|
1524
|
+
__text:0002A912 jbe short loc_2A920
|
1525
|
+
__text:0002A914
|
1526
|
+
__text:0002A914 loc_2A914: ; CODE XREF: _DBRecordReadIntoTextBuf+44j
|
1527
|
+
__text:0002A914 mov [ebp+returnValue], 0FFFFFFEDh
|
1528
|
+
__text:0002A91B jmp loc_2A9F0
|
1529
|
+
__text:0002A920 ; ---------------------------------------------------------------------------
|
1530
|
+
__text:0002A920
|
1531
|
+
__text:0002A920 loc_2A920: ; CODE XREF: _DBRecordReadIntoTextBuf+4Ej
|
1532
|
+
__text:0002A920 mov eax, [ebp+fp]
|
1533
|
+
__text:0002A923 mov [esp], eax ; FILE *
|
1534
|
+
__text:0002A926 call _getc
|
1535
|
+
__text:0002A92B mov [ebp+recordTag], eax
|
1536
|
+
__text:0002A92E cmp [ebp+recordTag], 0FFFFFFFFh
|
1537
|
+
__text:0002A932 jnz short loc_2A940
|
1538
|
+
__text:0002A934 mov [ebp+returnValue], 0FFFFFFEDh
|
1539
|
+
__text:0002A93B jmp loc_2A9F0
|
1540
|
+
__text:0002A940 ; ---------------------------------------------------------------------------
|
1541
|
+
__text:0002A940
|
1542
|
+
__text:0002A940 loc_2A940: ; CODE XREF: _DBRecordReadIntoTextBuf+6Ej
|
1543
|
+
__text:0002A940 movzx eax, [ebp+recordLength]
|
1544
|
+
__text:0002A944 dec eax
|
1545
|
+
__text:0002A945 mov [ebp+recordLength], ax
|
1546
|
+
__text:0002A949 mov eax, [ebp+recordTag]
|
1547
|
+
__text:0002A94C shr eax, 1
|
1548
|
+
__text:0002A94E and eax, 1
|
1549
|
+
__text:0002A951 test al, al
|
1550
|
+
__text:0002A953 jz short loc_2A982
|
1551
|
+
__text:0002A955 mov eax, [ebp+recordTag]
|
1552
|
+
__text:0002A958 movzx edx, al
|
1553
|
+
__text:0002A95B movzx eax, [ebp+recordLength]
|
1554
|
+
__text:0002A95F movzx eax, ax
|
1555
|
+
__text:0002A962 mov [esp+0Ch], edx
|
1556
|
+
__text:0002A966 mov [esp+8], eax
|
1557
|
+
__text:0002A96A mov eax, [ebp+fp]
|
1558
|
+
__text:0002A96D mov [esp+4], eax
|
1559
|
+
__text:0002A971 mov eax, [ebp+buffer]
|
1560
|
+
__text:0002A974 mov [esp], eax
|
1561
|
+
__text:0002A977 call _DecompressDBRec
|
1562
|
+
__text:0002A97C cwde
|
1563
|
+
__text:0002A97D mov [ebp+returnValue], eax
|
1564
|
+
__text:0002A980 jmp short loc_2A9F0
|
1565
|
+
__text:0002A982 ; ---------------------------------------------------------------------------
|
1566
|
+
__text:0002A982
|
1567
|
+
__text:0002A982 loc_2A982: ; CODE XREF: _DBRecordReadIntoTextBuf+8Fj
|
1568
|
+
__text:0002A982 ; _DBRecordReadIntoTextBuf+123j
|
1569
|
+
__text:0002A982 mov eax, [ebp+fp]
|
1570
|
+
__text:0002A985 mov [esp], eax ; FILE *
|
1571
|
+
__text:0002A988 call _getc
|
1572
|
+
__text:0002A98D mov [ebp+rawRecordByte], eax
|
1573
|
+
__text:0002A990 cmp [ebp+rawRecordByte], 0FFFFFFFFh
|
1574
|
+
__text:0002A994 jnz short loc_2A99F
|
1575
|
+
__text:0002A996 mov [ebp+returnValue], 0FFFFFFEDh
|
1576
|
+
__text:0002A99D jmp short loc_2A9F0
|
1577
|
+
__text:0002A99F ; ---------------------------------------------------------------------------
|
1578
|
+
__text:0002A99F
|
1579
|
+
__text:0002A99F loc_2A99F: ; CODE XREF: _DBRecordReadIntoTextBuf+D0j
|
1580
|
+
__text:0002A99F cmp [ebp+rawRecordByte], 0
|
1581
|
+
__text:0002A9A3 jnz short loc_2A9AE
|
1582
|
+
__text:0002A9A5 mov [ebp+returnValue], 0
|
1583
|
+
__text:0002A9AC jmp short loc_2A9F0
|
1584
|
+
__text:0002A9AE ; ---------------------------------------------------------------------------
|
1585
|
+
__text:0002A9AE
|
1586
|
+
__text:0002A9AE loc_2A9AE: ; CODE XREF: _DBRecordReadIntoTextBuf+DFj
|
1587
|
+
__text:0002A9AE mov eax, [ebp+rawRecordByte]
|
1588
|
+
__text:0002A9B1 movsx eax, al
|
1589
|
+
__text:0002A9B4 mov [esp+4], eax
|
1590
|
+
__text:0002A9B8 mov eax, [ebp+buffer]
|
1591
|
+
__text:0002A9BB mov [esp], eax
|
1592
|
+
__text:0002A9BE call _TBPutC
|
1593
|
+
__text:0002A9C3 mov [ebp+appendBufferStat], ax
|
1594
|
+
__text:0002A9C7 cmp [ebp+appendBufferStat], 0
|
1595
|
+
__text:0002A9CC jz short loc_2A9D7
|
1596
|
+
__text:0002A9CE movsx eax, [ebp+appendBufferStat]
|
1597
|
+
__text:0002A9D2 mov [ebp+returnValue], eax
|
1598
|
+
__text:0002A9D5 jmp short loc_2A9F0
|
1599
|
+
__text:0002A9D7 ; ---------------------------------------------------------------------------
|
1600
|
+
__text:0002A9D7
|
1601
|
+
__text:0002A9D7 loc_2A9D7: ; CODE XREF: _DBRecordReadIntoTextBuf+108j
|
1602
|
+
__text:0002A9D7 movzx eax, [ebp+recordLength]
|
1603
|
+
__text:0002A9DB dec eax
|
1604
|
+
__text:0002A9DC mov [ebp+recordLength], ax
|
1605
|
+
__text:0002A9E0 movzx eax, [ebp+recordLength]
|
1606
|
+
__text:0002A9E4 test ax, ax
|
1607
|
+
__text:0002A9E7 jnz short loc_2A982
|
1608
|
+
__text:0002A9E9 mov [ebp+returnValue], 0
|
1609
|
+
__text:0002A9F0
|
1610
|
+
__text:0002A9F0 loc_2A9F0: ; CODE XREF: _DBRecordReadIntoTextBuf+2Bj
|
1611
|
+
__text:0002A9F0 ; _DBRecordReadIntoTextBuf+57j ...
|
1612
|
+
__text:0002A9F0 mov eax, [ebp+returnValue]
|
1613
|
+
__text:0002A9F3 leave
|
1614
|
+
__text:0002A9F4 retn
|
1615
|
+
__text:0002A9F4 _DBRecordReadIntoTextBuf endp
|
1616
|
+
|