-
Notifications
You must be signed in to change notification settings - Fork 144
/
sample1-virt-bogus-loop-iterations-2.py
166 lines (162 loc) · 7.63 KB
/
sample1-virt-bogus-loop-iterations-2.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
159
160
161
162
163
164
165
166
#!/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_668918 = ref_279 # MOV operation
ref_757482 = ref_668918 # MOV operation
ref_757490 = ((ref_757482 << (0x39 & 0x3F)) & 0xFFFFFFFFFFFFFFFF) # SHL operation
ref_757497 = ref_757490 # MOV operation
ref_1111759 = ref_279 # MOV operation
ref_1200278 = ref_1111759 # MOV operation
ref_1200286 = (ref_1200278 >> (0x7 & 0x3F)) # SHR operation
ref_1200293 = ref_1200286 # MOV operation
ref_1244562 = ref_1200293 # MOV operation
ref_1244574 = ref_757497 # MOV operation
ref_1244576 = (ref_1244574 | ref_1244562) # OR operation
ref_1288840 = ref_1244576 # MOV operation
ref_1997428 = ref_1288840 # MOV operation
ref_2085987 = ref_1997428 # MOV operation
ref_2085989 = ((ref_2085987 + 0x2D4AF89B) & 0xFFFFFFFFFFFFFFFF) # ADD operation
ref_2130258 = ref_2085989 # MOV operation
ref_2130260 = (ref_2130258 & 0x1D5ABF66) # AND operation
ref_2484527 = ref_279 # MOV operation
ref_2573091 = ref_2484527 # MOV operation
ref_2573099 = ((ref_2573091 << (0x35 & 0x3F)) & 0xFFFFFFFFFFFFFFFF) # SHL operation
ref_2573106 = ref_2573099 # MOV operation
ref_2927368 = ref_279 # MOV operation
ref_3015887 = ref_2927368 # MOV operation
ref_3015895 = (ref_3015887 >> (0xB & 0x3F)) # SHR operation
ref_3015902 = ref_3015895 # MOV operation
ref_3060171 = ref_3015902 # MOV operation
ref_3060183 = ref_2573106 # MOV operation
ref_3060185 = (ref_3060183 | ref_3060171) # OR operation
ref_3104459 = ref_3060185 # MOV operation
ref_3104471 = ref_2130260 # MOV operation
ref_3104473 = ((ref_3104459 - ref_3104471) & 0xFFFFFFFFFFFFFFFF) # SUB operation
ref_3104481 = ref_3104473 # MOV operation
ref_3148740 = ref_3104481 # MOV operation
ref_3857306 = ref_279 # MOV operation
ref_3901555 = ref_3857306 # MOV operation
ref_3901569 = ((ref_3901555 - 0xE8D4346) & 0xFFFFFFFFFFFFFFFF) # SUB operation
ref_3901577 = ref_3901569 # MOV operation
ref_3945836 = ref_3901577 # MOV operation
ref_4654424 = ref_1288840 # MOV operation
ref_4698673 = ref_4654424 # MOV operation
ref_4698687 = ((0x20453EE3 + ref_4698673) & 0xFFFFFFFFFFFFFFFF) # ADD operation
ref_5052955 = ref_279 # MOV operation
ref_5097204 = ref_5052955 # MOV operation
ref_5097216 = ref_4698687 # MOV operation
ref_5097218 = ((ref_5097204 - ref_5097216) & 0xFFFFFFFFFFFFFFFF) # SUB operation
ref_5097226 = ref_5097218 # MOV operation
ref_5141485 = ref_5097226 # MOV operation
ref_6292812 = ref_1288840 # MOV operation
ref_6779933 = ref_3945836 # MOV operation
ref_6824182 = ref_6779933 # MOV operation
ref_6824194 = ref_6292812 # MOV operation
ref_6824196 = (ref_6824194 | ref_6824182) # OR operation
ref_6912758 = ref_6824196 # MOV operation
ref_6912764 = (0x3F & ref_6912758) # AND operation
ref_7001353 = ref_6912764 # MOV operation
ref_7001361 = ((ref_7001353 << (0x4 & 0x3F)) & 0xFFFFFFFFFFFFFFFF) # SHL operation
ref_7001368 = ref_7001361 # MOV operation
ref_7399922 = ref_1288840 # MOV operation
ref_7444171 = ref_7399922 # MOV operation
ref_7444183 = ref_7001368 # MOV operation
ref_7444185 = (ref_7444183 | ref_7444171) # OR operation
ref_7488449 = ref_7444185 # MOV operation
ref_8285596 = ref_3148740 # MOV operation
ref_8728428 = ref_7488449 # MOV operation
ref_8816947 = ref_8728428 # MOV operation
ref_8816955 = (ref_8816947 >> (0x1 & 0x3F)) # SHR operation
ref_8816962 = ref_8816955 # MOV operation
ref_8905519 = ref_8816962 # MOV operation
ref_8905525 = (0xF & ref_8905519) # AND operation
ref_8949799 = ref_8905525 # MOV operation
ref_8949813 = (0x1 | ref_8949799) # OR operation
ref_9038397 = ref_8949813 # MOV operation
ref_9038399 = ((0x40 - ref_9038397) & 0xFFFFFFFFFFFFFFFF) # SUB operation
ref_9038407 = ref_9038399 # MOV operation
ref_9082693 = ref_8285596 # MOV operation
ref_9082697 = ref_9038407 # MOV operation
ref_9082699 = (ref_9082697 & 0xFFFFFFFF) # MOV operation
ref_9082701 = ((ref_9082693 << ((ref_9082699 & 0xFF) & 0x3F)) & 0xFFFFFFFFFFFFFFFF) # SHL operation
ref_9082708 = ref_9082701 # MOV operation
ref_9436992 = ref_3148740 # MOV operation
ref_9879824 = ref_7488449 # MOV operation
ref_9968343 = ref_9879824 # MOV operation
ref_9968351 = (ref_9968343 >> (0x1 & 0x3F)) # SHR operation
ref_9968358 = ref_9968351 # MOV operation
ref_10056915 = ref_9968358 # MOV operation
ref_10056921 = (0xF & ref_10056915) # AND operation
ref_10101195 = ref_10056921 # MOV operation
ref_10101209 = (0x1 | ref_10101195) # OR operation
ref_10145455 = ref_9436992 # MOV operation
ref_10145459 = ref_10101209 # MOV operation
ref_10145461 = (ref_10145459 & 0xFFFFFFFF) # MOV operation
ref_10145463 = (ref_10145455 >> ((ref_10145461 & 0xFF) & 0x3F)) # SHR operation
ref_10145470 = ref_10145463 # MOV operation
ref_10189739 = ref_10145470 # MOV operation
ref_10189751 = ref_9082708 # MOV operation
ref_10189753 = (ref_10189751 | ref_10189739) # OR operation
ref_10234017 = ref_10189753 # MOV operation
ref_10898307 = ref_5141485 # MOV operation
ref_11385428 = ref_10234017 # MOV operation
ref_11429677 = ref_11385428 # MOV operation
ref_11429689 = ref_10898307 # MOV operation
ref_11429691 = ((ref_11429677 - ref_11429689) & 0xFFFFFFFFFFFFFFFF) # SUB operation
ref_11429699 = ref_11429691 # MOV operation
ref_11473958 = ref_11429699 # MOV operation
ref_12757988 = ref_7488449 # MOV operation
ref_13156550 = ref_3148740 # MOV operation
ref_13245087 = ref_13156550 # MOV operation
ref_13245093 = (0xF & ref_13245087) # AND operation
ref_13289367 = ref_13245093 # MOV operation
ref_13289381 = (0x1 | ref_13289367) # OR operation
ref_13377965 = ref_13289381 # MOV operation
ref_13377967 = ((0x40 - ref_13377965) & 0xFFFFFFFFFFFFFFFF) # SUB operation
ref_13377975 = ref_13377967 # MOV operation
ref_13422261 = ref_12757988 # MOV operation
ref_13422265 = ref_13377975 # MOV operation
ref_13422267 = (ref_13422265 & 0xFFFFFFFF) # MOV operation
ref_13422269 = ((ref_13422261 << ((ref_13422267 & 0xFF) & 0x3F)) & 0xFFFFFFFFFFFFFFFF) # SHL operation
ref_13422276 = ref_13422269 # MOV operation
ref_13776560 = ref_7488449 # MOV operation
ref_14175122 = ref_3148740 # MOV operation
ref_14263659 = ref_14175122 # MOV operation
ref_14263665 = (0xF & ref_14263659) # AND operation
ref_14307939 = ref_14263665 # MOV operation
ref_14307953 = (0x1 | ref_14307939) # OR operation
ref_14352199 = ref_13776560 # MOV operation
ref_14352203 = ref_14307953 # MOV operation
ref_14352205 = (ref_14352203 & 0xFFFFFFFF) # MOV operation
ref_14352207 = (ref_14352199 >> ((ref_14352205 & 0xFF) & 0x3F)) # SHR operation
ref_14352214 = ref_14352207 # MOV operation
ref_14396483 = ref_14352214 # MOV operation
ref_14396495 = ref_13422276 # MOV operation
ref_14396497 = (ref_14396495 | ref_14396483) # OR operation
ref_14795084 = ref_5141485 # MOV operation
ref_15149348 = ref_11473958 # MOV operation
ref_15193597 = ref_15149348 # MOV operation
ref_15193609 = ref_14795084 # MOV operation
ref_15193611 = (ref_15193609 | ref_15193597) # OR operation
ref_15282155 = ref_15193611 # MOV operation
ref_15282163 = (ref_15282155 >> (0x1 & 0x3F)) # SHR operation
ref_15282170 = ref_15282163 # MOV operation
ref_15370727 = ref_15282170 # MOV operation
ref_15370733 = (0x7 & ref_15370727) # AND operation
ref_15415007 = ref_15370733 # MOV operation
ref_15415021 = (0x1 | ref_15415007) # OR operation
ref_15459312 = ref_14396497 # MOV operation
ref_15459316 = ref_15415021 # MOV operation
ref_15459318 = (ref_15459316 & 0xFFFFFFFF) # MOV operation
ref_15459320 = ((ref_15459312 << ((ref_15459318 & 0xFF) & 0x3F)) & 0xFFFFFFFFFFFFFFFF) # SHL operation
ref_15459327 = ref_15459320 # MOV operation
ref_15503586 = ref_15459327 # MOV operation
ref_15592098 = ref_15503586 # MOV operation
ref_15592100 = ref_15592098 # MOV operation
print ref_15592100 & 0xffffffffffffffff