spiritovod wrote:
@Dark Frost: If you need to only change patterns for header or footer, just change 16 to the footer size (in bytes) and it will work. Otherwise, in case of more complex modifications, I suggest to look into quickbms
documention for better understanding of what you're doing.
Finally ı Create This Thing
Code:
do
findloc A_OFFSET binary "\x80\x00"
goto A_OFFSET
get A_SIZE asize
findloc Q_OFFSET binary "\x43\x52\x49"
goto Q_OFFSET
get Q_SIZE asize
if A_OFFSET == Q_OFFSET - 32
findloc B_OFFSET binary "\x80\x01\x??\x??" 0 ""
goto B_OFFSET
if B_OFFSET == ""
get B_SIZE asize
else
math B_OFFSET + 4 # 4 is B_OFFSET Byte
math B_SIZE = B_OFFSET
endif
math B_SIZE - A_OFFSET
string A_OFFSET + ".adx"
log A_OFFSET A_OFFSET B_SIZE
math A_OFFSET = B_OFFSET
goto A_OFFSET
else
goto A_OFFSET
While NotEOF <> 0
cleanexit
I Thing if A_OFFSET == Q_OFFSET - 32 Script Continue, else goto A_OFFSET
but ı have problem Because İts Not working
my data is

How Can I Fix that because my some files have only "\x80\x00" Data ı Need Compare A_OFFSET before Q_OFFSET
And I try This Way But Not Working Too:
Code:
do
findloc A_OFFSET binary "\x80\x00"
goto A_OFFSET
get A_SIZE asize
findloc Q_OFFSET binary "\x43\x52\x49"
math Q_OFFSET - 34
goto Q_OFFSET
math Q_SIZE = Q_OFFSET
if A_OFFSET == Q_SIZE
findloc B_OFFSET binary "\x80\x01\x??\x??" 0 ""
goto B_OFFSET
if B_OFFSET == ""
get B_SIZE asize
else
math B_OFFSET + 4 # 4 is B_OFFSET Byte
math B_SIZE = B_OFFSET
endif
math B_SIZE - A_OFFSET
string A_OFFSET + ".adx"
log A_OFFSET A_OFFSET B_SIZE
math A_OFFSET = B_OFFSET
goto A_OFFSET
else
goto A_OFFSET
While NotEOF <> 0
cleanexit