2011-06-12 00:16:26 +02:00
|
|
|
;*****************************************************************************
|
|
|
|
; RAW to RAW convert plugin - for zSea image viewer
|
|
|
|
; Copyright (c) 2008-2011, Marat Zakiyanov aka Mario79, aka Mario
|
|
|
|
; All rights reserved.
|
|
|
|
;
|
|
|
|
; Redistribution and use in source and binary forms, with or without
|
|
|
|
; modification, are permitted provided that the following conditions are met:
|
|
|
|
; * Redistributions of source code must retain the above copyright
|
|
|
|
; notice, this list of conditions and the following disclaimer.
|
|
|
|
; * Redistributions in binary form must reproduce the above copyright
|
|
|
|
; notice, this list of conditions and the following disclaimer in the
|
|
|
|
; documentation and/or other materials provided with the distribution.
|
|
|
|
; * Neither the name of the <organization> nor the
|
|
|
|
; names of its contributors may be used to endorse or promote products
|
|
|
|
; derived from this software without specific prior written permission.
|
|
|
|
;
|
|
|
|
; THIS SOFTWARE IS PROVIDED BY Marat Zakiyanov ''AS IS'' AND ANY
|
|
|
|
; EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
|
|
; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
|
|
; DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
|
|
|
|
; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
|
|
; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
|
|
; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
|
; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
|
|
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
;*****************************************************************************
|
|
|
|
|
|
|
|
; Convert:
|
|
|
|
; 16b in 8b
|
|
|
|
; 1b,2b,3b in 8b
|
|
|
|
|
|
|
|
format MS COFF
|
|
|
|
|
|
|
|
public EXPORTS
|
|
|
|
|
|
|
|
section '.flat' code readable align 16
|
|
|
|
|
|
|
|
;include 'macros.inc'
|
|
|
|
include '../../../../macros.inc'
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
START:
|
|
|
|
pushad
|
2011-06-13 18:59:37 +02:00
|
|
|
mov eax,dword [esp+36]
|
2011-09-07 18:34:44 +02:00
|
|
|
mov [pointer],eax
|
|
|
|
mov eax,[eax+4]
|
|
|
|
mov [image_file],eax
|
|
|
|
mov esi,[eax+28]
|
|
|
|
add esi,eax
|
|
|
|
mov edi,esi
|
|
|
|
mov ecx,[eax+32]
|
|
|
|
|
|
|
|
cmp [eax+16],word 16
|
|
|
|
je .16b
|
|
|
|
cmp [eax+12],dword 1
|
|
|
|
je .1b
|
|
|
|
cmp [eax+12],dword 2
|
|
|
|
je .2b
|
|
|
|
cmp [eax+12],dword 4
|
|
|
|
je .4b
|
2011-06-12 00:16:26 +02:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
.ret_ok:
|
2011-09-07 18:34:44 +02:00
|
|
|
mov ebx,[image_file]
|
|
|
|
cmp [ebx+18],word 2
|
|
|
|
jne @f
|
|
|
|
mov eax,[ebx+12]
|
|
|
|
shr eax,1
|
|
|
|
mov [ebx+12],eax
|
2011-06-12 00:16:26 +02:00
|
|
|
@@:
|
|
|
|
popad
|
2011-06-13 18:59:37 +02:00
|
|
|
ret 4
|
2011-06-12 00:16:26 +02:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
.less_8b:
|
2011-09-07 18:34:44 +02:00
|
|
|
mov edx,[image_file]
|
|
|
|
mov ecx,[area_size]
|
|
|
|
add ecx,[edx+28]
|
|
|
|
mcall 68,20
|
|
|
|
mov [image_file],eax
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
mov ecx,[area_size]
|
|
|
|
mov eax,ecx
|
|
|
|
shr ecx,2
|
|
|
|
test eax,3
|
|
|
|
jz @f
|
|
|
|
inc ecx
|
2011-06-12 00:16:26 +02:00
|
|
|
@@:
|
2011-09-07 18:34:44 +02:00
|
|
|
mov esi,[raw_area]
|
|
|
|
mov edi,[image_file]
|
|
|
|
add edi,[edi+28]
|
2011-06-12 00:16:26 +02:00
|
|
|
cld
|
2011-09-07 18:34:44 +02:00
|
|
|
rep movsd
|
|
|
|
|
|
|
|
mcall 68,13,[raw_area]
|
|
|
|
mov eax,[image_file]
|
|
|
|
mov ebx,[pointer]
|
|
|
|
mov [ebx+4],eax
|
2011-06-12 00:16:26 +02:00
|
|
|
popad
|
2011-06-13 18:59:37 +02:00
|
|
|
ret 4
|
2011-06-12 00:16:26 +02:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
.16b:
|
2011-09-07 18:34:44 +02:00
|
|
|
; eax - RAW image_file
|
|
|
|
cmp [eax+18],word 3
|
|
|
|
je @f
|
|
|
|
cmp [eax+18],word 4
|
|
|
|
jne .16b_1
|
2011-06-12 00:16:26 +02:00
|
|
|
@@:
|
2011-09-07 18:34:44 +02:00
|
|
|
xor ebx,ebx
|
|
|
|
mov bx,[eax+18]
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
xchg eax,ecx
|
|
|
|
xor edx,edx
|
|
|
|
div ebx
|
|
|
|
xchg ecx,eax
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
shr ecx,1
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
mov [eax+16],word 8
|
|
|
|
mov ebx,[eax+12]
|
|
|
|
shr ebx,1
|
|
|
|
mov [eax+12],ebx
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
mov ebx,eax
|
2011-06-12 00:16:26 +02:00
|
|
|
|
|
|
|
.convert_16_in_8: ; converting 16 bit sample to 8 bit
|
|
|
|
cld
|
|
|
|
lodsw
|
2011-09-07 18:34:44 +02:00
|
|
|
mov al,ah
|
2011-06-12 00:16:26 +02:00
|
|
|
stosb
|
|
|
|
|
|
|
|
lodsw
|
2011-09-07 18:34:44 +02:00
|
|
|
mov al,ah
|
2011-06-12 00:16:26 +02:00
|
|
|
stosb
|
|
|
|
|
|
|
|
lodsw
|
2011-09-07 18:34:44 +02:00
|
|
|
mov al,ah
|
2011-06-12 00:16:26 +02:00
|
|
|
stosb
|
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
cmp [ebx+18],word 4
|
|
|
|
jne @f
|
2011-06-12 00:16:26 +02:00
|
|
|
lodsw
|
2011-09-07 18:34:44 +02:00
|
|
|
mov al,ah
|
2011-06-12 00:16:26 +02:00
|
|
|
stosb
|
|
|
|
@@:
|
2011-09-07 18:34:44 +02:00
|
|
|
dec ecx
|
|
|
|
jnz .convert_16_in_8
|
|
|
|
|
|
|
|
jmp .16b_end
|
2011-06-12 00:16:26 +02:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
.16b_1:
|
2011-09-07 18:34:44 +02:00
|
|
|
; eax - RAW image_file
|
|
|
|
cmp [eax+18],word 1
|
|
|
|
je @f
|
|
|
|
cmp [eax+18],word 2
|
|
|
|
jne .16b_end
|
2011-06-12 00:16:26 +02:00
|
|
|
@@:
|
2011-09-07 18:34:44 +02:00
|
|
|
shr ecx,1
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
mov [eax+16],word 8
|
|
|
|
mov ebx,[eax+12]
|
|
|
|
shr ebx,1
|
|
|
|
mov [eax+12],ebx
|
2011-06-12 00:16:26 +02:00
|
|
|
|
|
|
|
.convert_16_in_8_1:
|
2011-06-13 18:59:37 +02:00
|
|
|
cld
|
|
|
|
lodsw
|
|
|
|
stosb
|
2011-09-07 18:34:44 +02:00
|
|
|
dec ecx
|
|
|
|
jnz .convert_16_in_8_1
|
2011-06-12 00:16:26 +02:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
.16b_end:
|
2011-09-07 18:34:44 +02:00
|
|
|
xor eax,eax
|
|
|
|
mov [raw_area],eax
|
|
|
|
jmp .ret_ok
|
2011-06-12 00:16:26 +02:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
.4b:
|
2011-09-07 18:34:44 +02:00
|
|
|
call .get_memory
|
|
|
|
mov edx,ebx
|
|
|
|
inc ebx
|
|
|
|
shr ebx,1
|
2011-06-12 00:16:26 +02:00
|
|
|
.4b_1:
|
2011-09-07 18:34:44 +02:00
|
|
|
push ebx edi
|
2011-06-12 00:16:26 +02:00
|
|
|
@@:
|
|
|
|
cld
|
|
|
|
lodsb
|
2011-09-07 18:34:44 +02:00
|
|
|
shl eax,8
|
|
|
|
mov al,ah
|
|
|
|
and ah,0xf
|
|
|
|
shr al,4
|
2011-06-12 00:16:26 +02:00
|
|
|
stosw
|
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
dec ebx
|
|
|
|
jnz @b
|
|
|
|
pop edi ebx
|
|
|
|
add edi,edx
|
|
|
|
dec ecx
|
|
|
|
jnz .4b_1
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
jmp .less_8b
|
2011-06-12 00:16:26 +02:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
.2b:
|
2011-09-07 18:34:44 +02:00
|
|
|
call .get_memory
|
|
|
|
mov edx,ebx
|
|
|
|
mov eax,ebx
|
|
|
|
shr ebx,2
|
|
|
|
test eax,3
|
|
|
|
jz @f
|
|
|
|
inc ebx
|
2011-06-12 00:16:26 +02:00
|
|
|
@@:
|
2011-09-07 18:34:44 +02:00
|
|
|
mov ebp,ebx
|
2011-06-12 00:16:26 +02:00
|
|
|
.2b_1:
|
2011-09-07 18:34:44 +02:00
|
|
|
push ebp edi
|
2011-06-12 00:16:26 +02:00
|
|
|
@@:
|
|
|
|
cld
|
|
|
|
lodsb
|
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
mov bl,al
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
and al,11b
|
|
|
|
shl ax,8
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
mov al,bl
|
|
|
|
shr al,2
|
|
|
|
and al,11b
|
|
|
|
shl eax,8
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
mov al,bl
|
|
|
|
shr al,4
|
|
|
|
and al,11b
|
|
|
|
shl eax,8
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
mov al,bl
|
|
|
|
shr al,6
|
|
|
|
and al,11b
|
2011-06-12 00:16:26 +02:00
|
|
|
|
|
|
|
stosd
|
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
dec ebp
|
|
|
|
jnz @b
|
|
|
|
pop edi ebp
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
add edi,edx
|
|
|
|
dec ecx
|
|
|
|
jnz .2b_1
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
jmp .less_8b
|
2011-06-12 00:16:26 +02:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
.1b:
|
2011-09-07 18:34:44 +02:00
|
|
|
call .get_memory
|
|
|
|
mov edx,ebx
|
|
|
|
mov eax,ebx
|
|
|
|
shr ebx,3
|
|
|
|
test eax,7
|
|
|
|
jz @f
|
|
|
|
inc ebx
|
2011-06-12 00:16:26 +02:00
|
|
|
@@:
|
2011-09-07 18:34:44 +02:00
|
|
|
mov ebp,ebx
|
2011-06-12 00:16:26 +02:00
|
|
|
.1b_1:
|
2011-09-07 18:34:44 +02:00
|
|
|
push ebp edi
|
2011-06-12 00:16:26 +02:00
|
|
|
@@:
|
|
|
|
cld
|
|
|
|
lodsb
|
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
mov bl,al
|
|
|
|
shr al,4
|
|
|
|
and al,1b
|
|
|
|
shl ax,8
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
mov al,bl
|
|
|
|
shr al,5
|
|
|
|
and al,1b
|
|
|
|
shl eax,8
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
mov al,bl
|
|
|
|
shr al,6
|
|
|
|
and al,1b
|
|
|
|
shl eax,8
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
mov al,bl
|
|
|
|
shr al,7
|
2011-06-12 00:16:26 +02:00
|
|
|
|
|
|
|
stosd
|
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
mov al,bl
|
|
|
|
and al,1b
|
|
|
|
shl ax,8
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
mov al,bl
|
|
|
|
shr al,1
|
|
|
|
and al,1b
|
|
|
|
shl eax,8
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
mov al,bl
|
|
|
|
shr al,2
|
|
|
|
and al,1b
|
|
|
|
shl eax,8
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
mov al,bl
|
|
|
|
shr al,3
|
|
|
|
and al,1b
|
2011-06-12 00:16:26 +02:00
|
|
|
|
|
|
|
stosd
|
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
dec ebp
|
|
|
|
jnz @b
|
|
|
|
pop edi ebp
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
add edi,edx
|
|
|
|
dec ecx
|
|
|
|
jnz .1b_1
|
|
|
|
|
|
|
|
jmp .less_8b
|
2011-06-12 00:16:26 +02:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
.get_memory:
|
2011-09-07 18:34:44 +02:00
|
|
|
; eax - RAW image_file
|
|
|
|
mov ebx,dword 8
|
|
|
|
mov [eax+16],bx
|
|
|
|
mov [eax+12],ebx
|
|
|
|
mov ecx,[eax+4]
|
|
|
|
imul ecx,[eax+8]
|
|
|
|
push eax
|
|
|
|
mov [area_size],ecx
|
|
|
|
mcall 68,12
|
|
|
|
mov [raw_area],eax
|
|
|
|
mov edi,eax
|
|
|
|
pop eax
|
|
|
|
mov ebx,[eax+4]
|
|
|
|
mov ecx,[eax+8]
|
2011-06-12 00:16:26 +02:00
|
|
|
ret
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
Convert24b:
|
|
|
|
pushad
|
2011-06-13 20:13:55 +02:00
|
|
|
mov eax,dword [esp+36]
|
2011-09-07 18:34:44 +02:00
|
|
|
mov [pointer],eax
|
|
|
|
mov eax,[eax+4]
|
|
|
|
mov [image_file],eax
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
mov esi,[eax+28]
|
|
|
|
add esi,eax
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
mov ebp,[eax+20]
|
|
|
|
add ebp,eax
|
|
|
|
|
|
|
|
mov ecx,[eax+4]
|
|
|
|
imul ecx,[eax+8]
|
|
|
|
push eax ecx
|
|
|
|
lea ecx,[ecx*3]
|
|
|
|
mov edx,ecx
|
|
|
|
add ecx,44 ; header
|
|
|
|
mcall 68,12 ;get new RAW area
|
|
|
|
mov [raw_area],eax
|
|
|
|
mov edi,eax
|
|
|
|
|
|
|
|
push esi
|
|
|
|
mov esi,[image_file]
|
|
|
|
mov ecx,3
|
|
|
|
cld
|
|
|
|
rep movsd ;copy the 3 first dword for the structure of RAW
|
|
|
|
pop esi
|
|
|
|
|
|
|
|
sub edi,12
|
|
|
|
mov [edi+12],dword 24 ;overall depth of the pixel
|
|
|
|
mov [edi+16],word 8 ;channel depth of the pixel
|
|
|
|
xor eax,eax
|
|
|
|
mov [edi+20],eax ;palette area pointer
|
|
|
|
mov [edi+24],eax ;palette area size
|
|
|
|
mov [edi+28],dword 44 ;rgb area pointer
|
|
|
|
mov [edi+32],edx ;rgb area size
|
|
|
|
mov [edi+36],eax ;transparency area pointer
|
|
|
|
mov [edi+40],eax ;transparency area size
|
|
|
|
pop ecx eax
|
|
|
|
|
|
|
|
add edi,44
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
cmp [eax+12],dword 32
|
|
|
|
je .32b
|
|
|
|
cmp [eax+12],dword 16
|
|
|
|
je .16b
|
|
|
|
cmp [eax+12],dword 15
|
|
|
|
je .15b
|
|
|
|
cmp [eax+12],dword 8
|
|
|
|
je .8b
|
2011-06-12 00:16:26 +02:00
|
|
|
|
|
|
|
.ret_ok:
|
2011-09-07 18:34:44 +02:00
|
|
|
mov ebx,[pointer]
|
|
|
|
mov eax,[raw_area]
|
|
|
|
mov [ebx+20],eax ; store RAW pointer
|
2011-06-12 00:16:26 +02:00
|
|
|
popad
|
2011-06-13 18:59:37 +02:00
|
|
|
ret 4
|
2011-06-12 00:16:26 +02:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
.32b:
|
|
|
|
cld
|
|
|
|
lodsd
|
|
|
|
stosw
|
2011-09-07 18:34:44 +02:00
|
|
|
shr eax,16
|
2011-06-12 00:16:26 +02:00
|
|
|
stosb
|
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
dec ecx
|
|
|
|
jnz .32b
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
jmp .ret_ok
|
2011-06-12 00:16:26 +02:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
.16b:
|
|
|
|
cld
|
|
|
|
lodsw
|
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
xor ebx,ebx
|
|
|
|
ror ax,11
|
|
|
|
mov bl,al
|
|
|
|
and bl,11111b
|
|
|
|
shl bl,3
|
|
|
|
shl ebx,8
|
|
|
|
rol ax,6
|
|
|
|
mov bl,al
|
|
|
|
and bl,111111b
|
|
|
|
shl bl,2
|
|
|
|
shl ebx,8
|
|
|
|
rol ax,5
|
|
|
|
mov bl,al
|
|
|
|
and bl,11111b
|
|
|
|
shl bl,3
|
|
|
|
mov eax,ebx
|
2011-06-12 00:16:26 +02:00
|
|
|
|
|
|
|
cld
|
|
|
|
stosw
|
2011-09-07 18:34:44 +02:00
|
|
|
shr eax,16
|
2011-06-12 00:16:26 +02:00
|
|
|
stosb
|
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
dec ecx
|
|
|
|
jnz .16b
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
jmp .ret_ok
|
2011-06-12 00:16:26 +02:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
.15b:
|
|
|
|
cld
|
|
|
|
lodsw
|
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
xor ebx,ebx
|
|
|
|
ror ax,10
|
|
|
|
mov bl,al
|
|
|
|
and bl,11111b
|
|
|
|
shl bl,3
|
|
|
|
shl ebx,8
|
|
|
|
rol ax,5
|
|
|
|
mov bl,al
|
|
|
|
and bl,11111b
|
|
|
|
shl bl,3
|
|
|
|
shl ebx,8
|
|
|
|
rol ax,5
|
|
|
|
mov bl,al
|
|
|
|
and bl,11111b
|
|
|
|
shl bl,3
|
|
|
|
mov eax,ebx
|
2011-06-12 00:16:26 +02:00
|
|
|
|
|
|
|
cld
|
|
|
|
stosw
|
2011-09-07 18:34:44 +02:00
|
|
|
shr eax,16
|
2011-06-12 00:16:26 +02:00
|
|
|
stosb
|
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
dec ecx
|
|
|
|
jnz .15b
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
jmp .ret_ok
|
2011-06-12 00:16:26 +02:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
.8b:
|
2011-09-07 18:34:44 +02:00
|
|
|
xor eax,eax
|
2011-06-12 00:16:26 +02:00
|
|
|
cld
|
|
|
|
lodsb
|
2011-09-07 18:34:44 +02:00
|
|
|
shl eax,2
|
|
|
|
mov eax,[eax+ebp]
|
2011-06-12 00:16:26 +02:00
|
|
|
|
|
|
|
cld
|
|
|
|
stosw
|
2011-09-07 18:34:44 +02:00
|
|
|
shr eax,16
|
2011-06-12 00:16:26 +02:00
|
|
|
stosb
|
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
dec ecx
|
|
|
|
jnz .8b
|
2011-06-12 00:16:26 +02:00
|
|
|
|
2011-09-07 18:34:44 +02:00
|
|
|
jmp .ret_ok
|
2011-06-12 00:16:26 +02:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
align 16
|
|
|
|
EXPORTS:
|
2011-09-07 18:34:44 +02:00
|
|
|
dd szStart, START
|
|
|
|
dd szVersion, 0x00010003
|
|
|
|
dd szConv_24b, Convert24b
|
|
|
|
dd 0
|
2011-06-12 00:16:26 +02:00
|
|
|
|
|
|
|
szStart db 'START',0
|
|
|
|
szVersion db 'version',0
|
|
|
|
szConv_24b db 'Convert24b',0
|
|
|
|
pointer dd 0
|
|
|
|
image_file dd 0
|
|
|
|
;delta dd 0
|
|
|
|
;resolution dd 0
|
|
|
|
;compression dd 0
|
|
|
|
raw_area dd 0
|
|
|
|
area_size dd 0
|