30 lines
539 B
Bash
Executable File
30 lines
539 B
Bash
Executable File
#!/usr/bin/env nix-shell
|
|
#!nix-shell -i bash -p pkgsCross.aarch64-multiplatform.stdenv.cc
|
|
|
|
"$CC_FOR_TARGET" chall_1.S -o chall
|
|
|
|
# Output from Ghidra:
|
|
# int func(int param_1)
|
|
# {
|
|
# return 0xe5 - param_1;
|
|
# }
|
|
#
|
|
# int main(undefined8 param_1,long param_2)
|
|
# {
|
|
# int iVar1;
|
|
#
|
|
# iVar1 = atoi(*(char **)(param_2 + 8));
|
|
# iVar1 = func(iVar1);
|
|
# if (iVar1 == 0) {
|
|
# iVar1 = puts("You win!");
|
|
# }
|
|
# else {
|
|
# iVar1 = puts("You Lose :(");
|
|
# }
|
|
# return iVar1;
|
|
# }
|
|
|
|
./chall "$((16#e5))"
|
|
|
|
printf "picoCTF{%08x}\n" "$((16#e5))"
|