//
// sub_100945920 from 0x100945920 to 0x100945a6c (332 bytes)
//
// 3 xrefs:
// > NewThreadPopup::init @ 0x100944bef
// > NewThreadPopup::emotePicked @ 0x1009475de
// > sub_1009475F0 @ 0x10094761c
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:38:33 +0000
//
void __fastcall sub_100945920(__int64 a1, __m128 a2)
{
__int64 v3; // rdi
char v4; // al
unsigned __int64 v5; // rdx
__int64 (__fastcall ***v6)(); // r14
__int64 v7; // rax
float v8; // [rsp+Ch] [rbp-34h]
__m128 v9; // [rsp+10h] [rbp-30h] BYREF
void *__p; // [rsp+20h] [rbp-20h]
v3 = *(_QWORD *)(a1 + 808);
if ( !v3 )
return;
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v3 + 568LL))(v3, 1, 1);
v4 = *(_BYTE *)(a1 + 784);
if ( (v4 & 1) != 0 )
{
v5 = *(_QWORD *)(a1 + 792);
if ( v5 )
{
sub_10001AD30(&v9, *(const void **)(a1 + 800), v5);
goto LABEL_8;
}
LABEL_7:
v9.i8[0] = 4;
*(__int16 *)((char *)v9.i16 + 1) = 24942;
v9.i8[3] = 0;
goto LABEL_8;
}
if ( !v4 )
goto LABEL_7;
__p = *(void **)(a1 + 800);
a2 = *(__m128 *)(a1 + 784);
v9 = a2;
LABEL_8:
v6 = EmoteSprite::createWithName((__int128 *)&v9, *(double *)a2.i64);
if ( (v9.i8[0] & 1) != 0 )
operator delete(__p);
if ( v6 )
{
EmoteSprite::fitToHeight(v6, 18.0, 0.0);
v8 = *(float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 808) + 328LL))(*(_QWORD *)(a1 + 808)) * 0.5;
v7 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 808) + 328LL))(*(_QWORD *)(a1 + 808));
sub_100278250(v9.f32, v8, 0.5 * *(float *)(v7 + 4));
((void (__fastcall *)(__int64 (__fastcall ***)(), __m128 *))(*v6)[23])(v6, &v9);
((void (__fastcall *)(__int64 (__fastcall ***)(), __int64))(*v6)[9])(v6, 1);
(*(void (__fastcall **)(_QWORD, __int64 (__fastcall ***)(), __int64))(**(_QWORD **)(a1 + 808) + 464LL))(
*(_QWORD *)(a1 + 808),
v6,
1);
}
}