use packed file

git-svn-id: svn://kolibrios.org@7026 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
0CodErr 2017-09-27 20:03:37 +00:00
parent 58ad913c04
commit b42af811f2
2 changed files with 48 additions and 40 deletions

View File

@ -34,50 +34,58 @@ START:
;ˆ­¨æ¨ «¨§¨à㥬 ªãçã
mcall 68,11
; call get_screen_params
; mov eax,0x0000001C
; cmp eax,0x0
; je start_with_internal_text ; <20> à ¬¥âàë ­¥ § ¤ ­ë
mov eax,params
cmp [eax],byte 0x0
je start_with_internal_text ; <20> à ¬¥âàë ­¥ § ¤ ­ë
; <20> à ¬¥âà § ¤ ­! <20>ëâ ¥¬áï í⨬ ¢®á¯®«ì§®¢ âìáï
; <20>¥®¡å®¤¨¬® ®¯à¥¤¥«¨âì à §¬¥à ä ©« ... ‚¯¥àñ¤!!!
mov eax,5
mov [arg1],eax
xor eax,eax
mov [arg2],eax
mov [arg3],eax
mov [arg4],eax
mov eax,filedatastruct
mov [arg5],eax
mov eax,[0x0000001C]
mov [arg7],eax
mcall 70,filestruct
; mov eax,5
; mov [arg1],eax
; xor eax,eax
; mov [arg2],eax
; mov [arg3],eax
; mov [arg4],eax
; mov eax,filedatastruct
; mov [arg5],eax
; mov eax,[0x0000001C]
; mov [arg7],eax
; mcall 70,filestruct
; test eax,eax
; jne start_with_internal_text ;Žè¨¡ª 
; mov eax, dword [size]
; mov [filesize], eax ;⥯¥àì à §¬¥à ä ©«  ã ­ á ¢ filesize
;;‚뤥«ï¥¬ ¡«®ª ¯ ¬ï⨠¯®¤ ä ©«
; mov ecx, [filesize]
; inc ecx ;‚뤥«¨¬ ¤®¯®«­¨â¥«ì­® ®¤¨­ ¡ ©â ¤«ï ⮣®, çâ®¡ë ¤®¡ ¢¨âì 0xFF
; ;§ é¨â  ®â "¡¨âëå" KLA-ä ©«®¢
; mcall 68,12
; mov [datastart], eax ; ¯¥à¥¬¥­­®© „ â ‘â àâ ⥯¥àì ­ å®¤¨âáï 㪠§ â¥«ì
; add eax, [filesize]
; mov bh, 0xFF
; mov [eax], bh
;;‘®¡á⢥­­®, áç¨â뢠¥¬ ä ©« ¢ ¯ ¬ïâì
; xor eax,eax
; mov [arg1],eax ;<3B>®¬¥à ¯®¤ä㭪樨
; mov [arg2],eax ;‘¬¥é¥­¨¥ ¢ ä ©«¥
; mov [arg3],eax ;‘â à訩 dword ᬥ饭¨ï
; mov eax,[filesize]
; mov [arg4],eax ;<3B> §¬¥à ä ©« 
; mov eax,[datastart]
; mov [arg5],eax ;“ª § â¥«ì ­  ¤ ­­ë¥
; mov eax,par
; mov [arg7],eax ;“ª § â¥«ì ­  ASCIIZ-áâபã
; mcall 70,filestruct
mov ecx, eax
mov eax, 68
mov ebx, 27
int 64
mov [datastart], eax
mov [filesize], edx
test eax,eax
jne start_with_internal_text ;Žè¨¡ª 
mov eax, dword [size]
mov [filesize], eax ;⥯¥àì à §¬¥à ä ©«  ã ­ á ¢ filesize
;‚뤥«ï¥¬ ¡«®ª ¯ ¬ï⨠¯®¤ ä ©«
mov ecx, [filesize]
inc ecx ;‚뤥«¨¬ ¤®¯®«­¨â¥«ì­® ®¤¨­ ¡ ©â ¤«ï ⮣®, çâ®¡ë ¤®¡ ¢¨âì 0xFF
;§ é¨â  ®â "¡¨âëå" KLA-ä ©«®¢
mcall 68,12
mov [datastart], eax ; ¯¥à¥¬¥­­®© „ â ‘â àâ ⥯¥àì ­ å®¤¨âáï 㪠§ â¥«ì
add eax, [filesize]
mov bh, 0xFF
mov [eax], bh
;‘®¡á⢥­­®, áç¨â뢠¥¬ ä ©« ¢ ¯ ¬ïâì
xor eax,eax
mov [arg1],eax ;<3B>®¬¥à ¯®¤ä㭪樨
mov [arg2],eax ;‘¬¥é¥­¨¥ ¢ ä ©«¥
mov [arg3],eax ;‘â à訩 dword ᬥ饭¨ï
mov eax,[filesize]
mov [arg4],eax ;<3B> §¬¥à ä ©« 
mov eax,[datastart]
mov [arg5],eax ;“ª § â¥«ì ­  ¤ ­­ë¥
mov eax,par
mov [arg7],eax ;“ª § â¥«ì ­  ASCIIZ-áâபã
mcall 70,filestruct
test eax,eax
je initialize_variables
jnz initialize_variables
start_with_internal_text:
mov edx, string
mov [datastart], edx