sfl-examples/slide-examples/assembly/ex25.asm

42 lines
556 B
NASM
Raw Permalink Normal View History

2023-12-14 14:12:51 +01:00
; opaque predicates
bits 64
SECTION .data
; empty
SECTION .text
extern steal_data;
extern google_me;
global _start
_start:
mov rbx, 0
mov rcx, 2
cmp rbx, rcx
je obf1
mov rax, 42
mul rcx
cmp rax, rcx
je obf2
jmp fin
obf1:
xchg rax, rbx
mov rbx, 7
div rbx
; NOTE: call removed, otherwise ld fails to build
;call steal_data
jmp obf2
obf2:
add rax, 13
xor rax, rcx
; NOTE: call removed, otherwise ld fails to build
;call steal_data
;call google_me
fin:
nop