{"type": "func", "start": 8777564, "end": 8777804, "name": "GJBaseGameLayer::positionForShaderTarget", "pseudocode": "// \n// GJBaseGameLayer::positionForShaderTarget from 0x85ef5c to 0x85f04c (240 bytes)\n// \n// 8 xrefs:\n// > GJBaseGameLayer::updateShaderLayer @ 0x85f2b8\n// > GJBaseGameLayer::updateShaderLayer @ 0x85f2e8\n// > GJBaseGameLayer::updateShaderLayer @ 0x85f314\n// > GJBaseGameLayer::updateShaderLayer @ 0x85fa00\n// > GJBaseGameLayer::updateShaderLayer @ 0x85fa28\n// > GJBaseGameLayer::updateShaderLayer @ 0x85fa50\n// > GJBaseGameLayer::updateShaderLayer @ 0x85fa78\n// > <???> @ 0x73968\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::positionForShaderTarget(GJBaseGameLayer *a1, int a2)\n{\n  cocos2d::CCPoint *v2; // x8\n  cocos2d::CCPoint *v4; // x20\n  GameObject *MainObject; // x0\n  float v6; // s0\n  float v7; // s1\n  PlayerObject *m_player2; // x1\n  float v11; // s0\n  float v12; // s1\n  cocos2d::CCPoint v14; // [xsp+40h] [xbp+40h] BYREF\n  cocos2d::CCPoint result; // 0:s0.4,4:s1.4\n\n  v4 = v2;\n  cocos2d::CCPoint::CCPoint(v2);\n  if ( a2 == -1 )\n    goto LABEL_10;\n  if ( a2 == -2 )\n  {\n    if ( a1->m_gameState.m_isDualMode )\n    {\n      m_player2 = a1->m_player2;\nLABEL_9:\n      v11 = ((float (__fastcall *)(PlayerObject *))m_player2->getPosition)(m_player2);\n      cocos2d::CCPoint::operator=(v4, v11, v12);\n      return result;\n    }\nLABEL_10:\n    m_player2 = a1->m_player1;\n    goto LABEL_9;\n  }\n  MainObject = GJBaseGameLayer::tryGetMainObject(a1, a2);\n  if ( MainObject )\n    MainObject->getRealPosition((GameObject *)&v14);\n  else\n    cocos2d::CCPoint::CCPoint(&v14, &stru_1242DA8);\n  cocos2d::CCPoint::operator=(v4, v6, v7);\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::positionForShaderTarget from 0x85ef5c to 0x85f04c (240 bytes)\n; \n; 8 xrefs:\n; > GJBaseGameLayer::updateShaderLayer @ 0x85f2b8\n; > GJBaseGameLayer::updateShaderLayer @ 0x85f2e8\n; > GJBaseGameLayer::updateShaderLayer @ 0x85f314\n; > GJBaseGameLayer::updateShaderLayer @ 0x85fa00\n; > GJBaseGameLayer::updateShaderLayer @ 0x85fa28\n; > GJBaseGameLayer::updateShaderLayer @ 0x85fa50\n; > GJBaseGameLayer::updateShaderLayer @ 0x85fa78\n; > <???> @ 0x73968\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, 0x85ef5c\nMOV             X29, SP                                                ; +0x4, 0x85ef60\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0x8, 0x85ef64\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x85ef68\nSTR             X21, [SP,#0x50+var_30]                                 ; +0x10, 0x85ef6c\nMOV             X21, X0                                                ; +0x14, 0x85ef70\nMOV             X0, X8; this                                           ; +0x18, 0x85ef74\nSTR             X1, [X29,#0x50+var_18]                                 ; +0x1c, 0x85ef78\nMOV             X20, X8                                                ; +0x20, 0x85ef7c\nLDR             X2, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x24, 0x85ef80\nLDR             X2, [X2]                                               ; +0x28, 0x85ef84\nSTR             X2, [X29,#0x50+var_8]                                  ; +0x2c, 0x85ef88\nBL              _ZN7cocos2d7CCPointC1Ev; cocos2d::CCPoint::CCPoint(void) ; +0x30, 0x85ef8c\nLDR             X1, [X29,#0x50+var_18]; int                            ; +0x34, 0x85ef90\nCMN             W1, #1                                                 ; +0x38, 0x85ef94\nB.EQ            loc_85F024                                             ; +0x3c, 0x85ef98\nCMN             W1, #2                                                 ; +0x40, 0x85ef9c\nB.EQ            loc_85EFF8                                             ; +0x44, 0x85efa0\nMOV             X0, X21; this                                          ; +0x48, 0x85efa4\nBL              _ZN15GJBaseGameLayer16tryGetMainObjectEi; GJBaseGameLayer::tryGetMainObject(int) ; +0x4c, 0x85efa8\nCBZ             X0, loc_85F02C                                         ; +0x50, 0x85efac\nLDR             X1, [X0]                                               ; +0x54, 0x85efb0\nADD             X21, X29, #0x50+var_10                                 ; +0x58, 0x85efb4\nMOV             X8, X21                                                ; +0x5c, 0x85efb8\nLDR             X1, [X1,#0x540]                                        ; +0x60, 0x85efbc\nBLR             X1                                                     ; +0x64, 0x85efc0\nMOV             X0, X20                                                ; +0x68, 0x85efc4\nMOV             X1, X21                                                ; +0x6c, 0x85efc8\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x70, 0x85efcc\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x74, 0x85efd0\nMOV             X0, X20                                                ; +0x78, 0x85efd4\nLDR             X2, [X29,#0x50+var_8]                                  ; +0x7c, 0x85efd8\nLDR             X1, [X19]                                              ; +0x80, 0x85efdc\nCMP             X2, X1                                                 ; +0x84, 0x85efe0\nB.NE            loc_85F048                                             ; +0x88, 0x85efe4\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0x8c, 0x85efe8\nLDR             X21, [SP,#0x50+var_30]                                 ; +0x90, 0x85efec\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0x94, 0x85eff0\nRET                                                                    ; +0x98, 0x85eff4\nLDRB            W0, [X21,#0x412]                                       ; +0x9c, 0x85eff8\nCBZ             W0, loc_85F024                                         ; +0xa0, 0x85effc\nLDR             X1, [X21,#0xE00]                                       ; +0xa4, 0x85f000\nMOV             X0, X1                                                 ; +0xa8, 0x85f004\nLDR             X1, [X1]                                               ; +0xac, 0x85f008\nLDR             X1, [X1,#0xC0]                                         ; +0xb0, 0x85f00c\nBLR             X1                                                     ; +0xb4, 0x85f010\nMOV             X1, X0                                                 ; +0xb8, 0x85f014\nMOV             X0, X20                                                ; +0xbc, 0x85f018\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0xc0, 0x85f01c\nB               loc_85EFD0                                             ; +0xc4, 0x85f020\nLDR             X1, [X21,#0xDF8]                                       ; +0xc8, 0x85f024\nB               loc_85F004                                             ; +0xcc, 0x85f028\nADRP            X1, #qword_1242DA0@PAGE                                ; +0xd0, 0x85f02c\nADD             X21, X29, #0x50+var_10                                 ; +0xd4, 0x85f030\nADD             X1, X1, #qword_1242DA0@PAGEOFF                         ; +0xd8, 0x85f034\nMOV             X0, X21; this                                          ; +0xdc, 0x85f038\nADD             X1, X1, #8; cocos2d::CCPoint *                         ; +0xe0, 0x85f03c\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0xe4, 0x85f040\nB               loc_85EFC4                                             ; +0xe8, 0x85f044\nBL              .__stack_chk_fail                                      ; +0xec, 0x85f048", "xrefs": ["GJBaseGameLayer::updateShaderLayer @ 0x85f2b8", "GJBaseGameLayer::updateShaderLayer @ 0x85f2e8", "GJBaseGameLayer::updateShaderLayer @ 0x85f314", "GJBaseGameLayer::updateShaderLayer @ 0x85fa00", "GJBaseGameLayer::updateShaderLayer @ 0x85fa28", "GJBaseGameLayer::updateShaderLayer @ 0x85fa50", "GJBaseGameLayer::updateShaderLayer @ 0x85fa78", "<???> @ 0x73968"], "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"}