// // sub_D0438 from 0xd0438 to 0xd04b4 (124 bytes) // // 7 xrefs: // > sub_D04EE @ 0xd051e // > sub_D8682 @ 0xd86b6 // > sub_D8682 @ 0xd86f2 // > sub_D8682 @ 0xd8730 // > sub_D8682 @ 0xd876c // > sub_D8D22 @ 0xd8d56 // > sub_D8DA2 @ 0xd8dda // // 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:41:58 +0000 // int __fastcall sub_D0438(int a1, int a2, __int16 a3, int a4) { unsigned int v6; // r1 int result; // r0 int v8; // r4 int v9; // r2 char v10; // r12 int v11; // r3 unsigned int i; // r6 unsigned int *v13; // r4 int j; // r3 int v15; // r0 v6 = sub_D04B4(*(_DWORD *)(a1 + 84) & a4); result = *(__int16 *)(a1 + 78); v8 = a3 & 0x7FFF; v9 = *(_DWORD *)(a1 + 56); v10 = result - v8; v11 = 4 * v8; for ( i = (unsigned int)(result - v8) >> 2; ; --i ) { v13 = (unsigned int *)(v9 + v11); if ( !i ) break; if ( *v13 > v6 ) return v11 >> 2; if ( v13[1] > v6 ) { v15 = v11 + 4; return v15 >> 2; } if ( v13[2] > v6 ) { v15 = v11 + 8; return v15 >> 2; } if ( v13[3] > v6 ) { v15 = v11 + 12; return v15 >> 2; } v11 += 16; } for ( j = v10 & 3; j; --j ) { if ( *v13 > v6 ) { v15 = (int)v13 - v9; return v15 >> 2; } ++v13; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source