$ ./demo_maze.sh
Using bin_descend to recover CFG
Disassembly not guided by outside facts.
Use :'../../build/mc-sema/bin_descend//bin_descend-p <protobuff>' to feed information to guide the disassembly
Disassembly not guided by outside facts.
Use: -p <protobuff>' to feed information to guide the disassembly
Looking at Object File section: .interp
Found symbol: .interp in .interp
Looking at Object File section: .init
Found symbol: .init in .init
Found symbol: _init in .init
Looking at Object File section: .plt
Found symbol: .plt in .plt
Looking at Object File section: .text
Found symbol: .text in .text
Found symbol: deregister_tm_clones in .text
Found symbol: register_tm_clones in .text
Found symbol: __do_global_dtors_aux in .text
Found symbol: frame_dummy in .text
Found symbol: __libc_csu_fini in .text
Found symbol: __x86.get_pc_thunk.bx in .text
Found symbol: draw in .text
Found symbol: __libc_csu_init in .text
Found symbol: _start in .text
Found symbol: main in .text
Looking at Object File section: .fini
Found symbol: .fini in .fini
Found symbol: _fini in .fini
Looking at Object File section: .rodata
Found symbol: .rodata in .rodata
Found symbol: _IO_stdin_used in .rodata
Found symbol: _fp_hw in .rodata
Looking at Object File section: .eh_frame_hdr
Found symbol: .eh_frame_hdr in .eh_frame_hdr
Looking at Object File section: .eh_frame
Found symbol: .eh_frame in .eh_frame
Found symbol: __FRAME_END__ in .eh_frame
Looking at Object File section: .jcr
Found symbol: .jcr in .jcr
Found symbol: __JCR_LIST__ in .jcr
Found symbol: __JCR_END__ in .jcr
Looking at Object File section: .got
Found symbol: .got in .got
Looking at Object File section: .got.plt
Found symbol: .got.plt in .got.plt
Found symbol: _GLOBAL_OFFSET_TABLE_ in .got.plt
Looking at Object File section: .data
Found symbol: .data in .data
Found symbol: data_start in .data
Found symbol: _edata in .data
Found symbol: __data_start in .data
Found symbol: __dso_handle in .data
Found symbol: maze in .data
Found symbol: __TMC_END__ in .data
Looking at Object File section: .bss
Found symbol: .bss in .bss
Found symbol: completed.6590 in .bss
Found symbol: _end in .bss
Found symbol: __bss_start in .bss
addDataEntryPoints: looking for entry points in: .interp
addDataEntryPointsFromSectionBounds are: 8048154 to 8048167
addDataEntryPoints: skipping non-data section: .init
addDataEntryPoints: skipping non-data section: .plt
addDataEntryPoints: skipping non-data section: .text
addDataEntryPoints: skipping non-data section: .fini
addDataEntryPoints: looking for entry points in: .rodata
addDataEntryPointsFromSectionBounds are: 80488e8 to 804894d
addDataEntryPoints: looking for entry points in: .eh_frame_hdr
addDataEntryPointsFromSectionBounds are: 8048950 to 8048974
addDataEntryPoints: looking for entry points in: .eh_frame
addDataEntryPointsFromSectionBounds are: 8048974 to 8048a04
addDataEntryPoints: looking for entry points in: .jcr
addDataEntryPointsFromSectionBounds are: 8049f10 to 8049f14
addDataEntryPoints: looking for entry points in: .got
addDataEntryPointsFromSectionBounds are: 8049ffc to 804a000
addDataEntryPoints: looking for entry points in: .got.plt
addDataEntryPointsFromSectionBounds are: 804a000 to 804a024
addDataEntryPoints: looking for entry points in: .data
addDataEntryPointsFromSectionBounds are: 804a024 to 804a079
addDataEntryPoints: looking for entry points in: .bss
addDataEntryPointsFromSectionBounds are: 804a07c to 804a080
We have 1 entry points
Calling getFunc on: 8048560
getFunc: Starting at 0x8048560
getFunc: toVisit size is: 1
Processing block: block_0x8048560
8048560: pushl %ebp
8048561: movl %esp, %ebp
8048563: pushl %ebx
8048564: pushl %edi
8048565: pushl %esi
8048566: subl $156, %esp
804856c: movl 12(%ebp), %eax
804856f: movl 8(%ebp), %ecx
8048572: movl $0, %edx
8048577: movl $28, %esi
804857c: leal -72(%ebp), %edi
804857f: leal 134520876, %ebx
Adding local data ref to: 804a02c
8048585: movl $0, -16(%ebp)
804858c: movl %ecx, -20(%ebp)
804858f: movl %eax, -24(%ebp)
8048592: movl $0, -44(%ebp)
8048599: movl $1, -28(%ebp)
80485a0: movl $1, -32(%ebp)
80485a7: movl -28(%ebp), %eax
80485aa: imull $11, -32(%ebp), %ecx
80485b1: addl %ecx, %ebx
80485b3: movb $88, (%ebx,%eax)
80485b7: movl $0, (%esp)
80485be: movl %edi, 4(%esp)
80485c2: movl $28, 8(%esp)
80485ca: movl %edx, -76(%ebp)
80485cd: movl %esi, -80(%ebp)
80485d0: calll -645
find_import_name: Doing extra deref
Adding: 0x8048350 as target because its a call target
Symbol not found, maybe a local call
relocate_addr: Relocation lives in: .text
relocate_addr: Offset is: 0
relocate_addr: Could not find reloc ref for: 80485d1
Could not relocate addr for local call at: 80485d0
Assuming address should not be relocated
Found local call to: 8048350
Adding: 0x8048350 as target because its a non-relocateable internal call
80485d5: movl %eax, -84(%ebp)
80485d8: cmpl $28, -44(%ebp)
80485df: jge 594
Adding block: 8048837
Adding block: 80485e5
Processing block: block_0x80485e5
80485e5: movl -28(%ebp), %eax
80485e8: movl %eax, -36(%ebp)
80485eb: movl -32(%ebp), %eax
80485ee: movl %eax, -40(%ebp)
80485f1: movl -44(%ebp), %eax
80485f4: movsbl -72(%ebp,%eax), %eax
80485f9: movl %eax, %ecx
80485fb: subl $114, %ecx
80485fe: movl %eax, -88(%ebp)
8048601: movl %ecx, -92(%ebp)
8048604: jg 45
Adding block: 8048637
Adding block: 804860a
Processing block: block_0x804860a
804860a: jmp 0
Adding block: 804860f
Processing block: block_0x804860f
804860f: movl -88(%ebp), %eax
8048612: subl $97, %eax
8048615: movl %eax, -96(%ebp)
8048618: je 97
Adding block: 804867f
Adding block: 804861e
Processing block: block_0x804861e
804861e: jmp 0
Adding block: 8048623
Processing block: block_0x8048623
8048623: movl -88(%ebp), %eax
8048626: subl $100, %eax
8048629: movl %eax, -100(%ebp)
804862c: je 93
Adding block: 804868f
Adding block: 8048632
Processing block: block_0x8048632
8048632: jmp 104
Adding block: 804869f
Processing block: block_0x804869f
804869f: leal 134514931, %eax
Adding local data ref to: 80488f3
80486a5: movl %eax, (%esp)
80486a8: calll -845
find_import_name: Doing extra deref
Adding: 0x8048360 as target because its a call target
Symbol not found, maybe a local call
relocate_addr: Relocation lives in: .text
relocate_addr: Offset is: 0
relocate_addr: Could not find reloc ref for: 80486a9
Could not relocate addr for local call at: 80486a8
Assuming address should not be relocated
Found local call to: 8048360
Adding: 0x8048360 as target because its a non-relocateable internal call
80486ad: leal 134514971, %ecx
Adding local data ref to: 804891b
80486b3: movl %ecx, (%esp)
80486b6: movl %eax, -112(%ebp)
80486b9: calll -862
find_import_name: Doing extra deref
Adding: 0x8048360 as target because its a call target
Symbol not found, maybe a local call
relocate_addr: Relocation lives in: .text
relocate_addr: Offset is: 0
relocate_addr: Could not find reloc ref for: 80486ba
Could not relocate addr for local call at: 80486b9
Assuming address should not be relocated
Found local call to: 8048360
Adding: 0x8048360 as target because its a non-relocateable internal call
80486be: movl $4294967295, %ecx
80486c3: movl $4294967295, (%esp)
80486ca: movl %eax, -116(%ebp)
80486cd: movl %ecx, -120(%ebp)
80486d0: calll -837
find_import_name: Doing extra deref
Adding: 0x8048390 as target because its a call target
Symbol not found, maybe a local call
relocate_addr: Relocation lives in: .text
relocate_addr: Offset is: 0
relocate_addr: Could not find reloc ref for: 80486d1
Could not relocate addr for local call at: 80486d0
Assuming address should not be relocated
Found local call to: 8048390
Adding: 0x8048390 as target because its a non-relocateable internal call
80486d5: leal 134520876, %eax
Adding local data ref to: 804a02c
80486db: movl -28(%ebp), %ecx
80486de: imull $11, -32(%ebp), %edx
80486e5: addl %edx, %eax
80486e7: movsbl (%eax,%ecx), %eax
80486eb: cmpl $35, %eax
80486f0: jne 64
Adding block: 8048736
Adding block: 80486f6
Processing block: block_0x80486f6
80486f6: leal 134514982, %eax
Adding local data ref to: 8048926
80486fc: movl %eax, (%esp)
80486ff: calll -932
find_import_name: Doing extra deref
Adding: 0x8048360 as target because its a call target
Symbol not found, maybe a local call
relocate_addr: Relocation lives in: .text
relocate_addr: Offset is: 0
relocate_addr: Could not find reloc ref for: 8048700
Could not relocate addr for local call at: 80486ff
Assuming address should not be relocated
Found local call to: 8048360
Adding: 0x8048360 as target because its a non-relocateable internal call
8048704: leal 134514992, %ecx
Adding local data ref to: 8048930
804870a: leal -72(%ebp), %edx
804870d: movl %ecx, (%esp)
8048710: movl %edx, 4(%esp)
8048714: movl %eax, -124(%ebp)
8048717: calll -956
find_import_name: Doing extra deref
Adding: 0x8048360 as target because its a call target
Symbol not found, maybe a local call
relocate_addr: Relocation lives in: .text
relocate_addr: Offset is: 0
relocate_addr: Could not find reloc ref for: 8048718
Could not relocate addr for local call at: 8048717
Assuming address should not be relocated
Found local call to: 8048360
Adding: 0x8048360 as target because its a non-relocateable internal call
804871c: movl $1, %ecx
8048721: movl $1, (%esp)
8048728: movl %eax, -128(%ebp)
804872b: movl %ecx, -132(%ebp)
8048731: calll -934
find_import_name: Doing extra deref
Adding: 0x8048390 as target because its a call target
Symbol not found, maybe a local call
relocate_addr: Relocation lives in: .text
relocate_addr: Offset is: 0
relocate_addr: Could not find reloc ref for: 8048732
Could not relocate addr for local call at: 8048731
Assuming address should not be relocated
Found local call to: 8048390
Adding: 0x8048390 as target because its a non-relocateable internal call
8048736: leal 134520876, %eax
Adding local data ref to: 804a02c
804873c: movl -28(%ebp), %ecx
804873f: imull $11, -32(%ebp), %edx
8048746: addl %edx, %eax
8048748: movsbl (%eax,%ecx), %eax
804874c: cmpl $32, %eax
8048751: je 84
Adding block: 80487ab
Adding block: 8048757
Processing block: block_0x8048757
8048757: cmpl $2, -32(%ebp)
804875e: jne 59
Adding block: 804879f
Adding block: 8048764
Processing block: block_0x8048764
8048764: leal 134520876, %eax
Adding local data ref to: 804a02c
804876a: movl -28(%ebp), %ecx
804876d: imull $11, -32(%ebp), %edx
8048774: addl %edx, %eax
8048776: movsbl (%eax,%ecx), %eax
804877a: cmpl $124, %eax
804877f: jne 26
Adding block: 804879f
Adding block: 8048785
Processing block: block_0x8048785
8048785: cmpl $0, -28(%ebp)
804878c: jle 13
Adding block: 804879f
Adding block: 8048792
Processing block: block_0x8048792
8048792: cmpl $11, -28(%ebp)
8048799: jl 12
Adding block: 80487ab
Adding block: 804879f
Processing block: block_0x804879f
804879f: movl -36(%ebp), %eax
80487a2: movl %eax, -28(%ebp)
80487a5: movl -40(%ebp), %eax
80487a8: movl %eax, -32(%ebp)
80487ab: movl -36(%ebp), %eax
80487ae: cmpl -28(%ebp), %eax
80487b1: jne 55
Adding block: 80487ee
Adding block: 80487b7
Processing block: block_0x80487b7
80487b7: movl -40(%ebp), %eax
80487ba: cmpl -32(%ebp), %eax
80487bd: jne 43
Adding block: 80487ee
Adding block: 80487c3
Processing block: block_0x80487c3
80487c3: leal 134515011, %eax
Adding local data ref to: 8048943
80487c9: movl %eax, (%esp)
80487cc: calll -1137
find_import_name: Doing extra deref
Adding: 0x8048360 as target because its a call target
Symbol not found, maybe a local call
relocate_addr: Relocation lives in: .text
relocate_addr: Offset is: 0
relocate_addr: Could not find reloc ref for: 80487cd
Could not relocate addr for local call at: 80487cc
Assuming address should not be relocated
Found local call to: 8048360
Adding: 0x8048360 as target because its a non-relocateable internal call
80487d1: movl $4294967294, %ecx
80487d6: movl $4294967294, (%esp)
80487dd: movl %eax, -136(%ebp)
80487e3: movl %ecx, -140(%ebp)
80487e9: calll -1118
find_import_name: Doing extra deref
Adding: 0x8048390 as target because its a call target
Symbol not found, maybe a local call
relocate_addr: Relocation lives in: .text
relocate_addr: Offset is: 0
relocate_addr: Could not find reloc ref for: 80487ea
Could not relocate addr for local call at: 80487e9
Assuming address should not be relocated
Found local call to: 8048390
Adding: 0x8048390 as target because its a non-relocateable internal call
80487ee: leal 134520876, %eax
Adding local data ref to: 804a02c
80487f4: movl -28(%ebp), %ecx
80487f7: imull $11, -32(%ebp), %edx
80487fe: addl %edx, %eax
8048800: movb $88, (%eax,%ecx)
8048804: calll -857
Adding: 0x80484b0 as target because its a call target
Symbol not found, maybe a local call
relocate_addr: Relocation lives in: .text
relocate_addr: Offset is: 0
relocate_addr: Could not find reloc ref for: 8048805
Could not relocate addr for local call at: 8048804
Assuming address should not be relocated
Found local call to: 80484b0
Adding: 0x80484b0 as target because its a non-relocateable internal call
8048809: movl $1, %eax
804880e: movl -44(%ebp), %ecx
8048811: addl $1, %ecx
8048817: movl %ecx, -44(%ebp)
804881a: movl $1, (%esp)
8048821: movl %eax, -144(%ebp)
8048827: calll -1212
find_import_name: Doing extra deref
Adding: 0x8048370 as target because its a call target
Symbol not found, maybe a local call
relocate_addr: Relocation lives in: .text
relocate_addr: Offset is: 0
relocate_addr: Could not find reloc ref for: 8048828
Could not relocate addr for local call at: 8048827
Assuming address should not be relocated
Found local call to: 8048370
Adding: 0x8048370 as target because its a non-relocateable internal call
804882c: movl %eax, -148(%ebp)
8048832: jmp -607
Adding block: 80485d8
Processing block: block_0x80485d8
80485d8: cmpl $28, -44(%ebp)
80485df: jge 594
Adding block: 8048837
Adding block: 80485e5
Processing block: block_0x8048837
8048837: leal 134515011, %eax
Adding local data ref to: 8048943
804883d: movl %eax, (%esp)
8048840: calll -1253
find_import_name: Doing extra deref
Adding: 0x8048360 as target because its a call target
Symbol not found, maybe a local call
relocate_addr: Relocation lives in: .text
relocate_addr: Offset is: 0
relocate_addr: Could not find reloc ref for: 8048841
Could not relocate addr for local call at: 8048840
Assuming address should not be relocated
Found local call to: 8048360
Adding: 0x8048360 as target because its a non-relocateable internal call
8048845: movl -16(%ebp), %ecx
8048848: movl %eax, -152(%ebp)
804884e: movl %ecx, %eax
8048850: addl $156, %esp
8048856: popl %esi
8048857: popl %edi
8048858: popl %ebx
8048859: popl %ebp
804885a: retl
Processing block: block_0x80487ee
80487ee: leal 134520876, %eax
Adding local data ref to: 804a02c
80487f4: movl -28(%ebp), %ecx
80487f7: imull $11, -32(%ebp), %edx
80487fe: addl %edx, %eax
8048800: movb $88, (%eax,%ecx)
8048804: calll -857
Adding: 0x80484b0 as target because its a call target
Symbol not found, maybe a local call
relocate_addr: Relocation lives in: .text
relocate_addr: Offset is: 0
relocate_addr: Could not find reloc ref for: 8048805
Could not relocate addr for local call at: 8048804
Assuming address should not be relocated
Found local call to: 80484b0
Adding: 0x80484b0 as target because its a non-relocateable internal call
8048809: movl $1, %eax
804880e: movl -44(%ebp), %ecx
8048811: addl $1, %ecx
8048817: movl %ecx, -44(%ebp)
804881a: movl $1, (%esp)
8048821: movl %eax, -144(%ebp)
8048827: calll -1212
find_import_name: Doing extra deref
Adding: 0x8048370 as target because its a call target
Symbol not found, maybe a local call
relocate_addr: Relocation lives in: .text
relocate_addr: Offset is: 0
relocate_addr: Could not find reloc ref for: 8048828
Could not relocate addr for local call at: 8048827
Assuming address should not be relocated
Found local call to: 8048370
Adding: 0x8048370 as target because its a non-relocateable internal call
804882c: movl %eax, -148(%ebp)
8048832: jmp -607
Adding block: 80485d8
Processing block: block_0x80487ab
80487ab: movl -36(%ebp), %eax
80487ae: cmpl -28(%ebp), %eax
80487b1: jne 55
Adding block: 80487ee
Adding block: 80487b7
Processing block: block_0x8048736
8048736: leal 134520876, %eax
Adding local data ref to: 804a02c
804873c: movl -28(%ebp), %ecx
804873f: imull $11, -32(%ebp), %edx
8048746: addl %edx, %eax
8048748: movsbl (%eax,%ecx), %eax
804874c: cmpl $32, %eax
8048751: je 84
Adding block: 80487ab
Adding block: 8048757
Processing block: block_0x804868f
804868f: movl -28(%ebp), %eax
8048692: addl $1, %eax
8048697: movl %eax, -28(%ebp)
804869a: jmp 54
Adding block: 80486d5
Processing block: block_0x80486d5
80486d5: leal 134520876, %eax
Adding local data ref to: 804a02c
80486db: movl -28(%ebp), %ecx
80486de: imull $11, -32(%ebp), %edx
80486e5: addl %edx, %eax
80486e7: movsbl (%eax,%ecx), %eax
80486eb: cmpl $35, %eax
80486f0: jne 64
Adding block: 8048736
Adding block: 80486f6
Processing block: block_0x804867f
804867f: movl -28(%ebp), %eax
8048682: addl $4294967295, %eax
8048687: movl %eax, -28(%ebp)
804868a: jmp 70
Adding block: 80486d5
Processing block: block_0x8048637
8048637: movl -88(%ebp), %eax
804863a: subl $115, %eax
804863d: movl %eax, -104(%ebp)
8048640: je 41
Adding block: 804866f
Adding block: 8048646
Processing block: block_0x8048646
8048646: jmp 0
Adding block: 804864b
Processing block: block_0x804864b
804864b: movl -88(%ebp), %eax
804864e: subl $119, %eax
8048651: movl %eax, -108(%ebp)
8048654: jne 69
Adding block: 804869f
Adding block: 804865a
Processing block: block_0x804865a
804865a: jmp 0
Adding block: 804865f
Processing block: block_0x804865f
804865f: movl -32(%ebp), %eax
8048662: addl $4294967295, %eax
8048667: movl %eax, -32(%ebp)
804866a: jmp 102
Adding block: 80486d5
Processing block: block_0x804866f
804866f: movl -32(%ebp), %eax
8048672: addl $1, %eax
8048677: movl %eax, -32(%ebp)
804867a: jmp 86
Adding block: 80486d5
getFunc: Function recovery complete for func at 8048560
Calling getFunc on: 8048370
getFunc: Starting at 0x8048370
getFunc: toVisit size is: 1
Processing block: block_0x8048370
8048370: jmpl *134520852
find_import_name: Doing extra deref
Found a possible jump table!
Not a jump table: no relocation in JMP32m
Heristic jumptable processing couldn't parse jumptable
pointing to: 0x8048370
jmpl *134520852
0614547ebf1eb9af7a6ebb0913b4782c
Failure to make module: Generic error: Line: 914
File: /home/federico/git/mcsema/mc-sema/bin_descend/cfg_recover.cpp
Unable to resolve jump.
Failed to open file demo_maze.cfg
Could not process input module: demo_maze.cfg
../../build/llvm-3.5/bin/opt: demo_maze.bc: error: Could not open input file: No such file or directory
../../build/llvm-3.5/bin/llc: demo_maze_opt.bc: error: Could not open input file: No such file or directory
clang: error: no such file or directory: 'demo_maze.o'
./demo_maze.sh: line 24: ./demo_maze_out.exe: No such file or directory