{"type": "func", "start": 6031172, "end": 6031564, "name": "CreateGuidelinesLayer::onRecord", "pseudocode": "// \n// CreateGuidelinesLayer::onRecord from 0x5c0744 to 0x5c08cc (392 bytes)\n// \n// 3 xrefs:\n// > FindBPMLayer::onRecord @ 0x5c08e0\n// > <???> @ 0x958f8\n// > <???> @ 0x11463c0\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid CreateGuidelinesLayer::onRecord(CreateGuidelinesLayer *a1, cocos2d::CCObject *a2)\n{\n  float v3; // s8\n  char *v4; // x0\n  cocos2d::CCSprite *m_circleSprite; // x0\n  void (__fastcall *setColor)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // x2\n  unsigned int *v7; // x2\n  int v8; // w1\n  char *v9; // [xsp+40h] [xbp+40h] BYREF\n\n  a1->m_offsetInput->onClickTrackNode(a1->m_offsetInput, 0);\n  CCTextInputNode::getString(a1->m_offsetInput, (__int64)&v9);\n  v3 = atof(v9);\n  v4 = v9 - 24;\n  if ( v9 - 24 != (char *)&qword_124B6B0 )\n  {\n    if ( &pthread_create )\n    {\n      v7 = (unsigned int *)(v9 - 8);\n      do\n        v8 = __ldaxr(v7);\n      while ( __stlxr(v8 - 1, v7) );\n    }\n    else\n    {\n      v8 = *((_DWORD *)v9 - 2);\n      *((_DWORD *)v9 - 2) = v8 - 1;\n    }\n    if ( v8 <= 0 )\n      operator delete(v4);\n  }\n  CreateGuidelinesLayer::toggleItems(a1, 1);\n  a1->m_offsetInput->setTouchEnabled(a1->m_offsetInput, 0);\n  a1->m_elapsed = v3;\n  sub_D1798C(&a1->m_guidelineString, &byte_F288A0, 0);\n  a1->m_guidelines = 0;\n  m_circleSprite = a1->m_circleSprite;\n  setColor = m_circleSprite->setColor;\n  LOBYTE(v9) = -1;\n  *(_WORD *)((char *)&v9 + 1) = 150;\n  setColor(m_circleSprite, (const cocos2d::ccColor3B *)&v9);\n  a1->m_circleSprite->setScale(a1->m_circleSprite, 0.8);\n  a1->playMusic(a1);\n  a1->m_recording = 1;\n  cocos2d::CCNode::scheduleUpdate(a1);\n}", "assembly": "; \n; CreateGuidelinesLayer::onRecord from 0x5c0744 to 0x5c08cc (392 bytes)\n; \n; 3 xrefs:\n; > FindBPMLayer::onRecord @ 0x5c08e0\n; > <???> @ 0x958f8\n; > <???> @ 0x11463c0\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nSTP             X29, X30, [SP,#var_50]!                                ; +0x0, 0x5c0744\nMOV             W1, #0                                                 ; +0x4, 0x5c0748\nMOV             X29, SP                                                ; +0x8, 0x5c074c\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0xc, 0x5c0750\nLDR             X2, [X0,#0x288]                                        ; +0x10, 0x5c0754\nADRP            X20, #__stack_chk_guard_ptr@PAGE                       ; +0x14, 0x5c0758\nMOV             X19, X0                                                ; +0x18, 0x5c075c\nSTR             X21, [SP,#0x50+var_30]                                 ; +0x1c, 0x5c0760\nMOV             X0, X2                                                 ; +0x20, 0x5c0764\nADD             X21, X29, #0x50+var_10                                 ; +0x24, 0x5c0768\nLDR             X3, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x28, 0x5c076c\nLDR             X2, [X2]                                               ; +0x2c, 0x5c0770\nSTR             D8, [SP,#0x50+var_28]                                  ; +0x30, 0x5c0774\nLDR             X3, [X3]                                               ; +0x34, 0x5c0778\nLDR             X2, [X2,#0x478]                                        ; +0x38, 0x5c077c\nSTR             X3, [X29,#0x50+var_8]                                  ; +0x3c, 0x5c0780\nBLR             X2                                                     ; +0x40, 0x5c0784\nLDR             X0, [X19,#0x288]; this                                 ; +0x44, 0x5c0788\nMOV             X8, X21                                                ; +0x48, 0x5c078c\nBL              _ZN15CCTextInputNode9getStringEv; CCTextInputNode::getString(void) ; +0x4c, 0x5c0790\nLDR             X0, [X29,#0x50+var_10]; char *                         ; +0x50, 0x5c0794\nBL              .atof                                                  ; +0x54, 0x5c0798\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x58, 0x5c079c\nLDR             X2, [X29,#0x50+var_10]                                 ; +0x5c, 0x5c07a0\nFCVT            S8, D0                                                 ; +0x60, 0x5c07a4\nSUB             X0, X2, #0x18; p                                       ; +0x64, 0x5c07a8\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x68, 0x5c07ac\nCMP             X0, X1                                                 ; +0x6c, 0x5c07b0\nB.NE            loc_5C0884                                             ; +0x70, 0x5c07b4\nMOV             X0, X19; this                                          ; +0x74, 0x5c07b8\nMOV             W1, #1; bool                                           ; +0x78, 0x5c07bc\nBL              _ZN21CreateGuidelinesLayer11toggleItemsEb; CreateGuidelinesLayer::toggleItems(bool) ; +0x7c, 0x5c07c0\nLDR             X2, [X19,#0x288]                                       ; +0x80, 0x5c07c4\nMOV             W1, #0                                                 ; +0x84, 0x5c07c8\nMOV             X0, X2                                                 ; +0x88, 0x5c07cc\nLDR             X2, [X2]                                               ; +0x8c, 0x5c07d0\nLDR             X2, [X2,#0x3D8]                                        ; +0x90, 0x5c07d4\nBLR             X2                                                     ; +0x94, 0x5c07d8\nADRP            X1, #byte_F288A0@PAGE                                  ; +0x98, 0x5c07dc\nMOV             X2, #0                                                 ; +0x9c, 0x5c07e0\nADD             X1, X1, #byte_F288A0@PAGEOFF                           ; +0xa0, 0x5c07e4\nADD             X0, X19, #0x2C0                                        ; +0xa4, 0x5c07e8\nSTR             S8, [X19,#0x2B0]                                       ; +0xa8, 0x5c07ec\nBL              sub_D1798C                                             ; +0xac, 0x5c07f0\nSTR             WZR, [X19,#0x2B8]                                      ; +0xb0, 0x5c07f4\nLDR             X2, [X19,#0x2A8]                                       ; +0xb4, 0x5c07f8\nMOV             W3, #0xFFFFFFFF                                        ; +0xb8, 0x5c07fc\nMOV             X1, X21                                                ; +0xbc, 0x5c0800\nMOV             X0, X2                                                 ; +0xc0, 0x5c0804\nLDR             X2, [X2]                                               ; +0xc4, 0x5c0808\nLDR             X2, [X2,#0x3B0]                                        ; +0xc8, 0x5c080c\nSTRB            W3, [X29,#0x50+var_10]                                 ; +0xcc, 0x5c0810\nMOV             W3, #0xFFFFFF96                                        ; +0xd0, 0x5c0814\nSTRB            WZR, [X29,#0x50+var_10+2]                              ; +0xd4, 0x5c0818\nSTRB            W3, [X29,#0x50+var_10+1]                               ; +0xd8, 0x5c081c\nBLR             X2                                                     ; +0xdc, 0x5c0820\nLDR             X1, [X19,#0x2A8]                                       ; +0xe0, 0x5c0824\nLDR             S0, =0x3F4CCCCD                                        ; +0xe4, 0x5c0828\nMOV             X0, X1                                                 ; +0xe8, 0x5c082c\nLDR             X1, [X1]                                               ; +0xec, 0x5c0830\nLDR             X1, [X1,#0xA0]                                         ; +0xf0, 0x5c0834\nBLR             X1                                                     ; +0xf4, 0x5c0838\nLDR             X1, [X19]                                              ; +0xf8, 0x5c083c\nMOV             X0, X19                                                ; +0xfc, 0x5c0840\nLDR             X1, [X1,#0x528]                                        ; +0x100, 0x5c0844\nBLR             X1                                                     ; +0x104, 0x5c0848\nMOV             W1, #1                                                 ; +0x108, 0x5c084c\nMOV             X0, X19; this                                          ; +0x10c, 0x5c0850\nSTRB            W1, [X19,#0x2B4]                                       ; +0x110, 0x5c0854\nBL              _ZN7cocos2d6CCNode14scheduleUpdateEv; cocos2d::CCNode::scheduleUpdate(void) ; +0x114, 0x5c0858\nLDR             X20, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x118, 0x5c085c\nLDR             X1, [X29,#0x50+var_8]                                  ; +0x11c, 0x5c0860\nLDR             X0, [X20]                                              ; +0x120, 0x5c0864\nCMP             X1, X0                                                 ; +0x124, 0x5c0868\nB.NE            loc_5C08C8                                             ; +0x128, 0x5c086c\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0x12c, 0x5c0870\nLDR             X21, [SP,#0x50+var_30]                                 ; +0x130, 0x5c0874\nLDR             D8, [SP,#0x50+var_28]                                  ; +0x134, 0x5c0878\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0x138, 0x5c087c\nRET                                                                    ; +0x13c, 0x5c0880\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0x140, 0x5c0884\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0x144, 0x5c0888\nCBZ             X1, loc_5C08B8                                         ; +0x148, 0x5c088c\nSUB             X2, X2, #8                                             ; +0x14c, 0x5c0890\nLDAXR           W1, [X2]                                               ; +0x150, 0x5c0894\nSUB             W3, W1, #1                                             ; +0x154, 0x5c0898\nSTLXR           W4, W3, [X2]                                           ; +0x158, 0x5c089c\nCBNZ            W4, loc_5C0894                                         ; +0x15c, 0x5c08a0\nCMP             W1, WZR                                                ; +0x160, 0x5c08a4\nB.GT            loc_5C07B8                                             ; +0x164, 0x5c08a8\nADD             X1, X29, #0x50+var_18                                  ; +0x168, 0x5c08ac\nBL              j__ZdlPv; operator delete(void *)                      ; +0x16c, 0x5c08b0\nB               loc_5C07B8                                             ; +0x170, 0x5c08b4\nLDUR            W1, [X2,#-8]                                           ; +0x174, 0x5c08b8\nSUB             W3, W1, #1                                             ; +0x178, 0x5c08bc\nSTUR            W3, [X2,#-8]                                           ; +0x17c, 0x5c08c0\nB               loc_5C08A4                                             ; +0x180, 0x5c08c4\nBL              .__stack_chk_fail                                      ; +0x184, 0x5c08c8", "xrefs": ["FindBPMLayer::onRecord @ 0x5c08e0", "<???> @ 0x958f8", "<???> @ 0x11463c0"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}