Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save akawashiro/31213d0eda0e4bd9917c6afc98799a1c to your computer and use it in GitHub Desktop.
Save akawashiro/31213d0eda0e4bd9917c6afc98799a1c to your computer and use it in GitHub Desktop.
$ objdump --disassemble=lifegame lifegame -M intel
lifegame: file format elf64-x86-64
Disassembly of section .init:
Disassembly of section .plt:
Disassembly of section .plt.got:
Disassembly of section .plt.sec:
Disassembly of section .text:
0000000000001149 <lifegame>:
1149: f3 0f 1e fa endbr64
114d: 55 push rbp
114e: 48 89 e5 mov rbp,rsp
1151: 48 81 ec 60 09 00 00 sub rsp,0x960
1158: 64 48 8b 04 25 28 00 mov rax,QWORD PTR fs:0x28
115f: 00 00
1161: 48 89 45 f8 mov QWORD PTR [rbp-0x8],rax
1165: 31 c0 xor eax,eax
1167: c6 45 e0 1b mov BYTE PTR [rbp-0x20],0x1b
116b: c6 45 e1 63 mov BYTE PTR [rbp-0x1f],0x63
116f: c6 45 e2 00 mov BYTE PTR [rbp-0x1e],0x0
1173: b8 01 00 00 00 mov eax,0x1
1178: bf 01 00 00 00 mov edi,0x1
117d: 48 8d 4d e0 lea rcx,[rbp-0x20]
1181: ba 02 00 00 00 mov edx,0x2
1186: 48 89 ce mov rsi,rcx
1189: 0f 05 syscall
118b: c6 45 e0 4c mov BYTE PTR [rbp-0x20],0x4c
118f: c6 45 e1 69 mov BYTE PTR [rbp-0x1f],0x69
1193: c6 45 e2 66 mov BYTE PTR [rbp-0x1e],0x66
1197: c6 45 e3 65 mov BYTE PTR [rbp-0x1d],0x65
119b: c6 45 e4 20 mov BYTE PTR [rbp-0x1c],0x20
119f: c6 45 e5 47 mov BYTE PTR [rbp-0x1b],0x47
11a3: c6 45 e6 61 mov BYTE PTR [rbp-0x1a],0x61
11a7: c6 45 e7 6d mov BYTE PTR [rbp-0x19],0x6d
11ab: c6 45 e8 65 mov BYTE PTR [rbp-0x18],0x65
11af: c6 45 e9 0a mov BYTE PTR [rbp-0x17],0xa
11b3: c6 45 ea 00 mov BYTE PTR [rbp-0x16],0x0
11b7: b8 01 00 00 00 mov eax,0x1
11bc: bf 01 00 00 00 mov edi,0x1
11c1: 48 8d 4d e0 lea rcx,[rbp-0x20]
11c5: ba 09 00 00 00 mov edx,0x9
11ca: 48 89 ce mov rsi,rcx
11cd: 0f 05 syscall
11cf: c7 85 a4 f6 ff ff 00 mov DWORD PTR [rbp-0x95c],0x0
11d6: 00 00 00
11d9: e9 e6 00 00 00 jmp 12c4 <lifegame+0x17b>
11de: c7 85 a8 f6 ff ff 00 mov DWORD PTR [rbp-0x958],0x0
11e5: 00 00 00
11e8: e9 c3 00 00 00 jmp 12b0 <lifegame+0x167>
11ed: 8b 85 a8 f6 ff ff mov eax,DWORD PTR [rbp-0x958]
11f3: 48 63 c8 movsxd rcx,eax
11f6: 8b 85 a4 f6 ff ff mov eax,DWORD PTR [rbp-0x95c]
11fc: 48 63 d0 movsxd rdx,eax
11ff: 48 89 d0 mov rax,rdx
1202: 48 c1 e0 04 shl rax,0x4
1206: 48 01 d0 add rax,rdx
1209: 48 01 c0 add rax,rax
120c: 48 01 e8 add rax,rbp
120f: 48 01 c8 add rax,rcx
1212: 48 2d 30 09 00 00 sub rax,0x930
1218: c6 00 2e mov BYTE PTR [rax],0x2e
121b: 83 bd a4 f6 ff ff 00 cmp DWORD PTR [rbp-0x95c],0x0
1222: 0f 8e 81 00 00 00 jle 12a9 <lifegame+0x160>
1228: 83 bd a4 f6 ff ff 1e cmp DWORD PTR [rbp-0x95c],0x1e
122f: 7f 78 jg 12a9 <lifegame+0x160>
1231: 83 bd a8 f6 ff ff 00 cmp DWORD PTR [rbp-0x958],0x0
1238: 7e 6f jle 12a9 <lifegame+0x160>
123a: 83 bd a8 f6 ff ff 1e cmp DWORD PTR [rbp-0x958],0x1e
1241: 7f 66 jg 12a9 <lifegame+0x160>
1243: 8b 95 a4 f6 ff ff mov edx,DWORD PTR [rbp-0x95c]
1249: 8b 85 a8 f6 ff ff mov eax,DWORD PTR [rbp-0x958]
124f: 01 c2 add edx,eax
1251: 48 63 c2 movsxd rax,edx
1254: 48 69 c0 93 24 49 92 imul rax,rax,0xffffffff92492493
125b: 48 c1 e8 20 shr rax,0x20
125f: 01 d0 add eax,edx
1261: c1 f8 02 sar eax,0x2
1264: 89 d1 mov ecx,edx
1266: c1 f9 1f sar ecx,0x1f
1269: 29 c8 sub eax,ecx
126b: 89 c1 mov ecx,eax
126d: c1 e1 03 shl ecx,0x3
1270: 29 c1 sub ecx,eax
1272: 89 d0 mov eax,edx
1274: 29 c8 sub eax,ecx
1276: 83 f8 01 cmp eax,0x1
1279: 7f 2e jg 12a9 <lifegame+0x160>
127b: 8b 85 a8 f6 ff ff mov eax,DWORD PTR [rbp-0x958]
1281: 48 63 c8 movsxd rcx,eax
1284: 8b 85 a4 f6 ff ff mov eax,DWORD PTR [rbp-0x95c]
128a: 48 63 d0 movsxd rdx,eax
128d: 48 89 d0 mov rax,rdx
1290: 48 c1 e0 04 shl rax,0x4
1294: 48 01 d0 add rax,rdx
1297: 48 01 c0 add rax,rax
129a: 48 01 e8 add rax,rbp
129d: 48 01 c8 add rax,rcx
12a0: 48 2d 30 09 00 00 sub rax,0x930
12a6: c6 00 78 mov BYTE PTR [rax],0x78
12a9: 83 85 a8 f6 ff ff 01 add DWORD PTR [rbp-0x958],0x1
12b0: 83 bd a8 f6 ff ff 21 cmp DWORD PTR [rbp-0x958],0x21
12b7: 0f 8e 30 ff ff ff jle 11ed <lifegame+0xa4>
12bd: 83 85 a4 f6 ff ff 01 add DWORD PTR [rbp-0x95c],0x1
12c4: 83 bd a4 f6 ff ff 21 cmp DWORD PTR [rbp-0x95c],0x21
12cb: 0f 8e 0d ff ff ff jle 11de <lifegame+0x95>
12d1: c7 85 ac f6 ff ff 00 mov DWORD PTR [rbp-0x954],0x0
12d8: 00 00 00
12db: e9 eb 03 00 00 jmp 16cb <lifegame+0x582>
12e0: c7 85 b0 f6 ff ff 00 mov DWORD PTR [rbp-0x950],0x0
12e7: 00 00 00
12ea: eb 07 jmp 12f3 <lifegame+0x1aa>
12ec: 83 85 b0 f6 ff ff 01 add DWORD PTR [rbp-0x950],0x1
12f3: 81 bd b0 f6 ff ff ff cmp DWORD PTR [rbp-0x950],0x773593ff
12fa: 93 35 77
12fd: 7e ed jle 12ec <lifegame+0x1a3>
12ff: c6 45 e0 1b mov BYTE PTR [rbp-0x20],0x1b
1303: c6 45 e1 63 mov BYTE PTR [rbp-0x1f],0x63
1307: c6 45 e2 00 mov BYTE PTR [rbp-0x1e],0x0
130b: b8 01 00 00 00 mov eax,0x1
1310: bf 01 00 00 00 mov edi,0x1
1315: 48 8d 4d e0 lea rcx,[rbp-0x20]
1319: ba 02 00 00 00 mov edx,0x2
131e: 48 89 ce mov rsi,rcx
1321: 0f 05 syscall
1323: c7 85 b4 f6 ff ff 01 mov DWORD PTR [rbp-0x94c],0x1
132a: 00 00 00
132d: e9 b0 00 00 00 jmp 13e2 <lifegame+0x299>
1332: c7 85 b8 f6 ff ff 01 mov DWORD PTR [rbp-0x948],0x1
1339: 00 00 00
133c: eb 74 jmp 13b2 <lifegame+0x269>
133e: 8b 85 ac f6 ff ff mov eax,DWORD PTR [rbp-0x954]
1344: 99 cdq
1345: c1 ea 1f shr edx,0x1f
1348: 01 d0 add eax,edx
134a: 83 e0 01 and eax,0x1
134d: 29 d0 sub eax,edx
134f: 89 c2 mov edx,eax
1351: 8b 85 b8 f6 ff ff mov eax,DWORD PTR [rbp-0x948]
1357: 48 63 c8 movsxd rcx,eax
135a: 48 63 c2 movsxd rax,edx
135d: 8b 95 b4 f6 ff ff mov edx,DWORD PTR [rbp-0x94c]
1363: 48 63 d2 movsxd rdx,edx
1366: 48 69 f0 84 04 00 00 imul rsi,rax,0x484
136d: 48 89 d0 mov rax,rdx
1370: 48 c1 e0 04 shl rax,0x4
1374: 48 01 d0 add rax,rdx
1377: 48 01 c0 add rax,rax
137a: 48 01 f0 add rax,rsi
137d: 48 01 e8 add rax,rbp
1380: 48 01 c8 add rax,rcx
1383: 48 2d 30 09 00 00 sub rax,0x930
1389: 0f b6 00 movzx eax,BYTE PTR [rax]
138c: 88 45 e0 mov BYTE PTR [rbp-0x20],al
138f: c6 45 e1 00 mov BYTE PTR [rbp-0x1f],0x0
1393: b8 01 00 00 00 mov eax,0x1
1398: bf 01 00 00 00 mov edi,0x1
139d: 48 8d 4d e0 lea rcx,[rbp-0x20]
13a1: ba 01 00 00 00 mov edx,0x1
13a6: 48 89 ce mov rsi,rcx
13a9: 0f 05 syscall
13ab: 83 85 b8 f6 ff ff 01 add DWORD PTR [rbp-0x948],0x1
13b2: 83 bd b8 f6 ff ff 1e cmp DWORD PTR [rbp-0x948],0x1e
13b9: 7e 83 jle 133e <lifegame+0x1f5>
13bb: c6 45 e0 0a mov BYTE PTR [rbp-0x20],0xa
13bf: c6 45 e1 00 mov BYTE PTR [rbp-0x1f],0x0
13c3: b8 01 00 00 00 mov eax,0x1
13c8: bf 01 00 00 00 mov edi,0x1
13cd: 48 8d 4d e0 lea rcx,[rbp-0x20]
13d1: ba 01 00 00 00 mov edx,0x1
13d6: 48 89 ce mov rsi,rcx
13d9: 0f 05 syscall
13db: 83 85 b4 f6 ff ff 01 add DWORD PTR [rbp-0x94c],0x1
13e2: 83 bd b4 f6 ff ff 1e cmp DWORD PTR [rbp-0x94c],0x1e
13e9: 0f 8e 43 ff ff ff jle 1332 <lifegame+0x1e9>
13ef: c7 85 bc f6 ff ff 01 mov DWORD PTR [rbp-0x944],0x1
13f6: 00 00 00
13f9: e9 b9 02 00 00 jmp 16b7 <lifegame+0x56e>
13fe: c7 85 c0 f6 ff ff 01 mov DWORD PTR [rbp-0x940],0x1
1405: 00 00 00
1408: e9 96 02 00 00 jmp 16a3 <lifegame+0x55a>
140d: c7 85 c4 f6 ff ff 00 mov DWORD PTR [rbp-0x93c],0x0
1414: 00 00 00
1417: c7 85 c8 f6 ff ff ff mov DWORD PTR [rbp-0x938],0xffffffff
141e: ff ff ff
1421: e9 a8 00 00 00 jmp 14ce <lifegame+0x385>
1426: c7 85 cc f6 ff ff ff mov DWORD PTR [rbp-0x934],0xffffffff
142d: ff ff ff
1430: e9 85 00 00 00 jmp 14ba <lifegame+0x371>
1435: 83 bd c8 f6 ff ff 00 cmp DWORD PTR [rbp-0x938],0x0
143c: 75 09 jne 1447 <lifegame+0x2fe>
143e: 83 bd cc f6 ff ff 00 cmp DWORD PTR [rbp-0x934],0x0
1445: 74 6b je 14b2 <lifegame+0x369>
1447: 8b 85 ac f6 ff ff mov eax,DWORD PTR [rbp-0x954]
144d: 99 cdq
144e: c1 ea 1f shr edx,0x1f
1451: 01 d0 add eax,edx
1453: 83 e0 01 and eax,0x1
1456: 29 d0 sub eax,edx
1458: 89 c6 mov esi,eax
145a: 8b 95 bc f6 ff ff mov edx,DWORD PTR [rbp-0x944]
1460: 8b 85 c8 f6 ff ff mov eax,DWORD PTR [rbp-0x938]
1466: 01 c2 add edx,eax
1468: 8b 8d c0 f6 ff ff mov ecx,DWORD PTR [rbp-0x940]
146e: 8b 85 cc f6 ff ff mov eax,DWORD PTR [rbp-0x934]
1474: 01 c8 add eax,ecx
1476: 48 63 c8 movsxd rcx,eax
1479: 48 63 c6 movsxd rax,esi
147c: 48 63 d2 movsxd rdx,edx
147f: 48 69 f0 84 04 00 00 imul rsi,rax,0x484
1486: 48 89 d0 mov rax,rdx
1489: 48 c1 e0 04 shl rax,0x4
148d: 48 01 d0 add rax,rdx
1490: 48 01 c0 add rax,rax
1493: 48 01 f0 add rax,rsi
1496: 48 01 e8 add rax,rbp
1499: 48 01 c8 add rax,rcx
149c: 48 2d 30 09 00 00 sub rax,0x930
14a2: 0f b6 00 movzx eax,BYTE PTR [rax]
14a5: 3c 78 cmp al,0x78
14a7: 75 0a jne 14b3 <lifegame+0x36a>
14a9: 83 85 c4 f6 ff ff 01 add DWORD PTR [rbp-0x93c],0x1
14b0: eb 01 jmp 14b3 <lifegame+0x36a>
14b2: 90 nop
14b3: 83 85 cc f6 ff ff 01 add DWORD PTR [rbp-0x934],0x1
14ba: 83 bd cc f6 ff ff 01 cmp DWORD PTR [rbp-0x934],0x1
14c1: 0f 8e 6e ff ff ff jle 1435 <lifegame+0x2ec>
14c7: 83 85 c8 f6 ff ff 01 add DWORD PTR [rbp-0x938],0x1
14ce: 83 bd c8 f6 ff ff 01 cmp DWORD PTR [rbp-0x938],0x1
14d5: 0f 8e 4b ff ff ff jle 1426 <lifegame+0x2dd>
14db: 8b 85 ac f6 ff ff mov eax,DWORD PTR [rbp-0x954]
14e1: 99 cdq
14e2: c1 ea 1f shr edx,0x1f
14e5: 01 d0 add eax,edx
14e7: 83 e0 01 and eax,0x1
14ea: 29 d0 sub eax,edx
14ec: 89 c2 mov edx,eax
14ee: 8b 85 c0 f6 ff ff mov eax,DWORD PTR [rbp-0x940]
14f4: 48 63 c8 movsxd rcx,eax
14f7: 48 63 c2 movsxd rax,edx
14fa: 8b 95 bc f6 ff ff mov edx,DWORD PTR [rbp-0x944]
1500: 48 63 d2 movsxd rdx,edx
1503: 48 69 f0 84 04 00 00 imul rsi,rax,0x484
150a: 48 89 d0 mov rax,rdx
150d: 48 c1 e0 04 shl rax,0x4
1511: 48 01 d0 add rax,rdx
1514: 48 01 c0 add rax,rax
1517: 48 01 f0 add rax,rsi
151a: 48 01 e8 add rax,rbp
151d: 48 01 c8 add rax,rcx
1520: 48 2d 30 09 00 00 sub rax,0x930
1526: 0f b6 00 movzx eax,BYTE PTR [rax]
1529: 3c 2e cmp al,0x2e
152b: 0f 85 b5 00 00 00 jne 15e6 <lifegame+0x49d>
1531: 83 bd c4 f6 ff ff 03 cmp DWORD PTR [rbp-0x93c],0x3
1538: 75 56 jne 1590 <lifegame+0x447>
153a: 8b 85 ac f6 ff ff mov eax,DWORD PTR [rbp-0x954]
1540: 83 c0 01 add eax,0x1
1543: 99 cdq
1544: c1 ea 1f shr edx,0x1f
1547: 01 d0 add eax,edx
1549: 83 e0 01 and eax,0x1
154c: 29 d0 sub eax,edx
154e: 89 c2 mov edx,eax
1550: 8b 85 c0 f6 ff ff mov eax,DWORD PTR [rbp-0x940]
1556: 48 63 c8 movsxd rcx,eax
1559: 48 63 c2 movsxd rax,edx
155c: 8b 95 bc f6 ff ff mov edx,DWORD PTR [rbp-0x944]
1562: 48 63 d2 movsxd rdx,edx
1565: 48 69 f0 84 04 00 00 imul rsi,rax,0x484
156c: 48 89 d0 mov rax,rdx
156f: 48 c1 e0 04 shl rax,0x4
1573: 48 01 d0 add rax,rdx
1576: 48 01 c0 add rax,rax
1579: 48 01 f0 add rax,rsi
157c: 48 01 e8 add rax,rbp
157f: 48 01 c8 add rax,rcx
1582: 48 2d 30 09 00 00 sub rax,0x930
1588: c6 00 78 mov BYTE PTR [rax],0x78
158b: e9 0c 01 00 00 jmp 169c <lifegame+0x553>
1590: 8b 85 ac f6 ff ff mov eax,DWORD PTR [rbp-0x954]
1596: 83 c0 01 add eax,0x1
1599: 99 cdq
159a: c1 ea 1f shr edx,0x1f
159d: 01 d0 add eax,edx
159f: 83 e0 01 and eax,0x1
15a2: 29 d0 sub eax,edx
15a4: 89 c2 mov edx,eax
15a6: 8b 85 c0 f6 ff ff mov eax,DWORD PTR [rbp-0x940]
15ac: 48 63 c8 movsxd rcx,eax
15af: 48 63 c2 movsxd rax,edx
15b2: 8b 95 bc f6 ff ff mov edx,DWORD PTR [rbp-0x944]
15b8: 48 63 d2 movsxd rdx,edx
15bb: 48 69 f0 84 04 00 00 imul rsi,rax,0x484
15c2: 48 89 d0 mov rax,rdx
15c5: 48 c1 e0 04 shl rax,0x4
15c9: 48 01 d0 add rax,rdx
15cc: 48 01 c0 add rax,rax
15cf: 48 01 f0 add rax,rsi
15d2: 48 01 e8 add rax,rbp
15d5: 48 01 c8 add rax,rcx
15d8: 48 2d 30 09 00 00 sub rax,0x930
15de: c6 00 2e mov BYTE PTR [rax],0x2e
15e1: e9 b6 00 00 00 jmp 169c <lifegame+0x553>
15e6: 83 bd c4 f6 ff ff 02 cmp DWORD PTR [rbp-0x93c],0x2
15ed: 74 09 je 15f8 <lifegame+0x4af>
15ef: 83 bd c4 f6 ff ff 03 cmp DWORD PTR [rbp-0x93c],0x3
15f6: 75 53 jne 164b <lifegame+0x502>
15f8: 8b 85 ac f6 ff ff mov eax,DWORD PTR [rbp-0x954]
15fe: 83 c0 01 add eax,0x1
1601: 99 cdq
1602: c1 ea 1f shr edx,0x1f
1605: 01 d0 add eax,edx
1607: 83 e0 01 and eax,0x1
160a: 29 d0 sub eax,edx
160c: 89 c2 mov edx,eax
160e: 8b 85 c0 f6 ff ff mov eax,DWORD PTR [rbp-0x940]
1614: 48 63 c8 movsxd rcx,eax
1617: 48 63 c2 movsxd rax,edx
161a: 8b 95 bc f6 ff ff mov edx,DWORD PTR [rbp-0x944]
1620: 48 63 d2 movsxd rdx,edx
1623: 48 69 f0 84 04 00 00 imul rsi,rax,0x484
162a: 48 89 d0 mov rax,rdx
162d: 48 c1 e0 04 shl rax,0x4
1631: 48 01 d0 add rax,rdx
1634: 48 01 c0 add rax,rax
1637: 48 01 f0 add rax,rsi
163a: 48 01 e8 add rax,rbp
163d: 48 01 c8 add rax,rcx
1640: 48 2d 30 09 00 00 sub rax,0x930
1646: c6 00 78 mov BYTE PTR [rax],0x78
1649: eb 51 jmp 169c <lifegame+0x553>
164b: 8b 85 ac f6 ff ff mov eax,DWORD PTR [rbp-0x954]
1651: 83 c0 01 add eax,0x1
1654: 99 cdq
1655: c1 ea 1f shr edx,0x1f
1658: 01 d0 add eax,edx
165a: 83 e0 01 and eax,0x1
165d: 29 d0 sub eax,edx
165f: 89 c2 mov edx,eax
1661: 8b 85 c0 f6 ff ff mov eax,DWORD PTR [rbp-0x940]
1667: 48 63 c8 movsxd rcx,eax
166a: 48 63 c2 movsxd rax,edx
166d: 8b 95 bc f6 ff ff mov edx,DWORD PTR [rbp-0x944]
1673: 48 63 d2 movsxd rdx,edx
1676: 48 69 f0 84 04 00 00 imul rsi,rax,0x484
167d: 48 89 d0 mov rax,rdx
1680: 48 c1 e0 04 shl rax,0x4
1684: 48 01 d0 add rax,rdx
1687: 48 01 c0 add rax,rax
168a: 48 01 f0 add rax,rsi
168d: 48 01 e8 add rax,rbp
1690: 48 01 c8 add rax,rcx
1693: 48 2d 30 09 00 00 sub rax,0x930
1699: c6 00 2e mov BYTE PTR [rax],0x2e
169c: 83 85 c0 f6 ff ff 01 add DWORD PTR [rbp-0x940],0x1
16a3: 83 bd c0 f6 ff ff 1e cmp DWORD PTR [rbp-0x940],0x1e
16aa: 0f 8e 5d fd ff ff jle 140d <lifegame+0x2c4>
16b0: 83 85 bc f6 ff ff 01 add DWORD PTR [rbp-0x944],0x1
16b7: 83 bd bc f6 ff ff 1e cmp DWORD PTR [rbp-0x944],0x1e
16be: 0f 8e 3a fd ff ff jle 13fe <lifegame+0x2b5>
16c4: 83 85 ac f6 ff ff 01 add DWORD PTR [rbp-0x954],0x1
16cb: 83 bd ac f6 ff ff 63 cmp DWORD PTR [rbp-0x954],0x63
16d2: 0f 8e 08 fc ff ff jle 12e0 <lifegame+0x197>
16d8: 90 nop
16d9: 48 8b 45 f8 mov rax,QWORD PTR [rbp-0x8]
16dd: 64 48 2b 04 25 28 00 sub rax,QWORD PTR fs:0x28
16e4: 00 00
16e6: 74 05 je 16ed <lifegame+0x5a4>
16e8: e8 63 f9 ff ff call 1050 <__stack_chk_fail@plt>
16ed: c9 leave
16ee: c3 ret
Disassembly of section .fini:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment