{"type": "func", "start": 5370104000, "end": 5370104464, "name": "CommentCell::onLike", "pseudocode": "// \n// CommentCell::onLike from 0x1401548c0 to 0x140154a90 (464 bytes)\n// \n// 2 xrefs:\n// > CommentCell::loadFromComment @ 0x140154003\n// > <???> @ 0x1409178ac\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:27:19 +0000\n// \n\n// Hidden C++ exception states: #wind=2\n__int64 __fastcall CommentCell::onLike(__int64 a1)\n{\n  __int64 v2; // rax\n  __int64 v3; // rcx\n  __int64 v4; // rcx\n  __int64 result; // rax\n  unsigned int v6; // ebx\n  unsigned int v7; // esi\n  __int64 v8; // rcx\n  __int64 v9; // rcx\n  unsigned int *v10; // rdx\n  __int64 v11; // r9\n  _QWORD *v12; // rax\n  void *v13; // [rsp+40h] [rbp+18h]\n  void *v14; // [rsp+40h] [rbp+18h]\n\n  v2 = GJAccountManager::sharedState(a1);\n  if ( *(_DWORD *)(v2 + 360) - *(_DWORD *)(v2 + 364) <= 0 )\n  {\n    GJAccountManager::sharedState(v3);\n    return GJAccountManager::showAccountNeededAlert(v4, \"like <cg>comments</c>\");\n  }\n  result = *(_QWORD *)(a1 + 592);\n  if ( !result )\n    goto LABEL_10;\n  if ( *(_DWORD *)(result + 460) != 3 )\n  {\n    if ( *(_DWORD *)(result + 460) == 4 )\n    {\n      v6 = 7;\n      goto LABEL_13;\n    }\n    if ( *(_DWORD *)(result + 460) == 5 )\n    {\n      v6 = 8;\n      goto LABEL_13;\n    }\nLABEL_10:\n    if ( *(_BYTE *)(a1 + 600) )\n    {\n      v6 = 3;\n      v7 = *(_DWORD *)(result + 404);\n      goto LABEL_14;\n    }\n    v6 = 2;\nLABEL_13:\n    v7 = *(_DWORD *)(result + 396);\nLABEL_14:\n    if ( !result )\n      return result;\n    goto LABEL_15;\n  }\n  v6 = 6;\n  v7 = 0;\nLABEL_15:\n  v8 = *(_QWORD *)&qword_14090BFB0;\n  if ( !*(_QWORD *)&qword_14090BFB0 )\n  {\n    v13 = operator new(0x690u);\n    *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v13);\n    (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);\n    v8 = *(_QWORD *)&qword_14090BFB0;\n  }\n  result = GameLevelManager::hasLikedItemFullCheck(v8, v6, *(unsigned int *)(*(_QWORD *)(a1 + 592) + 384LL), v7);\n  if ( !(_BYTE)result )\n  {\n    v9 = qword_14090BFD0;\n    if ( !qword_14090BFD0 )\n    {\n      v14 = operator new(0x6E8u);\n      qword_14090BFD0 = GameManager::GameManager(v14);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n      v9 = qword_14090BFD0;\n    }\n    v10 = *(unsigned int **)(a1 + 592);\n    result = (unsigned int)(*(_DWORD *)(v9 + 692) - *(_DWORD *)(v9 + 696));\n    if ( v10[97] != (_DWORD)result )\n    {\n      if ( !v10[101]\n        || (v11 = GJAccountManager::sharedState(v9),\n            v10 = *(unsigned int **)(a1 + 592),\n            result = (unsigned int)(*(_DWORD *)(v11 + 360) - *(_DWORD *)(v11 + 364)),\n            v10[101] != (_DWORD)result) )\n      {\n        v12 = (_QWORD *)LikeItemLayer::create(v6, v10[96], v7);\n        v12[85] = a1 + 560;\n        return (*(__int64 (__fastcall **)(_QWORD *))(*v12 + 1064LL))(v12);\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; CommentCell::onLike from 0x1401548c0 to 0x140154a90 (464 bytes)\n; \n; 2 xrefs:\n; > CommentCell::loadFromComment @ 0x140154003\n; > <???> @ 0x1409178ac\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:27:19 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1401548c0\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x1401548c5\npush    rdi                                                            ; +0xa, 0x1401548ca\nsub     rsp, 20h                                                       ; +0xb, 0x1401548cb\nmov     rdi, rcx                                                       ; +0xf, 0x1401548cf\ncall    GJAccountManager__sharedState                                  ; +0x12, 0x1401548d2\nmov     edx, [rax+168h]                                                ; +0x17, 0x1401548d7\nsub     edx, [rax+16Ch]                                                ; +0x1d, 0x1401548dd\ntest    edx, edx                                                       ; +0x23, 0x1401548e3\njg      short loc_140154907                                            ; +0x25, 0x1401548e5\ncall    GJAccountManager__sharedState                                  ; +0x27, 0x1401548e7\nlea     rdx, aLikeCgComments; \"like <cg>comments</c>\"                  ; +0x2c, 0x1401548ec\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x33, 0x1401548f3\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x38, 0x1401548f8\nadd     rsp, 20h                                                       ; +0x3d, 0x1401548fd\npop     rdi                                                            ; +0x41, 0x140154901\njmp     GJAccountManager__showAccountNeededAlert                       ; +0x42, 0x140154902\nmov     rax, [rdi+250h]                                                ; +0x47, 0x140154907\ntest    rax, rax                                                       ; +0x4e, 0x14015490e\njz      short loc_140154945                                            ; +0x51, 0x140154911\ncmp     dword ptr [rax+1CCh], 3                                        ; +0x53, 0x140154913\njnz     short loc_140154925                                            ; +0x5a, 0x14015491a\nmov     ebx, 6                                                         ; +0x5c, 0x14015491c\nxor     esi, esi                                                       ; +0x61, 0x140154921\njmp     short loc_14015496F                                            ; +0x63, 0x140154923\ncmp     dword ptr [rax+1CCh], 4                                        ; +0x65, 0x140154925\njnz     short loc_140154935                                            ; +0x6c, 0x14015492c\nmov     ebx, 7                                                         ; +0x6e, 0x14015492e\njmp     short loc_140154960                                            ; +0x73, 0x140154933\ncmp     dword ptr [rax+1CCh], 5                                        ; +0x75, 0x140154935\njnz     short loc_140154945                                            ; +0x7c, 0x14015493c\nmov     ebx, 8                                                         ; +0x7e, 0x14015493e\njmp     short loc_140154960                                            ; +0x83, 0x140154943\ncmp     byte ptr [rdi+258h], 0                                         ; +0x85, 0x140154945\njz      short loc_14015495B                                            ; +0x8c, 0x14015494c\nmov     ebx, 3                                                         ; +0x8e, 0x14015494e\nmov     esi, [rax+194h]                                                ; +0x93, 0x140154953\njmp     short loc_140154966                                            ; +0x99, 0x140154959\nmov     ebx, 2                                                         ; +0x9b, 0x14015495b\nmov     esi, [rax+18Ch]                                                ; +0xa0, 0x140154960\ntest    rax, rax                                                       ; +0xa6, 0x140154966\njz      loc_140154A80                                                  ; +0xa9, 0x140154969\nmov     rcx, cs:qword_14090BFB0                                        ; +0xaf, 0x14015496f\ntest    rcx, rcx                                                       ; +0xb6, 0x140154976\njnz     short loc_1401549AD                                            ; +0xb9, 0x140154979\nmov     ecx, 690h; Size                                                ; +0xbb, 0x14015497b\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xc0, 0x140154980\nmov     [rsp+28h+arg_10], rax                                          ; +0xc5, 0x140154985\nmov     rcx, rax                                                       ; +0xca, 0x14015498a\ncall    GameLevelManager__GameLevelManager                             ; +0xcd, 0x14015498d\nnop                                                                    ; +0xd2, 0x140154992\nmov     cs:qword_14090BFB0, rax                                        ; +0xd3, 0x140154993\nmov     rcx, [rax]                                                     ; +0xda, 0x14015499a\nmov     rdx, [rcx+48h]                                                 ; +0xdd, 0x14015499d\nmov     rcx, rax                                                       ; +0xe1, 0x1401549a1\ncall    rdx                                                            ; +0xe4, 0x1401549a4\nmov     rcx, cs:qword_14090BFB0                                        ; +0xe6, 0x1401549a6\nmov     r8, [rdi+250h]                                                 ; +0xed, 0x1401549ad\nmov     r9d, esi                                                       ; +0xf4, 0x1401549b4\nmov     r8d, [r8+180h]                                                 ; +0xf7, 0x1401549b7\nmov     edx, ebx                                                       ; +0xfe, 0x1401549be\ncall    GameLevelManager__hasLikedItemFullCheck                        ; +0x100, 0x1401549c0\ntest    al, al                                                         ; +0x105, 0x1401549c5\njnz     loc_140154A80                                                  ; +0x107, 0x1401549c7\nmov     rcx, cs:qword_14090BFD0                                        ; +0x10d, 0x1401549cd\ntest    rcx, rcx                                                       ; +0x114, 0x1401549d4\njnz     short loc_140154A0B                                            ; +0x117, 0x1401549d7\nmov     ecx, 6E8h; Size                                                ; +0x119, 0x1401549d9\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x11e, 0x1401549de\nmov     [rsp+28h+arg_10], rax                                          ; +0x123, 0x1401549e3\nmov     rcx, rax                                                       ; +0x128, 0x1401549e8\ncall    GameManager__GameManager                                       ; +0x12b, 0x1401549eb\nnop                                                                    ; +0x130, 0x1401549f0\nmov     cs:qword_14090BFD0, rax                                        ; +0x131, 0x1401549f1\nmov     rcx, [rax]                                                     ; +0x138, 0x1401549f8\nmov     rdx, [rcx+48h]                                                 ; +0x13b, 0x1401549fb\nmov     rcx, rax                                                       ; +0x13f, 0x1401549ff\ncall    rdx                                                            ; +0x142, 0x140154a02\nmov     rcx, cs:qword_14090BFD0                                        ; +0x144, 0x140154a04\nmov     rdx, [rdi+250h]                                                ; +0x14b, 0x140154a0b\nmov     eax, [rcx+2B4h]                                                ; +0x152, 0x140154a12\nsub     eax, [rcx+2B8h]                                                ; +0x158, 0x140154a18\ncmp     [rdx+184h], eax                                                ; +0x15e, 0x140154a1e\njz      short loc_140154A80                                            ; +0x164, 0x140154a24\ncmp     dword ptr [rdx+194h], 0                                        ; +0x166, 0x140154a26\njz      short loc_140154A53                                            ; +0x16d, 0x140154a2d\ncall    GJAccountManager__sharedState                                  ; +0x16f, 0x140154a2f\nmov     r9, rax                                                        ; +0x174, 0x140154a34\nmov     rdx, [rdi+250h]                                                ; +0x177, 0x140154a37\nmov     eax, [rax+168h]                                                ; +0x17e, 0x140154a3e\nsub     eax, [r9+16Ch]                                                 ; +0x184, 0x140154a44\ncmp     [rdx+194h], eax                                                ; +0x18b, 0x140154a4b\njz      short loc_140154A80                                            ; +0x191, 0x140154a51\nmov     r8d, esi                                                       ; +0x193, 0x140154a53\nmov     edx, [rdx+180h]                                                ; +0x196, 0x140154a56\nmov     ecx, ebx                                                       ; +0x19c, 0x140154a5c\ncall    LikeItemLayer__create                                          ; +0x19e, 0x140154a5e\nlea     rcx, [rdi+230h]                                                ; +0x1a3, 0x140154a63\nmov     [rax+2A8h], rcx                                                ; +0x1aa, 0x140154a6a\nmov     rcx, [rax]                                                     ; +0x1b1, 0x140154a71\nmov     rdx, [rcx+428h]                                                ; +0x1b4, 0x140154a74\nmov     rcx, rax                                                       ; +0x1bb, 0x140154a7b\ncall    rdx                                                            ; +0x1be, 0x140154a7e\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x1c0, 0x140154a80\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x1c5, 0x140154a85\nadd     rsp, 20h                                                       ; +0x1ca, 0x140154a8a\npop     rdi                                                            ; +0x1ce, 0x140154a8e\nretn                                                                   ; +0x1cf, 0x140154a8f", "xrefs": ["CommentCell::loadFromComment @ 0x140154003", "<???> @ 0x1409178ac"], "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"}