{"type": "func", "start": 4662084, "end": 4662300, "name": "GJBaseGameLayer::speedForShaderTarget", "pseudocode": "// \n// GJBaseGameLayer::speedForShaderTarget from 0x472344 to 0x47241c (216 bytes)\n// \n// 2 xrefs:\n// > GJBaseGameLayer::updateShaderLayer @ 0x472600\n// > GJBaseGameLayer::updateShaderLayer @ 0x47261a\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\ncocos2d::CCPoint *GJBaseGameLayer::speedForShaderTarget(\n        cocos2d::CCPoint *__return_ptr retstr,\n        GJBaseGameLayer *a2,\n        int a3)\n{\n  const cocos2d::CCPoint *v6; // r6\n  PlayerObject *m_player2; // r0\n  const cocos2d::CCPoint *LastPosition; // r0\n  int v9; // r2\n  bool v10; // r3\n  GameObject *MainObject; // r0\n  GameObject *v12; // r5\n  const cocos2d::CCPoint *v13; // r0\n  int v14; // r2\n  bool v15; // r3\n  cocos2d::CCPoint v17; // [sp+4h] [bp-14h] BYREF\n  cocos2d::CCPoint v18; // [sp+Ch] [bp-Ch] BYREF\n\n  cocos2d::CCPoint::CCPoint(retstr);\n  if ( a3 == -1 )\n    goto LABEL_4;\n  if ( a3 == -2 )\n  {\n    if ( a2->m_gameState.m_isDualMode )\n    {\n      v6 = a2->m_player2->getPosition(a2->m_player2);\n      m_player2 = a2->m_player2;\n      goto LABEL_6;\n    }\nLABEL_4:\n    v6 = a2->m_player1->getPosition(a2->m_player1);\n    m_player2 = a2->m_player1;\nLABEL_6:\n    LastPosition = GameObject::getLastPosition(m_player2);\n    cocos2d::CCPoint::operator-(&v18, v6, LastPosition);\nLABEL_9:\n    cocos2d::CCPoint::operator=((PlayerObject *)retstr, COERCE_FLOAT(&v18), v9, v10);\n    return retstr;\n  }\n  if ( a3 <= 0 )\n  {\n    cocos2d::CCPoint::operator-(&v18, &a2->m_gameState.m_cameraStepDiff);\n    goto LABEL_9;\n  }\n  MainObject = GJBaseGameLayer::tryGetMainObject(a2, a3);\n  v12 = MainObject;\n  if ( MainObject )\n  {\n    MainObject->getRealPosition(&v17, MainObject);\n    v13 = GameObject::getLastPosition(v12);\n    cocos2d::CCPoint::operator-(&v18, &v17, v13);\n  }\n  else\n  {\n    cocos2d::CCPoint::CCPoint(&v18, &stru_AC68C0);\n  }\n  cocos2d::CCPoint::operator=((PlayerObject *)retstr, COERCE_FLOAT(&v18), v14, v15);\n  return retstr;\n}", "assembly": "; \n; GJBaseGameLayer::speedForShaderTarget from 0x472344 to 0x47241c (216 bytes)\n; \n; 2 xrefs:\n; > GJBaseGameLayer::updateShaderLayer @ 0x472600\n; > GJBaseGameLayer::updateShaderLayer @ 0x47261a\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\nPUSH.W          {R4-R8,LR}                                             ; +0x0, 0x472344\nSUB             SP, SP, #0x18                                          ; +0x4, 0x472348\nLDR             R7, =(__stack_chk_guard_ptr - 0x472356)                ; +0x6, 0x47234a\nMOV             R6, R2                                                 ; +0x8, 0x47234c\nMOV             R8, R0                                                 ; +0xa, 0x47234e\nMOV             R5, R1                                                 ; +0xc, 0x472350\nADD             R7, PC; __stack_chk_guard_ptr                          ; +0xe, 0x472352\nLDR             R7, [R7]; __stack_chk_guard                            ; +0x10, 0x472354\nADD             R4, SP, #0x18+var_C                                    ; +0x12, 0x472356\nLDR             R3, [R7]                                               ; +0x14, 0x472358\nSTR             R3, [SP,#0x18+var_4]                                   ; +0x16, 0x47235a\nBL              _ZN7cocos2d7CCPointC1Ev; cocos2d::CCPoint::CCPoint(void) ; +0x18, 0x47235c\nADDS            R2, R6, #1                                             ; +0x1c, 0x472360\nBEQ             loc_47236E                                             ; +0x1e, 0x472362\nADDS            R3, R6, #2                                             ; +0x20, 0x472364\nBNE             loc_4723A0                                             ; +0x22, 0x472366\nLDRB.W          R3, [R5,#0x372]                                        ; +0x24, 0x472368\nCBNZ            R3, loc_472380                                         ; +0x28, 0x47236c\nLDR.W           R0, [R5,#0x8B8]                                        ; +0x2a, 0x47236e\nLDR             R3, [R0]                                               ; +0x2e, 0x472372\nLDR             R3, [R3,#0x60]                                         ; +0x30, 0x472374\nBLX             R3                                                     ; +0x32, 0x472376\nMOV             R6, R0                                                 ; +0x34, 0x472378\nLDR.W           R0, [R5,#0x8B8]                                        ; +0x36, 0x47237a\nB               loc_472390                                             ; +0x3a, 0x47237e\nLDR.W           R0, [R5,#0x8BC]                                        ; +0x3c, 0x472380\nLDR             R3, [R0]                                               ; +0x40, 0x472384\nLDR             R3, [R3,#0x60]                                         ; +0x42, 0x472386\nBLX             R3                                                     ; +0x44, 0x472388\nMOV             R6, R0                                                 ; +0x46, 0x47238a\nLDR.W           R0, [R5,#0x8BC]; this                                  ; +0x48, 0x47238c\nBL              _ZN10GameObject15getLastPositionEv; GameObject::getLastPosition(void) ; +0x4c, 0x472390\nMOV             R1, R6                                                 ; +0x50, 0x472394\nMOV             R2, R0                                                 ; +0x52, 0x472396\nMOV             R0, R4                                                 ; +0x54, 0x472398\nBL              _ZNK7cocos2d7CCPointmiERKS0_; cocos2d::CCPoint::operator-(cocos2d::CCPoint const&) ; +0x56, 0x47239a\nB               loc_4723AE                                             ; +0x5a, 0x47239e\nCMP             R6, #0                                                 ; +0x5c, 0x4723a0\nBGT             loc_4723B8                                             ; +0x5e, 0x4723a2\nMOV             R0, R4                                                 ; +0x60, 0x4723a4\nADD.W           R1, R5, #0x3D8                                         ; +0x62, 0x4723a6\nBL              _ZNK7cocos2d7CCPointngEv; cocos2d::CCPoint::operator-(void) ; +0x66, 0x4723aa\nMOV             R0, R8                                                 ; +0x6a, 0x4723ae\nMOV             R1, R4                                                 ; +0x6c, 0x4723b0\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x6e, 0x4723b2\nB               loc_472408                                             ; +0x72, 0x4723b6\nMOV             R0, R5; this                                           ; +0x74, 0x4723b8\nMOV             R1, R6; int                                            ; +0x76, 0x4723ba\nBL              _ZN15GJBaseGameLayer16tryGetMainObjectEi; GJBaseGameLayer::tryGetMainObject(int) ; +0x78, 0x4723bc\nMOV             R5, R0                                                 ; +0x7c, 0x4723c0\nCBZ             R0, loc_4723E8                                         ; +0x7e, 0x4723c2\nLDR             R3, [R0]                                               ; +0x80, 0x4723c4\nADD             R6, SP, #0x18+var_14                                   ; +0x82, 0x4723c6\nMOV             R1, R5                                                 ; +0x84, 0x4723c8\nMOV             R0, R6                                                 ; +0x86, 0x4723ca\nLDR.W           R3, [R3,#0x2A0]                                        ; +0x88, 0x4723cc\nBLX             R3                                                     ; +0x8c, 0x4723d0\nMOV             R0, R5; this                                           ; +0x8e, 0x4723d2\nBL              _ZN10GameObject15getLastPositionEv; GameObject::getLastPosition(void) ; +0x90, 0x4723d4\nMOV             R2, R0                                                 ; +0x94, 0x4723d8\nMOV             R1, R6                                                 ; +0x96, 0x4723da\nMOV             R0, R4                                                 ; +0x98, 0x4723dc\nBL              _ZNK7cocos2d7CCPointmiERKS0_; cocos2d::CCPoint::operator-(cocos2d::CCPoint const&) ; +0x9a, 0x4723de\nB               loc_4723F8                                             ; +0x9e, 0x4723e2\nB               loc_472404                                             ; +0xa0, 0x4723e4\nB               loc_472404                                             ; +0xa2, 0x4723e6\nLDR             R1, =(qword_AC68B8 - 0x4723F0)                         ; +0xa4, 0x4723e8\nMOV             R0, R4; this                                           ; +0xa6, 0x4723ea\nADD             R1, PC; qword_AC68B8                                   ; +0xa8, 0x4723ec\nADDS            R1, #(stru_AC68C0 - 0xAC68B8); cocos2d::CCPoint *      ; +0xaa, 0x4723ee\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0xac, 0x4723f0\nB               loc_4723F8                                             ; +0xb0, 0x4723f4\nB               loc_472404                                             ; +0xb2, 0x4723f6\nMOV             R0, R8                                                 ; +0xb4, 0x4723f8\nMOV             R1, R4                                                 ; +0xb6, 0x4723fa\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0xb8, 0x4723fc\nB               loc_472408                                             ; +0xbc, 0x472400\nB               loc_472404                                             ; +0xbe, 0x472402\nBL              __cxa_end_cleanup                                      ; +0xc0, 0x472404\nLDR             R2, [SP,#0x18+var_4]                                   ; +0xc4, 0x472408\nMOV             R0, R8                                                 ; +0xc6, 0x47240a\nLDR             R3, [R7]                                               ; +0xc8, 0x47240c\nCMP             R2, R3                                                 ; +0xca, 0x47240e\nBEQ             loc_472416                                             ; +0xcc, 0x472410\nBLX             __stack_chk_fail                                       ; +0xce, 0x472412\nADD             SP, SP, #0x18                                          ; +0xd2, 0x472416\nPOP.W           {R4-R8,PC}                                             ; +0xd4, 0x472418", "xrefs": ["GJBaseGameLayer::updateShaderLayer @ 0x472600", "GJBaseGameLayer::updateShaderLayer @ 0x47261a"], "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"}