this math:
local_8 = (int)(0x3f / (long)param_1) + 1;
iVar6 = 0;
do {
uVar7 = (undefined2)((ulong)param_2 >> 0x10);
uVar8 = (undefined2)((ulong)param_4 >> 0x10);
iVar4 = (int)param_4;
uVar1 = (int)*(char *)(iVar4 + iVar6) - (int)*(char *)((int)param_2 + iVar6);
uVar2 = (int)uVar1 >> 0xf;
local_608[iVar6] = (char)((int)((uVar1 ^ uVar2) - uVar2) / local_8) + '\x01';
iVar6 = iVar6 + 1;
} while (iVar6 < 0x300);