// // TIFFUnlinkDirectory from 0x8b78c0 to 0x8b7cc0 (1024 bytes) // // 1 xrefs: // > @ 0x6b05c // // 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:03:56 +0000 // int __fastcall TIFFUnlinkDirectory(int a1, unsigned __int16 a2) { int v6; // [sp+14h] [bp-20h] BYREF __int64 v7; // [sp+18h] [bp-1Ch] BYREF __int64 v8; // [sp+20h] [bp-14h] BYREF __int16 i; // [sp+2Eh] [bp-6h] if ( *(_DWORD *)(a1 + 8) ) { if ( (*(_DWORD *)(a1 + 12) & 0x80000) != 0 ) { v8 = *(_QWORD *)(a1 + 432); v7 = 8; } else { v8 = *(unsigned int *)(a1 + 428); v7 = 4; } for ( i = a2 - 1; i; --i ) { if ( !v8 ) { TIFFErrorExt(*(_DWORD *)(a1 + 628), "TIFFUnlinkDirectory", "Directory %d does not exist", a2); return 0; } if ( !sub_8B6CC4((const char **)a1, &v8, &v7) ) return 0; } if ( sub_8B6CC4((const char **)a1, &v8, nullptr) ) { (*(void (__fastcall **)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))(a1 + 640))( *(_DWORD *)(a1 + 628), *(_DWORD *)(a1 + 640), v7, HIDWORD(v7), 0); if ( (*(_DWORD *)(a1 + 12) & 0x80000) != 0 ) { if ( (*(_DWORD *)(a1 + 12) & 0x80) != 0 ) TIFFSwabLong8(&v8); if ( (*(int (__fastcall **)(_DWORD, __int64 *, int))(a1 + 636))(*(_DWORD *)(a1 + 628), &v8, 8) != 8 ) { TIFFErrorExt(*(_DWORD *)(a1 + 628), "TIFFUnlinkDirectory", "Error writing directory link"); return 0; } } else { v6 = v8; if ( HIDWORD(v8) ) _assert2(); if ( (*(_DWORD *)(a1 + 12) & 0x80) != 0 ) TIFFSwabLong(&v6); if ( (*(int (__fastcall **)(_DWORD, int *, int))(a1 + 636))(*(_DWORD *)(a1 + 628), &v6, 4) != 4 ) { TIFFErrorExt(*(_DWORD *)(a1 + 628), "TIFFUnlinkDirectory", "Error writing directory link"); return 0; } } (*(void (__fastcall **)(int))(a1 + 564))(a1); if ( (*(_DWORD *)(a1 + 12) & 0x200) != 0 && *(_DWORD *)(a1 + 588) ) { TIFFfree(*(_DWORD *)(a1 + 588)); *(_DWORD *)(a1 + 588) = 0; *(_DWORD *)(a1 + 608) = 0; *(_DWORD *)(a1 + 596) = 0; *(_DWORD *)(a1 + 600) = 0; } *(_DWORD *)(a1 + 12) &= 0xFFEFEFAF; TIFFFreeDirectory(a1); TIFFDefaultDirectory((_DWORD *)a1); *(_QWORD *)(a1 + 16) = 0; *(_QWORD *)(a1 + 24) = 0; *(_QWORD *)(a1 + 456) = 0; *(_DWORD *)(a1 + 444) = -1; *(_DWORD *)(a1 + 452) = -1; return 1; } else { return 0; } } else { TIFFErrorExt(*(_DWORD *)(a1 + 628), "TIFFUnlinkDirectory", "Can not unlink directory in read-only file"); return 0; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source