{"type": "func", "start": 4304422320, "end": 4304422658, "name": "EmoteSprite::fitToHeight", "pseudocode": "// \n// EmoteSprite::fitToHeight from 0x1009045b0 to 0x100904702 (338 bytes)\n// \n// 20 xrefs:\n// > EditLevelLayer::init @ 0x1001dd7d4\n// > GJThreadCell::loadFromThread @ 0x100232da2\n// > GJNotificationCell::loadFromNotification @ 0x1002345e5\n// > sub_10029AA90 @ 0x10029b22d\n// > MultilineBitmapFont::initWithFont @ 0x10047c453\n// > ShareCommentLayer::init @ 0x1006b2308\n// > EditorSoundConfigCell::loadFromConfig @ 0x1008f2298\n// > sub_1008F3770 @ 0x1008f3db0\n// > SoundPackDescPopup::init @ 0x1008fa926\n// > sub_1008FABC0 @ 0x1008fac7b\n// > EmotePickerPopup::addCell @ 0x100903489\n// > sub_1009055C0 @ 0x100905974\n// > ThreadViewPopup::init @ 0x10092e243\n// > ThreadViewPopup::layoutTitleRow @ 0x10092ea77\n// > NewThreadPopup::init @ 0x100945637\n// > sub_100945920 @ 0x1009459d8\n// > sub_10094C500 @ 0x10094cc74\n// > ThreadDescPopup::buildUI @ 0x100952d4b\n// > sub_1009531B0 @ 0x100953268\n// > sub_1009543D0 @ 0x1009547d8\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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 12:38:04 +0000\n// \n\n__int64 __fastcall EmoteSprite::fitToHeight(_QWORD *a1, float a2, float a3)\n{\n  __int64 result; // rax\n  float v4; // xmm2_4\n  float v5; // xmm0_4\n  __int64 v6; // rax\n  __int64 v7; // rax\n  __m128 v8; // xmm0\n  unsigned __int64 *v9; // r14\n  float v10; // xmm1_4\n  double v11; // [rsp+0h] [rbp-50h] BYREF\n  unsigned __int64 v12; // [rsp+8h] [rbp-48h] BYREF\n  __m128 v13; // [rsp+10h] [rbp-40h]\n  float v14; // [rsp+2Ch] [rbp-24h]\n\n  v14 = a3;\n  v13.f32[0] = a2;\n  result = (*(__int64 (__fastcall **)(_QWORD *))(*a1 + 328LL))(a1);\n  v4 = *(float *)(result + 4);\n  if ( v4 > 0.0 )\n  {\n    v5 = v13.f32[0] / v4;\n    if ( v14 > 0.0 )\n    {\n      v13.f32[0] = v13.f32[0] * v14;\n      v6 = *a1;\n      v14 = v5;\n      if ( v5 > (float)(v13.f32[0] / *(float *)(*(__int64 (__fastcall **)(_QWORD *))(v6 + 328))(a1)) )\n        v5 = v13.f32[0] / *(float *)(*(__int64 (__fastcall **)(_QWORD *))(*a1 + 328LL))(a1);\n    }\n    (*(void (__fastcall **)(_QWORD *, float))(*a1 + 160LL))(a1, v5 * *(float *)(a1[75] + 12LL));\n    v7 = a1[75];\n    v8 = (__m128)*(unsigned int *)(v7 + 16);\n    if ( *(_BYTE *)(v7 + 40) )\n      v8 = _mm_xor_ps(v8, (__m128)xmmword_100A035F0);\n    v13 = v8;\n    v9 = (unsigned __int64 *)(*(__int64 (__fastcall **)(_QWORD *))(*a1 + 192LL))(a1);\n    v13.f32[0] = (*(float (__fastcall **)(_QWORD *))(*a1 + 168LL))(a1) * v8.f32[0];\n    v14 = *(float *)(a1[75] + 20LL);\n    v10 = v14 * (*(float (__fastcall **)(_QWORD *))(*a1 + 168LL))(a1);\n    sub_100278250((float *)&v12, v13.f32[0], v10);\n    sub_100278350(&v11, v9, &v12);\n    return (*(__int64 (__fastcall **)(_QWORD *, double *))(*a1 + 184LL))(a1, &v11);\n  }\n  return result;\n}", "assembly": "; \n; EmoteSprite::fitToHeight from 0x1009045b0 to 0x100904702 (338 bytes)\n; \n; 20 xrefs:\n; > EditLevelLayer::init @ 0x1001dd7d4\n; > GJThreadCell::loadFromThread @ 0x100232da2\n; > GJNotificationCell::loadFromNotification @ 0x1002345e5\n; > sub_10029AA90 @ 0x10029b22d\n; > MultilineBitmapFont::initWithFont @ 0x10047c453\n; > ShareCommentLayer::init @ 0x1006b2308\n; > EditorSoundConfigCell::loadFromConfig @ 0x1008f2298\n; > sub_1008F3770 @ 0x1008f3db0\n; > SoundPackDescPopup::init @ 0x1008fa926\n; > sub_1008FABC0 @ 0x1008fac7b\n; > EmotePickerPopup::addCell @ 0x100903489\n; > sub_1009055C0 @ 0x100905974\n; > ThreadViewPopup::init @ 0x10092e243\n; > ThreadViewPopup::layoutTitleRow @ 0x10092ea77\n; > NewThreadPopup::init @ 0x100945637\n; > sub_100945920 @ 0x1009459d8\n; > sub_10094C500 @ 0x10094cc74\n; > ThreadDescPopup::buildUI @ 0x100952d4b\n; > sub_1009531B0 @ 0x100953268\n; > sub_1009543D0 @ 0x1009547d8\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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 12:38:04 +0000\n; \npush    rbp                                                            ; +0x0, 0x1009045b0\nmov     rbp, rsp                                                       ; +0x1, 0x1009045b1\npush    r15                                                            ; +0x4, 0x1009045b4\npush    r14                                                            ; +0x6, 0x1009045b6\npush    r12                                                            ; +0x8, 0x1009045b8\npush    rbx                                                            ; +0xa, 0x1009045ba\nsub     rsp, 30h                                                       ; +0xb, 0x1009045bb\nmovss   [rbp+var_24], xmm1                                             ; +0xf, 0x1009045bf\nmovss   dword ptr [rbp+var_40], xmm0                                   ; +0x14, 0x1009045c4\nmov     rbx, rdi                                                       ; +0x19, 0x1009045c9\nmov     rax, [rdi]                                                     ; +0x1c, 0x1009045cc\ncall    qword ptr [rax+148h]                                           ; +0x1f, 0x1009045cf\nmovss   xmm2, dword ptr [rax+4]                                        ; +0x25, 0x1009045d5\nxorps   xmm1, xmm1                                                     ; +0x2a, 0x1009045da\nucomiss xmm1, xmm2                                                     ; +0x2d, 0x1009045dd\njnb     loc_1009046F5                                                  ; +0x30, 0x1009045e0\nmovss   xmm0, dword ptr [rbp+var_40]                                   ; +0x36, 0x1009045e6\ndivss   xmm0, xmm2                                                     ; +0x3b, 0x1009045eb\nmovss   xmm2, [rbp+var_24]                                             ; +0x3f, 0x1009045ef\nucomiss xmm2, xmm1                                                     ; +0x44, 0x1009045f4\njbe     short loc_100904643                                            ; +0x47, 0x1009045f7\nmovaps  xmm1, xmm2                                                     ; +0x49, 0x1009045f9\nmovss   xmm2, dword ptr [rbp+var_40]                                   ; +0x4c, 0x1009045fc\nmulss   xmm2, xmm1                                                     ; +0x51, 0x100904601\nmovss   dword ptr [rbp+var_40], xmm2                                   ; +0x55, 0x100904605\nmov     rax, [rbx]                                                     ; +0x5a, 0x10090460a\nmov     rdi, rbx                                                       ; +0x5d, 0x10090460d\nmovss   [rbp+var_24], xmm0                                             ; +0x60, 0x100904610\ncall    qword ptr [rax+148h]                                           ; +0x65, 0x100904615\nmovss   xmm0, [rbp+var_24]                                             ; +0x6b, 0x10090461b\nmovss   xmm1, dword ptr [rbp+var_40]                                   ; +0x70, 0x100904620\ndivss   xmm1, dword ptr [rax]                                          ; +0x75, 0x100904625\nucomiss xmm0, xmm1                                                     ; +0x79, 0x100904629\njbe     short loc_100904643                                            ; +0x7c, 0x10090462c\nmov     rax, [rbx]                                                     ; +0x7e, 0x10090462e\nmov     rdi, rbx                                                       ; +0x81, 0x100904631\ncall    qword ptr [rax+148h]                                           ; +0x84, 0x100904634\nmovss   xmm0, dword ptr [rbp+var_40]                                   ; +0x8a, 0x10090463a\ndivss   xmm0, dword ptr [rax]                                          ; +0x8f, 0x10090463f\nmov     rax, [rbx+258h]                                                ; +0x93, 0x100904643\nmulss   xmm0, dword ptr [rax+0Ch]                                      ; +0x9a, 0x10090464a\nmov     rax, [rbx]                                                     ; +0x9f, 0x10090464f\nmov     rdi, rbx                                                       ; +0xa2, 0x100904652\ncall    qword ptr [rax+0A0h]                                           ; +0xa5, 0x100904655\nmov     rax, [rbx+258h]                                                ; +0xab, 0x10090465b\nmovss   xmm0, dword ptr [rax+10h]                                      ; +0xb2, 0x100904662\ncmp     byte ptr [rax+28h], 0                                          ; +0xb7, 0x100904667\njz      short loc_100904674                                            ; +0xbb, 0x10090466b\nxorps   xmm0, cs:xmmword_100A035F0                                     ; +0xbd, 0x10090466d\nmovaps  [rbp+var_40], xmm0                                             ; +0xc4, 0x100904674\nmov     rax, [rbx]                                                     ; +0xc8, 0x100904678\nmov     rdi, rbx                                                       ; +0xcb, 0x10090467b\ncall    qword ptr [rax+0C0h]                                           ; +0xce, 0x10090467e\nmov     r14, rax                                                       ; +0xd4, 0x100904684\nmov     rax, [rbx]                                                     ; +0xd7, 0x100904687\nmov     rdi, rbx                                                       ; +0xda, 0x10090468a\ncall    qword ptr [rax+0A8h]                                           ; +0xdd, 0x10090468d\nmulss   xmm0, dword ptr [rbp+var_40]                                   ; +0xe3, 0x100904693\nmovss   dword ptr [rbp+var_40], xmm0                                   ; +0xe8, 0x100904698\nmov     rax, [rbx+258h]                                                ; +0xed, 0x10090469d\nmovss   xmm0, dword ptr [rax+14h]                                      ; +0xf4, 0x1009046a4\nmovss   [rbp+var_24], xmm0                                             ; +0xf9, 0x1009046a9\nmov     rax, [rbx]                                                     ; +0xfe, 0x1009046ae\nmov     rdi, rbx                                                       ; +0x101, 0x1009046b1\ncall    qword ptr [rax+0A8h]                                           ; +0x104, 0x1009046b4\nmovss   xmm1, [rbp+var_24]                                             ; +0x10a, 0x1009046ba\nmulss   xmm1, xmm0                                                     ; +0x10f, 0x1009046bf\nlea     r15, [rbp+var_48]                                              ; +0x113, 0x1009046c3\nmov     rdi, r15                                                       ; +0x117, 0x1009046c7\nmovss   xmm0, dword ptr [rbp+var_40]                                   ; +0x11a, 0x1009046ca\ncall    sub_100278250                                                  ; +0x11f, 0x1009046cf\nlea     r12, [rbp+var_50]                                              ; +0x124, 0x1009046d4\nmov     rdi, r12                                                       ; +0x128, 0x1009046d8\nmov     rsi, r14                                                       ; +0x12b, 0x1009046db\nmov     rdx, r15                                                       ; +0x12e, 0x1009046de\ncall    sub_100278350                                                  ; +0x131, 0x1009046e1\nmov     rax, [rbx]                                                     ; +0x136, 0x1009046e6\nmov     rdi, rbx                                                       ; +0x139, 0x1009046e9\nmov     rsi, r12                                                       ; +0x13c, 0x1009046ec\ncall    qword ptr [rax+0B8h]                                           ; +0x13f, 0x1009046ef\nadd     rsp, 30h                                                       ; +0x145, 0x1009046f5\npop     rbx                                                            ; +0x149, 0x1009046f9\npop     r12                                                            ; +0x14a, 0x1009046fa\npop     r14                                                            ; +0x14c, 0x1009046fc\npop     r15                                                            ; +0x14e, 0x1009046fe\npop     rbp                                                            ; +0x150, 0x100904700\nretn                                                                   ; +0x151, 0x100904701", "xrefs": ["EditLevelLayer::init @ 0x1001dd7d4", "GJThreadCell::loadFromThread @ 0x100232da2", "GJNotificationCell::loadFromNotification @ 0x1002345e5", "sub_10029AA90 @ 0x10029b22d", "MultilineBitmapFont::initWithFont @ 0x10047c453", "ShareCommentLayer::init @ 0x1006b2308", "EditorSoundConfigCell::loadFromConfig @ 0x1008f2298", "sub_1008F3770 @ 0x1008f3db0", "SoundPackDescPopup::init @ 0x1008fa926", "sub_1008FABC0 @ 0x1008fac7b", "EmotePickerPopup::addCell @ 0x100903489", "sub_1009055C0 @ 0x100905974", "ThreadViewPopup::init @ 0x10092e243", "ThreadViewPopup::layoutTitleRow @ 0x10092ea77", "NewThreadPopup::init @ 0x100945637", "sub_100945920 @ 0x1009459d8", "sub_10094C500 @ 0x10094cc74", "ThreadDescPopup::buildUI @ 0x100952d4b", "sub_1009531B0 @ 0x100953268", "sub_1009543D0 @ 0x1009547d8"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}