//
// sub_1003AA31C from 0x1003aa31c to 0x1003aa884 (1384 bytes)
//
// 1 xrefs:
// > sub_1003A71E0 @ 0x1003a724c
//
// 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 11:03:51 +0000
//
std::string *__usercall sub_1003AA31C@(_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
std::string *v9; // x0
__int64 v10; // x0
int v11; // w8
int v12; // w8
int v13; // w8
const std::string::value_type *v14; // x1
int v15; // w8
int v16; // w8
int v17; // w8
int v18; // w8
a1[112] = 0;
result = (std::string *)sub_100009900(a2, "zzzzzzZZZZZZZZZ");
v5 = a1[110];
v6 = "zzzZZZZ";
if ( v5 <= 5 )
{
if ( v5 > 3 )
{
if ( v5 != 4 )
{
v11 = a1[111];
if ( v11 > 3 )
{
if ( v11 <= 5 )
{
if ( v11 == 4 )
v6 = "The Witch stinks of fish";
else
v6 = "My question to you is this...";
goto LABEL_124;
}
if ( v11 != 6 )
{
if ( v11 == 7 )
{
v14 = "How many shinies do you have?";
goto LABEL_96;
}
goto LABEL_125;
}
v6 = "On a scale from tree to fish";
}
else
{
if ( v11 > 1 )
{
if ( v11 == 2 )
v6 = "In this tree there lives a Witch";
else
v6 = "A very short Witch";
goto LABEL_124;
}
if ( v11 )
{
if ( v11 != 1 )
goto LABEL_125;
v6 = "A very short tree";
}
else
{
v6 = "So... there is a tree";
}
}
goto LABEL_124;
}
v15 = a1[111];
if ( !v15 )
{
v6 = "This is thread 4";
goto LABEL_124;
}
if ( v15 != 1 )
goto LABEL_125;
v14 = "Thread 4 end";
}
else
{
if ( v5 != 1 )
{
if ( v5 == 3 )
{
v8 = a1[111];
if ( v8 <= 3 )
{
if ( v8 > 1 )
{
if ( v8 == 2 )
v6 = "You took 'Spookys' coin";
else
v6 = "That is pure evil...";
goto LABEL_124;
}
if ( v8 )
{
if ( v8 != 1 )
goto LABEL_125;
v6 = "You little thief";
}
else
{
v6 = "I heard what you did";
}
}
else
{
if ( v8 <= 5 )
{
if ( v8 == 4 )
v6 = "I like it";
else
v6 = "I know what you're thinking";
goto LABEL_124;
}
if ( v8 == 6 )
{
v6 = "But you will never get my coin...";
}
else
{
if ( v8 != 7 )
{
if ( v8 == 8 )
{
v9 = std::string::assign(a2, "Too clever for you...");
a1[110] = 0;
v10 = GameManager::sharedState(v9);
result = (std::string *)GameManager::setUGV(v10, "2", 1);
}
goto LABEL_125;
}
v6 = "I keep it safe";
}
}
}
goto LABEL_124;
}
v13 = a1[111];
if ( v13 <= 1 )
{
if ( v13 )
{
if ( v13 != 1 )
goto LABEL_125;
v6 = "I feel so drained";
}
else
{
v6 = "Oh my head...";
}
goto LABEL_124;
}
if ( v13 == 2 )
{
v6 = "Would be nice to get some energy";
goto LABEL_124;
}
if ( v13 == 3 )
{
v6 = "You know, for my head...";
goto LABEL_124;
}
if ( v13 != 4 )
goto LABEL_125;
v14 = "Nothing? Ok...";
}
LABEL_96:
result = std::string::assign(a2, v14);
a1[110] = 0;
goto LABEL_125;
}
if ( v5 <= 8 )
{
if ( v5 == 6 )
{
v17 = a1[111];
if ( v17 > 3 )
{
if ( v17 <= 5 )
{
if ( v17 == 4 )
v6 = "'Remove my start and I am even'";
else
v6 = "'When you complete this riddle'";
goto LABEL_124;
}
if ( v17 != 6 )
{
if ( v17 == 7 )
{
v14 = "Can you go now?";
goto LABEL_96;
}
goto LABEL_125;
}
v6 = "'I hope you are leaving'";
}
else
{
if ( v17 > 1 )
{
if ( v17 == 2 )
v6 = "Since you insist on staying";
else
v6 = "'I have always been odd'";
goto LABEL_124;
}
if ( !v17 )
goto LABEL_87;
if ( v17 != 1 )
goto LABEL_125;
v6 = "Might as well give you a riddle";
}
}
else
{
if ( v5 != 8 )
goto LABEL_124;
v12 = a1[111];
if ( v12 > 3 )
{
if ( v12 <= 5 )
{
if ( v12 == 4 )
v6 = "Then the egg laid the chicken";
else
v6 = "... and the chicken said";
goto LABEL_124;
}
if ( v12 != 6 )
{
if ( v12 == 7 )
{
v14 = "I need to get some rest...";
goto LABEL_96;
}
goto LABEL_125;
}
v6 = "The password is on fire";
}
else
{
if ( v12 > 1 )
{
if ( v12 != 2 )
{
v6 = "The egg, of course.";
goto LABEL_124;
}
goto LABEL_87;
}
if ( v12 )
{
if ( v12 != 1 )
goto LABEL_125;
v6 = "The chicken or the egg?";
}
else
{
v6 = "Which came first?";
}
}
}
LABEL_124:
result = std::string::assign(a2, v6);
goto LABEL_125;
}
if ( v5 == 9 )
{
v16 = a1[111];
if ( !v16 )
{
v6 = "Remember the 2.1 Awards?";
goto LABEL_124;
}
if ( v16 != 1 )
goto LABEL_125;
v14 = "me neither";
goto LABEL_96;
}
if ( v5 == 10 )
{
v18 = a1[111];
if ( v18 <= 1 )
{
if ( v18 )
{
if ( v18 != 1 )
goto LABEL_125;
v6 = "I feel like I've forgotten something";
}
else
{
v6 = "It's been so long";
}
goto LABEL_124;
}
if ( v18 != 2 )
{
if ( v18 != 3 )
goto LABEL_125;
v14 = "Where's that smoke coming from?";
goto LABEL_96;
}
LABEL_87:
v6 = "...";
goto LABEL_124;
}
if ( v5 != 20 )
goto LABEL_124;
v7 = a1[111];
if ( v7 <= 2 )
{
if ( v7 )
{
if ( v7 == 1 )
{
v6 = "Just don't tell RubRub";
}
else
{
if ( v7 != 2 )
goto LABEL_125;
v6 = "I am building my own level";
}
}
else
{
v6 = "Want to hear a secret?";
}
goto LABEL_124;
}
if ( v7 <= 4 )
{
if ( v7 == 3 )
v6 = "I call it \"The Challenge\"";
else
v6 = "Hope it gets featured";
goto LABEL_124;
}
if ( v7 == 5 )
{
v6 = "But probably not...";
goto LABEL_124;
}
if ( v7 == 6 )
{
v14 = "RubRub will never notice me";
goto LABEL_96;
}
LABEL_125:
++a1[111];
return result;
}