{"type": "func", "start": 4296272112, "end": 4296272537, "name": "GJBaseGameLayer::restoreAllUIObjects", "pseudocode": "// \n// GJBaseGameLayer::restoreAllUIObjects from 0x10013e8f0 to 0x10013ea99 (425 bytes)\n// \n// 1 xrefs:\n// > LevelEditorLayer::onStopPlaytest @ 0x1000f2d9a\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 __fastcall GJBaseGameLayer::restoreAllUIObjects(GJBaseGameLayer *a1)\n{\n  cocos2d::CCArray *m_uiObjects; // rdi\n  cocos2d::ccArray *data; // rax\n  cocos2d::CCObject **arr; // r15\n  cocos2d::CCObject *v5; // r12\n  double v6; // xmm0_8\n  std::__hash_node_base<std::__hash_node<std::__hash_value_type<int, cocos2d::CCPoint>, void *> *>::__next_pointer next; // rdi\n  std::__hash_node_base<std::__hash_node<std::__hash_value_type<int, cocos2d::CCPoint>, void *> *> *v8; // r14\n  unsigned __int64 value; // rsi\n  int *p_m_uReference; // [rsp+0h] [rbp-40h] BYREF\n  unsigned __int64 v11; // [rsp+8h] [rbp-38h]\n  unsigned int m_uReference; // [rsp+10h] [rbp-30h] BYREF\n  char v13[41]; // [rsp+17h] [rbp-29h] BYREF\n\n  m_uiObjects = a1->m_uiObjects;\n  if ( !m_uiObjects )\n  {\n    sub_100720270(0);\n    if ( !a1->m_uiObjectPositions.__table_.__p2_.__value_ )\n      goto LABEL_15;\n    goto LABEL_10;\n  }\n  data = m_uiObjects->data;\n  if ( data->num )\n  {\n    arr = data->arr;\n    v11 = (unsigned __int64)&arr[data->num - 1];\n    do\n    {\n      v5 = *arr;\n      if ( !*arr )\n        break;\n      m_uReference = v5[16].m_uReference;\n      p_m_uReference = (int *)&m_uReference;\n      sub_100169820(&a1->m_uiObjectPositions, &m_uReference, &unk_100816AE0, &p_m_uReference, v13);\n      v6 = sub_10028CC60(&p_m_uReference);\n      ((void (__fastcall *)(cocos2d::CCObject *, int **, double))v5->__vftable[16].setTag)(v5, &p_m_uReference, v6);\n      ((void (__fastcall *)(cocos2d::CCObject *, __int64))v5->__vftable[16].~CCObject_0)(v5, 1);\n      v5[11].m_nLuaID = 0;\n      BYTE1(v5[24].__vftable) = 0;\n      ((void (__fastcall *)(GJBaseGameLayer *, cocos2d::CCObject *))a1->addToSection)(a1, v5);\n      cocos2d::CCDictionary::setObject(a1->m_objectsToDeactivate, v5, v5[16].m_uReference);\n      BYTE2(v5[17].m_nZOrder) = 1;\n      ++arr;\n    }\n    while ( (unsigned __int64)arr <= v11 );\n    m_uiObjects = a1->m_uiObjects;\n  }\n  sub_100720270(m_uiObjects);\n  if ( a1->m_uiObjectPositions.__table_.__p2_.__value_ )\n  {\nLABEL_10:\n    next = a1->m_uiObjectPositions.__table_.__p1_.__value_.__next_;\n    if ( next )\n    {\n      do\n      {\n        v8 = next->__next_;\n        operator delete(next);\n        next = v8;\n      }\n      while ( v8 );\n    }\n    a1->m_uiObjectPositions.__table_.__p1_.__value_.__next_ = nullptr;\n    value = a1->m_uiObjectPositions.__table_.__bucket_list_.__ptr_.__value_.__data_.__value_;\n    if ( value )\n      __bzero(a1->m_uiObjectPositions.__table_.__bucket_list_.__ptr_.__value_, 8 * value);\n    a1->m_uiObjectPositions.__table_.__p2_.__value_ = 0;\n  }\nLABEL_15:\n  a1->m_calcCollisionBlockObjects2.__end_ = a1->m_calcCollisionBlockObjects2.__begin_;\n  a1->m_calcCollisionBlockObjects2Size = 0;\n}", "assembly": "; \n; GJBaseGameLayer::restoreAllUIObjects from 0x10013e8f0 to 0x10013ea99 (425 bytes)\n; \n; 1 xrefs:\n; > LevelEditorLayer::onStopPlaytest @ 0x1000f2d9a\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    rbp                                                            ; +0x0, 0x10013e8f0\nmov     rbp, rsp                                                       ; +0x1, 0x10013e8f1\npush    r15                                                            ; +0x4, 0x10013e8f4\npush    r14                                                            ; +0x6, 0x10013e8f6\npush    r13                                                            ; +0x8, 0x10013e8f8\npush    r12                                                            ; +0xa, 0x10013e8fa\npush    rbx                                                            ; +0xc, 0x10013e8fc\nsub     rsp, 18h                                                       ; +0xd, 0x10013e8fd\nmov     rbx, rdi                                                       ; +0x11, 0x10013e901\nmov     rdi, [rdi+3338h]                                               ; +0x14, 0x10013e904\ntest    rdi, rdi                                                       ; +0x1b, 0x10013e90b\njz      loc_10013EA0D                                                  ; +0x1e, 0x10013e90e\nmov     rax, [rdi+38h]                                                 ; +0x24, 0x10013e914\nmov     ecx, [rax]                                                     ; +0x28, 0x10013e918\ntest    rcx, rcx                                                       ; +0x2a, 0x10013e91a\njz      loc_10013E9FC                                                  ; +0x2d, 0x10013e91d\nmov     r15, [rax+10h]                                                 ; +0x33, 0x10013e923\nlea     rax, [r15+rcx*8]                                               ; +0x37, 0x10013e927\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x3b, 0x10013e92b\nmov     [rbp+var_38], rax                                              ; +0x3f, 0x10013e92f\nlea     r14, [rbx+828h]                                                ; +0x43, 0x10013e933\nlea     r13, [rbp+var_40]                                              ; +0x4a, 0x10013e93a\nxchg    ax, ax                                                         ; +0x4e, 0x10013e93e\nmov     r12, [r15]                                                     ; +0x50, 0x10013e940\ntest    r12, r12                                                       ; +0x53, 0x10013e943\njz      loc_10013E9F5                                                  ; +0x56, 0x10013e946\nmov     eax, [r12+394h]                                                ; +0x5c, 0x10013e94c\nmov     [rbp+var_30], eax                                              ; +0x64, 0x10013e954\nlea     rsi, [rbp+var_30]                                              ; +0x67, 0x10013e957\nmov     [rbp+var_40], rsi                                              ; +0x6b, 0x10013e95b\nmov     rdi, r14                                                       ; +0x6f, 0x10013e95f\nlea     rdx, unk_100816AE0                                             ; +0x72, 0x10013e962\nmov     rcx, r13                                                       ; +0x79, 0x10013e969\nlea     r8, [rbp+var_29]                                               ; +0x7c, 0x10013e96c\ncall    sub_100169820                                                  ; +0x80, 0x10013e970\nlea     rsi, [rax+14h]                                                 ; +0x85, 0x10013e975\nmov     rdi, r13                                                       ; +0x89, 0x10013e979\ncall    sub_10028CC60                                                  ; +0x8c, 0x10013e97c\nmov     rax, [r12]                                                     ; +0x91, 0x10013e981\nmov     rdi, r12                                                       ; +0x95, 0x10013e985\nmov     rsi, r13                                                       ; +0x98, 0x10013e988\ncall    qword ptr [rax+548h]                                           ; +0x9b, 0x10013e98b\nmov     rax, [r12]                                                     ; +0xa1, 0x10013e991\nmov     rdi, r12                                                       ; +0xa5, 0x10013e995\nmov     esi, 1                                                         ; +0xa8, 0x10013e998\ncall    qword ptr [rax+510h]                                           ; +0xad, 0x10013e99d\nmov     dword ptr [r12+274h], 0                                        ; +0xb3, 0x10013e9a3\nmov     byte ptr [r12+541h], 0                                         ; +0xbf, 0x10013e9af\nmov     rax, [rbx]                                                     ; +0xc8, 0x10013e9b8\nmov     rdi, rbx                                                       ; +0xcb, 0x10013e9bb\nmov     rsi, r12                                                       ; +0xce, 0x10013e9be\ncall    qword ptr [rax+508h]                                           ; +0xd1, 0x10013e9c1\nmov     rdi, [rbx+0F00h]                                               ; +0xd7, 0x10013e9c7\nmov     edx, [r12+394h]                                                ; +0xde, 0x10013e9ce\nmov     rsi, r12                                                       ; +0xe6, 0x10013e9d6\ncall    cocos2d__CCDictionary__setObject                               ; +0xe9, 0x10013e9d9\nmov     byte ptr [r12+3E6h], 1                                         ; +0xee, 0x10013e9de\nadd     r15, 8                                                         ; +0xf7, 0x10013e9e7\ncmp     r15, [rbp+var_38]                                              ; +0xfb, 0x10013e9eb\njbe     loc_10013E940                                                  ; +0xff, 0x10013e9ef\nmov     rdi, [rbx+3338h]                                               ; +0x105, 0x10013e9f5\ncall    sub_100720270                                                  ; +0x10c, 0x10013e9fc\ncmp     qword ptr [rbx+840h], 0                                        ; +0x111, 0x10013ea01\njnz     short loc_10013EA1E                                            ; +0x119, 0x10013ea09\njmp     short loc_10013EA72                                            ; +0x11b, 0x10013ea0b\nxor     edi, edi                                                       ; +0x11d, 0x10013ea0d\ncall    sub_100720270                                                  ; +0x11f, 0x10013ea0f\ncmp     qword ptr [rbx+840h], 0                                        ; +0x124, 0x10013ea14\njz      short loc_10013EA72                                            ; +0x12c, 0x10013ea1c\nmov     rdi, [rbx+838h]; __p                                           ; +0x12e, 0x10013ea1e\ntest    rdi, rdi                                                       ; +0x135, 0x10013ea25\njz      short loc_10013EA40                                            ; +0x138, 0x10013ea28\nnop     word ptr [rax+rax+00h]                                         ; +0x13a, 0x10013ea2a\nmov     r14, [rdi]                                                     ; +0x140, 0x10013ea30\ncall    __ZdlPv; operator delete(void *)                               ; +0x143, 0x10013ea33\nmov     rdi, r14                                                       ; +0x148, 0x10013ea38\ntest    r14, r14                                                       ; +0x14b, 0x10013ea3b\njnz     short loc_10013EA30                                            ; +0x14e, 0x10013ea3e\nmov     qword ptr [rbx+838h], 0                                        ; +0x150, 0x10013ea40\nmov     rsi, [rbx+830h]                                                ; +0x15b, 0x10013ea4b\ntest    rsi, rsi                                                       ; +0x162, 0x10013ea52\njz      short loc_10013EA67                                            ; +0x165, 0x10013ea55\nmov     rdi, [rbx+828h]                                                ; +0x167, 0x10013ea57\nshl     rsi, 3                                                         ; +0x16e, 0x10013ea5e\ncall    ___bzero                                                       ; +0x172, 0x10013ea62\nmov     qword ptr [rbx+840h], 0                                        ; +0x177, 0x10013ea67\nmov     rax, [rbx+3408h]                                               ; +0x182, 0x10013ea72\nmov     [rbx+3410h], rax                                               ; +0x189, 0x10013ea79\nmov     dword ptr [rbx+3420h], 0                                       ; +0x190, 0x10013ea80\nadd     rsp, 18h                                                       ; +0x19a, 0x10013ea8a\npop     rbx                                                            ; +0x19e, 0x10013ea8e\npop     r12                                                            ; +0x19f, 0x10013ea8f\npop     r13                                                            ; +0x1a1, 0x10013ea91\npop     r14                                                            ; +0x1a3, 0x10013ea93\npop     r15                                                            ; +0x1a5, 0x10013ea95\npop     rbp                                                            ; +0x1a7, 0x10013ea97\nretn                                                                   ; +0x1a8, 0x10013ea98", "xrefs": ["LevelEditorLayer::onStopPlaytest @ 0x1000f2d9a"], "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"}