{"type": "func", "start": 4296246964, "end": 4296247296, "name": "CommentCell::onLike", "pseudocode": "// \n// CommentCell::onLike from 0x1001386b4 to 0x100138800 (332 bytes)\n// \n// 1 xrefs:\n// > CommentCell::loadFromComment @ 0x10012c3a4\n// \n// This function is hookable on this platform (idp: arm, 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 10:59:28 +0000\n// \n\n__int64 __fastcall CommentCell::onLike(__int64 a1)\n{\n  __int64 v2; // x0\n  __int64 v3; // x8\n  int v4; // w9\n  __int64 v5; // x20\n  __int64 v6; // x0\n  __int64 result; // x0\n  __int64 v8; // x9\n  __int64 v9; // x21\n  __int64 v10; // x0\n  int v11; // w22\n  __int64 v12; // x8\n  int v13; // w22\n  _QWORD *v14; // x0\n\n  v2 = GJAccountManager::sharedState(a1);\n  if ( *(_DWORD *)(v2 + 352) <= *(_DWORD *)(v2 + 356) )\n  {\n    v6 = GJAccountManager::sharedState(v2);\n    return GJAccountManager::showAccountNeededAlert(v6, \"like <cg>comments</c>\");\n  }\n  v3 = *(_QWORD *)(a1 + 584);\n  if ( !v3 )\n    goto LABEL_8;\n  v4 = *(_DWORD *)(v3 + 436);\n  if ( v4 == 3 )\n  {\n    v9 = 0;\n    v5 = 6;\n    goto LABEL_14;\n  }\n  if ( v4 == 4 )\n  {\n    v5 = 7;\n    goto LABEL_12;\n  }\n  if ( v4 != 5 )\n  {\nLABEL_8:\n    v8 = 380;\n    if ( *(_BYTE *)(a1 + 592) )\n    {\n      v8 = 388;\n      v5 = 3;\n    }\n    else\n    {\n      v5 = 2;\n    }\n    goto LABEL_13;\n  }\n  v5 = 8;\nLABEL_12:\n  v8 = 380;\nLABEL_13:\n  v9 = *(unsigned int *)(v3 + v8);\nLABEL_14:\n  v10 = GameLevelManager::sharedState();\n  result = sub_1000CC360(v10, v5, *(unsigned int *)(*(_QWORD *)(a1 + 584) + 368LL), v9);\n  if ( (result & 1) == 0 )\n  {\n    v11 = *(_DWORD *)(*(_QWORD *)(a1 + 584) + 372LL);\n    result = GameManager::sharedState(result);\n    if ( v11 != *(_DWORD *)(result + 660) - *(_DWORD *)(result + 664) )\n    {\n      v12 = *(_QWORD *)(a1 + 584);\n      v13 = *(_DWORD *)(v12 + 388);\n      if ( v13 )\n      {\n        result = GJAccountManager::sharedState(result);\n        if ( v13 == *(_DWORD *)(result + 352) - *(_DWORD *)(result + 356) )\n          return result;\n        v12 = *(_QWORD *)(a1 + 584);\n      }\n      v14 = (_QWORD *)LikeItemLayer::create(v5, *(unsigned int *)(v12 + 368), v9);\n      v14[84] = a1 + 552;\n      return (*(__int64 (__fastcall **)(_QWORD *))(*v14 + 1312LL))(v14);\n    }\n  }\n  return result;\n}", "assembly": "; \n; CommentCell::onLike from 0x1001386b4 to 0x100138800 (332 bytes)\n; \n; 1 xrefs:\n; > CommentCell::loadFromComment @ 0x10012c3a4\n; \n; This function is hookable on this platform (idp: arm, 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 10:59:28 +0000\n; \nSTP             X22, X21, [SP,#-0x10+var_20]!                          ; +0x0, 0x1001386b4\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x1001386b8\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x1001386bc\nADD             X29, SP, #0x20                                         ; +0xc, 0x1001386c0\nMOV             X19, X0                                                ; +0x10, 0x1001386c4\nBL              GJAccountManager__sharedState                          ; +0x14, 0x1001386c8\nLDR             W8, [X0,#0x160]                                        ; +0x18, 0x1001386cc\nLDR             W9, [X0,#0x164]                                        ; +0x1c, 0x1001386d0\nCMP             W8, W9                                                 ; +0x20, 0x1001386d4\nB.LE            loc_100138708                                          ; +0x24, 0x1001386d8\nLDR             X8, [X19,#0x248]                                       ; +0x28, 0x1001386dc\nCBZ             X8, loc_100138724                                      ; +0x2c, 0x1001386e0\nLDR             W9, [X8,#0x1B4]                                        ; +0x30, 0x1001386e4\nCMP             W9, #3                                                 ; +0x34, 0x1001386e8\nB.EQ            loc_1001387C0                                          ; +0x38, 0x1001386ec\nCMP             W9, #4                                                 ; +0x3c, 0x1001386f0\nB.EQ            loc_100138744                                          ; +0x40, 0x1001386f4\nCMP             W9, #5                                                 ; +0x44, 0x1001386f8\nB.NE            loc_100138724                                          ; +0x48, 0x1001386fc\nMOV             W20, #8                                                ; +0x4c, 0x100138700\nB               loc_100138748                                          ; +0x50, 0x100138704\nBL              GJAccountManager__sharedState                          ; +0x54, 0x100138708\nADRL            X1, aLikeCgComments; \"like <cg>comments</c>\"           ; +0x58, 0x10013870c\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x60, 0x100138714\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x64, 0x100138718\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0x68, 0x10013871c\nB               GJAccountManager__showAccountNeededAlert               ; +0x6c, 0x100138720\nLDRB            W9, [X19,#0x250]                                       ; +0x70, 0x100138724\nCMP             W9, #0                                                 ; +0x74, 0x100138728\nMOV             W9, #0x17C                                             ; +0x78, 0x10013872c\nMOV             W10, #0x184                                            ; +0x7c, 0x100138730\nCSEL            X9, X10, X9, NE                                        ; +0x80, 0x100138734\nMOV             W10, #2                                                ; +0x84, 0x100138738\nCINC            W20, W10, NE                                           ; +0x88, 0x10013873c\nB               loc_10013874C                                          ; +0x8c, 0x100138740\nMOV             W20, #7                                                ; +0x90, 0x100138744\nMOV             W9, #0x17C                                             ; +0x94, 0x100138748\nLDR             W21, [X8,X9]                                           ; +0x98, 0x10013874c\nBL              GameLevelManager__sharedState                          ; +0x9c, 0x100138750\nLDR             X8, [X19,#0x248]                                       ; +0xa0, 0x100138754\nLDR             W2, [X8,#0x170]                                        ; +0xa4, 0x100138758\nMOV             X1, X20                                                ; +0xa8, 0x10013875c\nMOV             X3, X21                                                ; +0xac, 0x100138760\nBL              sub_1000CC360                                          ; +0xb0, 0x100138764\nTBNZ            W0, #0, loc_1001387B0                                  ; +0xb4, 0x100138768\nLDR             X8, [X19,#0x248]                                       ; +0xb8, 0x10013876c\nLDR             W22, [X8,#0x174]                                       ; +0xbc, 0x100138770\nBL              GameManager__sharedState                               ; +0xc0, 0x100138774\nLDR             W8, [X0,#0x294]                                        ; +0xc4, 0x100138778\nLDR             W9, [X0,#0x298]                                        ; +0xc8, 0x10013877c\nSUB             W8, W8, W9                                             ; +0xcc, 0x100138780\nCMP             W22, W8                                                ; +0xd0, 0x100138784\nB.EQ            loc_1001387B0                                          ; +0xd4, 0x100138788\nLDR             X8, [X19,#0x248]                                       ; +0xd8, 0x10013878c\nLDR             W22, [X8,#0x184]                                       ; +0xdc, 0x100138790\nCBZ             W22, loc_1001387D0                                     ; +0xe0, 0x100138794\nBL              GJAccountManager__sharedState                          ; +0xe4, 0x100138798\nLDR             W8, [X0,#0x160]                                        ; +0xe8, 0x10013879c\nLDR             W9, [X0,#0x164]                                        ; +0xec, 0x1001387a0\nSUB             W8, W8, W9                                             ; +0xf0, 0x1001387a4\nCMP             W22, W8                                                ; +0xf4, 0x1001387a8\nB.NE            loc_1001387CC                                          ; +0xf8, 0x1001387ac\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0xfc, 0x1001387b0\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x100, 0x1001387b4\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0x104, 0x1001387b8\nRET                                                                    ; +0x108, 0x1001387bc\nMOV             W21, #0                                                ; +0x10c, 0x1001387c0\nMOV             W20, #6                                                ; +0x110, 0x1001387c4\nB               loc_100138750                                          ; +0x114, 0x1001387c8\nLDR             X8, [X19,#0x248]                                       ; +0x118, 0x1001387cc\nLDR             W1, [X8,#0x170]                                        ; +0x11c, 0x1001387d0\nMOV             X0, X20                                                ; +0x120, 0x1001387d4\nMOV             X2, X21                                                ; +0x124, 0x1001387d8\nBL              LikeItemLayer__create                                  ; +0x128, 0x1001387dc\nADD             X8, X19, #0x228                                        ; +0x12c, 0x1001387e0\nSTR             X8, [X0,#0x2A0]                                        ; +0x130, 0x1001387e4\nLDR             X8, [X0]                                               ; +0x134, 0x1001387e8\nLDR             X1, [X8,#0x520]                                        ; +0x138, 0x1001387ec\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x13c, 0x1001387f0\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x140, 0x1001387f4\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0x144, 0x1001387f8\nBR              X1                                                     ; +0x148, 0x1001387fc", "xrefs": ["CommentCell::loadFromComment @ 0x10012c3a4"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "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"}