{"type": "func", "start": 5372383776, "end": 5372384378, "name": "GJGarageLayer::updateRate", "pseudocode": "// \n// GJGarageLayer::updateRate from 0x140381220 to 0x14038147a (602 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1407701d0\n// > <???> @ 0x140922928\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:05 +0000\n// \n\n// Hidden C++ exception states: #wind=4\n__int64 __fastcall GJGarageLayer::updateRate(__int64 a1, __int64 a2)\n{\n  __int64 result; // rax\n  cocos2d::CCString *v4; // rax\n  const char *CString; // rsi\n  cocos2d::CCString *v6; // rax\n  const char *v7; // rbp\n  __int64 *v8; // rcx\n  __int64 v9; // rdx\n  _QWORD *v10; // rcx\n  __int64 v11; // rdi\n  _QWORD *v12; // rbx\n  __int64 v13; // rdx\n  cocos2d::CCSpriteFrameCache *v14; // rax\n  struct cocos2d::CCSpriteFrame *v15; // rax\n  struct cocos2d::CCSprite *v16; // rdi\n  __int64 v17; // rbx\n  __int64 v18; // rax\n  __int64 v19; // rcx\n  void *v20; // [rsp+48h] [rbp+10h] BYREF\n  void *v21; // [rsp+50h] [rbp+18h]\n\n  result = qword_14090BFD0;\n  if ( !qword_14090BFD0 )\n  {\n    v20 = operator new(0x6E8u);\n    qword_14090BFD0 = GameManager::GameManager((__int64)v20);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n    result = qword_14090BFD0;\n  }\n  if ( *(_BYTE *)(result + 716) && *(_QWORD *)(a1 + 80) )\n  {\n    v4 = cocos2d::CCString::createWithFormat(\"player_%02d_001.png\", 13);\n    CString = cocos2d::CCString::getCString(v4);\n    v6 = cocos2d::CCString::createWithFormat(\"player_%02d_2_001.png\", 13);\n    v7 = cocos2d::CCString::getCString(v6);\n    v8 = *(__int64 **)(a1 + 80);\n    v9 = *v8;\n    LOBYTE(v9) = 1;\n    (*(void (__fastcall **)(__int64 *, __int64))(*v8 + 576))(v8, v9);\n    v10 = *(_QWORD **)(a1 + 80);\n    v11 = *v10;\n    v12 = v10;\n    v14 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v10, v13);\n    v15 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v14, CString);\n    (*(void (__fastcall **)(_QWORD *, struct cocos2d::CCSpriteFrame *))(v11 + 1008))(v12, v15);\n    v16 = cocos2d::CCSprite::createWithSpriteFrameName(v7);\n    (*(void (__fastcall **)(_QWORD, struct cocos2d::CCSprite *, __int64))(**(_QWORD **)(a1 + 80) + 456LL))(\n      *(_QWORD *)(a1 + 80),\n      v16,\n      0xFFFFFFFFLL);\n    v17 = *(_QWORD *)v16;\n    cocos2d::CCPoint::CCPoint(\n      (cocos2d::CCPoint *)&v20,\n      *(float *)(*(_QWORD *)(a1 + 80) + 432LL) * 0.5,\n      *(float *)(*(_QWORD *)(a1 + 80) + 436LL) * 0.5);\n    (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v17 + 184))(v16, v18);\n    LOWORD(v20) = -20561;\n    BYTE2(v20) = -81;\n    (**(void (__fastcall ***)(__int64, void **))(*(_QWORD *)(a1 + 80) + 320LL))(*(_QWORD *)(a1 + 80) + 320LL, &v20);\n    LOWORD(v20) = -1;\n    BYTE2(v20) = -1;\n    (**((void (__fastcall ***)(__int64, void **))v16 + 40))((__int64)v16 + 320, &v20);\n    result = qword_14090BFD0;\n    if ( !qword_14090BFD0 )\n    {\n      v21 = operator new(0x6E8u);\n      qword_14090BFD0 = GameManager::GameManager((__int64)v21);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n      result = qword_14090BFD0;\n    }\n    *(_QWORD *)(result + 968) = 0;\n  }\n  if ( *(_BYTE *)(result + 717) )\n  {\n    v19 = *(_QWORD *)(a1 + 72);\n    if ( v19 )\n    {\n      LOBYTE(a2) = 1;\n      (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v19 + 576LL))(v19, a2);\n      result = qword_14090BFD0;\n      if ( !qword_14090BFD0 )\n      {\n        v20 = operator new(0x6E8u);\n        qword_14090BFD0 = GameManager::GameManager((__int64)v20);\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n        result = qword_14090BFD0;\n      }\n      *(_QWORD *)(result + 968) = 0;\n    }\n  }\n  return result;\n}", "assembly": "; \n; GJGarageLayer::updateRate from 0x140381220 to 0x14038147a (602 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1407701d0\n; > <???> @ 0x140922928\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:05 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x140381220\nmov     [rsp+arg_18], rbp                                              ; +0x5, 0x140381225\npush    rsi                                                            ; +0xa, 0x14038122a\npush    rdi                                                            ; +0xb, 0x14038122b\npush    r14                                                            ; +0xc, 0x14038122c\nsub     rsp, 20h                                                       ; +0xe, 0x14038122e\nmov     r14, rcx                                                       ; +0x12, 0x140381232\nmov     rax, cs:qword_14090BFD0                                        ; +0x15, 0x140381235\ntest    rax, rax                                                       ; +0x1c, 0x14038123c\njnz     short loc_140381273                                            ; +0x1f, 0x14038123f\nmov     ecx, 6E8h; Size                                                ; +0x21, 0x140381241\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x26, 0x140381246\nmov     [rsp+38h+arg_8], rax                                           ; +0x2b, 0x14038124b\nmov     rcx, rax                                                       ; +0x30, 0x140381250\ncall    GameManager__GameManager                                       ; +0x33, 0x140381253\nnop                                                                    ; +0x38, 0x140381258\nmov     cs:qword_14090BFD0, rax                                        ; +0x39, 0x140381259\nmov     rcx, [rax]                                                     ; +0x40, 0x140381260\nmov     rdx, [rcx+48h]                                                 ; +0x43, 0x140381263\nmov     rcx, rax                                                       ; +0x47, 0x140381267\ncall    rdx                                                            ; +0x4a, 0x14038126a\nmov     rax, cs:qword_14090BFD0                                        ; +0x4c, 0x14038126c\ncmp     byte ptr [rax+2CCh], 0                                         ; +0x53, 0x140381273\njz      loc_140381401                                                  ; +0x5a, 0x14038127a\ncmp     qword ptr [r14+50h], 0                                         ; +0x60, 0x140381280\njz      loc_140381401                                                  ; +0x65, 0x140381285\nmov     edx, 0Dh                                                       ; +0x6b, 0x14038128b\nlea     rcx, aPlayer02d001Pn; \"player_%02d_001.png\"                    ; +0x70, 0x140381290\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x77, 0x140381297\nmov     rcx, rax                                                       ; +0x7d, 0x14038129d\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x80, 0x1403812a0\nmov     rsi, rax                                                       ; +0x86, 0x1403812a6\nmov     edx, 0Dh                                                       ; +0x89, 0x1403812a9\nlea     rcx, aPlayer02d2001P; \"player_%02d_2_001.png\"                  ; +0x8e, 0x1403812ae\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x95, 0x1403812b5\nmov     rcx, rax                                                       ; +0x9b, 0x1403812bb\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x9e, 0x1403812be\nmov     rbp, rax                                                       ; +0xa4, 0x1403812c4\nmov     rcx, [r14+50h]                                                 ; +0xa7, 0x1403812c7\nmov     rdx, [rcx]                                                     ; +0xab, 0x1403812cb\nmov     r8, [rdx+240h]                                                 ; +0xae, 0x1403812ce\nmov     dl, 1                                                          ; +0xb5, 0x1403812d5\ncall    r8                                                             ; +0xb7, 0x1403812d7\nmov     rcx, [r14+50h]                                                 ; +0xba, 0x1403812da\nmov     rdi, [rcx]                                                     ; +0xbe, 0x1403812de\nmov     rbx, rcx                                                       ; +0xc1, 0x1403812e1\ncall    cs:?sharedSpriteFrameCache@CCSpriteFrameCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(void) ; +0xc4, 0x1403812e4\nmov     rcx, rax                                                       ; +0xca, 0x1403812ea\nmov     rdx, rsi                                                       ; +0xcd, 0x1403812ed\ncall    cs:?spriteFrameByName@CCSpriteFrameCache@cocos2d@@QEAAPEAVCCSpriteFrame@2@PEBD@Z; cocos2d::CCSpriteFrameCache::spriteFrameByName(char const *) ; +0xd0, 0x1403812f0\nmov     rdx, rax                                                       ; +0xd6, 0x1403812f6\nmov     rcx, rbx                                                       ; +0xd9, 0x1403812f9\ncall    qword ptr [rdi+3F0h]                                           ; +0xdc, 0x1403812fc\nmov     rcx, rbp                                                       ; +0xe2, 0x140381302\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0xe5, 0x140381305\nmov     rdi, rax                                                       ; +0xeb, 0x14038130b\nmov     rcx, [r14+50h]                                                 ; +0xee, 0x14038130e\nmov     rdx, [rcx]                                                     ; +0xf2, 0x140381312\nmov     r9, [rdx+1C8h]                                                 ; +0xf5, 0x140381315\nmov     r8d, 0FFFFFFFFh                                                ; +0xfc, 0x14038131c\nmov     rdx, rax                                                       ; +0x102, 0x140381322\ncall    r9                                                             ; +0x105, 0x140381325\nmov     rcx, [r14+50h]                                                 ; +0x108, 0x140381328\nmov     rbx, [rdi]                                                     ; +0x10c, 0x14038132c\nmovss   xmm2, dword ptr [rcx+1B4h]                                     ; +0x10f, 0x14038132f\nmulss   xmm2, cs:dword_140834F20                                       ; +0x117, 0x140381337\nmovss   xmm1, dword ptr [rcx+1B0h]                                     ; +0x11f, 0x14038133f\nmulss   xmm1, cs:dword_140834F20                                       ; +0x127, 0x140381347\nlea     rcx, [rsp+38h+arg_8]                                           ; +0x12f, 0x14038134f\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x134, 0x140381354\nmov     rdx, rax                                                       ; +0x13a, 0x14038135a\nmov     rcx, rdi                                                       ; +0x13d, 0x14038135d\ncall    qword ptr [rbx+0B8h]                                           ; +0x140, 0x140381360\nmov     word ptr [rsp+38h+arg_8], 0AFAFh                               ; +0x146, 0x140381366\nmovzx   eax, word ptr [rsp+38h+arg_8]                                  ; +0x14d, 0x14038136d\nmov     word ptr [rsp+38h+arg_8], ax                                   ; +0x152, 0x140381372\nmov     byte ptr [rsp+38h+arg_8+2], 0AFh                               ; +0x157, 0x140381377\nmov     rcx, [r14+50h]                                                 ; +0x15c, 0x14038137c\nadd     rcx, 140h                                                      ; +0x160, 0x140381380\nmov     rax, [rcx]                                                     ; +0x167, 0x140381387\nlea     rdx, [rsp+38h+arg_8]                                           ; +0x16a, 0x14038138a\ncall    qword ptr [rax]                                                ; +0x16f, 0x14038138f\nmov     word ptr [rsp+38h+arg_8], 0FFFFh                               ; +0x171, 0x140381391\nmovzx   eax, word ptr [rsp+38h+arg_8]                                  ; +0x178, 0x140381398\nmov     word ptr [rsp+38h+arg_8], ax                                   ; +0x17d, 0x14038139d\nmov     byte ptr [rsp+38h+arg_8+2], 0FFh                               ; +0x182, 0x1403813a2\nlea     rcx, [rdi+140h]                                                ; +0x187, 0x1403813a7\nmov     rax, [rcx]                                                     ; +0x18e, 0x1403813ae\nlea     rdx, [rsp+38h+arg_8]                                           ; +0x191, 0x1403813b1\ncall    qword ptr [rax]                                                ; +0x196, 0x1403813b6\nmov     rax, cs:qword_14090BFD0                                        ; +0x198, 0x1403813b8\ntest    rax, rax                                                       ; +0x19f, 0x1403813bf\njnz     short loc_1403813F6                                            ; +0x1a2, 0x1403813c2\nmov     ecx, 6E8h; Size                                                ; +0x1a4, 0x1403813c4\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x1a9, 0x1403813c9\nmov     [rsp+38h+arg_10], rax                                          ; +0x1ae, 0x1403813ce\nmov     rcx, rax                                                       ; +0x1b3, 0x1403813d3\ncall    GameManager__GameManager                                       ; +0x1b6, 0x1403813d6\nnop                                                                    ; +0x1bb, 0x1403813db\nmov     cs:qword_14090BFD0, rax                                        ; +0x1bc, 0x1403813dc\nmov     rcx, [rax]                                                     ; +0x1c3, 0x1403813e3\nmov     rdx, [rcx+48h]                                                 ; +0x1c6, 0x1403813e6\nmov     rcx, rax                                                       ; +0x1ca, 0x1403813ea\ncall    rdx                                                            ; +0x1cd, 0x1403813ed\nmov     rax, cs:qword_14090BFD0                                        ; +0x1cf, 0x1403813ef\nmov     qword ptr [rax+3C8h], 0                                        ; +0x1d6, 0x1403813f6\ncmp     byte ptr [rax+2CDh], 0                                         ; +0x1e1, 0x140381401\njz      short loc_140381467                                            ; +0x1e8, 0x140381408\nmov     rcx, [r14+48h]                                                 ; +0x1ea, 0x14038140a\ntest    rcx, rcx                                                       ; +0x1ee, 0x14038140e\njz      short loc_140381467                                            ; +0x1f1, 0x140381411\nmov     rax, [rcx]                                                     ; +0x1f3, 0x140381413\nmov     dl, 1                                                          ; +0x1f6, 0x140381416\ncall    qword ptr [rax+240h]                                           ; +0x1f8, 0x140381418\nmov     rax, cs:qword_14090BFD0                                        ; +0x1fe, 0x14038141e\ntest    rax, rax                                                       ; +0x205, 0x140381425\njnz     short loc_14038145C                                            ; +0x208, 0x140381428\nmov     ecx, 6E8h; Size                                                ; +0x20a, 0x14038142a\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x20f, 0x14038142f\nmov     [rsp+38h+arg_8], rax                                           ; +0x214, 0x140381434\nmov     rcx, rax                                                       ; +0x219, 0x140381439\ncall    GameManager__GameManager                                       ; +0x21c, 0x14038143c\nnop                                                                    ; +0x221, 0x140381441\nmov     cs:qword_14090BFD0, rax                                        ; +0x222, 0x140381442\nmov     rcx, [rax]                                                     ; +0x229, 0x140381449\nmov     rdx, [rcx+48h]                                                 ; +0x22c, 0x14038144c\nmov     rcx, rax                                                       ; +0x230, 0x140381450\ncall    rdx                                                            ; +0x233, 0x140381453\nmov     rax, cs:qword_14090BFD0                                        ; +0x235, 0x140381455\nmov     qword ptr [rax+3C8h], 0                                        ; +0x23c, 0x14038145c\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x247, 0x140381467\nmov     rbp, [rsp+38h+arg_18]                                          ; +0x24c, 0x14038146c\nadd     rsp, 20h                                                       ; +0x251, 0x140381471\npop     r14                                                            ; +0x255, 0x140381475\npop     rdi                                                            ; +0x257, 0x140381477\npop     rsi                                                            ; +0x258, 0x140381478\nretn                                                                   ; +0x259, 0x140381479", "xrefs": ["<???> @ 0x1407701d0", "<???> @ 0x140922928"], "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"}