Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2329 | Albom | 1 | |
2 | |||
3 | |||
4 | |||
5 | |||
6 | |||
7 | |||
8 | |||
9 | mov eax, 10 |
||
10 | ret |
||
11 | |||
12 | |||
13 | convert: |
||
14 | |||
15 | |||
16 | mov dword [filename], eax |
||
17 | mov eax, [esp+8] |
||
18 | mov dword [buffer], eax |
||
19 | mov eax, [esp+12] |
||
20 | mov dword [mode], eax |
||
21 | |||
22 | |||
23 | |||
24 | |||
25 | mov ebx, 11 |
||
26 | int 0x40 |
||
27 | |||
28 | |||
29 | mov dword [file_in+4], 0 |
||
30 | mov dword [file_in+8], 0 |
||
31 | mov dword [file_in+12], 0 |
||
32 | mov dword [file_in+16], bdvk |
||
33 | mov byte [file_in+20], 0 |
||
34 | mov eax, [filename] |
||
35 | mov dword [file_in+21], eax |
||
36 | |||
37 | |||
38 | mov ebx, file_in |
||
39 | int 0x40 |
||
40 | |||
41 | |||
42 | mov dword [buf_len], eax |
||
43 | |||
44 | |||
45 | mov ebx, 12 |
||
46 | mov ecx, [buf_len] |
||
47 | int 0x40 |
||
48 | |||
49 | |||
50 | |||
51 | |||
52 | jne _mem_ok |
||
53 | |||
54 | |||
55 | mov eax, -1 |
||
56 | ret 12 |
||
57 | |||
58 | |||
59 | mov dword [file_in], 0 |
||
60 | mov dword [file_in+4], 0x600 |
||
61 | mov dword [file_in+8], 0 |
||
62 | mov eax, [buf_len] |
||
63 | sub eax, 0x600 |
||
64 | mov [buf_len], eax |
||
65 | mov dword [file_in+12], eax |
||
66 | mov eax, [buf] |
||
67 | mov dword [file_in+16], eax |
||
68 | mov byte [file_in+20], 0 |
||
69 | mov eax, [filename] |
||
70 | mov dword [file_in+21], eax |
||
71 | |||
72 | |||
73 | mov ebx, file_in |
||
74 | int 0x40 |
||
75 | |||
76 | |||
77 | |||
78 | |||
79 | mov ebx, 13 |
||
80 | mov ecx, [buf] |
||
81 | int 0x40 |
||
82 | |||
83 | |||
84 | |||
85 | |||
86 | ret 12 |
||
87 | |||
88 | |||
89 | pushad |
||
90 | |||
91 | |||
92 | mov [result], 0 |
||
93 | |||
94 | |||
95 | mov edx, [buffer] ; ¢ë室®© ¡ãä¥à |
||
96 | |||
97 | |||
98 | |||
99 | |||
100 | |||
101 | je _translate_end |
||
102 | |||
103 | |||
104 | inc ecx |
||
105 | inc ebx |
||
106 | mov byte ah, [ecx] |
||
107 | |||
108 | |||
109 | jne _translate_next1 |
||
110 | |||
111 | |||
112 | je _translate_end |
||
113 | |||
114 | |||
115 | jne _translate_no13 |
||
116 | |||
117 | |||
118 | inc edx |
||
119 | mov byte [edx], 0x0a |
||
120 | inc edx |
||
121 | mov byte [edx], 32 |
||
122 | inc edx |
||
123 | mov byte [edx], 32 |
||
124 | inc edx |
||
125 | mov byte [edx], 32 |
||
126 | inc edx |
||
127 | mov al, 32 |
||
128 | jmp _translate_copy |
||
129 | |||
130 | |||
131 | |||
132 | |||
133 | jg _translate_eng_1 |
||
134 | |||
135 | |||
136 | inc ebx |
||
137 | jmp _translate_loop |
||
138 | |||
139 | |||
140 | |||
141 | |||
142 | jle _translate_eng_2 |
||
143 | |||
144 | |||
145 | inc ebx |
||
146 | jmp _translate_loop |
||
147 | |||
148 | |||
149 | jmp _translate_copy |
||
150 | |||
151 | |||
152 | |||
153 | |||
154 | jne _translate_next2 |
||
155 | |||
156 | |||
157 | jb _translate_rus_s |
||
158 | |||
159 | |||
160 | add eax, rus_big |
||
161 | sub eax, 0x10 |
||
162 | |||
163 | |||
164 | |||
165 | |||
166 | |||
167 | |||
168 | and eax, 0xff |
||
169 | add eax, rus_small |
||
170 | sub eax, 0x30 |
||
171 | |||
172 | |||
173 | |||
174 | |||
175 | |||
176 | |||
177 | |||
178 | cmp ah, 0x20 |
||
179 | jne _translate_next3 |
||
180 | |||
181 | |||
182 | |||
183 | |||
184 | mov byte [edx], al |
||
185 | |||
186 | |||
187 | inc edx |
||
188 | inc ebx |
||
189 | inc [result] |
||
190 | |||
191 | |||
192 | |||
193 | |||
194 | popad |
||
195 | ret |
||
196 | |||
197 | |||
198 | |||
199 | |||
200 | EXPORTS: |
||
201 | dd szVersion, version |
||
202 | dd szConvert, convert |
||
203 | dd 0, 0 |
||
204 | |||
205 | |||
206 | szConvert db 'convert',0 |
||
207 | |||
208 | |||
209 | buf_len dd 0 |
||
210 | result dd 0 |
||
211 | |||
212 | |||
213 | buffer dd 0 |
||
214 | filename dd 0 |
||
215 | |||
216 | |||
217 | rus_small db ' ¡¢£¤¥¦§¨©ª«¬®¯àáâãäåæçèéêëìíîï' |
||
218 | |||
219 | |||
220 | |||
221 | |||
222 | rd 1 |
||
223 | rd 1 |
||
224 | rd 1 |
||
225 | rd 1 |
||
226 | rb 1 |
||
227 | rd 1 |
||
228 | |||
229 | |||
230 | rb 1 |
||
231 | rb 3 |
||
232 | rb 4 |
||
233 | rb 4 |
||
234 | rb 4 |
||
235 | rb 4 |
||
236 | rb 4 |
||
237 | rb 4 |
||
238 | rd 1 |
||
239 | rd 1 |
||
240 |