{"type": "func", "start": 5370345920, "end": 5370346461, "name": "EditorSoundBrowserLayer::layoutCells", "pseudocode": "// \n// EditorSoundBrowserLayer::layoutCells from 0x14018f9c0 to 0x14018fbdd (541 bytes)\n// \n// 7 xrefs:\n// > EditorSoundBrowserLayer::loadCurrentPage @ 0x14018f434\n// > EditorSoundBrowserLayer::loadCurrentPage @ 0x14018f8e7\n// > EditorSoundBrowserLayer::loadEditorSoundsFinished @ 0x14019048e\n// > EditorSoundBrowserLayer::loadEditorSoundsFailed @ 0x14019053d\n// > <???> @ 0x14089f41c\n// > <???> @ 0x14089f42c\n// > <???> @ 0x14091922c\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:27:42 +0000\n// \n\n__int64 __fastcall EditorSoundBrowserLayer::layoutCells(__int64 a1, cocos2d::CCObject *a2, const char *a3)\n{\n  __int64 v6; // rcx\n  __int64 v7; // rdx\n  unsigned int v8; // eax\n  int v9; // edx\n  int v10; // r9d\n  __int64 v11; // rax\n  __int64 v12; // rcx\n  __int64 v13; // rcx\n  __int64 v14; // rax\n  __int64 *v15; // rdi\n  __int64 v16; // rbx\n  __int64 v17; // rax\n  __int64 v19; // rax\n  struct cocos2d::CCLabelBMFont *v20; // rdi\n  void (__fastcall **v21)(__int64, __int16 *); // rdx\n  __int64 v22; // rbx\n  __int64 v23; // rax\n  __int64 v24; // [rsp+20h] [rbp-48h]\n  __int64 v25; // [rsp+28h] [rbp-40h]\n  int v26; // [rsp+30h] [rbp-38h]\n  __int16 v27; // [rsp+70h] [rbp+8h] BYREF\n  char v28; // [rsp+72h] [rbp+Ah]\n  float v29; // [rsp+78h] [rbp+10h] BYREF\n  float v30; // [rsp+7Ch] [rbp+14h]\n  float v31; // [rsp+88h] [rbp+20h] BYREF\n  float v32; // [rsp+8Ch] [rbp+24h]\n\n  EditorSoundBrowserLayer::clearCells(a1, (__int64)a2, (__int64)a3);\n  *(_QWORD *)(a1 + 1088) = a2;\n  if ( a2 && (cocos2d::CCObject::retain(a2), cocos2d::CCArray::count(a2)) )\n  {\n    v7 = a1 + 1016;\n    v26 = *(_DWORD *)(a1 + 1200);\n    if ( !a1 )\n      v7 = 0;\n    v8 = (unsigned int)CustomListView::create(\n                         a2,\n                         v7,\n                         180.0,\n                         340.0,\n                         v24,\n                         (unsigned int)(*(_DWORD *)(a1 + 1032) == 1) + 34);\n    LOBYTE(v25) = 0;\n    v11 = GJCommentListLayer::create(v8, v9, -14201459, v10, 1127481344, v25, v26);\n    v12 = *(_QWORD *)(a1 + 584);\n    *(_QWORD *)(a1 + 1040) = v11;\n    (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v12 + 456LL))(v12, v11, 5);\n    v14 = cocos2d::CCDirector::sharedDirector(v13);\n    cocos2d::CCDirector::getWinSize(v14, &v29);\n    v15 = *(__int64 **)(a1 + 1040);\n    v16 = *v15;\n    cocos2d::CCPoint::CCPoint(\n      (cocos2d::CCPoint *)&v27,\n      (float)(v29 - 340.0) * 0.5,\n      (float)((float)(v30 - 180.0) * 0.5) - 30.0);\n    return (*(__int64 (__fastcall **)(__int64 *, __int64))(v16 + 184))(v15, v17);\n  }\n  else\n  {\n    v19 = cocos2d::CCDirector::sharedDirector(v6);\n    cocos2d::CCDirector::getWinSize(v19, &v31);\n    v20 = cocos2d::CCLabelBMFont::create(a3, (const char *)&qword_140704F78);\n    (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v20 + 160LL))(v20);\n    v27 = -14136;\n    v21 = *((void (__fastcall ***)(__int64, __int16 *))v20 + 46);\n    v28 = -56;\n    (*v21)((__int64)v20 + 368, &v27);\n    v22 = *(_QWORD *)v20;\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v27, v31 * 0.5, (float)(v32 * 0.5) - 10.0);\n    (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v22 + 184))(v20, v23);\n    (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(*(_QWORD *)v20 + 64LL))(v20, 9999);\n    return (*(__int64 (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(\n             *(_QWORD *)(a1 + 584),\n             v20,\n             5);\n  }\n}", "assembly": "; \n; EditorSoundBrowserLayer::layoutCells from 0x14018f9c0 to 0x14018fbdd (541 bytes)\n; \n; 7 xrefs:\n; > EditorSoundBrowserLayer::loadCurrentPage @ 0x14018f434\n; > EditorSoundBrowserLayer::loadCurrentPage @ 0x14018f8e7\n; > EditorSoundBrowserLayer::loadEditorSoundsFinished @ 0x14019048e\n; > EditorSoundBrowserLayer::loadEditorSoundsFailed @ 0x14019053d\n; > <???> @ 0x14089f41c\n; > <???> @ 0x14089f42c\n; > <???> @ 0x14091922c\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:27:42 +0000\n; \npush    rbx                                                            ; +0x0, 0x14018f9c0\npush    rsi                                                            ; +0x2, 0x14018f9c2\npush    rdi                                                            ; +0x3, 0x14018f9c3\nsub     rsp, 50h                                                       ; +0x4, 0x14018f9c4\nmov     rdi, r8                                                        ; +0x8, 0x14018f9c8\nmov     rbx, rdx                                                       ; +0xb, 0x14018f9cb\nmov     rsi, rcx                                                       ; +0xe, 0x14018f9ce\ncall    EditorSoundBrowserLayer__clearCells                            ; +0x11, 0x14018f9d1\nmov     [rsi+440h], rbx                                                ; +0x16, 0x14018f9d6\ntest    rbx, rbx                                                       ; +0x1d, 0x14018f9dd\njz      loc_14018FB08                                                  ; +0x20, 0x14018f9e0\nmov     rcx, rbx                                                       ; +0x26, 0x14018f9e6\ncall    cs:?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x29, 0x14018f9e9\nmov     rcx, rbx                                                       ; +0x2f, 0x14018f9ef\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x32, 0x14018f9f2\ntest    eax, eax                                                       ; +0x38, 0x14018f9f8\njz      loc_14018FB08                                                  ; +0x3a, 0x14018f9fa\nmovss   xmm0, dword ptr [rsi+4B0h]                                     ; +0x40, 0x14018fa00\nlea     rdx, [rsi+3F8h]                                                ; +0x48, 0x14018fa08\nmovss   xmm3, cs:dword_1408359D4                                       ; +0x4f, 0x14018fa0f\nxor     ecx, ecx                                                       ; +0x57, 0x14018fa17\ncmp     dword ptr [rsi+408h], 1                                        ; +0x59, 0x14018fa19\nmov     eax, ecx                                                       ; +0x60, 0x14018fa20\nmovaps  [rsp+68h+var_28], xmm6                                         ; +0x62, 0x14018fa22\nmovss   xmm6, cs:dword_1408358B8                                       ; +0x67, 0x14018fa27\nsetz    al                                                             ; +0x6f, 0x14018fa2f\nadd     eax, 22h ; '\"'                                                 ; +0x72, 0x14018fa32\nmovss   [rsp+68h+var_38], xmm0                                         ; +0x75, 0x14018fa35\ntest    rsi, rsi                                                       ; +0x7b, 0x14018fa3b\nmov     dword ptr [rsp+68h+var_40], eax                                ; +0x7e, 0x14018fa3e\nmovaps  xmm2, xmm6                                                     ; +0x82, 0x14018fa42\ncmovz   rdx, rcx                                                       ; +0x85, 0x14018fa45\nmov     rcx, rbx                                                       ; +0x89, 0x14018fa49\ncall    CustomListView__create                                         ; +0x8c, 0x14018fa4c\nmovss   xmm3, cs:dword_1408359D4                                       ; +0x91, 0x14018fa51\nmov     r8d, 0FF274D8Dh                                                ; +0x99, 0x14018fa59\nmov     rcx, rax                                                       ; +0x9f, 0x14018fa5f\nmov     byte ptr [rsp+68h+var_40], 0                                   ; +0xa2, 0x14018fa62\nmovss   dword ptr [rsp+68h+var_48], xmm6                               ; +0xa7, 0x14018fa67\ncall    GJCommentListLayer__create                                     ; +0xad, 0x14018fa6d\nmov     rcx, [rsi+248h]                                                ; +0xb2, 0x14018fa72\nmov     r8d, 5                                                         ; +0xb9, 0x14018fa79\nmov     [rsi+410h], rax                                                ; +0xbf, 0x14018fa7f\nmov     rdx, [rcx]                                                     ; +0xc6, 0x14018fa86\nmov     r9, [rdx+1C8h]                                                 ; +0xc9, 0x14018fa89\nmov     rdx, rax                                                       ; +0xd0, 0x14018fa90\ncall    r9                                                             ; +0xd3, 0x14018fa93\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xd6, 0x14018fa96\nmov     rcx, rax                                                       ; +0xdc, 0x14018fa9c\nlea     rdx, [rsp+68h+arg_8]                                           ; +0xdf, 0x14018fa9f\ncall    cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0xe4, 0x14018faa4\nmovss   xmm2, [rsp+68h+arg_C]                                          ; +0xea, 0x14018faaa\nlea     rcx, [rsp+68h+arg_0]                                           ; +0xf0, 0x14018fab0\nmovss   xmm1, [rsp+68h+arg_8]                                          ; +0xf5, 0x14018fab5\nsubss   xmm2, xmm6                                                     ; +0xfb, 0x14018fabb\nsubss   xmm1, cs:dword_1408359D4                                       ; +0xff, 0x14018fabf\nmov     rdi, [rsi+410h]                                                ; +0x107, 0x14018fac7\nmulss   xmm2, cs:dword_140834F20                                       ; +0x10e, 0x14018face\nmov     rbx, [rdi]                                                     ; +0x116, 0x14018fad6\nmulss   xmm1, cs:dword_140834F20                                       ; +0x119, 0x14018fad9\nsubss   xmm2, cs:dword_140835624                                       ; +0x121, 0x14018fae1\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x129, 0x14018fae9\nmov     rdx, rax                                                       ; +0x12f, 0x14018faef\nmov     rcx, rdi                                                       ; +0x132, 0x14018faf2\ncall    qword ptr [rbx+0B8h]                                           ; +0x135, 0x14018faf5\nmovaps  xmm6, [rsp+68h+var_28]                                         ; +0x13b, 0x14018fafb\nadd     rsp, 50h                                                       ; +0x140, 0x14018fb00\npop     rdi                                                            ; +0x144, 0x14018fb04\npop     rsi                                                            ; +0x145, 0x14018fb05\npop     rbx                                                            ; +0x146, 0x14018fb06\nretn                                                                   ; +0x147, 0x14018fb07\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x148, 0x14018fb08\nmov     rcx, rax                                                       ; +0x14e, 0x14018fb0e\nlea     rdx, [rsp+68h+arg_18]                                          ; +0x151, 0x14018fb11\ncall    cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x159, 0x14018fb19\nlea     rdx, qword_140704F78                                           ; +0x15f, 0x14018fb1f\nmov     rcx, rdi                                                       ; +0x166, 0x14018fb26\ncall    cs:?create@CCLabelBMFont@cocos2d@@SAPEAV12@PEBD0@Z; cocos2d::CCLabelBMFont::create(char const *,char const *) ; +0x169, 0x14018fb29\nmovss   xmm1, cs:dword_140834F64                                       ; +0x16f, 0x14018fb2f\nmov     rdi, rax                                                       ; +0x177, 0x14018fb37\nmov     rcx, [rax]                                                     ; +0x17a, 0x14018fb3a\nmov     rdx, [rcx+0A0h]                                                ; +0x17d, 0x14018fb3d\nmov     rcx, rax                                                       ; +0x184, 0x14018fb44\ncall    rdx                                                            ; +0x187, 0x14018fb47\nlea     rcx, [rdi+170h]                                                ; +0x189, 0x14018fb49\nmov     [rsp+68h+arg_0], 0C8C8h                                        ; +0x190, 0x14018fb50\nmov     rdx, [rcx]                                                     ; +0x197, 0x14018fb57\nmov     [rsp+68h+arg_2], 0C8h                                          ; +0x19a, 0x14018fb5a\nmov     r8, [rdx]                                                      ; +0x19f, 0x14018fb5f\nlea     rdx, [rsp+68h+arg_0]                                           ; +0x1a2, 0x14018fb62\ncall    r8                                                             ; +0x1a7, 0x14018fb67\nmovss   xmm2, [rsp+68h+arg_1C]                                         ; +0x1aa, 0x14018fb6a\nlea     rcx, [rsp+68h+arg_0]                                           ; +0x1b3, 0x14018fb73\nmulss   xmm2, cs:dword_140834F20                                       ; +0x1b8, 0x14018fb78\nmov     rbx, [rdi]                                                     ; +0x1c0, 0x14018fb80\nmovss   xmm1, [rsp+68h+arg_18]                                         ; +0x1c3, 0x14018fb83\nmulss   xmm1, cs:dword_140834F20                                       ; +0x1cc, 0x14018fb8c\nsubss   xmm2, cs:flt_1408354EC                                         ; +0x1d4, 0x14018fb94\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x1dc, 0x14018fb9c\nmov     rdx, rax                                                       ; +0x1e2, 0x14018fba2\nmov     rcx, rdi                                                       ; +0x1e5, 0x14018fba5\ncall    qword ptr [rbx+0B8h]                                           ; +0x1e8, 0x14018fba8\nmov     rax, [rdi]                                                     ; +0x1ee, 0x14018fbae\nmov     edx, 270Fh                                                     ; +0x1f1, 0x14018fbb1\nmov     rcx, rdi                                                       ; +0x1f6, 0x14018fbb6\ncall    qword ptr [rax+40h]                                            ; +0x1f9, 0x14018fbb9\nmov     rcx, [rsi+248h]                                                ; +0x1fc, 0x14018fbbc\nmov     r8d, 5                                                         ; +0x203, 0x14018fbc3\nmov     rdx, rdi                                                       ; +0x209, 0x14018fbc9\nmov     rax, [rcx]                                                     ; +0x20c, 0x14018fbcc\ncall    qword ptr [rax+1C8h]                                           ; +0x20f, 0x14018fbcf\nadd     rsp, 50h                                                       ; +0x215, 0x14018fbd5\npop     rdi                                                            ; +0x219, 0x14018fbd9\npop     rsi                                                            ; +0x21a, 0x14018fbda\npop     rbx                                                            ; +0x21b, 0x14018fbdb\nretn                                                                   ; +0x21c, 0x14018fbdc", "xrefs": ["EditorSoundBrowserLayer::loadCurrentPage @ 0x14018f434", "EditorSoundBrowserLayer::loadCurrentPage @ 0x14018f8e7", "EditorSoundBrowserLayer::loadEditorSoundsFinished @ 0x14019048e", "EditorSoundBrowserLayer::loadEditorSoundsFailed @ 0x14019053d", "<???> @ 0x14089f41c", "<???> @ 0x14089f42c", "<???> @ 0x14091922c"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}