{"type": "func", "start": 4304419440, "end": 4304419562, "name": "EmotePickerPopup::canAddEmote", "pseudocode": "// \n// EmotePickerPopup::canAddEmote from 0x100903a70 to 0x100903aea (122 bytes)\n// \n// 2 xrefs:\n// > EmotePickerPopup::refreshEnabled @ 0x100902d4f\n// > EmotePickerPopup::onPickEmote @ 0x1009037d1\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:38:03 +0000\n// \n\n__int64 __fastcall EmotePickerPopup::canAddEmote(__int64 a1)\n{\n  unsigned int v1; // ebx\n  __int64 v2; // rsi\n  int v3; // eax\n  __int64 v4; // rsi\n  void *v6[5]; // [rsp+8h] [rbp-28h] BYREF\n\n  v2 = *(_QWORD *)(a1 + 1168);\n  if ( v2 )\n  {\n    v1 = a1;\n    CCTextInputNode::getString(v6, v2);\n    v3 = sub_100904A70(v6, 0, *(unsigned int *)(a1 + 1176));\n    v4 = *(unsigned int *)(a1 + 1176);\n    if ( v3 < (int)v4 )\n    {\n      LOBYTE(v1) = (int)EmoteSprite::effectiveLength(v6, v4) < *(_DWORD *)(a1 + 1180);\n      if ( ((__int64)v6[0] & 1) == 0 )\n        return v1;\n      goto LABEL_7;\n    }\n    v1 = 0;\n    if ( ((__int64)v6[0] & 1) != 0 )\nLABEL_7:\n      operator delete(v6[2]);\n  }\n  else\n  {\n    LOBYTE(v1) = 1;\n  }\n  return v1;\n}", "assembly": "; \n; EmotePickerPopup::canAddEmote from 0x100903a70 to 0x100903aea (122 bytes)\n; \n; 2 xrefs:\n; > EmotePickerPopup::refreshEnabled @ 0x100902d4f\n; > EmotePickerPopup::onPickEmote @ 0x1009037d1\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:38:03 +0000\n; \npush    rbp                                                            ; +0x0, 0x100903a70\nmov     rbp, rsp                                                       ; +0x1, 0x100903a71\npush    r14                                                            ; +0x4, 0x100903a74\npush    rbx                                                            ; +0x6, 0x100903a76\nsub     rsp, 20h                                                       ; +0x7, 0x100903a77\nmov     rsi, [rdi+490h]                                                ; +0xb, 0x100903a7b\ntest    rsi, rsi                                                       ; +0x12, 0x100903a82\njz      short loc_100903ACA                                            ; +0x15, 0x100903a85\nmov     rbx, rdi                                                       ; +0x17, 0x100903a87\nlea     r14, [rbp+var_28]                                              ; +0x1a, 0x100903a8a\nmov     rdi, r14                                                       ; +0x1e, 0x100903a8e\ncall    CCTextInputNode__getString                                     ; +0x21, 0x100903a91\nmov     edx, [rbx+498h]                                                ; +0x26, 0x100903a96\nmov     rdi, r14                                                       ; +0x2c, 0x100903a9c\nxor     esi, esi                                                       ; +0x2f, 0x100903a9f\ncall    sub_100904A70                                                  ; +0x31, 0x100903aa1\nmov     esi, [rbx+498h]                                                ; +0x36, 0x100903aa6\ncmp     eax, esi                                                       ; +0x3c, 0x100903aac\njge     short loc_100903ACE                                            ; +0x3e, 0x100903aae\nlea     rdi, [rbp+var_28]                                              ; +0x40, 0x100903ab0\ncall    EmoteSprite__effectiveLength                                   ; +0x44, 0x100903ab4\ncmp     eax, [rbx+49Ch]                                                ; +0x49, 0x100903ab9\nsetl    bl                                                             ; +0x4f, 0x100903abf\ntest    [rbp+var_28], 1                                                ; +0x52, 0x100903ac2\njnz     short loc_100903AD6                                            ; +0x56, 0x100903ac6\njmp     short loc_100903ADF                                            ; +0x58, 0x100903ac8\nmov     bl, 1                                                          ; +0x5a, 0x100903aca\njmp     short loc_100903ADF                                            ; +0x5c, 0x100903acc\nxor     ebx, ebx                                                       ; +0x5e, 0x100903ace\ntest    [rbp+var_28], 1                                                ; +0x60, 0x100903ad0\njz      short loc_100903ADF                                            ; +0x64, 0x100903ad4\nmov     rdi, [rbp+__p]; __p                                            ; +0x66, 0x100903ad6\ncall    __ZdlPv; operator delete(void *)                               ; +0x6a, 0x100903ada\nmov     eax, ebx                                                       ; +0x6f, 0x100903adf\nadd     rsp, 20h                                                       ; +0x71, 0x100903ae1\npop     rbx                                                            ; +0x75, 0x100903ae5\npop     r14                                                            ; +0x76, 0x100903ae6\npop     rbp                                                            ; +0x78, 0x100903ae8\nretn                                                                   ; +0x79, 0x100903ae9", "xrefs": ["EmotePickerPopup::refreshEnabled @ 0x100902d4f", "EmotePickerPopup::onPickEmote @ 0x1009037d1"], "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"}