{"type": "func", "start": 7836984, "end": 7837206, "name": "EmotePickerPopup::onPickEmote", "pseudocode": "// \n// EmotePickerPopup::onPickEmote from 0x779538 to 0x779616 (222 bytes)\n// \n// 0 xrefs:\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:59:22 +0000\n// \n\nGameManager *__fastcall EmotePickerPopup::onPickEmote(EmotePickerPopup *this, cocos2d::CCObject *a2, int a3)\n{\n  GameManager *result; // r0\n  int v6; // r0\n  int v7; // r1\n  const char **v8; // r6\n  GameManager *v9; // r0\n  int v10; // r0\n  int v11; // r8\n  int v12; // r1\n  int v13; // r2\n  int v14[3]; // [sp+4h] [bp-1Ch] BYREF\n  int v15[3]; // [sp+10h] [bp-10h] BYREF\n\n  result = (GameManager *)EmotePickerPopup::canAddEmote(this, (int)a2, a3, _stack_chk_guard);\n  if ( result )\n  {\n    v6 = (*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2);\n    if ( v6 > 99999 )\n      v6 -= 100000;\n    result = (GameManager *)EmoteSprite::defAtIndex(v6, v7);\n    v8 = (const char **)result;\n    if ( result )\n    {\n      v9 = (GameManager *)GameManager::sharedState(result);\n      GameManager::addRecentEmote(v9, *v8);\n      if ( *((_DWORD *)this + 210) )\n      {\n        memset(v14, 0, sizeof(v14));\n        std::string::__init(v14, \":\", 1u);\n        std::string::append(v14, (char *)*v8);\n        std::string::append(v14, \":\");\n        v11 = *((_DWORD *)this + 210);\n        std::string::basic_string(v15, (int)v14);\n        CCTextInputNode::insertAtCursor(v11, (int)v15);\n        std::string::~string((int)v15);\n        EmotePickerPopup::refreshEnabled((int)this, v12, v13);\n        return (GameManager *)std::string::~string((int)v14);\n      }\n      else\n      {\n        v10 = *((_DWORD *)this + 213);\n        if ( v10 )\n          (*(void (__fastcall **)(int, EmotePickerPopup *, const char **))(*(_DWORD *)v10 + 4))(v10, this, v8);\n        return (GameManager *)(*(int (__fastcall **)(EmotePickerPopup *, _DWORD))(*(_DWORD *)this + 684))(this, 0);\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; EmotePickerPopup::onPickEmote from 0x779538 to 0x779616 (222 bytes)\n; \n; 0 xrefs:\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:59:22 +0000\n; \nPUSH.W          {R4-R8,LR}                                             ; +0x0, 0x779538\nSUB             SP, SP, #0x20                                          ; +0x4, 0x77953c\nLDR             R7, =(__stack_chk_guard_ptr - 0x779548)                ; +0x6, 0x77953e\nMOV             R4, R0                                                 ; +0x8, 0x779540\nMOV             R5, R1                                                 ; +0xa, 0x779542\nADD             R7, PC; __stack_chk_guard_ptr                          ; +0xc, 0x779544\nLDR             R7, [R7]; __stack_chk_guard                            ; +0xe, 0x779546\nLDR             R3, [R7]                                               ; +0x10, 0x779548\nSTR             R3, [SP,#0x20+var_4]                                   ; +0x12, 0x77954a\nBL              _ZN16EmotePickerPopup11canAddEmoteEv; EmotePickerPopup::canAddEmote(void) ; +0x14, 0x77954c\nCMP             R0, #0                                                 ; +0x18, 0x779550\nBEQ             loc_779604                                             ; +0x1a, 0x779552\nLDR             R3, [R5]                                               ; +0x1c, 0x779554\nMOV             R0, R5                                                 ; +0x1e, 0x779556\nLDR             R3, [R3,#0x20]                                         ; +0x20, 0x779558\nBLX             R3                                                     ; +0x22, 0x77955a\nLDR             R3, =0x1869F                                           ; +0x24, 0x77955c\nCMP             R0, R3                                                 ; +0x26, 0x77955e\nITT GT                                                                 ; +0x28, 0x779560\nSUBGT.W         R0, R0, #0x18600                                       ; +0x2a, 0x779562\nSUBGT           R0, #0xA0; this                                        ; +0x2e, 0x779566\nBL              _ZN11EmoteSprite10defAtIndexEi; EmoteSprite::defAtIndex(int) ; +0x30, 0x779568\nMOV             R6, R0                                                 ; +0x34, 0x77956c\nCMP             R0, #0                                                 ; +0x36, 0x77956e\nBEQ             loc_779604                                             ; +0x38, 0x779570\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x3a, 0x779572\nLDR             R1, [R6]; char *                                       ; +0x3e, 0x779576\nBL              _ZN11GameManager14addRecentEmoteEPKc; GameManager::addRecentEmote(char const*) ; +0x40, 0x779578\nLDR.W           R3, [R4,#0x348]                                        ; +0x44, 0x77957c\nCBNZ            R3, loc_7795A0                                         ; +0x48, 0x779580\nLDR.W           R0, [R4,#0x354]                                        ; +0x4a, 0x779582\nCBZ             R0, loc_779592                                         ; +0x4e, 0x779586\nLDR             R3, [R0]                                               ; +0x50, 0x779588\nMOV             R1, R4                                                 ; +0x52, 0x77958a\nMOV             R2, R6                                                 ; +0x54, 0x77958c\nLDR             R3, [R3,#4]                                            ; +0x56, 0x77958e\nBLX             R3                                                     ; +0x58, 0x779590\nLDR             R3, [R4]                                               ; +0x5a, 0x779592\nMOV             R0, R4                                                 ; +0x5c, 0x779594\nMOVS            R1, #0                                                 ; +0x5e, 0x779596\nLDR.W           R3, [R3,#0x2AC]                                        ; +0x60, 0x779598\nBLX             R3                                                     ; +0x64, 0x77959c\nB               loc_779604                                             ; +0x66, 0x77959e\nADD             R5, SP, #0x20+var_1C                                   ; +0x68, 0x7795a0\nLDR             R1, =(asc_B9CE80 - 0x7795AE); \":\"                      ; +0x6a, 0x7795a2\nMOVS            R2, #1                                                 ; +0x6c, 0x7795a4\nMOVS            R3, #0                                                 ; +0x6e, 0x7795a6\nMOV             R0, R5                                                 ; +0x70, 0x7795a8\nADD             R1, PC; \":\"                                            ; +0x72, 0x7795aa\nSTR             R3, [SP,#0x20+var_1C]                                  ; +0x74, 0x7795ac\nSTR             R3, [SP,#0x20+var_18]                                  ; +0x76, 0x7795ae\nSTR             R3, [SP,#0x20+var_14]                                  ; +0x78, 0x7795b0\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0x7a, 0x7795b2\nMOV             R0, R5; int                                            ; +0x7e, 0x7795b6\nLDR             R1, [R6]; char *                                       ; +0x80, 0x7795b8\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKc; std::string::append(char const*) ; +0x82, 0x7795ba\nLDR             R1, =(asc_B9CE80 - 0x7795C6); \":\"                      ; +0x86, 0x7795be\nMOV             R0, R5; int                                            ; +0x88, 0x7795c0\nADD             R1, PC; \":\"                                            ; +0x8a, 0x7795c2\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKc; std::string::append(char const*) ; +0x8c, 0x7795c4\nADD             R6, SP, #0x20+var_10                                   ; +0x90, 0x7795c8\nMOV             R1, R5                                                 ; +0x92, 0x7795ca\nLDR.W           R8, [R4,#0x348]                                        ; +0x94, 0x7795cc\nMOV             R0, R6                                                 ; +0x98, 0x7795d0\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_; std::string::basic_string(std::string const&) ; +0x9a, 0x7795d2\nMOV             R0, R8                                                 ; +0x9e, 0x7795d6\nMOV             R1, R6                                                 ; +0xa0, 0x7795d8\nBL              _ZN15CCTextInputNode14insertAtCursorENSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE; CCTextInputNode::insertAtCursor(std::string) ; +0xa2, 0x7795da\nMOV             R0, R6                                                 ; +0xa6, 0x7795de\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xa8, 0x7795e0\nMOV             R0, R4; this                                           ; +0xac, 0x7795e4\nBL              _ZN16EmotePickerPopup14refreshEnabledEv; EmotePickerPopup::refreshEnabled(void) ; +0xae, 0x7795e6\nMOV             R0, R5                                                 ; +0xb2, 0x7795ea\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xb4, 0x7795ec\nB               loc_779604                                             ; +0xb8, 0x7795f0\nMOV             R0, R6                                                 ; +0xba, 0x7795f2\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xbc, 0x7795f4\nB               loc_7795FA                                             ; +0xc0, 0x7795f8\nMOV             R0, R5                                                 ; +0xc2, 0x7795fa\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xc4, 0x7795fc\nBL              __cxa_end_cleanup                                      ; +0xc8, 0x779600\nLDR             R2, [SP,#0x20+var_4]                                   ; +0xcc, 0x779604\nLDR             R3, [R7]                                               ; +0xce, 0x779606\nCMP             R2, R3                                                 ; +0xd0, 0x779608\nBEQ             loc_779610                                             ; +0xd2, 0x77960a\nBLX             __stack_chk_fail                                       ; +0xd4, 0x77960c\nADD             SP, SP, #0x20 ; ' '                                    ; +0xd8, 0x779610\nPOP.W           {R4-R8,PC}                                             ; +0xda, 0x779612", "xrefs": [], "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"}