// // TIFFReadCustomDirectory from 0x8c269c to 0x8c2b30 (1172 bytes) // // 2 xrefs: // > TIFFReadEXIFDirectory @ 0x8c2b8c // > @ 0x6b1ec // // 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 12:04:00 +0000 // int __fastcall TIFFReadCustomDirectory(int a1, __int64 a2, int a3) { int v4; // r1 int v6; // r0 int v10; // [sp+1Ch] [bp-20h] BYREF unsigned __int16 *v11; // [sp+20h] [bp-1Ch] BYREF unsigned __int16 v12; // [sp+26h] [bp-16h] unsigned __int16 *v13; // [sp+28h] [bp-14h] unsigned __int16 v14; // [sp+2Eh] [bp-Eh] int v15; // [sp+30h] [bp-Ch] int v16; // [sp+34h] [bp-8h] TIFFSetupFields((_DWORD *)a1, a3); v12 = sub_8C34C0(a1, v4, a2, HIDWORD(a2), &v11, 0); if ( v12 ) { TIFFFreeDirectory(a1); TIFFmemset(a1 + 40, 0, 192); sub_8C240C(a1, v11, v12); v14 = 0; v13 = v11; while ( v14 < (unsigned int)v12 ) { sub_8C2554(a1, *v13, &v10); if ( v10 == -1 ) { TIFFWarningExt( *(_DWORD *)(a1 + 628), "TIFFReadCustomDirectory", "Unknown field with tag %d (0x%x) encountered", *v13, *v13); v6 = TIFFCreateAnonField(a1, *v13, v13[1]); if ( TIFFMergeFields((_DWORD *)a1, v6, 1u) ) { sub_8C2554(a1, *v13, &v10); if ( v10 == -1 ) _assert2(); } else { TIFFWarningExt( *(_DWORD *)(a1 + 628), "TIFFReadCustomDirectory", "Registering anonymous field with tag %d (0x%x) failed", *v13, *v13); *v13 = 0; } } if ( *v13 ) { v15 = *(_DWORD *)(*(_DWORD *)(a1 + 656) + 4 * v10); if ( *(_WORD *)(v15 + 24) ) { while ( *(_DWORD *)(v15 + 8) && *(_DWORD *)(v15 + 8) != v13[1] ) { if ( *(_DWORD *)(a1 + 660) == ++v10 || **(_DWORD **)(*(_DWORD *)(a1 + 656) + 4 * v10) != *v13 ) { v10 = 0xFFFF; break; } v15 = *(_DWORD *)(*(_DWORD *)(a1 + 656) + 4 * v10); } if ( v10 == 0xFFFF ) { TIFFWarningExt( *(_DWORD *)(a1 + 628), "TIFFReadCustomDirectory", "Wrong data type %d for \"%s\"; tag ignored", v13[1], *(const char **)(v15 + 28)); *v13 = 0; } else if ( *(__int16 *)(v15 + 4) != -1 && *(__int16 *)(v15 + 4) != -3 ) { v16 = *(__int16 *)(v15 + 4) == -2 ? *(unsigned __int16 *)(a1 + 98) : *(__int16 *)(v15 + 4); if ( !sub_8C330C(a1, v13, v16) ) *v13 = 0; } } else { *v13 = 0; } if ( *v13 ) { if ( *v13 == 37382 ) sub_8C6EC4(a1, v13); else sub_8C411C(a1, v13, 1); } } ++v14; v13 += 12; } if ( v11 ) TIFFfree(v11); return 1; } else { TIFFErrorExt(*(_DWORD *)(a1 + 628), "TIFFReadCustomDirectory", "Failed to read custom directory at offset %llu", a2); return 0; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source