// // GameManager::sheetNameForIcon from 0x140182490 to 0x1401827e4 (852 bytes) // // 3 xrefs: // > GameManager::loadIcon @ 0x140181d4d // > GameManager::unloadIcon @ 0x14018211c // > @ 0x1406cb43c // // 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 // // Hidden C++ exception states: #wind=2 _QWORD *__fastcall GameManager::sheetNameForIcon(__int64 a1, _QWORD *a2, int a3, int a4) { __int64 v4; // rdi __int64 v7; // rcx __int16 v8; // ax _BYTE *v10; // rax size_t v11; // r8 void *v12; // rcx __int128 v13; // [rsp+20h] [rbp-E0h] BYREF _BYTE v14[16]; // [rsp+38h] [rbp-C8h] BYREF void *Block[2]; // [rsp+48h] [rbp-B8h] BYREF __int64 v16; // [rsp+58h] [rbp-A8h] unsigned __int64 v17; // [rsp+60h] [rbp-A0h] _BYTE v18[528]; // [rsp+70h] [rbp-90h] BYREF v4 = a4; *(_QWORD *)&v13 = a2; fmt::BasicWriter::BasicWriter(v18); *(_OWORD *)Block = 0; v17 = 15; LOBYTE(Block[0]) = 0; switch ( v4 ) { case 0LL: v7 = 7; Block[0] = (void *)0x5F726579616C70LL; goto LABEL_11; case 1LL: v7 = 5; LODWORD(Block[0]) = *(_DWORD *)"ship_"; WORD2(Block[0]) = (unsigned __int8)aShip[4]; goto LABEL_11; case 2LL: v7 = 12; strcpy((char *)Block, "player_ball_"); goto LABEL_11; case 3LL: v7 = 5; LODWORD(Block[0]) = *(_DWORD *)"bird_"; WORD2(Block[0]) = (unsigned __int8)aBird[4]; goto LABEL_11; case 4LL: v7 = 5; LODWORD(Block[0]) = *(_DWORD *)"dart_"; WORD2(Block[0]) = (unsigned __int8)aDart[4]; goto LABEL_11; case 5LL: LODWORD(Block[0]) = *(_DWORD *)"robot_"; v8 = *(_WORD *)"t_"; goto LABEL_10; case 6LL: v7 = 7; qmemcpy(Block, "spider", 6); HIWORD(Block[0]) = (unsigned __int8)aSpider[6]; goto LABEL_11; case 7LL: LODWORD(Block[0]) = *(_DWORD *)"swing_"; v8 = *(_WORD *)"g_"; LABEL_10: BYTE6(Block[0]) = 0; WORD2(Block[0]) = v8; v7 = 6; LABEL_11: v16 = v7; goto LABEL_15; case 8LL: v16 = 8; strcpy((char *)Block, "jetpack_"); LABEL_15: *(_QWORD *)&v13 = "icons/"; *((_QWORD *)&v13 + 1) = 0; fmt::BasicWriter::operator<<(v18, &v13); v13 = *(_OWORD *)fmt::BasicStringRef::BasicStringRef(v14, Block); fmt::BasicWriter::operator<<(v18, &v13); if ( a3 < 10 ) { *(_QWORD *)&v13 = "0"; *((_QWORD *)&v13 + 1) = 0; fmt::BasicWriter::operator<<(v18, &v13); } fmt::BasicWriter::operator<<(v18, (unsigned int)a3); v10 = (_BYTE *)fmt::BasicWriter::c_str(v18); *(_OWORD *)a2 = 0; a2[2] = 0; a2[3] = 0; v11 = -1; do ++v11; while ( v10[v11] ); sub_14003A930(a2, v10, v11); if ( v17 > 0xF ) { v12 = Block[0]; if ( v17 + 1 >= 0x1000 ) { v12 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v12 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v12); } break; default: *(_OWORD *)a2 = 0; a2[2] = 0; a2[3] = 15; *(_BYTE *)a2 = 0; break; } v16 = 0; v17 = 15; LOBYTE(Block[0]) = 0; fmt::BasicWriter::~BasicWriter(v18); return a2; }
GD Web Decomp Icon

GD Web Decomp

Raw Source