Unlocker does take about ~10 secs to run because of the 0x20000 * 8 * 2 calls to des_encrypt_with_sbox. You can replace those calls with:
void sbox_fast(BYTE* in, BYTE* out)
{
BYTE out_test[21] = { 0 };
memset(out, 0, 21);
out[0] = in[0] ^ 0x2D;
for (int i = 1; i < 21; i++)
{
des_encrypt_with_sbox(out, out_test, 21);
out[i] = in[i] ^ out_test[i];
}
}
...
Then just replace all your loop and thread status code with just:
sbox_fast(output_buffer, data_buffer_ptr);
Then you'll get the same output pretty much instantly
Unlocker does take about ~10 secs to run because of the 0x20000 * 8 * 2 calls to des_encrypt_with_sbox. You can replace those calls with:
Then you'll get the same output pretty much instantly