{"type": "func", "start": 6442762880, "end": 6442763211, "name": "cocos2d::CCBMFontConfiguration::purgeKerningDictionary", "pseudocode": "// \n// cocos2d::CCBMFontConfiguration::purgeKerningDictionary from 0x18004c280 to 0x18004c3cb (331 bytes)\n// \n// 5 xrefs:\n// > cocos2d::CCBMFontConfiguration::~CCBMFontConfiguration @ 0x1800472d5\n// > <???> @ 0x1801376f4\n// > <???> @ 0x180137704\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b19ec\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid __fastcall cocos2d::CCBMFontConfiguration::purgeKerningDictionary(cocos2d::CCBMFontConfiguration *this)\n{\n  cocos2d::tCCKerningHashElement *i; // rbx\n  char *prev; // r8\n  UT_hash_table *tbl; // r9\n  cocos2d::tCCKerningHashElement *m_pKerningDictionary; // r10\n  std::ptrdiff_t hho; // r11\n  char *v7; // r9\n  cocos2d::tCCKerningHashElement *next; // r8\n  char *v9; // r9\n  UT_hash_table *v10; // rdx\n  __int64 v11; // r9\n  UT_hash_table *v12; // rdx\n  UT_hash_handle *hh_prev; // rdx\n  UT_hash_handle *hh_next; // rcx\n\n  for ( i = this->m_pKerningDictionary; i; i = this->m_pKerningDictionary )\n  {\n    prev = (char *)i->hh.prev;\n    if ( prev || i->hh.next )\n    {\n      tbl = i->hh.tbl;\n      m_pKerningDictionary = i;\n      hho = tbl->hho;\n      if ( i == (cocos2d::tCCKerningHashElement *)((char *)tbl->tail - hho) )\n      {\n        tbl->tail = (UT_hash_handle *)&prev[hho];\n        m_pKerningDictionary = this->m_pKerningDictionary;\n      }\n      v7 = (char *)i->hh.prev;\n      next = (cocos2d::tCCKerningHashElement *)i->hh.next;\n      if ( v7 )\n      {\n        *(_QWORD *)&v7[m_pKerningDictionary->hh.tbl->hho + 16] = next;\n        next = this->m_pKerningDictionary;\n      }\n      else\n      {\n        this->m_pKerningDictionary = next;\n      }\n      v9 = (char *)i->hh.next;\n      if ( v9 )\n        *(_QWORD *)&v9[next->hh.tbl->hho + 8] = i->hh.prev;\n      v10 = this->m_pKerningDictionary->hh.tbl;\n      v11 = i->hh.hashv & (v10->num_buckets - 1);\n      --v10->buckets[v11].count;\n      v12 = this->m_pKerningDictionary->hh.tbl;\n      if ( v12->buckets[v11].hh_head == &i->hh )\n        v12->buckets[v11].hh_head = i->hh.hh_next;\n      hh_prev = i->hh.hh_prev;\n      if ( hh_prev )\n        hh_prev->hh_next = i->hh.hh_next;\n      hh_next = i->hh.hh_next;\n      if ( hh_next )\n        hh_next->hh_prev = i->hh.hh_prev;\n      --this->m_pKerningDictionary->hh.tbl->num_items;\n    }\n    else\n    {\n      free(i->hh.tbl->buckets);\n      free(this->m_pKerningDictionary->hh.tbl);\n      this->m_pKerningDictionary = nullptr;\n    }\n    free(i);\n  }\n}", "assembly": "; \n; cocos2d::CCBMFontConfiguration::purgeKerningDictionary from 0x18004c280 to 0x18004c3cb (331 bytes)\n; \n; 5 xrefs:\n; > cocos2d::CCBMFontConfiguration::~CCBMFontConfiguration @ 0x1800472d5\n; > <???> @ 0x1801376f4\n; > <???> @ 0x180137704\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b19ec\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x18004c280\npush    rdi                                                            ; +0x5, 0x18004c285\nsub     rsp, 20h                                                       ; +0x6, 0x18004c286\nmov     rbx, [rcx+78h]                                                 ; +0xa, 0x18004c28a\nmov     rdi, rcx                                                       ; +0xe, 0x18004c28e\ntest    rbx, rbx                                                       ; +0x11, 0x18004c291\njz      loc_18004C3C0                                                  ; +0x14, 0x18004c294\nmov     [rsp+28h+arg_0], rsi                                           ; +0x1a, 0x18004c29a\nxor     esi, esi                                                       ; +0x1f, 0x18004c29f\nmov     r8, [rbx+10h]                                                  ; +0x21, 0x18004c2a1\ntest    r8, r8                                                         ; +0x25, 0x18004c2a5\njnz     short loc_18004C2D4                                            ; +0x28, 0x18004c2a8\ncmp     [rbx+18h], rsi                                                 ; +0x2a, 0x18004c2aa\njnz     short loc_18004C2D4                                            ; +0x2e, 0x18004c2ae\nmov     rcx, [rbx+8]                                                   ; +0x30, 0x18004c2b0\nmov     rcx, [rcx]; Block                                              ; +0x34, 0x18004c2b4\ncall    cs:__imp_free                                                  ; +0x37, 0x18004c2b7\nmov     rcx, [rdi+78h]                                                 ; +0x3d, 0x18004c2bd\nmov     rcx, [rcx+8]; Block                                            ; +0x41, 0x18004c2c1\ncall    cs:__imp_free                                                  ; +0x45, 0x18004c2c5\nmov     [rdi+78h], rsi                                                 ; +0x4b, 0x18004c2cb\njmp     loc_18004C3A5                                                  ; +0x4f, 0x18004c2cf\nmov     r9, [rbx+8]                                                    ; +0x54, 0x18004c2d4\nlea     rax, [rbx+8]                                                   ; +0x58, 0x18004c2d8\nmov     r10, rbx                                                       ; +0x5c, 0x18004c2dc\nmov     r11, [r9+20h]                                                  ; +0x5f, 0x18004c2df\nmov     rcx, [r9+18h]                                                  ; +0x63, 0x18004c2e3\nsub     rcx, r11                                                       ; +0x67, 0x18004c2e7\ncmp     rbx, rcx                                                       ; +0x6a, 0x18004c2ea\njnz     short loc_18004C2FB                                            ; +0x6d, 0x18004c2ed\nlea     rcx, [r11+r8]                                                  ; +0x6f, 0x18004c2ef\nmov     [r9+18h], rcx                                                  ; +0x73, 0x18004c2f3\nmov     r10, [rdi+78h]                                                 ; +0x77, 0x18004c2f7\nmov     r9, [rbx+10h]                                                  ; +0x7b, 0x18004c2fb\nmov     r8, [rbx+18h]                                                  ; +0x7f, 0x18004c2ff\ntest    r9, r9                                                         ; +0x83, 0x18004c303\njz      short loc_18004C31B                                            ; +0x86, 0x18004c306\nmov     rcx, [r10+8]                                                   ; +0x88, 0x18004c308\nmov     rdx, [rcx+20h]                                                 ; +0x8c, 0x18004c30c\nmov     [rdx+r9+10h], r8                                               ; +0x90, 0x18004c310\nmov     r8, [rdi+78h]                                                  ; +0x95, 0x18004c315\njmp     short loc_18004C31F                                            ; +0x99, 0x18004c319\nmov     [rdi+78h], r8                                                  ; +0x9b, 0x18004c31b\nmov     r9, [rax+10h]                                                  ; +0x9f, 0x18004c31f\ntest    r9, r9                                                         ; +0xa3, 0x18004c323\njz      short loc_18004C339                                            ; +0xa6, 0x18004c326\nmov     rcx, [r8+8]                                                    ; +0xa8, 0x18004c328\nmov     rdx, [rcx+20h]                                                 ; +0xac, 0x18004c32c\nmov     rcx, [rax+8]                                                   ; +0xb0, 0x18004c330\nmov     [rdx+r9+8], rcx                                                ; +0xb4, 0x18004c334\nmov     rcx, [rdi+78h]                                                 ; +0xb9, 0x18004c339\nmov     rdx, [rcx+8]                                                   ; +0xbd, 0x18004c33d\nmov     ecx, [rax+34h]                                                 ; +0xc1, 0x18004c341\nmov     r9d, [rdx+8]                                                   ; +0xc4, 0x18004c344\ndec     r9d                                                            ; +0xc8, 0x18004c348\nand     r9, rcx                                                        ; +0xcb, 0x18004c34b\nmov     rcx, [rdx]                                                     ; +0xce, 0x18004c34e\nmov     r8, r9                                                         ; +0xd1, 0x18004c351\nadd     r8, r8                                                         ; +0xd4, 0x18004c354\ndec     dword ptr [rcx+r8*8+8]                                         ; +0xd7, 0x18004c357\nmov     rcx, [rdi+78h]                                                 ; +0xdc, 0x18004c35c\nmov     rdx, [rcx+8]                                                   ; +0xe0, 0x18004c360\nmov     r10, [rdx]                                                     ; +0xe4, 0x18004c364\ncmp     [r10+r8*8], rax                                                ; +0xe7, 0x18004c367\njnz     short loc_18004C378                                            ; +0xeb, 0x18004c36b\nmov     rcx, [rax+20h]                                                 ; +0xed, 0x18004c36d\nadd     r9, r9                                                         ; +0xf1, 0x18004c371\nmov     [r10+r9*8], rcx                                                ; +0xf4, 0x18004c374\nmov     rdx, [rax+18h]                                                 ; +0xf8, 0x18004c378\ntest    rdx, rdx                                                       ; +0xfc, 0x18004c37c\njz      short loc_18004C389                                            ; +0xff, 0x18004c37f\nmov     rcx, [rax+20h]                                                 ; +0x101, 0x18004c381\nmov     [rdx+20h], rcx                                                 ; +0x105, 0x18004c385\nmov     rcx, [rax+20h]                                                 ; +0x109, 0x18004c389\ntest    rcx, rcx                                                       ; +0x10d, 0x18004c38d\njz      short loc_18004C39A                                            ; +0x110, 0x18004c390\nmov     rdx, [rax+18h]                                                 ; +0x112, 0x18004c392\nmov     [rcx+18h], rdx                                                 ; +0x116, 0x18004c396\nmov     rax, [rdi+78h]                                                 ; +0x11a, 0x18004c39a\nmov     rdx, [rax+8]                                                   ; +0x11e, 0x18004c39e\ndec     dword ptr [rdx+10h]                                            ; +0x122, 0x18004c3a2\nmov     rcx, rbx; Block                                                ; +0x125, 0x18004c3a5\ncall    cs:__imp_free                                                  ; +0x128, 0x18004c3a8\nmov     rbx, [rdi+78h]                                                 ; +0x12e, 0x18004c3ae\ntest    rbx, rbx                                                       ; +0x132, 0x18004c3b2\njnz     loc_18004C2A1                                                  ; +0x135, 0x18004c3b5\nmov     rsi, [rsp+28h+arg_0]                                           ; +0x13b, 0x18004c3bb\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x140, 0x18004c3c0\nadd     rsp, 20h                                                       ; +0x145, 0x18004c3c5\npop     rdi                                                            ; +0x149, 0x18004c3c9\nretn                                                                   ; +0x14a, 0x18004c3ca", "xrefs": ["cocos2d::CCBMFontConfiguration::~CCBMFontConfiguration @ 0x1800472d5", "<???> @ 0x1801376f4", "<???> @ 0x180137704", "<???> @ 0x1801438a8", "<???> @ 0x1801b19ec"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}