//
// ssl3_cbc_remove_padding from 0xfb29a4 to 0xfb2a20 (124 bytes)
//
// 2 xrefs:
// > ssl3_enc @ 0xfb2b60
// > ??> @ 0xb51e0
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:15:13 +0000
//
__int64 __fastcall ssl3_cbc_remove_padding(__int64 a1, int a2, int a3)
{
unsigned int v4; // w2
__int64 result; // x0
unsigned int v6; // w4
int v7; // w3
int v8; // w1
v4 = a3 + 1;
result = 0;
v6 = *(_DWORD *)(a1 + 8);
if ( v4 <= v6 )
{
v7 = *(unsigned __int8 *)(*(_QWORD *)(a1 + 24) + v6 - 1);
v8 = ~((((a2 - (v7 + 1)) ^ (v7 + 1) | (v7 + 1) ^ a2) ^ a2) >> 31)
& ~((int)(((v6 - (v4 + v7)) ^ (v4 + v7) | (v4 + v7) ^ v6) ^ v6) >> 31);
*(_DWORD *)(a1 + 8) = v6 - (v8 & (v7 + 1));
return v8 & 1 | (unsigned int)~v8;
}
return result;
}