Rizin
unix-like reverse engineering framework and cli tools
opcode_analysis.c
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2020 FXTi <zjxiang1998@gmail.com>
2 // SPDX-License-Identifier: LGPL-3.0-only
3 
4 #include "opcode.h"
5 
6 // The actual code of one opcode varies across the versions.
7 // That's why I specify one opcode by its name, not its code.
8 
9 static inline void analysis_push(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg, ut32 type, st32 push_cnt) {
10  op->type = type;
11  op->stackop = RZ_ANALYSIS_STACK_INC;
12  op->stackptr = OBJECT_SIZE_ON_STACK * push_cnt;
13 }
14 
15 static inline void analysis_pop(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg, ut32 type, st32 push_cnt) {
16  op->type = type;
17  op->stackop = RZ_ANALYSIS_STACK_INC;
18  op->stackptr = -(OBJECT_SIZE_ON_STACK * push_cnt);
19 }
20 
23 }
24 
26  analysis_push(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
27 }
28 
29 static void analysis_BINARY_ADD(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
30  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_ADD, 1);
31 }
32 
33 static void analysis_BINARY_AND(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
34  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_AND, 1);
35 }
36 
38  // https://github.com/python/cpython/blob/v1.4b3/Include/opcode.h
39  // I can not find this opcode even in v1.4 version source code.
41 }
42 
44  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_DIV, 1);
45 }
46 
48  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_DIV, 1);
49 }
50 
52  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_SHL, 1);
53 }
54 
56  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
57 }
58 
60  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_MOD, 1);
61 }
62 
64  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_MUL, 1);
65 }
66 
67 static void analysis_BINARY_OR(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
68  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_OR, 1);
69 }
70 
72  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
73 }
74 
76  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_SHR, 1);
77 }
78 
80  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
81 }
82 
84  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_SUB, 1);
85 }
86 
88  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_DIV, 1);
89 }
90 
91 static void analysis_BINARY_XOR(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
92  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_XOR, 1);
93 }
94 
95 static void analysis_BREAK_LOOP(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
96  // op->type = RZ_ANALYSIS_OP_TYPE_CJMP;
97  // This is actually a jump, but require further analysis
99  op->jump = -1;
100  op->fail = -1;
101 }
102 
104  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_NEW, 2);
105 }
106 
108  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_NEW, oparg);
109 }
110 
112  op->type = RZ_ANALYSIS_OP_TYPE_NEW;
113 }
114 
116  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_NEW, oparg);
117 }
118 
120  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_NEW, oparg - 1);
121 }
122 
123 static void analysis_BUILD_MAP(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
124  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_NEW, 2 * oparg - 1);
125 }
126 
128  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_NEW, oparg - 1);
129 }
130 
132  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_NEW, oparg);
133 }
134 
135 static void analysis_BUILD_SET(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
136  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_NEW, oparg - 1);
137 }
138 
140  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_NEW, oparg - 1);
141 }
142 
144  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_NEW, oparg - 1);
145 }
146 
148  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_NEW, oparg - 1);
149 }
150 
152  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_NEW, oparg - 1);
153 }
154 
156  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_NEW, oparg - 1);
157 }
158 
160  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_NEW, oparg);
161 }
162 
164  // TODO
165  // Get callee function from stack
166  // Parse oparg by version info
168  op->jump = -1;
169 }
170 
173  op->jump = -1;
174 }
175 
178  op->jump = -1;
179 }
180 
183  op->jump = -1;
184 }
185 
188  op->jump = -1;
189 }
190 
193  op->jump = -1;
194 }
195 
197  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
198 }
199 
201  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
202 }
203 
205  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
206 }
207 
209  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
210 }
211 
213  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
214 }
215 
217  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
218 }
219 
221  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
222 }
223 
225  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
226 }
227 
229  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
230 }
231 
233  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
234 }
235 
236 static void analysis_DUP_TOP(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
237  analysis_push(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UPUSH, 1);
238 }
239 
240 static void analysis_DUP_TOPX(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
241  analysis_push(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UPUSH, 1);
242 }
243 
245  analysis_push(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UPUSH, 2);
246 }
247 
249  // If TOS is StopAsyncIteration pop 7 values from the stack and restore the exception state using the second three of them.
250  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
251 }
252 
254  // op->type = RZ_ANALYSIS_OP_TYPE_CJMP;
255  // This is actually a jump, but require further analysis
256  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
257  op->jump = -1;
258  op->fail = -1;
259 }
260 
261 static void analysis_EXEC_STMT(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
262  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
263 }
264 
266  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
267 }
268 
270  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
271  if ((oparg & 0x04) == 0x04) {
272  op->stackop = RZ_ANALYSIS_STACK_INC;
273  op->stackptr = -OBJECT_SIZE_ON_STACK;
274  }
275 }
276 
277 static void analysis_FOR_LOOP(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
278  // https://github.com/python/cpython/blob/b2b1ed17819ecb24a78d07d3ff1e8e6bc6137721/Python/ceval.c#L1499
279  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
280 }
281 
282 static void analysis_GET_AITER(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
283  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
284 }
285 
286 static void analysis_GET_ANEXT(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
287  analysis_push(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
288 }
289 
291  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
292 }
293 
294 static void analysis_GET_ITER(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
295  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
296 }
297 
299  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
300 }
301 
303  analysis_push(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
304 }
305 
307  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
308 }
309 
311  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
312 }
313 
315  op->type = RZ_ANALYSIS_OP_TYPE_ADD;
316 }
317 
319  op->type = RZ_ANALYSIS_OP_TYPE_AND;
320 }
321 
323  op->type = RZ_ANALYSIS_OP_TYPE_DIV;
324 }
325 
327  op->type = RZ_ANALYSIS_OP_TYPE_DIV;
328 }
329 
331  op->type = RZ_ANALYSIS_OP_TYPE_SHL;
332 }
333 
335  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
336 }
337 
339  op->type = RZ_ANALYSIS_OP_TYPE_MOD;
340 }
341 
343  op->type = RZ_ANALYSIS_OP_TYPE_MUL;
344 }
345 
347  op->type = RZ_ANALYSIS_OP_TYPE_OR;
348 }
349 
351  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
352 }
353 
355  op->type = RZ_ANALYSIS_OP_TYPE_SHR;
356 }
357 
359  op->type = RZ_ANALYSIS_OP_TYPE_SUB;
360 }
361 
363  op->type = RZ_ANALYSIS_OP_TYPE_DIV;
364 }
365 
367  op->type = RZ_ANALYSIS_OP_TYPE_XOR;
368 }
369 
371  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
372 }
373 
375  analysis_push(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
376 }
377 
378 static void analysis_LOAD_ATTR(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
379  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
380 }
381 
383  analysis_push(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
384 }
385 
387  analysis_push(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
388 }
389 
391  analysis_push(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
392 }
393 
395  analysis_push(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
396 }
397 
399  analysis_push(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
400 }
401 
402 static void analysis_LOAD_FAST(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
403  analysis_push(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
404 }
405 
407  analysis_push(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
408 }
409 
411  // https://github.com/python/cpython/blob/24260ec91623c18569225229d5becb852010ae2c/Include/opcode.h#L80
412  // Can't find this opcode
413  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
414 }
415 
417  analysis_push(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
418 }
419 
421  analysis_push(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
422 }
423 
425  analysis_push(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
426 }
427 
428 static void analysis_LOAD_NAME(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
429  analysis_push(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
430 }
431 
433  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, oparg);
434 }
435 
437  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, oparg);
438 }
439 
440 static void analysis_MAP_ADD(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
441  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
442 }
443 
444 static void analysis_NOP(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
445  op->type = RZ_ANALYSIS_OP_TYPE_NOP;
446 }
447 
448 static void analysis_POP_BLOCK(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
449  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_POP, 1);
450 }
451 
453  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_POP, 1);
454 }
455 
457  // FIXME
458  // POP_FINALLY will pop 6 elements if TOS is an exception type
459  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_POP, 1);
460 }
461 
462 static void analysis_POP_TOP(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
463  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_POP, 1);
464 }
465 
467  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
468 }
469 
471  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
472 }
473 
475  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 2);
476 }
477 
479  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
480 }
481 
483  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
484 }
485 
487  // https://github.com/python/cpython/blob/6c3a3aa17b028f6b93067083d32c7eaa4338757c/Include/opcode.h#L89
488  // Can't find this opcode
489  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
490 }
491 
493  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, oparg);
494 }
495 
496 static void analysis_RERAISE(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
497  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 3);
498 }
499 
501  // https://github.com/python/cpython/blob/6c3a3aa17b028f6b93067083d32c7eaa4338757c/Include/opcode.h#L134
502  // Can't find this opcode
503  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
504 }
505 
507  op->type = RZ_ANALYSIS_OP_TYPE_RET;
508  op->stackop = RZ_ANALYSIS_STACK_INC;
509  op->stackptr = -OBJECT_SIZE_ON_STACK;
510  op->eob = true;
511 }
512 
513 static void analysis_ROT_FOUR(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
514  // Lifts second, third and forth stack items one position up, moves top down to position four.
516 }
517 
518 static void analysis_ROT_THREE(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
519  // Lifts second and third stack item one position up, moves top down to position three.
521 }
522 
523 static void analysis_ROT_TWO(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
524  // Swaps the two top-most stack items.
526 }
527 
529  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
530 }
531 
532 static void analysis_SET_ADD(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
533  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
534 }
535 
537  // https://github.com/python/cpython/blob/v1.4/Python/ceval.c
538  // Can't find this opcode
539  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
540 }
541 
543  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
544 }
545 
546 static void analysis_SLICE_0(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
547  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
548 }
549 
550 static void analysis_SLICE_1(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
551  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
552 }
553 
554 static void analysis_SLICE_2(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
555  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
556 }
557 
558 static void analysis_SLICE_3(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
559  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 2);
560 }
561 
562 static void analysis_STOP_CODE(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
564 }
565 
567  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
568 }
569 
571  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
572 }
573 
575  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
576 }
577 
579  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
580 }
581 
583  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
584 }
585 
587  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
588 }
589 
590 static void analysis_STORE_MAP(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
591  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 2);
592 }
593 
595  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
596 }
597 
599  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 2);
600 }
601 
603  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 3);
604 }
605 
607  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 3);
608 }
609 
611  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 4);
612 }
613 
615  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 3);
616 }
617 
619  // https://github.com/python/cpython/blob/v1.4b3/Include/opcode.h
620  // I can not find this opcode even in v1.4 version source code.
621  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
622 }
623 
625  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
626 }
627 
629  op->type = RZ_ANALYSIS_OP_TYPE_NOT;
630 }
631 
633  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
634 }
635 
636 static void analysis_UNARY_NOT(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
637  op->type = RZ_ANALYSIS_OP_TYPE_NOT;
638 }
639 
641  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
642 }
643 
645  analysis_push(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, oparg - 1);
646 }
647 
648 static void analysis_UNPACK_EX(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
649  analysis_push(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, (oparg & 0xFF) + (oparg >> 8));
650 }
651 
653  analysis_push(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, oparg - 1);
654 }
655 
657  analysis_push(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, oparg - 1);
658 }
659 
661  analysis_push(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, oparg - 1);
662 }
663 
665  // https://github.com/python/cpython/blob/v1.4b3/Include/opcode.h
666  // I can not find this opcode even in v1.4 version source code.
667  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
668 }
669 
671  // Need the value on stack
672  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
673 }
674 
676  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 2);
677 }
678 
680  // Need the value on stack
681  op->type = RZ_ANALYSIS_OP_TYPE_UNK;
682 }
683 
685  analysis_push(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
686 }
687 
689  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
690 }
691 
693  analysis_pop(op, op_obj, oparg, RZ_ANALYSIS_OP_TYPE_UNK, 1);
694 }
695 
696 static void analysis_FOR_ITER(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
698  ut64 mid = op->jump;
699  op->jump = op->fail;
700  op->fail = mid;
701 }
702 
704  ut64 mid = op->jump;
705  op->jump = op->fail;
706  op->fail = mid;
707 }
708 
710  ut64 mid = op->jump;
711  op->jump = op->fail;
712  op->fail = mid;
713 }
714 
716  ut64 mid = op->jump;
717  op->jump = op->fail;
718  op->fail = mid;
719 }
720 
723  ut64 mid = op->jump;
724  op->jump = op->fail;
725  op->fail = mid;
726 }
727 
730  ut64 mid = op->jump;
731  op->jump = op->fail;
732  op->fail = mid;
733 }
734 
736  { "BEFORE_ASYNC_WITH", analysis_BEFORE_ASYNC_WITH },
737  { "BEGIN_FINALLY", analysis_BEGIN_FINALLY },
738  { "BINARY_ADD", analysis_BINARY_ADD },
739  { "BINARY_AND", analysis_BINARY_AND },
740  { "BINARY_CALL", analysis_BINARY_CALL },
741  { "BINARY_DIVIDE", analysis_BINARY_DIVIDE },
742  { "BINARY_FLOOR_DIVIDE", analysis_BINARY_FLOOR_DIVIDE },
743  { "BINARY_LSHIFT", analysis_BINARY_LSHIFT },
744  { "BINARY_MATRIX_MULTIPLY", analysis_BINARY_MATRIX_MULTIPLY },
745  { "BINARY_MODULO", analysis_BINARY_MODULO },
746  { "BINARY_MULTIPLY", analysis_BINARY_MULTIPLY },
747  { "BINARY_OR", analysis_BINARY_OR },
748  { "BINARY_POWER", analysis_BINARY_POWER },
749  { "BINARY_RSHIFT", analysis_BINARY_RSHIFT },
750  { "BINARY_SUBSCR", analysis_BINARY_SUBSCR },
751  { "BINARY_SUBTRACT", analysis_BINARY_SUBTRACT },
752  { "BINARY_TRUE_DIVIDE", analysis_BINARY_TRUE_DIVIDE },
753  { "BINARY_XOR", analysis_BINARY_XOR },
754  { "BREAK_LOOP", analysis_BREAK_LOOP },
755  { "BUILD_CLASS", analysis_BUILD_CLASS },
756  { "BUILD_CONST_KEY_MAP", analysis_BUILD_CONST_KEY_MAP },
757  { "BUILD_FUNCTION", analysis_BUILD_FUNCTION },
758  { "BUILD_LIST", analysis_BUILD_LIST },
759  { "BUILD_LIST_UNPACK", analysis_BUILD_LIST_UNPACK },
760  { "BUILD_MAP", analysis_BUILD_MAP },
761  { "BUILD_MAP_UNPACK", analysis_BUILD_MAP_UNPACK },
762  { "BUILD_MAP_UNPACK_WITH_CALL", analysis_BUILD_MAP_UNPACK_WITH_CALL },
763  { "BUILD_SET", analysis_BUILD_SET },
764  { "BUILD_SET_UNPACK", analysis_BUILD_SET_UNPACK },
765  { "BUILD_SLICE", analysis_BUILD_SLICE },
766  { "BUILD_STRING", analysis_BUILD_STRING },
767  { "BUILD_TUPLE", analysis_BUILD_TUPLE },
768  { "BUILD_TUPLE_UNPACK", analysis_BUILD_TUPLE_UNPACK },
769  { "BUILD_TUPLE_UNPACK_WITH_CALL", analysis_BUILD_TUPLE_UNPACK_WITH_CALL },
770  { "CALL_FUNCTION", analysis_CALL_FUNCTION },
771  { "CALL_FUNCTION_EX", analysis_CALL_FUNCTION_EX },
772  { "CALL_FUNCTION_KW", analysis_CALL_FUNCTION_KW },
773  { "CALL_FUNCTION_VAR", analysis_CALL_FUNCTION_VAR },
774  { "CALL_FUNCTION_VAR_KW", analysis_CALL_FUNCTION_VAR_KW },
775  { "CALL_METHOD", analysis_CALL_METHOD },
776  { "DELETE_ATTR", analysis_DELETE_ATTR },
777  { "DELETE_DEREF", analysis_DELETE_DEREF },
778  { "DELETE_FAST", analysis_DELETE_FAST },
779  { "DELETE_GLOBAL", analysis_DELETE_GLOBAL },
780  { "DELETE_NAME", analysis_DELETE_NAME },
781  { "DELETE_SLICE_0", analysis_DELETE_SLICE_0 },
782  { "DELETE_SLICE_1", analysis_DELETE_SLICE_1 },
783  { "DELETE_SLICE_2", analysis_DELETE_SLICE_2 },
784  { "DELETE_SLICE_3", analysis_DELETE_SLICE_3 },
785  { "DELETE_SUBSCR", analysis_DELETE_SUBSCR },
786  { "DUP_TOP", analysis_DUP_TOP },
787  { "DUP_TOPX", analysis_DUP_TOPX },
788  { "DUP_TOP_TWO", analysis_DUP_TOP_TWO },
789  { "END_ASYNC_FOR", analysis_END_ASYNC_FOR },
790  { "END_FINALLY", analysis_END_FINALLY },
791  { "EXEC_STMT", analysis_EXEC_STMT },
792  { "EXTENDED_ARG", analysis_EXTENDED_ARG },
793  { "FORMAT_VALUE", analysis_FORMAT_VALUE },
794  { "FOR_LOOP", analysis_FOR_LOOP },
795  { "GET_AITER", analysis_GET_AITER },
796  { "GET_ANEXT", analysis_GET_ANEXT },
797  { "GET_AWAITABLE", analysis_GET_AWAITABLE },
798  { "GET_ITER", analysis_GET_ITER },
799  { "GET_YIELD_FROM_ITER", analysis_GET_YIELD_FROM_ITER },
800  { "IMPORT_FROM", analysis_IMPORT_FROM },
801  { "IMPORT_NAME", analysis_IMPORT_NAME },
802  { "IMPORT_STAR", analysis_IMPORT_STAR },
803  { "INPLACE_ADD", analysis_INPLACE_ADD },
804  { "INPLACE_AND", analysis_INPLACE_AND },
805  { "INPLACE_DIVIDE", analysis_INPLACE_DIVIDE },
806  { "INPLACE_FLOOR_DIVIDE", analysis_INPLACE_FLOOR_DIVIDE },
807  { "INPLACE_LSHIFT", analysis_INPLACE_LSHIFT },
808  { "INPLACE_MATRIX_MULTIPLY", analysis_INPLACE_MATRIX_MULTIPLY },
809  { "INPLACE_MODULO", analysis_INPLACE_MODULO },
810  { "INPLACE_MULTIPLY", analysis_INPLACE_MULTIPLY },
811  { "INPLACE_OR", analysis_INPLACE_OR },
812  { "INPLACE_POWER", analysis_INPLACE_POWER },
813  { "INPLACE_RSHIFT", analysis_INPLACE_RSHIFT },
814  { "INPLACE_SUBTRACT", analysis_INPLACE_SUBTRACT },
815  { "INPLACE_TRUE_DIVIDE", analysis_INPLACE_TRUE_DIVIDE },
816  { "INPLACE_XOR", analysis_INPLACE_XOR },
817  { "LIST_APPEND", analysis_LIST_APPEND },
818  { "LOAD_ASSERTION_ERROR", analysis_LOAD_ASSERTION_ERROR },
819  { "LOAD_ATTR", analysis_LOAD_ATTR },
820  { "LOAD_BUILD_CLASS", analysis_LOAD_BUILD_CLASS },
821  { "LOAD_CLASSDEREF", analysis_LOAD_CLASSDEREF },
822  { "LOAD_CLOSURE", analysis_LOAD_CLOSURE },
823  { "LOAD_CONST", analysis_LOAD_CONST },
824  { "LOAD_DEREF", analysis_LOAD_DEREF },
825  { "LOAD_FAST", analysis_LOAD_FAST },
826  { "LOAD_GLOBAL", analysis_LOAD_GLOBAL },
827  { "LOAD_GLOBALS", analysis_LOAD_GLOBALS },
828  { "LOAD_LOCAL", analysis_LOAD_LOCAL },
829  { "LOAD_LOCALS", analysis_LOAD_LOCALS },
830  { "LOAD_METHOD", analysis_LOAD_METHOD },
831  { "LOAD_NAME", analysis_LOAD_NAME },
832  { "MAKE_CLOSURE", analysis_MAKE_CLOSURE },
833  { "MAKE_FUNCTION", analysis_MAKE_FUNCTION },
834  { "MAP_ADD", analysis_MAP_ADD },
835  { "NOP", analysis_NOP },
836  { "POP_BLOCK", analysis_POP_BLOCK },
837  { "POP_EXCEPT", analysis_POP_EXCEPT },
838  { "POP_FINALLY", analysis_POP_FINALLY },
839  { "POP_TOP", analysis_POP_TOP },
840  { "PRINT_EXPR", analysis_PRINT_EXPR },
841  { "PRINT_ITEM", analysis_PRINT_ITEM },
842  { "PRINT_ITEM_TO", analysis_PRINT_ITEM_TO },
843  { "PRINT_NEWLINE", analysis_PRINT_NEWLINE },
844  { "PRINT_NEWLINE_TO", analysis_PRINT_NEWLINE_TO },
845  { "RAISE_EXCEPTION", analysis_RAISE_EXCEPTION },
846  { "RAISE_VARARGS", analysis_RAISE_VARARGS },
847  { "RERAISE", analysis_RERAISE },
848  { "RESERVE_FAST", analysis_RESERVE_FAST },
849  { "RETURN_VALUE", analysis_RETURN_VALUE },
850  { "ROT_FOUR", analysis_ROT_FOUR },
851  { "ROT_THREE", analysis_ROT_THREE },
852  { "ROT_TWO", analysis_ROT_TWO },
853  { "SETUP_ANNOTATIONS", analysis_SETUP_ANNOTATIONS },
854  { "SET_ADD", analysis_SET_ADD },
855  { "SET_FUNC_ARGS", analysis_SET_FUNC_ARGS },
856  { "SET_LINENO", analysis_SET_LINENO },
857  { "SLICE_0", analysis_SLICE_0 },
858  { "SLICE_1", analysis_SLICE_1 },
859  { "SLICE_2", analysis_SLICE_2 },
860  { "SLICE_3", analysis_SLICE_3 },
861  { "STOP_CODE", analysis_STOP_CODE },
862  { "STORE_ANNOTATION", analysis_STORE_ANNOTATION },
863  { "STORE_ATTR", analysis_STORE_ATTR },
864  { "STORE_DEREF", analysis_STORE_DEREF },
865  { "STORE_FAST", analysis_STORE_FAST },
866  { "STORE_GLOBAL", analysis_STORE_GLOBAL },
867  { "STORE_LOCALS", analysis_STORE_LOCALS },
868  { "STORE_MAP", analysis_STORE_MAP },
869  { "STORE_NAME", analysis_STORE_NAME },
870  { "STORE_SLICE_0", analysis_STORE_SLICE_0 },
871  { "STORE_SLICE_1", analysis_STORE_SLICE_1 },
872  { "STORE_SLICE_2", analysis_STORE_SLICE_2 },
873  { "STORE_SLICE_3", analysis_STORE_SLICE_3 },
874  { "STORE_SUBSCR", analysis_STORE_SUBSCR },
875  { "UNARY_CALL", analysis_UNARY_CALL },
876  { "UNARY_CONVERT", analysis_UNARY_CONVERT },
877  { "UNARY_INVERT", analysis_UNARY_INVERT },
878  { "UNARY_NEGATIVE", analysis_UNARY_NEGATIVE },
879  { "UNARY_NOT", analysis_UNARY_NOT },
880  { "UNARY_POSITIVE", analysis_UNARY_POSITIVE },
881  { "UNPACK_ARG", analysis_UNPACK_ARG },
882  { "UNPACK_EX", analysis_UNPACK_EX },
883  { "UNPACK_LIST", analysis_UNPACK_LIST },
884  { "UNPACK_SEQUENCE", analysis_UNPACK_SEQUENCE },
885  { "UNPACK_TUPLE", analysis_UNPACK_TUPLE },
886  { "UNPACK_VARARG", analysis_UNPACK_VARARG },
887  { "WITH_CLEANUP", analysis_WITH_CLEANUP },
888  { "WITH_CLEANUP_FINISH", analysis_WITH_CLEANUP_FINISH },
889  { "WITH_CLEANUP_START", analysis_WITH_CLEANUP_START },
890  { "WITH_EXCEPT_START", analysis_WITH_EXCEPT_START },
891  { "YIELD_FROM", analysis_YIELD_FROM },
892  { "YIELD_VALUE", analysis_YIELD_VALUE },
893  // Fix jump info
894  { "FOR_ITER", analysis_FOR_ITER },
895  { "SETUP_LOOP", analysis_SETUP_LOOP },
896  { "SETUP_EXCEPT", analysis_SETUP_EXCEPT },
897  { "SETUP_FINALLY", analysis_SETUP_FINALLY },
898  { "SETUP_WITH", analysis_SETUP_WITH },
899  { "SETUP_ASYNC_WITH", analysis_SETUP_ASYNC_WITH },
900 };
901 
903  size_t i;
904  for (i = 0; i < (sizeof(op_analysis) / sizeof(op_analysis_func)); i++) {
905  if (!strcmp(op_analysis[i].op_name, op_obj->op_name)) {
906  op_analysis[i].func(op, op_obj, oparg);
907  break;
908  }
909  }
910 }
lzma_index ** i
Definition: index.h:629
uint32_t ut32
int type
Definition: mipsasm.c:17
static void analysis_SLICE_2(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BEGIN_FINALLY(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_STORE_FAST(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_PRINT_NEWLINE_TO(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_UNPACK_ARG(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static op_analysis_func op_analysis[]
static void analysis_ROT_FOUR(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_EXTENDED_ARG(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_STORE_ANNOTATION(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BINARY_MODULO(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BUILD_SET_UNPACK(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_LOAD_ASSERTION_ERROR(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BUILD_SET(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_GET_AITER(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_POP_EXCEPT(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_CALL_FUNCTION_KW(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_RESERVE_FAST(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_UNPACK_LIST(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_INPLACE_TRUE_DIVIDE(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_LOAD_ATTR(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_STORE_SUBSCR(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_RAISE_EXCEPTION(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_INPLACE_MATRIX_MULTIPLY(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_INPLACE_RSHIFT(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_FOR_LOOP(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BUILD_MAP_UNPACK(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_WITH_EXCEPT_START(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_LOAD_CONST(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_WITH_CLEANUP(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_NOP(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_FORMAT_VALUE(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BINARY_SUBTRACT(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BINARY_AND(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_LOAD_FAST(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BINARY_ADD(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BUILD_LIST_UNPACK(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_UNPACK_SEQUENCE(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_SETUP_FINALLY(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_DELETE_SUBSCR(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_SETUP_ANNOTATIONS(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_INPLACE_DIVIDE(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_INPLACE_FLOOR_DIVIDE(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_LOAD_LOCAL(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_IMPORT_FROM(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BUILD_TUPLE_UNPACK(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_DELETE_FAST(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_RAISE_VARARGS(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BUILD_TUPLE_UNPACK_WITH_CALL(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_CALL_FUNCTION_EX(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_GET_YIELD_FROM_ITER(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BINARY_TRUE_DIVIDE(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BINARY_OR(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_LOAD_GLOBALS(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_SETUP_WITH(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_IMPORT_NAME(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_STORE_SLICE_3(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_SETUP_ASYNC_WITH(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_ROT_THREE(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BEFORE_ASYNC_WITH(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_YIELD_FROM(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_LOAD_CLASSDEREF(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BINARY_SUBSCR(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_EXEC_STMT(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_SETUP_EXCEPT(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_INPLACE_POWER(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_PRINT_ITEM(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_PRINT_ITEM_TO(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BUILD_STRING(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_SET_ADD(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_UNARY_INVERT(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_UNARY_CONVERT(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BINARY_MULTIPLY(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_SET_LINENO(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_ROT_TWO(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_DUP_TOP(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_FOR_ITER(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_SLICE_0(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_STORE_NAME(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BINARY_FLOOR_DIVIDE(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_UNPACK_VARARG(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_GET_ANEXT(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_YIELD_VALUE(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_SLICE_3(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_CALL_FUNCTION_VAR(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BUILD_SLICE(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_WITH_CLEANUP_FINISH(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BINARY_RSHIFT(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_LOAD_NAME(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BUILD_TUPLE(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_POP_FINALLY(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_INPLACE_SUBTRACT(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_END_FINALLY(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_DELETE_ATTR(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_UNARY_NEGATIVE(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BUILD_MAP_UNPACK_WITH_CALL(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_pop(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg, ut32 type, st32 push_cnt)
void analysis_pyc_op(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_DELETE_SLICE_1(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_DUP_TOPX(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BUILD_FUNCTION(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_RETURN_VALUE(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_STORE_SLICE_0(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_INPLACE_XOR(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_CALL_FUNCTION(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_RERAISE(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BINARY_MATRIX_MULTIPLY(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_UNARY_NOT(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_PRINT_EXPR(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_LOAD_METHOD(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_CALL_METHOD(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BINARY_CALL(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_CALL_FUNCTION_VAR_KW(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_INPLACE_AND(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BINARY_DIVIDE(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_INPLACE_LSHIFT(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_DELETE_NAME(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BUILD_CLASS(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_push(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg, ut32 type, st32 push_cnt)
static void analysis_BUILD_MAP(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_INPLACE_ADD(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_DELETE_SLICE_0(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_SLICE_1(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_DUP_TOP_TWO(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_STORE_MAP(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_UNPACK_TUPLE(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_INPLACE_MODULO(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_LOAD_CLOSURE(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_INPLACE_MULTIPLY(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_UNPACK_EX(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BINARY_LSHIFT(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_INPLACE_OR(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_SETUP_LOOP(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_DELETE_SLICE_3(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_STORE_SLICE_1(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_POP_BLOCK(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_PRINT_NEWLINE(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_SET_FUNC_ARGS(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BREAK_LOOP(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_UNARY_CALL(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BINARY_POWER(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_MAKE_FUNCTION(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BUILD_CONST_KEY_MAP(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_STORE_ATTR(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_LIST_APPEND(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_IMPORT_STAR(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BINARY_XOR(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_STORE_LOCALS(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_UNARY_POSITIVE(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_MAP_ADD(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_POP_TOP(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_LOAD_DEREF(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_GET_ITER(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_MAKE_CLOSURE(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_BUILD_LIST(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_DELETE_GLOBAL(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_STORE_DEREF(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_STORE_SLICE_2(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_DELETE_SLICE_2(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_LOAD_LOCALS(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_WITH_CLEANUP_START(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_STOP_CODE(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_STORE_GLOBAL(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_LOAD_BUILD_CLASS(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_DELETE_DEREF(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_GET_AWAITABLE(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_LOAD_GLOBAL(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
static void analysis_END_ASYNC_FOR(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
#define OBJECT_SIZE_ON_STACK
Definition: opcode.h:13
@ RZ_ANALYSIS_STACK_INC
Definition: rz_analysis.h:457
@ RZ_ANALYSIS_OP_TYPE_SUB
Definition: rz_analysis.h:402
@ RZ_ANALYSIS_OP_TYPE_ICALL
Definition: rz_analysis.h:381
@ RZ_ANALYSIS_OP_TYPE_UNK
Definition: rz_analysis.h:388
@ RZ_ANALYSIS_OP_TYPE_MUL
Definition: rz_analysis.h:404
@ RZ_ANALYSIS_OP_TYPE_AND
Definition: rz_analysis.h:411
@ RZ_ANALYSIS_OP_TYPE_MOD
Definition: rz_analysis.h:422
@ RZ_ANALYSIS_OP_TYPE_UPUSH
Definition: rz_analysis.h:395
@ RZ_ANALYSIS_OP_TYPE_TRAP
Definition: rz_analysis.h:392
@ RZ_ANALYSIS_OP_TYPE_XCHG
Definition: rz_analysis.h:421
@ RZ_ANALYSIS_OP_TYPE_ADD
Definition: rz_analysis.h:401
@ RZ_ANALYSIS_OP_TYPE_OR
Definition: rz_analysis.h:410
@ RZ_ANALYSIS_OP_TYPE_SHR
Definition: rz_analysis.h:406
@ RZ_ANALYSIS_OP_TYPE_POP
Definition: rz_analysis.h:398
@ RZ_ANALYSIS_OP_TYPE_CJMP
Definition: rz_analysis.h:373
@ RZ_ANALYSIS_OP_TYPE_DIV
Definition: rz_analysis.h:405
@ RZ_ANALYSIS_OP_TYPE_SHL
Definition: rz_analysis.h:407
@ RZ_ANALYSIS_OP_TYPE_NOT
Definition: rz_analysis.h:414
@ RZ_ANALYSIS_OP_TYPE_RET
Definition: rz_analysis.h:385
@ RZ_ANALYSIS_OP_TYPE_NOP
Definition: rz_analysis.h:389
@ RZ_ANALYSIS_OP_TYPE_XOR
Definition: rz_analysis.h:412
@ RZ_ANALYSIS_OP_TYPE_NEW
Definition: rz_analysis.h:427
#define st32
Definition: rz_types_base.h:12
void(* func)(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg)
Definition: opcode.h:66
char * op_name
Definition: opcode.h:38
Definition: dis.c:32
ut64(WINAPI *w32_GetEnabledXStateFeatures)()