Join also our Discord channel! Click here.

Little endian to Big Endian

Read or post about compression. And decompression. Or ask questions how to decompress your files.
Post Reply
dvoika
beginner
Posts: 27
Joined: Fri Nov 07, 2014 9:19 pm
Has thanked: 5 times
Been thanked: 1 time

Little endian to Big Endian

Post by dvoika » Thu Sep 22, 2016 2:49 pm

Hello my friends :)
I need to edit the file in a sequence of bits
ABCD on DCBA :D
Image

there is a program or script on this one ? my english is sux sorry
tnx for reply

progress:

get SIZE asize
math OFFSET = 4
math SIZE -= OFFSET
goto OFFSET
math SIZE /= 4
for i = 0 < SIZE
get TMP long
next i

Gh0stBlade
Moderator
Posts: 684
Joined: Mon Jul 05, 2010 8:55 pm
Has thanked: 20 times
Been thanked: 331 times

Re: Little endian to Big Endian

Post by Gh0stBlade » Sun Sep 25, 2016 10:46 am

If the whole file is just 32-bit integers (unlikely). You could probably open the file in Winhex then perform a 32-bit byte-swap on the whole file.

Cheers.
Click the thanks button if I helped!

bekir007
n00b
Posts: 11
Joined: Thu Aug 02, 2012 1:52 pm
Has thanked: 1 time

Re: Little endian to Big Endian

Post by bekir007 » Fri Oct 28, 2016 9:21 pm

You can use 010 editor.

"Tools > Hex Operations > Swap"

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2989
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 779 times
Been thanked: 1549 times

Re: Little endian to Big Endian

Post by shakotay2 » Sat Nov 05, 2016 12:35 pm

from the quickbms manual:
MATH TMP s 4
swaps a long

using it with a (little endian) binary file: 12 34 56 78
(insert print "%TMP%" for logging the variable)
result:
before
- SCRIPT's MESSAGE:
2018915346 (-> 0x78563412)
after
- SCRIPT's MESSAGE:
305419896 (-> 0x12345678)
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

Post Reply