{"type": "func", "start": 5369857072, "end": 5369857728, "name": "EditorUI::processSmartObjectsFromType", "pseudocode": "// \n// EditorUI::processSmartObjectsFromType from 0x140118430 to 0x1401186c0 (656 bytes)\n// \n// 6 xrefs:\n// > EditorUI::createSmartObjectsFromType @ 0x140118183\n// > EditorUI::processSmartObjectsFromType @ 0x1401185d8\n// > EditorUI::processSmartObjectsFromType @ 0x1401186a5\n// > <???> @ 0x14066f9e4\n// > <???> @ 0x14066f9f4\n// > <???> @ 0x1406c9378\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 EditorUI::processSmartObjectsFromType(\n        EditorUI *a1,\n        int a2,\n        cocos2d::CCArray *a3,\n        cocos2d::CCArray *a4,\n        cocos2d::CCArray *a5,\n        cocos2d::CCArray *a6)\n{\n  bool v10; // bl\n  struct cocos2d::CCObject *v11; // r13\n  GJSmartDirection i; // ebx\n  cocos2d::CCPoint v13; // rax\n  EditorUI *v14; // rcx\n  EditorUI *v15; // rcx\n  cocos2d::CCNode *Neighbor; // rsi\n  int v17; // eax\n  int SmartObjectKey; // ebp\n  const struct cocos2d::CCPoint *v19; // rax\n  cocos2d::CCPoint v20; // rax\n  cocos2d::CCPoint v21; // rax\n  GameObject *Object; // rax\n  struct cocos2d::CCObject *v23; // rax\n  const struct cocos2d::CCPoint *v24; // rax\n  int RandomStartKey; // esi\n  cocos2d::CCPoint v26; // rax\n  cocos2d::CCPoint v27; // rax\n  GameObject *v28; // rax\n  cocos2d::CCPoint v29; // [rsp+30h] [rbp-68h] BYREF\n  struct cocos2d::CCPoint v30; // [rsp+38h] [rbp-60h] BYREF\n  cocos2d::CCPoint v31; // [rsp+40h] [rbp-58h] BYREF\n  cocos2d::CCPoint v32; // [rsp+48h] [rbp-50h] BYREF\n  cocos2d::CCPoint v33[2]; // [rsp+50h] [rbp-48h] BYREF\n  bool v34; // [rsp+A8h] [rbp+10h]\n\n  v10 = a2 == 2703 || a2 == 2838 || a2 == 869;\n  v34 = v10;\n  if ( cocos2d::CCArray::count(a5) )\n  {\n    v11 = cocos2d::CCArray::objectAtIndex(a5, 0);\n    v11->__vftable[16].encodeWithCoder(v11, (DS_Dictionary *)&v30);\n    for ( i = 1; i <= BottomRight; ++i )\n    {\n      cocos2d::CCPoint::CCPoint(&v31, &v30);\n      Neighbor = EditorUI::getNeighbor(v14, a2, v13, i, a4);\n      if ( Neighbor )\n      {\n        v17 = EditorUI::convertToBaseKey(v15, v11[18].m_eObjType);\n        SmartObjectKey = EditorUI::getSmartObjectKey(v17, i);\n        v19 = Neighbor->getPosition_0(Neighbor);\n        cocos2d::CCPoint::CCPoint(&v29, v19);\n        if ( v34 )\n        {\n          cocos2d::CCPoint::CCPoint(&v32, &v29);\n          SmartObjectKey = EditorUI::convertKeyBasedOnNeighbors(a1, SmartObjectKey, a2, v20, a3);\n        }\n        cocos2d::CCPoint::CCPoint(v33, &v29);\n        Object = EditorUI::createObject(a1, SmartObjectKey, v21);\n        cocos2d::CCArray::addObject(a5, Object);\n        cocos2d::CCArray::removeObject(a4, Neighbor, 1);\n      }\n    }\n    cocos2d::CCArray::addObject(a6, v11);\n    cocos2d::CCArray::removeObject(a5, v11, 1);\n    EditorUI::processSmartObjectsFromType(a1, a2, a3, a4, a5, a6);\n  }\n  else if ( cocos2d::CCArray::count(a4) )\n  {\n    v23 = cocos2d::CCArray::objectAtIndex(a4, 0);\n    v24 = (const struct cocos2d::CCPoint *)((__int64 (__fastcall *)(struct cocos2d::CCObject *))v23->__vftable[2].getTag)(v23);\n    cocos2d::CCPoint::CCPoint(&v29, v24);\n    RandomStartKey = EditorUI::getRandomStartKey(a2);\n    if ( v10 )\n    {\n      cocos2d::CCPoint::CCPoint(v33, &v29);\n      RandomStartKey = EditorUI::convertKeyBasedOnNeighbors(a1, RandomStartKey, a2, v26, a3);\n    }\n    cocos2d::CCPoint::CCPoint(v33, &v29);\n    v28 = EditorUI::createObject(a1, RandomStartKey, v27);\n    cocos2d::CCArray::addObject(a5, v28);\n    cocos2d::CCArray::removeObjectAtIndex(a4, 0, 1);\n    EditorUI::processSmartObjectsFromType(a1, a2, a3, a4, a5, a6);\n  }\n}", "assembly": "; \n; EditorUI::processSmartObjectsFromType from 0x140118430 to 0x1401186c0 (656 bytes)\n; \n; 6 xrefs:\n; > EditorUI::createSmartObjectsFromType @ 0x140118183\n; > EditorUI::processSmartObjectsFromType @ 0x1401185d8\n; > EditorUI::processSmartObjectsFromType @ 0x1401186a5\n; > <???> @ 0x14066f9e4\n; > <???> @ 0x14066f9f4\n; > <???> @ 0x1406c9378\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], r8                                               ; +0x0, 0x140118430\npush    rbx                                                            ; +0x5, 0x140118435\npush    rbp                                                            ; +0x6, 0x140118436\npush    rdi                                                            ; +0x7, 0x140118437\npush    r12                                                            ; +0x8, 0x140118438\npush    r14                                                            ; +0xa, 0x14011843a\npush    r15                                                            ; +0xc, 0x14011843c\nsub     rsp, 68h                                                       ; +0xe, 0x14011843e\nmov     r14, r9                                                        ; +0x12, 0x140118442\nmov     rbp, r8                                                        ; +0x15, 0x140118445\nmov     edi, edx                                                       ; +0x18, 0x140118448\nmov     r15, rcx                                                       ; +0x1a, 0x14011844a\ncmp     edx, 0A8Fh                                                     ; +0x1d, 0x14011844d\njz      short loc_140118469                                            ; +0x23, 0x140118453\ncmp     edx, 0B16h                                                     ; +0x25, 0x140118455\njz      short loc_140118469                                            ; +0x2b, 0x14011845b\ncmp     edx, 365h                                                      ; +0x2d, 0x14011845d\njz      short loc_140118469                                            ; +0x33, 0x140118463\nxor     bl, bl                                                         ; +0x35, 0x140118465\njmp     short loc_14011846B                                            ; +0x37, 0x140118467\nmov     bl, 1                                                          ; +0x39, 0x140118469\nmov     r12, [rsp+98h+arg_20]                                          ; +0x3b, 0x14011846b\nmov     rcx, r12                                                       ; +0x43, 0x140118473\nmov     [rsp+98h+arg_8], bl                                            ; +0x46, 0x140118476\nmov     [rsp+98h+arg_0], rsi                                           ; +0x4d, 0x14011847d\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x55, 0x140118485\ntest    eax, eax                                                       ; +0x5b, 0x14011848b\njz      loc_1401185E7                                                  ; +0x5d, 0x14011848d\nxor     edx, edx                                                       ; +0x63, 0x140118493\nmov     [rsp+98h+var_38], r13                                          ; +0x65, 0x140118495\nmov     rcx, r12                                                       ; +0x6a, 0x14011849a\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x6d, 0x14011849d\nlea     rdx, [rsp+98h+var_60]                                          ; +0x73, 0x1401184a3\nmov     rcx, rax                                                       ; +0x78, 0x1401184a8\nmov     r13, rax                                                       ; +0x7b, 0x1401184ab\nmov     r8, [rax]                                                      ; +0x7e, 0x1401184ae\ncall    qword ptr [r8+4A8h]                                            ; +0x81, 0x1401184b1\nmov     ebx, 1                                                         ; +0x88, 0x1401184b8\nnop     dword ptr [rax]                                                ; +0x8d, 0x1401184bd\nlea     rdx, [rsp+98h+var_60]                                          ; +0x90, 0x1401184c0\nlea     rcx, [rsp+98h+var_58]                                          ; +0x95, 0x1401184c5\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x9a, 0x1401184ca\nmov     r9d, ebx                                                       ; +0xa0, 0x1401184d0\nmov     [rsp+98h+var_78], r14                                          ; +0xa3, 0x1401184d3\nmov     r8, rax                                                        ; +0xa8, 0x1401184d8\nmov     edx, edi                                                       ; +0xab, 0x1401184db\ncall    EditorUI__getNeighbor                                          ; +0xad, 0x1401184dd\nmov     rsi, rax                                                       ; +0xb2, 0x1401184e2\ntest    rax, rax                                                       ; +0xb5, 0x1401184e5\njz      loc_140118590                                                  ; +0xb8, 0x1401184e8\nmov     edx, [r13+40Ch]                                                ; +0xbe, 0x1401184ee\ncall    EditorUI__convertToBaseKey                                     ; +0xc5, 0x1401184f5\nmov     ecx, eax                                                       ; +0xca, 0x1401184fa\nmov     edx, ebx                                                       ; +0xcc, 0x1401184fc\ncall    EditorUI__getSmartObjectKey                                    ; +0xce, 0x1401184fe\nmov     rdx, [rsi]                                                     ; +0xd3, 0x140118503\nmov     rcx, rsi                                                       ; +0xd6, 0x140118506\nmov     ebp, eax                                                       ; +0xd9, 0x140118509\ncall    qword ptr [rdx+0C8h]                                           ; +0xdb, 0x14011850b\nmov     rdx, rax                                                       ; +0xe1, 0x140118511\nlea     rcx, [rsp+98h+var_68]                                          ; +0xe4, 0x140118514\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0xe9, 0x140118519\ncmp     [rsp+98h+arg_8], 0                                             ; +0xef, 0x14011851f\njz      short loc_140118558                                            ; +0xf7, 0x140118527\nlea     rdx, [rsp+98h+var_68]                                          ; +0xf9, 0x140118529\nlea     rcx, [rsp+98h+var_50]                                          ; +0xfe, 0x14011852e\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x103, 0x140118533\nmov     r8d, edi                                                       ; +0x109, 0x140118539\nmov     edx, ebp                                                       ; +0x10c, 0x14011853c\nmov     r9, rax                                                        ; +0x10e, 0x14011853e\nmov     rcx, r15                                                       ; +0x111, 0x140118541\nmov     rax, [rsp+98h+arg_10]                                          ; +0x114, 0x140118544\nmov     [rsp+98h+var_78], rax                                          ; +0x11c, 0x14011854c\ncall    EditorUI__convertKeyBasedOnNeighbors                           ; +0x121, 0x140118551\nmov     ebp, eax                                                       ; +0x126, 0x140118556\nlea     rdx, [rsp+98h+var_68]                                          ; +0x128, 0x140118558\nlea     rcx, [rsp+98h+var_48]                                          ; +0x12d, 0x14011855d\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x132, 0x140118562\nmov     edx, ebp                                                       ; +0x138, 0x140118568\nmov     rcx, r15                                                       ; +0x13a, 0x14011856a\nmov     r8, rax                                                        ; +0x13d, 0x14011856d\ncall    EditorUI__createObject                                         ; +0x140, 0x140118570\nmov     rdx, rax                                                       ; +0x145, 0x140118575\nmov     rcx, r12                                                       ; +0x148, 0x140118578\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x14b, 0x14011857b\nmov     r8b, 1                                                         ; +0x151, 0x140118581\nmov     rdx, rsi                                                       ; +0x154, 0x140118584\nmov     rcx, r14                                                       ; +0x157, 0x140118587\ncall    cs:?removeObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@_N@Z; cocos2d::CCArray::removeObject(cocos2d::CCObject *,bool) ; +0x15a, 0x14011858a\ninc     ebx                                                            ; +0x160, 0x140118590\ncmp     ebx, 8                                                         ; +0x162, 0x140118592\njle     loc_1401184C0                                                  ; +0x165, 0x140118595\nmov     rbx, [rsp+98h+arg_28]                                          ; +0x16b, 0x14011859b\nmov     rdx, r13                                                       ; +0x173, 0x1401185a3\nmov     rcx, rbx                                                       ; +0x176, 0x1401185a6\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x179, 0x1401185a9\nmov     r8b, 1                                                         ; +0x17f, 0x1401185af\nmov     rdx, r13                                                       ; +0x182, 0x1401185b2\nmov     rcx, r12                                                       ; +0x185, 0x1401185b5\ncall    cs:?removeObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@_N@Z; cocos2d::CCArray::removeObject(cocos2d::CCObject *,bool) ; +0x188, 0x1401185b8\nmov     r8, [rsp+98h+arg_10]                                           ; +0x18e, 0x1401185be\nmov     r9, r14                                                        ; +0x196, 0x1401185c6\nmov     edx, edi                                                       ; +0x199, 0x1401185c9\nmov     [rsp+98h+var_70], rbx                                          ; +0x19b, 0x1401185cb\nmov     rcx, r15                                                       ; +0x1a0, 0x1401185d0\nmov     [rsp+98h+var_78], r12                                          ; +0x1a3, 0x1401185d3\ncall    EditorUI__processSmartObjectsFromType                          ; +0x1a8, 0x1401185d8\nmov     r13, [rsp+98h+var_38]                                          ; +0x1ad, 0x1401185dd\njmp     loc_1401186AA                                                  ; +0x1b2, 0x1401185e2\nmov     rcx, r14                                                       ; +0x1b7, 0x1401185e7\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x1ba, 0x1401185ea\ntest    eax, eax                                                       ; +0x1c0, 0x1401185f0\njz      loc_1401186AA                                                  ; +0x1c2, 0x1401185f2\nxor     edx, edx                                                       ; +0x1c8, 0x1401185f8\nmov     rcx, r14                                                       ; +0x1ca, 0x1401185fa\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x1cd, 0x1401185fd\nmov     rcx, rax                                                       ; +0x1d3, 0x140118603\nmov     rdx, [rax]                                                     ; +0x1d6, 0x140118606\ncall    qword ptr [rdx+0C8h]                                           ; +0x1d9, 0x140118609\nmov     rdx, rax                                                       ; +0x1df, 0x14011860f\nlea     rcx, [rsp+98h+var_68]                                          ; +0x1e2, 0x140118612\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x1e7, 0x140118617\nmov     ecx, edi                                                       ; +0x1ed, 0x14011861d\ncall    EditorUI__getRandomStartKey                                    ; +0x1ef, 0x14011861f\nmov     esi, eax                                                       ; +0x1f4, 0x140118624\ntest    bl, bl                                                         ; +0x1f6, 0x140118626\njz      short loc_140118651                                            ; +0x1f8, 0x140118628\nlea     rdx, [rsp+98h+var_68]                                          ; +0x1fa, 0x14011862a\nlea     rcx, [rsp+98h+var_48]                                          ; +0x1ff, 0x14011862f\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x204, 0x140118634\nmov     r8d, edi                                                       ; +0x20a, 0x14011863a\nmov     [rsp+98h+var_78], rbp                                          ; +0x20d, 0x14011863d\nmov     r9, rax                                                        ; +0x212, 0x140118642\nmov     edx, esi                                                       ; +0x215, 0x140118645\nmov     rcx, r15                                                       ; +0x217, 0x140118647\ncall    EditorUI__convertKeyBasedOnNeighbors                           ; +0x21a, 0x14011864a\nmov     esi, eax                                                       ; +0x21f, 0x14011864f\nlea     rdx, [rsp+98h+var_68]                                          ; +0x221, 0x140118651\nlea     rcx, [rsp+98h+var_48]                                          ; +0x226, 0x140118656\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x22b, 0x14011865b\nmov     edx, esi                                                       ; +0x231, 0x140118661\nmov     rcx, r15                                                       ; +0x233, 0x140118663\nmov     r8, rax                                                        ; +0x236, 0x140118666\ncall    EditorUI__createObject                                         ; +0x239, 0x140118669\nmov     rdx, rax                                                       ; +0x23e, 0x14011866e\nmov     rcx, r12                                                       ; +0x241, 0x140118671\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x244, 0x140118674\nmov     r8b, 1                                                         ; +0x24a, 0x14011867a\nxor     edx, edx                                                       ; +0x24d, 0x14011867d\nmov     rcx, r14                                                       ; +0x24f, 0x14011867f\ncall    cs:?removeObjectAtIndex@CCArray@cocos2d@@QEAAXI_N@Z; cocos2d::CCArray::removeObjectAtIndex(uint,bool) ; +0x252, 0x140118682\nmov     rax, [rsp+98h+arg_28]                                          ; +0x258, 0x140118688\nmov     r9, r14                                                        ; +0x260, 0x140118690\nmov     [rsp+98h+var_70], rax                                          ; +0x263, 0x140118693\nmov     r8, rbp                                                        ; +0x268, 0x140118698\nmov     edx, edi                                                       ; +0x26b, 0x14011869b\nmov     [rsp+98h+var_78], r12                                          ; +0x26d, 0x14011869d\nmov     rcx, r15                                                       ; +0x272, 0x1401186a2\ncall    EditorUI__processSmartObjectsFromType                          ; +0x275, 0x1401186a5\nmov     rsi, [rsp+98h+arg_0]                                           ; +0x27a, 0x1401186aa\nadd     rsp, 68h                                                       ; +0x282, 0x1401186b2\npop     r15                                                            ; +0x286, 0x1401186b6\npop     r14                                                            ; +0x288, 0x1401186b8\npop     r12                                                            ; +0x28a, 0x1401186ba\npop     rdi                                                            ; +0x28c, 0x1401186bc\npop     rbp                                                            ; +0x28d, 0x1401186bd\npop     rbx                                                            ; +0x28e, 0x1401186be\nretn                                                                   ; +0x28f, 0x1401186bf", "xrefs": ["EditorUI::createSmartObjectsFromType @ 0x140118183", "EditorUI::processSmartObjectsFromType @ 0x1401185d8", "EditorUI::processSmartObjectsFromType @ 0x1401186a5", "<???> @ 0x14066f9e4", "<???> @ 0x14066f9f4", "<???> @ 0x1406c9378"], "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"}