给定param_1
的是输入文件字节,有人可以解释做uVar4 = *(uint *)(param_1 + 3)
什么吗?是铸造param_1
到uint
那时uVar4 = param_1[3]
吗?此外,关于指针的任何澄清也很好,因为我对 C/Cpp 的体验接近于零(甚至没有提到指针)
uchar * DecryptLZ4(uchar *param_1,ulong param_2,ulong *param_3) //param_1: file bytes, param_2: file size
{
uchar uVar1;
uchar *puVar2;
int iVar3;
uint uVar4;
bool bVar5;
ulong local_28;
int local_24;
local_24 = __stack_chk_guard;
local_28 = param_2;
if (((param_1 != (uchar *)0x0) && (6 < param_2)) && (*param_1 == -8)) { //if param_1[0] == 0xf8..
uVar1 = param_1[1];
bVar5 = uVar1 == -0x75; // ..and param_1[1] == 0x8b:
if (bVar5) {
uVar1 = param_1[2];
} // if param_1[0] =
if (((bVar5 && uVar1 == '+') && (param_2 != 7)) && //if param_1[2] == 0x2b and param_2 != 7
(uVar4 = *(uint *)(param_1 + 3), uVar4 < 0x2000001)) { // THIS LINE
puVar2 = (uchar *)Allocate((int)GlobalAllocator,(char *)(uVar4 + 1),
(int)
"XANA"
,&DAT_00000085);
if (puVar2 != (uchar *)0x0) {
iVar3 = FUN_00298230(param_1 + 7,puVar2,param_2 - 7,uVar4);
if (iVar3 < 1) {
Free((BlockAllocator *)GlobalAllocator,puVar2,(int)(char *)(uVar4 + 1));
goto LAB_00346faa;
}
puVar2[iVar3] = '\0';
Free((BlockAllocator *)GlobalAllocator,param_1,local_28 + 1);
param_2 = uVar4;
param_1 = puVar2;
local_28 = uVar4;
}
if ((0 < (int)uVar4) && (2 < param_2)) {
while (*param_1 == -8) {
uVar1 = param_1[1];
bVar5 = uVar1 != -0x75;
if (!bVar5) {
uVar1 = param_1[2];
}
if ((bVar5 || uVar1 != '+') ||
(param_1 = (uchar *)DecryptLZ4(param_1,param_2,&local_28), param_2 = local_28,
local_28 < 3)) break;
}
}
}
}
LAB_00346faa:
if (param_3 != (ulong *)0x0) {
*param_3 = param_2;
}
if (__stack_chk_guard == local_24) {
return param_1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}