//
// FindBPMLayer::onRecord from 0x14009bad0 to 0x14009bc8a (442 bytes)
//
// 2 xrefs:
// > ??> @ 0x140542478
// > ??> @ 0x1406c7518
//
// 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
//
void FindBPMLayer::onRecord(FindBPMLayer *a1, cocos2d::CCObject *a2)
{
cocos2d::CCLabelProtocol *v3; // rcx
const char *v4; // rax
size_t v5; // r8
const char *v6; // rcx
float v7; // xmm6_4
char *v8; // rcx
cocos2d::CCRGBAProtocol *v9; // rcx
cocos2d::CCLabelProtocol *v10; // rcx
__int16 v11; // [rsp+20h] [rbp-48h] BYREF
char v12; // [rsp+22h] [rbp-46h]
char *String[2]; // [rsp+28h] [rbp-40h] BYREF
__int128 v14; // [rsp+38h] [rbp-30h]
a1->m_offsetInput->onClickTrackNode(a1->m_offsetInput, 0);
v3 = &a1->m_offsetInput->m_textField->cocos2d::CCLabelProtocol;
v4 = v3->getString(v3);
*(_OWORD *)String = 0;
v5 = -1;
v14 = 0;
do
++v5;
while ( v4[v5] );
sub_14003A930(String, v4, v5);
v6 = (const char *)String;
if ( *((_QWORD *)&v14 + 1) > 0xFu )
v6 = String[0];
v7 = atof(v6);
if ( *((_QWORD *)&v14 + 1) > 0xFu )
{
v8 = String[0];
if ( (unsigned __int64)(*((_QWORD *)&v14 + 1) + 1LL) >= 0x1000 )
{
v8 = *((char **)String[0] - 1);
if ( (unsigned __int64)(String[0] - v8 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v8);
}
CreateGuidelinesLayer::toggleItems(a1, 1);
a1->m_offsetInput->setTouchEnabled(a1->m_offsetInput, 0);
a1->m_elapsed = v7;
sub_14003CCE0((void **)&a1->m_guidelineString, byte_140518980, 0);
v9 = &a1->m_circleSprite->cocos2d::CCRGBAProtocol;
a1->m_guidelines = 0;
v11 = -26881;
v12 = 0;
v9->setColor(v9, (const cocos2d::ccColor3B *)&v11);
((void (__fastcall *)(cocos2d::CCSprite *))a1->m_circleSprite->setScale_0)(a1->m_circleSprite);
a1->playMusic(a1);
a1->m_recording = 1;
cocos2d::CCNode::scheduleUpdate(a1);
v10 = &a1->m_bpmLabel->cocos2d::CCLabelProtocol;
*(_QWORD *)&a1->m_startOffset = 0;
v10->setString(v10, (const char *)&word_140533640);
}