forked from JonathanSalwan/Tigress_protection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample1-virt-max-merge-lenght-30.py
155 lines (151 loc) · 6.33 KB
/
sample1-virt-max-merge-lenght-30.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
#!/usr/bin/env python2
## -*- coding: utf-8 -*-
import sys
def sx(bits, value):
sign_bit = 1 << (bits - 1)
return (value & (sign_bit - 1)) - (value & sign_bit)
SymVar_0 = int(sys.argv[1])
ref_264 = SymVar_0
ref_279 = ref_264 # MOV operation
ref_5462 = ref_279 # MOV operation
ref_5504 = ref_5462 # MOV operation
ref_5512 = ((ref_5504 << (0x39 & 0x3F)) & 0xFFFFFFFFFFFFFFFF) # SHL operation
ref_5519 = ref_5512 # MOV operation
ref_5929 = ref_279 # MOV operation
ref_5971 = ref_5929 # MOV operation
ref_5979 = (ref_5971 >> (0x7 & 0x3F)) # SHR operation
ref_5986 = ref_5979 # MOV operation
ref_6018 = ref_5986 # MOV operation
ref_6030 = ref_5519 # MOV operation
ref_6032 = (ref_6030 | ref_6018) # OR operation
ref_6071 = ref_6032 # MOV operation
ref_6561 = ref_6071 # MOV operation
ref_6607 = ref_6561 # MOV operation
ref_6609 = ((ref_6607 + 0x2D4AF89B) & 0xFFFFFFFFFFFFFFFF) # ADD operation
ref_6659 = ref_6609 # MOV operation
ref_6661 = (ref_6659 & 0x1D5ABF66) # AND operation
ref_7108 = ref_279 # MOV operation
ref_7150 = ref_7108 # MOV operation
ref_7158 = ((ref_7150 << (0x35 & 0x3F)) & 0xFFFFFFFFFFFFFFFF) # SHL operation
ref_7165 = ref_7158 # MOV operation
ref_7566 = ref_279 # MOV operation
ref_7608 = ref_7566 # MOV operation
ref_7616 = (ref_7608 >> (0xB & 0x3F)) # SHR operation
ref_7623 = ref_7616 # MOV operation
ref_7655 = ref_7623 # MOV operation
ref_7667 = ref_7165 # MOV operation
ref_7669 = (ref_7667 | ref_7655) # OR operation
ref_7706 = ref_7669 # MOV operation
ref_7718 = ref_6661 # MOV operation
ref_7720 = ((ref_7706 - ref_7718) & 0xFFFFFFFFFFFFFFFF) # SUB operation
ref_7728 = ref_7720 # MOV operation
ref_7762 = ref_7728 # MOV operation
ref_8469 = ref_279 # MOV operation
ref_8501 = ref_8469 # MOV operation
ref_8515 = ((ref_8501 - 0xE8D4346) & 0xFFFFFFFFFFFFFFFF) # SUB operation
ref_8523 = ref_8515 # MOV operation
ref_8557 = ref_8523 # MOV operation
ref_9047 = ref_6071 # MOV operation
ref_9079 = ref_9047 # MOV operation
ref_9093 = ((0x20453EE3 + ref_9079) & 0xFFFFFFFFFFFFFFFF) # ADD operation
ref_9532 = ref_279 # MOV operation
ref_9564 = ref_9532 # MOV operation
ref_9576 = ref_9093 # MOV operation
ref_9578 = ((ref_9564 - ref_9576) & 0xFFFFFFFFFFFFFFFF) # SUB operation
ref_9586 = ref_9578 # MOV operation
ref_9620 = ref_9586 # MOV operation
ref_10859 = ref_6071 # MOV operation
ref_11257 = ref_8557 # MOV operation
ref_11289 = ref_11257 # MOV operation
ref_11301 = ref_10859 # MOV operation
ref_11303 = (ref_11301 | ref_11289) # OR operation
ref_11429 = ref_11303 # MOV operation
ref_11435 = (0x3F & ref_11429) # AND operation
ref_11482 = ref_11435 # MOV operation
ref_11490 = ((ref_11482 << (0x4 & 0x3F)) & 0xFFFFFFFFFFFFFFFF) # SHL operation
ref_11497 = ref_11490 # MOV operation
ref_11781 = ref_6071 # MOV operation
ref_11799 = ref_11781 # MOV operation
ref_11811 = ref_11497 # MOV operation
ref_11813 = (ref_11811 | ref_11799) # OR operation
ref_11852 = ref_11813 # MOV operation
ref_12549 = ref_7762 # MOV operation
ref_12895 = ref_11852 # MOV operation
ref_12945 = ref_12895 # MOV operation
ref_12959 = (ref_12945 >> (0x1 & 0x3F)) # SHR operation
ref_13014 = ref_12959 # MOV operation
ref_13028 = (0xF & ref_13014) # AND operation
ref_13065 = ref_13028 # MOV operation
ref_13079 = (0x1 | ref_13065) # OR operation
ref_13146 = ref_13079 # MOV operation
ref_13148 = ((0x40 - ref_13146) & 0xFFFFFFFFFFFFFFFF) # SUB operation
ref_13156 = ref_13148 # MOV operation
ref_13188 = ref_12549 # MOV operation
ref_13200 = ref_13156 # MOV operation
ref_13202 = ((ref_13188 << ((ref_13200 & 0xFF) & 0x3F)) & 0xFFFFFFFFFFFFFFFF) # SHL operation
ref_13612 = ref_7762 # MOV operation
ref_13958 = ref_11852 # MOV operation
ref_14008 = ref_13958 # MOV operation
ref_14022 = (ref_14008 >> (0x1 & 0x3F)) # SHR operation
ref_14077 = ref_14022 # MOV operation
ref_14091 = (0xF & ref_14077) # AND operation
ref_14128 = ref_14091 # MOV operation
ref_14142 = (0x1 | ref_14128) # OR operation
ref_14179 = ref_13612 # MOV operation
ref_14191 = ref_14142 # MOV operation
ref_14193 = (ref_14179 >> ((ref_14191 & 0xFF) & 0x3F)) # SHR operation
ref_14222 = ref_14193 # MOV operation
ref_14226 = ref_13202 # MOV operation
ref_14228 = (ref_14226 | ref_14222) # OR operation
ref_14259 = ref_14228 # MOV operation
ref_14910 = ref_9620 # MOV operation
ref_15308 = ref_14259 # MOV operation
ref_15340 = ref_15308 # MOV operation
ref_15352 = ref_14910 # MOV operation
ref_15354 = ((ref_15340 - ref_15352) & 0xFFFFFFFFFFFFFFFF) # SUB operation
ref_15362 = ref_15354 # MOV operation
ref_15396 = ref_15362 # MOV operation
ref_17115 = ref_11852 # MOV operation
ref_17407 = ref_7762 # MOV operation
ref_17457 = ref_17407 # MOV operation
ref_17471 = (0xF & ref_17457) # AND operation
ref_17508 = ref_17471 # MOV operation
ref_17522 = (0x1 | ref_17508) # OR operation
ref_17589 = ref_17522 # MOV operation
ref_17591 = ((0x40 - ref_17589) & 0xFFFFFFFFFFFFFFFF) # SUB operation
ref_17599 = ref_17591 # MOV operation
ref_17615 = ref_17115 # MOV operation
ref_17627 = ref_17599 # MOV operation
ref_17629 = ((ref_17615 << ((ref_17627 & 0xFF) & 0x3F)) & 0xFFFFFFFFFFFFFFFF) # SHL operation
ref_18028 = ref_11852 # MOV operation
ref_18320 = ref_7762 # MOV operation
ref_18370 = ref_18320 # MOV operation
ref_18384 = (0xF & ref_18370) # AND operation
ref_18421 = ref_18384 # MOV operation
ref_18435 = (0x1 | ref_18421) # OR operation
ref_18472 = ref_18028 # MOV operation
ref_18484 = ref_18435 # MOV operation
ref_18486 = (ref_18472 >> ((ref_18484 & 0xFF) & 0x3F)) # SHR operation
ref_18515 = ref_18486 # MOV operation
ref_18519 = ref_17629 # MOV operation
ref_18521 = (ref_18519 | ref_18515) # OR operation
ref_18931 = ref_9620 # MOV operation
ref_19205 = ref_15396 # MOV operation
ref_19237 = ref_19205 # MOV operation
ref_19249 = ref_18931 # MOV operation
ref_19251 = (ref_19249 | ref_19237) # OR operation
ref_19306 = ref_19251 # MOV operation
ref_19320 = (ref_19306 >> (0x1 & 0x3F)) # SHR operation
ref_19375 = ref_19320 # MOV operation
ref_19389 = (0x7 & ref_19375) # AND operation
ref_19418 = ref_19389 # MOV operation
ref_19424 = (0x1 | ref_19418) # OR operation
ref_19455 = ref_18521 # MOV operation
ref_19459 = ref_19424 # MOV operation
ref_19461 = (ref_19459 & 0xFFFFFFFF) # MOV operation
ref_19463 = ((ref_19455 << ((ref_19461 & 0xFF) & 0x3F)) & 0xFFFFFFFFFFFFFFFF) # SHL operation
ref_19470 = ref_19463 # MOV operation
ref_19504 = ref_19470 # MOV operation
ref_19783 = ref_19504 # MOV operation
ref_19785 = ref_19783 # MOV operation
print ref_19785 & 0xffffffffffffffff