// // sub_7345C0 from 0x7345c0 to 0x734686 (198 bytes) // // 2 xrefs: // > sub_71CC10 @ 0x71cce0 // > sub_732784 @ 0x7328b2 // // 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 // char *__fastcall sub_7345C0(unsigned int *a1) { int v2; // lr char *result; // r0 char *v4; // r2 size_t v5; // r5 unsigned __int64 v6; // r6 bool v7; // zf unsigned int v8; // r1 _BOOL4 v9; // r3 int v10; // r6 char *v11; // r0 char *v12; // r7 unsigned int v13; // r3 unsigned int v14; // r3 int v15; // r2 v2 = a1[1]; result = (char *)a1[2]; v4 = (char *)a1[3]; v5 = v4 - result; v6 = (unsigned int)(v4 - result) + (unsigned __int64)(unsigned int)((v2 + 7) >> 3); v7 = HIDWORD(v6) == 0; if ( !HIDWORD(v6) ) v7 = 1; if ( !v7 ) { a1[5] = 1; return result; } v8 = a1[4] - (_DWORD)result; v9 = v8 >= (unsigned int)v6; if ( !v8 ) v9 = 0; if ( !v9 ) { if ( (unsigned int)v6 < (3 * v8) >> 1 ) LODWORD(v6) = (3 * v8) >> 1; v10 = (v6 & 0xFFFFFC00) + 1024; v11 = (char *)WebPSafeMalloc(1, 0, v10); v12 = v11; if ( !v11 ) { result = (char *)a1[2]; a1[5] = 1; return result; } if ( v5 ) memcpy(v11, (const void *)a1[2], v5); WebPSafeFree((void *)a1[2]); v2 = a1[1]; result = v12; v4 = &v12[v5]; a1[4] = (unsigned int)&v12[v10]; a1[3] = (unsigned int)&v12[v5]; a1[2] = (unsigned int)v12; } if ( v2 > 0 ) { v13 = *a1; while ( 1 ) { a1[3] = (unsigned int)(v4 + 1); *v4 = v13; v14 = *a1; v15 = a1[1] - 8; a1[1] = v15; v13 = v14 >> 8; *a1 = v13; if ( v15 <= 0 ) break; v4 = (char *)a1[3]; } result = (char *)a1[2]; } a1[1] = 0; return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source