//
// ReviewChoiceSheet::onChoice from 0x1400aeb30 to 0x1400aed67 (567 bytes)
//
// 2 xrefs:
// > ReviewChoiceSheet::init @ 0x1400aea3d
// > ??> @ 0x1409134b4
//
// 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 11:26:10 +0000
//
// Hidden C++ exception states: #wind=1
void __fastcall ReviewChoiceSheet::onChoice(__int64 a1, __int64 a2)
{
unsigned int v3; // esi
__int64 v4; // rcx
_BYTE *v5; // rax
size_t v6; // r8
void **v7; // rax
char v8; // bl
void *v9; // rcx
void *v10; // rcx
__int64 v11; // rax
cocos2d::CCTouchDispatcher *v12; // rax
void (__fastcall ***v13)(_QWORD, _QWORD, _QWORD, void **); // rcx
void *v14; // rcx
__int128 v15; // [rsp+38h] [rbp-80h] BYREF
__m128i si128; // [rsp+48h] [rbp-70h]
void *Block[2]; // [rsp+58h] [rbp-60h] BYREF
__int128 v18; // [rsp+68h] [rbp-50h]
void *v19[2]; // [rsp+78h] [rbp-40h] BYREF
__int128 v20; // [rsp+88h] [rbp-30h]
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);
v4 = *(_QWORD *)(a1 + 1016);
if ( v4 )
{
v5 = (_BYTE *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(*(_QWORD *)(v4 + 592) + 600LL) + 8LL))(*(_QWORD *)(v4 + 592) + 600LL);
*(_OWORD *)Block = 0;
v18 = 0;
v6 = -1;
do
++v6;
while ( v5[v6] );
sub_14003D230(Block, v5, v6);
v7 = Block;
v8 = 5;
}
else
{
v15 = 0;
si128 = _mm_load_si128((const __m128i *)&Size);
LOBYTE(v15) = 0;
v7 = (void **)&v15;
v8 = 2;
}
*(_OWORD *)v19 = *(_OWORD *)v7;
v20 = *((_OWORD *)v7 + 1);
v7[2] = nullptr;
v7[3] = (void *)15;
*(_BYTE *)v7 = 0;
if ( (v8 & 2) != 0 )
{
v8 &= ~2u;
if ( si128.m128i_i64[1] > 0xFuLL )
{
v9 = (void *)v15;
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v9 = *(void **)(v15 - 8);
if ( (unsigned __int64)(v15 - (_QWORD)v9 - 8) > 0x1F )
LABEL_15:
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v9);
}
}
if ( (v8 & 1) != 0 && *((_QWORD *)&v18 + 1) > 0xFu )
{
v10 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v18 + 1) + 1LL) >= 0x1000 )
{
v10 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v10 - 8) > 0x1F )
goto LABEL_15;
}
j_j_free(v10);
}
v11 = cocos2d::CCDirector::sharedDirector(v4);
v12 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v11 + 144LL))(v11);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v12, (struct cocos2d::CCObject *)a1);
v13 = *(void (__fastcall ****)(_QWORD, _QWORD, _QWORD, void **))(a1 + 1000);
if ( v13 )
(**v13)(v13, *(unsigned int *)(a1 + 1008), v3, v19);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1104LL))(a1, 0);
if ( *((_QWORD *)&v20 + 1) > 0xFu )
{
v14 = v19[0];
if ( (unsigned __int64)(*((_QWORD *)&v20 + 1) + 1LL) >= 0x1000 )
{
v14 = *((void **)v19[0] - 1);
if ( (unsigned __int64)((char *)v19[0] - (char *)v14 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v14);
}
}