//
// UI_new_method from 0x1061580 to 0x106166c (236 bytes)
//
// 2 xrefs:
// > UI_new @ 0x1061670
// > ??> @ 0x63580
//
// This function is hookable on this platform (idp: arm, 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 13:16:50 +0000
//
_QWORD *__fastcall UI_new_method(__int64 a1)
{
_QWORD *v2; // x19
pthread_rwlock_t *v3; // x0
void *v5; // x0
void *v6; // x0
v2 = CRYPTO_zalloc(&dword_30, (__int64)"crypto/ui/ui_lib.c", 27);
if ( v2 )
{
v3 = CRYPTO_THREAD_lock_new();
v2[5] = v3;
if ( v3 )
{
if ( a1 )
*v2 = a1;
else
*v2 = UI_get_default_method();
if ( !(unsigned int)CRYPTO_new_ex_data(0xBu, (__int64)v2, v2 + 3) )
{
v5 = v2;
v2 = nullptr;
CRYPTO_free(v5, (__int64)"crypto/ui/ui_lib.c", 47);
}
}
else
{
ERR_put_error(40, 104, 65, (__int64)"crypto/ui/ui_lib.c", 36);
v6 = v2;
v2 = nullptr;
CRYPTO_free(v6, (__int64)"crypto/ui/ui_lib.c", 37);
}
}
else
{
ERR_put_error(40, 104, 65, (__int64)"crypto/ui/ui_lib.c", 30);
}
return v2;
}