{"type": "func", "start": 4297615600, "end": 4297615988, "name": "CollisionBlockPopup::onNextItemID", "pseudocode": "// \n// CollisionBlockPopup::onNextItemID from 0x1002868f0 to 0x100286a74 (388 bytes)\n// \n// 1 xrefs:\n// > CollisionBlockPopup::init @ 0x1002863b2\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 CollisionBlockPopup::onNextItemID(CollisionBlockPopup *a1, cocos2d::CCObject *a2)\n{\n  LevelEditorLayer *m_levelEditorLayer; // rdi\n  std::unordered_set<int> *v4; // rsi\n  std::__hash_node_base<std::__hash_node<int, void *> *>::__next_pointer next; // rdi\n  std::__hash_node_base<std::__hash_node<int, void *> *> *v6; // r14\n  void *value; // rdi\n  int m_blockID; // ecx\n  int v9; // eax\n  EffectGameObject *m_gameObject; // rcx\n  unsigned int v11; // r14d\n  __int64 m_gameObjects; // r14\n  unsigned int v13; // r15d\n  GameObject *v14; // rax\n  std::unordered_set<int> v15; // [rsp+0h] [rbp-40h] BYREF\n\n  m_levelEditorLayer = GameManager::sharedState()->m_levelEditorLayer;\n  memset(&v15, 0, 32);\n  v15.__table_.__p3_.__value_ = 1.0;\n  v4 = &v15;\n  a1->m_blockID = LevelEditorLayer::getNextFreeBlockID(m_levelEditorLayer, &v15);\n  next = v15.__table_.__p1_.__value_.__next_;\n  if ( v15.__table_.__p1_.__value_.__next_ )\n  {\n    do\n    {\n      v6 = next->__next_;\n      operator delete(next);\n      next = v6;\n    }\n    while ( v6 );\n  }\n  value = v15.__table_.__bucket_list_.__ptr_.__value_;\n  v15.__table_.__bucket_list_.__ptr_.__value_ = nullptr;\n  if ( value )\n    operator delete(value);\n  m_blockID = 0;\n  if ( a1->m_blockID > 0 )\n    m_blockID = a1->m_blockID;\n  v9 = 9999;\n  if ( m_blockID < 9999 )\n    v9 = m_blockID;\n  a1->m_blockID = v9;\n  m_gameObject = a1->m_gameObject;\n  if ( m_gameObject )\n  {\n    m_gameObject->m_itemID = v9;\n    goto LABEL_16;\n  }\n  value = a1->m_gameObjects;\n  if ( value && (unsigned int)sub_100720070(value) )\n  {\n    v11 = 0;\n    do\n    {\n      v4 = (std::unordered_set<int> *)v11;\n      *(_DWORD *)(sub_1007200C0(a1->m_gameObjects, v11++) + 1680) = a1->m_blockID;\n      value = a1->m_gameObjects;\n    }\n    while ( v11 < (unsigned int)sub_100720070(value) );\n  }\n  if ( a1->m_gameObject )\n  {\nLABEL_16:\n    m_gameObjects = sub_10071F9E0(value, v4);\n    sub_10071FCD0(m_gameObjects, a1->m_gameObject);\n    if ( !m_gameObjects )\n      goto LABEL_20;\n    goto LABEL_17;\n  }\n  m_gameObjects = (__int64)a1->m_gameObjects;\n  if ( !m_gameObjects )\n    goto LABEL_20;\nLABEL_17:\n  if ( (unsigned int)sub_100720070(m_gameObjects) )\n  {\n    v13 = 0;\n    do\n    {\n      v14 = (GameObject *)sub_1007200C0(m_gameObjects, v13);\n      LevelEditorLayer::updateObjectLabel(v14);\n      ++v13;\n    }\n    while ( v13 < (unsigned int)sub_100720070(m_gameObjects) );\n  }\nLABEL_20:\n  CollisionBlockPopup::updateTextInputLabel(a1);\n}", "assembly": "; \n; CollisionBlockPopup::onNextItemID from 0x1002868f0 to 0x100286a74 (388 bytes)\n; \n; 1 xrefs:\n; > CollisionBlockPopup::init @ 0x1002863b2\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, 0x1002868f0\nmov     rbp, rsp                                                       ; +0x1, 0x1002868f1\npush    r15                                                            ; +0x4, 0x1002868f4\npush    r14                                                            ; +0x6, 0x1002868f6\npush    rbx                                                            ; +0x8, 0x1002868f8\nsub     rsp, 28h                                                       ; +0x9, 0x1002868f9\nmov     rbx, rdi                                                       ; +0xd, 0x1002868fd\ncall    GameManager__sharedState                                       ; +0x10, 0x100286900\nmov     rdi, [rax+200h]                                                ; +0x15, 0x100286905\nxorps   xmm0, xmm0                                                     ; +0x1c, 0x10028690c\nmovaps  xmmword ptr [rbp+__p], xmm0                                    ; +0x1f, 0x10028690f\nmovaps  xmmword ptr [rbp+var_40], xmm0                                 ; +0x23, 0x100286913\nmov     [rbp+var_20], 3F800000h                                        ; +0x27, 0x100286917\nlea     rsi, [rbp+var_40]                                              ; +0x2e, 0x10028691e\ncall    LevelEditorLayer__getNextFreeBlockID                           ; +0x32, 0x100286922\nmov     [rbx+298h], eax                                                ; +0x37, 0x100286927\nmov     rdi, [rbp+__p]; __p                                            ; +0x3d, 0x10028692d\ntest    rdi, rdi                                                       ; +0x41, 0x100286931\njz      short loc_100286950                                            ; +0x44, 0x100286934\nnop     word ptr [rax+rax+00000000h]                                   ; +0x46, 0x100286936\nmov     r14, [rdi]                                                     ; +0x50, 0x100286940\ncall    __ZdlPv; operator delete(void *)                               ; +0x53, 0x100286943\nmov     rdi, r14                                                       ; +0x58, 0x100286948\ntest    r14, r14                                                       ; +0x5b, 0x10028694b\njnz     short loc_100286940                                            ; +0x5e, 0x10028694e\nmov     rdi, [rbp+var_40]; __p                                         ; +0x60, 0x100286950\nmov     [rbp+var_40], 0                                                ; +0x64, 0x100286954\ntest    rdi, rdi                                                       ; +0x6c, 0x10028695c\njz      short loc_100286966                                            ; +0x6f, 0x10028695f\ncall    __ZdlPv; operator delete(void *)                               ; +0x71, 0x100286961\nmov     eax, [rbx+298h]                                                ; +0x76, 0x100286966\nxor     ecx, ecx                                                       ; +0x7c, 0x10028696c\ntest    eax, eax                                                       ; +0x7e, 0x10028696e\ncmovg   ecx, eax                                                       ; +0x80, 0x100286970\ncmp     ecx, 270Fh                                                     ; +0x83, 0x100286973\nmov     eax, 270Fh                                                     ; +0x89, 0x100286979\ncmovl   eax, ecx                                                       ; +0x8e, 0x10028697e\nmov     [rbx+298h], eax                                                ; +0x91, 0x100286981\nmov     rcx, [rbx+280h]                                                ; +0x97, 0x100286987\ntest    rcx, rcx                                                       ; +0x9e, 0x10028698e\njz      short loc_10028699B                                            ; +0xa1, 0x100286991\nmov     [rcx+690h], eax                                                ; +0xa3, 0x100286993\njmp     short loc_1002869F9                                            ; +0xa9, 0x100286999\nmov     rdi, [rbx+288h]                                                ; +0xab, 0x10028699b\ntest    rdi, rdi                                                       ; +0xb2, 0x1002869a2\njz      short loc_1002869EF                                            ; +0xb5, 0x1002869a5\ncall    sub_100720070                                                  ; +0xb7, 0x1002869a7\ntest    eax, eax                                                       ; +0xbc, 0x1002869ac\njz      short loc_1002869EF                                            ; +0xbe, 0x1002869ae\nxor     r14d, r14d                                                     ; +0xc0, 0x1002869b0\nnop     word ptr [rax+rax+00000000h]                                   ; +0xc3, 0x1002869b3\nmov     rdi, [rbx+288h]                                                ; +0xd0, 0x1002869c0\nmov     esi, r14d                                                      ; +0xd7, 0x1002869c7\ncall    sub_1007200C0                                                  ; +0xda, 0x1002869ca\nmov     ecx, [rbx+298h]                                                ; +0xdf, 0x1002869cf\nmov     [rax+690h], ecx                                                ; +0xe5, 0x1002869d5\ninc     r14d                                                           ; +0xeb, 0x1002869db\nmov     rdi, [rbx+288h]                                                ; +0xee, 0x1002869de\ncall    sub_100720070                                                  ; +0xf5, 0x1002869e5\ncmp     r14d, eax                                                      ; +0xfa, 0x1002869ea\njb      short loc_1002869C0                                            ; +0xfd, 0x1002869ed\ncmp     qword ptr [rbx+280h], 0                                        ; +0xff, 0x1002869ef\njz      short loc_100286A66                                            ; +0x107, 0x1002869f7\ncall    sub_10071F9E0                                                  ; +0x109, 0x1002869f9\nmov     r14, rax                                                       ; +0x10e, 0x1002869fe\nmov     rsi, [rbx+280h]                                                ; +0x111, 0x100286a01\nmov     rdi, rax                                                       ; +0x118, 0x100286a08\ncall    sub_10071FCD0                                                  ; +0x11b, 0x100286a0b\ntest    r14, r14                                                       ; +0x120, 0x100286a10\njz      short loc_100286A53                                            ; +0x123, 0x100286a13\nmov     rdi, r14                                                       ; +0x125, 0x100286a15\ncall    sub_100720070                                                  ; +0x128, 0x100286a18\ntest    eax, eax                                                       ; +0x12d, 0x100286a1d\njz      short loc_100286A53                                            ; +0x12f, 0x100286a1f\nxor     r15d, r15d                                                     ; +0x131, 0x100286a21\nnop     word ptr [rax+rax+00000000h]                                   ; +0x134, 0x100286a24\nmov     rdi, r14                                                       ; +0x140, 0x100286a30\nmov     esi, r15d                                                      ; +0x143, 0x100286a33\ncall    sub_1007200C0                                                  ; +0x146, 0x100286a36\nmov     rdi, rax                                                       ; +0x14b, 0x100286a3b\ncall    LevelEditorLayer__updateObjectLabel                            ; +0x14e, 0x100286a3e\ninc     r15d                                                           ; +0x153, 0x100286a43\nmov     rdi, r14                                                       ; +0x156, 0x100286a46\ncall    sub_100720070                                                  ; +0x159, 0x100286a49\ncmp     r15d, eax                                                      ; +0x15e, 0x100286a4e\njb      short loc_100286A30                                            ; +0x161, 0x100286a51\nmov     rdi, rbx                                                       ; +0x163, 0x100286a53\ncall    CollisionBlockPopup__updateTextInputLabel                      ; +0x166, 0x100286a56\nadd     rsp, 28h                                                       ; +0x16b, 0x100286a5b\npop     rbx                                                            ; +0x16f, 0x100286a5f\npop     r14                                                            ; +0x170, 0x100286a60\npop     r15                                                            ; +0x172, 0x100286a62\npop     rbp                                                            ; +0x174, 0x100286a64\nretn                                                                   ; +0x175, 0x100286a65\nmov     r14, [rbx+288h]                                                ; +0x176, 0x100286a66\ntest    r14, r14                                                       ; +0x17d, 0x100286a6d\njnz     short loc_100286A15                                            ; +0x180, 0x100286a70\njmp     short loc_100286A53                                            ; +0x182, 0x100286a72", "xrefs": ["CollisionBlockPopup::init @ 0x1002863b2"], "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"}