//
// ssl3_cbc_remove_padding from 0xd34650 to 0xd346cc (124 bytes)
//
// 2 xrefs:
// > ssl3_enc @ 0xd3480c
// > ??> @ 0x88908
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__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;
}