//
// sub_1004B6B90 from 0x1004b6b90 to 0x1004b6ca2 (274 bytes)
//
// 2 xrefs:
// > sub_1004B59F0 @ 0x1004b6308
// > SetupCameraRotatePopup::valuePopupClosed @ 0x1004b746a
//
// 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:31:01 +0000
//
void __fastcall sub_1004B6B90(__int64 a1)
{
__int64 v1; // rax
const char *CString; // r15
size_t v3; // rax
std::string::size_type v4; // r14
char *data; // r12
size_t v6; // r13
__int64 v7; // rdi
std::string::pointer v8; // rsi
std::string __dst[2]; // [rsp+0h] [rbp-40h] BYREF
v1 = sub_10088E820("%.02f", *(_BYTE *)&__dst[0].__r_.__value_.__l.0);
CString = (const char *)cocos2d::CCString::getCString(v1);
v3 = strlen(CString);
if ( v3 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v4 = v3;
if ( v3 >= 0x17 )
{
v6 = 26;
if ( (v3 | 7) != 0x17 )
v6 = (v3 | 7) + 1;
data = (char *)operator new(v6);
__dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)data;
__dst[0].__r_.__value_.__r.__words[0] = v6 + 1;
__dst[0].__r_.__value_.__l.__size_ = v4;
goto LABEL_8;
}
__dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v3);
data = __dst[0].__r_.__value_.__s.__data_;
if ( v3 )
LABEL_8:
memmove(data, CString, v4);
data[v4] = 0;
if ( *(float *)(a1 + 1052) == -99999.0 )
std::string::assign(__dst, "-");
v7 = *(_QWORD *)(a1 + 1064);
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )
v8 = __dst[0].__r_.__value_.__l.__data_;
else
v8 = __dst[0].__r_.__value_.__s.__data_;
(*(void (__fastcall **)(__int64, std::string::pointer))(*(_QWORD *)v7 + 928LL))(v7, v8);
if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )
operator delete(__dst[0].__r_.__value_.__l.__data_);
}