{"type": "func", "start": 7835200, "end": 7835630, "name": "EmotePickerPopup::layoutEmoteGrid", "pseudocode": "// \n// EmotePickerPopup::layoutEmoteGrid from 0x778e40 to 0x778fee (430 bytes)\n// \n// 2 xrefs:\n// > EmotePickerPopup::onWindowResized @ 0x778ff8\n// > EmotePickerPopup::onBuildWindowContent @ 0x7798ac\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:21 +0000\n// \n\nvoid __fastcall EmotePickerPopup::layoutEmoteGrid(EmotePickerPopup *this)\n{\n  EmotePickerPopup *v1; // r7\n  unsigned int v2; // r10\n  float v3; // s16\n  int v4; // r9\n  int v5; // r4\n  float v6; // s18\n  float v7; // s16\n  int v8; // r2\n  bool v9; // cc\n  int v10; // r5\n  int v11; // s15\n  int (__fastcall *v12)(int, _BYTE *); // r11\n  int v13; // r10\n  int v14; // r8\n  int v15; // r5\n  int v16; // r1\n  EmotePickerPopup *v17; // r11\n  bool v18; // cc\n  int v19; // s15\n  int (__fastcall *v20)(EmotePickerPopup *, _BYTE *); // r8\n  int v21; // [sp+4h] [bp-18h]\n  _BYTE v22[8]; // [sp+Ch] [bp-10h] BYREF\n\n  v1 = this;\n  if ( *((_DWORD *)this + 182) && *((_DWORD *)this + 181) )\n  {\n    v2 = 0;\n    v3 = *((float *)this + 183);\n    v4 = 0;\n    v5 = (int)(float)((float)(v3 - 8.0) / 26.0);\n    if ( v5 < 3 )\n      v5 = 3;\n    v6 = (float)(v3 - (float)((float)v5 * 26.0)) * 0.5;\n    v7 = -4.0;\n    while ( 1 )\n    {\n      v8 = *((_DWORD *)v1 + 219);\n      if ( v2 >= (*((_DWORD *)v1 + 220) - v8) >> 2 )\n        break;\n      v9 = v4 < v5;\n      v10 = *(_DWORD *)(v8 + 4 * v2);\n      if ( v4 >= v5 )\n        v4 = 0;\n      ++v2;\n      v11 = v4++;\n      v12 = *(int (__fastcall **)(int, _BYTE *))(*(_DWORD *)v10 + 92);\n      if ( !v9 )\n        v7 = v7 - 26.0;\n      cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v22, v6 + (float)((float)((float)v11 + 0.5) * 26.0), v7 - 13.0);\n      this = (EmotePickerPopup *)v12(v10, v22);\n    }\n    if ( v4 )\n      v7 = v7 - 38.0;\n    v13 = 0;\n    v14 = 0;\n    v15 = 0;\n    while ( v13 < EmoteSprite::defCount(this) )\n    {\n      this = (EmotePickerPopup *)EmoteSprite::defAtIndex(v13, v16);\n      if ( *(_DWORD *)this )\n      {\n        if ( !*((_BYTE *)this + 23) )\n        {\n          v21 = *((unsigned __int8 *)this + 23);\n          this = (EmotePickerPopup *)(*(int (__fastcall **)(_DWORD, int))(**((_DWORD **)v1 + 182) + 240))(\n                                       *((_DWORD *)v1 + 182),\n                                       v13);\n          v17 = this;\n          if ( this )\n          {\n            v18 = v15 < v5;\n            if ( v15 >= v5 )\n              v15 = v21;\n            v19 = v15;\n            v20 = *(int (__fastcall **)(EmotePickerPopup *, _BYTE *))(*(_DWORD *)this + 92);\n            if ( !v18 )\n              v7 = v7 - 26.0;\n            ++v15;\n            cocos2d::CCPoint::CCPoint(\n              (cocos2d::CCPoint *)v22,\n              v6 + (float)((float)((float)v19 + 0.5) * 26.0),\n              v7 - 13.0);\n            this = (EmotePickerPopup *)v20(v17, v22);\n            v14 = 1;\n          }\n        }\n      }\n      else if ( v14 )\n      {\n        if ( v15 )\n          v7 = v7 - 26.0;\n        v15 = 0;\n        v7 = v7 - 12.0;\n      }\n      ++v13;\n    }\n    if ( v15 )\n      v7 = v7 - 26.0;\n    ScrollableContentLayer::setContentHeight(*((ScrollableContentLayer **)v1 + 181), 5.0 - v7);\n  }\n}", "assembly": "; \n; EmotePickerPopup::layoutEmoteGrid from 0x778e40 to 0x778fee (430 bytes)\n; \n; 2 xrefs:\n; > EmotePickerPopup::onWindowResized @ 0x778ff8\n; > EmotePickerPopup::onBuildWindowContent @ 0x7798ac\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:21 +0000\n; \nPUSH.W          {R4-R11,LR}                                            ; +0x0, 0x778e40\nMOV             R7, R0                                                 ; +0x4, 0x778e44\nVPUSH           {D8-D10}                                               ; +0x6, 0x778e46\nLDR             R3, =(__stack_chk_guard_ptr - 0x778E50)                ; +0xa, 0x778e4a\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0xc, 0x778e4c\nLDR             R3, [R3]; __stack_chk_guard                            ; +0xe, 0x778e4e\nSUB             SP, SP, #0x1C                                          ; +0x10, 0x778e50\nLDR             R2, [R3]                                               ; +0x12, 0x778e52\nMOV             R6, R3                                                 ; +0x14, 0x778e54\nSTR             R2, [SP,#0x1C+var_8]                                   ; +0x16, 0x778e56\nLDR.W           R2, [R0,#0x2D8]                                        ; +0x18, 0x778e58\nCMP             R2, #0                                                 ; +0x1c, 0x778e5c\nBEQ.W           loc_778FD8                                             ; +0x1e, 0x778e5e\nLDR.W           R3, [R0,#0x2D4]                                        ; +0x22, 0x778e62\nCMP             R3, #0                                                 ; +0x26, 0x778e66\nBEQ.W           loc_778FD8                                             ; +0x28, 0x778e68\nVMOV.F32        S15, #8.0                                              ; +0x2c, 0x778e6c\nMOV.W           R10, #0                                                ; +0x30, 0x778e70\nVLDR            S16, [R0,#0x2DC]                                       ; +0x34, 0x778e74\nADD.W           R8, SP, #0x1C+var_10                                   ; +0x38, 0x778e78\nMOV             R9, R10                                                ; +0x3c, 0x778e7c\nVSUB.F32        S15, S16, S15                                          ; +0x3e, 0x778e7e\nVMOV.F32        S17, #26.0                                             ; +0x42, 0x778e82\nVDIV.F32        S15, S15, S17                                          ; +0x46, 0x778e86\nVCVT.S32.F32    S15, S15                                               ; +0x4a, 0x778e8a\nVMOV            R4, S15                                                ; +0x4e, 0x778e8e\nVMOV.F32        S19, #0.5                                              ; +0x52, 0x778e92\nVMOV.F32        S20, #13.0                                             ; +0x56, 0x778e96\nCMP             R4, #3                                                 ; +0x5a, 0x778e9a\nIT LT                                                                  ; +0x5c, 0x778e9c\nMOVLT           R4, #3                                                 ; +0x5e, 0x778e9e\nVMOV            S15, R4                                                ; +0x60, 0x778ea0\nVCVT.F32.S32    S15, S15                                               ; +0x64, 0x778ea4\nVMLS.F32        S16, S15, S17                                          ; +0x68, 0x778ea8\nVMUL.F32        S18, S16, S19                                          ; +0x6c, 0x778eac\nVMOV.F32        S16, #-4.0                                             ; +0x70, 0x778eb0\nLDR.W           R2, [R7,#0x36C]                                        ; +0x74, 0x778eb4\nLDR.W           R3, [R7,#0x370]                                        ; +0x78, 0x778eb8\nSUBS            R3, R3, R2                                             ; +0x7c, 0x778ebc\nCMP.W           R10, R3,ASR#2                                          ; +0x7e, 0x778ebe\nBCS             loc_778F12                                             ; +0x82, 0x778ec2\nCMP             R9, R4                                                 ; +0x84, 0x778ec4\nLDR.W           R5, [R2,R10,LSL#2]                                     ; +0x86, 0x778ec6\nVMOV.F32        S14, S18                                               ; +0x8a, 0x778eca\nMOV             R0, R8; this                                           ; +0x8e, 0x778ece\nIT GE                                                                  ; +0x90, 0x778ed0\nMOVGE.W         R9, #0                                                 ; +0x92, 0x778ed2\nADD.W           R10, R10, #1                                           ; +0x96, 0x778ed6\nVMOV            S15, R9                                                ; +0x9a, 0x778eda\nLDR             R3, [R5]                                               ; +0x9e, 0x778ede\nADD.W           R9, R9, #1                                             ; +0xa0, 0x778ee0\nVCVT.F32.S32    S15, S15                                               ; +0xa4, 0x778ee4\nLDR.W           R11, [R3,#0x5C]                                        ; +0xa8, 0x778ee8\nVADD.F32        S15, S15, S19                                          ; +0xac, 0x778eec\nVMLA.F32        S14, S15, S17                                          ; +0xb0, 0x778ef0\nIT GE                                                                  ; +0xb4, 0x778ef4\nVSUBGE.F32      S16, S16, S17                                          ; +0xb6, 0x778ef6\nVMOV            R1, S14; float                                         ; +0xba, 0x778efa\nVSUB.F32        S15, S16, S20                                          ; +0xbe, 0x778efe\nVMOV            R2, S15; float                                         ; +0xc2, 0x778f02\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0xc6, 0x778f06\nMOV             R0, R5                                                 ; +0xca, 0x778f0a\nMOV             R1, R8                                                 ; +0xcc, 0x778f0c\nBLX             R11                                                    ; +0xce, 0x778f0e\nB               loc_778EB4                                             ; +0xd0, 0x778f10\nCMP.W           R9, #0                                                 ; +0xd2, 0x778f12\nBEQ             loc_778F20                                             ; +0xd6, 0x778f16\nVLDR            S15, =38.0                                             ; +0xd8, 0x778f18\nVSUB.F32        S16, S16, S15                                          ; +0xdc, 0x778f1c\nMOV.W           R10, #0                                                ; +0xe0, 0x778f20\nADD.W           R9, SP, #0x1C+var_10                                   ; +0xe4, 0x778f24\nMOV             R8, R10                                                ; +0xe8, 0x778f28\nMOV             R5, R10                                                ; +0xea, 0x778f2a\nVMOV.F32        S20, #13.0                                             ; +0xec, 0x778f2c\nBL              _ZN11EmoteSprite8defCountEv; EmoteSprite::defCount(void) ; +0xf0, 0x778f30\nCMP             R10, R0                                                ; +0xf4, 0x778f34\nBGE             loc_778FBE                                             ; +0xf6, 0x778f36\nMOV             R0, R10; this                                          ; +0xf8, 0x778f38\nBL              _ZN11EmoteSprite10defAtIndexEi; EmoteSprite::defAtIndex(int) ; +0xfa, 0x778f3a\nLDR             R3, [R0]                                               ; +0xfe, 0x778f3e\nCBNZ            R3, loc_778F5A                                         ; +0x100, 0x778f40\nCMP.W           R8, #0                                                 ; +0x102, 0x778f42\nBEQ             loc_778FB8                                             ; +0x106, 0x778f46\nCBZ             R5, loc_778F4E                                         ; +0x108, 0x778f48\nVSUB.F32        S16, S16, S17                                          ; +0x10a, 0x778f4a\nMOVS            R5, #0                                                 ; +0x10e, 0x778f4e\nVMOV.F32        S15, #12.0                                             ; +0x110, 0x778f50\nVSUB.F32        S16, S16, S15                                          ; +0x114, 0x778f54\nB               loc_778FB8                                             ; +0x118, 0x778f58\nLDRB            R2, [R0,#0x17]                                         ; +0x11a, 0x778f5a\nCBNZ            R2, loc_778FB8                                         ; +0x11c, 0x778f5c\nLDR.W           R0, [R7,#0x2D8]                                        ; +0x11e, 0x778f5e\nMOV             R1, R10                                                ; +0x122, 0x778f62\nSTR             R2, [SP,#0x1C+var_18]                                  ; +0x124, 0x778f64\nLDR             R3, [R0]                                               ; +0x126, 0x778f66\nLDR.W           R3, [R3,#0xF0]                                         ; +0x128, 0x778f68\nBLX             R3                                                     ; +0x12c, 0x778f6c\nMOV             R11, R0                                                ; +0x12e, 0x778f6e\nCBZ             R0, loc_778FB8                                         ; +0x130, 0x778f70\nLDR             R2, [SP,#0x1C+var_18]                                  ; +0x132, 0x778f72\nCMP             R5, R4                                                 ; +0x134, 0x778f74\nVMOV.F32        S14, S18                                               ; +0x136, 0x778f76\nLDR             R3, [R0]                                               ; +0x13a, 0x778f7a\nMOV             R0, R9; this                                           ; +0x13c, 0x778f7c\nIT GE                                                                  ; +0x13e, 0x778f7e\nMOVGE           R5, R2                                                 ; +0x140, 0x778f80\nVMOV            S15, R5                                                ; +0x142, 0x778f82\nLDR.W           R8, [R3,#0x5C]                                         ; +0x146, 0x778f86\nIT GE                                                                  ; +0x14a, 0x778f8a\nVSUBGE.F32      S16, S16, S17                                          ; +0x14c, 0x778f8c\nADDS            R5, #1                                                 ; +0x150, 0x778f90\nVCVT.F32.S32    S15, S15                                               ; +0x152, 0x778f92\nVADD.F32        S15, S15, S19                                          ; +0x156, 0x778f96\nVMLA.F32        S14, S15, S17                                          ; +0x15a, 0x778f9a\nVSUB.F32        S15, S16, S20                                          ; +0x15e, 0x778f9e\nVMOV            R1, S14; float                                         ; +0x162, 0x778fa2\nVMOV            R2, S15; float                                         ; +0x166, 0x778fa6\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x16a, 0x778faa\nMOV             R0, R11                                                ; +0x16e, 0x778fae\nMOV             R1, R9                                                 ; +0x170, 0x778fb0\nBLX             R8                                                     ; +0x172, 0x778fb2\nMOV.W           R8, #1                                                 ; +0x174, 0x778fb4\nADD.W           R10, R10, #1                                           ; +0x178, 0x778fb8\nB               loc_778F30                                             ; +0x17c, 0x778fbc\nCBZ             R5, loc_778FC4                                         ; +0x17e, 0x778fbe\nVSUB.F32        S16, S16, S17                                          ; +0x180, 0x778fc0\nLDR.W           R0, [R7,#0x2D4]; this                                  ; +0x184, 0x778fc4\nVMOV.F32        S15, #5.0                                              ; +0x188, 0x778fc8\nVSUB.F32        S15, S15, S16                                          ; +0x18c, 0x778fcc\nVMOV            R1, S15; float                                         ; +0x190, 0x778fd0\nBL              _ZN22ScrollableContentLayer16setContentHeightEf; ScrollableContentLayer::setContentHeight(float) ; +0x194, 0x778fd4\nLDR             R2, [SP,#0x1C+var_8]                                   ; +0x198, 0x778fd8\nLDR             R3, [R6]                                               ; +0x19a, 0x778fda\nCMP             R2, R3                                                 ; +0x19c, 0x778fdc\nBEQ             loc_778FE4                                             ; +0x19e, 0x778fde\nBLX             __stack_chk_fail                                       ; +0x1a0, 0x778fe0\nADD             SP, SP, #0x1C                                          ; +0x1a4, 0x778fe4\nVPOP            {D8-D10}                                               ; +0x1a6, 0x778fe6\nPOP.W           {R4-R11,PC}                                            ; +0x1aa, 0x778fea", "xrefs": ["EmotePickerPopup::onWindowResized @ 0x778ff8", "EmotePickerPopup::onBuildWindowContent @ 0x7798ac"], "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"}