Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

are these custom webp files viewable? [vainglory]

Featured Replies

  • Author
  • Localization

verticalD, posted Wed Nov 29, 2017 3:36 pm (30390)


can anyone help me with these image files? there are multiple headers in them (does it mean there are more than one image in each one?)
I have some experience with coding in .net and stuff but i have no experience with finding patterns in binary. so I would appreciate if anyone could at least put me on the right track. I don't even know where to start
here's a sample of some of the files
https://www.mediafire.com/file/k5kdaz5z ... Sample.zip

Edit :they're from "vainglory"
both iOS and android versions use this format
  • Author
  • Localization

aluigi, posted Wed Nov 29, 2017 3:47 pm (30392)


Remember to specify the name of the game
  • Author
  • Localization

episoder, posted Wed Nov 29, 2017 4:56 pm (30394)


does the game matter? the structure seems obvious.

Code:
struct
{
   int32   filesize;
   int32   nr_mipmaps;
   int32   unk0;
   int32   unk1;
   int32   width;
   int32   height;
}multi_header;

for nr_mipmaps

int32   size_chunk;

struct
{
   int32   magic;
   int32   size_payload;
   int32   FOURCC_webp;
   int32   FOURCC_vfmt;
   int32   size_vfragment

   char   data[size_vfragment]
}file_webp;
  • Author
  • Localization

verticalD, posted Wed Nov 29, 2017 6:32 pm (30398)


episoder wrote:
does the game matter? the structure seems obvious.

Code:
struct
{
   int32   filesize;
   int32   nr_mipmaps;
   int32   unk0;
   int32   unk1;
   int32   width;
   int32   height;
}multi_header;

for nr_mipmaps

int32   size_chunk;

struct
{
   int32   magic;
   int32   size_payload;
   int32   FOURCC_webp;
   int32   FOURCC_vfmt;
   int32   size_vfragment

   char   data[size_vfragment]
}file_webp;

well its a moba, and mobas are addictive as hell.
thank you man, now im on the right track.
im assuming by "unk0" you mean unknown right?
if I understand correctly each file has the first part until 'height' and then each mipmap starts at the 'size chunk' line and ends with the file itself. and then right at the end of the file the next mipmap with its 'size chunk' starts. is that correct?
  • Author
  • Localization

episoder, posted Wed Nov 29, 2017 8:25 pm (30402)


yep. unkX is unknown purpose. width and height are basicly engine internal. the dimensions of the biggest mimap. and...

the files you gotta extract are basicly just the first mipmap. which start at the first 'R'I'F'F' magic. that is the start of the header of the webp file format. the size_chunk before that tells you how large the entire webp file for this particular mipmap is.
  • Author
  • Localization

Acewell, posted Sat Dec 02, 2017 1:18 am (30443)


episoder wrote:
does the game matter?

of course! posting the game name, platform and format will leave enough breadcrumbs in
Google search so the next guy can find this thread and not have to start from scratch :)

here is a bms script based on episoder's findings :D
Code:
# script for QuickBMS http://aluigi.altervista.org/quickbms.htm

get FILESIZE long
get NUM_MIPS long
get UNK long
get UNK2 long
get WIDTH long
get HEIGHT long
for i = 0    get SIZE long
   savepos OFFSET
   get NAME basename
   string NAME _
   string NAME i   
   string NAME .webp
   if i == 0
      log NAME OFFSET SIZE
   endif
   math OFFSET SIZE
   goto OFFSET
next i

it is currently set to write out only largest mip.
comment out lines 16 and 18 to write out all mips.
you can open these webp files in IrfanView.
  • Author
  • Localization

verticalD, posted Sat Dec 02, 2017 10:43 pm (30465)


Acewell wrote:
episoder wrote:
does the game matter?

of course! posting the game name, platform and format will leave enough breadcrumbs in
Google search so the next guy can find this thread and not have to start from scratch :)

here is a bms script based on episoder's findings :D
Code:
# script for QuickBMS http://aluigi.altervista.org/quickbms.htm

get FILESIZE long
get NUM_MIPS long
get UNK long
get UNK2 long
get WIDTH long
get HEIGHT long
for i = 0    get SIZE long
   savepos OFFSET
   get NAME basename
   string NAME _
   string NAME i   
   string NAME .webp
   if i == 0
      log NAME OFFSET SIZE
   endif
   math OFFSET SIZE
   goto OFFSET
next i

it is currently set to write out only largest mip.
comment out lines 16 and 18 to write out all mips.
you can open these webp files in IrfanView.

Thanks
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.