Ah, from packPlayerItem we can find PackWeapond and PackAmmo, nice.
One more thing:
In linux is like:
PHP Code:
signed int __cdecl CWeaponBox__PackWeapon(int a1, int a2)
{
int v2; // eax@2
signed int result; // eax@6
int v4; // eax@7
int v5; // edx@7
int v6; // ecx@7
int v7; // ST08_4@7
int v8; // ST0C_4@7
int v9; // [sp-Ch] [bp-24h]@1
if ( CWeaponBox__HasWeapon(a1, a2) )
goto LABEL_13;
v2 = *(_DWORD *)(a2 + 180);
if ( !v2 )
goto LABEL_14;
if ( *(_DWORD *)(v2 + 1512) == a2 )
(*(void (__cdecl **)(int, _DWORD))(*(_DWORD *)(a2 + 148) + 276))(a2, 0);
if ( !(*(int (__cdecl **)(_DWORD, int))(*(_DWORD *)(*(_DWORD *)(a2 + 180) + 148) + 104))(*(_DWORD *)(a2 + 180), a2) )
{
LABEL_13:
result = 0;
}
else
{
LABEL_14:
v4 = 4 * (*(int (__stdcall **)(int, int, int, int))(*(_DWORD *)(a2 + 148) + 324))(a2, v9, v7, v8);
v5 = a1 + 152;
v6 = *(_DWORD *)(v4 + a1 + 152);
if ( v6 )
{
*(_DWORD *)(a2 + 184) = v6;
*(_DWORD *)(v4 + v5) = a2;
}
else
{
*(_DWORD *)(v4 + v5) = a2;
*(_DWORD *)(a2 + 184) = 0;
}
*(_BYTE *)(*(_DWORD *)a2 + 419) |= 0x40u;
*(_DWORD *)(*(_DWORD *)a2 + 264) = 0;
*(_DWORD *)(*(_DWORD *)a2 + 268) = 0;
*(_DWORD *)(*(_DWORD *)a2 + 280) = 128;
*(_DWORD *)(*(_DWORD *)a2 + 180) = 0;
*(_DWORD *)(*(_DWORD *)a2 + 184) = 0;
*(_DWORD *)(*(_DWORD *)a2 + 408) = *(_DWORD *)(*(_DWORD *)a1 + 520);
*(_DWORD *)(a2 + 12) = 0;
*(_DWORD *)(a2 + 16) = 0;
*(_DWORD *)(a2 + 20) = 0;
*(_DWORD *)(a2 + 24) = 0;
*(_DWORD *)(a2 + 180) = 0;
result = 1;
}
return result;
}
In windows:
PHP Code:
signed int __thiscall CWeaponBox__PackWeapon(void *this, int a2)
{
int v2; // ebp@1
int v3; // edi@1
void *v4; // esi@1
int v5; // eax@2
int v6; // eax@7
int v8; // eax@12
int v9; // ecx@12
const char *v10; // [sp+10h] [bp-8h]@2
void *v11; // [sp+14h] [bp-4h]@1
int v12; // [sp+1Ch] [bp+4h]@2
v3 = a2;
v4 = this;
v11 = this;
v2 = *((_DWORD *)this + (*(int (__thiscall **)(int))(*(_DWORD *)a2 + 316))(a2) + 34);
if ( v2 )
{
v5 = *(_DWORD *)(LODWORD(dword_10160E18) + 152);
v12 = *(_DWORD *)(LODWORD(dword_10160E18) + 152);
v10 = (const char *)(v5 + **(_DWORD **)(v3 + 4));
while ( strcmp((const char *)(v5 + **(_DWORD **)(v2 + 4)), v10) )
{
v2 = *(_DWORD *)(v2 + 168);
if ( !v2 )
{
v4 = v11;
goto LABEL_7;
}
v5 = v12;
}
return 0;
}
LABEL_7:
v6 = *(_DWORD *)(v3 + 164);
if ( v6 )
{
if ( *(_DWORD *)(v6 + 1492) == v3 )
(*(void (__thiscall **)(int, _DWORD))(*(_DWORD *)v3 + 268))(v3, 0);
if ( !(*(int (__stdcall **)(int))(**(_DWORD **)(v3 + 164) + 96))(v3) )
return 0;
}
v8 = (*(int (__thiscall **)(int))(*(_DWORD *)v3 + 316))(v3);
v9 = *((_DWORD *)v4 + v8 + 34);
if ( v9 )
{
*(_DWORD *)(v3 + 168) = v9;
*((_DWORD *)v4 + v8 + 34) = v3;
}
else
{
*((_DWORD *)v4 + v8 + 34) = v3;
*(_DWORD *)(v3 + 168) = 0;
}
*(_DWORD *)(*(_DWORD *)(v3 + 4) + 416) |= 0x40000000u;
*(_DWORD *)(*(_DWORD *)(v3 + 4) + 264) = 0;
*(_DWORD *)(*(_DWORD *)(v3 + 4) + 268) = 0;
*(_DWORD *)(*(_DWORD *)(v3 + 4) + 280) = 128;
*(_DWORD *)(*(_DWORD *)(v3 + 4) + 180) = 0;
*(_DWORD *)(*(_DWORD *)(v3 + 4) + 184) = 0;
*(_DWORD *)(*(_DWORD *)(v3 + 4) + 408) = *(_DWORD *)(*((_DWORD *)v4 + 1) + 520);
*(_DWORD *)(v3 + 16) = 0;
*(_DWORD *)(v3 + 20) = 0;
*(_DWORD *)(v3 + 164) = 0;
return 1;
}
So, under win the check is gone:
PHP Code:
if ( CWeaponBox__HasWeapon(a1, a2) )
I think that this functions is integrated in PackWeapon under windows but I'm not sure( didn't tried to find HaSWeapon in other ways, just saw that the check is missing).
__________________