0

I don't know if it's encrypted, but I tried changing encoding to latin1, but no avail, some text are still not clear, file looks to be like a csv table. Plus, it has a FTABLE as a header, I don't know what that means. Any insight will be very much appreciated.

The file starts with FTABLE, several null bytes and then:

46 54 41 42 4C 45 00 00 00 00 10 00 4A 02 00 00
08 00 00 00 20 02 00 00 48 0B 00 00 51 0B 00 00
22 00 00 00 25 59 00 00 00 00 00 00 43 52 45 41

... CREA (43 52 45 41) which in text form continues to form the CREATE TABLE statement:

CREATE TABLE `c_animationdata` (
  `anim_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `anim_name` varchar(45) NOT NULL,
  `loop` int(10) NOT NULL DEFAULT '0',
  `weapon_state` int(10) unsigned NOT NULL,
  `freeze_start_time` int(10) NOT NULL DEFAULT '0',
  `blend_time` int(10) unsigned NOT NULL DEFAULT '150',
  `play_speed` float NOT NULL DEFAULT '100',
  `combination` int(10) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`anim_id`)
) ENGINE=InnoDB AUTO_INCREMENT=827 DEFAULT CHARSET=latin1

The full file Base64-encoded (uncompress using xz after decoding it):

begin-base64 644 c_animationdata.tbl.xz
/Td6WFoAAATm1rRGAgAhARwAAAAQz1jM4IYuFIZdACMVBCRqxP7AP7DYMNKv
+priYvrUF0RJFIEKTSgETLqh8twrgPNFTD2VV9vWu46bHLZGQ0DRzVwnP1Yv
zmroSotmvQ3MFfRAVOEcVEZKHG8+vjTOB4KyVTqDZEuaxHM4xJ9rWYr1mtvt
pB8f72ZKf4EAnRheyqWPReE0fBgT6pZINx0JVToAEYM/YNQD6vFL52GJzdFe
u2Iq9UXHqDRbxnt9X7CM3h9njEB6CLTd6Fx46fAAlRa89gKUuOPZIZ1Roz7C
HPZkAWz2NCR8Oil3L1D+iFOXEUeSpJxCcsucFpmOmt22yNEOXiPFjL7J6Uod
818njAnOnDrzh0ID7H7JR0rhDpUZvXvrHTllfo7u4wubrnr8RkYPIVi5hNqL
DNO1itLM2u3OZiGMb+5tuxy7Bqgw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KmauiuuG2TVAy0iEx17nQdLwA18rR5AdQRRoFy9169zVOYviBVrSYG
/Pn9vQ08kUV12QimJMh4t+Bf2umXjx1IgktLPpKejN0B0nkxrJlaMZZIPO0q
dvLdjRlGKmMr89K7X+s8uasmkKKCVg3nonnuB9jy8UEusX/cLPQ8jZZ+Rdby
rC8OIY6wkrLwaJOV3vfLrcEZ/JMxs2QOQK0bG4vVO2FlNDPV585pauun+EBT
ZFRnRSiTw2yVqOO0HpbAJ9tpw9kAAABPoPIc70MISQABoimvjAIAeKBBlLHE
Z/sCAAAAAARZWg==
====
8
  • Hi and welcome to RE.SE. The uploaded file isn't even available anymore. So the question lacks not only context but also the crucial piece of data that could be used to get some context. Please vote to reopen your own question once you provide the context or at least that file.
    – 0xC0000022L
    Apr 4 at 7:43
  • Given the CREATE TABLE statement this is in all likelihood a single table from some database in binary form. Very often a DBMS will keep a record of the statement that created a given table. In this case the InnoDB suggests that this is either taken from MariaDB or MySQL. It does not seem to be a CSV file.
    – 0xC0000022L
    Apr 5 at 7:34
  • @0xC0000022L someone had shown me this, but I don't know how they were able to create this, probably their custom decompiler. You can probably make something out of it more than me. i.imgur.com/0rc1c9J.png
    – For Chaos
    Apr 6 at 7:57
  • I'm fairly certain that not all of that data is contained in this single table. Instead, I would reckon, the data in this table contains references to other tables or even to data outside of the database (such as some list of strings) which can be used to assemble what your screenshot shows.
    – 0xC0000022L
    Apr 6 at 8:09
  • @ForChaos What is the source of this screenshot you just shared? What is the source of this tbl file and any related software that parses this file? Similar to 0xC0000022L I feel that not all data is present in this single file - any more relevant information would be great.
    – sudhackar
    Apr 6 at 9:03

1 Answer 1

1

Based on the limited knowledge and references on strings I was able to extract some of the fields - most of which don't make sense like

Member(anim_id=1, anim_name=22821, name_len=4, loop=65536, weapon_state=0, freeze_start_time=9830400, blend_time=0, play_speed=1.875, combination=2) bytearray(b'idle')
Member(anim_id=2, anim_name=22826, name_len=7, loop=65536, weapon_state=0, freeze_start_time=9830400, blend_time=0, play_speed=1.875, combination=2) bytearray(b'idle_01')
Member(anim_id=3, anim_name=22834, name_len=7, loop=65536, weapon_state=0, freeze_start_time=9830400, blend_time=0, play_speed=1.875, combination=2) bytearray(b'idle_02')
Member(anim_id=4, anim_name=22842, name_len=11, loop=0, weapon_state=0, freeze_start_time=9830400, blend_time=0, play_speed=1.875, combination=2) bytearray(b'jumplandrun')
Member(anim_id=5, anim_name=22854, name_len=16, loop=0, weapon_state=0, freeze_start_time=9830400, blend_time=0, play_speed=1.875, combination=0) bytearray(b'jumplandrun_left')
Member(anim_id=6, anim_name=22871, name_len=17, loop=0, weapon_state=0, freeze_start_time=9830400, blend_time=0, play_speed=1.875, combination=0) bytearray(b'jumplandrun_right')
  • Field anim_id is a auto-incremented int represented as a dword.
  • Field anim_name is the offset to a C-string in the file - represented as a dword. Its followed by a dword sized field for the length of the string which I called name_len
  • blend_time and weapon_state are 0 for all fields. I could not see a default value of 150 in the binary file.

Similarly I guessed other fields as well - maybe someone with some time can handle and manage the code better.

The file header looks somewhat like this ida screenshot for header The header is followed by the query and then an array of dwords of values for the primary key field. After which this is probably the field type specifier field tytpes where

  • u - unsigned integer
  • s - string
  • f - float

The code to parse looked something like this

import struct
from typing import NamedTuple

struct_fmt = "<2Ii4IeI"
struct_len = struct.calcsize(struct_fmt)
struct_unpack = struct.Struct(struct_fmt).unpack_from
results = []

class Member(NamedTuple):
    anim_id: int
    anim_name: int
    name_len : int
    loop: int
    weapon_state : int
    freeze_start_time : int
    blend_time : int
    play_speed : int
    combination : int

mem = open("unk", "rb").read()
oldidx = 0x5925
def read_c_string(strtidx, anim_id):
    s = bytearray()
    strtidx+=2
    while True:
        c = mem[strtidx]
        if c == 0:
            break
        strtidx+=1
        s.append(c)
    return s

with open("unk", "rb") as f:
    f.seek(0xb53)
    while True:
        data = f.read(struct_len)
        if not data: break
        s = Member(*struct_unpack(data))
        s = s._replace(name_len = s.name_len % 0x10000)
        print(s, end=" ")
        print(read_c_string(s.anim_name, s.anim_id))
        if s.anim_id == 826:
            break
1
  • That is very interesting, all the others .tbl all have same offset, very consistent.
    – For Chaos
    Apr 6 at 13:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.