//
// std::__ndk1::basic_filebuf>::pbackfail from 0x80ab64 to 0x80aba2 (62 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:01:29 +0000
//
int __fastcall std::filebuf::pbackfail(_DWORD *a1, int a2)
{
unsigned int v2; // r3
if ( !a1[16] )
return -1;
v2 = a1[3];
if ( a1[2] >= v2 )
return -1;
if ( a2 == -1 )
{
a1[3] = v2 - 1;
return 0;
}
else
{
if ( (a1[22] & 0x10) == 0 && *(unsigned __int8 *)(v2 - 1) != (unsigned __int8)a2 )
return -1;
a1[3] = v2 - 1;
*(_BYTE *)(v2 - 1) = a2;
return a2;
}
}