// // SecretLayer4::getErrorMessage from 0x621e40 to 0x622198 (856 bytes) // // 1 xrefs: // > SecretLayer4::onSubmit @ 0x622a96 // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // 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:55:06 +0000 // int *__fastcall SecretLayer4::getErrorMessage(SecretLayer4 *this, int a2) { int *v2; // r4 int v4; // r3 int *v5; // r0 size_t v6; // r2 const char *v7; // r1 int v8; // r0 char *v9; // r1 char *v10; // r0 int v11; // r0 char *v12; // r1 cocos2d::CCString *v13; // r0 const char *CString; // r0 const char *v15; // r7 size_t v16; // r0 int v17; // r0 cocos2d::CCString *v18; // r0 const char *v19; // r0 const char *v20; // r7 size_t v21; // r0 int v23[2]; // [sp+0h] [bp-14h] BYREF char *v24; // [sp+8h] [bp-Ch] v2 = (int *)this; v4 = *(_DWORD *)(a2 + 348); if ( v4 >= 0 ) { *(_DWORD *)(a2 + 348) = v4 + 1; } else { rand(); this = (SecretLayer4 *)lroundf(); *(_DWORD *)(a2 + 348) = this; } if ( *(int *)(a2 + 348) > 29 ) *(_DWORD *)(a2 + 348) = 0; switch ( *(_DWORD *)(a2 + 348) ) { case 0: v5 = v2; *v2 = 0; v6 = 11; v2[1] = 0; v7 = "No, just no"; v2[2] = 0; goto LABEL_58; case 1: v5 = v2; *v2 = 0; v2[1] = 0; v7 = "Swing and a miss!"; v2[2] = 0; goto LABEL_57; case 2: v5 = v2; *v2 = 0; v6 = 27; v2[1] = 0; v7 = "I told you, it wont work..."; v2[2] = 0; goto LABEL_58; case 3: v5 = v2; *v2 = 0; v6 = 39; v2[1] = 0; v7 = "Door is now open. Oh wait, no it's not."; v2[2] = 0; goto LABEL_58; case 4: v5 = v2; *v2 = 0; v2[1] = 0; v7 = "Is that actually your guess?"; v2[2] = 0; goto LABEL_32; case 5: v8 = GameManager::sharedState(this); std::string::basic_string(v23, v8 + 448); v9 = (char *)(LOBYTE(v23[0]) << 31); if ( (v23[0] & 1) == 0 ) v9 = (char *)v23 + 1; v10 = "Go home %s."; if ( (v23[0] & 1) != 0 ) v9 = v24; goto LABEL_52; case 6: v5 = v2; *v2 = 0; v6 = 4; v2[1] = 0; v7 = "Nope"; v2[2] = 0; goto LABEL_58; case 7: v5 = v2; *v2 = 0; v2[1] = 0; v7 = "Give up, please"; v2[2] = 0; goto LABEL_55; case 8: v5 = v2; *v2 = 0; v6 = 20; v2[1] = 0; v7 = "Door is still locked"; v2[2] = 0; goto LABEL_58; case 9: v5 = v2; *v2 = 0; v2[1] = 0; v7 = "That tickles!"; v2[2] = 0; goto LABEL_36; case 0xA: v5 = v2; *v2 = 0; v2[1] = 0; v7 = "Try harder please"; v2[2] = 0; goto LABEL_57; case 0xB: v5 = v2; *v2 = 0; v2[1] = 0; v7 = "Don't make me angry"; v2[2] = 0; goto LABEL_47; case 0xC: v5 = v2; *v2 = 0; v6 = 34; v2[1] = 0; v7 = "You won't like me when im angry..."; v2[2] = 0; goto LABEL_58; case 0xD: v5 = v2; *v2 = 0; v2[1] = 0; v7 = "Oh no, you just unlocked... NOTHING"; v2[2] = 0; goto LABEL_30; case 0xE: v5 = v2; *v2 = 0; v2[1] = 0; v7 = "Only 3 attempts left!"; v2[2] = 0; goto LABEL_34; case 0xF: v5 = v2; *v2 = 0; v2[1] = 0; v7 = "Only 2 attempts left!"; v2[2] = 0; goto LABEL_34; case 0x10: v5 = v2; *v2 = 0; v2[1] = 0; v7 = "LAST ATTEMPT!"; v2[2] = 0; goto LABEL_36; case 0x11: v5 = v2; *v2 = 0; v6 = 32; v2[1] = 0; v7 = "Just kidding, unlimited attempts"; v2[2] = 0; goto LABEL_58; case 0x12: v5 = v2; *v2 = 0; v7 = "Maybe you should do something else?"; v2[1] = 0; v2[2] = 0; LABEL_30: v6 = 35; goto LABEL_58; case 0x13: v5 = v2; *v2 = 0; v7 = "This is getting ridiculus..."; v2[1] = 0; v2[2] = 0; LABEL_32: v6 = 28; goto LABEL_58; case 0x14: v5 = v2; *v2 = 0; v7 = "Go collect some stars"; v2[1] = 0; v2[2] = 0; LABEL_34: v6 = 21; goto LABEL_58; case 0x15: v5 = v2; *v2 = 0; v7 = "How about no?"; v2[1] = 0; v2[2] = 0; LABEL_36: v6 = 13; goto LABEL_58; case 0x16: v11 = GameManager::sharedState(this); std::string::basic_string(v23, v11 + 448); if ( (v23[0] & 1) != 0 ) v12 = v24; else v12 = (char *)v23 + 1; v13 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%s, please give up...", v12, LOBYTE(v23[0]) << 31); CString = (const char *)cocos2d::CCString::getCString(v13); *v2 = 0; v2[1] = 0; v15 = CString; v2[2] = 0; v16 = strlen(CString); std::string::__init(v2, v15, v16); goto LABEL_53; case 0x17: v5 = v2; *v2 = 0; v6 = 26; v2[1] = 0; v7 = "Error, error. Bad answers."; v2[2] = 0; goto LABEL_58; case 0x18: v5 = v2; *v2 = 0; v6 = 7; v2[1] = 0; v7 = "Failure"; v2[2] = 0; goto LABEL_58; case 0x19: v5 = v2; *v2 = 0; v6 = 23; v2[1] = 0; v7 = "May I suggest thinking?"; v2[2] = 0; goto LABEL_58; case 0x1A: v5 = v2; *v2 = 0; v6 = 5; v2[1] = 0; v7 = "WRONG"; v2[2] = 0; goto LABEL_58; case 0x1B: v5 = v2; *v2 = 0; v6 = 18; v2[1] = 0; v7 = "You're hopeless..."; v2[2] = 0; goto LABEL_58; case 0x1C: v5 = v2; *v2 = 0; v7 = "Really, still here?"; v2[1] = 0; v2[2] = 0; LABEL_47: v6 = 19; goto LABEL_58; case 0x1D: v17 = GameManager::sharedState(this); std::string::basic_string(v23, v17 + 448); if ( (v23[0] & 1) == 0 ) v9 = (char *)v23 + 1; v10 = "What kind of name is %s anyway?"; if ( (v23[0] & 1) != 0 ) v9 = v24; LABEL_52: v18 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)v10, v9); v19 = (const char *)cocos2d::CCString::getCString(v18); *v2 = 0; v2[1] = 0; v20 = v19; v2[2] = 0; v21 = strlen(v19); std::string::__init(v2, v20, v21); LABEL_53: std::string::~string((int)v23); return v2; case 0x1E: v5 = v2; *v2 = 0; v7 = "Not gonna work."; v2[1] = 0; v2[2] = 0; LABEL_55: v6 = 15; goto LABEL_58; default: v5 = v2; *v2 = 0; v7 = "Don't touch that!"; v2[1] = 0; v2[2] = 0; LABEL_57: v6 = 17; LABEL_58: std::string::__init(v5, v7, v6); return v2; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source