-
Notifications
You must be signed in to change notification settings - Fork 0
/
逆向工程.txt
194 lines (179 loc) · 9.16 KB
/
逆向工程.txt
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
disassembler/test.out 檔案格式 elf64-x86-64
.text 區段的反組譯:
00000000000010a0 <_start>:
_start():
10a0: f3 0f 1e fa endbr64
10a4: 31 ed xor %ebp,%ebp
10a6: 49 89 d1 mov %rdx,%r9
10a9: 5e pop %rsi
10aa: 48 89 e2 mov %rsp,%rdx
10ad: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp
10b1: 50 push %rax
10b2: 54 push %rsp
10b3: 4c 8d 05 d6 01 00 00 lea 0x1d6(%rip),%r8 # 1290 <__libc_csu_fini>
10ba: 48 8d 0d 5f 01 00 00 lea 0x15f(%rip),%rcx # 1220 <__libc_csu_init>
10c1: 48 8d 3d c1 00 00 00 lea 0xc1(%rip),%rdi # 1189 <main>
10c8: ff 15 12 2f 00 00 callq *0x2f12(%rip) # 3fe0 <__libc_start_main@GLIBC_2.2.5>
10ce: f4 hlt
10cf: 90 nop
00000000000010d0 <deregister_tm_clones>:
deregister_tm_clones():
10d0: 48 8d 3d 39 2f 00 00 lea 0x2f39(%rip),%rdi # 4010 <__TMC_END__>
10d7: 48 8d 05 32 2f 00 00 lea 0x2f32(%rip),%rax # 4010 <__TMC_END__>
10de: 48 39 f8 cmp %rdi,%rax
10e1: 74 15 je 10f8 <deregister_tm_clones+0x28>
10e3: 48 8b 05 ee 2e 00 00 mov 0x2eee(%rip),%rax # 3fd8 <_ITM_deregisterTMCloneTable>
10ea: 48 85 c0 test %rax,%rax
10ed: 74 09 je 10f8 <deregister_tm_clones+0x28>
10ef: ff e0 jmpq *%rax
10f1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax)
10f8: c3 retq
10f9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax)
0000000000001100 <register_tm_clones>:
register_tm_clones():
1100: 48 8d 3d 09 2f 00 00 lea 0x2f09(%rip),%rdi # 4010 <__TMC_END__>
1107: 48 8d 35 02 2f 00 00 lea 0x2f02(%rip),%rsi # 4010 <__TMC_END__>
110e: 48 29 fe sub %rdi,%rsi
1111: 48 89 f0 mov %rsi,%rax
1114: 48 c1 ee 3f shr $0x3f,%rsi
1118: 48 c1 f8 03 sar $0x3,%rax
111c: 48 01 c6 add %rax,%rsi
111f: 48 d1 fe sar %rsi
1122: 74 14 je 1138 <register_tm_clones+0x38>
1124: 48 8b 05 c5 2e 00 00 mov 0x2ec5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable>
112b: 48 85 c0 test %rax,%rax
112e: 74 08 je 1138 <register_tm_clones+0x38>
1130: ff e0 jmpq *%rax
1132: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1)
1138: c3 retq
1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax)
0000000000001140 <__do_global_dtors_aux>:
__do_global_dtors_aux():
1140: f3 0f 1e fa endbr64
1144: 80 3d 05 30 00 00 00 cmpb $0x0,0x3005(%rip) # 4150 <completed.8061>
114b: 75 2b jne 1178 <__do_global_dtors_aux+0x38>
114d: 55 push %rbp
114e: 48 83 3d 7a 2e 00 00 cmpq $0x0,0x2e7a(%rip) # 3fd0 <__cxa_finalize@GLIBC_2.2.5>
1155: 00
1156: 48 89 e5 mov %rsp,%rbp
1159: 74 0c je 1167 <__do_global_dtors_aux+0x27>
115b: 48 8b 3d a6 2e 00 00 mov 0x2ea6(%rip),%rdi # 4008 <__dso_handle>
1162: e8 f9 fe ff ff callq 1060 <__cxa_finalize@plt>
1167: e8 64 ff ff ff callq 10d0 <deregister_tm_clones>
116c: c6 05 dd 2f 00 00 01 movb $0x1,0x2fdd(%rip) # 4150 <completed.8061>
1173: 5d pop %rbp
1174: c3 retq
1175: 0f 1f 00 nopl (%rax)
1178: c3 retq
1179: 0f 1f 80 00 00 00 00 nopl 0x0(%rax)
0000000000001180 <frame_dummy>:
frame_dummy():
1180: f3 0f 1e fa endbr64
1184: e9 77 ff ff ff jmpq 1100 <register_tm_clones>
0000000000001189 <main>:
main():
/Projects/sperm-whale/disassembler/test.cpp:4
#include <iostream>
int main()
{
1189: f3 0f 1e fa endbr64
118d: 55 push %rbp
118e: 48 89 e5 mov %rsp,%rbp
/Projects/sperm-whale/disassembler/test.cpp:5
std::cout << "Hello World!\n";
1191: 48 8d 35 6d 0e 00 00 lea 0xe6d(%rip),%rsi # 2005 <std::piecewise_construct+0x1>
1198: 48 8d 3d a1 2e 00 00 lea 0x2ea1(%rip),%rdi # 4040 <std::cout@@GLIBCXX_3.4>
119f: e8 dc fe ff ff callq 1080 <std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)@plt>
/Projects/sperm-whale/disassembler/test.cpp:6
return 0;
11a4: b8 00 00 00 00 mov $0x0,%eax
/Projects/sperm-whale/disassembler/test.cpp:7
11a9: 5d pop %rbp
11aa: c3 retq
00000000000011ab <__static_initialization_and_destruction_0(int, int)>:
_Z41__static_initialization_and_destruction_0ii():
/Projects/sperm-whale/disassembler/test.cpp:7
11ab: f3 0f 1e fa endbr64
11af: 55 push %rbp
11b0: 48 89 e5 mov %rsp,%rbp
11b3: 48 83 ec 10 sub $0x10,%rsp
11b7: 89 7d fc mov %edi,-0x4(%rbp)
11ba: 89 75 f8 mov %esi,-0x8(%rbp)
11bd: 83 7d fc 01 cmpl $0x1,-0x4(%rbp)
11c1: 75 32 jne 11f5 <__static_initialization_and_destruction_0(int, int)+0x4a>
/Projects/sperm-whale/disassembler/test.cpp:7 (discriminator 1)
11c3: 81 7d f8 ff ff 00 00 cmpl $0xffff,-0x8(%rbp)
11ca: 75 29 jne 11f5 <__static_initialization_and_destruction_0(int, int)+0x4a>
/usr/include/c++/9/iostream:74
extern wostream wclog; /// Linked to standard error (buffered)
#endif
///@}
// For construction of filebuffers for cout, cin, cerr, clog et. al.
static ios_base::Init __ioinit;
11cc: 48 8d 3d 7e 2f 00 00 lea 0x2f7e(%rip),%rdi # 4151 <std::__ioinit>
11d3: e8 b8 fe ff ff callq 1090 <std::ios_base::Init::Init()@plt>
11d8: 48 8d 15 29 2e 00 00 lea 0x2e29(%rip),%rdx # 4008 <__dso_handle>
11df: 48 8d 35 6b 2f 00 00 lea 0x2f6b(%rip),%rsi # 4151 <std::__ioinit>
11e6: 48 8b 05 0b 2e 00 00 mov 0x2e0b(%rip),%rax # 3ff8 <std::ios_base::Init::~Init()@GLIBCXX_3.4>
11ed: 48 89 c7 mov %rax,%rdi
11f0: e8 7b fe ff ff callq 1070 <__cxa_atexit@plt>
/Projects/sperm-whale/disassembler/test.cpp:7
11f5: 90 nop
11f6: c9 leaveq
11f7: c3 retq
00000000000011f8 <_GLOBAL__sub_I_main>:
_GLOBAL__sub_I_main():
/Projects/sperm-whale/disassembler/test.cpp:7
11f8: f3 0f 1e fa endbr64
11fc: 55 push %rbp
11fd: 48 89 e5 mov %rsp,%rbp
1200: be ff ff 00 00 mov $0xffff,%esi
1205: bf 01 00 00 00 mov $0x1,%edi
120a: e8 9c ff ff ff callq 11ab <__static_initialization_and_destruction_0(int, int)>
120f: 5d pop %rbp
1210: c3 retq
1211: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
1218: 00 00 00
121b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
0000000000001220 <__libc_csu_init>:
__libc_csu_init():
1220: f3 0f 1e fa endbr64
1224: 41 57 push %r15
1226: 4c 8d 3d 5b 2b 00 00 lea 0x2b5b(%rip),%r15 # 3d88 <__frame_dummy_init_array_entry>
122d: 41 56 push %r14
122f: 49 89 d6 mov %rdx,%r14
1232: 41 55 push %r13
1234: 49 89 f5 mov %rsi,%r13
1237: 41 54 push %r12
1239: 41 89 fc mov %edi,%r12d
123c: 55 push %rbp
123d: 48 8d 2d 54 2b 00 00 lea 0x2b54(%rip),%rbp # 3d98 <__do_global_dtors_aux_fini_array_entry>
1244: 53 push %rbx
1245: 4c 29 fd sub %r15,%rbp
1248: 48 83 ec 08 sub $0x8,%rsp
124c: e8 af fd ff ff callq 1000 <_init>
1251: 48 c1 fd 03 sar $0x3,%rbp
1255: 74 1f je 1276 <__libc_csu_init+0x56>
1257: 31 db xor %ebx,%ebx
1259: 0f 1f 80 00 00 00 00 nopl 0x0(%rax)
1260: 4c 89 f2 mov %r14,%rdx
1263: 4c 89 ee mov %r13,%rsi
1266: 44 89 e7 mov %r12d,%edi
1269: 41 ff 14 df callq *(%r15,%rbx,8)
126d: 48 83 c3 01 add $0x1,%rbx
1271: 48 39 dd cmp %rbx,%rbp
1274: 75 ea jne 1260 <__libc_csu_init+0x40>
1276: 48 83 c4 08 add $0x8,%rsp
127a: 5b pop %rbx
127b: 5d pop %rbp
127c: 41 5c pop %r12
127e: 41 5d pop %r13
1280: 41 5e pop %r14
1282: 41 5f pop %r15
1284: c3 retq
1285: 66 66 2e 0f 1f 84 00 data16 nopw %cs:0x0(%rax,%rax,1)
128c: 00 00 00 00
0000000000001290 <__libc_csu_fini>:
__libc_csu_fini():
1290: f3 0f 1e fa endbr64
1294: c3 retq