//
// DialogLayer::handleDialogTap from 0x1401754e0 to 0x14017565e (382 bytes)
//
// 5 xrefs:
// > DialogLayer::ccTouchBegan @ 0x14017576d
// > DialogLayer::keyDown @ 0x140175cb4
// > ??> @ 0x14089d2f0
// > ??> @ 0x14089d300
// > ??> @ 0x14091844c
//
// 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:27:32 +0000
//
unsigned int __fastcall DialogLayer::handleDialogTap(__int64 a1)
{
unsigned int result; // eax
double v3; // xmm2_8
float v4; // xmm3_4
__int64 v5; // rax
__int64 v6; // rbx
__int64 v7; // rdx
__int64 v8; // rdx
cocos2d::CCArray *v9; // rcx
struct __timeb64 Time; // [rsp+20h] [rbp-28h] BYREF
ftime64(&Time);
result = Time.millitm;
v3 = *(double *)(a1 + 552);
v4 = (double)Time.millitm / 1000.0 + (double)SLODWORD(Time.time) - v3;
if ( v3 <= 0.0 || v4 >= 0.2 || *(_BYTE *)(a1 + 632) || v4 < 0.0 )
{
if ( *(_BYTE *)(a1 + 616) )
{
if ( !*(_BYTE *)(a1 + 617) )
{
v5 = *(_QWORD *)(a1 + 576);
*(_BYTE *)(a1 + 616) = 0;
if ( v5 )
{
*(_QWORD *)(v5 + 712) = 0;
TextArea::stopAllCharacterActions(*(_QWORD *)(a1 + 576));
v6 = *(_QWORD *)(a1 + 576);
TextArea::stopAllCharacterActions(v6);
LOBYTE(v7) = -1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)(v6 + 320) + 40LL))(v6 + 320, v7);
*(_BYTE *)(v6 + 680) = 1;
}
cocos2d::CCNode::stopAllActions(*(cocos2d::CCNode **)(a1 + 608));
LOBYTE(v8) = -1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)(*(_QWORD *)(a1 + 608) + 320LL) + 40LL))(
*(_QWORD *)(a1 + 608) + 320LL,
v8);
return DialogLayer::updateNavButtonFrame(a1);
}
}
else
{
v9 = *(cocos2d::CCArray **)(a1 + 592);
if ( v9 && cocos2d::CCArray::count(v9) )
return DialogLayer::displayNextObject(a1);
else
return DialogLayer::onClose(a1);
}
}
return result;
}