//
// UI_construct_prompt from 0x83af10 to 0x83b05c (332 bytes)
//
// 1 xrefs:
// > ??> @ 0x6692c
//
// 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
//
char *__fastcall UI_construct_prompt(int a1, char *a2, const char *a3)
{
int (*v3)(void); // r3
size_t v7; // r0
void *v8; // r5
char *v9; // r0
char *v10; // r4
char *v11; // r0
__int16 v12; // [sp+4h] [bp-18h] BYREF
char v13[8]; // [sp+8h] [bp-14h] BYREF
char v14[12]; // [sp+10h] [bp-Ch] BYREF
v3 = *(int (**)(void))(*(_DWORD *)a1 + 24);
if ( !v3 )
{
strcpy(v14, "Enter ");
strcpy(v13, " for ");
v12 = 58;
if ( a2 )
{
v7 = strlen(a2);
if ( a3 )
{
v8 = (void *)(strlen(a3) + v7 + 13);
v9 = (char *)CRYPTO_malloc(v8, (int)"crypto/ui/ui_lib.c", 371);
v10 = v9;
if ( v9 )
{
OPENSSL_strlcpy(v9, v14, (unsigned int)v8);
OPENSSL_strlcat(v10, a2, (unsigned int)v8);
OPENSSL_strlcat(v10, v13, (unsigned int)v8);
OPENSSL_strlcat(v10, a3, (unsigned int)v8);
LABEL_8:
OPENSSL_strlcat(v10, (const char *)&v12, (unsigned int)v8);
return v10;
}
}
else
{
v8 = (void *)(v7 + 8);
v11 = (char *)CRYPTO_malloc((void *)(v7 + 8), (int)"crypto/ui/ui_lib.c", 371);
v10 = v11;
if ( v11 )
{
OPENSSL_strlcpy(v11, v14, (unsigned int)v8);
OPENSSL_strlcat(v10, a2, (unsigned int)v8);
goto LABEL_8;
}
}
}
return nullptr;
}
return (char *)v3();
}