forked from JonathanSalwan/Tigress_protection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample1-virt-max-merge-lenght-20.py
158 lines (154 loc) · 6.47 KB
/
sample1-virt-max-merge-lenght-20.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
156
157
158
#!/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_5357 = ref_279 # MOV operation
ref_5399 = ref_5357 # MOV operation
ref_5407 = ((ref_5399 << (0x39 & 0x3F)) & 0xFFFFFFFFFFFFFFFF) # SHL operation
ref_5414 = ref_5407 # MOV operation
ref_5769 = ref_279 # MOV operation
ref_5811 = ref_5769 # MOV operation
ref_5819 = (ref_5811 >> (0x7 & 0x3F)) # SHR operation
ref_5826 = ref_5819 # MOV operation
ref_5858 = ref_5826 # MOV operation
ref_5870 = ref_5414 # MOV operation
ref_5872 = (ref_5870 | ref_5858) # OR operation
ref_5911 = ref_5872 # MOV operation
ref_6539 = ref_5911 # MOV operation
ref_6601 = ref_6539 # MOV operation
ref_6603 = ((ref_6601 + 0x2D4AF89B) & 0xFFFFFFFFFFFFFFFF) # ADD operation
ref_6637 = ref_6603 # MOV operation
ref_6639 = (ref_6637 & 0x1D5ABF66) # AND operation
ref_7041 = ref_279 # MOV operation
ref_7083 = ref_7041 # MOV operation
ref_7091 = ((ref_7083 << (0x35 & 0x3F)) & 0xFFFFFFFFFFFFFFFF) # SHL operation
ref_7098 = ref_7091 # MOV operation
ref_7453 = ref_279 # MOV operation
ref_7495 = ref_7453 # MOV operation
ref_7503 = (ref_7495 >> (0xB & 0x3F)) # SHR operation
ref_7510 = ref_7503 # MOV operation
ref_7542 = ref_7510 # MOV operation
ref_7554 = ref_7098 # MOV operation
ref_7556 = (ref_7554 | ref_7542) # OR operation
ref_7593 = ref_7556 # MOV operation
ref_7605 = ref_6639 # MOV operation
ref_7607 = ((ref_7593 - ref_7605) & 0xFFFFFFFFFFFFFFFF) # SUB operation
ref_7615 = ref_7607 # MOV operation
ref_7649 = ref_7615 # MOV operation
ref_8310 = ref_279 # MOV operation
ref_8342 = ref_8310 # MOV operation
ref_8356 = ((ref_8342 - 0xE8D4346) & 0xFFFFFFFFFFFFFFFF) # SUB operation
ref_8364 = ref_8356 # MOV operation
ref_8398 = ref_8364 # MOV operation
ref_9026 = ref_5911 # MOV operation
ref_9050 = ref_9026 # MOV operation
ref_9056 = ((0x20453EE3 + ref_9050) & 0xFFFFFFFFFFFFFFFF) # ADD operation
ref_9459 = ref_279 # MOV operation
ref_9491 = ref_9459 # MOV operation
ref_9503 = ref_9056 # MOV operation
ref_9505 = ((ref_9491 - ref_9503) & 0xFFFFFFFFFFFFFFFF) # SUB operation
ref_9513 = ref_9505 # MOV operation
ref_9547 = ref_9513 # MOV operation
ref_10663 = ref_5911 # MOV operation
ref_11117 = ref_8398 # MOV operation
ref_11149 = ref_11117 # MOV operation
ref_11161 = ref_10663 # MOV operation
ref_11163 = (ref_11161 | ref_11149) # OR operation
ref_11218 = ref_11163 # MOV operation
ref_11232 = (0x3F & ref_11218) # AND operation
ref_11287 = ref_11232 # MOV operation
ref_11301 = ((ref_11287 << (0x4 & 0x3F)) & 0xFFFFFFFFFFFFFFFF) # SHL operation
ref_11724 = ref_5911 # MOV operation
ref_11748 = ref_11724 # MOV operation
ref_11752 = ref_11301 # MOV operation
ref_11754 = (ref_11752 | ref_11748) # OR operation
ref_11785 = ref_11754 # MOV operation
ref_12435 = ref_7649 # MOV operation
ref_12849 = ref_11785 # MOV operation
ref_12899 = ref_12849 # MOV operation
ref_12913 = (ref_12899 >> (0x1 & 0x3F)) # SHR operation
ref_12968 = ref_12913 # MOV operation
ref_12982 = (0xF & ref_12968) # AND operation
ref_13011 = ref_12982 # MOV operation
ref_13017 = (0x1 | ref_13011) # OR operation
ref_13068 = ref_13017 # MOV operation
ref_13070 = ((0x40 - ref_13068) & 0xFFFFFFFFFFFFFFFF) # SUB operation
ref_13078 = ref_13070 # MOV operation
ref_13104 = ref_12435 # MOV operation
ref_13108 = ref_13078 # MOV operation
ref_13110 = (ref_13108 & 0xFFFFFFFF) # MOV operation
ref_13112 = ((ref_13104 << ((ref_13110 & 0xFF) & 0x3F)) & 0xFFFFFFFFFFFFFFFF) # SHL operation
ref_13119 = ref_13112 # MOV operation
ref_13483 = ref_7649 # MOV operation
ref_13919 = ref_11785 # MOV operation
ref_13969 = ref_13919 # MOV operation
ref_13983 = (ref_13969 >> (0x1 & 0x3F)) # SHR operation
ref_14038 = ref_13983 # MOV operation
ref_14052 = (0xF & ref_14038) # AND operation
ref_14081 = ref_14052 # MOV operation
ref_14087 = (0x1 | ref_14081) # OR operation
ref_14118 = ref_13483 # MOV operation
ref_14122 = ref_14087 # MOV operation
ref_14124 = (ref_14122 & 0xFFFFFFFF) # MOV operation
ref_14126 = (ref_14118 >> ((ref_14124 & 0xFF) & 0x3F)) # SHR operation
ref_14133 = ref_14126 # MOV operation
ref_14165 = ref_14133 # MOV operation
ref_14177 = ref_13119 # MOV operation
ref_14179 = (ref_14177 | ref_14165) # OR operation
ref_14218 = ref_14179 # MOV operation
ref_14828 = ref_9547 # MOV operation
ref_15282 = ref_14218 # MOV operation
ref_15314 = ref_15282 # MOV operation
ref_15326 = ref_14828 # MOV operation
ref_15328 = ((ref_15314 - ref_15326) & 0xFFFFFFFFFFFFFFFF) # SUB operation
ref_15336 = ref_15328 # MOV operation
ref_15370 = ref_15336 # MOV operation
ref_16742 = ref_11785 # MOV operation
ref_17034 = ref_7649 # MOV operation
ref_17168 = ref_17034 # MOV operation
ref_17174 = (0xF & ref_17168) # AND operation
ref_17211 = ref_17174 # MOV operation
ref_17225 = (0x1 | ref_17211) # OR operation
ref_17292 = ref_17225 # MOV operation
ref_17294 = ((0x40 - ref_17292) & 0xFFFFFFFFFFFFFFFF) # SUB operation
ref_17302 = ref_17294 # MOV operation
ref_17334 = ref_16742 # MOV operation
ref_17346 = ref_17302 # MOV operation
ref_17348 = ((ref_17334 << ((ref_17346 & 0xFF) & 0x3F)) & 0xFFFFFFFFFFFFFFFF) # SHL operation
ref_17617 = ref_11785 # MOV operation
ref_17999 = ref_7649 # MOV operation
ref_18049 = ref_17999 # MOV operation
ref_18063 = (0xF & ref_18049) # AND operation
ref_18092 = ref_18063 # MOV operation
ref_18098 = (0x1 | ref_18092) # OR operation
ref_18129 = ref_17617 # MOV operation
ref_18133 = ref_18098 # MOV operation
ref_18135 = (ref_18133 & 0xFFFFFFFF) # MOV operation
ref_18137 = (ref_18129 >> ((ref_18135 & 0xFF) & 0x3F)) # SHR operation
ref_18144 = ref_18137 # MOV operation
ref_18176 = ref_18144 # MOV operation
ref_18188 = ref_17348 # MOV operation
ref_18190 = (ref_18188 | ref_18176) # OR operation
ref_18577 = ref_9547 # MOV operation
ref_18851 = ref_15370 # MOV operation
ref_18883 = ref_18851 # MOV operation
ref_18895 = ref_18577 # MOV operation
ref_18897 = (ref_18895 | ref_18883) # OR operation
ref_18952 = ref_18897 # MOV operation
ref_18966 = (ref_18952 >> (0x1 & 0x3F)) # SHR operation
ref_19105 = ref_18966 # MOV operation
ref_19111 = (0x7 & ref_19105) # AND operation
ref_19148 = ref_19111 # MOV operation
ref_19162 = (0x1 | ref_19148) # OR operation
ref_19199 = ref_18190 # MOV operation
ref_19211 = ref_19162 # MOV operation
ref_19213 = ((ref_19199 << ((ref_19211 & 0xFF) & 0x3F)) & 0xFFFFFFFFFFFFFFFF) # SHL operation
ref_19252 = ref_19213 # MOV operation
ref_19447 = ref_19252 # MOV operation
ref_19449 = ref_19447 # MOV operation
print ref_19449 & 0xffffffffffffffff