SPI flash: environment block
A router that stopped working arrived at a repair workshop. The technician read its SPI NOR flash chip with a programmer and obtained the dump flash.bin (256 KB). At the start there is a bootloader (random-looking bytes), in between there are gaps filled with 0xFF, followed by the kernel and settings.
The bootloader's settings are stored in the U-Boot environment (env) block: a 4 KB (0x1000) block whose first 4 bytes are the CRC32 value (little-endian) of the remaining 4092 bytes, followed by kalit=qiymat strings, each ending with \0, and a double \0\0 at the end.
Find the factory_token variable that was written to the device at the factory. Its value is base64-encoded. The dump may also contain an old, damaged copy of the env. Flag format: BAYROQ{...} (the last 16 characters are lowercase hexadecimal digits).