{"type": "func", "start": 4300270512, "end": 4300270809, "name": "FindBPMLayer::init", "pseudocode": "// \n// FindBPMLayer::init from 0x10050ebb0 to 0x10050ecd9 (297 bytes)\n// \n// 1 xrefs:\n// > sub_10050EB50 @ 0x10050eb75\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:31:35 +0000\n// \n\n__int64 __fastcall FindBPMLayer::init(__int64 a1, int a2)\n{\n  __int64 result; // rax\n  unsigned int v4; // r12d\n  __int64 v5; // rax\n  __int64 v6; // rax\n  __int64 v7; // r14\n  __int64 v8; // rdi\n  __int64 v9; // rax\n  __int64 SongInfoObject; // rax\n  __int64 v11; // r14\n  __int64 v12; // rax\n  __int64 CString; // rax\n  float v14; // [rsp+0h] [rbp-30h] BYREF\n  __int64 v15; // [rsp+8h] [rbp-28h] BYREF\n\n  result = CreateGuidelinesLayer::init(a1, 0, 1);\n  if ( (_BYTE)result )\n  {\n    v4 = result;\n    *(_DWORD *)(a1 + 760) = a2;\n    v5 = cocos2d::CCDirector::sharedDirector();\n    cocos2d::CCDirector::getWinSize(&v15, v5);\n    v6 = cocos2d::CCLabelBMFont::create_3(\"BPM\", \"bigFont.fnt\");\n    *(_QWORD *)(a1 + 768) = v6;\n    (*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 464LL))(*(_QWORD *)(a1 + 584), v6, 1);\n    v7 = *(_QWORD *)(a1 + 768);\n    sub_100278250(&v14, *(float *)&v15 * 0.5, 0.5 * *((float *)&v15 + 1));\n    (*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v7 + 184LL))(v7, &v14);\n    v8 = *(_QWORD *)(a1 + 696);\n    sub_1007FEBF0(v8, *(_QWORD *)(a1 + 768));\n    v9 = MusicDownloadManager::sharedState(v8);\n    SongInfoObject = MusicDownloadManager::getSongInfoObject(v9, *(unsigned int *)(a1 + 760));\n    if ( SongInfoObject )\n    {\n      if ( *(int *)(SongInfoObject + 444) > 0 )\n      {\n        v11 = *(_QWORD *)(a1 + 704);\n        v12 = sub_10088E820(\"BPM: %i\", SLOBYTE(v14));\n        CString = cocos2d::CCString::getCString(v12);\n        (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v11 + 928LL))(v11, CString);\n      }\n    }\n    CreateGuidelinesLayer::toggleItems(a1, 0);\n    return v4;\n  }\n  return result;\n}", "assembly": "; \n; FindBPMLayer::init from 0x10050ebb0 to 0x10050ecd9 (297 bytes)\n; \n; 1 xrefs:\n; > sub_10050EB50 @ 0x10050eb75\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:31:35 +0000\n; \npush    rbp                                                            ; +0x0, 0x10050ebb0\nmov     rbp, rsp                                                       ; +0x1, 0x10050ebb1\npush    r15                                                            ; +0x4, 0x10050ebb4\npush    r14                                                            ; +0x6, 0x10050ebb6\npush    r12                                                            ; +0x8, 0x10050ebb8\npush    rbx                                                            ; +0xa, 0x10050ebba\nsub     rsp, 10h                                                       ; +0xb, 0x10050ebbb\nmov     r14d, esi                                                      ; +0xf, 0x10050ebbf\nmov     rbx, rdi                                                       ; +0x12, 0x10050ebc2\nxor     esi, esi                                                       ; +0x15, 0x10050ebc5\nmov     edx, 1                                                         ; +0x17, 0x10050ebc7\ncall    CreateGuidelinesLayer__init                                    ; +0x1c, 0x10050ebcc\ntest    al, al                                                         ; +0x21, 0x10050ebd1\njz      loc_10050ECCC                                                  ; +0x23, 0x10050ebd3\nmov     r12d, eax                                                      ; +0x29, 0x10050ebd9\nmov     [rbx+2F8h], r14d                                               ; +0x2c, 0x10050ebdc\ncall    cocos2d__CCDirector__sharedDirector                            ; +0x33, 0x10050ebe3\nlea     rdi, [rbp+var_28]                                              ; +0x38, 0x10050ebe8\nmov     rsi, rax                                                       ; +0x3c, 0x10050ebec\ncall    cocos2d__CCDirector__getWinSize                                ; +0x3f, 0x10050ebef\nlea     rdi, aBpm; \"BPM\"                                               ; +0x44, 0x10050ebf4\nlea     rsi, aBigfontFnt; \"bigFont.fnt\"                                ; +0x4b, 0x10050ebfb\ncall    cocos2d__CCLabelBMFont__create_3                               ; +0x52, 0x10050ec02\nmov     [rbx+300h], rax                                                ; +0x57, 0x10050ec07\nmov     rdi, [rbx+248h]                                                ; +0x5e, 0x10050ec0e\nmov     rcx, [rdi]                                                     ; +0x65, 0x10050ec15\nmov     rsi, rax                                                       ; +0x68, 0x10050ec18\nmov     edx, 1                                                         ; +0x6b, 0x10050ec1b\ncall    qword ptr [rcx+1D0h]                                           ; +0x70, 0x10050ec20\nmov     r14, [rbx+300h]                                                ; +0x76, 0x10050ec26\nmovss   xmm1, cs:dword_100A03578                                       ; +0x7d, 0x10050ec2d\nmovss   xmm0, [rbp+var_28]                                             ; +0x85, 0x10050ec35\nmulss   xmm0, xmm1                                                     ; +0x8a, 0x10050ec3a\nmulss   xmm1, [rbp+var_24]                                             ; +0x8e, 0x10050ec3e\nlea     r15, [rbp+var_30]                                              ; +0x93, 0x10050ec43\nmov     rdi, r15                                                       ; +0x97, 0x10050ec47\ncall    sub_100278250                                                  ; +0x9a, 0x10050ec4a\nmov     rax, [r14]                                                     ; +0x9f, 0x10050ec4f\nmov     rdi, r14                                                       ; +0xa2, 0x10050ec52\nmov     rsi, r15                                                       ; +0xa5, 0x10050ec55\ncall    qword ptr [rax+0B8h]                                           ; +0xa8, 0x10050ec58\nmov     rdi, [rbx+2B8h]                                                ; +0xae, 0x10050ec5e\nmov     rsi, [rbx+300h]                                                ; +0xb5, 0x10050ec65\ncall    sub_1007FEBF0                                                  ; +0xbc, 0x10050ec6c\ncall    MusicDownloadManager__sharedState                              ; +0xc1, 0x10050ec71\nmov     esi, [rbx+2F8h]                                                ; +0xc6, 0x10050ec76\nmov     rdi, rax                                                       ; +0xcc, 0x10050ec7c\ncall    MusicDownloadManager__getSongInfoObject                        ; +0xcf, 0x10050ec7f\ntest    rax, rax                                                       ; +0xd4, 0x10050ec84\njz      short loc_10050ECBF                                            ; +0xd7, 0x10050ec87\nmov     esi, [rax+1BCh]                                                ; +0xd9, 0x10050ec89\ntest    esi, esi                                                       ; +0xdf, 0x10050ec8f\njle     short loc_10050ECBF                                            ; +0xe1, 0x10050ec91\nmov     r14, [rbx+2C0h]                                                ; +0xe3, 0x10050ec93\nlea     rdi, aBpmI; \"BPM: %i\"                                          ; +0xea, 0x10050ec9a\nxor     eax, eax                                                       ; +0xf1, 0x10050eca1\ncall    sub_10088E820                                                  ; +0xf3, 0x10050eca3\nmov     rdi, rax                                                       ; +0xf8, 0x10050eca8\ncall    cocos2d__CCString__getCString                                  ; +0xfb, 0x10050ecab\nmov     rcx, [r14]                                                     ; +0x100, 0x10050ecb0\nmov     rdi, r14                                                       ; +0x103, 0x10050ecb3\nmov     rsi, rax                                                       ; +0x106, 0x10050ecb6\ncall    qword ptr [rcx+3A0h]                                           ; +0x109, 0x10050ecb9\nmov     rdi, rbx                                                       ; +0x10f, 0x10050ecbf\nxor     esi, esi                                                       ; +0x112, 0x10050ecc2\ncall    CreateGuidelinesLayer__toggleItems                             ; +0x114, 0x10050ecc4\nmov     eax, r12d                                                      ; +0x119, 0x10050ecc9\nadd     rsp, 10h                                                       ; +0x11c, 0x10050eccc\npop     rbx                                                            ; +0x120, 0x10050ecd0\npop     r12                                                            ; +0x121, 0x10050ecd1\npop     r14                                                            ; +0x123, 0x10050ecd3\npop     r15                                                            ; +0x125, 0x10050ecd5\npop     rbp                                                            ; +0x127, 0x10050ecd7\nretn                                                                   ; +0x128, 0x10050ecd8", "xrefs": ["sub_10050EB50 @ 0x10050eb75"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}