'Initialize ptable for ctype
See __ctype_b_loc.c in libc implementation'

def _initialize_b_loc_table(self):

    malloc = angr.SIM_PROCEDURES['libc']['malloc']
    table = self.inline_call(malloc, 768).ret_expr
    table_ptr = self.inline_call(malloc, (self.state.arch.bits / 8)).ret_expr
    for (pos, c) in enumerate(self.state.libc.LOCALE_ARRAY):
        self.state.memory.store((table + (pos * 2)), self.state.se.BVV(c, 16), endness=self.state.arch.memory_endness, inspect=False, disable_actions=True)
    table += 256
    self.state.memory.store(table_ptr, table, size=(self.state.arch.bits / 8), endness=self.state.arch.memory_endness, inspect=False, disable_actions=True)
    self.state.libc.ctype_b_loc_table_ptr = table_ptr
