ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Fri Apr 19, 2019 9:02 pm

All times are UTC




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

Joined: Sat Sep 15, 2018 5:22 am
Posts: 191
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: 10174
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
   
PostPosted: Mon Jan 21, 2019 7:39 pm 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 191
Aluigi. is there any way to run two diffrent array in one bms?
i saw so many problem in QuickBMS but why must be like that? dont left this great program behind
Code:
for j = 1
get OFFSET long
get SIZE long
log "" OFFSET SIZE
next j

for i = 1
get ID longlong
get HASH long
get OFFSET long
get SIZE long
get ZSIZE long
get DUMMY long
clog HASH OFFSET SIZE ZSIZE
next i


Top
   
PostPosted: Mon Jan 21, 2019 10:36 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 10174
There are no arrays in that script, what you mean?
Tell me exactly what you want to do in the script and how you want to use 2 arrays.


Top
   
PostPosted: Tue Jan 22, 2019 5:53 am 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 191
aluigi wrote:
There are no arrays in that script, what you mean?
Tell me exactly what you want to do in the script and how you want to use 2 arrays.


just for j can run. but for i never run!


Top
   
PostPosted: Tue Jan 22, 2019 6:40 am 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 191
in zip file i packed a bms and a azh file.
but file do not have any files long and need to count headers and but next array cant run
also offset files need to be x64 and game cant read any offset but x64 and cant load files.
two problem for now. i have same problem in many files


Attachments:
real_file.zip [2.67 KiB]
Downloaded 22 times


Last edited by Shokoniraya on Tue Jan 22, 2019 6:49 am, edited 1 time in total.
Top
   
PostPosted: Tue Jan 22, 2019 11:15 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 10174
'j' is in an endless loop and therefore you will never enter in the 'i' cycle.

Regarding the azh file you correctly found that the offset requires to be multiplied by 64, very good.
I suggest something like the following script:
Code:
for
    get OFFSET long
    if OFFSET == 0
        break
    endif
    get SIZE long
    math OFFSET * 64
    log "" OFFSET SIZE
next


Top
   
PostPosted: Wed Jan 23, 2019 6:18 am 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 191
i need multiplied OFFSET in reimport2 too. but how?
and i need to count headers too. file does not have any FILES long to do


Top
   
PostPosted: Wed Jan 23, 2019 10:34 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 10174
reimport2 does the job automatically and it works perfectly with that file.

There is no FILES field in that file and so you don't know how many files exist in the archive.
The only way is checking if the OFFSET field is zero which means there are no other files.


Top
   
PostPosted: Thu Jan 24, 2019 4:48 am 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 191
look at this one, edited script,
there is two folder My Editing and Your QuickBMS
in Your QuickBMS folder i used your bms and game will crash because its totaly wrong and game cant read offset in any address and must be x64

in My Editing folder i change offset numbers in header and file postion and game can read normally


Attachments:
Test.zip [4.98 KiB]
Downloaded 16 times
Top
   
PostPosted: Thu Feb 07, 2019 8:52 am 
User avatar

Joined: Wed Jul 19, 2017 5:04 am
Posts: 205
Shokoniraya wrote:
look at this one, edited script,
there is two folder My Editing and Your QuickBMS
in Your QuickBMS folder i used your bms and game will crash because its totaly wrong and game cant read offset in any address and must be x64

in My Editing folder i change offset numbers in header and file postion and game can read normally


add your extra cycle for a specified file, not for a total command! your skill was wrong!

_________________
Be Good, Even in distressing or defamation and chill, Even Everyone's Called You a Bad Guy Or Lier and Mad


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 11 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