{"type": "func", "start": 4142636, "end": 4142690, "name": "EmoteSprite::characterCount", "pseudocode": "// \n// EmoteSprite::characterCount from 0x3f362c to 0x3f3662 (54 bytes)\n// \n// 3 xrefs:\n// > EmoteSprite::effectiveLength @ 0x3f4080\n// > ShareCommentLayer::updateCharCountLabel @ 0x540d4c\n// > NewThreadPopup::textChanged @ 0x748cf0\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:47:15 +0000\n// \n\nint __fastcall EmoteSprite::characterCount(unsigned __int8 *a1)\n{\n  unsigned int v1; // r3\n  int v2; // r2\n  int result; // r0\n  int v5; // r5\n  unsigned int v6; // r2\n  unsigned __int8 *v7; // r4\n  unsigned __int8 v8; // r4\n\n  v1 = 0;\n  v2 = *a1;\n  result = 0;\n  v5 = v2 & 1;\n  v6 = v2 >> 1;\n  while ( v5 )\n  {\n    if ( v1 >= *((_DWORD *)a1 + 1) )\n      return result;\n    v7 = *((unsigned __int8 **)a1 + 2);\nLABEL_7:\n    v8 = v7[v1++];\n    if ( (v8 & 0xC0) != 0x80 )\n      ++result;\n  }\n  if ( v1 < v6 )\n  {\n    v7 = a1 + 1;\n    goto LABEL_7;\n  }\n  return result;\n}", "assembly": "; \n; EmoteSprite::characterCount from 0x3f362c to 0x3f3662 (54 bytes)\n; \n; 3 xrefs:\n; > EmoteSprite::effectiveLength @ 0x3f4080\n; > ShareCommentLayer::updateCharCountLabel @ 0x540d4c\n; > NewThreadPopup::textChanged @ 0x748cf0\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:47:15 +0000\n; \nPUSH            {R4,R5,LR}                                             ; +0x0, 0x3f362c\nMOVS            R3, #0                                                 ; +0x2, 0x3f362e\nLDRB            R2, [R0]                                               ; +0x4, 0x3f3630\nMOV             R1, R0                                                 ; +0x6, 0x3f3632\nMOV             R0, R3                                                 ; +0x8, 0x3f3634\nAND.W           R5, R2, #1                                             ; +0xa, 0x3f3636\nASRS            R2, R2, #1                                             ; +0xe, 0x3f363a\nCBZ             R5, loc_3F3648                                         ; +0x10, 0x3f363c\nLDR             R4, [R1,#4]                                            ; +0x12, 0x3f363e\nCMP             R3, R4                                                 ; +0x14, 0x3f3640\nBCS             locret_3F365E                                          ; +0x16, 0x3f3642\nLDR             R4, [R1,#8]                                            ; +0x18, 0x3f3644\nB               loc_3F364E                                             ; +0x1a, 0x3f3646\nCMP             R3, R2                                                 ; +0x1c, 0x3f3648\nBCS             locret_3F3660                                          ; +0x1e, 0x3f364a\nADDS            R4, R1, #1                                             ; +0x20, 0x3f364c\nLDRB            R4, [R4,R3]                                            ; +0x22, 0x3f364e\nADDS            R3, #1                                                 ; +0x24, 0x3f3650\nAND.W           R4, R4, #0xC0                                          ; +0x26, 0x3f3652\nCMP             R4, #0x80                                              ; +0x2a, 0x3f3656\nIT NE                                                                  ; +0x2c, 0x3f3658\nADDNE           R0, #1                                                 ; +0x2e, 0x3f365a\nB               loc_3F363C                                             ; +0x30, 0x3f365c\nPOP             {R4,R5,PC}                                             ; +0x32, 0x3f365e\nPOP             {R4,R5,PC}                                             ; +0x34, 0x3f3660", "xrefs": ["EmoteSprite::effectiveLength @ 0x3f4080", "ShareCommentLayer::updateCharCountLabel @ 0x540d4c", "NewThreadPopup::textChanged @ 0x748cf0"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "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"}