// // sub_640F0 from 0x640f0 to 0x64298 (424 bytes) // // 5 xrefs: // > sub_53FC8 @ 0x53fec // > sub_5442A @ 0x5443a // > sub_54D00 @ 0x54d2e // > sub_55578 @ 0x55602 // > sub_60B04 @ 0x60b34 // // 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 // int __fastcall sub_640F0(_DWORD *a1, unsigned int *a2) { int v4; // r6 _DWORD **v5; // r8 int v6; // r4 int v7; // r0 int result; // r0 _DWORD *v9; // r0 bool v10; // zf int v11; // r10 int v12; // r4 _DWORD *v13; // r6 unsigned int *v14; // r1 unsigned int v15; // r0 signed int v16; // r1 signed int v17; // r2 unsigned int *v18; // r3 unsigned int v19; // r0 _DWORD *v20; // r4 _DWORD *v21; // r6 unsigned int *v22; // r0 unsigned int v23; // r1 int v24; // [sp+4h] [bp-24h] BYREF unsigned int *v25; // [sp+8h] [bp-20h] BYREF v4 = 0; v5 = (_DWORD **)(a1 + 17718); v6 = 40; while ( v4 < a1[286] ) { v7 = *(_DWORD *)(a1[289] + v6); if ( v7 ) { if ( *(unsigned int **)(v7 + 56) == a2 ) { result = sub_577FC(a1, v4); if ( result ) return result; } } v6 += 44; ++v4; } if ( (*(int (__fastcall **)(unsigned int *))*a2)(a2) ) { sub_64EC0(a1, 10); v9 = *v5; v10 = *v5 == v5; if ( *v5 == v5 ) v10 = a1[17719] == (_DWORD)v5; if ( !v10 ) { v11 = 0; while ( 1 ) { do { if ( v9 == v5 ) goto LABEL_25; v12 = v9[2]; v11 = 0; v13 = (_DWORD *)*v9; v14 = *(unsigned int **)(v12 + 20); v9 = (_DWORD *)*v9; } while ( !v14 ); if ( v14 == a2 ) { LABEL_21: sub_64ED8(a1, 10); (*(void (__fastcall **)(_DWORD))(**(_DWORD **)(v12 + 12) + 4))(*(_DWORD *)(v12 + 12)); sub_64EC0(a1, 10); v11 = 1; v9 = v13; } else { v15 = v14[30]; if ( v15 ) { v16 = v14[32]; v17 = 0; while ( v17 < v16 ) { v18 = *(unsigned int **)(v15 + 4 * v17++); if ( v18 == a2 ) goto LABEL_21; } v11 = 0; v9 = v13; } else { v11 = 0; v9 = v13; if ( v14[62] == a2[62] ) goto LABEL_21; } } } } v11 = 0; LABEL_25: sub_64ED8(a1, 10); } else { v11 = 0; } v19 = a2[16]; __dmb(0xBu); if ( (v19 & 4) == 0 ) return 0; if ( !(((a2[52] == 0) | v11) << 31) ) { v20 = (_DWORD *)a1[148]; if ( v20 ) v20 -= 70; while ( v20 != a1 + 78 ) { v21 = v20; v20 = (_DWORD *)v20[70]; if ( v20 ) v20 -= 70; if ( v21[83] ) { v25 = nullptr; sub_4C64A((int)v21, &v25); if ( v25 == a2 ) sub_4A9A4(v21, 83); } } } (*(void (__fastcall **)(unsigned int *, int *, _DWORD, _DWORD))(*a2 + 96))(a2, &v24, 0, 0); if ( v24 != 6 || (result = sub_61B58((int)a1, 1)) == 0 ) { if ( !(*(int (__fastcall **)(unsigned int *))*a2)(a2) ) { v22 = a2 + 16; __dmb(0xBu); do v23 = __ldrex(v22); while ( __strex(v23 & 0xFFFFFFFB, v22) ); __dmb(0xBu); } return 0; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source