ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Mon Dec 10, 2018 6:20 pm

All times are UTC




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Wed Nov 07, 2018 5:59 am 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 72
i need to know how can i run two array in one script, both (for i) and (for w)

i mean, when array one is over (i), then go to 0x0-OFFSET and run another array (w)

like this:
Code:
get TAFS_CHECKER extension
if TAFS_CHECKER == "emd"


for i
findloc FINDER_GET binary "\x00\x32\x33\x54"
goto FINDER_GET
getdstring DUMMY_EMD 60
get SIZE long
findloc DDS_HEADER binary "\x44\x44\x53\x20"
goto DDS_HEADER
savepos OFFSET
log "" OFFSET SIZE
next i


goto 0


for w
findloc TYAPE2 binary "\x66\x72\x6D\x6A"
goto TYAPE2
get DUMMY long
get SAIZE long
savepos OAFFSET
log "" OAFFSET SAIZE
next w


cleanexit
else
endif
endFunction


Top
   
PostPosted: Wed Nov 07, 2018 1:44 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 9431
findloc automatically terminates the execution if it doesn't find the next pattern but it supports an option to avoid that:
Code:
get TAFS_CHECKER extension
if TAFS_CHECKER == "emd"


for
findloc FINDER_GET binary "\x00\x32\x33\x54" 0 ""
if FINDER_GET == ""
    break
endif
goto FINDER_GET
getdstring DUMMY_EMD 60
get SIZE long
findloc DDS_HEADER binary "\x44\x44\x53\x20"
goto DDS_HEADER
savepos OFFSET
log "" OFFSET SIZE
next


goto 0


for
findloc TYAPE2 binary "\x66\x72\x6D\x6A" 0 ""
if TYAPE2 == ""
    break
endif
goto TYAPE2
get DUMMY long
get SAIZE long
savepos OAFFSET
log "" OAFFSET SAIZE
next


cleanexit
else
endif
endFunction


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited