{"type": "func", "start": 5370880176, "end": 5370880532, "name": "GJBaseGameLayer::resetPlayer", "pseudocode": "// \n// GJBaseGameLayer::resetPlayer from 0x1402120b0 to 0x140212214 (356 bytes)\n// \n// 4 xrefs:\n// > GJBaseGameLayer::resetLevelVariables @ 0x14023b933\n// > LevelEditorLayer::onPlaytest @ 0x1402e0307\n// > PlayLayer::setupHasCompleted @ 0x1403a6b46\n// > <???> @ 0x1406ccfcc\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  float v1; // xmm0_4\n  StartPosObject *m_startPosObject; // rcx\n  __int64 v4; // rax\n  LevelSettingsObject **p_m_levelSettings; // rsi\n  int m_spawnGroup; // edx\n  GameObject *Object; // rax\n  __int64 v8; // rax\n  PlayerObject_vtbl *v9; // rbx\n  __int64 v10; // rax\n  PlayerObject_vtbl *v11; // rbx\n  __int64 v12; // rax\n  int v13; // [rsp+30h] [rbp+8h] BYREF\n  cocos2d::CCPoint v14; // [rsp+38h] [rbp+10h] BYREF\n\n  cocos2d::CCPoint::CCPoint(v1, 0.0);\n  m_startPosObject = a1->m_startPosObject;\n  if ( m_startPosObject )\n  {\n    v4 = (__int64)m_startPosObject->getPosition_0(m_startPosObject);\n    cocos2d::CCPoint::operator=(&v13, v4);\n    p_m_levelSettings = &a1->m_levelSettings;\n  }\n  else\n  {\n    p_m_levelSettings = &a1->m_levelSettings;\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        v8 = ((__int64 (__fastcall *)(GameObject *, cocos2d::CCPoint *))Object->getRealPosition)(Object, &v14);\n        cocos2d::CCPoint::operator=(&v13, v8);\n        if ( !a1->m_levelSettings->m_platformerMode )\n          v13 = 0;\n      }\n    }\n  }\n  v9 = a1->m_player1->__vftable;\n  cocos2d::CCPoint::CCPoint(&v14);\n  ((void (__fastcall *)(PlayerObject *, __int64))v9->setStartPos)(a1->m_player1, v10);\n  a1->m_player1->resetObject(a1->m_player1);\n  v11 = a1->m_player2->__vftable;\n  cocos2d::CCPoint::CCPoint(&v14);\n  ((void (__fastcall *)(PlayerObject *, __int64))v11->setStartPos)(a1->m_player2, v12);\n  a1->m_player2->resetObject(a1->m_player2);\n  a1->m_player1->m_decreaseBoostSlide = !(*p_m_levelSettings)->m_decreaseBoostSlide;\n  a1->m_player2->m_decreaseBoostSlide = !(*p_m_levelSettings)->m_decreaseBoostSlide;\n}", "assembly": "; \n; GJBaseGameLayer::resetPlayer from 0x1402120b0 to 0x140212214 (356 bytes)\n; \n; 4 xrefs:\n; > GJBaseGameLayer::resetLevelVariables @ 0x14023b933\n; > LevelEditorLayer::onPlaytest @ 0x1402e0307\n; > PlayLayer::setupHasCompleted @ 0x1403a6b46\n; > <???> @ 0x1406ccfcc\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\nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x1402120b0\nmov     [rsp+arg_18], rsi                                              ; +0x5, 0x1402120b5\npush    rdi                                                            ; +0xa, 0x1402120ba\nsub     rsp, 20h                                                       ; +0xb, 0x1402120bb\nmovss   xmm2, cs:dword_1406232CC                                       ; +0xf, 0x1402120bf\nmov     rdi, rcx                                                       ; +0x17, 0x1402120c7\nlea     rcx, [rsp+28h+arg_0]                                           ; +0x1a, 0x1402120ca\nxorps   xmm1, xmm1                                                     ; +0x1f, 0x1402120cf\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x22, 0x1402120d2\nmov     rcx, [rdi+3188h]                                               ; +0x28, 0x1402120d8\ntest    rcx, rcx                                                       ; +0x2f, 0x1402120df\njz      short loc_140212104                                            ; +0x32, 0x1402120e2\nmov     rax, [rcx]                                                     ; +0x34, 0x1402120e4\ncall    qword ptr [rax+0C8h]                                           ; +0x37, 0x1402120e7\nmov     rdx, rax                                                       ; +0x3d, 0x1402120ed\nlea     rcx, [rsp+28h+arg_0]                                           ; +0x40, 0x1402120f0\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x45, 0x1402120f5\nlea     rsi, [rdi+0DB0h]                                               ; +0x4b, 0x1402120fb\njmp     short loc_14021215C                                            ; +0x52, 0x140212102\nlea     rbx, [rdi+0DB0h]                                               ; +0x54, 0x140212104\nmov     rax, [rbx]                                                     ; +0x5b, 0x14021210b\nmov     rsi, rbx                                                       ; +0x5e, 0x14021210e\nmov     edx, [rax+1C4h]                                                ; +0x61, 0x140212111\ntest    edx, edx                                                       ; +0x67, 0x140212117\njle     short loc_14021215C                                            ; +0x69, 0x140212119\nmov     rcx, rdi                                                       ; +0x6b, 0x14021211b\ncall    GJBaseGameLayer__tryGetObject                                  ; +0x6e, 0x14021211e\ntest    rax, rax                                                       ; +0x73, 0x140212123\njz      short loc_14021215C                                            ; +0x76, 0x140212126\nmov     r8, [rax]                                                      ; +0x78, 0x140212128\nlea     rdx, [rsp+28h+arg_8]                                           ; +0x7b, 0x14021212b\nmov     rcx, rax                                                       ; +0x80, 0x140212130\ncall    qword ptr [r8+4A8h]                                            ; +0x83, 0x140212133\nmov     rdx, rax                                                       ; +0x8a, 0x14021213a\nlea     rcx, [rsp+28h+arg_0]                                           ; +0x8d, 0x14021213d\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x92, 0x140212142\nmov     rax, [rbx]                                                     ; +0x98, 0x140212148\ncmp     byte ptr [rax+155h], 0                                         ; +0x9b, 0x14021214b\njnz     short loc_14021215C                                            ; +0xa2, 0x140212152\nmov     [rsp+28h+arg_0], 0                                             ; +0xa4, 0x140212154\nmov     rax, [rdi+0DA0h]                                               ; +0xac, 0x14021215c\nlea     rdx, [rsp+28h+arg_0]                                           ; +0xb3, 0x140212163\nlea     rcx, [rsp+28h+arg_8]                                           ; +0xb8, 0x140212168\nmov     rbx, [rax]                                                     ; +0xbd, 0x14021216d\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0xc0, 0x140212170\nmov     rcx, [rdi+0DA0h]                                               ; +0xc6, 0x140212176\nmov     rdx, rax                                                       ; +0xcd, 0x14021217d\ncall    qword ptr [rbx+4B0h]                                           ; +0xd0, 0x140212180\nmov     rcx, [rdi+0DA0h]                                               ; +0xd6, 0x140212186\nmov     rax, [rcx]                                                     ; +0xdd, 0x14021218d\ncall    qword ptr [rax+460h]                                           ; +0xe0, 0x140212190\nmov     rax, [rdi+0DA8h]                                               ; +0xe6, 0x140212196\nlea     rdx, [rsp+28h+arg_0]                                           ; +0xed, 0x14021219d\nlea     rcx, [rsp+28h+arg_8]                                           ; +0xf2, 0x1402121a2\nmov     rbx, [rax]                                                     ; +0xf7, 0x1402121a7\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0xfa, 0x1402121aa\nmov     rcx, [rdi+0DA8h]                                               ; +0x100, 0x1402121b0\nmov     rdx, rax                                                       ; +0x107, 0x1402121b7\ncall    qword ptr [rbx+4B0h]                                           ; +0x10a, 0x1402121ba\nmov     rcx, [rdi+0DA8h]                                               ; +0x110, 0x1402121c0\nmov     rax, [rcx]                                                     ; +0x117, 0x1402121c7\ncall    qword ptr [rax+460h]                                           ; +0x11a, 0x1402121ca\nmov     rax, [rsi]                                                     ; +0x120, 0x1402121d0\nmov     rbx, [rsp+28h+arg_10]                                          ; +0x123, 0x1402121d3\ncmp     byte ptr [rax+1D3h], 0                                         ; +0x128, 0x1402121d8\nmov     rax, [rdi+0DA0h]                                               ; +0x12f, 0x1402121df\nsetz    cl                                                             ; +0x136, 0x1402121e6\nmov     [rax+0A28h], cl                                                ; +0x139, 0x1402121e9\nmov     rax, [rsi]                                                     ; +0x13f, 0x1402121ef\nmov     rsi, [rsp+28h+arg_18]                                          ; +0x142, 0x1402121f2\ncmp     byte ptr [rax+1D3h], 0                                         ; +0x147, 0x1402121f7\nmov     rax, [rdi+0DA8h]                                               ; +0x14e, 0x1402121fe\nsetz    cl                                                             ; +0x155, 0x140212205\nmov     [rax+0A28h], cl                                                ; +0x158, 0x140212208\nadd     rsp, 20h                                                       ; +0x15e, 0x14021220e\npop     rdi                                                            ; +0x162, 0x140212212\nretn                                                                   ; +0x163, 0x140212213", "xrefs": ["GJBaseGameLayer::resetLevelVariables @ 0x14023b933", "LevelEditorLayer::onPlaytest @ 0x1402e0307", "PlayLayer::setupHasCompleted @ 0x1403a6b46", "<???> @ 0x1406ccfcc"], "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"}