//
// sub_BF5F60 from 0xbf5f60 to 0xbf5fb0 (80 bytes)
//
// 1 xrefs:
// > jinit_color_converter @ 0xbf6770
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall sub_BF5F60(__int64 result, char **a2, _QWORD *a3, unsigned int a4, int a5)
{
int v5; // w4
unsigned int v6; // w6
__int64 i; // x8
unsigned int v8; // w9
char *v9; // x5
char *v10; // t1
__int64 j; // x7
char v12; // w3
v5 = a5 - 1;
v6 = *(_DWORD *)(result + 48);
for ( i = *(int *)(result + 56); v5 >= 0; a4 = v8 )
{
v8 = a4 + 1;
v10 = *a2++;
v9 = v10;
result = 0;
for ( j = *(_QWORD *)(*a3 + 8LL * a4); v6 > (unsigned int)result; ++result )
{
v12 = *v9;
v9 += i;
*(_BYTE *)(j + result) = v12;
}
--v5;
}
return result;
}