Exemplo n.º 1
0
 def create_types(self, parameter_names, unique=True):
     cdb_lookuper = tutil.maybe_make_dummy_type(
         'WowClientDB2_Base_Lookuper')
     state = tutil.create_template_and_make_name(db2lookup_state(),
                                                 parameter_names)
     tutil.add_packed_type(
         self.make_name(parameter_names),
         '%s _; %s *lookup; _DWORD id;' % (state, cdb_lookuper), unique)
Exemplo n.º 2
0
 def create_types(self, parameter_names, unique=True):
     node = tutil.create_template_and_make_name(blz_chained_hash_node(),
                                                parameter_names)
     iterator = tutil.add_unpacked_type(
         self.make_name(parameter_names, 'blz::unordered_set::iterator'),
         '''
                                      {node}* element;
                                      {node}** bucket_with_element;
                                      {node}** last_bucket;'''.format(
             node=node), False)
     insert_result = tutil.create_template_and_make_name(
         blz_pair(), [iterator, 'bool'], False)
     iterator = tutil.add_unpacked_type(
         self.make_name(parameter_names), '''
                                      unsigned __int64 num_buckets;
                                      {node}** m_buckets;
                                      unsigned __int64 total_elements;
                                      float elem_per_bucket_threshold;'''.
         format(node=node), unique)
Exemplo n.º 3
0
 def create_types (self, parameter_names, unique = True):
   size = int (parameter_names[0])
   vec = tutil.create_template_and_make_name (tcontainers.blz_vector(), [tutil.integral_for_bytes (size)])
   tutil.add_packed_type ( self.make_name (parameter_names),
                           """
                           int current_state_;
                           int current_id_;
                           %s blob;
                           char in_situ_buffer[%s];
                           """ % (vec, size * 1024),
                           unique)
Exemplo n.º 4
0
                            unique)

class db2lookup (tutil.template_description):
  def __init__ (self):
    tutil.template_description.__init__ (self, "db2lookup", ["BaseBytes"])
  def create_types (self, parameter_names, unique = True):
    cdb_lookuper = tutil.maybe_make_dummy_type ('WowClientDB2_Base_Lookuper')
    state = tutil.create_template_and_make_name (db2lookup_state(), parameter_names)
    tutil.add_packed_type ( self.make_name (parameter_names),
                            '%s _; %s *lookup; _DWORD id;' % (state, cdb_lookuper),
                            unique)

# todo: this appears to merge two different types (see it used twice
# in WowClientDB2_Base), which don't seem to actually be the same :(
# Let's hope nobody uses these for relevant analysis...
db2lookup_8 = tutil.create_template_and_make_name (db2lookup(), ['8'])
db2lookup_16 = tutil.create_template_and_make_name (db2lookup(), ['16'])
cdb_lookuper = tutil.add_packed_type ('WowClientDB2_Base_Lookuper',
                                      """
                                      virtual _UNKNOWN* fun_0();
                                      virtual _UNKNOWN* fun_1();
                                      virtual _UNKNOWN* fun_2();
                                      virtual _UNKNOWN* fun_3();
                                      virtual _UNKNOWN* fun_4();
                                      virtual _UNKNOWN* (__fastcall *get_current)(%s *);
                                      virtual %s* find_first(%s*, _QWORD id); // todo: at least here db2lookup_state only
                                      virtual void find_next(%s*);
                                      virtual _UNKNOWN* fun_8();
                                      virtual _UNKNOWN* fun_9();
                                      virtual _UNKNOWN* fun_10();
                                      virtual %s* fun_11(%s *);
Exemplo n.º 5
0
        tutil.template_description.__init__(self, "db2lookup", ["BaseBytes"])

    def create_types(self, parameter_names, unique=True):
        cdb_lookuper = tutil.maybe_make_dummy_type(
            'WowClientDB2_Base_Lookuper')
        state = tutil.create_template_and_make_name(db2lookup_state(),
                                                    parameter_names)
        tutil.add_packed_type(
            self.make_name(parameter_names),
            '%s _; %s *lookup; _DWORD id;' % (state, cdb_lookuper), unique)


# todo: this appears to merge two different types (see it used twice
# in WowClientDB2_Base), which don't seem to actually be the same :(
# Let's hope nobody uses these for relevant analysis...
db2lookup_8 = tutil.create_template_and_make_name(db2lookup(), ['8'])
db2lookup_16 = tutil.create_template_and_make_name(db2lookup(), ['16'])
cdb_lookuper = tutil.add_packed_type(
    'WowClientDB2_Base_Lookuper', """
                                      virtual _UNKNOWN* fun_0();
                                      virtual _UNKNOWN* fun_1();
                                      virtual _UNKNOWN* fun_2();
                                      virtual _UNKNOWN* fun_3();
                                      virtual _UNKNOWN* fun_4();
                                      virtual _UNKNOWN* (__fastcall *get_current)(%s *);
                                      virtual %s* find_first(%s*, _QWORD id); // todo: at least here db2lookup_state only
                                      virtual void find_next(%s*);
                                      virtual _UNKNOWN* fun_8();
                                      virtual _UNKNOWN* fun_9();
                                      virtual _UNKNOWN* fun_10();
                                      virtual %s* fun_11(%s *);