Skip to main content
Challenges Bytecode VM with a loop
Reverse engineering Hard Complex VM Solves: 8

Bytecode VM with a loop

Author: CyberSamSU
Points
80

This time the VM has a loop and a conditional jump. Opcode table (the same VM as in challenge 2, but more instructions are used):

MnemonicCodeDescription
PUSH1Operanddagi sonni stekka qo'yadi.
STEP13MA'LUMOTLAR jadvalidan navbatdagi baytni oladi, uni KALIT jadvalidagi navbatdagi bayt bilan XOR qiladi, natijani stekka qo'yadi va ichki ko'rsatkichni 1 ga oshiradi.
OUT5Stek tepasini belgi (chr) sifatida chiqaradi va olib tashlaydi.
DEC11Stek tepasidan 1 ayiradi (mod 256).
DUP6Stek tepasidagi qiymatni ikkilantiradi (nusxa qo'shadi).
JZ9Stekdan qiymat oladi; agar u 0 bo'lsa, operand manziliga o'tadi, aks holda davom etadi.
JMP8Operand ko'rsatgan manzilga (indeksga) o'tadi.
HALT0Dasturni to'xtatadi.

Additionally, the VM has two external tables: DATA (data) and KEY (key, length 3, repeats periodically). Every time the STEP instruction is called, it XORs the next data[i] with key[i % 3] and pushes it to the stack.

MA'LUMOTLAR: [8, 147, 93, 24, 157, 85, 49, 128, 55, 28, 141, 114, 39, 190, 107, 37, 162, 96, 37, 188, 97, 55]

KALIT: [74, 210, 4]

Program (address-indexed):

AddressOpcodeOperand
0PUSH22
2STEP
3OUT
4DEC
5DUP
6JZ10
8JMP2
10HALT

If it is difficult to trace manually — write a small Python interpreter yourself based on the VM description above (this is the most reliable way).

Theory: learn the topic
Hints 3
Opening a hint reduces the points you get for solving this challenge.
Hint 1 −8 pts Log in
Hint 2 −16 pts Log in
Hint 3 −24 pts Log in
To submit a flag, log in.

First solvers

1. W.o.X 17.09.2026
2. Qodirxon Yoqubjonov 18.09.2026
3. Faxriddin Oripov 02.10.2026
4. testrejim 09.10.2026
5. Абдул 09.10.2026
6. Mirjaxon Qaxxarov 27.10.2026
7. Odam 05.11.2026
8. arcanum 11.11.2026