{"type": "func", "start": 9579644, "end": 9579968, "name": "GJPFollowCommandLayer::updateOffsetLabel", "pseudocode": "// \n// GJPFollowCommandLayer::updateOffsetLabel from 0x922c7c to 0x922dc0 (324 bytes)\n// \n// 2 xrefs:\n// > GJPFollowCommandLayer::init @ 0x924320\n// > <???> @ 0x72bb8\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 GJPFollowCommandLayer::updateOffsetLabel(GJPFollowCommandLayer *a1)\n{\n  const char *m_offset; // x1\n  cocos2d::CCString *v3; // x0\n  char *CString; // x1\n  CCTextInputNode *m_offsetInput; // x22\n  unsigned __int8 *v6; // x0\n  unsigned int *v7; // x2\n  int v8; // w1\n  const unsigned __int8 *v9; // [xsp+40h] [xbp+40h] BYREF\n\n  m_offset = (const char *)(unsigned int)a1->m_offset;\n  a1->m_disableTextDelegate = 1;\n  if ( (_DWORD)m_offset == -99999 )\n  {\n    CString = &byte_F288A0;\n  }\n  else\n  {\n    LODWORD(m_offset) = vcvtms_s32_f32((float)(int)m_offset / 3.0);\n    v3 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)\"%i\", m_offset);\n    CString = (char *)cocos2d::CCString::getCString(v3);\n  }\n  m_offsetInput = a1->m_offsetInput;\n  sub_D153B8((int)&v9, CString);\n  CCTextInputNode::setString(m_offsetInput, &v9);\n  v6 = (unsigned __int8 *)(v9 - 24);\n  if ( v9 - 24 != (const unsigned __int8 *)&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(v6);\n  }\n  a1->m_disableTextDelegate = 0;\n}", "assembly": "; \n; GJPFollowCommandLayer::updateOffsetLabel from 0x922c7c to 0x922dc0 (324 bytes)\n; \n; 2 xrefs:\n; > GJPFollowCommandLayer::init @ 0x924320\n; > <???> @ 0x72bb8\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, 0x922c7c\nMOV             W3, #1                                                 ; +0x4, 0x922c80\nMOV             X29, SP                                                ; +0x8, 0x922c84\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0xc, 0x922c88\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x922c8c\nMOV             X20, X0                                                ; +0x14, 0x922c90\nMOV             W0, #0x7961                                            ; +0x18, 0x922c94\nSTP             X21, X22, [SP,#0x50+var_30]                            ; +0x1c, 0x922c98\nLDR             X2, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x20, 0x922c9c\nMOVK            W0, #0xFFFE,LSL#16                                     ; +0x24, 0x922ca0\nLDR             W1, [X20,#0x418]                                       ; +0x28, 0x922ca4\nSTRB            W3, [X20,#0x2CC]                                       ; +0x2c, 0x922ca8\nLDR             X2, [X2]                                               ; +0x30, 0x922cac\nCMP             W1, W0                                                 ; +0x34, 0x922cb0\nSTR             X2, [X29,#0x50+var_8]                                  ; +0x38, 0x922cb4\nB.EQ            loc_922D40                                             ; +0x3c, 0x922cb8\nSCVTF           S0, W1                                                 ; +0x40, 0x922cbc\nADRP            X0, #(aSongidI+8)@PAGE; \"%i\"                           ; +0x44, 0x922cc0\nFMOV            S1, #3.0                                               ; +0x48, 0x922cc4\nADD             X0, X0, #(aSongidI+8)@PAGEOFF; this                    ; +0x4c, 0x922cc8\nFDIV            S0, S0, S1                                             ; +0x50, 0x922ccc\nFCVTMS          W1, S0; char *                                         ; +0x54, 0x922cd0\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x58, 0x922cd4\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x5c, 0x922cd8\nMOV             X1, X0; char *                                         ; +0x60, 0x922cdc\nADD             X21, X29, #0x50+var_10                                 ; +0x64, 0x922ce0\nADD             X2, X29, #0x50+var_20                                  ; +0x68, 0x922ce4\nMOV             X0, X21; int                                           ; +0x6c, 0x922ce8\nLDR             X22, [X20,#0x3F0]                                      ; +0x70, 0x922cec\nBL              sub_D153B8                                             ; +0x74, 0x922cf0\nMOV             X0, X22                                                ; +0x78, 0x922cf4\nMOV             X1, X21                                                ; +0x7c, 0x922cf8\nBL              _ZN15CCTextInputNode9setStringESs; CCTextInputNode::setString(std::string) ; +0x80, 0x922cfc\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x84, 0x922d00\nLDR             X2, [X29,#0x50+var_10]                                 ; +0x88, 0x922d04\nSUB             X0, X2, #0x18; p                                       ; +0x8c, 0x922d08\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x90, 0x922d0c\nCMP             X0, X1                                                 ; +0x94, 0x922d10\nB.NE            loc_922D4C                                             ; +0x98, 0x922d14\nSTRB            WZR, [X20,#0x2CC]                                      ; +0x9c, 0x922d18\nLDR             X1, [X29,#0x50+var_8]                                  ; +0xa0, 0x922d1c\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0xa4, 0x922d20\nLDR             X0, [X19]                                              ; +0xa8, 0x922d24\nCMP             X1, X0                                                 ; +0xac, 0x922d28\nB.NE            loc_922D90                                             ; +0xb0, 0x922d2c\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0xb4, 0x922d30\nLDP             X21, X22, [SP,#0x50+var_30]                            ; +0xb8, 0x922d34\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0xbc, 0x922d38\nRET                                                                    ; +0xc0, 0x922d3c\nADRL            X1, byte_F288A0                                        ; +0xc4, 0x922d40\nB               loc_922CE0                                             ; +0xcc, 0x922d48\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0xd0, 0x922d4c\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0xd4, 0x922d50\nCBZ             X1, loc_922D80                                         ; +0xd8, 0x922d54\nSUB             X2, X2, #8                                             ; +0xdc, 0x922d58\nLDAXR           W1, [X2]                                               ; +0xe0, 0x922d5c\nSUB             W3, W1, #1                                             ; +0xe4, 0x922d60\nSTLXR           W4, W3, [X2]                                           ; +0xe8, 0x922d64\nCBNZ            W4, loc_922D5C                                         ; +0xec, 0x922d68\nCMP             W1, WZR                                                ; +0xf0, 0x922d6c\nB.GT            loc_922D18                                             ; +0xf4, 0x922d70\nADD             X1, X29, #0x50+var_18                                  ; +0xf8, 0x922d74\nBL              j__ZdlPv; operator delete(void *)                      ; +0xfc, 0x922d78\nB               loc_922D18                                             ; +0x100, 0x922d7c\nLDUR            W1, [X2,#-8]                                           ; +0x104, 0x922d80\nSUB             W3, W1, #1                                             ; +0x108, 0x922d84\nSTUR            W3, [X2,#-8]                                           ; +0x10c, 0x922d88\nB               loc_922D6C                                             ; +0x110, 0x922d8c\nBL              .__stack_chk_fail                                      ; +0x114, 0x922d90\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x118, 0x922d94\nMOV             X19, X0                                                ; +0x11c, 0x922d98\nLDR             X0, [X29,#0x50+var_10]                                 ; +0x120, 0x922d9c\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x124, 0x922da0\nSUB             X0, X0, #0x18                                          ; +0x128, 0x922da4\nCMP             X0, X1                                                 ; +0x12c, 0x922da8\nB.EQ            loc_922DB8                                             ; +0x130, 0x922dac\nADD             X1, X29, #0x50+var_18                                  ; +0x134, 0x922db0\nBL              sub_4DCBA0                                             ; +0x138, 0x922db4\nMOV             X0, X19                                                ; +0x13c, 0x922db8\nBL              _Unwind_Resume                                         ; +0x140, 0x922dbc", "xrefs": ["GJPFollowCommandLayer::init @ 0x924320", "<???> @ 0x72bb8"], "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"}