// // sub_1004DA398 from 0x1004da398 to 0x1004da470 (216 bytes) // // 11 xrefs: // > sub_1004EC8B4 @ 0x1004ec9cc // > sub_1004EC8B4 @ 0x1004ec9f4 // > sub_1004EC8B4 @ 0x1004ecb5c // > sub_1004EC8B4 @ 0x1004ecb6c // > sub_1004ECE90 @ 0x1004ed260 // > sub_1004ED490 @ 0x1004ed520 // > sub_1004ED490 @ 0x1004ed5f0 // > sub_1004ED8FC @ 0x1004ed96c // > sub_1004EF568 @ 0x1004ef6b0 // > sub_1004EF568 @ 0x1004ef760 // > sub_1004EF8F0 @ 0x1004ef998 // // 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 // __int64 __fastcall sub_1004DA398(__int64 a1, __int64 a2) { __int64 v2; // x8 int v3; // w9 __int64 v4; // x14 int v5; // w11 int v6; // w10 int v7; // w12 int *v8; // x13 int v9; // t1 int v10; // w16 int v11; // w13 __int64 v12; // x11 if ( !a1 ) return 0; v2 = *(_QWORD *)a1; if ( *(_QWORD *)a1 ) { v3 = *(_DWORD *)(a1 + 52); if ( *(_DWORD *)(a1 + 48) > v3 ) { v4 = *(_QWORD *)(a1 + 24); v5 = *(_DWORD *)(v4 + 4LL * v3); if ( (v5 & 0x400) != 0 ) { v2 = 0xFFFFFFFFLL; } else { v6 = (unsigned __int8)*(_DWORD *)(v4 + 4LL * v3); v7 = *(_DWORD *)(v4 + 4LL * v3) & 0x200; if ( v6 == 255 ) { v8 = (int *)(v4 + 4LL * v3 + 4); v6 = 255; do { v9 = *v8++; v10 = (unsigned __int8)v9; if ( (v9 & 0x200) != 0 ) v7 = 512; v6 += v10; ++v3; } while ( v10 == 255 ); } if ( a2 ) { v11 = v5 & 0x100; *(_DWORD *)(a2 + 16) = v7; v12 = *(int *)(a1 + 16); *(_QWORD *)a2 = v2 + v12; *(_QWORD *)(a2 + 32) = *(_QWORD *)(a1 + 360); *(_QWORD *)(a2 + 24) = *(_QWORD *)(*(_QWORD *)(a1 + 32) + 8LL * v3); *(_DWORD *)(a2 + 8) = v6; *(_DWORD *)(a2 + 12) = v11; } else { LODWORD(v12) = *(_DWORD *)(a1 + 16); } *(_DWORD *)(a1 + 16) = v12 + v6; v2 = 1; } *(_DWORD *)(a1 + 52) = v3 + 1; ++*(_QWORD *)(a1 + 360); return v2; } return 0; } return v2; }
GD Web Decomp Icon

GD Web Decomp

Raw Source