12 #define if_true_return(cond, ret) \
24 if (
size <
sizeof(ret)) {
173 size_t i, j = 0, left = 0;
176 char digist2hex[] =
"0123456789abcdef";
206 for (
i = 0;
i < ndigits;
i++) {
212 hexstr[--j] = digist2hex[
tmp & 0xf];
219 hexstr[--j] = digist2hex[
tmp & 0xf];
241 RZ_LOG_ERROR(
"bad marshal data (string ref out of range)");
325 if ((pyc->
magic_int & 0xffff) <= 62061) {
347 if ((pyc->
magic_int & 0xffff) <= 62061) {
410 RZ_LOG_ERROR(
"bad marshal data (string size out of range)");
436 RZ_LOG_ERROR(
"bad marshal data (unicode size out of range)");
459 RZ_LOG_ERROR(
"bad marshal data (string size out of range)");
536 RZ_LOG_ERROR(
"bad marshal data (tuple size out of range)\n");
557 RZ_LOG_ERROR(
"bad marshal data (list size out of range)\n");
618 RZ_LOG_ERROR(
"bad marshal data (set size out of range)\n");
716 switch (object->
type) {
777 if (!copy || !
object) {
781 copy->
type =
object->type;
782 switch (object->
type) {
880 }
else if (v10_to_12) {
886 if (has_posonlyargcount) {
892 if (((3020 < (pyc->
magic_int & 0xffff)) && ((pyc->
magic_int & 0xffff) < 20121)) && (!v11_to_14)) {
900 }
else if (v10_to_12) {
908 }
else if (v11_to_14 || v10_to_12) {
916 }
else if (v10_to_12) {
939 if (!(v10_to_12 || v13_to_20)) {
952 }
else if (v11_to_14) {
1118 if (flag && ref_idx) {
static ut32 neg(ArmOp *op)
RzList * symbols(RzBinFile *bf)
RzList * sections(RzBinFile *bf)
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len key
unsigned short prefix[65536]
RZ_API void Ht_() free(HtName_(Ht) *ht)
return memset(p, 0, total)
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
RZ_API RZ_OWN RzList * rz_list_newf(RzListFree f)
Returns a new initialized RzList pointer and sets the free method.
RZ_API RZ_OWN RzList * rz_list_clone(RZ_NONNULL const RzList *list)
Shallow copies of the list (but doesn't free its elements)
RZ_API RZ_BORROW void * rz_list_get_n(RZ_NONNULL const RzList *list, ut32 n)
Returns the N-th element of the list.
RZ_API ut32 rz_list_length(RZ_NONNULL const RzList *list)
Returns the length of the list.
RZ_API RZ_BORROW RzListIter * rz_list_append(RZ_NONNULL RzList *list, void *data)
Appends at the end of the list a new element.
RZ_API void rz_list_free(RZ_NONNULL RzList *list)
Empties the list and frees the list pointer.
void * malloc(size_t size)
return strdup("=SP r13\n" "=LR r14\n" "=PC r15\n" "=A0 r0\n" "=A1 r1\n" "=A2 r2\n" "=A3 r3\n" "=ZF zf\n" "=SF nf\n" "=OF vf\n" "=CF cf\n" "=SN or0\n" "gpr lr .32 56 0\n" "gpr pc .32 60 0\n" "gpr cpsr .32 64 0 ____tfiae_________________qvczn\n" "gpr or0 .32 68 0\n" "gpr tf .1 64.5 0 thumb\n" "gpr ef .1 64.9 0 endian\n" "gpr jf .1 64.24 0 java\n" "gpr qf .1 64.27 0 sticky_overflow\n" "gpr vf .1 64.28 0 overflow\n" "gpr cf .1 64.29 0 carry\n" "gpr zf .1 64.30 0 zero\n" "gpr nf .1 64.31 0 negative\n" "gpr itc .4 64.10 0 if_then_count\n" "gpr gef .4 64.16 0 great_or_equal\n" "gpr r0 .32 0 0\n" "gpr r1 .32 4 0\n" "gpr r2 .32 8 0\n" "gpr r3 .32 12 0\n" "gpr r4 .32 16 0\n" "gpr r5 .32 20 0\n" "gpr r6 .32 24 0\n" "gpr r7 .32 28 0\n" "gpr r8 .32 32 0\n" "gpr r9 .32 36 0\n" "gpr r10 .32 40 0\n" "gpr r11 .32 44 0\n" "gpr r12 .32 48 0\n" "gpr r13 .32 52 0\n" "gpr r14 .32 56 0\n" "gpr r15 .32 60 0\n" "gpr r16 .32 64 0\n" "gpr r17 .32 68 0\n")
static pyc_object * get_ascii_interned_object(RzBuffer *buffer)
static pyc_object * get_float_object(RzBuffer *buffer)
static pyc_object * get_int64_object(RzBuffer *buffer)
static ut8 get_ut8(RzBuffer *buffer, bool *error)
static double get_float64(RzBuffer *buffer, bool *error)
static st64 get_st64(RzBuffer *buffer, bool *error)
ut64 get_code_object_addr(RzBinPycObj *pyc, RzBuffer *buffer, ut32 magic)
static void free_object(pyc_object *object)
static pyc_object * get_unicode_object(RzBuffer *buffer)
static pyc_object * get_ascii_object(RzBuffer *buffer)
static pyc_object * get_list_object(RzBinPycObj *pyc, RzBuffer *buffer)
static ut16 get_ut16(RzBuffer *buffer, bool *error)
static st32 get_st32(RzBuffer *buffer, bool *error)
static pyc_object * get_long_object(RzBuffer *buffer)
static pyc_object * get_small_tuple_object(RzBinPycObj *pyc, RzBuffer *buffer)
static pyc_object * get_stringref_object(RzBinPycObj *pyc, RzBuffer *buffer)
static pyc_object * get_string_object(RzBuffer *buffer)
static pyc_object * get_short_ascii_interned_object(RzBuffer *buffer)
static pyc_object * get_none_object(void)
static pyc_object * get_ref_object(RzBinPycObj *pyc, RzBuffer *buffer)
static ut8 * get_bytes(RzBuffer *buffer, ut32 size)
static pyc_object * get_false_object(void)
static pyc_object * get_binary_float_object(RzBuffer *buffer)
static pyc_object * get_complex_object(RzBinPycObj *pyc, RzBuffer *buffer)
static bool extract_sections_symbols(RzBinPycObj *pyc, pyc_object *obj, RzList *sections, RzList *symbols, RzList *cobjs, char *prefix)
static pyc_object * get_set_object(RzBinPycObj *pyc, RzBuffer *buffer)
static pyc_object * get_int_object(RzBuffer *buffer)
static pyc_object * get_dict_object(RzBinPycObj *pyc, RzBuffer *buffer)
static pyc_object * get_true_object(void)
#define if_true_return(cond, ret)
static pyc_object * get_object(RzBinPycObj *pyc, RzBuffer *buffer)
static pyc_object * get_code_object(RzBinPycObj *pyc, RzBuffer *buffer)
static pyc_object * get_binary_complex_object(RzBuffer *buffer)
static pyc_object * get_interned_object(RzBinPycObj *pyc, RzBuffer *buffer)
bool get_sections_symbols_from_code_objects(RzBinPycObj *pyc, RzBuffer *buffer, RzList *sections, RzList *symbols, RzList *cobjs, ut32 magic)
static pyc_object * get_array_object_generic(RzBinPycObj *pyc, RzBuffer *buffer, ut32 size)
static pyc_object * get_tuple_object(RzBinPycObj *pyc, RzBuffer *buffer)
static pyc_object * copy_object(pyc_object *object)
static pyc_object * get_short_ascii_object(RzBuffer *buffer)
static ut32 get_ut32(RzBuffer *buffer, bool *error)
static pyc_object * get_ascii_object_generic(RzBuffer *buffer, ut32 size, bool interned)
@ TYPE_SHORT_ASCII_INTERNED
bool magic_int_within(ut32 target_magic, ut32 lower, ut32 upper, bool *error)
#define RZ_BIN_TYPE_FUNC_STR
RZ_API ut64 rz_buf_tell(RZ_NONNULL RzBuffer *b)
Return the current cursor position.
#define rz_buf_read_le16(b, result)
Read a big endian or little endian (ut16, ut32, ut64) at the specified offset in the buffer and shift...
#define rz_buf_read_le32(b, result)
#define rz_buf_read_le64(b, result)
RZ_API st64 rz_buf_read(RZ_NONNULL RzBuffer *b, RZ_NONNULL RZ_OUT ut8 *buf, ut64 len)
void(* RzListFree)(void *ptr)
#define RZ_LOG_ERROR(fmtstr,...)
RZ_API char * rz_str_newf(const char *fmt,...) RZ_PRINTF_CHECK(1
RZ_API void rz_str_trim(RZ_NONNULL RZ_INOUT char *str)
Removes whitespace characters (space, tab, newline etc.) from the beginning and end of a string.
void error(const char *msg)
ut64(WINAPI *w32_GetEnabledXStateFeatures)()