//
// sub_BFB770 from 0xbfb770 to 0xbfb7e0 (112 bytes)
//
// 1 xrefs:
// > jinit_marker_writer @ 0xbff304
//
// 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 sub_BFB770(__int64 result, char a2)
{
__int64 v2; // x2
_BYTE *v3; // x4
__int64 v4; // x1
__int64 (__fastcall ***v5)(_QWORD); // x19
__int64 (__fastcall *v6)(_QWORD); // x2
v2 = *(_QWORD *)(result + 40);
v3 = (_BYTE *)(*(_QWORD *)v2)++;
*v3 = a2;
v4 = *(_QWORD *)(v2 + 8) - 1LL;
*(_QWORD *)(v2 + 8) = v4;
if ( !v4 )
{
v5 = (__int64 (__fastcall ***)(_QWORD))result;
result = (*(__int64 (**)(void))(v2 + 24))();
if ( !(_DWORD)result )
{
v6 = **v5;
*((_DWORD *)*v5 + 10) = 25;
return v6(v5);
}
}
return result;
}