//
// InfoLayer::commentUploadFailed from 0x100896af0 to 0x100896c10 (288 bytes)
//
// 2 xrefs:
// > sub_100896C30 @ 0x100896c3c
// > ??> @ 0x100ba8170
//
// This function is hookable on this platform (idp: pc, 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 12:37:07 +0000
//
__int64 __fastcall InfoLayer::commentUploadFailed(__int64 a1, int a2, int a3)
{
__int64 result; // rax
__int64 v4; // rcx
__int64 v5; // rax
__int64 v6; // rcx
__int64 v7; // rbx
__int128 v8; // [rsp+0h] [rbp-20h] BYREF
void *__p; // [rsp+10h] [rbp-10h]
result = *(_QWORD *)(a1 + 704);
if ( result )
{
if ( *(_BYTE *)(a1 + 880) != 1 )
return result;
result = *(unsigned int *)(result + 376);
if ( a3 != -1 )
return result;
}
else
{
v4 = *(_QWORD *)(a1 + 712);
if ( v4 )
{
result = (unsigned int)-*(_DWORD *)(v4 + 344);
if ( a3 != -1 )
return result;
}
else
{
v5 = *(_QWORD *)(a1 + 720);
if ( v5 )
{
result = *(unsigned int *)(v5 + 316);
if ( a3 != -1 )
return result;
}
else
{
v6 = *(_QWORD *)(a1 + 696);
if ( v6 )
{
result = (unsigned int)(*(_DWORD *)(v6 + 328) - *(_DWORD *)(v6 + 332));
if ( a3 != -1 )
return result;
}
else
{
result = 0;
if ( a3 != -1 )
return result;
}
}
}
}
if ( (_DWORD)result == a2 )
{
__p = operator new(0x30u);
*(_QWORD *)&v8 = 49;
*((_QWORD *)&v8 + 1) = 46;
strcpy((char *)__p, "Comment upload failed. Please try again later.");
v7 = sub_100493AB0(0, (__int64)"Failed", &v8, (__int64)"OK", 0);
if ( (v8 & 1) != 0 )
operator delete(__p);
return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 1312LL))(v7);
}
return result;
}