//
// FindBPMLayer::init from 0x3f8cb0 to 0x3f8d94 (228 bytes)
//
// 1 xrefs:
// > FindBPMLayer::create @ 0x3f8e26
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:47:19 +0000
//
GameManager *__fastcall FindBPMLayer::init(FindBPMLayer *this, int a2)
{
GameManager *v4; // r0
GameManager *v5; // r7
const char *v6; // r2
int v7; // r0
int v8; // r8
void (__fastcall *v9)(int, _BYTE *); // r9
MusicDownloadManager *v10; // r0
MusicDownloadManager *v11; // r0
int SongInfoObject; // r0
const char *v13; // r1
int v15; // r5
void (__fastcall *v16)(int, int); // r8
cocos2d::CCString *v17; // r0
int CString; // r0
float v19[2]; // [sp+4h] [bp-18h] BYREF
_BYTE v20[8]; // [sp+Ch] [bp-10h] BYREF
v4 = CreateGuidelinesLayer::init((int)this, 0, 1);
v5 = v4;
if ( v4 )
{
*((_DWORD *)this + 143) = a2;
cocos2d::CCDirector::sharedDirector(v4);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v19);
v7 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"BPM", "bigFont.fnt", v6);
*((_DWORD *)this + 144) = v7;
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v7, 1);
v8 = *((_DWORD *)this + 144);
v9 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v8 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v20, v19[0] * 0.5, v19[1] * 0.5);
v9(v8, v20);
v10 = (MusicDownloadManager *)cocos2d::CCArray::addObject(
*((cocos2d::CCArray **)this + 134),
*((cocos2d::CCObject **)this + 144));
v11 = (MusicDownloadManager *)MusicDownloadManager::sharedState(v10);
SongInfoObject = MusicDownloadManager::getSongInfoObject(v11, *((_DWORD *)this + 143));
if ( SongInfoObject )
{
v13 = *(const char **)(SongInfoObject + 340);
if ( (int)v13 > 0 )
{
v15 = *((_DWORD *)this + 135);
v16 = *(void (__fastcall **)(int, int))(*(_DWORD *)v15 + 464);
v17 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"BPM: %i", v13);
CString = cocos2d::CCString::getCString(v17);
v16(v15, CString);
}
}
CreateGuidelinesLayer::toggleItems((cocos2d::CCArray **)this, 0);
}
return v5;
}