//
// SecretLayer4::getThreadMessage from 0x100356148 to 0x100356480 (824 bytes)
//
// 1 xrefs:
// > SecretLayer4::getMessage @ 0x100354c70
//
// 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
//
std::string *__usercall SecretLayer4::getThreadMessage@(_DWORD *a1@, std::string *a2@)
{
std::string *result; // x0
int v5; // w8
const std::string::value_type *v6; // x1
int v7; // w8
int v8; // w8
int v9; // w8
int v10; // w8
int v11; // w8
int v12; // w8
int v13; // w8
const std::string::value_type *v14; // x1
a1[112] = 0;
result = (std::string *)sub_100009900(a2, "zzzzzzZZZZZZZZZ");
v5 = a1[110];
v6 = "zzzZZZZ";
if ( v5 <= 3 )
{
switch ( v5 )
{
case 1:
v10 = a1[111];
if ( v10 <= 2 )
{
switch ( v10 )
{
case 0:
v6 = "I hide behind rocks and rills";
goto LABEL_78;
case 1:
v6 = "under the mountains and hills";
goto LABEL_78;
case 2:
v6 = "I cannot be seen or felt";
goto LABEL_78;
}
goto LABEL_79;
}
if ( v10 == 3 )
{
v6 = "nor heard or smelt";
goto LABEL_78;
}
if ( v10 == 4 )
{
v6 = "the more I am the less you see";
goto LABEL_78;
}
if ( v10 != 5 )
goto LABEL_79;
v14 = "what am I?";
break;
case 2:
v13 = a1[111];
if ( v13 <= 1 )
{
if ( !v13 )
{
v6 = "Shh, quiet!";
goto LABEL_78;
}
if ( v13 == 1 )
{
v6 = "Can you feel it closing in?";
goto LABEL_78;
}
goto LABEL_79;
}
if ( v13 == 2 )
{
v6 = "Shadows creep where it begins";
goto LABEL_78;
}
if ( v13 == 3 )
{
v6 = "Speak its name and it is gone";
goto LABEL_78;
}
if ( v13 != 4 )
goto LABEL_79;
v14 = "from every moment dusk till dawn";
break;
case 3:
v8 = a1[111];
if ( v8 <= 1 )
{
if ( !v8 )
{
v6 = "What always runs, but never walks";
goto LABEL_78;
}
if ( v8 == 1 )
{
v6 = "Often murmurs, never talks";
goto LABEL_78;
}
goto LABEL_79;
}
if ( v8 == 2 )
{
v6 = "Has a bed, but never sleeps";
goto LABEL_78;
}
if ( v8 != 3 )
goto LABEL_79;
v14 = "Has a mouth, but never eats?";
break;
default:
goto LABEL_78;
}
LABEL_60:
result = std::string::assign(a2, v14);
a1[110] = 0;
goto LABEL_79;
}
if ( v5 > 5 )
{
if ( v5 == 6 )
{
v12 = a1[111];
if ( !v12 )
{
v6 = "Legend tells of a level so hard no one can beat it";
goto LABEL_78;
}
if ( v12 != 2 )
{
if ( v12 == 1 )
{
v6 = "Anything harder than it is impossible";
goto LABEL_78;
}
goto LABEL_79;
}
v14 = "Don't even get me started";
}
else
{
if ( v5 != 7 )
goto LABEL_78;
v9 = a1[111];
if ( v9 <= 1 )
{
if ( !v9 )
{
v6 = "Good levels are hard to find sometimes";
goto LABEL_78;
}
if ( v9 == 1 )
{
v6 = "Wish I had someone who could find them for me";
goto LABEL_78;
}
goto LABEL_79;
}
if ( v9 == 2 )
{
v6 = "...";
goto LABEL_78;
}
if ( v9 != 3 )
goto LABEL_79;
v14 = "Forget it...";
}
goto LABEL_60;
}
if ( v5 == 4 )
{
v11 = a1[111];
if ( v11 <= 1 )
{
if ( !v11 )
{
v6 = "The less you consume";
goto LABEL_78;
}
if ( v11 == 1 )
{
v6 = "the stronger I become";
goto LABEL_78;
}
goto LABEL_79;
}
if ( v11 == 2 )
{
v6 = "wait too long";
goto LABEL_78;
}
if ( v11 == 3 )
{
v6 = "and death will come";
goto LABEL_78;
}
if ( v11 != 4 )
goto LABEL_79;
goto LABEL_46;
}
v7 = a1[111];
if ( v7 > 1 )
{
if ( v7 == 2 )
{
v6 = "My rain dries up all the land it touches";
goto LABEL_78;
}
if ( v7 != 3 )
goto LABEL_79;
LABEL_46:
v14 = "What am I?";
goto LABEL_60;
}
if ( !v7 )
{
v6 = "My thunder comes before my lightning";
goto LABEL_78;
}
if ( v7 == 1 )
{
v6 = "My lightning comes before my rain";
LABEL_78:
result = std::string::assign(a2, v6);
}
LABEL_79:
++a1[111];
return result;
}