Skip to content

Instantly share code, notes, and snippets.

@moyix
Created July 16, 2016 17:33
Show Gist options
  • Save moyix/c61acd85e809e0f8fead38572f3235db to your computer and use it in GitHub Desktop.
Save moyix/c61acd85e809e0f8fead38572f3235db to your computer and use it in GitHub Desktop.
Disassembly for consume_record
400f70: 48 8d a4 24 68 ff ff lea -0x98(%rsp),%rsp
400f77: ff
400f78: 48 89 14 24 mov %rdx,(%rsp)
400f7c: 48 89 4c 24 08 mov %rcx,0x8(%rsp)
400f81: 48 89 44 24 10 mov %rax,0x10(%rsp)
400f86: 48 c7 c1 aa 30 00 00 mov $0x30aa,%rcx
400f8d: e8 0e 02 00 00 callq 4011a0 <__afl_maybe_log>
400f92: 48 8b 44 24 10 mov 0x10(%rsp),%rax
400f97: 48 8b 4c 24 08 mov 0x8(%rsp),%rcx
400f9c: 48 8b 14 24 mov (%rsp),%rdx
400fa0: 48 8d a4 24 98 00 00 lea 0x98(%rsp),%rsp
400fa7: 00
400fa8: 53 push %rbx
400fa9: 48 89 fe mov %rdi,%rsi
400fac: 48 89 fb mov %rdi,%rbx
400faf: 31 c0 xor %eax,%eax
400fb1: bf 24 16 40 00 mov $0x401624,%edi
400fb6: e8 35 f7 ff ff callq 4006f0 <printf@plt>
400fbb: 8b 73 10 mov 0x10(%rbx),%esi
400fbe: 83 fe 01 cmp $0x1,%esi
400fc1: 0f 84 99 00 00 00 je 401060 <consume_record+0xf0>
400fc7: 90 nop
400fc8: 48 8d a4 24 68 ff ff lea -0x98(%rsp),%rsp
400fcf: ff
400fd0: 48 89 14 24 mov %rdx,(%rsp)
400fd4: 48 89 4c 24 08 mov %rcx,0x8(%rsp)
400fd9: 48 89 44 24 10 mov %rax,0x10(%rsp)
400fde: 48 c7 c1 90 b6 00 00 mov $0xb690,%rcx
400fe5: e8 b6 01 00 00 callq 4011a0 <__afl_maybe_log>
400fea: 48 8b 44 24 10 mov 0x10(%rsp),%rax
400fef: 48 8b 4c 24 08 mov 0x8(%rsp),%rcx
400ff4: 48 8b 14 24 mov (%rsp),%rdx
400ff8: 48 8d a4 24 98 00 00 lea 0x98(%rsp),%rsp
400fff: 00
401000: 83 fe 02 cmp $0x2,%esi
401003: 0f 85 41 01 00 00 jne 40114a <consume_record+0x1da>
401009: 0f 1f 00 nopl (%rax)
40100c: 48 8d a4 24 68 ff ff lea -0x98(%rsp),%rsp
401013: ff
401014: 48 89 14 24 mov %rdx,(%rsp)
401018: 48 89 4c 24 08 mov %rcx,0x8(%rsp)
40101d: 48 89 44 24 10 mov %rax,0x10(%rsp)
401022: 48 c7 c1 e2 6d 00 00 mov $0x6de2,%rcx
401029: e8 72 01 00 00 callq 4011a0 <__afl_maybe_log>
40102e: 48 8b 44 24 10 mov 0x10(%rsp),%rax
401033: 48 8b 4c 24 08 mov 0x8(%rsp),%rcx
401038: 48 8b 14 24 mov (%rsp),%rdx
40103c: 48 8d a4 24 98 00 00 lea 0x98(%rsp),%rsp
401043: 00
401044: 8b 73 14 mov 0x14(%rbx),%esi
401047: bf 42 16 40 00 mov $0x401642,%edi
40104c: 31 c0 xor %eax,%eax
40104e: e8 9d f6 ff ff callq 4006f0 <printf@plt>
401053: 48 89 df mov %rbx,%rdi
401056: 5b pop %rbx
401057: e9 64 f6 ff ff jmpq 4006c0 <free@plt>
40105c: 0f 1f 40 00 nopl 0x0(%rax)
401060: 0f b6 7b 01 movzbl 0x1(%rbx),%edi
401064: 0f b6 43 02 movzbl 0x2(%rbx),%eax
401068: 0f b6 13 movzbl (%rbx),%edx
40106b: 0f b6 4b 03 movzbl 0x3(%rbx),%ecx
40106f: 66 0f ef c0 pxor %xmm0,%xmm0
401073: c1 e7 08 shl $0x8,%edi
401076: c1 e0 10 shl $0x10,%eax
401079: 09 c7 or %eax,%edi
40107b: c1 e1 18 shl $0x18,%ecx
40107e: f3 0f 5a 43 14 cvtss2sd 0x14(%rbx),%xmm0
401083: 09 d7 or %edx,%edi
401085: 09 cf or %ecx,%edi
401087: 81 ff de 75 61 6c cmp $0x6c6175de,%edi
40108d: 89 3d 79 14 20 00 mov %edi,0x201479(%rip) # 60250c <lava_val+0x20c>
401093: 0f 84 97 00 00 00 je 401130 <consume_record+0x1c0>
401099: 0f 1f 00 nopl (%rax)
40109c: 48 8d a4 24 68 ff ff lea -0x98(%rsp),%rsp
4010a3: ff
4010a4: 48 89 14 24 mov %rdx,(%rsp)
4010a8: 48 89 4c 24 08 mov %rcx,0x8(%rsp)
4010ad: 48 89 44 24 10 mov %rax,0x10(%rsp)
4010b2: 48 c7 c1 89 3b 00 00 mov $0x3b89,%rcx
4010b9: e8 e2 00 00 00 callq 4011a0 <__afl_maybe_log>
4010be: 48 8b 44 24 10 mov 0x10(%rsp),%rax
4010c3: 48 8b 4c 24 08 mov 0x8(%rsp),%rcx
4010c8: 48 8b 14 24 mov (%rsp),%rdx
4010cc: 48 8d a4 24 98 00 00 lea 0x98(%rsp),%rsp
4010d3: 00
4010d4: 81 ff 6c 61 75 de cmp $0xde75616c,%edi
4010da: 74 54 je 401130 <consume_record+0x1c0>
4010dc: 48 8d a4 24 68 ff ff lea -0x98(%rsp),%rsp
4010e3: ff
4010e4: 48 89 14 24 mov %rdx,(%rsp)
4010e8: 48 89 4c 24 08 mov %rcx,0x8(%rsp)
4010ed: 48 89 44 24 10 mov %rax,0x10(%rsp)
4010f2: 48 c7 c1 05 f0 00 00 mov $0xf005,%rcx
4010f9: e8 a2 00 00 00 callq 4011a0 <__afl_maybe_log>
4010fe: 48 8b 44 24 10 mov 0x10(%rsp),%rax
401103: 48 8b 4c 24 08 mov 0x8(%rsp),%rcx
401108: 48 8b 14 24 mov (%rsp),%rdx
40110c: 48 8d a4 24 98 00 00 lea 0x98(%rsp),%rsp
401113: 00
401114: bf 36 16 40 00 mov $0x401636,%edi
401119: b8 01 00 00 00 mov $0x1,%eax
40111e: e8 cd f5 ff ff callq 4006f0 <printf@plt>
401123: 48 89 df mov %rbx,%rdi
401126: 5b pop %rbx
401127: e9 94 f5 ff ff jmpq 4006c0 <free@plt>
40112c: 0f 1f 40 00 nopl 0x0(%rax)
401130: 48 81 c7 36 16 40 00 add $0x401636,%rdi
401137: b8 01 00 00 00 mov $0x1,%eax
40113c: e8 af f5 ff ff callq 4006f0 <printf@plt>
401141: 48 89 df mov %rbx,%rdi
401144: 5b pop %rbx
401145: e9 76 f5 ff ff jmpq 4006c0 <free@plt>
40114a: 66 90 xchg %ax,%ax
40114c: 48 8d a4 24 68 ff ff lea -0x98(%rsp),%rsp
401153: ff
401154: 48 89 14 24 mov %rdx,(%rsp)
401158: 48 89 4c 24 08 mov %rcx,0x8(%rsp)
40115d: 48 89 44 24 10 mov %rax,0x10(%rsp)
401162: 48 c7 c1 8f c4 00 00 mov $0xc48f,%rcx
401169: e8 32 00 00 00 callq 4011a0 <__afl_maybe_log>
40116e: 48 8b 44 24 10 mov 0x10(%rsp),%rax
401173: 48 8b 4c 24 08 mov 0x8(%rsp),%rcx
401178: 48 8b 14 24 mov (%rsp),%rdx
40117c: 48 8d a4 24 98 00 00 lea 0x98(%rsp),%rsp
401183: 00
401184: bf 50 16 40 00 mov $0x401650,%edi
401189: 31 c0 xor %eax,%eax
40118b: e8 60 f5 ff ff callq 4006f0 <printf@plt>
401190: bf 01 00 00 00 mov $0x1,%edi
401195: e8 f6 f5 ff ff callq 400790 <exit@plt>
40119a: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment