#include "classes.h" // 006c20e0 LootList::LootList(void *other) { uint32_t uVar1; uint32_t uVar2; uint32_t uVar3; uint32_t *puVar4; int iVar5; void *newBlock; uint32_t endOffset; int map; uint32_t offset; void *local_1c; uint8_t *puStack_18; uint32_t local_14; uint32_t *dstEntry; uint32_t mapSize; local_14 = 0xffffffff; puStack_18 = &LAB_00afa935; local_1c = ExceptionList; ExceptionList = &local_1c; *GHIDRA_CAST(this) = 0; *GHIDRA_CAST((GHIDRA_CAST(this) + 4)) = 0; *GHIDRA_CAST((GHIDRA_CAST(this) + 8)) = 0; *GHIDRA_CAST((GHIDRA_CAST(this) + 0xc)) = 0; *GHIDRA_CAST((GHIDRA_CAST(this) + 0x10)) = 0; puVar4 = operator_new(8); *puVar4 = this; puVar4[1] = 0; *GHIDRA_CAST(this) = puVar4; offset = *GHIDRA_CAST((GHIDRA_CAST(other) + 0xc)); endOffset = *GHIDRA_CAST((GHIDRA_CAST(other) + 0x10)) + offset; local_14 = 1; if (offset != endOffset) { iVar5 = *GHIDRA_CAST((GHIDRA_CAST(this) + 0x10)); do { puVar4 = *(uint32_t **) (*GHIDRA_CAST((GHIDRA_CAST(other) + 4)) + (*GHIDRA_CAST((GHIDRA_CAST(other) + 8)) - 1U & offset) * 4); mapSize = *GHIDRA_CAST((GHIDRA_CAST(this) + 8)); if (mapSize <= iVar5 + 1U) { msvc::deque::_Growmap(mapSize); iVar5 = *GHIDRA_CAST((GHIDRA_CAST(this) + 0x10)); mapSize = *GHIDRA_CAST((GHIDRA_CAST(this) + 8)); } *GHIDRA_CAST((GHIDRA_CAST(this) + 0xc)) = *GHIDRA_CAST((GHIDRA_CAST(this) + 0xc)) & mapSize - 1; map = *GHIDRA_CAST((GHIDRA_CAST(this) + 4)); iVar5 = (*GHIDRA_CAST((GHIDRA_CAST(this) + 0xc)) + iVar5 & mapSize - 1) * 4; if (*GHIDRA_CAST((iVar5 + map)) == 0) { newBlock = operator_new(0x14); *(void **)(iVar5 + *GHIDRA_CAST((GHIDRA_CAST(this) + 4))) = newBlock; map = *GHIDRA_CAST((GHIDRA_CAST(this) + 4)); } dstEntry = *GHIDRA_CAST((iVar5 + map)); offset = offset + 1; uVar1 = puVar4[1]; uVar2 = puVar4[2]; uVar3 = puVar4[3]; *dstEntry = *puVar4; dstEntry[1] = uVar1; dstEntry[2] = uVar2; dstEntry[3] = uVar3; dstEntry[4] = puVar4[4]; *GHIDRA_CAST((GHIDRA_CAST(this) + 0x10)) = *GHIDRA_CAST((GHIDRA_CAST(this) + 0x10)) + 1; iVar5 = *GHIDRA_CAST((GHIDRA_CAST(this) + 0x10)); } while (offset != endOffset); } ExceptionList = local_1c; return; }