// // sub_762D80 from 0x762d80 to 0x762ebe (318 bytes) // // 0 xrefs: // // 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_762D80(int *a1, int a2, int a3, int a4) { size_t v8; // r5 wchar_t *v9; // r10 size_t v10; // r0 wchar_t *v11; // r6 wchar_t *v12; // r4 int v13; // r3 int v14; // r2 int v15; // r8 unsigned int v16; // r0 size_t v17; // r0 wchar_t *v18; // r0 unsigned int *v20; // r3 int v21; // r4 wchar_t *s2; // [sp+0h] [bp-14h] _BYTE v23[8]; // [sp+Ch] [bp-8h] BYREF *a1 = (int)&unk_ACDDB8; s2 = (wchar_t *)sub_778E80(a3, a4, v23, 0); v8 = (a4 - a3) >> 1; v9 = &s2[*(s2 - 3)]; if ( v8 > 0x1FC00000 ) v10 = -1; else v10 = 4 * v8; v11 = (wchar_t *)operator new[](v10); v12 = s2; while ( 1 ) { v16 = sub_77A970(a2, v11, v12, v8); if ( v8 <= v16 ) { v8 = v16 + 1; operator delete[](v11); if ( v8 > 0x1FC00000 ) v17 = -1; else v17 = 4 * v8; v11 = (wchar_t *)operator new[](v17); v16 = sub_77A970(a2, v11, v12, v8); } sub_7785C8(a1, v11, v16); v18 = &v12[wcslen(v12)]; if ( v18 == v9 ) break; v13 = *a1; v12 = v18 + 1; v14 = *(_DWORD *)(*a1 - 12); v15 = v14 + 1; if ( (unsigned int)(v14 + 1) > *(_DWORD *)(*a1 - 8) || *(int *)(v13 - 4) > 0 ) { sub_778308(a1, v14 + 1); v13 = *a1; v14 = *(_DWORD *)(*a1 - 12); } *(_DWORD *)(v13 + 4 * v14) = 0; if ( (_UNKNOWN *)(v13 - 12) != &unk_ACDDAC ) { *(_DWORD *)(v13 - 12) = v15; *(_DWORD *)(v13 - 4) = 0; *(_DWORD *)(v13 + 4 * v15) = 0; } } operator delete[](v11); if ( s2 - 3 != (wchar_t *)&unk_ACDDAC ) { if ( &pthread_create ) { __dmb(0xFu); v20 = (unsigned int *)(s2 - 1); do v21 = __ldrex(v20); while ( __strex(v21 - 1, v20) ); __dmb(0xFu); } else { v21 = *(s2 - 1); *(s2 - 1) = v21 - 1; } if ( v21 <= 0 ) operator delete(s2 - 3); } return a1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source