{"type": "func", "start": 5370905456, "end": 5370906007, "name": "GJBaseGameLayer::createPlayerCollisionBlock", "pseudocode": "// \n// GJBaseGameLayer::createPlayerCollisionBlock from 0x140218370 to 0x140218597 (551 bytes)\n// \n// 5 xrefs:\n// > LevelEditorLayer::init @ 0x1402d290f\n// > PlayLayer::setupHasCompleted @ 0x1403a7667\n// > <???> @ 0x14067f668\n// > <???> @ 0x14067f678\n// > <???> @ 0x1406cd254\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::createPlayerCollisionBlock(GJBaseGameLayer *a1)\n{\n  int i; // ebp\n  GameObject *v3; // rsi\n  GameObject_vtbl *v4; // rdi\n  __int64 v5; // rax\n  GameObject *m_player2CollisionBlock; // rcx\n  __int128 v7; // [rsp+20h] [rbp-48h] BYREF\n  __int64 v8; // [rsp+30h] [rbp-38h]\n  __int64 v9; // [rsp+38h] [rbp-30h]\n  cocos2d::CCPoint v10; // [rsp+78h] [rbp+10h] BYREF\n  cocos2d::CCPoint v11; // [rsp+80h] [rbp+18h] BYREF\n\n  if ( !a1->m_player1CollisionBlock )\n  {\n    for ( i = 0; i < 2; ++i )\n    {\n      v3 = GameObject::createWithKey(1816);\n      cocos2d::CCObject::retain(v3);\n      v3->customSetup(v3);\n      v8 = 0;\n      v9 = 15;\n      v7 = 0;\n      *(_QWORD *)&v7 = sub_14003AA10(0x20u);\n      v8 = 30;\n      v9 = 31;\n      strcpy((char *)v7, \"edit_eCollisionBlock01_001.png\");\n      GameObject::addColorSprite((__int64)v3, (__int64)&v7);\n      v8 = 0;\n      v9 = 15;\n      v7 = 0;\n      *(_QWORD *)&v7 = sub_14003AA10(0x20u);\n      v8 = 30;\n      v9 = 31;\n      strcpy((char *)v7, \"edit_eCollisionBlock01_001.png\");\n      v3->setupCustomSprites(v3, (std::string *)&v7);\n      if ( i )\n      {\n        a1->m_player2CollisionBlock = v3;\n        *(_DWORD *)&v3[1]._cascadeColorEnabled = 10001;\n        v4 = a1->m_player2CollisionBlock->__vftable;\n        a1->m_player2->getPosition_0(a1->m_player2);\n        cocos2d::CCPoint::CCPoint(&v11);\n        m_player2CollisionBlock = a1->m_player2CollisionBlock;\n      }\n      else\n      {\n        a1->m_player1CollisionBlock = v3;\n        *(_DWORD *)&v3[1]._cascadeColorEnabled = 10000;\n        v4 = a1->m_player1CollisionBlock->__vftable;\n        a1->m_player1->getPosition_0(a1->m_player1);\n        cocos2d::CCPoint::CCPoint(&v10);\n        m_player2CollisionBlock = a1->m_player1CollisionBlock;\n      }\n      ((void (__fastcall *)(GameObject *, __int64))v4->setStartPos)(m_player2CollisionBlock, v5);\n      v3->m_bDontDraw = 1;\n      v3->m_unk507 = 1;\n      a1->addToSection(a1, v3);\n      cocos2d::CCArray::addObject(a1->m_collisionBlocks, v3);\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::createPlayerCollisionBlock from 0x140218370 to 0x140218597 (551 bytes)\n; \n; 5 xrefs:\n; > LevelEditorLayer::init @ 0x1402d290f\n; > PlayLayer::setupHasCompleted @ 0x1403a7667\n; > <???> @ 0x14067f668\n; > <???> @ 0x14067f678\n; > <???> @ 0x1406cd254\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    rbx                                                            ; +0x0, 0x140218370\nsub     rsp, 60h                                                       ; +0x2, 0x140218372\ncmp     qword ptr [rcx+30A0h], 0                                       ; +0x6, 0x140218376\nmov     rbx, rcx                                                       ; +0xe, 0x14021837e\njnz     loc_140218591                                                  ; +0x11, 0x140218381\nmov     [rsp+68h+var_10], rbp                                          ; +0x17, 0x140218387\nmov     [rsp+68h+var_18], rsi                                          ; +0x1c, 0x14021838c\nmov     [rsp+68h+var_28], r14                                          ; +0x21, 0x140218391\nxor     r14d, r14d                                                     ; +0x26, 0x140218396\nmov     ebp, r14d                                                      ; +0x29, 0x140218399\nmov     [rsp+68h+var_20], rdi                                          ; +0x2c, 0x14021839c\nmov     ecx, 718h                                                      ; +0x31, 0x1402183a1\ncall    GameObject__createWithKey                                      ; +0x36, 0x1402183a6\nmov     rcx, rax                                                       ; +0x3b, 0x1402183ab\nmov     rsi, rax                                                       ; +0x3e, 0x1402183ae\ncall    cs:?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x41, 0x1402183b1\nmov     rdx, [rsi]                                                     ; +0x47, 0x1402183b7\nmov     rcx, rsi                                                       ; +0x4a, 0x1402183ba\ncall    qword ptr [rdx+448h]                                           ; +0x4d, 0x1402183bd\nxorps   xmm0, xmm0                                                     ; +0x53, 0x1402183c3\nmov     [rsp+68h+var_38], r14                                          ; +0x56, 0x1402183c6\nmov     ecx, 20h ; ' '                                                 ; +0x5b, 0x1402183cb\nmov     [rsp+68h+var_30], 0Fh                                          ; +0x60, 0x1402183d0\nmovups  [rsp+68h+var_48], xmm0                                         ; +0x69, 0x1402183d9\ncall    sub_14003AA10                                                  ; +0x6e, 0x1402183de\nmovups  xmm0, cs:xmmword_140565D18                                     ; +0x73, 0x1402183e3\nmov     qword ptr [rsp+68h+var_48], rax                                ; +0x7a, 0x1402183ea\nmov     rdx, rax                                                       ; +0x7f, 0x1402183ef\nmov     [rsp+68h+var_38], 1Eh                                          ; +0x82, 0x1402183f2\nmov     [rsp+68h+var_30], 1Fh                                          ; +0x8b, 0x1402183fb\nmovups  xmmword ptr [rax], xmm0                                        ; +0x94, 0x140218404\nmovsd   xmm0, cs:qword_140565D28                                       ; +0x97, 0x140218407\nmovsd   qword ptr [rax+10h], xmm0                                      ; +0x9f, 0x14021840f\nmov     ecx, cs:dword_140565D30                                        ; +0xa4, 0x140218414\nmov     [rax+18h], ecx                                                 ; +0xaa, 0x14021841a\nmov     rcx, rsi                                                       ; +0xad, 0x14021841d\nmovzx   eax, cs:word_140565D34                                         ; +0xb0, 0x140218420\nmov     [rdx+1Ch], ax                                                  ; +0xb7, 0x140218427\nmov     [rdx+1Eh], r14b                                                ; +0xbb, 0x14021842b\nlea     rdx, [rsp+68h+var_48]                                          ; +0xbf, 0x14021842f\ncall    GameObject__addColorSprite                                     ; +0xc4, 0x140218434\nxorps   xmm0, xmm0                                                     ; +0xc9, 0x140218439\nmov     [rsp+68h+var_38], r14                                          ; +0xcc, 0x14021843c\nmov     ecx, 20h ; ' '                                                 ; +0xd1, 0x140218441\nmov     [rsp+68h+var_30], 0Fh                                          ; +0xd6, 0x140218446\nmovups  [rsp+68h+var_48], xmm0                                         ; +0xdf, 0x14021844f\ncall    sub_14003AA10                                                  ; +0xe4, 0x140218454\nmovups  xmm0, cs:xmmword_140565D18                                     ; +0xe9, 0x140218459\nmov     qword ptr [rsp+68h+var_48], rax                                ; +0xf0, 0x140218460\nmov     rdx, rax                                                       ; +0xf5, 0x140218465\nmov     [rsp+68h+var_38], 1Eh                                          ; +0xf8, 0x140218468\nmov     [rsp+68h+var_30], 1Fh                                          ; +0x101, 0x140218471\nmovups  xmmword ptr [rax], xmm0                                        ; +0x10a, 0x14021847a\nmovsd   xmm0, cs:qword_140565D28                                       ; +0x10d, 0x14021847d\nmovsd   qword ptr [rax+10h], xmm0                                      ; +0x115, 0x140218485\nmov     ecx, cs:dword_140565D30                                        ; +0x11a, 0x14021848a\nmov     [rax+18h], ecx                                                 ; +0x120, 0x140218490\nmov     rcx, rsi                                                       ; +0x123, 0x140218493\nmovzx   eax, cs:word_140565D34                                         ; +0x126, 0x140218496\nmov     [rdx+1Ch], ax                                                  ; +0x12d, 0x14021849d\nmov     [rdx+1Eh], r14b                                                ; +0x131, 0x1402184a1\nlea     rdx, [rsp+68h+var_48]                                          ; +0x135, 0x1402184a5\nmov     rax, [rsi]                                                     ; +0x13a, 0x1402184aa\ncall    qword ptr [rax+450h]                                           ; +0x13d, 0x1402184ad\ntest    ebp, ebp                                                       ; +0x143, 0x1402184b3\njnz     short loc_1402184F9                                            ; +0x145, 0x1402184b5\nmov     [rbx+30A0h], rsi                                               ; +0x147, 0x1402184b7\nmov     dword ptr [rsi+6A0h], 2710h                                    ; +0x14e, 0x1402184be\nmov     rax, [rbx+30A0h]                                               ; +0x158, 0x1402184c8\nmov     rcx, [rbx+0DA0h]                                               ; +0x15f, 0x1402184cf\nmov     rdi, [rax]                                                     ; +0x166, 0x1402184d6\nmov     rax, [rcx]                                                     ; +0x169, 0x1402184d9\ncall    qword ptr [rax+0C8h]                                           ; +0x16c, 0x1402184dc\nmov     rdx, rax                                                       ; +0x172, 0x1402184e2\nlea     rcx, [rsp+68h+arg_8]                                           ; +0x175, 0x1402184e5\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x17a, 0x1402184ea\nmov     rcx, [rbx+30A0h]                                               ; +0x180, 0x1402184f0\njmp     short loc_14021853C                                            ; +0x187, 0x1402184f7\nmov     [rbx+30A8h], rsi                                               ; +0x189, 0x1402184f9\nmov     dword ptr [rsi+6A0h], 2711h                                    ; +0x190, 0x140218500\nmov     rax, [rbx+30A8h]                                               ; +0x19a, 0x14021850a\nmov     rcx, [rbx+0DA8h]                                               ; +0x1a1, 0x140218511\nmov     rdi, [rax]                                                     ; +0x1a8, 0x140218518\nmov     rax, [rcx]                                                     ; +0x1ab, 0x14021851b\ncall    qword ptr [rax+0C8h]                                           ; +0x1ae, 0x14021851e\nmov     rdx, rax                                                       ; +0x1b4, 0x140218524\nlea     rcx, [rsp+68h+arg_10]                                          ; +0x1b7, 0x140218527\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x1bf, 0x14021852f\nmov     rcx, [rbx+30A8h]                                               ; +0x1c5, 0x140218535\nmov     rdx, rax                                                       ; +0x1cc, 0x14021853c\ncall    qword ptr [rdi+4B0h]                                           ; +0x1cf, 0x14021853f\nmov     byte ptr [rsi+22Fh], 1                                         ; +0x1d5, 0x140218545\nmov     rdx, rsi                                                       ; +0x1dc, 0x14021854c\nmov     byte ptr [rsi+51Fh], 1                                         ; +0x1df, 0x14021854f\nmov     rcx, rbx                                                       ; +0x1e6, 0x140218556\nmov     rax, [rbx]                                                     ; +0x1e9, 0x140218559\ncall    qword ptr [rax+478h]                                           ; +0x1ec, 0x14021855c\nmov     rcx, [rbx+0DC0h]                                               ; +0x1f2, 0x140218562\nmov     rdx, rsi                                                       ; +0x1f9, 0x140218569\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x1fc, 0x14021856c\ninc     ebp                                                            ; +0x202, 0x140218572\ncmp     ebp, 2                                                         ; +0x204, 0x140218574\njl      loc_1402183A1                                                  ; +0x207, 0x140218577\nmov     r14, [rsp+68h+var_28]                                          ; +0x20d, 0x14021857d\nmov     rdi, [rsp+68h+var_20]                                          ; +0x212, 0x140218582\nmov     rsi, [rsp+68h+var_18]                                          ; +0x217, 0x140218587\nmov     rbp, [rsp+68h+var_10]                                          ; +0x21c, 0x14021858c\nadd     rsp, 60h                                                       ; +0x221, 0x140218591\npop     rbx                                                            ; +0x225, 0x140218595\nretn                                                                   ; +0x226, 0x140218596", "xrefs": ["LevelEditorLayer::init @ 0x1402d290f", "PlayLayer::setupHasCompleted @ 0x1403a7667", "<???> @ 0x14067f668", "<???> @ 0x14067f678", "<???> @ 0x1406cd254"], "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"}