{"type": "func", "start": 4142364, "end": 4142630, "name": "EmoteSprite::fitToHeight", "pseudocode": "// \n// EmoteSprite::fitToHeight from 0x3f351c to 0x3f3626 (266 bytes)\n// \n// 20 xrefs:\n// > MultilineBitmapFont::initWithFont @ 0x3d65de\n// > EmoteSprite::attachToLabel @ 0x3f45ea\n// > GJThreadCell::loadFromThread @ 0x42ae4a\n// > GJNotificationCell::loadFromNotification @ 0x432144\n// > EditLevelLayer::init @ 0x4a1526\n// > ShareCommentLayer::init @ 0x541ea8\n// > SetTextPopup::init @ 0x5de796\n// > ThreadViewPopup::layoutTitleRow @ 0x74d14c\n// > NewThreadPopup::refreshIconSlot @ 0x74d4e8\n// > ThreadDescPopup::refreshIconSlot @ 0x74d710\n// > ThreadDescPopup::buildUI @ 0x754430\n// > NewThreadPopup::init @ 0x756f78\n// > ThreadRequestPopup::init @ 0x757f28\n// > InvitesPopup::buildRows @ 0x758f26\n// > ThreadViewPopup::init @ 0x75c90e\n// > EmotePickerPopup::addCell @ 0x778dfa\n// > EditorSoundConfigCell::loadFromConfig @ 0x783d9e\n// > SoundPackDescPopup::refreshIconSlot @ 0x785ce8\n// > SoundPackDescPopup::init @ 0x786b54\n// > EditorSoundConfigInfoLayer::init @ 0x787300\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::fitToHeight(EmoteSprite *this, float a2, float a3)\n{\n  int result; // r0\n  float v7; // s16\n  float v8; // s16\n  float v9; // s17\n  int v10; // r3\n  float v11; // s16\n  int (__fastcall *v12)(EmoteSprite *, _BYTE *); // r8\n  int v13; // r9\n  int v14; // r0\n  float v15; // s17\n  float v16; // s15\n  float v17; // r0\n  _BYTE v18[8]; // [sp+4h] [bp-18h] BYREF\n  _BYTE v19[8]; // [sp+Ch] [bp-10h] BYREF\n\n  result = (*(int (__fastcall **)(EmoteSprite *, _DWORD, _DWORD))(*(_DWORD *)this + 164))(\n             this,\n             LODWORD(a2),\n             LODWORD(a3));\n  v7 = *(float *)(result + 4);\n  if ( v7 > 0.0 )\n  {\n    v8 = a2 / v7;\n    if ( a3 > 0.0 )\n    {\n      v9 = a2 * a3;\n      if ( v8 > (float)(v9 / *(float *)(*(int (__fastcall **)(EmoteSprite *))(*(_DWORD *)this + 164))(this)) )\n        v8 = v9 / *(float *)(*(int (__fastcall **)(EmoteSprite *))(*(_DWORD *)this + 164))(this);\n    }\n    (*(void (__fastcall **)(EmoteSprite *, _DWORD))(*(_DWORD *)this + 80))(\n      this,\n      v8 * *(float *)(*((_DWORD *)this + 127) + 8));\n    v10 = *((_DWORD *)this + 127);\n    v11 = *(float *)(v10 + 12);\n    if ( *(_BYTE *)(v10 + 28) )\n      v11 = -v11;\n    v12 = *(int (__fastcall **)(EmoteSprite *, _BYTE *))(*(_DWORD *)this + 92);\n    v13 = (*(int (__fastcall **)(EmoteSprite *))(*(_DWORD *)this + 96))(this);\n    v14 = (*(int (__fastcall **)(EmoteSprite *))(*(_DWORD *)this + 84))(this);\n    v15 = *(float *)(*((_DWORD *)this + 127) + 16);\n    v16 = *(float *)&v14;\n    v17 = (*(float (__fastcall **)(EmoteSprite *))(*(_DWORD *)this + 84))(this);\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, v11 * v16, v15 * v17);\n    cocos2d::CCPoint::operator+(v19, v13, v18);\n    return v12(this, v19);\n  }\n  return result;\n}", "assembly": "; \n; EmoteSprite::fitToHeight from 0x3f351c to 0x3f3626 (266 bytes)\n; \n; 20 xrefs:\n; > MultilineBitmapFont::initWithFont @ 0x3d65de\n; > EmoteSprite::attachToLabel @ 0x3f45ea\n; > GJThreadCell::loadFromThread @ 0x42ae4a\n; > GJNotificationCell::loadFromNotification @ 0x432144\n; > EditLevelLayer::init @ 0x4a1526\n; > ShareCommentLayer::init @ 0x541ea8\n; > SetTextPopup::init @ 0x5de796\n; > ThreadViewPopup::layoutTitleRow @ 0x74d14c\n; > NewThreadPopup::refreshIconSlot @ 0x74d4e8\n; > ThreadDescPopup::refreshIconSlot @ 0x74d710\n; > ThreadDescPopup::buildUI @ 0x754430\n; > NewThreadPopup::init @ 0x756f78\n; > ThreadRequestPopup::init @ 0x757f28\n; > InvitesPopup::buildRows @ 0x758f26\n; > ThreadViewPopup::init @ 0x75c90e\n; > EmotePickerPopup::addCell @ 0x778dfa\n; > EditorSoundConfigCell::loadFromConfig @ 0x783d9e\n; > SoundPackDescPopup::refreshIconSlot @ 0x785ce8\n; > SoundPackDescPopup::init @ 0x786b54\n; > EditorSoundConfigInfoLayer::init @ 0x787300\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.W          {R4-R9,LR}                                             ; +0x0, 0x3f351c\nMOV             R4, R0                                                 ; +0x4, 0x3f3520\nVPUSH           {D8-D9}                                                ; +0x6, 0x3f3522\nLDR             R6, =(__stack_chk_guard_ptr - 0x3F352C)                ; +0xa, 0x3f3526\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0xc, 0x3f3528\nLDR             R6, [R6]; __stack_chk_guard                            ; +0xe, 0x3f352a\nVMOV            S17, R1                                                ; +0x10, 0x3f352c\nSUB             SP, SP, #0x1C                                          ; +0x14, 0x3f3530\nVMOV            S18, R2                                                ; +0x16, 0x3f3532\nLDR             R3, [R6]                                               ; +0x1a, 0x3f3536\nSTR             R3, [SP,#0x1C+var_8]                                   ; +0x1c, 0x3f3538\nLDR             R3, [R0]                                               ; +0x1e, 0x3f353a\nLDR.W           R3, [R3,#0xA4]                                         ; +0x20, 0x3f353c\nBLX             R3                                                     ; +0x24, 0x3f3540\nVLDR            S16, [R0,#4]                                           ; +0x26, 0x3f3542\nVCMPE.F32       S16, #0.0                                              ; +0x2a, 0x3f3546\nVMRS            APSR_nzcv, FPSCR                                       ; +0x2e, 0x3f354a\nBLS             loc_3F3610                                             ; +0x32, 0x3f354e\nVCMPE.F32       S18, #0.0                                              ; +0x34, 0x3f3550\nVDIV.F32        S16, S17, S16                                          ; +0x38, 0x3f3554\nVMRS            APSR_nzcv, FPSCR                                       ; +0x3c, 0x3f3558\nBLE             loc_3F3590                                             ; +0x40, 0x3f355c\nLDR             R3, [R4]                                               ; +0x42, 0x3f355e\nMOV             R0, R4                                                 ; +0x44, 0x3f3560\nLDR.W           R3, [R3,#0xA4]                                         ; +0x46, 0x3f3562\nBLX             R3                                                     ; +0x4a, 0x3f3566\nVMUL.F32        S17, S17, S18                                          ; +0x4c, 0x3f3568\nVLDR            S15, [R0]                                              ; +0x50, 0x3f356c\nVDIV.F32        S15, S17, S15                                          ; +0x54, 0x3f3570\nVCMPE.F32       S16, S15                                               ; +0x58, 0x3f3574\nVMRS            APSR_nzcv, FPSCR                                       ; +0x5c, 0x3f3578\nBLE             loc_3F3590                                             ; +0x60, 0x3f357c\nLDR             R3, [R4]                                               ; +0x62, 0x3f357e\nMOV             R0, R4                                                 ; +0x64, 0x3f3580\nLDR.W           R3, [R3,#0xA4]                                         ; +0x66, 0x3f3582\nBLX             R3                                                     ; +0x6a, 0x3f3586\nVLDR            S16, [R0]                                              ; +0x6c, 0x3f3588\nVDIV.F32        S16, S17, S16                                          ; +0x70, 0x3f358c\nLDR.W           R2, [R4,#0x1FC]                                        ; +0x74, 0x3f3590\nMOV             R0, R4                                                 ; +0x78, 0x3f3594\nLDR             R3, [R4]                                               ; +0x7a, 0x3f3596\nVLDR            S15, [R2,#8]                                           ; +0x7c, 0x3f3598\nLDR             R3, [R3,#0x50]                                         ; +0x80, 0x3f359c\nVMUL.F32        S15, S16, S15                                          ; +0x82, 0x3f359e\nVMOV            R1, S15                                                ; +0x86, 0x3f35a2\nBLX             R3                                                     ; +0x8a, 0x3f35a6\nLDR.W           R3, [R4,#0x1FC]                                        ; +0x8c, 0x3f35a8\nLDRB            R2, [R3,#0x1C]                                         ; +0x90, 0x3f35ac\nVLDR            S16, [R3,#0xC]                                         ; +0x92, 0x3f35ae\nCBZ             R2, loc_3F35B8                                         ; +0x96, 0x3f35b2\nVNEG.F32        S16, S16                                               ; +0x98, 0x3f35b4\nLDR             R3, [R4]                                               ; +0x9c, 0x3f35b8\nMOV             R0, R4                                                 ; +0x9e, 0x3f35ba\nADD             R5, SP, #0x1C+var_18                                   ; +0xa0, 0x3f35bc\nADD             R7, SP, #0x1C+var_10                                   ; +0xa2, 0x3f35be\nLDR.W           R8, [R3,#0x5C]                                         ; +0xa4, 0x3f35c0\nLDR             R3, [R3,#0x60]                                         ; +0xa8, 0x3f35c4\nBLX             R3                                                     ; +0xaa, 0x3f35c6\nLDR             R3, [R4]                                               ; +0xac, 0x3f35c8\nLDR             R3, [R3,#0x54]                                         ; +0xae, 0x3f35ca\nMOV             R9, R0                                                 ; +0xb0, 0x3f35cc\nMOV             R0, R4                                                 ; +0xb2, 0x3f35ce\nBLX             R3                                                     ; +0xb4, 0x3f35d0\nLDR.W           R3, [R4,#0x1FC]                                        ; +0xb6, 0x3f35d2\nVLDR            S17, [R3,#0x10]                                        ; +0xba, 0x3f35d6\nLDR             R3, [R4]                                               ; +0xbe, 0x3f35da\nLDR             R3, [R3,#0x54]                                         ; +0xc0, 0x3f35dc\nVMOV            S15, R0                                                ; +0xc2, 0x3f35de\nMOV             R0, R4                                                 ; +0xc6, 0x3f35e2\nVMUL.F32        S16, S16, S15                                          ; +0xc8, 0x3f35e4\nBLX             R3                                                     ; +0xcc, 0x3f35e8\nVMOV            R1, S16; float                                         ; +0xce, 0x3f35ea\nVMOV            S15, R0                                                ; +0xd2, 0x3f35ee\nMOV             R0, R5; this                                           ; +0xd6, 0x3f35f2\nVMUL.F32        S17, S17, S15                                          ; +0xd8, 0x3f35f4\nVMOV            R2, S17; float                                         ; +0xdc, 0x3f35f8\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0xe0, 0x3f35fc\nMOV             R0, R7                                                 ; +0xe4, 0x3f3600\nMOV             R1, R9                                                 ; +0xe6, 0x3f3602\nMOV             R2, R5                                                 ; +0xe8, 0x3f3604\nBL              _ZNK7cocos2d7CCPointplERKS0_; cocos2d::CCPoint::operator+(cocos2d::CCPoint const&) ; +0xea, 0x3f3606\nMOV             R0, R4                                                 ; +0xee, 0x3f360a\nMOV             R1, R7                                                 ; +0xf0, 0x3f360c\nBLX             R8                                                     ; +0xf2, 0x3f360e\nLDR             R2, [SP,#0x1C+var_8]                                   ; +0xf4, 0x3f3610\nLDR             R3, [R6]                                               ; +0xf6, 0x3f3612\nCMP             R2, R3                                                 ; +0xf8, 0x3f3614\nBEQ             loc_3F361C                                             ; +0xfa, 0x3f3616\nBLX             __stack_chk_fail                                       ; +0xfc, 0x3f3618\nADD             SP, SP, #0x1C                                          ; +0x100, 0x3f361c\nVPOP            {D8-D9}                                                ; +0x102, 0x3f361e\nPOP.W           {R4-R9,PC}                                             ; +0x106, 0x3f3622", "xrefs": ["MultilineBitmapFont::initWithFont @ 0x3d65de", "EmoteSprite::attachToLabel @ 0x3f45ea", "GJThreadCell::loadFromThread @ 0x42ae4a", "GJNotificationCell::loadFromNotification @ 0x432144", "EditLevelLayer::init @ 0x4a1526", "ShareCommentLayer::init @ 0x541ea8", "SetTextPopup::init @ 0x5de796", "ThreadViewPopup::layoutTitleRow @ 0x74d14c", "NewThreadPopup::refreshIconSlot @ 0x74d4e8", "ThreadDescPopup::refreshIconSlot @ 0x74d710", "ThreadDescPopup::buildUI @ 0x754430", "NewThreadPopup::init @ 0x756f78", "ThreadRequestPopup::init @ 0x757f28", "InvitesPopup::buildRows @ 0x758f26", "ThreadViewPopup::init @ 0x75c90e", "EmotePickerPopup::addCell @ 0x778dfa", "EditorSoundConfigCell::loadFromConfig @ 0x783d9e", "SoundPackDescPopup::refreshIconSlot @ 0x785ce8", "SoundPackDescPopup::init @ 0x786b54", "EditorSoundConfigInfoLayer::init @ 0x787300"], "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"}