{"type": "func", "start": 4297413008, "end": 4297413243, "name": "CommentCell::likedItem", "pseudocode": "// \n// CommentCell::likedItem from 0x100255190 to 0x10025527b (235 bytes)\n// \n// 2 xrefs:\n// > sub_1002553E0 @ 0x1002553ec\n// > <???> @ 0x1008e6a98\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 CommentCell::likedItem(CommentCell *a1, LikeItemType a2, int a3, bool a4)\n{\n  GJComment *m_comment; // rax\n  int m_likeCount; // r14d\n  cocos2d::CCLabelBMFont *m_likeLabel; // rbx\n  int v7; // r15d\n  cocos2d::CCString *v8; // rax\n  const char *CString; // rax\n  cocos2d::CCSprite *m_iconSprite; // rbx\n  cocos2d::CCSpriteFrameCache *v11; // rax\n  const char *v12; // rsi\n  cocos2d::CCSpriteFrame *v13; // rax\n  char v14; // [rsp+0h] [rbp-20h]\n\n  m_comment = a1->m_comment;\n  if ( m_comment && m_comment->m_commentID == a3 )\n  {\n    m_likeCount = m_comment->m_likeCount;\n    if ( a4 )\n    {\n      m_comment->m_likeCount = m_likeCount + 1;\n      m_likeLabel = a1->m_likeLabel;\n      v7 = -2;\n      if ( !m_likeLabel )\n        return;\n    }\n    else\n    {\n      m_comment->m_likeCount = m_likeCount - 1;\n      m_likeLabel = a1->m_likeLabel;\n      v7 = 0;\n      if ( !m_likeLabel )\n        return;\n    }\n    v8 = (cocos2d::CCString *)sub_1007AB580(\"%i\", v14);\n    CString = cocos2d::CCString::getCString(v8);\n    ((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))m_likeLabel->setString)(m_likeLabel, CString);\n    m_iconSprite = a1->m_iconSprite;\n    v11 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();\n    v12 = \"GJ_dislikesIcon_001.png\";\n    if ( m_likeCount > v7 )\n      v12 = \"GJ_likesIcon_001.png\";\n    v13 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v11, v12);\n    ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))m_iconSprite->setDisplayFrame)(\n      m_iconSprite,\n      v13);\n  }\n}", "assembly": "; \n; CommentCell::likedItem from 0x100255190 to 0x10025527b (235 bytes)\n; \n; 2 xrefs:\n; > sub_1002553E0 @ 0x1002553ec\n; > <???> @ 0x1008e6a98\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\npush    rbp                                                            ; +0x0, 0x100255190\nmov     rbp, rsp                                                       ; +0x1, 0x100255191\npush    r15                                                            ; +0x4, 0x100255194\npush    r14                                                            ; +0x6, 0x100255196\npush    r12                                                            ; +0x8, 0x100255198\npush    rbx; char                                                      ; +0xa, 0x10025519a\nmov     rax, [rdi+248h]                                                ; +0xb, 0x10025519b\ntest    rax, rax                                                       ; +0x12, 0x1002551a2\njz      loc_100255272                                                  ; +0x15, 0x1002551a5\ncmp     [rax+170h], edx                                                ; +0x1b, 0x1002551ab\njnz     loc_100255272                                                  ; +0x21, 0x1002551b1\nmov     r14d, [rax+178h]                                               ; +0x27, 0x1002551b7\ntest    cl, cl                                                         ; +0x2e, 0x1002551be\njz      loc_100255255                                                  ; +0x30, 0x1002551c0\nlea     esi, [r14+1]                                                   ; +0x36, 0x1002551c6\nmov     [rax+178h], esi                                                ; +0x3a, 0x1002551ca\nmov     rbx, [rdi+240h]                                                ; +0x40, 0x1002551d0\nmov     r15d, 0FFFFFFFEh                                               ; +0x47, 0x1002551d7\ntest    rbx, rbx                                                       ; +0x4d, 0x1002551dd\njz      loc_100255272                                                  ; +0x50, 0x1002551e0\nlea     rax, aI; \"%i\"                                                  ; +0x56, 0x1002551e6\nmov     r12, rdi                                                       ; +0x5d, 0x1002551ed\nmov     rdi, rax; __format                                             ; +0x60, 0x1002551f0\nxor     eax, eax                                                       ; +0x63, 0x1002551f3\ncall    sub_1007AB580                                                  ; +0x65, 0x1002551f5\nmov     rdi, rax                                                       ; +0x6a, 0x1002551fa\ncall    cocos2d__CCString__getCString                                  ; +0x6d, 0x1002551fd\nmov     rcx, [rbx]                                                     ; +0x72, 0x100255202\nmov     rdi, rbx                                                       ; +0x75, 0x100255205\nmov     rsi, rax                                                       ; +0x78, 0x100255208\ncall    qword ptr [rcx+390h]                                           ; +0x7b, 0x10025520b\nmov     rbx, [r12+238h]                                                ; +0x81, 0x100255211\ncall    cocos2d__CCSpriteFrameCache__sharedSpriteFrameCache            ; +0x89, 0x100255219\ncmp     r14d, r15d                                                     ; +0x8e, 0x10025521e\nlea     rcx, aGjLikesicon001; \"GJ_likesIcon_001.png\"                   ; +0x91, 0x100255221\nlea     rsi, aGjDislikesicon; \"GJ_dislikesIcon_001.png\"                ; +0x98, 0x100255228\ncmovg   rsi, rcx                                                       ; +0x9f, 0x10025522f\nmov     rdi, rax                                                       ; +0xa3, 0x100255233\ncall    cocos2d__CCSpriteFrameCache__spriteFrameByName                 ; +0xa6, 0x100255236\nmov     rcx, [rbx]                                                     ; +0xab, 0x10025523b\nmov     rcx, [rcx+478h]                                                ; +0xae, 0x10025523e\nmov     rdi, rbx                                                       ; +0xb5, 0x100255245\nmov     rsi, rax                                                       ; +0xb8, 0x100255248\npop     rbx                                                            ; +0xbb, 0x10025524b\npop     r12                                                            ; +0xbc, 0x10025524c\npop     r14                                                            ; +0xbe, 0x10025524e\npop     r15                                                            ; +0xc0, 0x100255250\npop     rbp                                                            ; +0xc2, 0x100255252\njmp     rcx                                                            ; +0xc3, 0x100255253\nlea     esi, [r14-1]                                                   ; +0xc5, 0x100255255\nmov     [rax+178h], esi                                                ; +0xc9, 0x100255259\nmov     rbx, [rdi+240h]                                                ; +0xcf, 0x10025525f\nxor     r15d, r15d                                                     ; +0xd6, 0x100255266\ntest    rbx, rbx                                                       ; +0xd9, 0x100255269\njnz     loc_1002551E6                                                  ; +0xdc, 0x10025526c\npop     rbx                                                            ; +0xe2, 0x100255272\npop     r12                                                            ; +0xe3, 0x100255273\npop     r14                                                            ; +0xe5, 0x100255275\npop     r15                                                            ; +0xe7, 0x100255277\npop     rbp                                                            ; +0xe9, 0x100255279\nretn                                                                   ; +0xea, 0x10025527a", "xrefs": ["sub_1002553E0 @ 0x1002553ec", "<???> @ 0x1008e6a98"], "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"}