12 #include "../core_private.h"
15 #define PF_USAGE_STR "pf[.k[.f[=v]]|[v]]|[n]|[0|cnt][fmt] [a0 a1 ...]"
18 "Usage: pp[d]",
"",
"print patterns",
19 "pp0",
"",
"print buffer filled with zeros",
20 "pp1",
"",
"print incremental byte pattern (honor lower bits of cur address and bsize)",
21 "pp2",
"",
"print incremental word pattern",
22 "pp4",
"",
"print incremental dword pattern",
23 "pp8",
"",
"print incremental qword pattern",
24 "ppa",
"[lu]",
"latin alphabet (lowercase, uppercases restrictions)",
25 "ppd",
"",
"print debruijn pattern (see rz-gg -P, -q and wopD)",
26 "ppf",
"",
"print buffer filled with 0xff",
27 "ppn",
"",
"numeric pin patterns",
32 "Usage:",
"pc",
" # Print in code",
34 "pc*",
"",
"print 'wx' rizin commands",
35 "pcA",
"",
".bytes with instructions in comments",
36 "pca",
"",
"GAS .byte blob",
37 "pcd",
"",
"C dwords (8 byte)",
38 "pch",
"",
"C half-words (2 byte)",
39 "pci",
"",
"C array of bytes with instructions",
40 "pcJ",
"",
"javascript",
43 "pco",
"",
"Objective-C",
46 "pcS",
"",
"shellscript that reconstructs the bin",
49 "pcV",
"",
"V (vlang.io)",
50 "pcw",
"",
"C words (4 byte)",
57 "Usage: pF[apdbA]",
"[len]",
"parse ASN1, PKCS, X509, DER, protobuf, axml",
58 "pFa",
"[len]",
"decode ASN1 from current block",
59 "pFaq",
"[len]",
"decode ASN1 from current block (quiet output)",
60 "pFb",
"[len]",
"decode raw proto buffers.",
61 "pFbv",
"[len]",
"decode raw proto buffers (verbose).",
62 "pFo",
"[len]",
"decode ASN1 OID",
63 "pFp",
"[len]",
"decode PKCS7",
64 "pFx",
"[len]",
"Same with X509",
65 "pFA",
"[len]",
"decode Android Binary XML from current block",
70 "Usage: pr[glx]",
"[size]",
"print N raw bytes",
71 "prc",
"[=fep..]",
"print bytes as colors in palette",
72 "prg",
"[?]",
"print raw GUNZIPped block",
73 "prx",
"",
"printable chars with real offset (hyew)",
74 "prz",
"",
"print raw zero terminated string",
79 "Usage: prg[io]",
"",
"print raw GUNZIPped block",
80 "prg",
"",
"print gunzipped data of current block",
81 "prgi",
"",
"show consumed bytes when inflating",
82 "prgo",
"",
"show output bytes after inflating",
87 "Usage:",
"&[-|<cmd>]",
"Manage tasks (WARNING: Experimental. Use with caution!)",
88 "&",
" <cmd>",
"run <cmd> in a new background task",
89 "&t",
" <cmd>",
"run <cmd> in a new transient background task (auto-delete when it is finished)",
90 "&",
"",
"list all tasks",
91 "&j",
"",
"list all tasks (in JSON)",
92 "&=",
" 3",
"show output of task 3",
93 "&b",
" 3",
"break task 3",
94 "&-",
" 1",
"delete task #1 or schedule for deletion when it is finished",
95 "&",
"-*",
"delete all done tasks",
96 "&?",
"",
"show this help",
97 "&&",
" 3",
"wait until task 3 is finished",
98 "&&",
"",
"wait until all tasks are finished",
103 "Usage: [.][#]<cmd>[*] [`cmd`] [@ addr] [~grep] [|syscmd] [>[>]file]",
"",
"",
104 "0",
"",
"alias for 's 0'",
105 "0x",
"addr",
"alias for 's 0x..'",
106 "#",
"cmd",
"if # is a number repeat the command # times",
107 "/*",
"",
"start multiline comment",
108 "*/",
"",
"end multiline comment",
109 ".",
"cmd",
"execute output of command as rizin script",
110 ".:",
"8080",
"wait for commands on port 8080",
111 ".!",
"rz-bin -re $FILE",
"run command output as rizin script",
112 "*",
"",
"output of command in rizin script format (CC*)",
113 "j",
"",
"output of command in JSON format (pdj)",
114 "~",
"?",
"count number of lines (like wc -l)",
115 "~",
"??",
"show internal grep help",
116 "~",
"..",
"internal less",
117 "~",
"{}",
"json indent",
118 "~",
"{}..",
"json indent and less",
119 "~",
"word",
"grep for lines matching word",
120 "~",
"!word",
"grep for lines NOT matching word",
121 "~",
"word[2]",
"grep 3rd column of lines matching word",
122 "~",
"word:3[0]",
"grep 1st column from the 4th line matching word",
123 "@",
" 0x1024",
"temporary seek to this address (sym.main+3)",
124 "@",
" [addr]!blocksize",
"temporary set a new blocksize",
125 "@..",
"addr",
"temporary partial address seek (see s..)",
126 "@!",
"blocksize",
"temporary change the block size (p8@3!3)",
127 "@{",
"from to}",
"temporary set from and to for commands supporting ranges",
128 "@a:",
"arch[:bits]",
"temporary set arch and bits",
129 "@b:",
"bits",
"temporary set asm.bits",
130 "@B:",
"nth",
"temporary seek to nth instruction in current bb (negative numbers too)",
131 "@e:",
"k=v,k=v",
"temporary change eval vars",
132 "@f:",
"file",
"temporary replace block with file contents",
133 "@F:",
"flagspace",
"temporary change flag space",
134 "@i:",
"nth.op",
"temporary seek to the Nth relative instruction",
135 "@k:",
"k",
"temporary seek at value of sdb key `k`",
136 "@o:",
"fd",
"temporary switch to another fd",
137 "@r:",
"reg",
"tmp seek to reg value (f.ex pd@r:PC)",
138 "@s:",
"string",
"same as above but from a string",
139 "@v:",
"value",
"modify the current offset to a custom value",
140 "@x:",
"909192",
"from hex pairs string",
141 "@@=",
"1 2 3",
"run the previous command at offsets 1, 2 and 3",
142 "@@",
" hit*",
"run the command on every flag matching 'hit*'",
143 "@@?",
"[ktfb..]",
"show help for the iterator operator",
144 "@@@",
" [type]",
"run a command on every [type] (see @@@? for help)",
145 ">",
"file",
"pipe output of command to file",
146 ">>",
"file",
"append to file",
147 "H>",
"file",
"pipe output of command to file in HTML",
148 "H>>",
"file",
"append to file with the output of command in HTML",
149 "`",
"pdq~push:0[0]`",
"replace output of command inside the line",
150 "|",
"cmd",
"pipe output to command (pd|less) (.dr*)",
155 "@@",
"",
" # foreach iterator command:",
156 "x",
" @@ sym.*",
"run 'x' over all flags matching 'sym.' in current flagspace",
157 "x",
" @@dbt[abs]",
"run 'x' command on every backtrace address, bp or sp",
158 "x",
" @@.file",
"run 'x' over the offsets specified in the file (one offset per line)",
159 "x",
" @@=off1 off2 ..",
"manual list of offsets",
160 "x",
" @@/x 9090",
"temporary set cmd.hit to run a command on each search result",
161 "x",
" @@k sdbquery",
"run 'x' on all offsets returned by that sdbquery",
162 "x",
" @@t",
"run 'x' on all threads (see dp)",
163 "x",
" @@b",
"run 'x' on all basic blocks of current function (see afb)",
164 "x",
" @@i",
"run 'x' on all instructions of the current function (see pdr)",
165 "x",
" @@iS",
"run 'x' on all sections adjusting blocksize",
166 "x",
" @@f",
"run 'x' on all functions (see aflq)",
167 "x",
" @@f:write",
"run 'x' on all functions matching write in the name",
168 "x",
" @@s:from to step",
"run 'x' on all offsets from, to incrementing by step",
169 "x",
" @@c:cmd",
"the same as @@=`` without the backticks",
170 "x",
" @@=`pdf~call[0]`",
"run 'x' at every call offset of the current function",
176 "@@@",
"",
" # foreach offset+size iterator command:",
177 "x",
" @@@=",
"[addr] [size] ([addr] [size] ...)",
178 "x",
" @@@b",
"basic blocks of current function",
179 "x",
" @@@c:cmd",
"Same as @@@=`cmd`, without the backticks",
180 "x",
" @@@C:cmd",
"comments matching",
181 "x",
" @@@i",
"imports",
182 "x",
" @@@r",
"registers",
183 "x",
" @@@s",
"symbols",
184 "x",
" @@@st",
"strings",
185 "x",
" @@@S",
"sections",
186 "x",
" @@@m",
"io.maps",
187 "x",
" @@@M",
"dbg.maps (See ?$?~size)",
188 "x",
" @@@f",
"flags",
189 "x",
" @@@f:hit*",
"flags matching glob expression",
190 "x",
" @@@F",
"functions (set fcn size which may be incorrect if not linear)",
191 "x",
" @@@F:glob",
"functions matching glob expression",
192 "x",
" @@@t",
"threads",
193 "x",
" @@@r",
"regs",
199 "Usage:",
"p[=68abcdDfiImrstuxz] [arg|len] [@addr]",
"",
200 "p",
"[b|B|xb] [len] ([S])",
"bindump N bits skipping S bytes",
201 "p",
"[iI][df] [len]",
"print N ops/bytes (f=func) (see pi? and pdq)",
202 "p",
"[kK] [len]",
"print key in randomart (K is for mosaic)",
203 "p-",
"[?][jh] [mode]",
"bar|json|histogram blocks (mode: e?search.in)",
204 "p2",
" [len]",
"8x8 2bpp-tiles",
205 "p6",
"[de] [len]",
"base64 decode/encode",
206 "p8",
"[?][j] [len]",
"8bit hexpair list of bytes",
207 "p=",
"[?][bep] [N] [L] [b]",
"show entropy/printable chars/chars bars",
208 "pa",
"[edD] [arg]",
"pa:assemble pa[dD]:disasm or pae: esil from hex",
209 "pA",
"[n_ops]",
"show n_ops address and type",
210 "pb",
"[?] [n]",
"bitstream of N bits",
211 "pB",
"[?] [n]",
"bitstream of N bytes",
212 "pc",
"[?][p] [len]",
"output C (or python) format",
213 "pC",
"[aAcdDxw] [rows]",
"print disassembly in columns (see hex.cols and pdq)",
214 "pd",
"[?] [sz] [a] [b]",
"disassemble N opcodes (pd) or N bytes (pD)",
215 "pf",
"[?][.nam] [fmt]",
"print formatted data (pf.name, pf.name $<expr>)",
216 "pF",
"[?][apx]",
"print asn1, pkcs7 or x509",
217 "pg",
"[?][x y w h] [cmd]",
"create new visual gadget or print it (see pg? for details)",
218 "ph",
"[?][=|hash] ([len])",
"calculate hash for a block",
219 "pi",
"[?][bdefrj] [num]",
"print instructions",
220 "pI",
"[?][iI][df] [len]",
"print N instructions/bytes (f=func)",
221 "pj",
"[?] [len]",
"print as indented JSON",
222 "pm",
"[?] [magic]",
"print libmagic data (see pm? and /m?)",
223 "po",
"[?] hex",
"print operation applied to block (see po?)",
224 "pp",
"[?][sz] [len]",
"print patterns, see pp? for more help",
225 "pr",
"[?][glx] [len]",
"print N raw bytes (in lines or hexblocks, 'g'unzip)",
226 "ps",
"[?][pwz] [len]",
"print pascal/wide/zero-terminated strings",
227 "pt",
"[?][dn] [len]",
"print different timestamps",
228 "pu",
"[?][w] [len]",
"print N url encoded bytes (w=wide)",
229 "pv",
"[?][jh] [mode]",
"show variable/pointer/value in memory",
230 "px",
"[?][owq] [len]",
"hexdump of N bytes (o=octal, w=32bit, q=64bit)",
231 "pz",
"[?] [len]",
"print zoom view (see pz? for help)",
236 "Usage:",
"p=[=bep?][qj] [N] ([len]) ([offset]) ",
"show entropy/printable chars/chars bars",
237 "e ",
"zoom.in",
"specify range for zoom",
238 "p=",
"",
"print bytes of current block in bars",
239 "p==",
"[..]",
"same subcommands as p=, using column bars instead of rows",
240 "p=",
"0",
"number of 0x00 bytes for each filesize/blocksize",
241 "p=",
"2",
"short (signed int16) bars, good for waves",
242 "p=",
"a",
"analysis bbs maps",
243 "p=",
"A",
"analysis stats maps (see p-)",
244 "p=",
"b",
"same as above",
245 "p=",
"c",
"number of calls per block",
246 "p=",
"d",
"min/max/number of unique bytes in block",
247 "p=",
"e",
"entropy for each filesize/blocksize",
248 "p=",
"F",
"number of 0xFF bytes for each filesize/blocksize",
249 "p=",
"i",
"number of invalid instructions per block",
250 "p=",
"j",
"number of jumps and conditional jumps in block",
251 "p=",
"m",
"number of flags and marks in block",
252 "p=",
"p",
"number of printable bytes for each filesize/blocksize",
253 "p=",
"s",
"number of syscall and privileged instructions",
254 "p=",
"z",
"number of chars in strings in block",
259 "Usage:",
"pj[..] [size]",
"",
260 "pj",
"",
"print current block as indented JSON",
261 "pj.",
"",
"print as indented JSON from 0 to the current offset",
262 "pj..",
"",
"print JSON path from 0 to the current offset",
267 "Usage:",
"p-[hj] [nblocks] ",
"bar|json|histogram blocks",
268 "p-",
"",
"show ascii-art bar of metadata in file boundaries",
269 "p-e",
"",
"show ascii-art bar of entropy per block",
270 "p-h",
"",
"show histogram analysis of metadata per block",
271 "p-j",
"",
"show json format",
278 "pf",
" fmt",
"Show data using the given format-string. See 'pf\?\?' and 'pf\?\?\?'.",
279 "pf",
"?",
"Show this help",
280 "pf",
"??",
"Format characters",
281 "pf",
"???",
"pf usage examples",
282 "pf* ",
"fmt_name|fmt",
"Show data using (named) format as rizin flag create commands",
283 "pf.",
"",
"List all format definitions",
284 "pf.",
"fmt_name",
"Show data using named format",
285 "pf.",
"fmt_name.field_name",
"Show specific data field using named format",
286 "pf.",
"fmt_name.field_name=33",
"Set new value for the specified field in named format",
287 "pf.",
"fmt_name.field_name[i]",
"Show element i of array field_name",
288 "pf.",
"name [0|cnt]fmt",
"Define a new named format",
289 "pf?",
"fmt_name",
"Show the definition of a named format",
290 "pfc ",
"fmt_name|fmt",
"Show data using (named) format as C string",
291 "pfd.",
"fmt_name",
"Show data using named format as graphviz commands",
292 "pfj ",
"fmt_name|fmt",
"Show data using (named) format in JSON",
293 "pfo",
" fdf_name",
"Load a Format Definition File (fdf)",
294 "pfo",
"",
"List all format definition files (fdf)",
295 "pfq",
" fmt ...",
"Quiet print format (do now show address)",
296 "pfs",
"[.fmt_name| fmt]",
"Print the size of (named) format in bytes",
297 "pfv.",
"fmt_name[.field]",
"Print value(s) only for named format. Useful for one-liners",
304 " ",
"b",
"byte (unsigned)",
305 " ",
"B",
"resolve enum bitfield (see t?)",
306 " ",
"c",
"char (signed byte)",
307 " ",
"C",
"byte in decimal",
308 " ",
"d",
"0xHEX value (4 bytes) (see 'i' and 'x')",
309 " ",
"D",
"disassemble one opcode",
310 " ",
"e",
"temporally swap endian",
311 " ",
"E",
"resolve enum name (see t?)",
312 " ",
"f",
"float value (4 bytes)",
313 " ",
"F",
"double value (8 bytes)",
314 " ",
"i",
"signed integer value (4 bytes) (see 'd' and 'x')",
315 " ",
"n",
"next char specifies size of signed value (1, 2, 4 or 8 byte(s))",
316 " ",
"N",
"next char specifies size of unsigned value (1, 2, 4 or 8 byte(s))",
317 " ",
"o",
"octal value (4 byte)",
318 " ",
"p",
"pointer reference (2, 4 or 8 bytes)",
319 " ",
"q",
"quadword (8 bytes)",
320 " ",
"Q",
"uint128_t (16 bytes)",
321 " ",
"r",
"CPU register `pf r (eax)plop`",
322 " ",
"s",
"32bit pointer to string (4 bytes)",
323 " ",
"S",
"64bit pointer to string (8 bytes)",
324 " ",
"t",
"UNIX timestamp (4 bytes)",
325 " ",
"T",
"show Ten first bytes of buffer",
326 " ",
"u",
"uleb128 (variable length)",
327 " ",
"w",
"word (2 bytes unsigned short in hex)",
328 " ",
"x",
"0xHEX value and flag (fd @ addr) (see 'd' and 'i')",
329 " ",
"X",
"show formatted hexpairs",
330 " ",
"z",
"null terminated string",
331 " ",
"Z",
"null terminated wide string",
332 " ",
"?",
"data structure `pf ? (struct_name)example_name`",
333 " ",
"*",
"next char is pointer (honors asm.bits)",
334 " ",
"+",
"toggle show flags for each offset",
335 " ",
":",
"skip 4 bytes",
336 " ",
".",
"skip 1 byte",
337 " ",
";",
"rewind 4 bytes",
338 " ",
",",
"rewind 1 byte",
345 "pf",
" 3xi foo bar",
"3-array of struct, each with named fields: 'foo' as hex, and 'bar' as int",
346 "pf",
" B (BitFldType)arg_name`",
"bitfield type",
347 "pf",
" E (EnumType)arg_name`",
"enum type",
348 "pf",
" obj=xxdz prev next size name",
"Same as above",
349 "pf",
" *z*i*w nb name blob",
"Print the pointers with given labels",
350 "pf",
" iwq foo bar troll",
"Print the iwq format with foo, bar, troll as the respective names for the fields",
351 "pf",
" 0iwq foo bar troll",
"Same as above, but considered as a union (all fields at offset 0)",
352 "pf.",
"obj xxdz prev next size name",
"Define the obj format as xxdz",
353 "pf.",
"plop ? (troll)mystruct",
"Use structure troll previously defined",
354 "pfj.",
"plop @ 0x14",
"Apply format object at the given offset",
355 "pf",
" 10xiz pointer length string",
"Print a size 10 array of the xiz struct with its field names",
356 "pf",
" 5sqw string quad word",
"Print an array with sqw struct along with its field names",
357 "pf",
" {integer}? (bifc)",
"Print integer times the following format (bifc)",
358 "pf",
" [4]w[7]i",
"Print an array of 4 words and then an array of 7 integers",
359 "pf",
" ic...?i foo bar \"(pf xw yo foo)troll\" yo",
"Print nested anonymous structures",
360 "pf",
" ;..x",
"Print value located 6 bytes from current offset",
361 "pf",
" [10]z[3]i[10]Zb",
"Print an fixed size str, widechar, and var",
362 "pfj",
" +F @ 0x14",
"Print the content at given offset with flag",
363 "pf",
" n2",
"print signed short (2 bytes) value. Use N instead of n for printing unsigned values",
364 "pf",
" [2]? (plop)structname @ 0",
"Prints an array of structs",
365 "pf",
" eqew bigWord beef",
"Swap endianness and print with given labels",
366 "pf",
".foo rr (eax)reg1 (eip)reg2",
"Create object referencing to register values ",
367 "pf",
" tt troll plop",
"print time stamps with labels troll and plop",
372 "Usage:",
"pi[befr] [num]",
"",
373 "pia",
"",
"print all possible opcodes (byte per byte)",
374 "pib",
"",
"print instructions of basic block",
375 "pie",
"",
"print offset + esil expression",
376 "pif",
"[?]",
"print instructions of function",
377 "pir",
"",
"like 'pdr' but with 'pI' output",
378 "piu",
"[q] [limit]",
"disasm until ujmp or ret is found (see pdp)",
379 "pix",
" [hexpairs]",
"alias for pad",
389 "print this help message",
392 "print all calls from this function",
395 "print all calls from this function in JSON format",
398 "print instructions of function in JSON format",
402 "Usage:",
"po[24aAdlmorsx]",
" [hexpairs] @ addr[!bsize]",
403 "po[24aAdlmorsx]",
"",
"without hexpair values, clipboard is used",
404 "po2",
" [val]",
"2= 2 byte endian swap",
405 "po4",
" [val]",
"4= 4 byte endian swap",
406 "poa",
" [val]",
"+= addition (f.ex: poa 0102)",
407 "poA",
" [val]",
"&= and",
408 "pod",
" [val]",
"/= divide",
409 "pol",
" [val]",
"<<= shift left",
410 "pom",
" [val]",
"*= multiply",
411 "poo",
" [val]",
"|= or",
412 "por",
" [val]",
">>= shift right",
413 "pos",
" [val]",
"-= substraction",
414 "pox",
" [val]",
"^= xor (f.ex: pox 0x90)",
419 "Usage:",
"ps[bijqpsuwWxz+] [N]",
"Print String",
420 "ps",
"",
"print string",
421 "ps+",
"[j]",
"print libc++ std::string (same-endian, ascii, zero-terminated)",
422 "psb",
"",
"print strings in current block",
423 "psi",
"",
"print string inside curseek",
424 "psj",
"",
"print string in JSON format",
425 "psp",
"[j]",
"print pascal string",
426 "pss",
"",
"print string in screen (wrap width)",
427 "psu",
"[zj]",
"print utf16 unicode (json)",
428 "psw",
"[j]",
"print 16bit wide little endian string",
429 "psW",
"[j]",
"print 32bit wide little endian string",
430 "psx",
"",
"show string with escaped chars",
431 "psz",
"[j]",
"print zero-terminated string",
436 "Usage: pv[j][1,2,4,8,z]",
"",
"",
437 "pv",
"",
"print bytes based on asm.bits",
438 "pv1",
"",
"print 1 byte in memory",
439 "pv2",
"",
"print 2 bytes in memory",
440 "pv4",
"",
"print 4 bytes in memory",
441 "pv8",
"",
"print 8 bytes in memory",
442 "pvz",
"",
"print value as string (alias for ps)",
447 "Usage:",
"px[0afoswqWqQ][f]",
" # Print heXadecimal",
448 "px",
"",
"show hexdump",
449 "px/",
"",
"same as x/ in gdb (help x)",
450 "px0",
"",
"8bit hexpair list of bytes until zero byte",
451 "pxa",
"",
"show annotated hexdump",
452 "pxA",
"[?]",
"show op analysis color map",
453 "pxb",
"",
"dump bits in hexdump form",
454 "pxc",
"",
"show hexdump with comments",
455 "pxd",
"[?1248]",
"signed integer dump (1 byte, 2 and 4)",
456 "pxe",
"",
"emoji hexdump! :)",
457 "pxf",
"",
"show hexdump of current function",
458 "pxh",
"",
"show hexadecimal half-words dump (16bit)",
459 "pxH",
"",
"same as above, but one per line",
460 "pxi",
"",
"HexII compact binary representation",
461 "pxl",
"",
"display N lines (rows) of hexdump",
462 "pxo",
"",
"show octal dump",
463 "pxq",
"",
"show hexadecimal quad-words dump (64bit)",
464 "pxQ",
"[q]",
"same as above, but one per line",
465 "pxr",
"[1248][qj]",
"show hexword references (q=quiet, j=json)",
466 "pxs",
"",
"show hexadecimal in sparse mode",
467 "pxt",
"[*.] [origin]",
"show delta pointer table in rizin commands",
468 "pxw",
"",
"show hexadecimal words dump (32bit)",
469 "pxW",
"[q]",
"same as above, but one per line (q=quiet)",
470 "pxx",
"",
"show N bytes of hex-less hexdump",
471 "pxX",
"",
"show N words of hex-less hexdump",
476 "Usage: pxA [len]",
"",
"show op analysis color map",
477 "$$",
"",
"int/swi/trap/new\n",
478 "+-*/",
"",
"math ops\n",
482 "<<>>",
"",
"shift ops\n",
483 "==",
"",
"cmp/test\n",
484 "XX",
"",
"invalid\n",
488 "cJ",
"",
"conditional jump\n",
489 "io",
"",
"in/out ops\n",
490 "mv",
"",
"move,lea,li\n",
491 "|&^",
"",
"bin ops\n",
756 const char *chars =
" .,:;!O@#";
759 char ch, ch2, *
color;
767 if (cols < 1 || cols > 0xfffff) {
770 for (
i = 0;
i <
len;
i += cols) {
778 for (j =
i; j <
i + cols; j++) {
788 int brightness = ((color_val & 0xff0000) >> 16) + 2 * ((color_val & 0xff00) >> 8) + (color_val & 0xff) / 3;
790 brightness <= 0x7f * 3 ?
"fff" :
"000", color_val);
793 if (show_cursor && core->
print->
cur == j) {
800 if (show_cursor && core->
print->
cur == j) {
803 const int idx = ((
float)block[j] / 255) * (strlen(chars) - 1);
817 ch = strchr(chars, ch) ?
'?' : ch;
856 int i, columns =
w / colwidth;
869 rows = user_rows + 1;
875 for (
i = 0;
i < columns;
i++) {
903 rz_list_foreach (methods,
iter, sym) {
905 if (sym->
vaddr < at_min) {
922 rz_list_foreach (
cs,
iter,
c) {
923 if (!
c || !
c->name || !
c->name[0]) {
950 rows = user_rows + 1;
958 for (
i = 0;
i < columns;
i++) {
992 int colwidth = hex_cols * 5;
993 int i, columns =
w / (colwidth * 0.9);
998 rows = user_rows + 1;
1002 eprintf(
"Couldn't allocate a canvas with %d rows\n", rows);
1008 int bsize = hex_cols * rows;
1009 if (!strcmp(xcmd,
"pxA")) {
1012 for (
i = 0;
i < columns;
i++) {
1036 bool histogram[256] = { 0 };
1037 for (
i = 0;
i < bsz;
i++) {
1038 histogram[block[
i]] =
true;
1040 for (
i = 0;
i < 256;
i++) {
1072 entropy = 9 * entropy / 200;
1091 const char *help_msg[] = {
1092 " STAHP IT!!!",
"",
"",
1111 eprintf(
"Malformed object: did you supply enough data?\ntry to change the block size (see b?)\n");
1127 eprintf(
"Malformed object: did you supply enough data?\ntry to change the block size (see b?)\n");
1141 eprintf(
"Malformed object: did you supply enough data?\ntry to change the block size (see b?)\n");
1159 eprintf(
"Malformed object: did you supply enough data?\ntry to change the block size (see b?)\n");
1198 "Usage: pg[-]",
"[asm|hex]",
"print (dis)assembled",
1199 "pg",
" [x y w h cmd]",
"add a new gadget",
1200 "pg",
"",
"print them all",
1201 "pg",
"*",
"print the gadgets as rizin commands",
1202 "pg-",
"*",
"remove all the gadgets",
1226 if (
x && y &&
w &&
h) {
1244 if (
x && y &&
w &&
h) {
1261 if (*_input ==
'?') {
1265 if (*_input ==
'-') {
1269 }
else if (*_input ==
'*') {
1275 }
else if (*_input ==
'b') {
1276 eprintf(
"TODO: Change gadget background color\n");
1277 }
else if (*_input ==
'm') {
1278 int nth = atoi(_input + 1);
1282 char *space = strchr(
input,
' ');
1293 if (
x && y &&
w &&
h) {
1302 }
else if (*_input ==
' ') {
1309 if (
x && y &&
w &&
h) {
1328 }
else if (!*_input) {
1424 int mode = RZ_PRINT_MUSTSEE;
1425 switch (_input[1]) {
1428 mode = RZ_PRINT_SEEFLAGS;
1432 mode = RZ_PRINT_QUIET | RZ_PRINT_MUSTSEE;
1436 mode = RZ_PRINT_DOT;
1440 mode = RZ_PRINT_JSON;
1444 mode = RZ_PRINT_VALUE | RZ_PRINT_MUSTSEE;
1448 mode = RZ_PRINT_STRUCT;
1453 if (*_input ==
'.') {
1459 eprintf(
"Struct %s not defined\nUsage: pfs.struct_name | pfs format\n", _input);
1461 }
else if (*_input ==
' ') {
1462 while (*_input ==
' ' && *_input !=
'\0') {
1468 eprintf(
"Struct %s not defined\nUsage: pfs.struct_name | pfs format\n", _input);
1471 eprintf(
"Usage: pfs.struct_name | pfs format\n");
1478 if (*_input ==
'?') {
1480 if (_input && *_input ==
'?') {
1482 if (_input && *_input ==
'?') {
1496 eprintf(
"Struct %s is not defined\n", _input);
1504 if (_input[2] ==
'?') {
1507 eprintf(
"|Usage: pfo [format-file]\n"
1513 }
else if (_input[2] ==
' ') {
1520 free(system_formats);
1522 char *error_msg =
NULL;
1528 eprintf(
"Parse error: %s\n", error_msg);
1534 eprintf(
"pfo: cannot open format file at '%s'\n",
path);
1548 if (*
fn && *
fn !=
'.') {
1559 if (*
fn && *
fn !=
'.') {
1573 if (
input[1] ==
' ') {
1574 char *
eq = strchr(
input + 2,
'=');
1581 bool listFormats =
false;
1582 if (
input[1] ==
'.') {
1584 }
else if (!strcmp(
input,
"*") &&
mode == RZ_PRINT_SEEFLAGS) {
1601 rz_list_foreach (fmtl,
iter, fmt) {
1607 if (
input[3] ==
'*') {
1614 char *space = strchr(
name,
' ');
1615 char *
eq = strchr(
name,
'=');
1616 char *dot = strchr(
name,
'.');
1625 if (space && (!
eq || space <
eq)) {
1627 if (strchr(
name,
'.')) {
1628 eprintf(
"Struct or fields name can not contain dot symbol (.)\n");
1638 if (!strchr(
name,
'.') &&
1646 char *delim = strchr(
name,
'.');
1656 const char *fmt =
NULL;
1667 eq = strchr(dot,
'=');
1670 mode = RZ_PRINT_MUSTSET;
1674 rz_cons_print(format);
1681 rz_cons_print(format);
1689 rz_cons_print(format);
1707 bool syntax_ok =
true;
1715 const char *arg1 = strtok(
args,
" ");
1725 rz_cons_print(format);
1740 #define append(x, y) \
1757 char *
bytes, *chars;
1758 char *ebytes, *echars;
1760 int i, j, low,
max, here, rows;
1761 bool marks =
false, setcolor =
true, hascolor =
false;
1764 for (
i = 0;
i < 10;
i++) {
1772 bool compact =
false;
1777 char *format = compact ?
" %X %X" :
" %X %X ";
1778 int step = compact ? 4 : 5;
1784 nb_cols -= (nb_cols % 2);
1789 nb_cons_cols = 12 + nb_cols * 2 + (nb_cols / 2);
1791 rows =
len / nb_cols;
1793 chars =
calloc(nb_cols * 40,
sizeof(
char));
1796 note =
calloc(nb_cols,
sizeof(
char *));
1805 if (addrpadlen > 0) {
1806 memset(addrpad,
' ', addrpadlen);
1807 addrpad[addrpadlen] = 0;
1809 strcpy(
bytes, addrpad);
1814 strcpy(
bytes + addrpadlen,
"- offset - ");
1817 for (
i = 0;
i < nb_cols;
i += 2) {
1822 strcpy(
bytes + j,
" ");
1824 for (
i = 0;
i < nb_cols;
i++) {
1837 for (
i = 0;
i < rows;
i++) {
1864 append(ebytes, (col == 1) ?
" |" :
" ");
1865 bool hadflag =
false;
1866 for (j = 0; j < nb_cols; j++) {
1897 fend =
addr + flagsz;
1906 current_flag = flag;
1919 if (current_flag &&
addr + j > (current_flag->
offset + current_flag->
size)) {
1921 current_flag =
NULL;
1932 append(ebytes, bytecolor);
1933 append(echars, bytecolor);
1936 }
else if (!hascolor) {
1938 if (current_flag && current_flag->
color) {
1941 append(ebytes, ansicolor);
1942 append(echars, ansicolor);
1962 if (
html || !usecolor) {
1971 if (here >= low && here <
max) {
1972 if (
html || !usecolor) {
1986 ebytes += strlen(ebytes);
1997 if (!
html && usecolor) {
2004 if (j < (nb_cols - 1) && (j % 2) && !compact) {
2009 if (!
html && usecolor) {
2017 if (!
html && usecolor) {
2021 append(ebytes, (col == 1) ?
"| " : (col == 2) ?
" |"
2029 int out_sz = nb_cons_cols + 20;
2030 char *
out =
calloc(out_sz,
sizeof(
char));
2032 for (j = 0; j < nb_cols; j++) {
2034 int off = (j * 3) - (j / 2) + 13;
2035 int notej_len = strlen(note[j]);
2036 int sz =
RZ_MIN(notej_len, nb_cons_cols -
off);
2045 if (sz < notej_len) {
2049 hasline = (
out[
off] !=
' ');
2053 out[out_sz - 1] = 0;
2066 for (j = 0; j < nb_cols; j++) {
2099 while (*
str >=
'0' && *
str <=
'9') {
2107 case 'b':
size = 1;
break;
2108 case 'h':
size = 2;
break;
2109 case 'd':
size = 4;
break;
2110 case 'w':
size = 4;
break;
2111 case 'g':
size = 8;
break;
2113 if ((
p = strchr(
str,
' '))) {
2120 "Format is x/[num][format][size]\n"
2121 "Num specifies the number of format elements to display\n"
2122 "Format letters are o(octal), x(hex), d(decimal), u(unsigned decimal),\n"
2123 " t(binary), f(float), a(address), i(instruction), c(char) and s(string),\n"
2124 " T(OSType), A(floating point values in hex).\n"
2125 "Size letters are b(byte), h(halfword), w(word), g(giant, 8 bytes).\n");
2180 int show_offset =
true;
2185 int bgcolor_in_heap =
false;
2188 char *bgcolor, *fgcolor, *
text;
2195 datalen = cols * 8 * core->
cons->
rows;
2211 if (len < 0 || len > datalen) {
2224 if (strlen(offstr) > 12) {
2225 cols -= ((strlen(offstr) - 12) * 2);
2228 for (oi =
i =
c = 0;
i <
len;
c++) {
2229 if (
i && (cols != 0) && !(
c % cols)) {
2234 if (show_offset && hex_offset) {
2236 show_offset =
false;
2238 if (bgcolor_in_heap) {
2240 bgcolor_in_heap =
false;
2263 bgcolor = pal->
push;
2276 bgcolor = pal->
trap;
2283 bgcolor_in_heap =
true;
2289 bgcolor_in_heap =
true;
2295 bgcolor_in_heap =
true;
2300 bgcolor_in_heap =
true;
2306 bgcolor_in_heap =
true;
2312 bgcolor_in_heap =
true;
2318 bgcolor_in_heap =
true;
2324 bgcolor_in_heap =
true;
2330 bgcolor_in_heap =
true;
2336 bgcolor_in_heap =
true;
2342 bgcolor_in_heap =
true;
2353 bgcolor_in_heap =
true;
2360 bgcolor_in_heap =
true;
2371 bgcolor_in_heap =
true;
2378 bgcolor_in_heap =
true;
2384 bgcolor_in_heap =
true;
2392 bgcolor_in_heap =
true;
2411 if (
text[0] ==
'_' ||
text[0] ==
'.') {
2429 rz_cons_print(
text);
2443 if (bgcolor_in_heap) {
2446 if (data != core->
block) {
2556 int restore_obsz = 0;
2573 if (strstr(core->
rasm->
cur->arch,
"x86")) {
2575 }
else if (strstr(core->
rasm->
cur->arch,
"arm")) {
2577 if (*
str && strstr(*
str,
" 0x")) {
2597 const char *linecolor =
NULL;
2598 char *ox, *qo, *
string =
NULL;
2600 char *switchcmp =
NULL;
2623 if (!strncmp(
input,
"dsb", 3)) {
2628 }
else if (!strncmp(
input,
"dsf", 3) || !strncmp(
input,
"dsr", 3)) {
2633 eprintf(
"Cannot find function.\n");
2638 }
else if (!strncmp(
input,
"ds ", 3)) {
2654 ox = strstr(
line,
"0x");
2655 qo = strchr(
line,
'\"');
2661 char *qoe = strrchr(qo + 1,
'"');
2663 int raw_len = qoe - qo - 1;
2666 for (; ptr < qoe; ptr++) {
2667 if (*ptr ==
'\\' && ptr + 1 < qoe) {
2669 switch (*(ptr + 1)) {
2682 for (
i = 0;
i < body_len && ptr < qoe;
i++) {
2688 if (actual_len > 2) {
2694 ox = strstr(
line,
"; 0x");
2696 ox = strstr(
line,
"@ 0x");
2699 char *qoe = strchr(ox + 3,
' ');
2701 qoe = strchr(ox + 3,
'\x1b');
2703 int len = qoe ? qoe - ox : strlen(ox + 3);
2717 #define USE_PREFIXES 1
2734 if (strchr(
line,
';')) {
2741 eprintf(
"Warning: missing summary reference: %s\n", dot);
2750 qoe = strchr(
str + 1,
'\x1b');
2753 qoe = strchr(
str + 1,
';');
2756 qoe = strchr(
str + 1,
' ');
2781 char *qoe = strchr(
str,
';');
2792 if (!
string && string2) {
2796 if (strstr(
line,
"XREF")) {
2801 if (show_comments) {
2805 if (strcmp(comment, switchcmp)) {
2818 switchcmp =
strdup(comment);
2829 rz_list_foreach (fcn->
bbs,
iter, bb) {
2841 if (strstr(
line,
"=<")) {
2842 rz_list_foreach (fcn->
bbs,
iter, bb) {
2860 if (
string && *
string) {
2861 if (
string && !strncmp(
string,
"0x", 2)) {
2864 if (string2 && !strncmp(string2,
"0x", 2)) {
2873 if (
string && !strncmp(
string,
"0x", 2)) {
2876 if (string2 && !strncmp(string2,
"0x", 2)) {
2892 linecolor ? linecolor :
"",
2893 string2 ? string2 :
"", string2 ?
" " :
"",
string,
2900 string2 ? string2 :
"", string2 ?
" " :
"",
string,
2901 flag ?
" " :
"", flag ? flag->
name :
"");
2935 if (!data ||
len < 1) {
2938 for (
int i = 0;
i <
len;
i++) {
2959 if (!strncmp(plugin->
name,
"entropy", 7)) {
2987 const char *
stack[] = {
2988 "ret",
"arg0",
"arg1",
"arg2",
"arg3",
"arg4",
NULL
2995 bool fixed_size =
true;
3020 const char *
arg = strchr(
input,
' ');
3030 if (useBytes &&
n > 0 &&
repeat > 0) {
3062 ut8 *
b = block + (
i *
n);
3096 if (*
p ==
'\\' &&
p[1] ==
'x') {
3097 memmove(
p,
p + 4, strlen(
p + 4) + 1);
3139 if (block + 8 >= block_end) {
3140 eprintf(
"Truncated. TODO: use rz_io_read apis insgtead of depending on blocksize\n");
3186 bool result =
false;
3189 RzCoreAnalysisStats *as =
NULL;
3201 int w = (
input[0] ==
' ')
3216 if (!
list || rz_list_empty(
list)) {
3254 pj_ki(pj,
"blocksize", piece);
3281 if ((block->flags) || (block->functions) || (block->comments) || (block->symbols) || (block->perm) || (block->strings)) {
3282 pj_kn(pj,
"offset", at);
3283 pj_kn(pj,
"size", ate - at);
3286 pj_ki(pj,
"flags", block->flags);
3288 if (block->functions) {
3289 pj_ki(pj,
"functions", block->functions);
3291 if (block->in_functions) {
3292 pj_ki(pj,
"in_functions", block->in_functions);
3294 if (block->comments) {
3295 pj_ki(pj,
"comments", block->comments);
3297 if (block->symbols) {
3298 pj_ki(pj,
"symbols", block->symbols);
3300 if (block->strings) {
3301 pj_ki(pj,
"strings", block->strings);
3310 if ((block->flags) || (block->functions) || (block->comments) || (block->symbols) || (block->strings)) {
3312 block->functions, block->comments, block->symbols, block->strings);
3319 if (
off >= at &&
off < ate) {
3334 if (block->strings > 0) {
3336 }
else if (block->symbols > 0) {
3338 }
else if (block->functions > 0) {
3340 }
else if (block->comments > 0) {
3342 }
else if (block->flags > 0) {
3344 }
else if (block->in_functions > 0) {
3361 if (!table_string) {
3393 }
else if (t ==
's') {
3401 }
else if (t ==
'i') {
3407 }
else if (t ==
'j') {
3422 if (ptr[
i] < 0xff) {
3431 eprintf(
"Error: failed to malloc memory");
3447 value += block->functions;
3448 value += block->in_functions;
3449 value += block->comments;
3450 value += block->symbols;
3451 value += block->flags;
3452 value += block->strings;
3453 value += block->blocks;
3459 for (
i = 0;
i < nblocks;
i++) {
3514 for (
i = 0;
i < rows;
i++) {
3515 size_t threshold =
i * (0xff / rows);
3516 size_t koli =
i * 5 / rows;
3517 for (j = 0; j < cols; j++) {
3518 int realJ = j *
len / cols;
3519 if (255 -
buf[realJ] < threshold || (
i + 1 == rows)) {
3529 rz_cons_print(
"\n");
3534 for (
i = 0;
i < rows;
i++) {
3535 size_t threshold =
i * (0xff / rows);
3536 for (j = 0; j < cols; j++) {
3537 size_t realJ = j *
len / cols;
3538 if (255 -
buf[realJ] < threshold) {
3544 }
else if (
i + 1 == rows) {
3550 rz_cons_print(
"\n");
3555 bool print_bars =
false;
3560 int skipblocks = -1;
3574 char *spc = strchr(
input,
' ');
3580 spc = strchr(spc + 1,
' ');
3583 spc = strchr(spc + 1,
' ');
3594 if (skipblocks < 0) {
3601 totalsize =
map->addr_end -
map->addr;
3605 if (core->
file && core->
io) {
3607 if ((
st64)totalsize < 1) {
3612 eprintf(
"Cannot determine file size\n");
3662 ptr =
calloc(1, nblocks);
3664 eprintf(
"Error: failed to malloc memory");
3670 eprintf(
"Error: failed to malloc memory");
3674 if (submode ==
'A') {
3688 value += block->functions;
3689 value += block->in_functions;
3690 value += block->comments;
3691 value += block->symbols;
3692 value += block->flags;
3693 value += block->strings;
3694 value += block->blocks;
3700 for (
i = 0;
i < nblocks;
i++) {
3751 ptr =
calloc(1, nblocks);
3753 eprintf(
"Error: failed to malloc memory");
3759 eprintf(
"Error: failed to malloc memory");
3762 for (
i = 0;
i < nblocks;
i++) {
3777 short *word = (
short *)core->
block;
3781 for (
i = 0;
i < words;
i++) {
3804 if (bufsz != curbsz) {
3824 ptr =
calloc(1, nblocks);
3826 eprintf(
"Error: failed to malloc memory");
3832 eprintf(
"Error: failed to malloc memory");
3835 for (
i = 0;
i < nblocks;
i++) {
3850 ptr =
calloc(1, nblocks);
3852 eprintf(
"Error: failed to malloc memory");
3858 eprintf(
"Error: failed to malloc memory");
3861 for (
i = 0;
i < nblocks;
i++) {
3876 ptr =
calloc(1, nblocks);
3878 eprintf(
"Error: failed to malloc memory");
3884 eprintf(
"Error: failed to malloc memory");
3888 for (
i = 0;
i < nblocks;
i++) {
3930 ptr =
calloc(1, nblocks);
3955 pj_kn(pj,
"size", totalsize);
3956 pj_k(pj,
"entropy");
3959 for (
i = 0;
i < nblocks;
i++) {
3965 pj_ki(pj,
"value", ep);
3974 for (
i = 0;
i < nblocks;
i++) {
3999 return a->addr -
b->addr;
4057 for (
i = 0;
i <
len;
i++) {
4068 for (
i = 0;
i <
len;
i++) {
4079 for (
i = 0;
i <
len;
i++) {
4090 for (
i = 0;
i <
len;
i++) {
4101 for (
i = 0;
i <
len;
i++) {
4111 for (
i = 0;
i <
len;
i++) {
4122 for (
i = 0;
i <
len;
i++) {
4135 for (
i = 0;
i <
len;
i++) {
4137 for (j = 0; j < bs; j++) {
4151 for (
i = 0;
i <
len;
i++) {
4153 for (j = 0; j < bs; j++) {
4180 if (
b->parent_reg_arena) {
4192 if (
b->parent_stackptr !=
INT_MAX) {
4202 if (
b->jump >
b->addr) {
4213 if (p_type ==
'D' && show_flags) {
4218 if (
b->fail >
b->addr) {
4229 if (p_type ==
'D' && show_flags) {
4233 if (p_type ==
'D' && show_flags) {
4256 char *
mnem =
op->mnemonic;
4260 if (type_print ==
'q') {
4266 offsetColor,
addr +
p,
"",
m);
4271 switch (
op->type & 0xfffff) {
4306 if (
b->size > fcn_size) {
4318 rz_list_foreach (
f->bbs,
iter,
b) {
4349 rz_list_foreach (
f->bbs,
iter,
b) {
4350 pr_bb(core,
f,
b, emu, saved_gp, saved_arena, type_print, fromHere);
4376 return strdup(
"unknown");
4379 char *section_name =
strdup(csection);
4383 return strdup(
"unknown");
4385 return section_name;
4421 pj_kn(pj,
"length", dlength);
4422 pj_ks(pj,
"type", enc_name);
4437 rz_list_foreach (
list,
iter, xref) {
4485 int bitsize = wordsize * 8;
4494 for (
ut64 i = 0;
i + wordsize <
end;
i += wordsize) {
4506 for (
ut64 i = 0;
i + wordsize <
end;
i += wordsize) {
4525 for (
ut64 i = 0;
i + wordsize <
end;
i += wordsize) {
4531 for (
ut64 i = 0;
i + wordsize <
end;
i += wordsize) {
4540 if (bitsize == 16) {
4565 for (
ut32 i = 0,
c = 0;
i < 8;
i++) {
4566 if (
buf[1] & ((1 << 7) >>
i)) {
4569 if (
buf[0] & ((1 << 7) >>
i)) {
4600 for (
ut32 i = 0;
i < 8;
i++) {
4601 for (
ut32 r = 0;
r < tiles;
r++) {
4714 int idx = (
input[0] ==
'h') ? 2 : 1;
4752 " < 0x%" PFMT64x "). Did you mean 'p%c @ %s' instead?\n",
4758 if (l > 0 && tmpseek ==
UT64_MAX) {
4760 eprintf(
"This block size is too big. Did you mean 'p%c @ %s' instead?\n",
4788 block = core->
block;
4791 if (
input[1] ==
'?') {
4793 }
else if (
input[1] ==
'.') {
4794 if (
input[2] ==
'.') {
4815 if (core->
blocksize < 4 || !memcmp(core->
block,
"\xff\xff\xff\xff", 4)) {
4842 if (
input[1] ==
'?') {
4868 rz_cons_printf(
"|Usage: p[iI][df] [len] print N instructions/bytes"
4869 "(f=func) (see pi? and pdq)\n");
4898 if (
input[2] ==
'?') {
4900 }
else if (
input[2] ==
'j') {
4902 }
else if (
input[2] ==
'c') {
4909 if (
input[3] != 0) {
4910 if (
input[3] ==
'j') {
4933 if (!rz_list_empty(refs)) {
4951 rz_list_foreach (refs,
iter, xrefi) {
4969 pj_ks(pj,
"dest", dst2);
4990 }
else if (l != 0) {
5072 for (
e =
p;
e < (
buf + 1024);
e++) {
5098 int quiet =
input[2] ==
'q';
5100 int i, j, hasnl = 0;
5107 char ch = (char)block[
i];
5141 char ch = (char)core->
block[
i];
5150 if (
input[2] ==
'j') {
5161 int mylen = core->
block[0];
5164 if (
input[2] ==
'j') {
5182 if (
input[2] ==
'j') {
5196 if (
input[2] ==
'j') {
5219 bool json =
input[2] ==
'j';
5220 if (
input[2] ==
'z') {
5222 const char *
p = (
const char *)core->
block;
5223 for (
i = 0, z = 0;
i <
len;
i++) {
5227 else if (!
p[
i] && z) {
5232 json =
input[3] ==
'j';
5247 int width = (colwidth == 32) ?
w : colwidth;
5264 const bool json =
input[2] ==
'j';
5266 if (bitness != 32 && bitness != 64) {
5267 eprintf(
"Error: bitness of %" PFMT64u " not supported\n", bitness);
5270 if (*core->
block & 0x1) {
5271 if (bitness == 64) {
5301 if (
input[1] ==
'?') {
5303 "| rz_magic will use given file/dir as reference\n"
5304 "| output of those magic can contain expressions like:\n"
5305 "| foo@ 0x40 # use 'foo' magic file on address 0x40\n"
5306 "| @ 0x40 # use current magic file on address 0x40\n"
5307 "| \\n # append newline\n"
5309 "| /m # search for magic signatures\n");
5310 }
else if (
input[1] ==
'j') {
5323 if (
input[1] ==
'?') {
5325 "encoded bytes (w=wide, 0=stop at nil)\n");
5339 if (
input[1] ==
'?') {
5345 if (
input[1] ==
'A') {
5347 for (
i = 0;
i <
len;
i++) {
5352 int sz = asmop.
size;
5357 for (j = 0; j < sz; j++) {
5555 if (
input[1] ==
'?') {
5556 rz_cons_printf(
"|Usage: p2 [number of bytes representing tiles]\n"
5557 "NOTE: Only full tiles will be printed\n");
5564 if (
input[1] ==
'?') {
5565 rz_cons_printf(
"|Usage: p8[fj] [len] 8bit hexpair list of bytes (see pcj)\n");
5573 if (
input[1] ==
'j') {
5575 }
else if (
input[1] ==
'f') {
5579 block = core->
block;
5594 if (
input[1] ==
'?') {
5597 }
else if (!strncmp(
input,
"kill", 4)) {
5600 const char *
arg = strchr(
input,
' ');
5605 rz_list_foreach (pids,
iter,
pid) {
5606 if (strstr(
pid->path,
arg)) {
5621 if (
input[1] ==
'?') {
5622 rz_cons_printf(
"|Usage: pK [len] print key in randomart mosaic\n");
5629 int cols = (
w / 20);
5630 int rows = (
h / 12);
5637 for (
i = 0;
i < rows;
i++) {
5638 for (j = 0; j < cols; j++) {
5694 const char *inv =
invert ? RZ_CONS_INVERT(
true,
true) :
"";
5701 s = ((
off -
a) >> seggrn) & 0xffff;
5703 snprintf(space,
sizeof(space),
"%d:%d",
s,
a);
5713 const int label_padding = 10;
5715 const char *
pad =
rz_str_pad(
' ', sz - sz2 + label_padding);
5738 if (
p->wide_offsets) {
5751 s = (
off -
a) >> seggrn;
5753 snprintf(space,
sizeof(space),
"%d:%d",
s & 0xffff,
a & 0xffff);
5789 if (
len > oldsize) {
5802 if (
len > oldsize) {
5811 if (
len > oldsize) {
5824 if (
len > oldsize) {
5833 if (
len > oldsize) {
5846 if (
len > oldsize) {
5855 if (
len > oldsize) {
5868 if (
len > oldsize) {
5895 for (
int i = 0,
c = 0;
i <
len;
i++,
c++) {
5905 rz_cons_print(
string);
5912 memmove(
buf + 5,
buf + 4, 5);
5923 int n =
k(
b, 0) |
k(
b, 1) |
k(
b, 2) |
k(
b, 3);
5961 static const char emoji[] = {
5962 '\x8c',
'\x80',
'\x8c',
'\x82',
'\x8c',
'\x85',
'\x8c',
'\x88',
5963 '\x8c',
'\x99',
'\x8c',
'\x9e',
'\x8c',
'\x9f',
'\x8c',
'\xa0',
5964 '\x8c',
'\xb0',
'\x8c',
'\xb1',
'\x8c',
'\xb2',
'\x8c',
'\xb3',
5965 '\x8c',
'\xb4',
'\x8c',
'\xb5',
'\x8c',
'\xb7',
'\x8c',
'\xb8',
5966 '\x8c',
'\xb9',
'\x8c',
'\xba',
'\x8c',
'\xbb',
'\x8c',
'\xbc',
5967 '\x8c',
'\xbd',
'\x8c',
'\xbe',
'\x8c',
'\xbf',
'\x8d',
'\x80',
5968 '\x8d',
'\x81',
'\x8d',
'\x82',
'\x8d',
'\x83',
'\x8d',
'\x84',
5969 '\x8d',
'\x85',
'\x8d',
'\x86',
'\x8d',
'\x87',
'\x8d',
'\x88',
5970 '\x8d',
'\x89',
'\x8d',
'\x8a',
'\x8d',
'\x8b',
'\x8d',
'\x8c',
5971 '\x8d',
'\x8d',
'\x8d',
'\x8e',
'\x8d',
'\x8f',
'\x8d',
'\x90',
5972 '\x8d',
'\x91',
'\x8d',
'\x92',
'\x8d',
'\x93',
'\x8d',
'\x94',
5973 '\x8d',
'\x95',
'\x8d',
'\x96',
'\x8d',
'\x97',
'\x8d',
'\x98',
5974 '\x8d',
'\x9c',
'\x8d',
'\x9d',
'\x8d',
'\x9e',
'\x8d',
'\x9f',
5975 '\x8d',
'\xa0',
'\x8d',
'\xa1',
'\x8d',
'\xa2',
'\x8d',
'\xa3',
5976 '\x8d',
'\xa4',
'\x8d',
'\xa5',
'\x8d',
'\xa6',
'\x8d',
'\xa7',
5977 '\x8d',
'\xa8',
'\x8d',
'\xa9',
'\x8d',
'\xaa',
'\x8d',
'\xab',
5978 '\x8d',
'\xac',
'\x8d',
'\xad',
'\x8d',
'\xae',
'\x8d',
'\xaf',
5979 '\x8d',
'\xb0',
'\x8d',
'\xb1',
'\x8d',
'\xb2',
'\x8d',
'\xb3',
5980 '\x8d',
'\xb4',
'\x8d',
'\xb5',
'\x8d',
'\xb6',
'\x8d',
'\xb7',
5981 '\x8d',
'\xb8',
'\x8d',
'\xb9',
'\x8d',
'\xba',
'\x8d',
'\xbb',
5982 '\x8d',
'\xbc',
'\x8e',
'\x80',
'\x8e',
'\x81',
'\x8e',
'\x82',
5983 '\x8e',
'\x83',
'\x8e',
'\x84',
'\x8e',
'\x85',
'\x8e',
'\x88',
5984 '\x8e',
'\x89',
'\x8e',
'\x8a',
'\x8e',
'\x8b',
'\x8e',
'\x8c',
5985 '\x8e',
'\x8d',
'\x8e',
'\x8e',
'\x8e',
'\x8f',
'\x8e',
'\x92',
5986 '\x8e',
'\x93',
'\x8e',
'\xa0',
'\x8e',
'\xa1',
'\x8e',
'\xa2',
5987 '\x8e',
'\xa3',
'\x8e',
'\xa4',
'\x8e',
'\xa5',
'\x8e',
'\xa6',
5988 '\x8e',
'\xa7',
'\x8e',
'\xa8',
'\x8e',
'\xa9',
'\x8e',
'\xaa',
5989 '\x8e',
'\xab',
'\x8e',
'\xac',
'\x8e',
'\xad',
'\x8e',
'\xae',
5990 '\x8e',
'\xaf',
'\x8e',
'\xb0',
'\x8e',
'\xb1',
'\x8e',
'\xb2',
5991 '\x8e',
'\xb3',
'\x8e',
'\xb4',
'\x8e',
'\xb5',
'\x8e',
'\xb7',
5992 '\x8e',
'\xb8',
'\x8e',
'\xb9',
'\x8e',
'\xba',
'\x8e',
'\xbb',
5993 '\x8e',
'\xbd',
'\x8e',
'\xbe',
'\x8e',
'\xbf',
'\x8f',
'\x80',
5994 '\x8f',
'\x81',
'\x8f',
'\x82',
'\x8f',
'\x83',
'\x8f',
'\x84',
5995 '\x8f',
'\x86',
'\x8f',
'\x87',
'\x8f',
'\x88',
'\x8f',
'\x89',
5996 '\x8f',
'\x8a',
'\x90',
'\x80',
'\x90',
'\x81',
'\x90',
'\x82',
5997 '\x90',
'\x83',
'\x90',
'\x84',
'\x90',
'\x85',
'\x90',
'\x86',
5998 '\x90',
'\x87',
'\x90',
'\x88',
'\x90',
'\x89',
'\x90',
'\x8a',
5999 '\x90',
'\x8b',
'\x90',
'\x8c',
'\x90',
'\x8d',
'\x90',
'\x8e',
6000 '\x90',
'\x8f',
'\x90',
'\x90',
'\x90',
'\x91',
'\x90',
'\x92',
6001 '\x90',
'\x93',
'\x90',
'\x94',
'\x90',
'\x95',
'\x90',
'\x96',
6002 '\x90',
'\x97',
'\x90',
'\x98',
'\x90',
'\x99',
'\x90',
'\x9a',
6003 '\x90',
'\x9b',
'\x90',
'\x9c',
'\x90',
'\x9d',
'\x90',
'\x9e',
6004 '\x90',
'\x9f',
'\x90',
'\xa0',
'\x90',
'\xa1',
'\x90',
'\xa2',
6005 '\x90',
'\xa3',
'\x90',
'\xa4',
'\x90',
'\xa5',
'\x90',
'\xa6',
6006 '\x90',
'\xa7',
'\x90',
'\xa8',
'\x90',
'\xa9',
'\x90',
'\xaa',
6007 '\x90',
'\xab',
'\x90',
'\xac',
'\x90',
'\xad',
'\x90',
'\xae',
6008 '\x90',
'\xaf',
'\x90',
'\xb0',
'\x90',
'\xb1',
'\x90',
'\xb2',
6009 '\x90',
'\xb3',
'\x90',
'\xb4',
'\x90',
'\xb5',
'\x90',
'\xb6',
6010 '\x90',
'\xb7',
'\x90',
'\xb8',
'\x90',
'\xb9',
'\x90',
'\xba',
6011 '\x90',
'\xbb',
'\x90',
'\xbc',
'\x90',
'\xbd',
'\x90',
'\xbe',
6012 '\x91',
'\x80',
'\x91',
'\x82',
'\x91',
'\x83',
'\x91',
'\x84',
6013 '\x91',
'\x85',
'\x91',
'\x86',
'\x91',
'\x87',
'\x91',
'\x88',
6014 '\x91',
'\x89',
'\x91',
'\x8a',
'\x91',
'\x8b',
'\x91',
'\x8c',
6015 '\x91',
'\x8d',
'\x91',
'\x8e',
'\x91',
'\x8f',
'\x91',
'\x90',
6016 '\x91',
'\x91',
'\x91',
'\x92',
'\x91',
'\x93',
'\x91',
'\x94',
6017 '\x91',
'\x95',
'\x91',
'\x96',
'\x91',
'\x97',
'\x91',
'\x98',
6018 '\x91',
'\x99',
'\x91',
'\x9a',
'\x91',
'\x9b',
'\x91',
'\x9c',
6019 '\x91',
'\x9d',
'\x91',
'\x9e',
'\x91',
'\x9f',
'\x91',
'\xa0',
6020 '\x91',
'\xa1',
'\x91',
'\xa2',
'\x91',
'\xa3',
'\x91',
'\xa4',
6021 '\x91',
'\xa5',
'\x91',
'\xa6',
'\x91',
'\xa7',
'\x91',
'\xa8',
6022 '\x91',
'\xa9',
'\x91',
'\xaa',
'\x91',
'\xae',
'\x91',
'\xaf',
6023 '\x91',
'\xba',
'\x91',
'\xbb',
'\x91',
'\xbc',
'\x91',
'\xbd',
6024 '\x91',
'\xbe',
'\x91',
'\xbf',
'\x92',
'\x80',
'\x92',
'\x81',
6025 '\x92',
'\x82',
'\x92',
'\x83',
'\x92',
'\x84',
'\x92',
'\x85'
6031 for (
int i = 0;
i <
len;
i += cols) {
6033 for (
int j =
i; j <
i + cols; j += 1) {
6042 for (
int j =
i; j <
len && j <
i + cols; j += 1) {
6064 const char *query = argc > 2 ?
argv[2] :
NULL;
6212 #define CMD_PRINT_BYTE_ARRAY_HANDLER_NORMAL(name, type) \
6213 RZ_IPI RzCmdStatus name(RzCore *core, int argc, const char **argv) { \
6214 char *code = rz_lang_byte_array(core->block, core->blocksize, type); \
6215 if (RZ_STR_ISNOTEMPTY(code)) { \
6216 rz_cons_println(code); \
6218 RzCmdStatus result = code ? RZ_CMD_STATUS_OK : RZ_CMD_STATUS_ERROR; \
6223 #define CMD_PRINT_BYTE_ARRAY_HANDLER_ENDIAN(name, type) \
6224 RZ_IPI RzCmdStatus name(RzCore *core, int argc, const char **argv) { \
6225 bool big_endian = rz_config_get_b(core->config, "cfg.bigendian"); \
6226 char *code = rz_lang_byte_array(core->block, core->blocksize, big_endian ? type##_BE : type##_LE); \
6227 if (RZ_STR_ISNOTEMPTY(code)) { \
6228 rz_cons_println(code); \
6230 RzCmdStatus result = code ? RZ_CMD_STATUS_OK : RZ_CMD_STATUS_ERROR; \
6251 #undef CMD_PRINT_BYTE_ARRAY_HANDLER_NORMAL
6252 #undef CMD_PRINT_BYTE_ARRAY_HANDLER_ENDIAN
6256 rz_table_set_columnsf(t,
"snssssss",
"name",
"addr",
"bytes",
"disasm",
"comment",
"esil",
"refs",
"xrefs");
6257 const int minopsz = 1;
6264 if (!
op ||
op->size < 1) {
6276 char *function_name = flag ? flag->
name :
"";
6301 RzCoreDisasmOptions disasm_options = {
6304 switch (
state->mode) {
6307 n_bytes > 0 && !n_instrs ? n_bytes : n_instrs,
state, &disasm_options);
6326 if (core->
offset != old_offset) {
6348 if (n_bytes > old_blocksize) {
6363 char *colored =
NULL;
6373 switch (
state->mode) {
6398 if (n_bytes > old_blocksize) {
6408 const ut32 n_bytes = 28;
6411 if (old_blocksize < n_bytes) {
6426 op_size =
RZ_MAX(op_size, 1);
6429 char *colored =
NULL;
6439 int padding = position * 2;
6440 int space = 60 - padding;
6442 if ((position + op_size) >= 30) {
6443 ut32 last = (30 - position) * 2;
6444 op_hex[last - 1] =
'.';
6455 if (old_blocksize < n_bytes) {
6476 RzCoreDisasmOptions disasm_options = {
6480 switch (
state->mode) {
6512 RzCoreDisasmOptions disasm_options = {
6527 int n_instrs = parsed;
6540 int n_instrs = parsed;
6566 if (max_real_size < linear_size) {
6567 RZ_LOG_ERROR(
"Linear size differs too much from the bbsum, please use pdr instead.\n");
6574 RZ_LOG_ERROR(
"Cannot print function because the end offset is less or equal to the start offset\n");
6586 RzCoreDisasmOptions disasm_options = {
6588 .function =
function,
6626 int n_instrs = parsed;
6628 ut64 new_offset = old_offset;
6632 ut32 new_blocksize = new_offset - old_blocksize;
6633 if (new_blocksize > old_blocksize) {
6647 RzCoreDisasmOptions disasm_options = {
6691 int n_instrs = parsed;
6693 ut64 new_offset = old_offset;
6697 ut32 new_blocksize = new_offset - old_blocksize;
6698 if (new_blocksize > old_blocksize) {
6716 int op_size = ret < 1 ? 0 : ret;
6717 switch (
state->mode) {
6746 const char *end_color = src_color ?
Color_RESET :
"";
6754 switch (
state->mode) {
6790 RZ_LOG_ERROR(
"the limit value exceeds the max value (1024).\n");
6799 const char *end_color = src_color ?
Color_RESET :
"";
6801 if (asm_bits < 64) {
6805 ut32 asm_bytes = asm_bits / 8;
6807 RZ_LOG_ERROR(
"block size is not enough big to host a word (needs to be >= %u bytes).\n", asm_bytes);
6822 switch (
state->mode) {
6860 if (
b->size > fcn_size) {
6867 rz_list_foreach (
f->bbs,
iter,
b) {
6888 rz_list_foreach (
f->bbs,
iter,
b) {
6889 pr_bb(core,
f,
b, emu, saved_gp, saved_arena, type_print, fromHere);
6947 aop_type = aop.
type;
6948 aop_jump = aop.
jump;
6949 aop_size = aop.
size;
6953 if (ret < 1 || aop_size < 1) {
6985 char input_cmd[256];
7005 char input_cmd[256];
7037 RZ_LOG_ERROR(
"len and skip should be positive numbers\n");
7061 if (!bit_buf || !str_buf) {
static unsigned invert(unsigned x)
RZ_API ut64 rz_analysis_function_max_addr(RzAnalysisFunction *fcn)
RZ_API ut64 rz_analysis_function_linear_size(RzAnalysisFunction *fcn)
RZ_API ut64 rz_analysis_function_realsize(const RzAnalysisFunction *fcn)
RZ_API int rz_analysis_get_address_bits(RzAnalysis *analysis)
The actual size of an address in bits.
RZ_API char * rz_asm_op_get_asm(RzAsmOp *op)
RZ_API ut8 * rz_reg_arena_dup(RzReg *reg, const ut8 *source)
RZ_API ut8 * rz_reg_arena_peek(RzReg *reg)
RZ_API void rz_reg_arena_poke(RzReg *reg, const ut8 *ret)
RZ_API RZ_OWN RzAsmParseParam * rz_asm_get_parse_param(RZ_NULLABLE const RzReg *reg, ut32 ana_op_type)
Does all kinds of NULL checks on the parameters and returns an initialized RzAsmParseParam or NULL on...
RZ_DEPRECATE RZ_API RZ_OWN RzStrBuf * rz_asm_colorize_asm_str(RZ_BORROW RzStrBuf *asm_str, RZ_BORROW RzPrint *p, RZ_NULLABLE const RzAsmParseParam *param, RZ_NULLABLE const RzAsmTokenString *toks)
Colors a given asm string and returns it. If toks is not NULL it uses the tokens to color the asm str...
RZ_API int rz_asm_set_pc(RzAsm *a, ut64 pc)
RZ_API int rz_asm_disassemble(RzAsm *a, RzAsmOp *op, const ut8 *buf, int len)
static int dis(RzAsm *a, RzAsmOp *op, const ut8 *buf, int len)
RZ_DEPRECATE RZ_API RZ_BORROW RzList * rz_bin_get_classes(RZ_NONNULL RzBin *bin)
RzList * symbols(RzBinFile *bf)
int bits(struct state *s, int need)
RZ_API RzAnalysisBlock * rz_analysis_get_block_at(RzAnalysis *analysis, ut64 addr)
RZ_API RzAnalysisBlock * rz_analysis_find_most_relevant_block_in(RzAnalysis *analysis, ut64 off)
const lzma_allocator const uint8_t size_t uint8_t * out
RZ_IPI RzCmdStatus rz_cmd_print_byte_array_c_cpp_half_word_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_print_byte_array_yara_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_print_byte_array_java_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_print_byte_array_bash_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_print_byte_array_c_cpp_bytes_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_print_byte_array_objc_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_print_byte_array_python_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_print_byte_array_kotlin_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_print_byte_array_json_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_print_byte_array_c_cpp_double_word_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_print_byte_array_rizin_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_print_byte_array_c_cpp_word_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_print_byte_array_rust_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_print_byte_array_swift_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_print_byte_array_golang_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_print_byte_array_asm_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_print_byte_array_nodejs_handler(RzCore *core, int argc, const char **argv)
RZ_API int rz_type_parse_file(RzTypeDB *typedb, const char *path, const char *dir, char **error_msg)
Parses the C types file creating the new parser state.
RZ_API RzList * rz_core_analysis_fcn_get_calls(RzCore *core, RzAnalysisFunction *fcn)
RZ_API void rz_core_analysis_stats_free(RzCoreAnalysisStats *s)
RZ_API RZ_OWN RzCoreAnalysisStats * rz_core_analysis_get_stats(RZ_NONNULL RzCore *core, ut64 from, ut64 to, ut64 step)
RZ_API RzAnalysisOp * rz_core_analysis_op(RzCore *core, ut64 addr, int mask)
RZ_API ut64 rz_core_analysis_stats_get_block_from(RZ_NONNULL const RzCoreAnalysisStats *s, size_t i)
RZ_API ut64 rz_core_analysis_stats_get_block_to(RZ_NONNULL const RzCoreAnalysisStats *s, size_t i)
RZ_API void rz_cons_canvas_print(RzConsCanvas *c)
RZ_API void rz_cons_canvas_write(RzConsCanvas *c, const char *s)
RZ_API bool rz_cons_canvas_gotoxy(RzConsCanvas *c, int x, int y)
RZ_API RzConsCanvas * rz_cons_canvas_new(int w, int h)
RZ_API void rz_cons_canvas_free(RzConsCanvas *c)
RZ_API RzCmdStatus rz_core_hash_plugins_print(RzHash *hash, RzCmdStateOutput *state)
RZ_API int rz_core_block_read(RzCore *core)
RZ_API RZ_OWN ut8 * rz_core_transform_op(RzCore *core, ut64 addr, RzCoreWriteOp op, ut8 *hex, int hexlen, int *buflen)
Transform a block of data at addr according to the operation op and the hexvalue hex.
RZ_API int rz_core_cmd0(RzCore *core, const char *cmd)
RZ_API void rz_core_cmd_help(const RzCore *core, const char *help[])
RZ_API int rz_core_cmd_file(RzCore *core, const char *file)
RZ_API char * rz_core_cmd_strf(RzCore *core, const char *fmt,...)
RZ_API int rz_core_cmdf(RzCore *core, const char *fmt,...)
RZ_API char * rz_core_cmd_str(RzCore *core, const char *cmd)
Executes a rizin command and returns the stdout as a string.
RZ_API void rz_cmd_state_output_array_start(RzCmdStateOutput *state)
Mark the start of an array of elements in the output.
RZ_API void rz_cmd_state_output_array_end(RzCmdStateOutput *state)
Mark the end of an array of elements in the output.
static void rz_core_magic(RzCore *core, const char *file, int v, PJ *pj)
static void cmd_print_format(RzCore *core, const char *_input, const ut8 *block, int len)
RZ_IPI RzCmdStatus rz_print_hexdump_hex4l_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_cmd_disassembly_function_summary_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_print_hexdump_bits_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_print_hexword_references_1_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
static char cmd_pxb_p(char input)
RZ_IPI int rz_cmd_print(void *data, const char *input)
RZ_API void rz_print_offset(RzPrint *p, ut64 off, int invert, int offseg, int offdec, int delta, const char *label)
RZ_IPI RzCmdStatus rz_cmd_disassemble_summarize_n_bytes_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_print_hexdump_signed_integer4_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_print_bitstream_handler(RzCore *core, int argc, const char **argv, RzOutputMode mode)
static const char * help_msg_pf[]
static bool core_disassembly(RzCore *core, int n_bytes, int n_instrs, RzCmdStateOutput *state, bool cbytes)
static bool core_walk_function_blocks(RzCore *core, RzAnalysisFunction *f, RzCmdStateOutput *state, char type_print, bool fromHere)
static void cmd_print_gadget(RzCore *core, const char *_input)
RZ_IPI RzCmdStatus rz_print_utf32be_handler(RzCore *core, int argc, const char **argv, RzOutputMode mode)
RZ_IPI RzCmdStatus rz_cmd_base64_decode_handler(RzCore *core, int argc, const char **argv, RzOutputMode mode)
#define CMD_PRINT_BYTE_ARRAY_HANDLER_NORMAL(name, type)
#define CMD_PRINT_BYTE_ARRAY_HANDLER_ENDIAN(name, type)
RZ_IPI RzCmdStatus rz_cmd_disassembly_all_possible_opcodes_treeview_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_print_timestamp_unix_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_disassembly_all_possible_opcodes_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_print_hexdump_hex_common_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state, ut8 n)
RZ_IPI RzCmdStatus rz_print_utf16be_handler(RzCore *core, int argc, const char **argv, RzOutputMode mode)
RZ_IPI RzCmdStatus rz_cmd_disassembly_n_bytes_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_cmd_print_gadget_remove_handler(RzCore *core, int argc, const char **argv)
static int lenof(ut64 off, int two)
static void cmd_p_minus_e(RzCore *core, ut64 at, ut64 ate)
RZ_IPI RzCmdStatus rz_print_hexdump_hex2l_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_hex_of_assembly_handler(RzCore *core, int argc, const char **argv, RzOutputMode mode)
static void cmd_pCD(RzCore *core, const char *input)
static const char * help_msg_p_equal[]
static void cmd_prc(RzCore *core, const ut8 *block, int len)
static const char * help_msg_pif[]
static void cmd_print_op(RzCore *core, const char *input)
static char * __op_refs(RzCore *core, RzAnalysisOp *op, int n)
RZ_IPI RzCmdStatus rz_esil_of_hex_handler(RzCore *core, int argc, const char **argv, RzOutputMode mode)
static const ut32 colormap[256]
RZ_IPI RzCmdStatus rz_cmd_disassemble_summarize_block_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_print_hexdump_hex4_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
static int cmd_pxb_k(const ut8 *buffer, int x)
const char * help_msg_pxA[]
static const char * help_msg_pc[]
RZ_IPI RzCmdStatus rz_cmd_disassembly_basic_block_as_text_json_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_assembly_of_hex_alias_handler(RzCore *core, int argc, const char **argv, RzOutputMode mode)
static void core_print_columns(RzCore *core, const ut8 *buf, ut32 len, ut32 height)
static ut8 * analBars(RzCore *core, size_t type, size_t nblocks, size_t blocksize, size_t skipblocks, ut64 from)
RZ_IPI RzCmdStatus rz_cmd_disassemble_summarize_function_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_print_utf16le_handler(RzCore *core, int argc, const char **argv, RzOutputMode mode)
static void core_print_2bpp_row(const ut8 *buf, bool useColor)
RZ_IPI RzCmdStatus rz_print_hexdump_emoji_handler(RzCore *core, int argc, const char **argv)
static bool cmd_print_blocks(RzCore *core, const char *input)
static const char * help_msg_p_minus[]
static void func_walk_blocks(RzCore *core, RzAnalysisFunction *f, char input, char type_print, bool fromHere)
static const char * help_msg_pi[]
static void printraw(RzCore *core, int len)
static int bbcmp(RzAnalysisBlock *a, RzAnalysisBlock *b)
RZ_IPI RzCmdStatus rz_print_hexdump_signed_integer8_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_print_hexdump_hexless_words_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_print_hexdump_oct_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_print_timestamp_dos_handler(RzCore *core, int argc, const char **argv)
RZ_IPI int rz_cmd_hexdump(void *data, const char *input)
RZ_IPI RzCmdStatus rz_print_string_c_cpp_handler(RzCore *core, int argc, const char **argv, RzOutputMode mode)
static void print_json_string(RzCore *core, const ut8 *block, ut32 len, RzStrEnc encoding, bool stop_at_nil)
RZ_IPI RzCmdStatus rz_cmd_disassembly_n_instructions_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_cmd_disassemble_recursively_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_print_hexdump_n_lines_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
static void findMethodBounds(RzList *methods, ut64 *min, ut64 *max)
RZ_IPI RzCmdStatus rz_esil_of_assembly_handler(RzCore *core, int argc, const char **argv, RzOutputMode mode)
static ut64 findClassBounds(RzCore *core, int *len)
static const char * help_msg_ps[]
static void _handle_call(RzCore *core, char *line, char **str)
static const char * help_msg_pr[]
RZ_IPI RzCmdStatus rz_print_hexdump_hexii_handler(RzCore *core, int argc, const char **argv)
static void disassembly_as_table(RzTable *t, RzCore *core, int n_instrs, int n_bytes)
RZ_IPI RzCmdStatus rz_print_hexdump_annotated_handler(RzCore *core, int argc, const char **argv)
static const char * help_msg_pF[]
static void pr_bb(RzCore *core, RzAnalysisFunction *fcn, RzAnalysisBlock *b, bool emu, ut64 saved_gp, ut8 *saved_arena, char p_type, bool fromHere)
RZ_IPI RzCmdStatus rz_cmd_print_gadget_add_handler(RzCore *core, int argc, const char **argv)
static bool cmd_print_pxA(RzCore *core, int len, RzOutputMode mode)
RZ_IPI RzCmdStatus rz_cmd_print_magic_handler(RzCore *core, int argc, const char **argv, RzOutputMode mode)
static const char * help_msg_pv[]
RZ_IPI RzCmdStatus rz_print_hexdump_signed_integer_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
static const char * help_msg_prg[]
static void handle_entropy(RzCore *core, const char *name, const ut8 *block, int len)
static const char * help_msg_pj[]
static ut8 * old_transform_op(RzCore *core, const char *val, char op, int *buflen)
RZ_IPI RzCmdStatus rz_cmd_disassembly_n_instructions_with_flow_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
static void cmd_print_bars(RzCore *core, const char *input)
static const char * help_msg_px[]
static void disasm_strings(RzCore *core, const char *input, RzAnalysisFunction *fcn)
static bool checkAnalType(RzAnalysisOp *op, int t)
RZ_IPI RzCmdStatus rz_print_hexdump_signed_integer_common_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state, ut8 n)
RZ_API void rz_print_offset_sg(RzPrint *p, ut64 off, int invert, int offseg, int seggrn, int offdec, int delta, const char *label)
static void disasm_until_ret(RzCore *core, ut64 addr, char type_print, const char *arg)
RZ_IPI RzCmdStatus rz_print_hexword_references_4_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_print_hexdump_hex8_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_print_byte_bitstream_handler(RzCore *core, int argc, const char **argv, RzOutputMode mode)
static void matchBar(ut8 *ptr, int i)
RZ_IPI RzCmdStatus rz_cmd_disassemble_recursively_no_function_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_cmd_print_hash_cfg_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_print_hash_cfg_algo_list_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_print_hexdump_hexless_bytes_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_sizes_of_n_instructions_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_assembly_of_hex_handler(RzCore *core, int argc, const char **argv, RzOutputMode mode)
RZ_IPI RzCmdStatus rz_cmd_print_timestamp_hfs_handler(RzCore *core, int argc, const char **argv)
static const char * help_msg_at_at[]
RZ_IPI RzCmdStatus rz_cmd_disassemble_ropchain_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_print_op_analysis_color_map_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_print_hexdump_signed_integer2_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_API void rz_core_set_asm_configs(RzCore *core, char *arch, ut32 bits, int segoff)
static void helpCmdTasks(RzCore *core)
static void cmd_print_pv(RzCore *core, const char *input, bool useBytes)
RZ_IPI RzCmdStatus rz_cmd_disassemble_recursively_from_current_block_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
static void hexprint(const ut8 *data, int len)
static const char * help_detail_pf[]
static void cmd_pCx(RzCore *core, const char *input, const char *xcmd)
RZ_IPI RzCmdStatus rz_cmd_print_timestamp_ntfs_handler(RzCore *core, int argc, const char **argv)
static void _pointer_table(RzCore *core, ut64 origin, ut64 offset, const ut8 *buf, int len, int step, RzOutputMode mode)
RZ_IPI RzCmdStatus rz_print_delta_pointer_table_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_cmd_disassembly_n_instrs_as_text_json_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_cmd_print_gadget_move_handler(RzCore *core, int argc, const char **argv)
static const char * help_msg_p[]
RZ_IPI RzCmdStatus rz_print_hexdump_function_handler(RzCore *core, int argc, const char **argv)
static void cmd_pCd(RzCore *core, const char *input)
RZ_IPI RzCmdStatus rz_print_hexdump_hex8l_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
static const char * help_msg_po[]
RZ_IPI RzCmdStatus rz_print_hexword_references_common_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state, int wordsize)
static const char * help_detail2_pf[]
static const char * help_msg_pp[]
RZ_IPI RzCmdStatus rz_cmd_base64_encode_handler(RzCore *core, int argc, const char **argv, RzOutputMode mode)
static void cmd_print_fromage(RzCore *core, const char *input, const ut8 *data, int size)
static void print_format_help_help_help_help(RzCore *core)
RZ_API void rz_core_print_examine(RzCore *core, const char *str)
RZ_IPI RzCmdStatus rz_print_hexword_references_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_print_hexdump_hexl_common_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state, ut8 n)
static void annotated_hexdump(RzCore *core, int len)
RZ_IPI RzCmdStatus rz_print_hexword_references_8_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_print_hexdump_comments_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_print_timestamp_current_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_print_hexdump_hex2_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
static void __printPattern(RzCore *core, const char *_input)
static char * get_section_name(RzCore *core)
static const char * help_msg_amper[]
RZ_IPI RzCmdStatus rz_cmd_comments_in_n_instructions_handler(RzCore *core, int argc, const char **argv)
static const char * help_msg_at_at_at[]
RZ_IPI RzCmdStatus rz_cmd_print_gadget_print_as_rizin_handler(RzCore *core, int argc, const char **argv)
static void disassemble_till_return_is_found(RzCore *core, ut64 offset, ut64 limit, RzCmdStateOutput *state)
static void core_print_raw_buffer(RzStrStringifyOpt *opt)
RZ_IPI RzCmdStatus rz_print_utf32le_handler(RzCore *core, int argc, const char **argv, RzOutputMode mode)
static void core_print_2bpp_tiles(RzCore *core, ut32 tiles)
static const char * help_msg_at[]
RZ_IPI RzCmdStatus rz_print_hexdump_hexpair_bytes_handler(RzCore *core, int argc, const char **argv)
static const char * help_msg_pg[]
RZ_IPI RzCmdStatus rz_cmd_disassembly_function_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
static void handle_hash_cfg(RzCore *core, const char *name, const ut8 *block, int len)
static char * __refs(RzCore *core, ut64 x)
RZ_IPI RzCmdStatus rz_print_hexword_references_2_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_API void rz_core_gadget_free(RzCoreGadget *g)
Frees a visual print gadget.
static void cmd_print_eq_dict(RzCore *core, const ut8 *block, int bsz)
RZ_IPI RzCmdStatus rz_cmd_disassembly_all_methods_class_handler(RzCore *core, int argc, const char **argv)
static bool cmd_pxr(RzCore *core, int len, RzCmdStateOutput *state, int wordsize, const char *query)
RZ_IPI RzCmdStatus rz_cmd_disassembly_basic_block_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_print_hexdump_sparse_handler(RzCore *core, int argc, const char **argv)
RZ_API void rz_core_gadget_print(RzCore *core)
Prints or displays the print gadgets while in visual mode.
RZ_IPI RzCmdStatus rz_print_hexdump_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
static void incDigitBuffer(ut8 *buf, int bufsz)
static void incAlphaBuffer(ut8 *buf, int bufsz)
RZ_API RZ_OWN RzList * rz_core_get_boundaries_prot(RzCore *core, int perm, const char *mode, const char *prefix)
RZ_API ut64 rz_config_get_i(RzConfig *cfg, RZ_NONNULL const char *name)
RZ_API bool rz_config_get_b(RzConfig *cfg, RZ_NONNULL const char *name)
RZ_API RzConfigNode * rz_config_set(RzConfig *cfg, RZ_NONNULL const char *name, const char *value)
RZ_API RzConfigNode * rz_config_set_i(RzConfig *cfg, RZ_NONNULL const char *name, const ut64 i)
RZ_API RZ_BORROW const char * rz_config_get(RzConfig *cfg, RZ_NONNULL const char *name)
RZ_API int rz_cons_get_size(int *rows)
RZ_API int rz_cons_memcat(const char *str, int len)
RZ_API RzCons * rz_cons_singleton(void)
RZ_API void rz_cons_strcat(const char *str)
RZ_API void rz_cons_newline(void)
RZ_API void rz_cons_break_pop(void)
RZ_API void rz_cons_break_push(RzConsBreak cb, void *user)
RZ_API int rz_cons_printf(const char *format,...)
RZ_API void rz_cons_invert(int set, int color)
RZ_API void rz_cons_strcat_at(const char *_str, int x, char y, int w, int h)
RZ_API char * rz_cons_swap_ground(const char *col)
RZ_API bool rz_cons_is_breaked(void)
RZ_API void rz_cons_println(const char *str)
RZ_IPI void rz_core_print_hexdump(RZ_NONNULL RzCore *core, ut64 addr, RZ_NONNULL const ut8 *buf, int len, int base, int step, size_t zoomsz)
RZ_IPI bool rz_core_print_hexdump_or_hexdiff(RZ_NONNULL RzCore *core, RzOutputMode mode, ut64 addr, int len, bool use_comments)
RZ_IPI bool rz_core_handle_backwards_disasm(RZ_NONNULL RzCore *core, RZ_NONNULL RZ_INOUT int *pn_opcodes, RZ_NONNULL RZ_INOUT int *pn_bytes)
Converting negative numbers n_opcodes and n_opcodes to positive numbers n_opcodes and n_opcodes and s...
static RzCmdStatus bool2status(bool val)
RZ_IPI bool rz_core_print_dump(RZ_NONNULL RzCore *core, RzOutputMode mode, ut64 addr, ut8 n, int len, RzCorePrintFormatType format)
RZ_IPI bool rz_core_print_hexdump_byline(RZ_NONNULL RzCore *core, bool hex_offset, ut64 addr, int len, ut8 size)
RZ_IPI bool rz_disasm_check_end(int nb_opcodes, int i_opcodes, int nb_bytes, int i_bytes)
Is i_opcodes < nb_opcodes and i_bytes < nb_bytes ?
RZ_API RZ_OWN char * rz_core_assembly_of_hex(RzCore *core, ut8 *hex, int len)
Get the assembly of the hexstr.
RZ_API RZ_OWN char * rz_core_esil_of_hex(RzCore *core, ut8 *hex, int len)
Get the esil of the hexstr.
RZ_API RZ_OWN char * rz_core_hex_of_assembly(RzCore *core, const char *assembly)
Get the hexpair of the assembly.
RZ_API RZ_OWN char * rz_core_print_string_c_cpp(RzCore *core)
RZ_API RZ_OWN char * rz_core_esil_of_assembly(RzCore *core, const char *assembly)
Get the esil of the assembly.
RZ_API RzReg * rz_core_reg_default(RzCore *core)
Get the currently relevant RzReg.
static static fork const void static count static fd const char const char static newpath const char static path const char path
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 count
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 static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void start
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 cmd
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 static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void length
RZ_API int rz_core_print_disasm_json(RzCore *core, ut64 addr, ut8 *buf, int nb_bytes, int nb_opcodes, PJ *pj)
RZ_API bool rz_core_print_function_disasm_json(RzCore *core, RzAnalysisFunction *fcn, PJ *pj)
RZ_API const char * rz_core_get_section_name(RzCore *core, ut64 addr)
RZ_API int rz_core_print_disasm_all(RzCore *core, ut64 addr, int l, int len, int mode)
RZ_API int rz_core_print_disasm(RZ_NONNULL RzCore *core, ut64 addr, RZ_NONNULL ut8 *buf, int len, int nlines, RZ_NULLABLE RzCmdStateOutput *state, RZ_NULLABLE RzCoreDisasmOptions *options)
Disassemble len bytes and nlines opcodes restricted by len and nlines at the same time.
RZ_API int rz_core_disasm_pdi(RzCore *core, int nb_opcodes, int nb_bytes, int fmt)
RZ_API int rz_core_disasm_pde(RzCore *core, int nb_opcodes, RzCmdStateOutput *state)
RZ_API int rz_core_print_disasm_instructions(RzCore *core, int nb_bytes, int nb_opcodes)
RZ_API RzDebugMap * rz_debug_map_get(RzDebug *dbg, ut64 addr)
static states step(struct re_guts *, sopno, sopno, states, int, states)
size_t map(int syms, int left, int len)
RZ_DEPRECATE RZ_API RzAnalysisFunction * rz_analysis_get_fcn_in(RzAnalysis *analysis, ut64 addr, int type)
checking print the parsed form of the magic use in n conjunction with m to debug a new magic file n before installing it n output MIME type special files
RZ_API RzFlagItem * rz_flag_get_i(RzFlag *f, ut64 off)
RZ_API RzFlagItem * rz_flag_get_at(RzFlag *f, ut64 off, bool closest)
RZ_API char * sdb_fmt(const char *fmt,...)
unsigned short prefix[65536]
void skip(file *in, unsigned n)
RZ_API double rz_hash_entropy_fraction(RZ_NONNULL RzHash *rh, RZ_NONNULL const ut8 *data, ut64 len)
RZ_API RZ_BORROW const RzHashPlugin * rz_hash_plugin_by_name(RZ_NONNULL RzHash *rh, RZ_NONNULL const char *name)
RZ_API RZ_OWN ut8 * rz_hash_cfg_calculate_small_block(RZ_NONNULL RzHash *rh, RZ_NONNULL const char *name, RZ_NONNULL const ut8 *buffer, ut64 bsize, RZ_NONNULL RzHashSize *osize)
Returns the digest size of the requested algorithm name.
RZ_API void rz_config_hold_restore(RzConfigHold *h)
Restore whatever config options were previously saved in h.
RZ_API RzConfigHold * rz_config_hold_new(RzConfig *cfg)
Create an opaque object to save/restore some configuration options.
RZ_API bool rz_config_hold_i(RzConfigHold *h,...)
Save the current values of a list of config options that have integer values.
RZ_API void rz_config_hold_free(RzConfigHold *h)
Free a RzConfigHold object h.
RZ_API void Ht_() free(HtName_(Ht) *ht)
RZ_API char * rz_print_json_indent(const char *s, bool color, const char *tab, const char **palette)
RZ_API char * rz_print_json_path(const char *s, int pos)
return memset(p, 0, total)
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
RZ_API RzTable * rz_core_table(RzCore *core)
RZ_API RzBinReloc * rz_core_getreloc(RzCore *core, ut64 addr, int size)
RZ_API RzFlagItem * rz_core_flag_get_by_spaces(RzFlag *f, ut64 off)
RZ_API bool rz_core_block_size(RzCore *core, ut32 bsize)
RZ_API char * rz_core_analysis_get_comments(RzCore *core, ut64 addr)
RZ_API char * rz_core_analysis_hasrefs_to_depth(RzCore *core, ut64 value, PJ *pj, int depth)
static void list(RzEgg *egg)
RZ_API RZ_BORROW RzListIter * rz_list_contains(RZ_NONNULL const RzList *list, RZ_NONNULL const void *ptr)
Returns the RzListIter of the given pointer, if found.
RZ_API RZ_OWN RzList * rz_list_newf(RzListFree f)
Returns a new initialized RzList pointer and sets the free method.
RZ_API RZ_BORROW void * rz_list_get_top(RZ_NONNULL const RzList *list)
Returns the last element of the list.
RZ_API void rz_list_sort(RZ_NONNULL RzList *list, RZ_NONNULL RzListComparator cmp)
Sorts via merge sort or via insertion sort a list.
RZ_API RZ_BORROW void * rz_list_first(RZ_NONNULL const RzList *list)
Returns the first element of the list.
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_OWN void * rz_list_pop_head(RZ_NONNULL RzList *list)
Removes and returns the first element 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)
void * calloc(size_t number, size_t size)
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds const char struct utimbuf static buf static inc pid
static static fork const void static count static fd const char const char static newpath char char argv
static const char struct stat static buf struct stat static buf static idle const char static path static fd const char static len const void static prot const char struct module static image struct kernel_sym static table unsigned char static buf static fsuid unsigned struct dirent unsigned static count const struct iovec static count static pid const void static len static flags const struct sched_param static p static pid static policy struct timespec static tp static suid unsigned fn
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 const char struct stat static buf struct stat static buf static vhangup int options
static uint32_t const uint8_t uint32_t uint32_t limit
RZ_API void rz_analysis_op_free(void *op)
RZ_API bool rz_analysis_op_fini(RzAnalysisOp *op)
RZ_API void rz_analysis_op_init(RzAnalysisOp *op)
RZ_API int rz_analysis_op(RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8 *data, int len, RzAnalysisOpMask mask)
RZ_API char * rz_cons_rainbow_get(int idx, int last, bool bg)
RZ_API char * rz_cons_pal_parse(const char *str, RzColor *outcol)
RZ_API void rz_print_fill(RzPrint *p, const ut8 *arr, int size, ut64 addr, int step)
RZ_API void rz_print_init_rowoffsets(RzPrint *p)
RZ_API void rz_print_cursor(RzPrint *p, int cur, int len, int set)
RZ_API void rz_print_byte(RzPrint *p, const char *fmt, int idx, ut8 ch)
RZ_API void rz_print_bytes(RzPrint *p, const ut8 *buf, int len, const char *fmt)
RZ_API void rz_print_hexii(RzPrint *rp, ut64 addr, const ut8 *buf, int len, int step)
RZ_API const char * rz_print_byte_color(RzPrint *p, int ch)
RZ_API void rz_print_progressbar(RzPrint *p, int pc, int _cols)
RZ_API RZ_OWN char * rz_print_hexdump_str(RZ_NONNULL RzPrint *p, ut64 addr, RZ_NONNULL const ut8 *buf, int len, int base, int step, size_t zoomsz)
Prints a hexdump of buf at addr.
RZ_API char * rz_print_section_str(RzPrint *p, ut64 at)
RZ_API void rz_print_raw(RzPrint *p, ut64 addr, const ut8 *buf, int len)
static const char hex[16]
RZ_API void rz_print_addr(RzPrint *p, ut64 addr)
static void pad(RzStrBuf *sb, ut32 count)
RZ_API RZ_OWN char * rz_hash_cfg_randomart(RZ_NONNULL const ut8 *buffer, ut32 length, ut64 address)
Generates a randomart that is meant to be an easily validate buffers.
RZ_API ut64 rz_reg_getv(RzReg *reg, const char *name)
RZ_API RzRegItem * rz_reg_get(RzReg *reg, const char *name, int type)
static void repeat(struct parse *, sopno, int, int)
RZ_API char * rz_cons_rgb_str_off(char *outstr, size_t sz, ut64 off)
RZ_API ut64 rz_reg_get_value(RzReg *reg, RzRegItem *item)
@ RZ_ANALYSIS_FCN_TYPE_SYM
@ RZ_ANALYSIS_FCN_TYPE_NULL
@ RZ_ANALYSIS_FCN_TYPE_ROOT
@ RZ_ANALYSIS_FCN_TYPE_FCN
@ RZ_ANALYSIS_OP_FAMILY_PRIV
@ RZ_ANALYSIS_OP_MASK_DISASM
@ RZ_ANALYSIS_OP_MASK_ALL
@ RZ_ANALYSIS_OP_MASK_BASIC
@ RZ_ANALYSIS_OP_MASK_ESIL
@ RZ_ANALYSIS_OP_MASK_HINT
@ RZ_ANALYSIS_OP_TYPE_CMP
@ RZ_ANALYSIS_OP_TYPE_SUB
@ RZ_ANALYSIS_OP_TYPE_ICALL
@ RZ_ANALYSIS_OP_TYPE_UNK
@ RZ_ANALYSIS_OP_TYPE_MUL
@ RZ_ANALYSIS_OP_TYPE_JMP
@ RZ_ANALYSIS_OP_TYPE_AND
@ RZ_ANALYSIS_OP_TYPE_UPUSH
@ RZ_ANALYSIS_OP_TYPE_RPUSH
@ RZ_ANALYSIS_OP_TYPE_UJMP
@ RZ_ANALYSIS_OP_TYPE_IJMP
@ RZ_ANALYSIS_OP_TYPE_UCCALL
@ RZ_ANALYSIS_OP_TYPE_MJMP
@ RZ_ANALYSIS_OP_TYPE_SWI
@ RZ_ANALYSIS_OP_TYPE_CMOV
@ RZ_ANALYSIS_OP_TYPE_TRAP
@ RZ_ANALYSIS_OP_TYPE_CALL
@ RZ_ANALYSIS_OP_TYPE_ADD
@ RZ_ANALYSIS_OP_TYPE_PUSH
@ RZ_ANALYSIS_OP_TYPE_SHR
@ RZ_ANALYSIS_OP_TYPE_IRJMP
@ RZ_ANALYSIS_OP_TYPE_POP
@ RZ_ANALYSIS_OP_TYPE_RJMP
@ RZ_ANALYSIS_OP_TYPE_CJMP
@ RZ_ANALYSIS_OP_TYPE_DIV
@ RZ_ANALYSIS_OP_TYPE_CAST
@ RZ_ANALYSIS_OP_TYPE_UCJMP
@ RZ_ANALYSIS_OP_TYPE_MOV
@ RZ_ANALYSIS_OP_TYPE_SHL
@ RZ_ANALYSIS_OP_TYPE_ILL
@ RZ_ANALYSIS_OP_TYPE_UCALL
@ RZ_ANALYSIS_OP_TYPE_RET
@ RZ_ANALYSIS_OP_TYPE_NOP
@ RZ_ANALYSIS_OP_TYPE_ACMP
@ RZ_ANALYSIS_OP_TYPE_LEA
@ RZ_ANALYSIS_OP_TYPE_RCALL
@ RZ_ANALYSIS_OP_TYPE_XOR
@ RZ_ANALYSIS_OP_TYPE_NEW
@ RZ_ANALYSIS_OP_TYPE_LENGTH
@ RZ_ANALYSIS_OP_TYPE_IRCALL
RZ_API char * rz_asn1_to_string(RASN1Object *object, ut32 depth, RzStrBuf *sb)
RZ_API void rz_asn1_free_object(RASN1Object *object)
RZ_API void asn1_setformat(int fmt)
RZ_API RASN1Object * rz_asn1_create_object(const ut8 *buffer, ut32 length, const ut8 *start_pointer)
#define rz_warn_if_reached()
#define rz_return_if_fail(expr)
RZ_API RZ_OWN char * rz_axml_decode(RZ_NONNULL const ut8 *buffer, const ut64 size)
Decode a buffer with Android XML to regular XML string representation.
RZ_API char * rz_base64_encode_dyn(const ut8 *bin, size_t sz)
RZ_API ut8 * rz_base64_decode_dyn(const char *in, int len)
enum rz_cmd_status_t RzCmdStatus
@ RZ_CMD_STATUS_OK
command handler exited in the right way
@ RZ_CMD_STATUS_ERROR
command handler had issues while running (e.g. allocation error, etc.)
#define Color_INVERT_RESET
@ RZ_CORE_WRITE_OP_BYTESWAP8
Swap the endianess of 8-bytes values.
@ RZ_CORE_WRITE_OP_SHIFT_LEFT
Write the shift left of existing byte by argument value.
@ RZ_CORE_WRITE_OP_AND
Write the bitwise-and of existing byte and argument value.
@ RZ_CORE_WRITE_OP_SHIFT_RIGHT
Write the shift right of existing byte and argument value.
@ RZ_CORE_WRITE_OP_BYTESWAP2
Swap the endianess of 2-bytes values.
@ RZ_CORE_WRITE_OP_OR
Write the bitwise-or of existing byte and argument value.
@ RZ_CORE_WRITE_OP_ADD
Write the addition of existing byte and argument value.
@ RZ_CORE_WRITE_OP_MUL
Write the multiplication of existing byte and argument value.
@ RZ_CORE_WRITE_OP_DIV
Write the division of existing byte and argument value.
@ RZ_CORE_WRITE_OP_BYTESWAP4
Swap the endianess of 4-bytes values.
@ RZ_CORE_WRITE_OP_XOR
Write the bitwise-xor of existing byte and argument value.
@ RZ_CORE_WRITE_OP_SUB
Write the subtraction of existing byte and argument value.
RZ_API RZ_OWN char * rz_debruijn_pattern(int size, int start, const char *charset)
Generate a cyclic pattern following the Debruijn pattern.
static ut64 rz_read_ble64(const void *src, bool big_endian)
static ut8 rz_read_ble8(const void *src)
static ut32 rz_read_le32(const void *src)
static ut32 rz_read_ble32(const void *src, bool big_endian)
static ut16 rz_read_ble16(const void *src, bool big_endian)
static double rz_read_be_double(const void *src)
static ut64 rz_read_ble(const void *src, bool big_endian, int size)
RZ_API RZ_OWN char * rz_file_path_join(RZ_NONNULL const char *s1, RZ_NULLABLE const char *s2)
Concatenate two paths to create a new one with s1+s2 with the correct path separator.
RZ_API ut8 * rz_inflate(RZ_NONNULL const ut8 *src, int srcLen, int *srcConsumed, int *dstLen)
inflate zlib compressed or gzipped, automatically accepts either the zlib or gzip format,...
RZ_API int rz_hex_str2bin(const char *in, ut8 *out)
Convert an input string in into the binary form in out.
RZ_API char * rz_hex_bin2strdup(const ut8 *in, int len)
RZ_API ut64 rz_io_fd_size(RzIO *io, int fd)
RZ_API bool rz_io_read_at(RzIO *io, ut64 addr, ut8 *buf, int len)
RZ_API RzIOMap * rz_io_map_get(RzIO *io, ut64 addr)
RZ_API ut64 rz_io_p2v(RzIO *io, ut64 pa)
RZ_API bool rz_io_is_valid_offset(RzIO *io, ut64 offset, int hasperm)
static ut64 rz_itv_begin(RzInterval itv)
static ut64 rz_itv_end(RzInterval itv)
RZ_API RZ_OWN char * rz_lang_byte_array(RZ_NONNULL const ut8 *buffer, size_t size, RzLangByteArrayType type)
@ RZ_LANG_BYTE_ARRAY_C_CPP_BYTES
@ RZ_LANG_BYTE_ARRAY_JAVA
@ RZ_LANG_BYTE_ARRAY_BASH
@ RZ_LANG_BYTE_ARRAY_C_CPP_DOUBLEWORDS_BE
@ RZ_LANG_BYTE_ARRAY_KOTLIN
@ RZ_LANG_BYTE_ARRAY_C_CPP_WORDS_BE
@ RZ_LANG_BYTE_ARRAY_RIZIN
@ RZ_LANG_BYTE_ARRAY_GOLANG
@ RZ_LANG_BYTE_ARRAY_PYTHON
@ RZ_LANG_BYTE_ARRAY_C_CPP_WORDS_LE
@ RZ_LANG_BYTE_ARRAY_C_CPP_DOUBLEWORDS_LE
@ RZ_LANG_BYTE_ARRAY_OBJECTIVE_C
@ RZ_LANG_BYTE_ARRAY_YARA
@ RZ_LANG_BYTE_ARRAY_SWIFT
@ RZ_LANG_BYTE_ARRAY_C_CPP_HALFWORDS_BE
@ RZ_LANG_BYTE_ARRAY_RUST
@ RZ_LANG_BYTE_ARRAY_JSON
@ RZ_LANG_BYTE_ARRAY_NODEJS
@ RZ_LANG_BYTE_ARRAY_C_CPP_HALFWORDS_LE
void(* RzListFree)(void *ptr)
int(* RzListComparator)(const void *value, const void *list_data)
#define RZ_LOG_VERBOSE(fmtstr,...)
#define RZ_LOG_ERROR(fmtstr,...)
RZ_API ut64 rz_num_get(RzNum *num, const char *str)
RZ_API ut64 rz_num_math(RzNum *num, const char *str)
RZ_API RZ_OWN char * rz_path_home_prefix(RZ_NULLABLE const char *path)
Return path prefixed by the home prefix.
RZ_API RZ_OWN char * rz_path_system(RZ_NULLABLE const char *path)
Return the full system path of the given subpath path.
RZ_API RZ_OWN char * rz_path_prefix(RZ_NULLABLE const char *path)
Return path prefixed by the Rizin install prefix.
RZ_API void pj_raw(PJ *j, const char *k)
RZ_API PJ * pj_ka(PJ *j, const char *k)
RZ_API PJ * pj_ki(PJ *j, const char *k, int d)
RZ_API PJ * pj_k(PJ *j, const char *k)
RZ_API PJ * pj_end(PJ *j)
RZ_API const char * pj_string(PJ *pj)
RZ_API PJ * pj_i(PJ *j, int d)
RZ_API void pj_free(PJ *j)
RZ_API PJ * pj_ks(PJ *j, const char *k, const char *v)
RZ_API PJ * pj_n(PJ *j, ut64 n)
RZ_API PJ * pj_N(PJ *j, st64 n)
RZ_API PJ * pj_kn(PJ *j, const char *k, ut64 n)
RZ_API RCMS * rz_pkcs7_parse_cms(const ut8 *buffer, ut32 length)
RZ_API void rz_pkcs7_free_cms(RCMS *container)
RZ_API char * rz_pkcs7_cms_to_string(RCMS *container)
#define RZ_PRINT_FLAGS_SPARSE
#define RZ_PRINT_FLAGS_REFS
#define RZ_PRINT_FLAGS_NONHEX
#define RZ_PRINT_FLAGS_RAINBOW
#define RZ_PRINT_FLAGS_COLOR
#define RZ_PRINT_FLAGS_HEADER
#define RZ_PRINT_FLAGS_OFFSET
#define RZ_PRINT_FLAGS_COMPACT
#define RZ_PRINT_FLAGS_UNALLOC
RZ_API char * rz_protobuf_decode(const ut8 *buffer, const ut64 size, bool debug)
#define RZ_STR_ISNOTEMPTY(x)
RZ_API const char * rz_str_rwx_i(int rwx)
RZ_API char * rz_str_newf(const char *fmt,...) RZ_PRINTF_CHECK(1
RZ_API char * rz_str_ndup(RZ_NULLABLE const char *ptr, int len)
Create new copy of string ptr limited to size len.
RZ_API RZ_OWN char * rz_str_escape(RZ_NONNULL const char *buf)
RZ_API RZ_BORROW char * rz_str_trim_tail(RZ_NONNULL char *str)
Removes whitespace characters (space, tab, newline etc.) from the end of a string and replaces them w...
RZ_API const char * rz_str_rchr(const char *base, const char *p, int ch)
RZ_API char * rz_str_dup(char *ptr, const char *string)
RZ_API const char * rz_str_enc_as_string(RzStrEnc enc)
RZ_API char * rz_str_utf16_encode(const char *s, int len)
#define RZ_STR_ISEMPTY(x)
RZ_API char * rz_str_prepend(char *ptr, const char *string)
RZ_API bool rz_str_isnumber(const char *str)
RZ_API int rz_str_bits(char *strout, const ut8 *buf, int len, const char *bitz)
RZ_API size_t rz_str_nlen(const char *s, size_t n)
RZ_API const char * rz_str_trim_head_ro(const char *str)
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.
RZ_API bool rz_str_startswith(RZ_NONNULL const char *str, RZ_NONNULL const char *needle)
Checks if a string starts with a specifc sequence of characters (case sensitive)
RZ_API const char * rz_str_pad(const char ch, int len)
RZ_API RzStrEnc rz_str_guess_encoding_from_buffer(RZ_NONNULL const ut8 *buffer, ut32 length)
Tries to guess the string encoding method from the buffer.
RZ_API RzList * rz_str_split_list(char *str, const char *c, int n)
Split the string str according to the substring c and returns a RzList with the result.
RZ_API bool rz_str_endswith(RZ_NONNULL const char *str, RZ_NONNULL const char *needle)
Checks if a string ends with a specifc sequence of characters (case sensitive)
RZ_API char * rz_str_list_join(RzList *str, const char *sep)
RZ_API char * rz_str_nextword(char *s, char ch)
RZ_API RZ_OWN char * rz_str_stringify_raw_buffer(RzStrStringifyOpt *option, RZ_NULLABLE RZ_OUT ut32 *length)
Converts a raw buffer to a printable string based on the selected options.
RZ_API size_t rz_str_split(char *str, char ch)
Split string str in place by using ch as a delimiter.
#define rz_strf(buf,...)
Convenience macro for local temporary strings.
RZ_API RZ_OWN char * rz_strbuf_drain(RzStrBuf *sb)
#define RZ_STRBUF_SAFEGET(sb)
RZ_API char * rz_strbuf_get(RzStrBuf *sb)
RZ_API bool rz_strbuf_append(RzStrBuf *sb, const char *s)
RZ_API RzStrBuf * rz_strbuf_new(const char *s)
RZ_API void rz_strbuf_free(RzStrBuf *sb)
RZ_API bool rz_strbuf_appendf(RzStrBuf *sb, const char *fmt,...) RZ_PRINTF_CHECK(2
RZ_API RzList * rz_sys_dir(const char *path)
RZ_API void rz_table_add_column(RzTable *t, RzTableColumnType *type, const char *name, int maxWidth)
RZ_API void rz_table_add_rowf(RzTable *t, const char *fmt,...)
RZ_API void rz_table_free(RzTable *t)
RZ_API bool rz_table_query(RzTable *t, const char *q)
RZ_API void rz_table_set_columnsf(RzTable *t, const char *fmt,...)
Specify the types and names of the referenced table.
RZ_API RZ_OWN char * rz_table_tofancystring(RZ_NONNULL RzTable *t)
Convert the content of RzTable to string.
RZ_API RzTableColumnType * rz_table_type(const char *name)
RZ_API RZ_OWN char * rz_time_date_dos_to_string(ut32 timestamp)
Converts a dos date (ut32) and returns the timestamp in string format.
RZ_API RZ_OWN char * rz_time_date_now_to_string(void)
Returns the timestamp in string format of the current time (now)
#define rz_time_date_unix_to_string
RZ_API RZ_OWN char * rz_time_date_w32_to_string(ut64 timestamp)
Converts a Win32 date (ut64) and returns the timestamp in string format.
RZ_API RZ_OWN char * rz_time_date_hfs_to_string(ut32 timestamp)
Converts a Mac HFS+ date (ut32) and returns the timestamp in string format.
#define RZ_JOIN_3_PATHS(p1, p2, p3)
#define RZ_JOIN_2_PATHS(p1, p2)
RzOutputMode
Enum to describe the way data are printed.
@ RZ_OUTPUT_MODE_QUIETEST
@ RZ_OUTPUT_MODE_STANDARD
static void * rz_vector_index_ptr(RzVector *vec, size_t index)
static size_t rz_vector_len(const RzVector *vec)
RZ_API void rz_x509_free_certificate(RX509Certificate *certificate)
RZ_API RX509Certificate * rz_x509_parse_certificate(RASN1Object *object)
RZ_API void rz_x509_certificate_dump(RX509Certificate *cert, const char *pad, RzStrBuf *sb)
RZ_API bool rz_core_seek(RzCore *core, ut64 addr, bool rb)
Seek to addr.
static struct sockaddr static addrlen static backlog const void static flags void struct sockaddr from
static struct sockaddr static addrlen static backlog const void static flags void struct sockaddr socklen_t static fromlen const void const struct sockaddr to
RzAsmTokenString * asm_toks
Tokenized asm string.
Represent the output state of a command handler.
RzConsPrintablePalette pal
RZ_DEPRECATE bool newline
RZ_DEPRECATE bool cmd_in_backticks
RzList *(* pids)(RzDebug *dbg, int pid)
struct rz_debug_plugin_t * cur
RzIOIsValidOff is_valid_offset
ut64(* get_register_value)(RzReg *reg, RzRegItem *item)
RzRegItem *(* get_register)(RzReg *reg, const char *name, int type)
RzPrintCommentCallback get_comments
bool urlencode
Encodes the output following RFC 3986.
bool escape_nl
When enabled escapes new lines ( ).
bool stop_at_nil
When enabled stops printing when '\0' is found.
bool json
Encodes the output as a JSON string.
ut32 wrap_at
Adds a new line the output when it exeeds this value.
const ut8 * buffer
String buffer (cannot be NULL).
RzStrEnc encoding
String encoding type (cannot be RZ_STRING_ENC_GUESS)
ut32 length
String buffer length.
RZ_API void rz_type_db_format_purge(RzTypeDB *typedb)
Purges formats in the instance of the RzTypeDB.
RZ_API bool rz_core_prevop_addr(RzCore *core, ut64 start_addr, int numinstrs, ut64 *prev_addr)
RZ_API ut64 rz_core_prevop_addr_force(RzCore *core, ut64 start_addr, int numinstrs)
if(dbg->bits==RZ_SYS_BITS_64)
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
RZ_API RzList * rz_analysis_xrefs_get_to(RzAnalysis *analysis, ut64 addr)
static bool input(void *ud, zip_uint8_t *data, zip_uint64_t length)