{"type": "func", "start": 4145248, "end": 4145404, "name": "EmoteSprite::effectiveLength", "pseudocode": "// \n// EmoteSprite::effectiveLength from 0x3f4060 to 0x3f40fc (156 bytes)\n// \n// 25 xrefs:\n// > CommentCell::loadFromComment @ 0x432e4e\n// > CommentCell::loadFromComment @ 0x432e5e\n// > EditLevelLayer::textChanged @ 0x4a07ae\n// > ShareLevelLayer::init @ 0x4a41ba\n// > ShareLevelLayer::init @ 0x4a41ca\n// > InfoLayer::init @ 0x53f5a0\n// > InfoLayer::init @ 0x53f5ac\n// > ShareCommentLayer::updateCharCountLabel @ 0x540d44\n// > ShareCommentLayer::onShare @ 0x540fee\n// > FriendRequestPopup::loadFromGJFriendRequest @ 0x5db83a\n// > FriendRequestPopup::loadFromGJFriendRequest @ 0x5db84a\n// > SetTextPopup::onClose @ 0x5dc2f0\n// > ShareListLayer::init @ 0x6d771c\n// > ShareListLayer::init @ 0x6d7732\n// > ThreadViewPopup::updateComposeCount @ 0x74889e\n// > NewThreadPopup::textChanged @ 0x748d20\n// > ThreadViewPopup::insertShareToken @ 0x751b76\n// > NewThreadPopup::insertShareToken @ 0x751e80\n// > ThreadDescPopup::onSave @ 0x7547ea\n// > NewThreadPopup::onSend @ 0x754d46\n// > NewThreadPopup::applyMode @ 0x756064\n// > ThreadViewPopup::measureBody @ 0x75b2e2\n// > ThreadViewPopup::onSend @ 0x75dc26\n// > EmotePickerPopup::canAddEmote @ 0x779030\n// > SoundPackDescPopup::onSave @ 0x7859cc\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:16 +0000\n// \n\nint __fastcall EmoteSprite::effectiveLength(unsigned __int8 *a1, int a2, int a3, int a4)\n{\n  int v5; // r5\n  int i; // r2\n  char *v7; // r1\n  void *v9; // [sp+0h] [bp-10h] BYREF\n  int v10; // [sp+4h] [bp-Ch]\n  int v11; // [sp+8h] [bp-8h]\n  int v12; // [sp+Ch] [bp-4h]\n\n  v12 = a4;\n  v9 = nullptr;\n  v10 = 0;\n  v11 = 0;\n  EmoteSprite::parseTokens(a1, (int)&v9, a2);\n  v5 = EmoteSprite::characterCount(a1);\n  for ( i = 0; i != -1431655765 * ((v10 - (int)v9) >> 2); ++i )\n  {\n    v7 = (char *)v9 + 12 * i;\n    v5 -= *((_DWORD *)v7 + 1) - 1;\n  }\n  if ( v9 )\n  {\n    v10 -= 12 * ((715827883 * ((unsigned int)(v10 - (_DWORD)v9) >> 2)) & 0x3FFFFFFF);\n    operator delete(v9);\n  }\n  return v5;\n}", "assembly": "; \n; EmoteSprite::effectiveLength from 0x3f4060 to 0x3f40fc (156 bytes)\n; \n; 25 xrefs:\n; > CommentCell::loadFromComment @ 0x432e4e\n; > CommentCell::loadFromComment @ 0x432e5e\n; > EditLevelLayer::textChanged @ 0x4a07ae\n; > ShareLevelLayer::init @ 0x4a41ba\n; > ShareLevelLayer::init @ 0x4a41ca\n; > InfoLayer::init @ 0x53f5a0\n; > InfoLayer::init @ 0x53f5ac\n; > ShareCommentLayer::updateCharCountLabel @ 0x540d44\n; > ShareCommentLayer::onShare @ 0x540fee\n; > FriendRequestPopup::loadFromGJFriendRequest @ 0x5db83a\n; > FriendRequestPopup::loadFromGJFriendRequest @ 0x5db84a\n; > SetTextPopup::onClose @ 0x5dc2f0\n; > ShareListLayer::init @ 0x6d771c\n; > ShareListLayer::init @ 0x6d7732\n; > ThreadViewPopup::updateComposeCount @ 0x74889e\n; > NewThreadPopup::textChanged @ 0x748d20\n; > ThreadViewPopup::insertShareToken @ 0x751b76\n; > NewThreadPopup::insertShareToken @ 0x751e80\n; > ThreadDescPopup::onSave @ 0x7547ea\n; > NewThreadPopup::onSend @ 0x754d46\n; > NewThreadPopup::applyMode @ 0x756064\n; > ThreadViewPopup::measureBody @ 0x75b2e2\n; > ThreadViewPopup::onSend @ 0x75dc26\n; > EmotePickerPopup::canAddEmote @ 0x779030\n; > SoundPackDescPopup::onSave @ 0x7859cc\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:16 +0000\n; \nPUSH            {R0-R6,LR}                                             ; +0x0, 0x3f4060\nMOV             R2, R1                                                 ; +0x2, 0x3f4062\nLDR             R4, =(__stack_chk_guard_ptr - 0x3F406E)                ; +0x4, 0x3f4064\nMOV             R1, SP                                                 ; +0x6, 0x3f4066\nMOV             R5, R0                                                 ; +0x8, 0x3f4068\nADD             R4, PC; __stack_chk_guard_ptr                          ; +0xa, 0x3f406a\nLDR             R4, [R4]; __stack_chk_guard                            ; +0xc, 0x3f406c\nLDR             R3, [R4]                                               ; +0xe, 0x3f406e\nSTR             R3, [SP,#0x10+var_4]                                   ; +0x10, 0x3f4070\nMOVS            R3, #0                                                 ; +0x12, 0x3f4072\nSTR             R3, [SP,#0x10+var_10]                                  ; +0x14, 0x3f4074\nSTR             R3, [SP,#0x10+var_C]                                   ; +0x16, 0x3f4076\nSTR             R3, [SP,#0x10+var_8]                                   ; +0x18, 0x3f4078\nBL              _ZN11EmoteSprite11parseTokensERKNSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEPNS0_6vectorI10EmoteTokenNS4_ISA_EEEEi; EmoteSprite::parseTokens(std::string const&,std::vector<EmoteToken> *,int) ; +0x1a, 0x3f407a\nMOV             R0, R5                                                 ; +0x1e, 0x3f407e\nBL              _ZN11EmoteSprite14characterCountERKNSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE; EmoteSprite::characterCount(std::string const&) ; +0x20, 0x3f4080\nMOV             R5, R0                                                 ; +0x24, 0x3f4084\nLDMFD.W         SP, {R0,R3}; void *                                    ; +0x26, 0x3f4086\nLDR             R1, =0xAAAAAAAB                                        ; +0x2a, 0x3f408a\nMOVS            R2, #0                                                 ; +0x2c, 0x3f408c\nSUBS            R3, R3, R0                                             ; +0x2e, 0x3f408e\nMOVS            R6, #0xC                                               ; +0x30, 0x3f4090\nASRS            R3, R3, #2                                             ; +0x32, 0x3f4092\nMULS            R3, R1                                                 ; +0x34, 0x3f4094\nCMP             R2, R3                                                 ; +0x36, 0x3f4096\nBEQ             loc_3F40A8                                             ; +0x38, 0x3f4098\nMLA             R1, R6, R2, R0                                         ; +0x3a, 0x3f409a\nADDS            R2, #1                                                 ; +0x3e, 0x3f409e\nLDR             R1, [R1,#4]                                            ; +0x40, 0x3f40a0\nSUBS            R1, #1                                                 ; +0x42, 0x3f40a2\nSUBS            R5, R5, R1                                             ; +0x44, 0x3f40a4\nB               loc_3F4096                                             ; +0x46, 0x3f40a6\nCBZ             R0, loc_3F40C6                                         ; +0x48, 0x3f40a8\nLDR             R3, [SP,#0x10+var_C]                                   ; +0x4a, 0x3f40aa\nLDR             R2, =0x2AAAAAAB                                        ; +0x4c, 0x3f40ac\nSUBS            R1, R3, R0                                             ; +0x4e, 0x3f40ae\nLSRS            R1, R1, #2                                             ; +0x50, 0x3f40b0\nMULS            R2, R1                                                 ; +0x52, 0x3f40b2\nMOV             R1, #0xFFFFFFF4                                        ; +0x54, 0x3f40b4\nBIC.W           R2, R2, #0xC0000000                                    ; +0x58, 0x3f40b8\nMLA             R3, R1, R2, R3                                         ; +0x5c, 0x3f40bc\nSTR             R3, [SP,#0x10+var_C]                                   ; +0x60, 0x3f40c0\nBL              _ZdlPv; operator delete(void *)                        ; +0x62, 0x3f40c2\nLDR             R2, [SP,#0x10+var_4]                                   ; +0x66, 0x3f40c6\nMOV             R0, R5                                                 ; +0x68, 0x3f40c8\nLDR             R3, [R4]                                               ; +0x6a, 0x3f40ca\nCMP             R2, R3                                                 ; +0x6c, 0x3f40cc\nBEQ             loc_3F40F8                                             ; +0x6e, 0x3f40ce\nBLX             __stack_chk_fail                                       ; +0x70, 0x3f40d0\nLDR             R0, [SP,#0x10+var_10]; void *                          ; +0x74, 0x3f40d4\nCBZ             R0, loc_3F40F4                                         ; +0x76, 0x3f40d6\nLDR             R3, [SP,#0x10+var_C]                                   ; +0x78, 0x3f40d8\nLDR             R2, =0x2AAAAAAB                                        ; +0x7a, 0x3f40da\nSUBS            R1, R3, R0                                             ; +0x7c, 0x3f40dc\nLSRS            R1, R1, #2                                             ; +0x7e, 0x3f40de\nMULS            R2, R1                                                 ; +0x80, 0x3f40e0\nMOV             R1, #0xFFFFFFF4                                        ; +0x82, 0x3f40e2\nBIC.W           R2, R2, #0xC0000000                                    ; +0x86, 0x3f40e6\nMLA             R3, R1, R2, R3                                         ; +0x8a, 0x3f40ea\nSTR             R3, [SP,#0x10+var_C]                                   ; +0x8e, 0x3f40ee\nBL              _ZdlPv; operator delete(void *)                        ; +0x90, 0x3f40f0\nBL              __cxa_end_cleanup                                      ; +0x94, 0x3f40f4\nADD             SP, SP, #0x10                                          ; +0x98, 0x3f40f8\nPOP             {R4-R6,PC}                                             ; +0x9a, 0x3f40fa", "xrefs": ["CommentCell::loadFromComment @ 0x432e4e", "CommentCell::loadFromComment @ 0x432e5e", "EditLevelLayer::textChanged @ 0x4a07ae", "ShareLevelLayer::init @ 0x4a41ba", "ShareLevelLayer::init @ 0x4a41ca", "InfoLayer::init @ 0x53f5a0", "InfoLayer::init @ 0x53f5ac", "ShareCommentLayer::updateCharCountLabel @ 0x540d44", "ShareCommentLayer::onShare @ 0x540fee", "FriendRequestPopup::loadFromGJFriendRequest @ 0x5db83a", "FriendRequestPopup::loadFromGJFriendRequest @ 0x5db84a", "SetTextPopup::onClose @ 0x5dc2f0", "ShareListLayer::init @ 0x6d771c", "ShareListLayer::init @ 0x6d7732", "ThreadViewPopup::updateComposeCount @ 0x74889e", "NewThreadPopup::textChanged @ 0x748d20", "ThreadViewPopup::insertShareToken @ 0x751b76", "NewThreadPopup::insertShareToken @ 0x751e80", "ThreadDescPopup::onSave @ 0x7547ea", "NewThreadPopup::onSend @ 0x754d46", "NewThreadPopup::applyMode @ 0x756064", "ThreadViewPopup::measureBody @ 0x75b2e2", "ThreadViewPopup::onSend @ 0x75dc26", "EmotePickerPopup::canAddEmote @ 0x779030", "SoundPackDescPopup::onSave @ 0x7859cc"], "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"}