{"type": "func", "start": 4303768304, "end": 4303768718, "name": "AchievementManager::notifyAchievementWithID", "pseudocode": "// \n// AchievementManager::notifyAchievementWithID from 0x100864af0 to 0x100864c8e (414 bytes)\n// \n// 1 xrefs:\n// > AchievementManager::reportAchievementWithID @ 0x100864e90\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 12:36:43 +0000\n// \n\nvoid __fastcall AchievementManager::notifyAchievementWithID(__int64 a1, const char *a2)\n{\n  __int64 v2; // rbx\n  size_t v3; // rax\n  size_t v4; // r14\n  _BYTE *v5; // r15\n  size_t v6; // r12\n  __int64 v7; // rbx\n  void *v8; // rax\n  __int64 CString; // r14\n  void *v10; // rax\n  __int64 v11; // r15\n  void *v12; // rdi\n  __int64 v13; // rbx\n  __int64 v14; // rax\n  _BYTE __dst[48]; // [rsp+0h] [rbp-40h] BYREF\n\n  if ( *(_BYTE *)(a1 + 360) )\n    return;\n  v2 = *(_QWORD *)(a1 + 328);\n  v3 = strlen(a2);\n  if ( v3 >= 0xFFFFFFFFFFFFFFF8LL )\n    sub_100003630();\n  v4 = v3;\n  if ( v3 >= 0x17 )\n  {\n    v6 = 26;\n    if ( (v3 | 7) != 0x17 )\n      v6 = (v3 | 7) + 1;\n    v5 = operator new(v6);\n    *(_QWORD *)&__dst[16] = v5;\n    *(_QWORD *)__dst = v6 + 1;\n    *(_QWORD *)&__dst[8] = v4;\n  }\n  else\n  {\n    __dst[0] = 2 * v3;\n    v5 = &__dst[1];\n    if ( !v3 )\n      goto LABEL_10;\n  }\n  memcpy(v5, a2, v4);\nLABEL_10:\n  v5[v4] = 0;\n  v7 = cocos2d::CCDictionary::objectForKey(v2, __dst);\n  if ( (__dst[0] & 1) != 0 )\n    operator delete(*(void **)&__dst[16]);\n  if ( v7 )\n  {\n    strcpy(__dst, \"\\ntitle\");\n    v8 = cocos2d::CCDictionary::valueForKey(v7, (__int64)__dst);\n    CString = cocos2d::CCString::getCString(v8);\n    if ( (__dst[0] & 1) != 0 )\n      operator delete(*(void **)&__dst[16]);\n    strcpy(__dst, \"&achievedDescription\");\n    v10 = cocos2d::CCDictionary::valueForKey(v7, (__int64)__dst);\n    v11 = cocos2d::CCString::getCString(v10);\n    if ( (__dst[0] & 1) != 0 )\n      operator delete(*(void **)&__dst[16]);\n    __dst[0] = 8;\n    strcpy(&__dst[1], \"icon\");\n    v12 = cocos2d::CCDictionary::valueForKey(v7, (__int64)__dst);\n    v13 = cocos2d::CCString::getCString(v12);\n    if ( (__dst[0] & 1) != 0 )\n    {\n      v12 = *(void **)&__dst[16];\n      operator delete(*(void **)&__dst[16]);\n    }\n    v14 = AchievementNotifier::sharedState(v12);\n    AchievementNotifier::notifyAchievement(v14, CString, v11, v13, 0);\n  }\n}", "assembly": "; \n; AchievementManager::notifyAchievementWithID from 0x100864af0 to 0x100864c8e (414 bytes)\n; \n; 1 xrefs:\n; > AchievementManager::reportAchievementWithID @ 0x100864e90\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 12:36:43 +0000\n; \npush    rbp                                                            ; +0x0, 0x100864af0\nmov     rbp, rsp                                                       ; +0x1, 0x100864af1\npush    r15                                                            ; +0x4, 0x100864af4\npush    r14                                                            ; +0x6, 0x100864af6\npush    r13                                                            ; +0x8, 0x100864af8\npush    r12                                                            ; +0xa, 0x100864afa\npush    rbx                                                            ; +0xc, 0x100864afc\nsub     rsp, 18h                                                       ; +0xd, 0x100864afd\ncmp     byte ptr [rdi+168h], 0                                         ; +0x11, 0x100864b01\njnz     loc_100864C7A                                                  ; +0x18, 0x100864b08\nmov     rbx, [rdi+148h]                                                ; +0x1e, 0x100864b0e\nmov     r13, rsi                                                       ; +0x25, 0x100864b15\nmov     rdi, rsi; __s                                                  ; +0x28, 0x100864b18\ncall    _strlen                                                        ; +0x2b, 0x100864b1b\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x30, 0x100864b20\njnb     loc_100864C89                                                  ; +0x34, 0x100864b24\nmov     r14, rax                                                       ; +0x3a, 0x100864b2a\ncmp     rax, 17h                                                       ; +0x3d, 0x100864b2d\njnb     short loc_100864B48                                            ; +0x41, 0x100864b31\nlea     eax, [r14+r14]                                                 ; +0x43, 0x100864b33\nmov     byte ptr [rbp+__dst], al                                       ; +0x47, 0x100864b37\nlea     r15, [rbp+__dst+1]                                             ; +0x4a, 0x100864b3a\ntest    r14, r14                                                       ; +0x4e, 0x100864b3e\nmov     rsi, r13                                                       ; +0x51, 0x100864b41\njnz     short loc_100864B7E                                            ; +0x54, 0x100864b44\njmp     short loc_100864B89                                            ; +0x56, 0x100864b46\nmov     rax, r14                                                       ; +0x58, 0x100864b48\nor      rax, 7                                                         ; +0x5b, 0x100864b4b\nlea     rcx, [rax+1]                                                   ; +0x5f, 0x100864b4f\ncmp     rax, 17h                                                       ; +0x63, 0x100864b53\nmov     r12d, 1Ah                                                      ; +0x67, 0x100864b57\ncmovnz  r12, rcx                                                       ; +0x6d, 0x100864b5d\nmov     rdi, r12; __sz                                                 ; +0x71, 0x100864b61\ncall    __Znwm; operator new(ulong)                                    ; +0x74, 0x100864b64\nmov     r15, rax                                                       ; +0x79, 0x100864b69\nmov     [rbp+__p], rax                                                 ; +0x7c, 0x100864b6c\ninc     r12                                                            ; +0x80, 0x100864b70\nmov     qword ptr [rbp+__dst], r12                                     ; +0x83, 0x100864b73\nmov     qword ptr [rbp+__dst+8], r14                                   ; +0x87, 0x100864b77\nmov     rsi, r13; __src                                                ; +0x8b, 0x100864b7b\nmov     rdi, r15; __dst                                                ; +0x8e, 0x100864b7e\nmov     rdx, r14; __n                                                  ; +0x91, 0x100864b81\ncall    _memcpy                                                        ; +0x94, 0x100864b84\nmov     byte ptr [r15+r14], 0                                          ; +0x99, 0x100864b89\nlea     rsi, [rbp+__dst]                                               ; +0x9e, 0x100864b8e\nmov     rdi, rbx                                                       ; +0xa2, 0x100864b92\ncall    cocos2d__CCDictionary__objectForKey                            ; +0xa5, 0x100864b95\nmov     rbx, rax                                                       ; +0xaa, 0x100864b9a\ntest    byte ptr [rbp+__dst], 1                                        ; +0xad, 0x100864b9d\njz      short loc_100864BAC                                            ; +0xb1, 0x100864ba1\nmov     rdi, [rbp+__p]; __p                                            ; +0xb3, 0x100864ba3\ncall    __ZdlPv; operator delete(void *)                               ; +0xb7, 0x100864ba7\ntest    rbx, rbx                                                       ; +0xbc, 0x100864bac\njz      loc_100864C7A                                                  ; +0xbf, 0x100864baf\nmov     byte ptr [rbp+__dst], 0Ah                                      ; +0xc5, 0x100864bb5\nmov     dword ptr [rbp+__dst+1], 6C746974h                             ; +0xc9, 0x100864bb9\nmov     word ptr [rbp+__dst+5], 65h ; 'e'                              ; +0xd0, 0x100864bc0\nlea     rsi, [rbp+__dst]                                               ; +0xd6, 0x100864bc6\nmov     rdi, rbx                                                       ; +0xda, 0x100864bca\ncall    cocos2d__CCDictionary__valueForKey                             ; +0xdd, 0x100864bcd\nmov     rdi, rax                                                       ; +0xe2, 0x100864bd2\ncall    cocos2d__CCString__getCString                                  ; +0xe5, 0x100864bd5\nmov     r14, rax                                                       ; +0xea, 0x100864bda\ntest    byte ptr [rbp+__dst], 1                                        ; +0xed, 0x100864bdd\njz      short loc_100864BEC                                            ; +0xf1, 0x100864be1\nmov     rdi, [rbp+__p]; __p                                            ; +0xf3, 0x100864be3\ncall    __ZdlPv; operator delete(void *)                               ; +0xf7, 0x100864be7\nmov     byte ptr [rbp+__dst], 26h ; '&'                                ; +0xfc, 0x100864bec\nmovups  xmm0, xmmword ptr cs:aAchieveddescri; \"achievedDescription\"    ; +0x100, 0x100864bf0\nmovups  [rbp+__dst+1], xmm0                                            ; +0x107, 0x100864bf7\nmov     dword ptr [rbp+__p], 6E6F6974h                                 ; +0x10b, 0x100864bfb\nmov     byte ptr [rbp+__p+4], 0                                        ; +0x112, 0x100864c02\nlea     rsi, [rbp+__dst]                                               ; +0x116, 0x100864c06\nmov     rdi, rbx                                                       ; +0x11a, 0x100864c0a\ncall    cocos2d__CCDictionary__valueForKey                             ; +0x11d, 0x100864c0d\nmov     rdi, rax                                                       ; +0x122, 0x100864c12\ncall    cocos2d__CCString__getCString                                  ; +0x125, 0x100864c15\nmov     r15, rax                                                       ; +0x12a, 0x100864c1a\ntest    byte ptr [rbp+__dst], 1                                        ; +0x12d, 0x100864c1d\njz      short loc_100864C2C                                            ; +0x131, 0x100864c21\nmov     rdi, [rbp+__p]; __p                                            ; +0x133, 0x100864c23\ncall    __ZdlPv; operator delete(void *)                               ; +0x137, 0x100864c27\nmov     byte ptr [rbp+__dst], 8                                        ; +0x13c, 0x100864c2c\nmov     dword ptr [rbp+__dst+1], 6E6F6369h                             ; +0x140, 0x100864c30\nmov     byte ptr [rbp+__dst+5], 0                                      ; +0x147, 0x100864c37\nlea     rsi, [rbp+__dst]                                               ; +0x14b, 0x100864c3b\nmov     rdi, rbx                                                       ; +0x14f, 0x100864c3f\ncall    cocos2d__CCDictionary__valueForKey                             ; +0x152, 0x100864c42\nmov     rdi, rax                                                       ; +0x157, 0x100864c47\ncall    cocos2d__CCString__getCString                                  ; +0x15a, 0x100864c4a\nmov     rbx, rax                                                       ; +0x15f, 0x100864c4f\ntest    byte ptr [rbp+__dst], 1                                        ; +0x162, 0x100864c52\njz      short loc_100864C61                                            ; +0x166, 0x100864c56\nmov     rdi, [rbp+__p]; __p                                            ; +0x168, 0x100864c58\ncall    __ZdlPv; operator delete(void *)                               ; +0x16c, 0x100864c5c\ncall    AchievementNotifier__sharedState                               ; +0x171, 0x100864c61\nmov     rdi, rax                                                       ; +0x176, 0x100864c66\nmov     rsi, r14                                                       ; +0x179, 0x100864c69\nmov     rdx, r15                                                       ; +0x17c, 0x100864c6c\nmov     rcx, rbx                                                       ; +0x17f, 0x100864c6f\nxor     r8d, r8d                                                       ; +0x182, 0x100864c72\ncall    AchievementNotifier__notifyAchievement                         ; +0x185, 0x100864c75\nadd     rsp, 18h                                                       ; +0x18a, 0x100864c7a\npop     rbx                                                            ; +0x18e, 0x100864c7e\npop     r12                                                            ; +0x18f, 0x100864c7f\npop     r13                                                            ; +0x191, 0x100864c81\npop     r14                                                            ; +0x193, 0x100864c83\npop     r15                                                            ; +0x195, 0x100864c85\npop     rbp                                                            ; +0x197, 0x100864c87\nretn                                                                   ; +0x198, 0x100864c88\ncall    sub_100003630                                                  ; +0x199, 0x100864c89", "xrefs": ["AchievementManager::reportAchievementWithID @ 0x100864e90"], "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"}