//
// ButtonSprite::setColor from 0x10005a7d0 to 0x10005a842 (114 bytes)
//
// 28 xrefs:
// > EditorUI::updateButtons @ 0x10000af6c
// > EditorUI::toggleSpecialEditButtons @ 0x10000c298
// > EditorUI::toggleSpecialEditButtons @ 0x10000c388
// > EditorUI::toggleSpecialEditButtons @ 0x10000c474
// > EditorUI::toggleSpecialEditButtons @ 0x10000c558
// > RateDemonLayer::selectRating @ 0x100270e23
// > sub_1002778C0 @ 0x100277990
// > NumberInputLayer::updateNumberState @ 0x100489e49
// > sub_100505220 @ 0x1005052f0
// > RateLevelLayer::selectRating @ 0x10059532e
// > EditorUI::updateEditButtonColor @ 0x100612b89
// > EditorUI::updateDeleteButtons @ 0x10063c1c2
// > EditorUI::updateDeleteButtons @ 0x10063c224
// > EditorUI::updateDeleteButtons @ 0x10063c284
// > sub_100930F70 @ 0x10093108a
// > sub_100931280 @ 0x1009313f3
// > sub_100931710 @ 0x10093175e
// > ThreadViewPopup::threadSearchFinished @ 0x100931d47
// > sub_100934410 @ 0x10093453c
// > ThreadViewPopup::threadSendFailed @ 0x10093473f
// > ThreadViewPopup::threadMessagesFinished @ 0x100934e04
// > ThreadViewPopup::threadMessagesFinished @ 0x1009353f2
// > ThreadViewPopup::threadMessagesFailed @ 0x100936292
// > NewThreadPopup::onSend @ 0x100946852
// > sub_100948210 @ 0x100948265
// > NewThreadPopup::threadSendFinished @ 0x1009482d0
// > NewThreadPopup::threadSendFailed @ 0x100948c55
// > sub_100963910 @ 0x1009639e0
//
// 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:19:39 +0000
//
__int64 __fastcall ButtonSprite::setColor(_QWORD *a1, int a2)
{
__int64 result; // rax
__int64 v4; // rdi
__int64 v5; // rdi
__int64 v6; // rdi
__int16 v7; // [rsp+0h] [rbp-Ch] BYREF
char v8; // [rsp+2h] [rbp-Ah]
char v9; // [rsp+3h] [rbp-9h]
v9 = HIBYTE(result);
v7 = a2;
v8 = BYTE2(a2);
v4 = a1[78];
if ( v4 )
result = (*(__int64 (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v4 + 1072LL))(v4, &v7);
v5 = a1[79];
if ( v5 )
result = (*(__int64 (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v5 + 960LL))(v5, &v7);
v6 = a1[81];
if ( v6 )
return (*(__int64 (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v6 + 960LL))(v6, &v7);
v6 = a1[80];
if ( v6 )
return (*(__int64 (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v6 + 960LL))(v6, &v7);
return result;
}