/* CImp::extract_dir() */
void __thiscall CImp::extract_dir(CImp *this)
{
int iVar1;
uint uVar2;
uint uVar3;
uint uVar4;
uint uVar5;
CImp *pCVar6;
int unaff_r9;
uint uVar7;
undefined1 auStack_34 [8];
int local_2c;
local_2c = __stack_chk_guard;
uVar7 = *(uint *)(*(vFILE **)(this + 0x8870) + 4);
vFILE::fseek(*(vFILE **)(this + 0x8870),*(uint *)(this + 0x783c),2);
pCVar6 = this + 0x5308;
*(CImp **)(this + 0x8868) = pCVar6;
*(CImp **)(this + 0x886c) = pCVar6;
iVar1 = vFILE::fread(*(vFILE **)(this + 0x8870),auStack_34,6,1);
if (iVar1 == 0) {
unaff_r9 = -5;
}
else {
iVar1 = memcmp(auStack_34,"IMPDE",6);
if (iVar1 == 0) {
init_getbits(this);
uVar2 = getbits(this,5);
*(int *)(this + 0x7428) = *(int *)(this + 0x7428) + -5;
*(uint *)(this + 0x7858) = *(uint *)(this + 0x7858) >> 5;
if ((uVar2 & 0xf) < 2) {
uVar3 = getbits(this,0x14);
*(int *)(this + 0x7428) = *(int *)(this + 0x7428) + -0x14;
*(uint *)(this + 0x7858) = *(uint *)(this + 0x7858) >> 0x14;
if ((uVar3 & 0xfffff) < 0x2001) {
uVar4 = getbits(this,0x14);
iVar1 = *(int *)(this + 0x7428);
uVar5 = *(uint *)(this + 0x7858);
*(int *)(this + 0x7428) = iVar1 + -0x14;
*(uint *)(this + 0x7858) = uVar5 >> 0x14;
if ((uVar2 & 0xf) == 1) {
*(uint *)(this + 0x7858) = uVar5 >> 0x19;
*(int *)(this + 0x7428) = iVar1 + -0x19;
unaff_r9 = expand_lz(this,(uchar *)pCVar6,0,uVar3 & 0xfffff,0);
}
*(uint *)(this + 0x783c) = *(int *)(this + 0x783c) + 6 + (uVar4 & 0xfffff);
vFILE::fseek(*(vFILE **)(this + 0x8870),uVar7,2);
if (-1 < unaff_r9) {
*(int *)(this + 0x886c) = *(int *)(this + 0x886c) + unaff_r9;
unaff_r9 = 0;
}
goto LAB_0003d1cc;
}
}
}
unaff_r9 = -4;
}
LAB_0003d1cc:
if (local_2c != __stack_chk_guard) {
/* WARNING: Subroutine does not return */
__stack_chk_fail(unaff_r9);
}
return;
}