{"type": "func", "start": 8781000, "end": 8781380, "name": "GJBaseGameLayer::resetPlayer", "pseudocode": "// \n// GJBaseGameLayer::resetPlayer from 0x85fcc8 to 0x85fe44 (380 bytes)\n// \n// 4 xrefs:\n// > PlayLayer::setupHasCompleted @ 0x5dc4d4\n// > LevelEditorLayer::onPlaytest @ 0x664344\n// > GJBaseGameLayer::resetLevelVariables @ 0x88b00c\n// > <???> @ 0x61b18\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 GJBaseGameLayer::resetPlayer(GJBaseGameLayer *a1)\n{\n  StartPosObject *m_startPosObject; // x0\n  float v3; // s0\n  float v4; // s1\n  PlayerObject *m_player1; // x23\n  void (__fastcall *setStartPos)(GameObject *__hidden, cocos2d::CCPoint); // x24\n  PlayerObject *m_player2; // x23\n  void (__fastcall *v8)(GameObject *__hidden, cocos2d::CCPoint); // x22\n  LevelSettingsObject *m_levelSettings; // x1\n  PlayerObject *v10; // x3\n  int m_spawnGroup; // w1\n  GameObject *Object; // x0\n  float v13; // s0\n  float v14; // s1\n  cocos2d::CCPoint v15; // [xsp+48h] [xbp+48h] BYREF\n  cocos2d::CCPoint v16; // [xsp+50h] [xbp+50h] BYREF\n\n  cocos2d::CCPoint::CCPoint(&v15, 0.0, 105.0);\n  m_startPosObject = a1->m_startPosObject;\n  if ( m_startPosObject )\n  {\n    v3 = ((float (__fastcall *)(StartPosObject *))m_startPosObject->getPosition)(m_startPosObject);\n    cocos2d::CCPoint::operator=(&v15, v3, v4);\n  }\n  else\n  {\n    m_spawnGroup = a1->m_levelSettings->m_spawnGroup;\n    if ( m_spawnGroup > 0 )\n    {\n      Object = GJBaseGameLayer::tryGetObject(a1, m_spawnGroup);\n      if ( Object )\n      {\n        Object->getRealPosition((GameObject *)&v16);\n        cocos2d::CCPoint::operator=(&v15, v13, v14);\n        if ( !a1->m_levelSettings->m_platformerMode )\n          v15.x = 0.0;\n      }\n    }\n  }\n  m_player1 = a1->m_player1;\n  setStartPos = m_player1->setStartPos;\n  cocos2d::CCPoint::CCPoint(&v16, &v15);\n  ((void (__fastcall *)(PlayerObject *, cocos2d::CCPoint *))setStartPos)(m_player1, &v16);\n  a1->m_player1->resetObject(a1->m_player1);\n  m_player2 = a1->m_player2;\n  v8 = m_player2->setStartPos;\n  cocos2d::CCPoint::CCPoint(&v16, &v15);\n  ((void (__fastcall *)(PlayerObject *, cocos2d::CCPoint *))v8)(m_player2, &v16);\n  a1->m_player2->resetObject(a1->m_player2);\n  m_levelSettings = a1->m_levelSettings;\n  v10 = a1->m_player2;\n  a1->m_player1->m_decreaseBoostSlide = !m_levelSettings->m_decreaseBoostSlide;\n  v10->m_decreaseBoostSlide = !m_levelSettings->m_decreaseBoostSlide;\n}", "assembly": "; \n; GJBaseGameLayer::resetPlayer from 0x85fcc8 to 0x85fe44 (380 bytes)\n; \n; 4 xrefs:\n; > PlayLayer::setupHasCompleted @ 0x5dc4d4\n; > LevelEditorLayer::onPlaytest @ 0x664344\n; > GJBaseGameLayer::resetLevelVariables @ 0x88b00c\n; > <???> @ 0x61b18\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_60]!                                ; +0x0, 0x85fcc8\nFMOV            S0, WZR; float                                         ; +0x4, 0x85fccc\nMOV             X29, SP                                                ; +0x8, 0x85fcd0\nSTP             X21, X22, [SP,#0x60+var_40]                            ; +0xc, 0x85fcd4\nADRP            X21, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x85fcd8\nADD             X22, X29, #0x60+var_18                                 ; +0x14, 0x85fcdc\nLDR             S1, flt_85FE44; float                                  ; +0x18, 0x85fce0\nSTP             X19, X20, [SP,#0x60+var_50]                            ; +0x1c, 0x85fce4\nLDR             X1, [X21,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x20, 0x85fce8\nMOV             X19, X0                                                ; +0x24, 0x85fcec\nMOV             X0, X22; this                                          ; +0x28, 0x85fcf0\nSTP             X23, X24, [SP,#0x60+var_30]                            ; +0x2c, 0x85fcf4\nLDR             X1, [X1]                                               ; +0x30, 0x85fcf8\nSTR             X1, [X29,#0x60+var_8]                                  ; +0x34, 0x85fcfc\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x38, 0x85fd00\nLDR             X0, [X19,#0x31E8]                                      ; +0x3c, 0x85fd04\nCBZ             X0, loc_85FDE4                                         ; +0x40, 0x85fd08\nLDR             X1, [X0]                                               ; +0x44, 0x85fd0c\nADD             X20, X29, #0x60+var_10                                 ; +0x48, 0x85fd10\nLDR             X1, [X1,#0xC0]                                         ; +0x4c, 0x85fd14\nBLR             X1                                                     ; +0x50, 0x85fd18\nMOV             X1, X0                                                 ; +0x54, 0x85fd1c\nMOV             X0, X22                                                ; +0x58, 0x85fd20\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x5c, 0x85fd24\nLDR             X23, [X19,#0xDF8]                                      ; +0x60, 0x85fd28\nMOV             X1, X22; cocos2d::CCPoint *                            ; +0x64, 0x85fd2c\nMOV             X0, X20; this                                          ; +0x68, 0x85fd30\nLDR             X2, [X23]                                              ; +0x6c, 0x85fd34\nLDR             X24, [X2,#0x548]                                       ; +0x70, 0x85fd38\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x74, 0x85fd3c\nMOV             X0, X23                                                ; +0x78, 0x85fd40\nMOV             X1, X20                                                ; +0x7c, 0x85fd44\nBLR             X24                                                    ; +0x80, 0x85fd48\nLDR             X1, [X19,#0xDF8]                                       ; +0x84, 0x85fd4c\nMOV             X0, X1                                                 ; +0x88, 0x85fd50\nLDR             X1, [X1]                                               ; +0x8c, 0x85fd54\nLDR             X1, [X1,#0x4F8]                                        ; +0x90, 0x85fd58\nBLR             X1                                                     ; +0x94, 0x85fd5c\nLDR             X23, [X19,#0xE00]                                      ; +0x98, 0x85fd60\nMOV             X1, X22; cocos2d::CCPoint *                            ; +0x9c, 0x85fd64\nMOV             X0, X20; this                                          ; +0xa0, 0x85fd68\nLDR             X2, [X23]                                              ; +0xa4, 0x85fd6c\nLDR             X22, [X2,#0x548]                                       ; +0xa8, 0x85fd70\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0xac, 0x85fd74\nMOV             X0, X23                                                ; +0xb0, 0x85fd78\nMOV             X1, X20                                                ; +0xb4, 0x85fd7c\nBLR             X22                                                    ; +0xb8, 0x85fd80\nLDR             X1, [X19,#0xE00]                                       ; +0xbc, 0x85fd84\nMOV             X0, X1                                                 ; +0xc0, 0x85fd88\nLDR             X1, [X1]                                               ; +0xc4, 0x85fd8c\nLDR             X1, [X1,#0x4F8]                                        ; +0xc8, 0x85fd90\nBLR             X1                                                     ; +0xcc, 0x85fd94\nLDR             X1, [X19,#0xE08]                                       ; +0xd0, 0x85fd98\nLDR             X4, [X19,#0xDF8]                                       ; +0xd4, 0x85fd9c\nLDR             X3, [X19,#0xE00]                                       ; +0xd8, 0x85fda0\nLDRB            W0, [X1,#0x1BB]                                        ; +0xdc, 0x85fda4\nLDR             X2, [X29,#0x60+var_8]                                  ; +0xe0, 0x85fda8\nEOR             W0, W0, #1                                             ; +0xe4, 0x85fdac\nSTRB            W0, [X4,#0xA00]                                        ; +0xe8, 0x85fdb0\nLDRB            W0, [X1,#0x1BB]                                        ; +0xec, 0x85fdb4\nEOR             W0, W0, #1                                             ; +0xf0, 0x85fdb8\nSTRB            W0, [X3,#0xA00]                                        ; +0xf4, 0x85fdbc\nLDR             X21, [X21,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0xf8, 0x85fdc0\nLDR             X0, [X21]                                              ; +0xfc, 0x85fdc4\nCMP             X2, X0                                                 ; +0x100, 0x85fdc8\nB.NE            loc_85FE40                                             ; +0x104, 0x85fdcc\nLDP             X19, X20, [SP,#0x60+var_50]                            ; +0x108, 0x85fdd0\nLDP             X21, X22, [SP,#0x60+var_40]                            ; +0x10c, 0x85fdd4\nLDP             X23, X24, [SP,#0x60+var_30]                            ; +0x110, 0x85fdd8\nLDP             X29, X30, [SP+0x60+var_60],#0x60                       ; +0x114, 0x85fddc\nRET                                                                    ; +0x118, 0x85fde0\nLDR             X0, [X19,#0xE08]                                       ; +0x11c, 0x85fde4\nLDR             W1, [X0,#0x1AC]; int                                   ; +0x120, 0x85fde8\nCMP             W1, WZR                                                ; +0x124, 0x85fdec\nB.LE            loc_85FE38                                             ; +0x128, 0x85fdf0\nMOV             X0, X19; this                                          ; +0x12c, 0x85fdf4\nBL              _ZN15GJBaseGameLayer12tryGetObjectEi; GJBaseGameLayer::tryGetObject(int) ; +0x130, 0x85fdf8\nCBZ             X0, loc_85FE38                                         ; +0x134, 0x85fdfc\nLDR             X1, [X0]                                               ; +0x138, 0x85fe00\nADD             X20, X29, #0x60+var_10                                 ; +0x13c, 0x85fe04\nMOV             X8, X20                                                ; +0x140, 0x85fe08\nLDR             X1, [X1,#0x540]                                        ; +0x144, 0x85fe0c\nBLR             X1                                                     ; +0x148, 0x85fe10\nMOV             X0, X22                                                ; +0x14c, 0x85fe14\nMOV             X1, X20                                                ; +0x150, 0x85fe18\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x154, 0x85fe1c\nLDR             X0, [X19,#0xE08]                                       ; +0x158, 0x85fe20\nLDRB            W0, [X0,#0x155]                                        ; +0x15c, 0x85fe24\nCBNZ            W0, loc_85FD28                                         ; +0x160, 0x85fe28\nFMOV            S0, WZR                                                ; +0x164, 0x85fe2c\nSTR             S0, [X22]                                              ; +0x168, 0x85fe30\nB               loc_85FD28                                             ; +0x16c, 0x85fe34\nADD             X20, X29, #0x60+var_10                                 ; +0x170, 0x85fe38\nB               loc_85FD28                                             ; +0x174, 0x85fe3c\nBL              .__stack_chk_fail                                      ; +0x178, 0x85fe40", "xrefs": ["PlayLayer::setupHasCompleted @ 0x5dc4d4", "LevelEditorLayer::onPlaytest @ 0x664344", "GJBaseGameLayer::resetLevelVariables @ 0x88b00c", "<???> @ 0x61b18"], "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"}