{"type": "func", "start": 5372375376, "end": 5372376095, "name": "GJGarageLayer::getItems", "pseudocode": "// \n// GJGarageLayer::getItems from 0x14037f150 to 0x14037f41f (719 bytes)\n// \n// 3 xrefs:\n// > GJGarageLayer::setupPage @ 0x14037eacf\n// > GJGarageLayer::getItems_1 @ 0x14037f130\n// > <???> @ 0x1409228a4\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:31:04 +0000\n// \n\n// Hidden C++ exception states: #wind=4\n__int64 __fastcall GJGarageLayer::getItems(__int64 a1, int a2, int a3, unsigned int a4, int a5)\n{\n  __int64 v8; // rcx\n  unsigned int v9; // r13d\n  __int64 v10; // rcx\n  __int64 v11; // r14\n  int v12; // ecx\n  int v13; // r12d\n  unsigned int v14; // esi\n  __int64 v15; // rcx\n  char isIconUnlocked; // r15\n  __int64 *BrowserItem; // r14\n  __int64 *v18; // rax\n  __int64 *v19; // rdi\n  __int64 v20; // rbx\n  __int64 v21; // rax\n  __int64 v22; // rbx\n  float v23; // xmm6_4\n  float *v24; // rax\n  __int64 v25; // rax\n  cocos2d::CCArray *v26; // rbx\n  struct cocos2d::CCSprite *v28; // [rsp+30h] [rbp-98h]\n  void *v29; // [rsp+38h] [rbp-90h]\n  void *v30; // [rsp+40h] [rbp-88h]\n  char v31[40]; // [rsp+48h] [rbp-80h] BYREF\n  void *v32; // [rsp+D0h] [rbp+8h]\n  cocos2d::CCArray *v33; // [rsp+D0h] [rbp+8h]\n  unsigned int v34; // [rsp+E8h] [rbp+20h] BYREF\n\n  v34 = a4;\n  *(_DWORD *)sub_14010ECC0((__int64 *)(a1 + 520), (int *)&v34) = a3;\n  if ( !qword_14090BFD0 )\n  {\n    v32 = operator new(0x6E8u);\n    qword_14090BFD0 = GameManager::GameManager((__int64)v32);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n  }\n  v9 = GameManager::iconTypeToUnlockType(v8, v34);\n  v11 = cocos2d::CCArray::create(v10);\n  v33 = (cocos2d::CCArray *)v11;\n  v28 = cocos2d::CCSprite::createWithSpriteFrameName(\"playerSquare_001.png\");\n  *(_QWORD *)(a1 + 552) = 0;\n  v12 = 36 * a3;\n  v13 = 36 * a3 + 36;\n  if ( a2 < v13 )\n    v13 = a2;\n  v14 = v12 + 1;\n  if ( v12 + 1 <= v13 )\n  {\n    while ( 1 )\n    {\n      v15 = qword_14090BFD0;\n      if ( !qword_14090BFD0 )\n      {\n        v29 = operator new(0x6E8u);\n        qword_14090BFD0 = GameManager::GameManager((__int64)v29);\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n        v15 = qword_14090BFD0;\n      }\n      isIconUnlocked = GameManager::isIconUnlocked(v15, v14, v34);\n      BrowserItem = (__int64 *)GJItemIcon::createBrowserItem(v9, v14);\n      if ( BrowserItem )\n        break;\n      v26 = v33;\nLABEL_19:\n      if ( (int)++v14 > v13 )\n        return (__int64)v26;\n    }\n    GJItemIcon::scaleForType(v9);\n    (*(void (__fastcall **)(__int64 *))(*BrowserItem + 160))(BrowserItem);\n    v30 = operator new(0x208u);\n    v18 = (__int64 *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v30);\n    v19 = v18;\n    if ( v18 )\n    {\n      if ( CCMenuItemSpriteExtra::init(v18, BrowserItem, 0, a1, (__int64)GJGarageLayer::onSelect) )\n      {\n        cocos2d::CCObject::autorelease((cocos2d::CCObject *)v19);\nLABEL_14:\n        v20 = *v19;\n        v21 = (*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v28 + 320LL))(v28);\n        (*(void (__fastcall **)(__int64 *, __int64))(v20 + 312))(v19, v21);\n        v22 = *BrowserItem;\n        v23 = *(float *)((*(__int64 (__fastcall **)(__int64 *))(*v19 + 320))(v19) + 4) * 0.5;\n        v24 = (float *)(*(__int64 (__fastcall **)(__int64 *))(*v19 + 320))(v19);\n        cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v31, *v24 * 0.5, v23);\n        (*(void (__fastcall **)(__int64 *, __int64))(v22 + 184))(BrowserItem, v25);\n        (*(void (__fastcall **)(__int64 *, _QWORD))(*v19 + 64))(v19, v14);\n        *((_DWORD *)v19 + 128) = v34;\n        v26 = v33;\n        cocos2d::CCArray::addObject(v33, (struct cocos2d::CCObject *)v19);\n        if ( v14 == a5 )\n          *(_QWORD *)(a1 + 552) = v19;\n        if ( !isIconUnlocked )\n          GJItemIcon::changeToLockedState(BrowserItem);\n        goto LABEL_19;\n      }\n      (*(void (__fastcall **)(__int64 *, __int64))(*v19 + 8))(v19, 1);\n    }\n    v19 = nullptr;\n    goto LABEL_14;\n  }\n  return v11;\n}", "assembly": "; \n; GJGarageLayer::getItems from 0x14037f150 to 0x14037f41f (719 bytes)\n; \n; 3 xrefs:\n; > GJGarageLayer::setupPage @ 0x14037eacf\n; > GJGarageLayer::getItems_1 @ 0x14037f130\n; > <???> @ 0x1409228a4\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:31:04 +0000\n; \nmov     rax, rsp                                                       ; +0x0, 0x14037f150\nmov     [rax+10h], rbx                                                 ; +0x3, 0x14037f153\nmov     [rax+20h], r9d                                                 ; +0x7, 0x14037f157\npush    rbp                                                            ; +0xb, 0x14037f15b\npush    rsi                                                            ; +0xc, 0x14037f15c\npush    rdi                                                            ; +0xd, 0x14037f15d\npush    r12                                                            ; +0xe, 0x14037f15e\npush    r13                                                            ; +0x10, 0x14037f160\npush    r14                                                            ; +0x12, 0x14037f162\npush    r15                                                            ; +0x14, 0x14037f164\nsub     rsp, 90h                                                       ; +0x16, 0x14037f166\nmovaps  xmmword ptr [rax-48h], xmm6                                    ; +0x1d, 0x14037f16d\nmovaps  xmmword ptr [rax-58h], xmm7                                    ; +0x21, 0x14037f171\nmovaps  xmmword ptr [rax-68h], xmm8                                    ; +0x25, 0x14037f175\nmovaps  xmmword ptr [rax-78h], xmm9                                    ; +0x2a, 0x14037f17a\nmov     ebx, r8d                                                       ; +0x2f, 0x14037f17f\nmov     edi, edx                                                       ; +0x32, 0x14037f182\nmov     rbp, rcx                                                       ; +0x34, 0x14037f184\nadd     rcx, 208h                                                      ; +0x37, 0x14037f187\nlea     rdx, [rax+20h]                                                 ; +0x3e, 0x14037f18e\ncall    sub_14010ECC0                                                  ; +0x42, 0x14037f192\nmov     [rax], ebx                                                     ; +0x47, 0x14037f197\ncmp     cs:qword_14090BFD0, 0                                          ; +0x49, 0x14037f199\njnz     short loc_14037F1D1                                            ; +0x51, 0x14037f1a1\nmov     ecx, 6E8h; Size                                                ; +0x53, 0x14037f1a3\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x58, 0x14037f1a8\nmov     [rsp+0C8h+arg_0], rax                                          ; +0x5d, 0x14037f1ad\nmov     rcx, rax                                                       ; +0x65, 0x14037f1b5\ncall    GameManager__GameManager                                       ; +0x68, 0x14037f1b8\nnop                                                                    ; +0x6d, 0x14037f1bd\nmov     cs:qword_14090BFD0, rax                                        ; +0x6e, 0x14037f1be\nmov     rcx, [rax]                                                     ; +0x75, 0x14037f1c5\nmov     rdx, [rcx+48h]                                                 ; +0x78, 0x14037f1c8\nmov     rcx, rax                                                       ; +0x7c, 0x14037f1cc\ncall    rdx                                                            ; +0x7f, 0x14037f1cf\nmov     edx, [rsp+0C8h+arg_18]                                         ; +0x81, 0x14037f1d1\ncall    GameManager__iconTypeToUnlockType                              ; +0x88, 0x14037f1d8\nmov     r13d, eax                                                      ; +0x8d, 0x14037f1dd\ncall    cs:?create@CCArray@cocos2d@@SAPEAV12@XZ; cocos2d::CCArray::create(void) ; +0x90, 0x14037f1e0\nmov     r14, rax                                                       ; +0x96, 0x14037f1e6\nmov     [rsp+0C8h+arg_0], rax                                          ; +0x99, 0x14037f1e9\nlea     rcx, aPlayersquare00; \"playerSquare_001.png\"                   ; +0xa1, 0x14037f1f1\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0xa8, 0x14037f1f8\nmov     [rsp+0C8h+var_98], rax                                         ; +0xae, 0x14037f1fe\nmov     qword ptr [rbp+228h], 0                                        ; +0xb3, 0x14037f203\nlea     ecx, [rbx+rbx*8]                                               ; +0xbe, 0x14037f20e\nlea     ecx, ds:0[rcx*4]                                               ; +0xc1, 0x14037f211\nlea     r12d, [rcx+24h]                                                ; +0xc8, 0x14037f218\ncmp     edi, r12d                                                      ; +0xcc, 0x14037f21c\ncmovl   r12d, edi                                                      ; +0xcf, 0x14037f21f\nlea     esi, [rcx+1]                                                   ; +0xd3, 0x14037f223\ncmp     esi, r12d                                                      ; +0xd6, 0x14037f226\njg      loc_14037F3ED                                                  ; +0xd9, 0x14037f229\nmovss   xmm9, cs:dword_140834F20                                       ; +0xdf, 0x14037f22f\nmovss   xmm8, cs:flt_140835080                                         ; +0xe8, 0x14037f238\nlea     rbx, GJGarageLayer__onSelect                                   ; +0xf1, 0x14037f241\nmov     rcx, cs:qword_14090BFD0                                        ; +0xf8, 0x14037f248\ntest    rcx, rcx                                                       ; +0xff, 0x14037f24f\njnz     short loc_14037F286                                            ; +0x102, 0x14037f252\nmov     ecx, 6E8h; Size                                                ; +0x104, 0x14037f254\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x109, 0x14037f259\nmov     [rsp+0C8h+var_90], rax                                         ; +0x10e, 0x14037f25e\nmov     rcx, rax                                                       ; +0x113, 0x14037f263\ncall    GameManager__GameManager                                       ; +0x116, 0x14037f266\nnop                                                                    ; +0x11b, 0x14037f26b\nmov     cs:qword_14090BFD0, rax                                        ; +0x11c, 0x14037f26c\nmov     rcx, [rax]                                                     ; +0x123, 0x14037f273\nmov     rdx, [rcx+48h]                                                 ; +0x126, 0x14037f276\nmov     rcx, rax                                                       ; +0x12a, 0x14037f27a\ncall    rdx                                                            ; +0x12d, 0x14037f27d\nmov     rcx, cs:qword_14090BFD0                                        ; +0x12f, 0x14037f27f\nmov     r8d, [rsp+0C8h+arg_18]                                         ; +0x136, 0x14037f286\nmov     edx, esi                                                       ; +0x13e, 0x14037f28e\ncall    GameManager__isIconUnlocked                                    ; +0x140, 0x14037f290\nmovzx   r15d, al                                                       ; +0x145, 0x14037f295\nmov     edx, esi                                                       ; +0x149, 0x14037f299\nmov     ecx, r13d                                                      ; +0x14b, 0x14037f29b\ncall    GJItemIcon__createBrowserItem                                  ; +0x14e, 0x14037f29e\nmov     r14, rax                                                       ; +0x153, 0x14037f2a3\ntest    rax, rax                                                       ; +0x156, 0x14037f2a6\njz      loc_14037F3D5                                                  ; +0x159, 0x14037f2a9\nmov     ecx, r13d                                                      ; +0x15f, 0x14037f2af\ncall    GJItemIcon__scaleForType                                       ; +0x162, 0x14037f2b2\nmovaps  xmm7, xmm0                                                     ; +0x167, 0x14037f2b7\nmov     rcx, [r14]                                                     ; +0x16a, 0x14037f2ba\nmov     rdx, [rcx+0A0h]                                                ; +0x16d, 0x14037f2bd\nmovaps  xmm1, xmm0                                                     ; +0x174, 0x14037f2c4\nmov     rcx, r14                                                       ; +0x177, 0x14037f2c7\ncall    rdx                                                            ; +0x17a, 0x14037f2ca\nmov     ecx, 208h; Size                                                ; +0x17c, 0x14037f2cc\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x181, 0x14037f2d1\nmov     [rsp+0C8h+var_88], rax                                         ; +0x186, 0x14037f2d6\nmov     rcx, rax                                                       ; +0x18b, 0x14037f2db\ncall    CCMenuItemSpriteExtra__CCMenuItemSpriteExtra                   ; +0x18e, 0x14037f2de\nmov     rdi, rax                                                       ; +0x193, 0x14037f2e3\ntest    rax, rax                                                       ; +0x196, 0x14037f2e6\njz      short loc_14037F31B                                            ; +0x199, 0x14037f2e9\nmov     [rsp+0C8h+var_A8], rbx                                         ; +0x19b, 0x14037f2eb\nmov     r9, rbp                                                        ; +0x1a0, 0x14037f2f0\nxor     r8d, r8d                                                       ; +0x1a3, 0x14037f2f3\nmov     rdx, r14                                                       ; +0x1a6, 0x14037f2f6\nmov     rcx, rax                                                       ; +0x1a9, 0x14037f2f9\ncall    CCMenuItemSpriteExtra__init                                    ; +0x1ac, 0x14037f2fc\nmov     rcx, rdi                                                       ; +0x1b1, 0x14037f301\ntest    al, al                                                         ; +0x1b4, 0x14037f304\njz      short loc_14037F310                                            ; +0x1b6, 0x14037f306\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x1b8, 0x14037f308\njmp     short loc_14037F31D                                            ; +0x1be, 0x14037f30e\nmov     rax, [rdi]                                                     ; +0x1c0, 0x14037f310\nmov     edx, 1                                                         ; +0x1c3, 0x14037f313\ncall    qword ptr [rax+8]                                              ; +0x1c8, 0x14037f318\nxor     edi, edi                                                       ; +0x1cb, 0x14037f31b\nmov     rbx, [rdi]                                                     ; +0x1cd, 0x14037f31d\nmov     rcx, [rsp+0C8h+var_98]                                         ; +0x1d0, 0x14037f320\nmov     rax, [rcx]                                                     ; +0x1d5, 0x14037f325\ncall    qword ptr [rax+140h]                                           ; +0x1d8, 0x14037f328\nmov     rdx, rax                                                       ; +0x1de, 0x14037f32e\nmov     rcx, rdi                                                       ; +0x1e1, 0x14037f331\ncall    qword ptr [rbx+138h]                                           ; +0x1e4, 0x14037f334\nmov     rbx, [r14]                                                     ; +0x1ea, 0x14037f33a\nmov     rax, [rdi]                                                     ; +0x1ed, 0x14037f33d\nmov     rcx, rdi                                                       ; +0x1f0, 0x14037f340\ncall    qword ptr [rax+140h]                                           ; +0x1f3, 0x14037f343\nmovss   xmm6, dword ptr [rax+4]                                        ; +0x1f9, 0x14037f349\nmulss   xmm6, xmm9                                                     ; +0x1fe, 0x14037f34e\nmov     rax, [rdi]                                                     ; +0x203, 0x14037f353\nmov     rcx, rdi                                                       ; +0x206, 0x14037f356\ncall    qword ptr [rax+140h]                                           ; +0x209, 0x14037f359\nmovss   xmm1, dword ptr [rax]                                          ; +0x20f, 0x14037f35f\nmulss   xmm1, xmm9                                                     ; +0x213, 0x14037f363\nmovaps  xmm2, xmm6                                                     ; +0x218, 0x14037f368\nlea     rcx, [rsp+0C8h+var_80]                                         ; +0x21b, 0x14037f36b\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x220, 0x14037f370\nmov     rdx, rax                                                       ; +0x226, 0x14037f376\nmov     rcx, r14                                                       ; +0x229, 0x14037f379\ncall    qword ptr [rbx+0B8h]                                           ; +0x22c, 0x14037f37c\nmov     rax, [rdi]                                                     ; +0x232, 0x14037f382\nmov     edx, esi                                                       ; +0x235, 0x14037f385\nmov     rcx, rdi                                                       ; +0x237, 0x14037f387\ncall    qword ptr [rax+40h]                                            ; +0x23a, 0x14037f38a\nmov     eax, [rsp+0C8h+arg_18]                                         ; +0x23d, 0x14037f38d\nmov     [rdi+200h], eax                                                ; +0x244, 0x14037f394\nmov     rdx, rdi                                                       ; +0x24a, 0x14037f39a\nmov     rbx, [rsp+0C8h+arg_0]                                          ; +0x24d, 0x14037f39d\nmov     rcx, rbx                                                       ; +0x255, 0x14037f3a5\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x258, 0x14037f3a8\ncmp     esi, [rsp+0C8h+arg_20]                                         ; +0x25e, 0x14037f3ae\njnz     short loc_14037F3BE                                            ; +0x265, 0x14037f3b5\nmov     [rbp+228h], rdi                                                ; +0x267, 0x14037f3b7\ntest    r15b, r15b                                                     ; +0x26e, 0x14037f3be\njnz     short loc_14037F3DD                                            ; +0x271, 0x14037f3c1\nmovaps  xmm1, xmm8                                                     ; +0x273, 0x14037f3c3\ndivss   xmm1, xmm7                                                     ; +0x277, 0x14037f3c7\nmov     rcx, r14                                                       ; +0x27b, 0x14037f3cb\ncall    GJItemIcon__changeToLockedState                                ; +0x27e, 0x14037f3ce\njmp     short loc_14037F3DD                                            ; +0x283, 0x14037f3d3\nmov     rbx, [rsp+0C8h+arg_0]                                          ; +0x285, 0x14037f3d5\ninc     esi                                                            ; +0x28d, 0x14037f3dd\ncmp     esi, r12d                                                      ; +0x28f, 0x14037f3df\njle     loc_14037F241                                                  ; +0x292, 0x14037f3e2\nmov     rax, rbx                                                       ; +0x298, 0x14037f3e8\njmp     short loc_14037F3F0                                            ; +0x29b, 0x14037f3eb\nmov     rax, r14                                                       ; +0x29d, 0x14037f3ed\nlea     r11, [rsp+0C8h+var_38]                                         ; +0x2a0, 0x14037f3f0\nmov     rbx, [r11+48h]                                                 ; +0x2a8, 0x14037f3f8\nmovaps  xmm6, xmmword ptr [r11-10h]                                    ; +0x2ac, 0x14037f3fc\nmovaps  xmm7, [rsp+0C8h+var_58]                                        ; +0x2b1, 0x14037f401\nmovaps  xmm8, xmmword ptr [r11-30h]                                    ; +0x2b6, 0x14037f406\nmovaps  xmm9, xmmword ptr [r11-40h]                                    ; +0x2bb, 0x14037f40b\nmov     rsp, r11                                                       ; +0x2c0, 0x14037f410\npop     r15                                                            ; +0x2c3, 0x14037f413\npop     r14                                                            ; +0x2c5, 0x14037f415\npop     r13                                                            ; +0x2c7, 0x14037f417\npop     r12                                                            ; +0x2c9, 0x14037f419\npop     rdi                                                            ; +0x2cb, 0x14037f41b\npop     rsi                                                            ; +0x2cc, 0x14037f41c\npop     rbp                                                            ; +0x2cd, 0x14037f41d\nretn                                                                   ; +0x2ce, 0x14037f41e", "xrefs": ["GJGarageLayer::setupPage @ 0x14037eacf", "GJGarageLayer::getItems_1 @ 0x14037f130", "<???> @ 0x1409228a4"], "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"}