{"type": "func", "start": 5370902720, "end": 5370902980, "name": "GJBaseGameLayer::canBeActivatedByPlayer", "pseudocode": "// \n// GJBaseGameLayer::canBeActivatedByPlayer from 0x1402178c0 to 0x1402179c4 (260 bytes)\n// \n// 21 xrefs:\n// > GJBaseGameLayer::collisionCheckObjects @ 0x140214c50\n// > GJBaseGameLayer::collisionCheckObjects @ 0x140214d0d\n// > GJBaseGameLayer::collisionCheckObjects @ 0x140214dca\n// > GJBaseGameLayer::collisionCheckObjects @ 0x140214e8f\n// > GJBaseGameLayer::collisionCheckObjects @ 0x140214f6a\n// > GJBaseGameLayer::collisionCheckObjects @ 0x140215022\n// > GJBaseGameLayer::collisionCheckObjects @ 0x1402150e7\n// > GJBaseGameLayer::collisionCheckObjects @ 0x14021519f\n// > GJBaseGameLayer::collisionCheckObjects @ 0x1402152a6\n// > GJBaseGameLayer::collisionCheckObjects @ 0x14021535e\n// > GJBaseGameLayer::collisionCheckObjects @ 0x140215458\n// > GJBaseGameLayer::collisionCheckObjects @ 0x140215552\n// > GJBaseGameLayer::collisionCheckObjects @ 0x14021558d\n// > GJBaseGameLayer::collisionCheckObjects @ 0x140215613\n// > GJBaseGameLayer::collisionCheckObjects @ 0x1402156a6\n// > GJBaseGameLayer::collisionCheckObjects @ 0x140215739\n// > GJBaseGameLayer::collisionCheckObjects @ 0x1402157bf\n// > GJBaseGameLayer::collisionCheckObjects @ 0x140215849\n// > GJBaseGameLayer::collisionCheckObjects @ 0x140215930\n// > GJBaseGameLayer::bumpPlayer @ 0x1402179e8\n// > <???> @ 0x1406cd1ac\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\nbool GJBaseGameLayer::canBeActivatedByPlayer(GJBaseGameLayer *a1, PlayerObject *a2, EffectGameObject *a3)\n{\n  std::_Tree_val<std::_Tree_simple_types<std::pair<const std::pair<int, int>, int>>>::_Nodeptr Myhead; // rdx\n  int m_uniqueID; // r9d\n  int v8; // r8d\n  std::_Tree_node<std::pair<const std::pair<int, int>, int>, void *>::_Nodeptr Parent; // rax\n  int v11; // [rsp+38h] [rbp+10h] BYREF\n  int v12; // [rsp+3Ch] [rbp+14h]\n\n  if ( !a3->canMultiActivate(a3, a2->m_isPlatformer) )\n    goto LABEL_14;\n  Myhead = a1->m_gameState.m_activatedObjectIDs._Mypair._Myval2._Myval2._Myhead;\n  m_uniqueID = a3->m_uniqueID;\n  v8 = a2->m_uniqueID;\n  Parent = Myhead->_Parent;\n  while ( !Parent->_Isnil )\n  {\n    if ( Parent->_Myval.first.first < m_uniqueID\n      || Parent->_Myval.first.first <= m_uniqueID && Parent->_Myval.first.second < v8 )\n    {\n      Parent = Parent->_Right;\n    }\n    else\n    {\n      Myhead = Parent;\n      Parent = Parent->_Left;\n    }\n  }\n  if ( Myhead->_Isnil\n    || m_uniqueID < Myhead->_Myval.first.first\n    || m_uniqueID <= Myhead->_Myval.first.first && v8 < Myhead->_Myval.first.second )\n  {\nLABEL_14:\n    v11 = a3->m_uniqueID;\n    v12 = a2->m_uniqueID;\n    *(_DWORD *)sub_1401D0800((unsigned __int64)&a1->m_gameState.m_activatedObjectIDs, &v11) = a1->m_gameState.m_commandIndex;\n    return !a3->hasBeenActivatedByPlayer(a3, a2);\n  }\n  else\n  {\n    v11 = a3->m_uniqueID;\n    v12 = v8;\n    *(_DWORD *)sub_1401D0800((unsigned __int64)&a1->m_gameState.m_activatedObjectIDs, &v11) = a1->m_gameState.m_commandIndex;\n    return 0;\n  }\n}", "assembly": "; \n; GJBaseGameLayer::canBeActivatedByPlayer from 0x1402178c0 to 0x1402179c4 (260 bytes)\n; \n; 21 xrefs:\n; > GJBaseGameLayer::collisionCheckObjects @ 0x140214c50\n; > GJBaseGameLayer::collisionCheckObjects @ 0x140214d0d\n; > GJBaseGameLayer::collisionCheckObjects @ 0x140214dca\n; > GJBaseGameLayer::collisionCheckObjects @ 0x140214e8f\n; > GJBaseGameLayer::collisionCheckObjects @ 0x140214f6a\n; > GJBaseGameLayer::collisionCheckObjects @ 0x140215022\n; > GJBaseGameLayer::collisionCheckObjects @ 0x1402150e7\n; > GJBaseGameLayer::collisionCheckObjects @ 0x14021519f\n; > GJBaseGameLayer::collisionCheckObjects @ 0x1402152a6\n; > GJBaseGameLayer::collisionCheckObjects @ 0x14021535e\n; > GJBaseGameLayer::collisionCheckObjects @ 0x140215458\n; > GJBaseGameLayer::collisionCheckObjects @ 0x140215552\n; > GJBaseGameLayer::collisionCheckObjects @ 0x14021558d\n; > GJBaseGameLayer::collisionCheckObjects @ 0x140215613\n; > GJBaseGameLayer::collisionCheckObjects @ 0x1402156a6\n; > GJBaseGameLayer::collisionCheckObjects @ 0x140215739\n; > GJBaseGameLayer::collisionCheckObjects @ 0x1402157bf\n; > GJBaseGameLayer::collisionCheckObjects @ 0x140215849\n; > GJBaseGameLayer::collisionCheckObjects @ 0x140215930\n; > GJBaseGameLayer::bumpPlayer @ 0x1402179e8\n; > <???> @ 0x1406cd1ac\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_0], rbx                                               ; +0x0, 0x1402178c0\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x1402178c5\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x1402178ca\npush    rdi                                                            ; +0xf, 0x1402178cf\nsub     rsp, 20h                                                       ; +0x10, 0x1402178d0\nmov     rax, [r8]                                                      ; +0x14, 0x1402178d4\nmov     rbp, rdx                                                       ; +0x17, 0x1402178d7\nmovzx   edx, byte ptr [rdx+0B70h]                                      ; +0x1a, 0x1402178da\nmov     rsi, rcx                                                       ; +0x21, 0x1402178e1\nmov     rcx, r8                                                        ; +0x24, 0x1402178e4\nmov     rdi, r8                                                        ; +0x27, 0x1402178e7\ncall    qword ptr [rax+628h]                                           ; +0x2a, 0x1402178ea\ntest    al, al                                                         ; +0x30, 0x1402178f0\njz      short loc_14021796E                                            ; +0x32, 0x1402178f2\nmov     rdx, [rsi+4F0h]                                                ; +0x34, 0x1402178f4\nmov     r9d, [rdi+39Ch]                                                ; +0x3b, 0x1402178fb\nmov     r8d, [rbp+39Ch]                                                ; +0x42, 0x140217902\nmov     rax, [rdx+8]                                                   ; +0x49, 0x140217909\ncmp     byte ptr [rax+19h], 0                                          ; +0x4d, 0x14021790d\njnz     short loc_140217933                                            ; +0x51, 0x140217911\ncmp     [rax+1Ch], r9d                                                 ; +0x53, 0x140217913\njl      short loc_140217929                                            ; +0x57, 0x140217917\njg      short loc_140217921                                            ; +0x59, 0x140217919\ncmp     [rax+20h], r8d                                                 ; +0x5b, 0x14021791b\njl      short loc_140217929                                            ; +0x5f, 0x14021791f\nmov     rdx, rax                                                       ; +0x61, 0x140217921\nmov     rax, [rax]                                                     ; +0x64, 0x140217924\njmp     short loc_14021792D                                            ; +0x67, 0x140217927\nmov     rax, [rax+10h]                                                 ; +0x69, 0x140217929\ncmp     byte ptr [rax+19h], 0                                          ; +0x6d, 0x14021792d\njz      short loc_140217913                                            ; +0x71, 0x140217931\ncmp     byte ptr [rdx+19h], 0                                          ; +0x73, 0x140217933\njnz     short loc_14021796E                                            ; +0x77, 0x140217937\ncmp     r9d, [rdx+1Ch]                                                 ; +0x79, 0x140217939\njl      short loc_14021796E                                            ; +0x7d, 0x14021793d\njg      short loc_140217947                                            ; +0x7f, 0x14021793f\ncmp     r8d, [rdx+20h]                                                 ; +0x81, 0x140217941\njl      short loc_14021796E                                            ; +0x85, 0x140217945\nlea     rdx, [rsp+28h+arg_8]                                           ; +0x87, 0x140217947\nmov     [rsp+28h+arg_8], r9d                                           ; +0x8c, 0x14021794c\nlea     rcx, [rsi+4F0h]                                                ; +0x91, 0x140217951\nmov     [rsp+28h+arg_C], r8d                                           ; +0x98, 0x140217958\ncall    sub_1401D0800                                                  ; +0x9d, 0x14021795d\nmov     ecx, [rsi+3E0h]                                                ; +0xa2, 0x140217962\nmov     [rax], ecx                                                     ; +0xa8, 0x140217968\nxor     al, al                                                         ; +0xaa, 0x14021796a\njmp     short loc_1402179AF                                            ; +0xac, 0x14021796c\nmov     eax, [rdi+39Ch]                                                ; +0xae, 0x14021796e\nlea     rcx, [rsi+4F0h]                                                ; +0xb4, 0x140217974\nmov     [rsp+28h+arg_8], eax                                           ; +0xbb, 0x14021797b\nlea     rdx, [rsp+28h+arg_8]                                           ; +0xbf, 0x14021797f\nmov     eax, [rbp+39Ch]                                                ; +0xc4, 0x140217984\nmov     [rsp+28h+arg_C], eax                                           ; +0xca, 0x14021798a\ncall    sub_1401D0800                                                  ; +0xce, 0x14021798e\nmov     ecx, [rsi+3E0h]                                                ; +0xd3, 0x140217993\nmov     rdx, rbp                                                       ; +0xd9, 0x140217999\nmov     [rax], ecx                                                     ; +0xdc, 0x14021799c\nmov     rcx, rdi                                                       ; +0xde, 0x14021799e\nmov     rax, [rdi]                                                     ; +0xe1, 0x1402179a1\ncall    qword ptr [rax+560h]                                           ; +0xe4, 0x1402179a4\ntest    al, al                                                         ; +0xea, 0x1402179aa\nsetz    al                                                             ; +0xec, 0x1402179ac\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xef, 0x1402179af\nmov     rbp, [rsp+28h+arg_10]                                          ; +0xf4, 0x1402179b4\nmov     rsi, [rsp+28h+arg_18]                                          ; +0xf9, 0x1402179b9\nadd     rsp, 20h                                                       ; +0xfe, 0x1402179be\npop     rdi                                                            ; +0x102, 0x1402179c2\nretn                                                                   ; +0x103, 0x1402179c3", "xrefs": ["GJBaseGameLayer::collisionCheckObjects @ 0x140214c50", "GJBaseGameLayer::collisionCheckObjects @ 0x140214d0d", "GJBaseGameLayer::collisionCheckObjects @ 0x140214dca", "GJBaseGameLayer::collisionCheckObjects @ 0x140214e8f", "GJBaseGameLayer::collisionCheckObjects @ 0x140214f6a", "GJBaseGameLayer::collisionCheckObjects @ 0x140215022", "GJBaseGameLayer::collisionCheckObjects @ 0x1402150e7", "GJBaseGameLayer::collisionCheckObjects @ 0x14021519f", "GJBaseGameLayer::collisionCheckObjects @ 0x1402152a6", "GJBaseGameLayer::collisionCheckObjects @ 0x14021535e", "GJBaseGameLayer::collisionCheckObjects @ 0x140215458", "GJBaseGameLayer::collisionCheckObjects @ 0x140215552", "GJBaseGameLayer::collisionCheckObjects @ 0x14021558d", "GJBaseGameLayer::collisionCheckObjects @ 0x140215613", "GJBaseGameLayer::collisionCheckObjects @ 0x1402156a6", "GJBaseGameLayer::collisionCheckObjects @ 0x140215739", "GJBaseGameLayer::collisionCheckObjects @ 0x1402157bf", "GJBaseGameLayer::collisionCheckObjects @ 0x140215849", "GJBaseGameLayer::collisionCheckObjects @ 0x140215930", "GJBaseGameLayer::bumpPlayer @ 0x1402179e8", "<???> @ 0x1406cd1ac"], "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"}