//
// sub_1004ABCB0 from 0x1004abcb0 to 0x1004abda3 (243 bytes)
//
// 1 xrefs:
// > sub_1004ABDB0 @ 0x1004abe51
//
// 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
//
double __fastcall sub_1004ABCB0(__int64 a1, float *a2, char a3)
{
const char *v4; // rax
double v5; // xmm0_8
cocos2d::CCEGLView *v6; // r15
float ScaleX; // xmm0_4
float ScaleY; // xmm0_4
unsigned __int64 *ViewPortRect; // rax
double result; // xmm0_8
unsigned __int64 v11; // [rsp+8h] [rbp-58h] BYREF
__int128 v12; // [rsp+10h] [rbp-50h] BYREF
__int128 v13; // [rsp+20h] [rbp-40h]
double v14[2]; // [rsp+30h] [rbp-30h] BYREF
float v15; // [rsp+40h] [rbp-20h]
float v16; // [rsp+44h] [rbp-1Ch]
v4 = (const char *)objc_msgSend(*(id *)(a1 + 56), "textField");
if ( v4 )
{
objc_msgSend_stret(&v12, v4, "frame");
v5 = *((double *)&v13 + 1);
}
else
{
v13 = 0;
v12 = 0;
v5 = 0.0;
}
v14[1] = v5;
v6 = cocos2d::CCEGLView::sharedOpenGLView();
v16 = *a2;
ScaleX = cocos2d::CCEGLViewProtocol::getScaleX(v6);
v16 = ScaleX * v16;
v15 = a2[1];
ScaleY = cocos2d::CCEGLViewProtocol::getScaleY(v6);
sub_10028CBE0((float *)&v11, v16, v15 * ScaleY);
ViewPortRect = (unsigned __int64 *)cocos2d::CCEGLViewProtocol::getViewPortRect(v6);
sub_10028CCE0(v14, &v11, ViewPortRect);
result = *(float *)v14;
if ( a3 )
return result * 0.5;
return result;
}