{"type": "func", "start": 5372382240, "end": 5372382648, "name": "GJGarageLayer::descriptionForUnlock", "pseudocode": "// \n// GJGarageLayer::descriptionForUnlock from 0x140380c20 to 0x140380db8 (408 bytes)\n// \n// 2 xrefs:\n// > ItemInfoPopup::init @ 0x1403855f7\n// > <???> @ 0x140922904\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=2\n_QWORD *__fastcall GJGarageLayer::descriptionForUnlock(_QWORD *a1, __int64 a2, __int64 a3)\n{\n  int v3; // edi\n  int v4; // ebx\n  __int64 v6; // rax\n  __int64 v7; // rdx\n  __int64 v8; // rcx\n  __int64 v9; // r8\n  _QWORD *v10; // rbx\n  __int64 v11; // rax\n  __int64 AchievementsWithID; // rbx\n  cocos2d::CCString *v13; // rax\n  const char *CString; // rax\n  size_t v15; // r8\n  void *v16; // rcx\n  void *Block[2]; // [rsp+40h] [rbp-68h] BYREF\n  __m128i si128; // [rsp+50h] [rbp-58h]\n  _QWORD v20[4]; // [rsp+60h] [rbp-48h] BYREF\n\n  v3 = a3;\n  v4 = a2;\n  v6 = AchievementManager::sharedState(a1, a2, a3);\n  AchievementManager::achievementForUnlock(v6, v20, v4, v3);\n  v10 = v20;\n  if ( v20[3] > 0xFu )\n    v10 = (_QWORD *)v20[0];\n  v11 = AchievementManager::sharedState(v8, v7, v9);\n  AchievementsWithID = AchievementManager::getAchievementsWithID(v11, (__int64)v10);\n  *(_OWORD *)Block = 0;\n  Block[0] = sub_14003D460(0x20u);\n  si128 = _mm_load_si128((const __m128i *)&xmmword_140836660);\n  strcpy((char *)Block[0], \"unachievedDescription\");\n  v13 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(AchievementsWithID, Block);\n  CString = cocos2d::CCString::getCString(v13);\n  *(_OWORD *)a1 = 0;\n  a1[2] = 0;\n  a1[3] = 0;\n  v15 = -1;\n  do\n    ++v15;\n  while ( CString[v15] );\n  sub_14003D230(a1, CString, v15);\n  if ( si128.m128i_i64[1] > 0xFuLL )\n  {\n    v16 = Block[0];\n    if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )\n    {\n      v16 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v16 - 8) > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n    }\n    j_j_free(v16);\n  }\n  si128 = _mm_load_si128((const __m128i *)&Size);\n  LOBYTE(Block[0]) = 0;\n  sub_14003D310((__int64)v20);\n  return a1;\n}", "assembly": "; \n; GJGarageLayer::descriptionForUnlock from 0x140380c20 to 0x140380db8 (408 bytes)\n; \n; 2 xrefs:\n; > ItemInfoPopup::init @ 0x1403855f7\n; > <???> @ 0x140922904\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_18], rbx                                              ; +0x0, 0x140380c20\npush    rbp                                                            ; +0x5, 0x140380c25\npush    rsi                                                            ; +0x6, 0x140380c26\npush    rdi                                                            ; +0x7, 0x140380c27\nsub     rsp, 90h                                                       ; +0x8, 0x140380c28\nmov     rax, cs:__security_cookie                                      ; +0xf, 0x140380c2f\nxor     rax, rsp                                                       ; +0x16, 0x140380c36\nmov     [rsp+0A8h+var_28], rax                                         ; +0x19, 0x140380c39\nmov     edi, r8d                                                       ; +0x21, 0x140380c41\nmov     ebx, edx                                                       ; +0x24, 0x140380c44\nmov     rsi, rcx                                                       ; +0x26, 0x140380c46\nmov     [rsp+0A8h+var_70], rcx                                         ; +0x29, 0x140380c49\nxor     ebp, ebp                                                       ; +0x2e, 0x140380c4e\ncall    AchievementManager__sharedState                                ; +0x30, 0x140380c50\nmov     rcx, rax                                                       ; +0x35, 0x140380c55\nmov     r9d, edi                                                       ; +0x38, 0x140380c58\nmov     r8d, ebx                                                       ; +0x3b, 0x140380c5b\nlea     rdx, [rsp+0A8h+var_48]                                         ; +0x3e, 0x140380c5e\ncall    AchievementManager__achievementForUnlock                       ; +0x43, 0x140380c63\nnop                                                                    ; +0x48, 0x140380c68\nlea     rbx, [rsp+0A8h+var_48]                                         ; +0x49, 0x140380c69\ncmp     [rsp+0A8h+var_30], 0Fh                                         ; +0x4e, 0x140380c6e\ncmova   rbx, [rsp+0A8h+var_48]                                         ; +0x54, 0x140380c74\ncall    AchievementManager__sharedState                                ; +0x5a, 0x140380c7a\nmov     rcx, rax                                                       ; +0x5f, 0x140380c7f\nmov     rdx, rbx                                                       ; +0x62, 0x140380c82\ncall    AchievementManager__getAchievementsWithID; Merged with: AchievementManager::getAchievementsWithID, MusicDownloadManager::getDLObject ; +0x65, 0x140380c85\nmov     rbx, rax                                                       ; +0x6a, 0x140380c8a\nxorps   xmm0, xmm0                                                     ; +0x6d, 0x140380c8d\nmovups  xmmword ptr [rsp+0A8h+Block], xmm0                             ; +0x70, 0x140380c90\nxorps   xmm1, xmm1                                                     ; +0x75, 0x140380c95\nmovdqu  [rsp+0A8h+var_58], xmm1                                        ; +0x78, 0x140380c98\nmov     ecx, 20h ; ' '                                                 ; +0x7e, 0x140380c9e\ncall    sub_14003D460                                                  ; +0x83, 0x140380ca3\nmov     rcx, rax                                                       ; +0x88, 0x140380ca8\nmov     [rsp+0A8h+Block], rax                                          ; +0x8b, 0x140380cab\nmovdqa  xmm0, cs:xmmword_140836660                                     ; +0x90, 0x140380cb0\nmovdqu  [rsp+0A8h+var_58], xmm0                                        ; +0x98, 0x140380cb8\nmovups  xmm0, cs:xmmword_1406EE128                                     ; +0x9e, 0x140380cbe\nmovups  xmmword ptr [rax], xmm0                                        ; +0xa5, 0x140380cc5\nmov     eax, cs:dword_1406EE138                                        ; +0xa8, 0x140380cc8\nmov     [rcx+10h], eax                                                 ; +0xae, 0x140380cce\nmovzx   eax, cs:byte_1406EE13C                                         ; +0xb1, 0x140380cd1\nmov     [rcx+14h], al                                                  ; +0xb8, 0x140380cd8\nmov     [rcx+15h], bpl                                                 ; +0xbb, 0x140380cdb\nlea     rdx, [rsp+0A8h+Block]                                          ; +0xbf, 0x140380cdf\nmov     rcx, rbx                                                       ; +0xc4, 0x140380ce4\ncall    cs:?valueForKey@CCDictionary@cocos2d@@QEAAPEBVCCString@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::valueForKey(std::string const &) ; +0xc7, 0x140380ce7\nmov     rcx, rax                                                       ; +0xcd, 0x140380ced\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0xd0, 0x140380cf0\nxorps   xmm0, xmm0                                                     ; +0xd6, 0x140380cf6\nmovups  xmmword ptr [rsi], xmm0                                        ; +0xd9, 0x140380cf9\nmov     [rsi+10h], rbp                                                 ; +0xdc, 0x140380cfc\nmov     [rsi+18h], rbp                                                 ; +0xe0, 0x140380d00\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0xe4, 0x140380d04\nnop     dword ptr [rax+rax+00h]                                        ; +0xeb, 0x140380d0b\ninc     r8                                                             ; +0xf0, 0x140380d10\ncmp     byte ptr [rax+r8], 0                                           ; +0xf3, 0x140380d13\njnz     short loc_140380D10                                            ; +0xf8, 0x140380d18\nmov     rdx, rax                                                       ; +0xfa, 0x140380d1a\nmov     rcx, rsi                                                       ; +0xfd, 0x140380d1d\ncall    sub_14003D230                                                  ; +0x100, 0x140380d20\nnop                                                                    ; +0x105, 0x140380d25\nmov     rdx, qword ptr [rsp+0A8h+var_58+8]                             ; +0x106, 0x140380d26\ncmp     rdx, 0Fh                                                       ; +0x10b, 0x140380d2b\njbe     short loc_140380D75                                            ; +0x10f, 0x140380d2f\ninc     rdx                                                            ; +0x111, 0x140380d31\nmov     rcx, [rsp+0A8h+Block]; Block                                   ; +0x114, 0x140380d34\nmov     rax, rcx                                                       ; +0x119, 0x140380d39\ncmp     rdx, 1000h                                                     ; +0x11c, 0x140380d3c\njb      short loc_140380D70                                            ; +0x123, 0x140380d43\nadd     rdx, 27h ; '''                                                 ; +0x125, 0x140380d45\nmov     rcx, [rcx-8]                                                   ; +0x129, 0x140380d49\nsub     rax, rcx                                                       ; +0x12d, 0x140380d4d\nsub     rax, 8                                                         ; +0x130, 0x140380d50\ncmp     rax, 1Fh                                                       ; +0x134, 0x140380d54\njbe     short loc_140380D70                                            ; +0x138, 0x140380d58\nmov     [rsp+0A8h+Reserved], rbp; Reserved                             ; +0x13a, 0x140380d5a\nxor     r9d, r9d; LineNo                                               ; +0x13f, 0x140380d5f\nxor     r8d, r8d; FileName                                             ; +0x142, 0x140380d62\nxor     edx, edx; FunctionName                                         ; +0x145, 0x140380d65\nxor     ecx, ecx; Expression                                           ; +0x147, 0x140380d67\ncall    cs:_invoke_watson                                              ; +0x149, 0x140380d69\nalign 10h                                                              ; +0x14f, 0x140380d6f\ncall    j_j_free                                                       ; +0x150, 0x140380d70\nmovdqa  xmm0, cs:Size                                                  ; +0x155, 0x140380d75\nmovdqu  [rsp+0A8h+var_58], xmm0                                        ; +0x15d, 0x140380d7d\nmov     byte ptr [rsp+0A8h+Block], 0                                   ; +0x163, 0x140380d83\nlea     rcx, [rsp+0A8h+var_48]                                         ; +0x168, 0x140380d88\ncall    sub_14003D310                                                  ; +0x16d, 0x140380d8d\nmov     rax, rsi                                                       ; +0x172, 0x140380d92\nmov     rcx, [rsp+0A8h+var_28]                                         ; +0x175, 0x140380d95\nxor     rcx, rsp; StackCookie                                          ; +0x17d, 0x140380d9d\ncall    __security_check_cookie                                        ; +0x180, 0x140380da0\nmov     rbx, [rsp+0A8h+arg_18]                                         ; +0x185, 0x140380da5\nadd     rsp, 90h                                                       ; +0x18d, 0x140380dad\npop     rdi                                                            ; +0x194, 0x140380db4\npop     rsi                                                            ; +0x195, 0x140380db5\npop     rbp                                                            ; +0x196, 0x140380db6\nretn                                                                   ; +0x197, 0x140380db7", "xrefs": ["ItemInfoPopup::init @ 0x1403855f7", "<???> @ 0x140922904"], "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"}