//
// cocos2d::CCLuaLog from 0x180074b50 to 0x180074c89 (313 bytes)
//
// 2 xrefs:
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b45b4
//
// 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
//
void __fastcall cocos2d::CCLuaLog(LPCCH lpMultiByteStr, const char *a2)
{
int cchWideChar; // edi
void *lpWideCharStr; // rbp
int v5; // edi
void *v6; // rsi
cchWideChar = MultiByteToWideChar(0xFDE9u, 0, lpMultiByteStr, -1, nullptr, 0);
lpWideCharStr = operator new(saturated_mul(cchWideChar + 1, 2u));
memset(lpWideCharStr, 0, 2LL * (cchWideChar + 1));
MultiByteToWideChar(0xFDE9u, 0, lpMultiByteStr, -1, (LPWSTR)lpWideCharStr, cchWideChar);
OutputDebugStringW((LPCWSTR)lpWideCharStr);
OutputDebugStringA("\n");
v5 = WideCharToMultiByte(0, 0, (LPCWCH)lpWideCharStr, -1, nullptr, 0, nullptr, nullptr);
v6 = operator new(v5 + 1);
memset(v6, 0, v5 + 1);
WideCharToMultiByte(0, 0, (LPCWCH)lpWideCharStr, -1, (LPSTR)v6, v5, nullptr, nullptr);
puts((const char *)v6);
j_j_free_0(lpWideCharStr);
j_j_free_0(v6);
}