typedef unsigned char undefined; typedef unsigned char byte; typedef unsigned char undefined1; typedef unsigned short undefined2; typedef unsigned int undefined4; typedef unsigned long undefined8; undefined8 FUN_d90041f4(undefined8 param_1) { elr_el3 = param_1; spsr_el3 = 0x1c5; ExceptionReturn(); return 0x1c5; } void FUN_d9004240(undefined8 param_1,undefined4 param_2,undefined8 param_3,int param_4) { int iVar1; undefined8 uVar2; undefined auStack_d0 [208]; iVar1 = 0x100; if (param_4 != 0) { iVar1 = 0xe0; } FUN_d900438c(auStack_d0,iVar1); FUN_d90043cc(auStack_d0,param_1,param_2); uVar2 = FUN_d90044e0(auStack_d0); FUN_d90049d0(param_3,uVar2,iVar1 >> 3); return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d90042b4(undefined8 param_1,uint param_2,undefined8 param_3,char param_4) { undefined local_10 [16]; if ((param_4 == '\0') && ((param_2 & 0x3f) != 0)) { serial_puts(s_Err_sha_d900d2a8); } else { _DAT_c883e018 = 0xf; _DAT_c883e008 = (uint)local_10 | 2; *(uint *)(_DAT_d8fd3938 + 0x20) = *(int *)(_DAT_d8fd3938 + 0x20) + param_2; do { } while (_DAT_c883e018 == 0); } return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d900438c(long param_1,int param_2) { undefined4 uVar1; if (_DAT_d8fd3938 != 0) { serial_puts(s_Err_sha_d900d2a8); return; } uVar1 = 0x100; if (param_2 == 0xe0) { uVar1 = 0xe0; } _DAT_d8fd3938 = param_1; *(undefined4 *)(param_1 + 0x28) = uVar1; *(undefined4 *)(param_1 + 0x20) = 0; *(undefined4 *)(param_1 + 0x24) = 0; return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d90043cc(long param_1,long param_2,uint param_3) { ulong uVar1; uint uVar2; long lVar3; uint uVar4; lVar3 = _DAT_d8fd3938; if (_DAT_d8fd3938 != param_1) { serial_puts(s_Err_sha_d900d2a8); return; } uVar2 = *(uint *)(_DAT_d8fd3938 + 0x24); uVar4 = 0; if (uVar2 != 0) { uVar4 = 0x40 - uVar2; FUN_d90049d0(_DAT_d8fd3938 + (ulong)uVar2 + 0x2c,param_2,uVar4); param_3 = param_3 - uVar4; *(uint *)(lVar3 + 0x24) = *(int *)(lVar3 + 0x24) + uVar4; } if (*(int *)(lVar3 + 0x24) == 0x40) { if (param_3 == 0) { return; } FUN_d90042b4(lVar3 + 0x2c,0x40,lVar3 + 0xac,0); *(undefined4 *)(lVar3 + 0x24) = 0; if (param_3 < 0x41) goto LAB_d90044b8; } else if (param_3 < 0x41) { if (param_3 == 0) { return; } goto LAB_d90044b8; } uVar2 = param_3 & 0x3f; if (uVar2 == 0) { uVar2 = 0x40; } uVar1 = (ulong)uVar4; uVar4 = uVar4 + (param_3 - uVar2); FUN_d90042b4(param_2 + uVar1,param_3 - uVar2,lVar3 + 0xac,0); param_3 = uVar2; LAB_d90044b8: FUN_d90049d0(lVar3 + 0x2c,param_2 + (ulong)uVar4,param_3); *(uint *)(lVar3 + 0x24) = param_3; return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ long FUN_d90044e0(long param_1) { if (_DAT_d8fd3938 == param_1) { param_1 = _DAT_d8fd3938 + 0xac; if (*(int *)(_DAT_d8fd3938 + 0x24) - 1U < 0x40) { FUN_d90042b4(_DAT_d8fd3938 + 0x2c,*(int *)(_DAT_d8fd3938 + 0x24),param_1,1); _DAT_d8fd3938 = 0; } else { serial_puts(s_Err_sha_d900d2a8); } } else { serial_puts(s_Err_sha_d900d2a8); param_1 = param_1 + 0xac; } return param_1; } void FUN_d90046b0(void) { bool bVar1; uint uVar2; undefined8 uVar4; ulong uVar5; ulong uVar6; ulong uVar7; ulong uVar8; ulong uVar9; ulong uVar10; ulong uVar11; uint uVar3; UnkSytemRegWrite(0,3,3,0xf,4,0); uVar6 = clidr_el1; uVar7 = (uVar6 & 0x7000000) >> 0x17; if (uVar7 != 0) { uVar11 = 0; do { if (1 < (uVar6 >> (uVar11 + (uVar11 >> 1) & 0x3f) & 7)) { uVar4 = daif; uVar5 = daif; daif = uVar5 | 0x80; csselr_el1 = uVar11; InstructionSynchronizationBarrier(); uVar5 = ccsidr_el1; daif = uVar4; uVar8 = uVar5 >> 3 & 0x3ff; uVar2 = (uint)uVar8 | (uint)uVar8 >> 1; uVar3 = uVar2 | uVar2 >> 2; uVar2 = uVar3 | uVar3 >> 4 | uVar2 >> 8; uVar2 = ((uVar2 & 0xaaaaaaaa) >> 1) + (uVar2 & 0x55555555); uVar2 = ((uVar2 & 0xcccccccc) >> 2) + (uVar2 & 0x33333333); uVar2 = ((uVar2 & 0xf0f0f0f0) >> 4) + (uVar2 & 0xf0f0f0f); uVar10 = uVar8; uVar9 = uVar5 >> 0xd & 0x7fff; do { do { DC_CISW(uVar11 | uVar10 << ((ulong)(0x20 - ((uVar2 >> 8) + (uVar2 & 0xff00ff))) & 0x3f) | uVar9 << (uVar5 & 7) + 4); bVar1 = 0 < (long)uVar10; uVar10 = uVar10 - 1; } while (bVar1); bVar1 = 0 < (long)uVar9; uVar10 = uVar8; uVar9 = uVar9 - 1; } while (bVar1); } uVar11 = uVar11 + 2; } while ((long)uVar11 < (long)uVar7); } csselr_el1 = 0; UnkSytemRegWrite(0,3,3,0xf,4,0); InstructionSynchronizationBarrier(); return; } void FUN_d900477c(void) { IC_IALLUIS(); InstructionSynchronizationBarrier(); TLBI_ALLE3(); return; } ulong FUN_d900478c(void) { ulong uVar1; uVar1 = sctlr_el3; sctlr_el3 = uVar1 & 0xffffffffffffeffb; DataMemoryBarrier(3,3); UnkSytemRegWrite(0,3,3,0xf,4,0); InstructionSynchronizationBarrier(); return uVar1 & 0xffffffffffffeffb; } ulong FUN_d90047ac(void) { ulong uVar1; uVar1 = sctlr_el3; sctlr_el3 = uVar1 | 0x1004; DataMemoryBarrier(3,3); UnkSytemRegWrite(0,3,3,0xf,4,0); InstructionSynchronizationBarrier(); return uVar1 | 0x1004; } void serial_puts(char *param_1) { for (; *param_1 != '\0'; param_1 = param_1 + 1) { if (*param_1 == '\n') { serial_putc(0xd); } serial_putc(*param_1); } return; } void FUN_d900480c(uint param_1) { uint uVar1; int iVar2; uint uVar3; serial_putc(0x30); serial_putc(0x78); uVar3 = 0x1c; do { uVar1 = param_1 >> (ulong)(uVar3 & 0x1f) & 0xf; iVar2 = uVar1 + 0x37; if (uVar1 < 10) { iVar2 = uVar1 + 0x30; } serial_putc(iVar2); uVar3 = uVar3 - 4; } while (uVar3 != 0xfffffffc); return; } void FUN_d9004864(long param_1,int param_2) { char cVar1; byte bVar2; uint uVar3; for (uVar3 = 0; (int)uVar3 < param_2; uVar3 = uVar3 + 1 & 0xffff) { bVar2 = *(byte *)(param_1 + (ulong)(ushort)uVar3) >> 4; cVar1 = bVar2 + 0x37; if (bVar2 < 10) { cVar1 = bVar2 + 0x30; } serial_putc(cVar1); bVar2 = *(byte *)(param_1 + (ulong)(ushort)uVar3) & 0xf; cVar1 = bVar2 + 0x37; if (bVar2 < 10) { cVar1 = bVar2 + 0x30; } serial_putc(cVar1); } return; } void FUN_d90048e4(uint param_1) { uint uVar1; char *pcVar2; char *pcVar3; char acStack_4 [4]; pcVar2 = acStack_4 + 2; do { pcVar3 = pcVar2; uVar1 = param_1 / 10; *pcVar3 = (char)param_1 + (char)uVar1 * -10 + '0'; pcVar2 = pcVar3 + -1; param_1 = uVar1; } while (uVar1 != 0); for (; pcVar3 < acStack_4 + 3; pcVar3 = pcVar3 + 1) { serial_putc(*pcVar3); } return; } byte FUN_d900495c(long param_1,long param_2,long param_3) { byte bVar1; long lVar2; bVar1 = 0; for (lVar2 = 0; lVar2 != param_3; lVar2 = lVar2 + 1) { bVar1 = bVar1 | *(byte *)(param_2 + lVar2) ^ *(byte *)(param_1 + lVar2); } return bVar1; } uint FUN_d9004990(long param_1,long param_2,long param_3) { long lVar1; uint uVar2; uVar2 = 0; for (lVar1 = 0; lVar1 != param_3; lVar1 = lVar1 + 1) { uVar2 = uVar2 | *(byte *)(param_2 + lVar1) ^ *(byte *)(param_1 + lVar1); } if (uVar2 == 0) { uVar2 = 0x3c5a69c3; } return uVar2; } void FUN_d90049d0(undefined4 *param_1,undefined4 *param_2,long param_3) { undefined4 *puVar1; undefined4 *puVar2; undefined4 *puVar3; long lVar4; puVar1 = (undefined4 *)((long)param_1 + param_3); puVar3 = puVar1; if (((((ulong)param_2 ^ (ulong)param_1) & 3) == 0) && (puVar2 = (undefined4 *)((long)param_1 + 3U & 0xfffffffffffffffc), puVar2 <= puVar1)) { puVar3 = puVar2; } for (; param_1 < puVar3; param_1 = (undefined4 *)((long)param_1 + 1)) { *(undefined *)param_1 = *(undefined *)param_2; param_2 = (undefined4 *)((long)param_2 + 1); } for (; param_1 < (undefined4 *)((ulong)puVar1 & 0xfffffffffffffffc); param_1 = param_1 + 1) { *param_1 = *param_2; param_2 = param_2 + 1; } for (lVar4 = 0; (undefined4 *)((long)param_1 + lVar4) < puVar1; lVar4 = lVar4 + 1) { *(undefined *)((long)param_1 + lVar4) = *(undefined *)((long)param_2 + lVar4); } return; } void FUN_d9004a48(uint *param_1,byte param_2,long param_3) { uint *puVar1; uint *puVar2; uint *puVar3; puVar1 = (uint *)((long)param_1 + param_3); puVar3 = (uint *)((long)param_1 + 3U & 0xfffffffffffffffc); puVar2 = puVar1; if (puVar3 <= puVar1) { puVar2 = puVar3; } for (; param_1 < puVar2; param_1 = (uint *)((long)param_1 + 1)) { *(byte *)param_1 = param_2; } for (; param_1 < (uint *)((ulong)puVar1 & 0xfffffffffffffffc); param_1 = param_1 + 1) { *param_1 = (uint)param_2 << 0x10 | (uint)param_2 << 8 | (uint)param_2 | (uint)param_2 << 0x18; } for (; param_1 < puVar1; param_1 = (uint *)((long)param_1 + 1)) { *(byte *)param_1 = param_2; } return; } void FUN_d9004aac(long param_1,long param_2,int param_3) { long lVar1; if (0 < param_3) { for (lVar1 = 0; (param_3 - (int)lVar1 != 1 && (*(char *)(param_2 + lVar1) != '\0')); lVar1 = lVar1 + 1) { *(char *)(param_1 + lVar1) = *(char *)(param_2 + lVar1); } *(undefined *)(param_1 + lVar1) = 0; } return; } byte FUN_d9004ae8(int param_1) { undefined4 local_10; local_10 = 0; FUN_d900554c(&local_10); if (param_1 == 1) { } else { if (param_1 == 0) { return local_10._1_1_ >> 3 & 1; } if (param_1 != 2) { return 0; } local_10._0_1_ = local_10._2_1_; } return (byte)local_10 >> 1 & 1; } undefined8 FUN_d9004b44(long param_1,ulong param_2,uint param_3) { bool bVar1; undefined4 uVar2; int iVar3; long lVar4; uint uVar5; undefined auStack_70 [28]; uint auStack_54 [5]; undefined auStack_40 [32]; undefined auStack_20 [32]; param_2 = param_2 & 0xffffffff; iVar3 = FUN_d9004ae8(param_3); if (iVar3 == 0) { return 1; } if (param_1 == 0) { return 0; } bVar1 = 0xf < (int)param_2 - 1U; if (bVar1) { return 0; } if (3 < param_3) { return 0; } FUN_d9004a48(auStack_20,0,0x1c); FUN_d90049d0(auStack_54,param_1); lVar4 = FUN_d9005514(); *(uint *)((long)auStack_54 + param_2) = (uint)bVar1; if (lVar4 != 0) { if (param_3 < 2) { uVar2 = *(undefined4 *)(lVar4 + 0x9c); } else { if (param_3 != 2) goto LAB_d9004bf0; uVar2 = *(undefined4 *)(lVar4 + 0xbc); } *(undefined4 *)((long)auStack_54 + param_2) = uVar2; } LAB_d9004bf0: iVar3 = 0x21; while (iVar3 = iVar3 + -1, iVar3 != 0) { FUN_d90049d0(auStack_70,auStack_20,0x1c); FUN_d9004240(auStack_70,(int)param_2 + 0x20,auStack_20,1); } lVar4 = FUN_d9005514(); if (lVar4 != 0) { if (param_3 < 2) { lVar4 = lVar4 + 0x80; } else { if (param_3 != 2) goto LAB_d9004c60; lVar4 = lVar4 + 0xa0; } FUN_d90049d0(auStack_40,lVar4,0x1c); } LAB_d9004c60: iVar3 = FUN_d900495c(auStack_40,auStack_20,0x1c); if (iVar3 != 0) { if (param_3 == 0) { DAT_d8fd380c = DAT_d8fd380c + 1; uVar5 = (uint)DAT_d8fd380c; } else if (param_3 == 1) { DAT_d8fd380d = DAT_d8fd380d + 1; uVar5 = (uint)DAT_d8fd380d; } else { DAT_d8fd380e = DAT_d8fd380e + 1; uVar5 = (uint)DAT_d8fd380e; } for (iVar3 = 0; iVar3 < 1 << (ulong)(uVar5 - 1 & 0x1f); iVar3 = iVar3 + 1) { FUN_d9004fb8(); FUN_d9004f44(1000000); } if (2 < uVar5) { serial_puts(s_auth_failed__reboot____d900d0b2); FUN_d9004fec(); } return 0; } if (param_3 == 0) { DAT_d8fd380c = 0; } else if (param_3 == 1) { DAT_d8fd380d = 0; } else { DAT_d8fd380e = 0; } return 1; } void FUN_d9004d50(long param_1) { undefined *puVar1; char cVar2; long lVar3; lVar3 = 0; do { puVar1 = (undefined *)(param_1 + lVar3); lVar3 = lVar3 + 1; serial_putc(*puVar1); } while (lVar3 != 5); cVar2 = *(char *)(param_1 + 0xe); if (cVar2 != '+') { cVar2 = *(char *)(param_1 + 5); } serial_putc(cVar2); return; } void FUN_d9004d94(void) { long lVar1; lVar1 = FUN_d9005514(); if (lVar1 != 0) { FUN_d9004aac(lVar1 + 0xf0,s_9ac50ebe6991987_d900d0cc,0x10); return; } return; } void FUN_d9004dc4(void) { long lVar1; lVar1 = FUN_d9005514(); FUN_d9004d50(s_9ac50ebe6991987_d900d118); serial_putc(0x3a); if (lVar1 != 0) { FUN_d9004d50(lVar1 + 0xe0); } serial_putc(0x3b); return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ uint serial_putc(uint c) { undefined *efuse_data; efuse_data = get_efuse_data(); if (((byte)efuse_data[5] >> 1 & 1) != 0) { c = L'.'; } do { } while ((_DAT_c81004cc >> 0x15 & 1) != 0); _UART_WFIFO_c81004c0 = c & 0xff; return c; } undefined8 FUN_d9004e60(char *param_1) { for (; *param_1 != '\0'; param_1 = param_1 + 1) { serial_putc(); } return 1; } undefined8 FUN_d9004e94(char *param_1,int param_2,char param_3) { uint uVar1; int iVar2; uint uVar3; for (; *param_1 != '\0'; param_1 = param_1 + 1) { serial_putc(); } serial_putc(0x3a); uVar3 = 7; do { if ((param_2 >> ((uVar3 & 7) << 2) & 0xfU) != 0) break; uVar3 = uVar3 - 1; } while (uVar3 != 0); do { uVar1 = param_2 >> ((uVar3 & 7) << 2) & 0xf; iVar2 = uVar1 + 0x37; if (uVar1 < 10) { iVar2 = uVar1 + 0x30; } serial_putc(iVar2); uVar3 = uVar3 - 1; } while (uVar3 != 0xffffffff); if (param_3 != '\0') { serial_putc(param_3); } return 1; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined4 FUN_d9004f34(void) { return _DAT_c1109988; } /* WARNING: Removing unreachable block (ram,0xd9004f68) */ void FUN_d9004f44(void) { /* WARNING: Do nothing block with infinite loop */ do { } while( true ); } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d9004f6c(undefined4 param_1) { _DAT_c11098d8 = param_1; _DAT_c11098dc = 0; _DAT_c11098d0 = 0x3245dbf; return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d9004fb8(void) { _DAT_c11098dc = 0; return; } void FUN_d9004fec(void) { int iVar1; do { iVar1 = 100; do { iVar1 = iVar1 + -1; } while (iVar1 != 0); } while( true ); } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d9005044(void) { _DAT_c883443c = _DAT_c883443c & 0xffbfffff; FUN_d9004f44(3); return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d9005068(void) { _DAT_c883443c = _DAT_c883443c | 0x400000; FUN_d9004f44(3); return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d900508c(byte param_1) { if ((_DAT_c883443c >> 0x15 & 1) != (uint)param_1) { _DAT_c883443c = _DAT_c883443c ^ 0x200000; } FUN_d9004f44(3); return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ uint FUN_d90050bc(void) { return _DAT_c8834444 >> 0x15 & 1; } void FUN_d90050d0(void) { FUN_d9005068(); FUN_d900508c(1); FUN_d900508c(0); return; } void FUN_d90050f0(void) { FUN_d9005044(); FUN_d9005068(); FUN_d900508c(0); FUN_d900508c(1); return; } void FUN_d9005114(undefined param_1) { FUN_d9005044(); FUN_d900508c(param_1); FUN_d9005068(); FUN_d90050bc(); return; } char FUN_d9005140(byte param_1) { char cVar1; uint uVar2; char cVar3; uVar2 = 7; cVar3 = '\0'; do { cVar1 = FUN_d9005114((int)(uint)param_1 >> (uVar2 & 0x1f) & 1); uVar2 = uVar2 - 1; cVar3 = cVar3 * '\x02' + cVar1; } while (uVar2 != 0xffffffff); return cVar3; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined4 FUN_d9005194(byte param_1) { char cVar1; undefined uVar2; long lVar3; undefined local_10 [8]; undefined local_8; _DAT_c88344c8 = _DAT_c88344c8 & 0x9fffffff; FUN_d90050d0(); FUN_d9005140(param_1); cVar1 = FUN_d9005114(1); if (cVar1 == '\0') { FUN_d9005140(0xfffffff8); cVar1 = FUN_d9005114(1); if (cVar1 == '\0') { FUN_d90050f0(); FUN_d90050d0(); FUN_d9005140(param_1 | 1); cVar1 = FUN_d9005114(1); if (cVar1 == '\0') { lVar3 = 0; do { uVar2 = FUN_d9005140(0xffffffff); local_10[lVar3] = uVar2; FUN_d9005114(((uint)lVar3 & 0xff) == 7); lVar3 = lVar3 + 1; } while (lVar3 != 8); FUN_d90050f0(); local_8 = 0; cVar1 = FUN_d900495c(local_10,s_boot_USB_d900d1a8,8); if (cVar1 == '\0') { return 1; } cVar1 = FUN_d900495c(local_10,s_boot_SDC_d900d1b1,8); if (cVar1 != '\0') { return 0; } return 2; } } } return 0; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d9005308(void) { uint uVar1; undefined *puVar2; puVar2 = get_efuse_data(); if ((puVar2[6] & 1) == 0) { uVar1 = 0xb313; } else { uVar1 = 0xa949; } _DAT_c1108c88 = uVar1 | 0x2a0000; return; } undefined8 FUN_d9005340(uint param_1,undefined4 param_2,undefined4 param_3) { FUN_d90049d0(param_2,param_1 | 0xcc000000,param_3); return 0; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d900536c(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4, uint3 param_5) { undefined4 local_30; undefined4 local_2c; undefined4 local_28; undefined4 local_24; undefined4 local_20; undefined4 local_1c; undefined4 local_18; undefined4 local_14; undefined4 local_10; local_18 = CONCAT13(0x84,param_5 & 0x1ffff | 0xa40000); local_28 = 0; local_30 = 0x80100020; local_1c = 0x20; local_24 = 0x80100010; local_2c = param_1; local_20 = param_2; local_14 = param_3; local_10 = param_4; FUN_d90046b0(); _DAT_c883e018 = 0xf; _DAT_c883e008 = (uint)&local_30 | 2; return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d9005434(void) { undefined local_20 [32]; _DAT_c883e018 = 0xf; _DAT_c883e008 = (uint)local_20 | 2; return; } void FUN_d90054cc(undefined8 param_1,undefined8 param_2,undefined4 param_3) { long lVar1; lVar1 = FUN_d9005514(); FUN_d9005434(lVar1 + 0x70,param_1,param_2,param_3); return; } /* WARNING: Unknown calling convention -- yet parameter storage is locked */ undefined * get_efuse_data(void) { return &DAT_d9013c00; } undefined * FUN_d9005514(void) { return &DAT_d9013c00; } undefined8 FUN_d9005520(void) { FUN_d90049d0(&DAT_d900d400,&DAT_d9013c24,0xc); return 0; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined8 FUN_d900554c(undefined4 *param_1) { *param_1 = _DAT_c8100228; return 0; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d9005594(void) { _DAT_c9100004 = 0xffffffff; _DAT_c9100014 = 0xffffffff; _DAT_c9100018 = 0xf0000816; return; } int FUN_d90055c8(void) { int iVar1; int iVar2; iVar1 = FUN_d90064f4(); iVar2 = FUN_d9006528(); return iVar1 + iVar2; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d90055f0(void) { int iVar1; iVar1 = 0x186a1; do { FUN_d9004f44(10); iVar1 = iVar1 + -1; if (iVar1 == 0) { return; } } while (-1 < (int)_DAT_c9100010); _DAT_c9100010 = _DAT_c9100010 | 1; iVar1 = 0xf4241; do { iVar1 = iVar1 + -1; } while (iVar1 != 0); FUN_d9004f44(1000); return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d9005670(uint param_1) { int iVar1; _DAT_c9100010 = (param_1 & 0x1f) << 6 | 0x20; iVar1 = 0x2711; do { iVar1 = iVar1 + -1; } while (iVar1 != 0); FUN_d9004f44(1); return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d90056a8(void) { int *piVar1; int iVar2; int *piVar3; FUN_d90055f0(); _DAT_c910000c = _DAT_c910000c & 0xdffffcaf | 0x40000000; FUN_d90055f0(); _DAT_c9100008 = 0; FUN_d9005594(); if ((_DAT_c9100014 & 1) == 0) { _DAT_c9100800 = _DAT_c9100800 & 0xffffe7fc; _DAT_c9100024 = 0x100; _DAT_c9100028 = 0x1000100; _DAT_c9100e00 = _DAT_c9100014 & 1; FUN_d9005670(0x10); _DAT_c9100010 = 0x10; iVar2 = 0x2711; do { iVar2 = iVar2 + -1; } while (iVar2 != 0); FUN_d9004f44(1); _DAT_c9100010 = 8; _DAT_c9100810 = 0; _DAT_c9100814 = 0; _DAT_c9100818 = 0xffffffff; _DAT_c910081c = 0; piVar3 = (int *)&DAT_c9100900; do { piVar1 = piVar3 + 8; iVar2 = 0; if (*piVar3 < 0) { iVar2 = 0x48000000; } *piVar3 = iVar2; iVar2 = 0; if (piVar3[0x80] < 0) { iVar2 = 0x48000000; } piVar3[0x80] = iVar2; piVar3[4] = 0; piVar3[0x84] = 0; piVar3[5] = 0; piVar3[0x85] = 0; piVar3 = piVar1; } while (piVar1 != (int *)0xc9100980); _DAT_c9100018 = 0; _DAT_c9100014 = 0xffffffff; FUN_d9005594(); _DAT_c9100018 = _DAT_c9100018 | 0xe3800; } return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined8 FUN_d9005878(void) { undefined8 uVar1; if ((_DAT_c9100040 & 0xfffff000) == 0x4f543000) { _DAT_c9100008 = _DAT_c9100008 & 0xfffffffe; FUN_d90056a8(); _DAT_c9100804 = _DAT_c9100804 & 0xfffffffd; _DAT_c9100008 = _DAT_c9100008 | 1; uVar1 = 0; } else { uVar1 = 0xffffffff; } return uVar1; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d9005928(byte *param_1) { uint uVar1; byte bVar2; uint uVar3; uint uVar4; int iVar5; uint uVar6; uVar4 = *(uint *)(param_1 + 0x18) & 0x7ffff; bVar2 = param_1[1]; *(uint *)(param_1 + 0x20) = *(uint *)(param_1 + 0x20) & 0xfff80000 | *(uint *)(param_1 + 0x18) & 0x7ffff; uVar6 = *(ushort *)(param_1 + 2) >> 4 & 0x7ff; if ((bVar2 & 1) == 0) { iVar5 = *param_1 + 0x58; } else { iVar5 = *param_1 + 0x48; } iVar5 = iVar5 * 0x20; uVar1 = *(uint *)((long)(iVar5 + 0x10) + 0xc9100000); if (uVar4 == 0) { if ((bVar2 & 1) != 0) { uVar6 = 0; } uVar6 = uVar1 & 0xe0000000 | uVar6 | 0x80000; } else { uVar3 = 0; if ((*(ushort *)(param_1 + 2) >> 4 & 0x7ff) != 0) { uVar3 = (int)(uVar4 + (uVar6 - 1)) / (int)uVar6; } if (((bVar2 & 1) == 0) || (uVar6 <= uVar4)) { uVar4 = uVar4 - (*(uint *)(param_1 + 0x1c) & 0x7ffff); } uVar6 = uVar1 & 0xe0000000 | (uVar3 & 0x3ff) << 0x13 | uVar4 & 0x7ffff; } *(uint *)((long)(iVar5 + 0x10) + 0xc9100000) = uVar6; *(uint *)((long)iVar5 + 0xc9100000) = *(uint *)((long)iVar5 + 0xc9100000) | 0x84000000; if ((bVar2 & 1) != 0) { _DAT_c9100014 = _DAT_c9100014 & 0xffffffdf; _DAT_c9100018 = _DAT_c9100018 | 0x20; } return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined8 FUN_d9005a14(long param_1,uint param_2) { int iVar1; uint uVar2; byte bVar3; uint uVar4; long lVar5; lVar5 = (long)(int)param_2 * 0x28; *(char *)(lVar5 + 0xd8fd3858) = (char)param_2; if (param_2 == 0) { if (*(int *)(param_1 + 8) != 2) { if (*(int *)(param_1 + 8) != 3) { return 0xffffffff; } if (((*(byte *)(param_1 + 0x3a) & 1) != 0) || (*(int *)(param_1 + 0x18) == 0)) { (&DAT_d8fd3859)[lVar5] = (&DAT_d8fd3859)[lVar5] | 1; *(undefined4 *)(param_1 + 8) = 4; } } *(undefined8 *)(&DAT_d8fd3860 + lVar5) = *(undefined8 *)(param_1 + 0x10); *(undefined8 *)(&DAT_d8fd3868 + lVar5) = *(undefined8 *)(param_1 + 0x10); uVar4 = *(uint *)(param_1 + 0x18) & 0x7ffff; *(uint *)(&DAT_d8fd3870 + lVar5) = *(uint *)(&DAT_d8fd3870 + lVar5) & 0xfff80000 | uVar4; uVar2 = *(uint *)(&DAT_d8fd3874 + lVar5); *(uint *)(&DAT_d8fd3874 + lVar5) = uVar2 & 0xfff80000; (&DAT_d8fd3876)[lVar5] = (byte)((uVar2 & 0xfff80000) >> 0x10) & 0xf7; *(uint *)(&DAT_d8fd3878 + lVar5) = *(uint *)(&DAT_d8fd3878 + lVar5) & 0xfff80000 | uVar4; (&DAT_d8fd385a)[lVar5] = (&DAT_d8fd385a)[lVar5] & 0xf; *(byte *)(lVar5 + 0xd8fd385b) = *(byte *)(lVar5 + 0xd8fd385b) & 0x80 | 4; } else { *(undefined8 *)(&DAT_d8fd3860 + lVar5) = *(undefined8 *)(param_1 + 0x20); *(undefined8 *)(&DAT_d8fd3868 + lVar5) = *(undefined8 *)(param_1 + 0x20); uVar4 = *(uint *)(param_1 + 0x28); if ((int)*(uint *)(param_1 + 0x30) < (int)*(uint *)(param_1 + 0x28)) { uVar4 = *(uint *)(param_1 + 0x30); } *(uint *)(&DAT_d8fd3870 + lVar5) = *(uint *)(&DAT_d8fd3870 + lVar5) & 0xfff80000 | uVar4 & 0x7ffff; uVar2 = *(uint *)(&DAT_d8fd3874 + lVar5); *(uint *)(&DAT_d8fd3874 + lVar5) = uVar2 & 0xfff80000; (&DAT_d8fd3876)[lVar5] = (byte)((uVar2 & 0xfff80000) >> 0x10) & 0xf7; *(uint *)(&DAT_d8fd3878 + lVar5) = *(uint *)(&DAT_d8fd3878 + lVar5) & 0xfff80000 | uVar4 & 0x7ffff; bVar3 = (&DAT_d8fd3859)[lVar5]; (&DAT_d8fd385a)[lVar5] = (&DAT_d8fd385a)[lVar5] & 0xf; *(byte *)(lVar5 + 0xd8fd385b) = *(byte *)(lVar5 + 0xd8fd385b) & 0x80 | 0x20; (&DAT_d8fd3859)[lVar5] = bVar3 & 0xfe | param_2 == 1; if (param_2 == 1) { iVar1 = (param_2 & 0xff) + 0x48; uVar4 = 2; } else { iVar1 = (param_2 & 0xff) + 0x58; uVar4 = 0x40000; } uVar2 = *(uint *)((long)(iVar1 * 0x20) + 0xc9100000); if ((uVar2 >> 0xf & 1) == 0) { *(uint *)((long)(iVar1 * 0x20) + 0xc9100000) = uVar2 & 0xfc300000 | uVar2 & 0x3f800 | 0x80200 | 0x10008000; } _DAT_c910081c = uVar4 | _DAT_c910081c; } FUN_d9005928(); return 0; } void FUN_d9005bec(void) { return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d9005bf0(void) { _DAT_c9100b10 = 0x60080018; _DAT_c9100b00 = 0x80008000; return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d9005c30(int *param_1) { if (*param_1 != 5) { *param_1 = 4; _DAT_d8fd3870 = _DAT_d8fd3870 & 0xfff80000; _DAT_d8fd3874 = _DAT_d8fd3874 & 0xfff80000; DAT_d8fd3859 = DAT_d8fd3859 | 1; FUN_d9005928(); FUN_d9005bf0(); return; } return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined8 FUN_d9005c8c(void) { if (_DAT_d8fd3900 == 4) { _DAT_d8fd3860 = 0; _DAT_d8fd3870 = _DAT_d8fd3870 & 0xfff80000; _DAT_d8fd3868 = 0; } else { if ((_DAT_d8fd3870 & 0x7ffff) != 0) { if ((DAT_d8fd3859 & 1) == 0) { FUN_d9005c30(&DAT_d8fd3900); } else if (((_DAT_c9100910 & 0x7f) == 0) && (_DAT_d8fd3900 != 5)) { _DAT_d8fd3900 = 4; _DAT_d8fd3870 = _DAT_d8fd3870 & 0xfff80000; DAT_d8fd3859 = DAT_d8fd3859 & 0xfe; _DAT_d8fd3874 = _DAT_d8fd3874 & 0xfff80000; FUN_d9005928(); FUN_d9005bf0(); } return 0; } _DAT_d8fd3874 = (uint)((ushort)(_DAT_d8fd3874 >> 0x10) & 0xfff8 | 8) << 0x10; FUN_d9005928(); } return 1; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d9005d68(void) { int iVar1; undefined8 local_10; switch(_DAT_d8fd3900) { case 1: local_10 = _DAT_d8fd38f8; if ((DAT_d8fd3932 >> 1 & 1) == 0) { DAT_d8fd3932 = DAT_d8fd3932 & 0xfe; return; } DAT_d8fd3932 = DAT_d8fd3932 & 0xfe; iVar1 = FUN_d900c450(&DAT_d8fd38f8,&local_10); if (iVar1 == 0) { _DAT_d8fd3904 = 0; DAT_d8fd3932 = DAT_d8fd3932 & 0xfd; if ((char)local_10 < '\0') { DAT_d8fd3859 = DAT_d8fd3859 | 1; _DAT_d8fd3900 = 2; } else { DAT_d8fd3859 = DAT_d8fd3859 & 0xfe; _DAT_d8fd3900 = 3; } if ((local_10 & 0x60) == 0) { switch(local_10._1_1_) { case 0: _DAT_d8fd3908 = &DAT_d8fd3904; _DAT_d8fd3904 = 0; _DAT_d8fd3910 = 2; break; case 5: if ((char)local_10 != '\0') { _DAT_d8fd3904 = 0; return; } _DAT_c9100800 = (local_10._2_2_ & 0x7f) << 4 | _DAT_c9100800; FUN_d9005c30(&DAT_d8fd3900); return; case 9: case 0xb: DAT_d8fd3932 = DAT_d8fd3932 | 1; default: FUN_d900c634(&DAT_d8fd38f8,&local_10); } } else { FUN_d900c820(&DAT_d8fd38f8,&local_10); } FUN_d9005a14(&DAT_d8fd38f8,0); return; } goto LAB_d9005f24; case 2: if ((_DAT_d8fd3878 & 0x7ffff) <= (_DAT_d8fd3874 & 0x7ffff)) { FUN_d9005c8c(); } break; case 3: FUN_d9005c8c(); iVar1 = FUN_d900c4b4(&DAT_d8fd38f8,&DAT_d8fd38f8); if (iVar1 == 0) { FUN_d900839c(&DAT_d8fd38f8,&DAT_d8fd38f8); return; } LAB_d9005f24: FUN_d900c410(1); break; case 4: FUN_d9005c8c(); _DAT_d8fd3900 = 1; DAT_d8fd3859 = DAT_d8fd3859 & 0xfe | 4; } return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d9005f74(ulong param_1,ushort param_2) { ulong uVar1; uint uVar2; uVar1 = param_1 & 3; if (uVar1 == 0) { for (; (int)uVar1 < (int)(uint)param_2; uVar1 = uVar1 + 4) { *(uint *)(param_1 + uVar1) = _DAT_c9101000; } } else { uVar2 = 0; for (uVar1 = 0; (int)uVar1 < (int)(uint)param_2; uVar1 = uVar1 + 1) { if ((uVar1 & 3) == 0) { uVar2 = _DAT_c9101000; } *(char *)(param_1 + uVar1) = (char)uVar2; uVar2 = uVar2 >> 8; } } return; } void FUN_d9005fd8(byte *param_1) { byte *pbVar1; byte *pbVar2; byte *pbVar3; uint uVar4; byte bVar5; byte bVar6; byte *pbVar7; uint uVar8; pbVar7 = *(byte **)(param_1 + 0x10); if ((*(uint *)(param_1 + 0x1c) & 0x7ffff) < (*(uint *)(param_1 + 0x18) & 0x7ffff)) { uVar8 = (*(uint *)(param_1 + 0x18) & 0x7ffff) - (*(uint *)(param_1 + 0x1c) & 0x7ffff); bVar5 = *param_1; uVar4 = *(ushort *)(param_1 + 2) >> 4 & 0x7ff; if ((int)uVar8 < (int)uVar4) { uVar4 = uVar8; } for (uVar8 = 0; uVar8 != uVar4 + 3 >> 2; uVar8 = uVar8 + 1) { pbVar1 = pbVar7 + 2; pbVar2 = pbVar7 + 1; bVar6 = *pbVar7; pbVar3 = pbVar7 + 3; pbVar7 = pbVar7 + 4; *(uint *)((long)(int)((bVar5 + 1) * 0x1000) + 0xc9100000) = (uint)*pbVar1 << 0x10 | (uint)*pbVar2 << 8 | (uint)bVar6 | (uint)*pbVar3 << 0x18; } *(uint *)(param_1 + 0x1c) = *(uint *)(param_1 + 0x1c) & 0xfff80000 | uVar4 + (*(uint *)(param_1 + 0x1c) & 0x7ffff) & 0x7ffff; *(ulong *)(param_1 + 0x10) = *(long *)(param_1 + 0x10) + (ulong)uVar4; } return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d9006084(undefined4 *param_1) { *param_1 = _DAT_c9101000; param_1[1] = _DAT_c9101000; return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined8 FUN_d90060a8(void) { uint uVar1; uint uVar2; long lVar3; ulong uVar4; uVar2 = _DAT_c9100020; _DAT_c9100018 = _DAT_c9100018 & 0xffffffef; if ((_DAT_c9100020 & 0xf) == 0) { lVar3 = 0xd8fd3858; } else { lVar3 = (long)(int)(_DAT_c9100020 & 0xf) * 0x28 + 0xd8fd3858; } uVar1 = _DAT_c9100020 >> 0x11 & 0xf; if (uVar1 == 2) { uVar4 = (ulong)(_DAT_c9100020 >> 4) & 0x7ff; if (((int)uVar4 != 0) && (*(long *)(lVar3 + 0x10) != 0)) { FUN_d9005f74(*(long *)(lVar3 + 0x10),uVar4); *(uint *)(lVar3 + 0x1c) = *(uint *)(lVar3 + 0x1c) & 0xfff80000 | (*(uint *)(lVar3 + 0x1c) & 0x7ffff) + (int)uVar4 & 0x7ffff; *(ulong *)(lVar3 + 0x10) = *(long *)(lVar3 + 0x10) + uVar4; } } else if (uVar1 == 6) { FUN_d9006084(&DAT_d8fd38f8); DAT_d8fd3932 = DAT_d8fd3932 | 2; *(uint *)(lVar3 + 0x1c) = *(uint *)(lVar3 + 0x1c) & 0xfff80000 | (*(uint *)(lVar3 + 0x1c) & 0x7ffff) + (uVar2 >> 4 & 0x7ff) & 0x7ffff; } _DAT_c9100018 = _DAT_c9100018 | 0x10; _DAT_c9100014 = 0x10; return 1; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined8 FUN_d90061d0(void) { long lVar1; uint uVar2; uint uVar3; long lVar4; int iVar5; lVar4 = 0; do { lVar1 = lVar4 * 0x28; if (((((int)lVar4 == 0) || (((&DAT_d8fd3859)[lVar1] & 1) != 0)) && (*(int *)((lVar4 + 0x6488048) * 0x20) < 0)) && ((((&DAT_d8fd385a)[lVar1] & 3) != 3 || ((*(uint *)(&DAT_d8fd3870 + lVar1) & 0x7ffff) != 0)))) { uVar2 = (*(uint *)(&DAT_d8fd3870 + lVar1) & 0x7ffff) - (*(uint *)(&DAT_d8fd3874 + lVar1) & 0x7ffff); uVar3 = *(ushort *)(&DAT_d8fd385a + lVar1) >> 4 & 0x7ff; if (uVar3 < uVar2) { uVar2 = uVar3; } while ((*(uint *)(&DAT_d8fd3874 + lVar1) & 0x7ffff) < (*(uint *)(&DAT_d8fd3870 + lVar1) & 0x7ffff)) { iVar5 = 1000; while( true ) { iVar5 = iVar5 + -1; if (iVar5 == -1) goto LAB_d9006204; if (((_DAT_c910002c >> 0x10 & 0xff) != 0) && (uVar2 + 3 >> 2 < (_DAT_c910002c & 0xffff))) break; FUN_d9004f44(100); } if (iVar5 == 0) break; FUN_d9005fd8(lVar1 + 0xd8fd3858); uVar2 = (*(uint *)(&DAT_d8fd3870 + lVar1) & 0x7ffff) - (*(uint *)(&DAT_d8fd3874 + lVar1) & 0x7ffff); uVar3 = *(ushort *)(&DAT_d8fd385a + lVar1) >> 4 & 0x7ff; if (uVar3 < uVar2) { uVar2 = uVar3; } } } LAB_d9006204: lVar4 = lVar4 + 1; if (lVar4 == 4) { _DAT_c9100014 = 0x20; return 1; } } while( true ); } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d900632c(void) { _DAT_c9100900 = _DAT_c9100900 & 0xfffff800; _DAT_c9100b00 = _DAT_c9100b00 | 0x80000000; _DAT_c9100804 = _DAT_c9100804 | 0x100; _DAT_d8fd3900 = 1; _DAT_c910000c = _DAT_c910000c & 0xffffc000 | _DAT_c910000c & 0x3ff | 0x1400; _DAT_c9100014 = 0x2000; return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined8 FUN_d90063c0(void) { int *piVar1; _DAT_c9100804 = _DAT_c9100804 & 0xfffffffe; piVar1 = (int *)&DAT_c9100900; do { if (*piVar1 < 0) { *piVar1 = 0x48000000; } piVar1 = piVar1 + 8; } while (piVar1 != (int *)0xc9100980); _DAT_c9100b00 = 0x8000000; _DAT_c9100b20 = 0x8000000; _DAT_c9100b40 = 0x8000000; _DAT_c9100b60 = 0x8000000; FUN_d9005670(0); _DAT_c9100010 = 8; _DAT_c910081c = 0x10001; _DAT_c9100814 = 0xf; _DAT_c9100810 = 0xf; _DAT_c9100800 = _DAT_c9100800 & 0xfffff80f; FUN_d9005bf0(); _DAT_c9100014 = 0x1000; return 1; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined8 FUN_d90064c4(void) { FUN_d900c420(800000); _DAT_c9100014 = 0x800; return 1; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined4 FUN_d90064f4(void) { undefined4 uVar1; uVar1 = 0; if ((_DAT_c9100004 != 0) && (uVar1 = 0xb, (_DAT_c9100004 >> 2 & 1) == 0)) { uVar1 = 0; } return uVar1; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined8 FUN_d9006528(void) { uint uVar1; long lVar2; uint uVar3; uint uVar4; int iVar5; uint uVar6; ulong uVar7; uVar4 = _DAT_c9100018; uVar3 = _DAT_c9100014; if ((_DAT_c9100014 >> 3 & 1) != 0) { FUN_d900c420(5000000); } uVar3 = uVar3 & uVar4; uVar4 = _DAT_c9100014; if (uVar3 != 0) { if ((uVar3 >> 4 & 1) != 0) { FUN_d90060a8(); } if ((uVar3 >> 5 & 1) != 0) { FUN_d90061d0(); } if ((uVar3 >> 0xc & 1) != 0) { FUN_d90063c0(); } if ((uVar3 >> 0xb & 1) != 0) { FUN_d90064c4(); } if ((uVar3 >> 0xd & 1) != 0) { FUN_d900632c(); } if ((uVar3 >> 0x12 & 1) != 0) { uVar6 = _DAT_c9100818 & _DAT_c910081c; _DAT_c9100014 = 0x40000; _DAT_c9100818 = 0xffff; uVar7 = 0x908; uVar4 = 0; for (uVar6 = uVar6 & 0xffff; uVar6 != 0; uVar6 = uVar6 >> 1) { if ((uVar6 & 1) != 0) { uVar1 = *(uint *)(uVar7 + 0xc9100000) & _DAT_c910081c; if ((uVar1 & 1) != 0) { _DAT_c9100018 = _DAT_c9100018 & 0xffffffdf; *(undefined4 *)(uVar7 + 0xc9100000) = 1; if (uVar4 == 0) { FUN_d9005d68(); } else { lVar2 = (long)(int)uVar4 * 0x28; _DAT_d8fd392c = *(uint *)(&DAT_d8fd3870 + lVar2) & 0x7ffff; if (((*(uint *)((long)((int)uVar7 + 8) + 0xc9100000) & 0x1fffffff) == 0) && ((*(uint *)(&DAT_d8fd3874 + lVar2) & 0x7ffff) == _DAT_d8fd392c)) { *(undefined8 *)(&DAT_d8fd3860 + lVar2) = 0; *(undefined8 *)(&DAT_d8fd3868 + lVar2) = 0; *(uint *)(&DAT_d8fd3870 + lVar2) = *(uint *)(&DAT_d8fd3870 + lVar2) & 0xfff80000; } FUN_d900c9e4(&DAT_d8fd38f8); } } if ((uVar1 >> 1 & 1) != 0) { *(undefined4 *)(uVar7 + 0xc9100000) = 2; } if ((uVar1 >> 2 & 1) != 0) { *(undefined4 *)(uVar7 + 0xc9100000) = 4; } if ((uVar1 >> 3 & 1) != 0) { _DAT_c9100018 = _DAT_c9100018 & 0xffffffdf | 0x60; _DAT_c9100804 = _DAT_c9100804 | 0x80; (&DAT_d8fd3859)[(ulong)uVar4 * 0x28] = (&DAT_d8fd3859)[(ulong)uVar4 * 0x28] | 4; *(undefined4 *)(uVar7 + 0xc9100000) = 8; } if ((uVar1 >> 4 & 1) != 0) { *(undefined4 *)(uVar7 + 0xc9100000) = 0x10; } if ((uVar1 >> 5 & 1) != 0) { *(undefined4 *)(uVar7 + 0xc9100000) = 0x20; } if ((uVar1 >> 6 & 1) != 0) { *(undefined4 *)(uVar7 + 0xc9100000) = 0x40; } } uVar4 = uVar4 + 1; uVar7 = (ulong)((int)uVar7 + 0x20); } } uVar4 = uVar3; if ((uVar3 >> 0x13 & 1) != 0) { uVar3 = _DAT_c910081c & _DAT_c9100818; _DAT_c9100014 = 0x80000; _DAT_c9100818 = 0xffff0000; uVar7 = 0xb08; iVar5 = 0; for (uVar3 = uVar3 >> 0x10; uVar3 != 0; uVar3 = uVar3 >> 1) { if ((uVar3 & 1) != 0) { uVar6 = *(uint *)(uVar7 + 0xc9100000) & _DAT_c9100814; if ((uVar6 & 1) != 0) { *(undefined4 *)(uVar7 + 0xc9100000) = 1; if (iVar5 == 0) { FUN_d9005d68(); } else { lVar2 = (long)iVar5 * 0x28; *(undefined8 *)(&DAT_d8fd3860 + lVar2) = 0; _DAT_d8fd392c = *(uint *)(&DAT_d8fd3874 + lVar2) & 0x7ffff; *(undefined8 *)(&DAT_d8fd3868 + lVar2) = 0; *(uint *)(&DAT_d8fd3870 + lVar2) = *(uint *)(&DAT_d8fd3870 + lVar2) & 0xfff80000; FUN_d900c9e4(&DAT_d8fd38f8); } } if ((uVar6 >> 1 & 1) != 0) { *(undefined4 *)(uVar7 + 0xc9100000) = 2; } if ((uVar6 >> 2 & 1) != 0) { *(undefined4 *)(uVar7 + 0xc9100000) = 4; } if ((uVar6 >> 3 & 1) != 0) { FUN_d9005d68(); *(undefined4 *)(uVar7 + 0xc9100000) = 8; } } iVar5 = iVar5 + 1; uVar7 = (ulong)((int)uVar7 + 0x20); } } } _DAT_c9100014 = uVar4; return 0; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d900839c(long param_1,char *param_2) { byte bVar1; ushort uVar2; ushort uVar3; uint *puVar4; undefined4 uVar5; uint uVar6; int iVar7; int iVar8; long lVar9; int local_10 [4]; bVar1 = param_2[1]; uVar2 = *(ushort *)(param_2 + 4); uVar3 = *(ushort *)(param_2 + 2); uVar5 = _DAT_d8fd382c; if (bVar1 < 0x13) { if (bVar1 < 0x11) { if (bVar1 == 3) { iVar7 = FUN_d900c2d4(); uVar5 = _DAT_d8fd382c; if (iVar7 != 0) { lVar9 = *(long *)(param_1 + 0x10); for (uVar6 = 0; uVar5 = _DAT_d8fd382c, uVar6 < *(uint *)(param_1 + 0x18); uVar6 = uVar6 + 8) { *(undefined4 *)(ulong)*(uint *)(lVar9 + (ulong)uVar6) = *(undefined4 *)(lVar9 + (ulong)(uVar6 + 4)); } } } else if (((bVar1 == 5) && (*param_2 == '@')) && (iVar7 = FUN_d900c2d4(), uVar5 = _DAT_d8fd382c, iVar7 != 0)) { iVar7 = (uint)uVar2 + (uint)uVar3 * 0x10000; if ((**(uint **)(param_1 + 0x10) >> 4 & 1) == 0) { FUN_d9005bec(); } iVar8 = FUN_d9009b5c(iVar7,0xc000,local_10); uVar5 = _DAT_d8fd382c; if (iVar8 == 0x5a963ca5) { FUN_d9004e94(&DAT_d900d068,0,0x3b); FUN_d90041f4(iVar7 + local_10[0]); uVar5 = _DAT_d8fd382c; } } } else { iVar7 = FUN_d900c2d4(); puVar4 = _DAT_d8fd3840; uVar5 = _DAT_d8fd382c; if (iVar7 != 0) { uVar6 = *_DAT_d8fd3840; *(bool *)(param_1 + 0x38) = bVar1 == 0x11; *(ulong *)(param_1 + 0x20) = (ulong)uVar6; *(uint *)(param_1 + 0x30) = puVar4[1]; FUN_d900c618(param_1); uVar5 = _DAT_d8fd382c; } } } else if (bVar1 == 0x35) { _DAT_d8fd382c = FUN_d9004b44(*(undefined8 *)(param_1 + 0x10),*(undefined2 *)(param_2 + 6),1); if (_DAT_d8fd382c == 0) { _DAT_d8fd3834 = _DAT_d8fd3834 + 1; uVar5 = 0; if (3 < _DAT_d8fd3834) { FUN_d9004fec(); do { /* WARNING: Do nothing block with infinite loop */ } while( true ); } } else { _DAT_d8fd382c = 1; _DAT_d8fd3834 = 0; uVar5 = _DAT_d8fd382c; } } _DAT_d8fd382c = uVar5; return; } int FUN_d900856c(undefined8 param_1) { undefined4 uVar1; int iVar2; uVar1 = FUN_d9004f34(); FUN_d900cf6c(0x18,uVar1); iVar2 = FUN_d9009b5c(0xd9000000,0xc000,param_1); if (iVar2 == 0x5a963ca5) { FUN_d9004e94(&DAT_d900d068,0,0x3b); iVar2 = 0; } else { FUN_d9004e94(&DAT_d900d068,iVar2,0x3b); } return iVar2; } void FUN_d90085e4(void) { FUN_d9004f6c(7000); do { /* WARNING: Do nothing block with infinite loop */ } while( true ); } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined8 FUN_d9008d24(int *param_1) { int iVar1; int iVar2; long lVar3; undefined8 uVar4; long lVar5; undefined auStack_d0 [172]; undefined auStack_24 [36]; lVar3 = FUN_d9005514(); if ((lVar3 == 0) || (param_1 == (int *)0x0)) { uVar4 = 1; iVar1 = _DAT_d8fd3808 + 0x11; } else { uVar4 = 2; iVar1 = _DAT_d8fd3808 + 0x22; if (((*param_1 == 0x584d4b40) && ((param_1[1] & 0xffff00ffU) == 0x100001)) && (*(short *)(param_1 + 3) == 0x3004)) { _DAT_d8fd3808 = _DAT_d8fd3808 + 0x33; FUN_d900438c(auStack_d0,0x100); lVar5 = 0; _DAT_d8fd3808 = _DAT_d8fd3808 + 0x11; do { FUN_d90043cc(auStack_d0,(long)param_1 + lVar5 + 0x20,0x20); lVar5 = lVar5 + 0x30; _DAT_d8fd3808 = _DAT_d8fd3808 + 0x11; } while (lVar5 != 0xc0); FUN_d90044e0(auStack_d0); _DAT_d8fd3808 = _DAT_d8fd3808 + 0x11; iVar2 = FUN_d9004990(auStack_24,lVar3 + 0x30,0x20); uVar4 = 3; iVar1 = _DAT_d8fd3808; if (iVar2 == 0x3c5a69c3) { uVar4 = 0x5a963ca5; iVar1 = _DAT_d8fd3808 + 0x11; } } } _DAT_d8fd3808 = iVar1; return uVar4; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined4 FUN_d9008e68(long param_1,long param_2) { int iVar1; int iVar2; undefined4 uVar3; undefined auStack_d0 [172]; undefined auStack_24 [36]; if ((param_1 == 0) || (param_2 == 0)) { uVar3 = 0x15; iVar1 = _DAT_d8fd3808 + 0x35; } else { iVar2 = *(int *)(param_2 + 0x408); if (((iVar2 == 0x20) || (iVar2 == 0x40)) || (uVar3 = 0x16, iVar1 = _DAT_d8fd3808 + 0x6a, iVar2 == 0x80)) { _DAT_d8fd3808 = _DAT_d8fd3808 + 0x9f; FUN_d900438c(auStack_d0,0x100); _DAT_d8fd3808 = _DAT_d8fd3808 + 0x35; if ((_DAT_c8100224 >> 9 & 1) == 0) { FUN_d90043cc(auStack_d0,param_2,*(int *)(param_2 + 0x408) << 2); FUN_d90043cc(auStack_d0,param_2 + 0x200,4); if ((_DAT_c8100224 >> 9 & 1) != 0) { FUN_d90085e4(0xb2); } } else { FUN_d90043cc(auStack_d0,param_2,0x40c); } _DAT_d8fd3808 = _DAT_d8fd3808 + 0x35; FUN_d90044e0(auStack_d0); _DAT_d8fd3808 = _DAT_d8fd3808 + 0x35; iVar2 = FUN_d9004990(param_1 + 0x20,auStack_24,0x20); uVar3 = 0x17; iVar1 = _DAT_d8fd3808; if (iVar2 == 0x3c5a69c3) { uVar3 = 0x5a963ca5; iVar1 = _DAT_d8fd3808 + 0x35; } } } _DAT_d8fd3808 = iVar1; return uVar3; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined8 FUN_d9008fbc(long param_1,long param_2,uint param_3) { byte bVar1; int iVar2; int iVar3; undefined *puVar4; uint uVar5; undefined8 uVar6; undefined auStack_d0 [172]; undefined auStack_24 [36]; puVar4 = get_efuse_data(); if (((param_1 == 0) || (param_2 == 0)) || (puVar4 == (undefined *)0x0)) { uVar6 = 0xb; iVar2 = _DAT_d8fd3808 + 0x17; } else { uVar6 = 0xc; iVar2 = _DAT_d8fd3808 + 0x2e; if (param_3 < 4) { iVar3 = *(int *)(param_2 + 0x408); if (((iVar3 == 0x20) || (iVar3 == 0x40)) || (uVar6 = 0xd, iVar2 = _DAT_d8fd3808 + 0x45, iVar3 == 0x80)) { bVar1 = puVar4[5]; uVar5 = bVar1 >> 4 & 1; if ((bVar1 >> 5 & 1) != 0) { uVar5 = uVar5 | 2; } if ((bVar1 >> 6 & 1) != 0) { uVar5 = uVar5 | 4; } if ((char)bVar1 < '\0') { uVar5 = uVar5 | 8; } uVar6 = 0xe; iVar2 = _DAT_d8fd3808 + 0xb8; if (((int)uVar5 >> (param_3 & 0x1f) & 1U) == 0) { _DAT_d8fd3808 = _DAT_d8fd3808 + 0xcf; FUN_d900438c(auStack_d0,0x100); _DAT_d8fd3808 = _DAT_d8fd3808 + 0x17; if ((_DAT_c8100224 >> 9 & 1) == 0) { FUN_d90043cc(auStack_d0,param_2,*(int *)(param_2 + 0x408) << 2); FUN_d90043cc(auStack_d0,param_2 + 0x200,4); if ((_DAT_c8100224 >> 9 & 1) != 0) { FUN_d90085e4(0x80); } } else { FUN_d90043cc(auStack_d0,param_2,0x40c); } _DAT_d8fd3808 = _DAT_d8fd3808 + 0x17; FUN_d90044e0(auStack_d0); _DAT_d8fd3808 = _DAT_d8fd3808 + 0x17; iVar3 = FUN_d9004990(param_1 + (long)(int)param_3 * 0x30 + 0x20,auStack_24,0x20); uVar6 = 0xf; iVar2 = _DAT_d8fd3808; if (iVar3 == 0x3c5a69c3) { uVar6 = 0x5a963ca5; iVar2 = _DAT_d8fd3808 + 0x17; } } } } } _DAT_d8fd3808 = iVar2; return uVar6; } undefined8 FUN_d90091b8(void) { undefined8 uVar1; undefined4 local_10; local_10 = 0; FUN_d900554c(&local_10); if ((local_10._3_1_ >> 5 & 1) == 0) { uVar1 = 0xffffffff; } else { FUN_d90046b0(); FUN_d900477c(); FUN_d90047ac(); uVar1 = 0; } return uVar1; } undefined8 FUN_d90091f8(void) { undefined8 uVar1; undefined4 local_10; local_10 = 0; FUN_d900554c(&local_10); if ((local_10._3_1_ >> 5 & 1) == 0) { uVar1 = 0xffffffff; } else { FUN_d90046b0(); FUN_d900477c(); FUN_d900478c(); uVar1 = 0; } return uVar1; } /* WARNING: Removing unreachable block (ram,0xd90092fc) */ /* WARNING: Removing unreachable block (ram,0xd90098b0) */ /* WARNING: Removing unreachable block (ram,0xd9009638) */ /* WARNING: Removing unreachable block (ram,0xd90093c8) */ /* WARNING: Removing unreachable block (ram,0xd9009554) */ /* WARNING: Removing unreachable block (ram,0xd9009710) */ /* WARNING: Removing unreachable block (ram,0xd900998c) */ /* WARNING: Removing unreachable block (ram,0xd900934c) */ /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int FUN_d9009238(int *param_1,undefined4 *param_2) { int *piVar1; int *piVar2; int *piVar3; int *piVar4; uint uVar5; int iVar6; undefined4 uVar7; int local_730; undefined auStack_6f0 [172]; undefined auStack_644 [36]; undefined auStack_620 [1536]; char local_20; byte local_1f; int *local_10; undefined4 *local_8; local_730 = -1; _DAT_d8fd3808 = 3; if (param_1 == (int *)0x0) { local_730 = 0x1e; } else if (((*param_1 == 0x4c4d4140) && (*(char *)((long)param_1 + 10) == '\x01')) && (*(char *)((long)param_1 + 0xb) == '\x01')) { local_10 = param_1; local_8 = param_2; if ((_DAT_c8100228 & 0x10) == 0) { FUN_d900554c(&local_20); if ((_DAT_c8100228 & 0x10) != 0) { FUN_d90085e4(0x1a4); } if ((local_20 < '\0') || ((local_1f & 1) != 0)) { FUN_d900438c(auStack_6f0,0x100); FUN_d90043cc(auStack_6f0,local_10,0x40); FUN_d90043cc(auStack_6f0,param_1 + 0x18,0xbf90); FUN_d90044e0(auStack_6f0); iVar6 = FUN_d900495c(auStack_644,local_10 + 0x10,0x20); if (iVar6 != 0) { return 0x22; } FUN_d90048e4(*(undefined *)(param_1 + 3)); serial_puts(&DAT_d900d0a0); FUN_d90048e4(*(undefined *)((long)param_1 + 0xd)); serial_puts(&DAT_d900d0a8); if (0x40 < *(byte *)(param_1 + 3)) { return 0x24; } iVar6 = FUN_d900cfe8(*(undefined *)(param_1 + 3)); if (iVar6 != 0x5a3c69c3) { return 0x23; } } if ((_DAT_c8100228 & 0x10) == 0) { local_730 = 0x5a963ca5; _DAT_d8fd3808 = 0x37353; } else { FUN_d90085e4(0x1c1); } } else { _DAT_d8fd3808 = 3; iVar6 = FUN_d9008d24(param_1 + 0x1ca); if (iVar6 != 0x5a963ca5) { return iVar6; } if (_DAT_d8fd3808 != 0xad) { FUN_d90085e4(0x105); } piVar3 = local_10; piVar1 = local_10 + 0xa6; iVar6 = FUN_d9008fbc(param_1 + 0x1ca,piVar1,*(undefined *)((long)param_1 + 9)); if (iVar6 != 0x5a963ca5) { return iVar6; } if (_DAT_d8fd3808 != 0x1d8) { FUN_d90085e4(0x116); } piVar2 = local_10 + 0x10; uVar5 = piVar3[0x1a8]; _DAT_d8fd3808 = _DAT_d8fd3808 + 0x3e; FUN_d900438c(auStack_6f0,0x100); _DAT_d8fd3808 = _DAT_d8fd3808 + 0x1f; FUN_d90043cc(auStack_6f0,local_10,0x40); _DAT_d8fd3808 = _DAT_d8fd3808 + 0x1f; FUN_d90043cc(auStack_6f0,piVar2 + uVar5,piVar3[0x1a8] * -4 + 0x888); _DAT_d8fd3808 = _DAT_d8fd3808 + 0x1f; FUN_d90044e0(auStack_6f0); _DAT_d8fd3808 = _DAT_d8fd3808 + 0x1f; iVar6 = FUN_d900cb5c(piVar1,piVar2,auStack_644,auStack_620); if (iVar6 != 0x3c5a69c3) { return 0x20; } _DAT_d8fd3808 = _DAT_d8fd3808 + _DAT_d8fd3804; uVar7 = FUN_d9004f34(); FUN_d900cf6c(0x20,uVar7); FUN_d90048e4(*(undefined *)(param_1 + 3)); serial_puts(&DAT_d900d0a0); FUN_d90048e4(*(undefined *)((long)param_1 + 0xd)); serial_puts(&DAT_d900d0a8); if (_DAT_d8fd3808 != 0x1b912) { FUN_d90085e4(0x139); } if (0x40 < *(byte *)(param_1 + 3)) { return 0x24; } iVar6 = FUN_d900cfe8(*(undefined *)(param_1 + 3)); piVar1 = local_10; if (iVar6 != 0x5a3c69c3) { return 0x23; } if (((local_10[0x232] != 0x4c4d4140) || (*(char *)((long)local_10 + 0x8d2) != '\x01')) || (*(char *)((long)local_10 + 0x8d3) != '\x01')) { return 0x1f; } if (_DAT_d8fd3808 != 0x1b970) { FUN_d90085e4(0x156); } piVar2 = local_10; piVar3 = local_10 + 0x2d8; iVar6 = FUN_d9008e68(local_10 + 0x1fe,piVar3); if (iVar6 != 0x5a963ca5) { return iVar6; } if (_DAT_d8fd3808 != 0x1bae3) { FUN_d90085e4(0x16a); } piVar4 = local_10 + 0x242; uVar5 = piVar2[0x3da]; _DAT_d8fd3808 = _DAT_d8fd3808 + 0x86; FUN_d900438c(auStack_6f0,0x100); _DAT_d8fd3808 = _DAT_d8fd3808 + 0x43; FUN_d90043cc(auStack_6f0,local_10 + 0x232,0x40); _DAT_d8fd3808 = _DAT_d8fd3808 + 0x43; FUN_d90043cc(auStack_6f0,piVar4 + uVar5,piVar2[0x3da] * -4 + 0xb6e8); _DAT_d8fd3808 = _DAT_d8fd3808 + 0x43; FUN_d90044e0(auStack_6f0); _DAT_d8fd3808 = _DAT_d8fd3808 + 0x43; iVar6 = FUN_d900cb5c(piVar3,piVar4,auStack_644,auStack_620); if (iVar6 != 0x3c5a69c3) { return 0x21; } _DAT_d8fd3808 = _DAT_d8fd3808 + _DAT_d8fd3804; FUN_d90048e4(*(undefined *)(piVar1 + 0x235)); serial_puts(&DAT_d900d0a0); FUN_d90048e4(*(undefined *)((long)piVar1 + 0x8d5)); serial_puts(&DAT_d900d0a8); if (_DAT_d8fd3808 != 0x372f5) { FUN_d90085e4(0x18b); } if (0x40 < *(byte *)(piVar1 + 0x235)) { return 0x24; } iVar6 = FUN_d900cfe8(*(undefined *)(piVar1 + 0x235)); if (iVar6 != 0x5a3c69c3) { return 0x23; } local_730 = 0x5a963ca5; } uVar7 = FUN_d9004f34(); FUN_d900cf6c(0x24,uVar7); if (local_8 != (undefined4 *)0x0) { *local_8 = 0xff0; } } else { local_730 = 0x1f; } return local_730; } /* WARNING: Removing unreachable block (ram,0xd9009d5c) */ /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int FUN_d9009b5c(long param_1,undefined4 param_2,int *param_3) { undefined4 uVar1; long lVar2; int local_40; undefined auStack_30 [16]; long local_20; undefined4 local_18; int *local_10; local_20 = param_1; local_18 = param_2; local_10 = param_3; lVar2 = FUN_d9005514(); FUN_d9004a48(auStack_30,0,0x10); FUN_d90091b8(); _DAT_d8fd3800 = 0; if ((_DAT_c8100228 & 0x10000000) != 0) { FUN_d900536c(lVar2 + 0x50,auStack_30,local_20,local_20,local_18); uVar1 = FUN_d9004f34(); FUN_d900cf6c(0x1c,uVar1); _DAT_d8fd3800 = _DAT_d8fd3800 + 1; } if ((_DAT_c8100224 & 0x100) == 0) { local_40 = FUN_d9009d8c(local_20 + 0x10,0,local_10); _DAT_d8fd3800 = _DAT_d8fd3800 + 1; if ((_DAT_c8100224 & 0x100) != 0) { FUN_d90085e4(0x200); } if (local_40 == 0) { local_40 = 0x5a963ca5; } } else { local_40 = FUN_d9009238(local_20 + 0x10,local_10); _DAT_d8fd3800 = _DAT_d8fd3800 + 1; if ((local_40 == 0x5a963ca5) && (_DAT_d8fd3808 != 0x37353)) { FUN_d90085e4(0x1f6); } } if (local_40 == 0x5a963ca5) { _DAT_d8fd3800 = 0x5a963ca5; if (local_10 != (int *)0x0) { *local_10 = *local_10 + 0x10; } } else { _DAT_d8fd3800 = 0; } FUN_d90091f8(); return local_40; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ uint FUN_d9009d8c(int *param_1,long param_2,uint *param_3) { long lVar1; uint uVar2; uint uVar3; ushort uVar4; bool bVar5; int iVar6; undefined4 uVar7; uint uVar8; long lVar9; long lVar10; byte bVar11; byte local_7c0 [1536]; undefined auStack_1c0 [172]; undefined auStack_114 [36]; undefined auStack_f0 [128]; undefined auStack_70 [32]; undefined auStack_50 [32]; undefined auStack_30 [32]; ushort local_10 [8]; FUN_d900554c(local_10); if (*param_1 != 0x4c4d4140) { return 0xa7; } if (*(char *)((long)param_1 + 10) != '\x01') { return 0xa7; } if (*(char *)((long)param_1 + 0xb) != '\x01') { return 0xa7; } if (*(char *)(param_1 + 2) != '@') { return 199; } if (param_1[5] != 0x40) { return 199; } uVar8 = param_1[7]; if (0xc000 < uVar8) { return 0xcf; } uVar2 = param_1[0xb]; if (0xc000 < uVar2) { return 0xcf; } if (param_1[4] == 0) { iVar6 = 0; if ((local_10[0] & 0x180) == 0x180) { if (param_2 != 0) { return 0x11e; } if (uVar8 != 0x60) { return 0x122; } if (uVar2 != 0xbf90) { return 0x122; } lVar10 = 0; bVar11 = 0; goto LAB_d9009f00; } } else { if (3 < (uint)param_1[4]) { return 299; } uVar3 = param_1[9]; if (0xc000 < uVar3) { return 0xdc; } uVar4 = *(ushort *)((long)param_1 + (ulong)uVar3 + 0x18); if (0xc000 < uVar4) { return 0xe3; } lVar10 = (long)param_1 + (ulong)uVar4; if (param_1[6] != 0x200) { return 0xe3; } bVar11 = 1; if (param_2 == 0) { if (param_1[1] != 0x8c8) { return 0xff; } if (uVar2 + uVar8 != 0x8c8) { return 0xff; } if (uVar3 != 0x240) { return 0x105; } if (param_1[10] != 0x4e8) { return 0x105; } if (param_1[0xd] != 0x728) { return 0x10b; } if (param_1[0xe] != 0x1a0) { return 0x10b; } } LAB_d9009f00: FUN_d900554c(local_7c0); if ((_DAT_c8100224 >> 8 & 1) != 0) { FUN_d90085e4(0x2a); } if ((local_7c0[0] >> 4 & 1) != bVar11) { return 0x132; } FUN_d90048e4(*(undefined *)(param_1 + 3)); serial_puts(s_auth_failed__reboot____d900d0b2 + 0x15); FUN_d90048e4(*(undefined *)((long)param_1 + 0xd)); serial_puts(&DAT_d900d0b0); iVar6 = FUN_d900cfe8(*(undefined *)(param_1 + 3)); if (iVar6 != 0x5a3c69c3) { return 0x142; } uVar8 = param_1[7]; uVar2 = param_1[5]; FUN_d900438c(auStack_1c0,0x100); FUN_d90043cc(auStack_1c0,param_1,*(undefined *)(param_1 + 2)); FUN_d90043cc(auStack_1c0,(long)param_1 + (ulong)uVar8,param_1[0xb]); FUN_d90044e0(auStack_1c0); if ((local_7c0[0] >> 4 & 1) != 0) { FUN_d90049d0(auStack_50,auStack_114,0x20); FUN_d900438c(auStack_1c0,0x100); if ((_DAT_c8100224 >> 9 & 1) == 0) { FUN_d90043cc(auStack_1c0,lVar10,*(int *)(lVar10 + 0x408) << 2); FUN_d90043cc(auStack_1c0,lVar10 + 0x200,4); if ((_DAT_c8100224 >> 9 & 1) != 0) { FUN_d90085e4(0x184); } } else { FUN_d90043cc(auStack_1c0,lVar10,0x40c); } FUN_d90044e0(auStack_1c0); FUN_d90049d0(auStack_30,auStack_114,0x20); bVar5 = false; do { if (param_2 == 0) { lVar1 = (long)param_1 + (ulong)(uint)param_1[0xd]; if (bVar5) { if (param_3 != (uint *)0x0) { *param_3 = param_1[1]; } uVar8 = FUN_d9009d8c((long)param_1 + (ulong)(uint)param_1[1],lVar1 + 0xd0,param_3); if (uVar8 == 0) { return 0; } return uVar8 | 0x400; } if (((((*(int *)((long)param_1 + (ulong)(uint)param_1[0xd]) != 0x584d4b40) || (*(char *)(lVar1 + 4) != '\x01')) || (*(short *)(lVar1 + 6) != 0x10)) || ((0x3fef < *(int *)(lVar1 + 8) - 0x11U || (*(char *)(lVar1 + 0xc) != '\x04')))) || (*(char *)(lVar1 + 0xd) != '0')) { return 0x1af; } for (iVar6 = 0; iVar6 < (int)(uint)*(byte *)(lVar1 + 0xc); iVar6 = iVar6 + 1) { lVar9 = (long)iVar6 * 0x30; if (3 < (byte)(*(char *)(lVar1 + lVar9 + 0x19) - 5U)) { return 0x1af; } FUN_d90049d0(auStack_f0 + (long)iVar6 * 0x20,lVar1 + lVar9 + 0x20,0x20); } FUN_d9004240(auStack_f0,(ulong)*(byte *)(lVar1 + 0xc) << 5,auStack_70,0); lVar9 = FUN_d9005514(); iVar6 = FUN_d900495c(auStack_70,lVar9 + 0x30,0x20); if ((_DAT_c8100224 >> 8 & 1) != 0) { FUN_d90085e4(0x37); } if (iVar6 != 0) { return 0x1af; } iVar6 = FUN_d900a304(lVar1,auStack_30,1); if (iVar6 != 0) { return 0x1b7; } } else { if (bVar5) { if (param_3 != (uint *)0x0) { *param_3 = *param_3 + param_1[0xd]; } return 0; } iVar6 = FUN_d900a304(param_2,auStack_30); if (iVar6 != 0) { return 0x198; } } if ((_DAT_c8100224 >> 8 & 1) != 0) { FUN_d90085e4(0x1ce); } iVar6 = FUN_d900cb5c(lVar10,(long)param_1 + (ulong)uVar2,auStack_50,local_7c0); if (iVar6 != 0x3c5a69c3) { if (param_2 == 0) { uVar7 = FUN_d9004f34(); FUN_d900cf6c(0x24,uVar7); return 0x1e6; } uVar7 = FUN_d9004f34(); FUN_d900cf6c(0x20,uVar7); return 0x1e6; } if (param_2 == 0) { uVar7 = FUN_d9004f34(); FUN_d900cf6c(0x24,uVar7); } else { uVar7 = FUN_d9004f34(); FUN_d900cf6c(0x20,uVar7); } bVar5 = true; } while( true ); } iVar6 = FUN_d900495c(auStack_114,(long)param_1 + (ulong)(uint)param_1[5],0x20); } if ((iVar6 == 0) && (param_3 != (uint *)0x0)) { if (0xc000 < (uint)param_1[0xd]) { return 0x163; } *param_3 = param_1[0xd]; } else { uVar8 = 0x16b; if (iVar6 != 0) goto LAB_d900a000; } uVar8 = 0; LAB_d900a000: uVar7 = FUN_d9004f34(); FUN_d900cf6c(0x24,uVar7); return uVar8; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined8 FUN_d900a304(long param_1,undefined8 param_2,int param_3) { byte bVar1; int iVar2; undefined *puVar3; uint uVar4; undefined8 uVar5; uint uVar6; puVar3 = get_efuse_data(); uVar4 = 0xe; if (param_3 != 0) { bVar1 = puVar3[5]; uVar4 = bVar1 >> 4 & 1; if ((bVar1 >> 5 & 1) != 0) { uVar4 = uVar4 | 2; } if ((bVar1 >> 6 & 1) != 0) { uVar4 = uVar4 | 4; } if ((char)bVar1 < '\0') { uVar4 = uVar4 | 8; } } uVar6 = 0; do { if ((int)(uint)*(byte *)(param_1 + 0xc) <= (int)uVar6) { uVar5 = 0xffffffff; LAB_d900a3a0: if ((_DAT_c8100224 >> 8 & 1) != 0) { FUN_d90085e4(0x58); } return uVar5; } if ((((int)uVar4 >> (uVar6 & 0x1f) & 1U) == 0) && (iVar2 = FUN_d900495c(param_2,param_1 + (long)(int)uVar6 * 0x30 + 0x20,0x20), iVar2 == 0)) { uVar5 = 0; goto LAB_d900a3a0; } uVar6 = uVar6 + 1; } while( true ); } /* WARNING: Removing unreachable block (ram,0xd900a4ec) */ /* WARNING: Removing unreachable block (ram,0xd900a4f0) */ /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined4 FUN_d900a408(void) { _DAT_d0074800 = 0x33800; return 0; } void FUN_d900a508(uint param_1,undefined4 *param_2) { uint uVar1; int iVar2; undefined4 uVar3; ulong uVar4; uint uVar5; ulong uVar6; long lVar7; byte local_20 [4]; undefined local_1c; undefined local_1b; undefined local_1a; undefined local_19; undefined local_18; undefined local_17; undefined local_16; undefined local_15; undefined local_14; undefined local_13; undefined local_12; undefined local_11; undefined local_10; undefined local_f; undefined local_e; undefined local_d; undefined local_c; undefined local_b; undefined local_a; undefined local_9; undefined local_8; undefined local_7; undefined local_6; undefined local_5; undefined local_4; undefined local_3; undefined local_2; undefined local_1; local_1a = 0x78; local_19 = 0x78; local_17 = 0x76; local_e = 0x76; local_b = 0x76; local_20[0] = 4; local_20[1] = 4; local_16 = 0x74; local_14 = 8; local_13 = 8; local_d = 0x74; local_9 = 0x70; local_20[2] = 0x7c; local_20[3] = 0x7e; local_1c = 0; local_1b = 0x7c; local_18 = 0x7c; local_15 = 0x72; local_12 = 0; local_11 = 0; local_10 = 0xb; local_f = 0x7e; local_c = 0x10; local_a = 0x72; local_8 = 2; local_7 = 0; local_6 = 0x7e; local_5 = 0x7c; local_4 = 0; local_3 = 0; local_2 = 0; local_1 = 0; uVar1 = param_1; if (param_1 == 7) { param_1 = 0xff; LAB_d900a61c: uVar4 = 0; } else { if (param_1 == 0xff) { uVar1 = 7; goto LAB_d900a61c; } uVar5 = 0; if (7 < param_1) goto LAB_d900a790; if (param_1 == 0) { *param_2 = 0x1785c; param_2[1] = 0x178c5; param_2[2] = 0x33800; uVar4 = 3; } else { uVar4 = 0; } } lVar7 = 0; uVar6 = uVar4; do { param_2[uVar6] = 0x17855; iVar2 = (int)uVar6; param_2[iVar2 + 1] = 0x33802; param_2[iVar2 + 2] = (int)lVar7 + 4U | 0x1b800; param_2[iVar2 + 3] = 0x33802; param_2[iVar2 + 4] = local_20[uVar1 * 4 + (int)lVar7] | 0x13800; lVar7 = lVar7 + 1; param_2[iVar2 + 5] = 0x33800; uVar6 = (ulong)(iVar2 + 6); } while (lVar7 != 4); iVar2 = (int)uVar4; param_2[iVar2 + 0x18] = 0x17855; param_2[iVar2 + 0x19] = 0x33802; param_2[iVar2 + 0x1a] = 0x1b80d; param_2[iVar2 + 0x1b] = 0x33802; param_2[iVar2 + 0x1c] = 0x13800; uVar1 = iVar2 + 0x1e; param_2[iVar2 + 0x1d] = 0x33800; if (param_1 == 6) { param_2[uVar1] = 0x178b3; uVar1 = iVar2 + 0x20; param_2[iVar2 + 0x1f] = 0x33800; LAB_d900a754: param_2[uVar1] = 0x17826; param_2[uVar1 + 1] = 0x1785d; uVar5 = uVar1 + 3; uVar3 = 0x33800; uVar4 = (ulong)(uVar1 + 2); } else { if (param_1 != 0xff) goto LAB_d900a754; param_2[uVar1] = 0x178ff; param_2[iVar2 + 0x1f] = 0x33802; uVar5 = iVar2 + 0x21; uVar4 = (ulong)(iVar2 + 0x20); if (DAT_d8fd3812 < '\0') { param_2[uVar4] = 0x17870; param_2[uVar5] = 0x33802; uVar5 = iVar2 + 0x23; param_2[iVar2 + 0x22] = 0x142c0d; goto LAB_d900a790; } uVar3 = 0x10380d; } param_2[uVar4] = uVar3; LAB_d900a790: param_2[uVar5] = 0; return; } void FUN_d900a7fc(uint param_1,undefined4 *param_2) { undefined4 *puVar1; long lVar2; uint uVar3; byte abStack_40 [64]; FUN_d90049d0(abStack_40,&DAT_d900d128,0x3f); if (param_1 == 0x15) { LAB_d900a968: *param_2 = 0x1783b; param_2[1] = 0x178b9; param_2[2] = 0x17854; param_2[3] = 0x1b804; param_2[4] = 0x13800; param_2[5] = 0x17854; param_2[6] = 0x1b805; param_2[7] = 0x13800; param_2[8] = 0x17854; param_2[9] = 0x1b807; param_2[10] = 0x13800; uVar3 = 0x78d6; } else { if (param_1 == 0) { *param_2 = 0x1783b; param_2[1] = 0x178b9; uVar3 = 4; puVar1 = param_2 + 2; do { *puVar1 = 0x17854; puVar1[1] = uVar3 | 0x1b800; uVar3 = uVar3 + 1; puVar1[2] = 0x13800; puVar1 = puVar1 + 3; } while (uVar3 != 0xd); param_2[0x1d] = 0x178b6; lVar2 = 0x1e; goto LAB_d900a9fc; } if (0x14 < param_1) { lVar2 = 0; if (param_1 != 0xff) goto LAB_d900a9fc; goto LAB_d900a968; } *param_2 = 0x1783b; param_2[1] = 0x178b9; param_2[2] = 0x17854; param_1 = param_1 * 3; param_2[3] = 0x1b804; param_2[4] = abStack_40[param_1] | 0x13800; param_2[5] = 0x17854; param_2[6] = 0x1b805; param_2[7] = abStack_40[param_1 + 1] | 0x13800; param_2[8] = 0x17854; param_2[9] = 0x1b807; param_2[10] = abStack_40[param_1 + 2] | 0x13800; uVar3 = 0x78b6; } param_2[0xb] = uVar3 | 0x10000; lVar2 = 0xc; LAB_d900a9fc: param_2[lVar2] = 0; return; } void FUN_d900aa0c(uint param_1,undefined4 *param_2) { long lVar1; if (param_1 == 0xff) { param_1 = 0; } else { lVar1 = 0; if (7 < param_1) goto LAB_d900aad4; } *param_2 = 0x178ef; param_2[1] = 0x1b889; param_2[2] = 0x33803; param_2[3] = param_1 | 0x13800; param_2[4] = 0x13800; param_2[5] = 0x13800; param_2[6] = 0x13800; param_2[7] = 0x33802; if (DAT_d8fd3812 < '\0') { param_2[8] = 0x17870; param_2[9] = 0x33802; param_2[10] = 0x142c0d; lVar1 = 0xb; } else { param_2[8] = 0x10380d; lVar1 = 9; } LAB_d900aad4: param_2[lVar1] = 0; return; } void FUN_d900aae0(uint param_1,undefined4 *param_2) { long lVar1; undefined4 *puVar2; byte local_50 [64]; byte local_10 [16]; local_10[0] = 0xa7; local_10[1] = 0xa4; local_10[2] = 0xa5; local_10[3] = 0xa6; FUN_d90049d0(local_50,&DAT_d900d168,0x3c); if (param_1 == 0xff) { param_1 = 0; } else { lVar1 = 0; if (0xe < param_1) goto LAB_d900abcc; } lVar1 = 0; puVar2 = param_2; do { *puVar2 = 0x178a1; puVar2[1] = 0x1b800; puVar2[2] = local_10[lVar1] | 0x1b800; puVar2[3] = 0x33802; puVar2[4] = local_50[param_1 * 4 + (int)lVar1] | 0x13800; lVar1 = lVar1 + 1; puVar2[5] = 0x33808; puVar2 = puVar2 + 6; } while (lVar1 != 4); lVar1 = 0x18; LAB_d900abcc: param_2[lVar1] = 0; return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d900abdc(int param_1,long param_2) { long lVar1; uint uVar2; ulong uVar3; if ((param_1 == 0xff) || (param_1 == 0)) { _DAT_d8fd3818 = 0; } uVar2 = 0; while( true ) { lVar1 = (ulong)(uVar2 + _DAT_d8fd3818) * 2; uVar3 = (ulong)uVar2; if ((&DAT_d9013018)[lVar1] == 0) break; uVar2 = uVar2 + 1; *(uint *)(param_2 + uVar3 * 4) = (byte)(&DAT_d9013019)[lVar1] | 0x3800 | (uint)(byte)(&DAT_d9013018)[lVar1] << 0xe; } *(undefined4 *)(param_2 + uVar3 * 4) = 0; _DAT_d8fd3818 = uVar2 + _DAT_d8fd3818 + 1; return; } void FUN_d900ac4c(undefined8 param_1,long param_2) { long lVar1; long lVar2; uint uVar3; uint uVar4; lVar1 = FUN_d9005514(); lVar2 = 0; uVar3 = 0; do { uVar4 = (uint)*(byte *)(lVar1 + 0x120 + lVar2); if (uVar4 == 0) break; uVar3 = uVar3 + 1; *(uint *)(param_2 + lVar2 * 2) = (uint)*(byte *)(lVar1 + 0x120 + lVar2 + 1) | uVar4 << 0xe | 0x3800; lVar2 = lVar2 + 2; } while (uVar3 != 8); *(undefined4 *)(param_2 + (ulong)uVar3 * 4) = 0; return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d900aca8(int param_1) { uint *puVar1; uint uVar2; long lVar3; uint local_200 [128]; if (param_1 == 0) { _DAT_d8fd381c = 0; } else if (param_1 == 2) { _DAT_d8fd381c = 0xff; } if (_DAT_d8fd3814 == 0x98) { FUN_d900a508(_DAT_d8fd381c,local_200); } else if (_DAT_d8fd3814 < 0x99) { if (_DAT_d8fd3814 == 0x2c) { FUN_d900aa0c(_DAT_d8fd381c,local_200); } else if (_DAT_d8fd3814 == 0x45) { FUN_d900a7fc(_DAT_d8fd381c,local_200); } } else if (_DAT_d8fd3814 == 0x100) { FUN_d900abdc(_DAT_d8fd381c,local_200); } else if (_DAT_d8fd3814 == 0x101) { FUN_d900ac4c(_DAT_d8fd381c,local_200); } else if (_DAT_d8fd3814 == 0xec) { FUN_d900aae0(_DAT_d8fd381c,local_200); } _DAT_d8fd381c = _DAT_d8fd381c + 1; if (_DAT_d8fd3816 <= _DAT_d8fd381c) { _DAT_d8fd381c = 0; } lVar3 = 0; uVar2 = _DAT_d0074800; do { _DAT_d0074800 = uVar2; if ((_DAT_d0074800 >> 0x16 & 0x1f) == 0x1f) { return; } puVar1 = (uint *)((long)local_200 + lVar3); lVar3 = lVar3 + 4; uVar2 = *puVar1; } while (*puVar1 != 0); return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d900ade4(void) { if (_DAT_d8fd3816 != 0) { FUN_d900aca8(); return; } return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined4 FUN_d900adfc(undefined8 param_1,undefined4 param_2) { uint uVar1; uint uVar2; uint uVar3; ulong uVar4; undefined4 *puVar5; uVar4 = (ulong)_DAT_d8fd3810 & 0x3fffff; uVar1 = (uint)uVar4 & 0x3f; if (((uint)uVar4 >> 0xd & 1) == 0) { uVar3 = 0x80; if (((uint)(uVar4 >> 0xe) & 7) < 2) { uVar3 = 0x40; } uVar4 = (ulong)uVar3; } else { uVar4 = uVar4 >> 6 & 0x7f; } do { } while ((_DAT_d0074800 >> 0x16 & 0x1f) != 0); _DAT_d007480c = 0xd9013200; _DAT_d0074800 = 0x33800; _DAT_d0074808 = param_2; for (uVar3 = 0; uVar2 = 0, uVar3 < uVar1; uVar3 = uVar3 + 1) { for (; uVar2 < (int)uVar4 + 1U; uVar2 = uVar2 + 1) { while ((_DAT_d0074818 >> 0xb & 1) == 0) { if ((_DAT_d0074800 >> 0x1b & 1) != 0) { _DAT_d0074800 = 0x80000000; return 0x81; } } puVar5 = (undefined4 *)(ulong)_DAT_d007481c; if (puVar5 < (undefined4 *)0xd9014000) { *puVar5 = _DAT_d0074820; puVar5[1] = _DAT_d0074824; } } } while( true ) { if (uVar1 <= uVar2) { return 0; } uVar3 = *(uint *)(ulong)((uVar2 + 0x1b202640) * 8); if ((uVar3 >> 0x18 & 0x3f) == 0x3f) break; if ((uVar2 == 0) && ((uVar3 & 0xc000ffff) != 0xc000aa55)) { return 0x83; } uVar2 = uVar2 + 1; } if ((_DAT_d8fd3810 & 0x1000000) != 0) { FUN_d900a408(); } if (9 < (uVar3 >> 0x10 & 0x3f)) { return 0x82; } return 0x85; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int FUN_d900b1d8(uint param_1,int param_2,uint param_3,int param_4) { byte bVar1; ulong uVar2; int iVar3; uint uVar4; int iVar5; uint uVar6; byte *pbVar7; uint uVar8; uVar2 = (ulong)_DAT_d8fd3810 & 0x3fffff; if (((uint)uVar2 >> 0xd & 1) == 0) { iVar3 = 0x400; if (((uint)(uVar2 >> 0xe) & 7) < 2) { iVar3 = 0x200; } } else { iVar3 = ((uint)(uVar2 >> 6) & 0x7f) << 3; } pbVar7 = &DAT_d9013008; uVar6 = 0; while( true ) { if (param_3 <= uVar6) { return 0; } if ((DAT_d8fd3813 >> 2 & 1) == 0) { uVar8 = param_1 + 1; uVar4 = param_1; } else { bVar1 = *pbVar7; pbVar7 = pbVar7 + 1; uVar8 = param_1; uVar4 = (uint)bVar1; } param_1 = uVar8; uVar8 = 0; while (iVar5 = FUN_d900adfc(uVar4 + param_4 * 0x100,uVar6 + param_2), iVar5 == 0x82) { if (_DAT_d8fd3816 <= uVar8) { return 0x82; } FUN_d900ade4(1); uVar8 = uVar8 + 1; } if (iVar5 != 0) break; uVar6 = uVar6 + iVar3 * ((uint)uVar2 & 0x3f); } return iVar5; } void FUN_d900b2f0(void) { int iVar1; int iVar2; iVar2 = 0; do { iVar1 = FUN_d900b1d8(0,&DAT_d9013000,0x180,iVar2); if (iVar1 == 0) { return; } iVar2 = iVar2 + 1; } while (iVar2 != 4); return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined8 FUN_d900b334(uint param_1,int param_2,uint param_3) { byte bVar1; ulong uVar2; int iVar3; undefined8 uVar4; uint uVar5; byte *pbVar6; int iVar7; uint uVar8; uint uVar9; uVar2 = (ulong)_DAT_d8fd3810 & 0x3fffff; if (((uint)uVar2 >> 0xd & 1) == 0) { iVar3 = 0x400; if (((uint)(uVar2 >> 0xe) & 7) < 2) { iVar3 = 0x200; } } else { iVar3 = ((uint)(uVar2 >> 6) & 0x7f) << 3; } pbVar6 = &DAT_d9013008; uVar5 = 0; LAB_d900b3a4: if (uVar5 < param_3) { if ((DAT_d8fd3813 >> 2 & 1) == 0) { uVar8 = param_1 + 1; uVar9 = param_1; } else { bVar1 = *pbVar6; pbVar6 = pbVar6 + 1; uVar8 = param_1; uVar9 = (uint)bVar1; } param_1 = uVar8; uVar8 = 0; while( true ) { iVar7 = 0; do { uVar4 = FUN_d900adfc(iVar7 + uVar9,uVar5 + param_2); if ((int)uVar4 != 0x82) { if ((int)uVar4 != 0) { return uVar4; } uVar5 = uVar5 + iVar3 * ((uint)uVar2 & 0x3f); goto LAB_d900b3a4; } iVar7 = iVar7 + 0x100; } while (iVar7 != 0x400); if (_DAT_d8fd3816 <= uVar8) break; FUN_d900ade4(1); uVar8 = uVar8 + 1; } } else { uVar4 = 0; } return uVar4; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ ulong FUN_d900b44c(undefined4 *param_1) { ushort uVar1; uint uVar2; undefined *puVar3; ulong uVar4; undefined2 uVar5; puVar3 = get_efuse_data(); _DAT_d8fd3810 = CONCAT13((char)(((byte)puVar3[7] & 1) << 4), CONCAT12((char)(((byte)puVar3[6] >> 7 ^ 1) << 7),0xec01)) | 0x806b0000; *param_1 = 0x81000201; _DAT_d0074804 = (_DAT_d8fd3810 >> 0x1b & 3) << 10 | 0x80004065; uVar4 = FUN_d900a408(); if ((int)uVar4 != 0) { return uVar4; } if (((byte)puVar3[7] >> 1 & 1) == 0) { _DAT_d0074800 = 0x33800; uVar1 = (ushort)_DAT_d0074810 & 0xff; } else { uVar1 = 0x101; } if (((byte)puVar3[6] >> 6 & 1) == 0) { _DAT_d8fd3814 = CONCAT12((byte)puVar3[6] >> 6,uVar1) & 0x1ffff; } else { if (uVar1 == 0x45) { uVar5 = 0x16; goto LAB_d900b64c; } if (uVar1 < 0x46) { if ((((uVar1 == 7) || (uVar1 < 8)) || (uVar1 == 0x20)) || (uVar1 != 0x2c)) goto LAB_d900b654; LAB_d900b638: uVar5 = 8; } else { if (uVar1 == 0x98) goto LAB_d900b638; if (uVar1 < 0x99) { LAB_d900b654: _DAT_d8fd3814 = (uint)uVar1; goto LAB_d900b668; } if (uVar1 == 0xec) { uVar5 = 0xf; } else { if (uVar1 != 0x101) goto LAB_d900b654; uVar5 = 1; } } LAB_d900b64c: _DAT_d8fd3814 = CONCAT22(uVar5,uVar1); } LAB_d900b668: if ((puVar3[9] & 1) == 0) { uVar2 = FUN_d900b2f0(); } else { uVar2 = FUN_d900b334(0,&DAT_d9013000,0x180); } uVar4 = (ulong)uVar2; if (uVar2 == 0x82) { if ((_DAT_d8fd3814 & 0xffff) == 0x45) { _DAT_d8fd3814 = _DAT_d8fd3814 & 0xffff; _DAT_d8fd3810 = _DAT_d8fd3810 | 0x1000000; } else { if (((DAT_d8fd3813 >> 3 & 3) != 0) || (((_DAT_d8fd3814 & 0xffff) != 0xec && (_DAT_d8fd3814 != 0x98)))) goto LAB_d900b74c; _DAT_d8fd3810 = CONCAT13(DAT_d8fd3813 & 0xe0 | DAT_d8fd3813 & 7 | 0x10,_DAT_d8fd3810); _DAT_d0074804 = _DAT_d0074804 | 0x800; _DAT_c88344f0 = _DAT_c88344f0 & 0xffff7fff; } if ((puVar3[9] & 1) == 0) { uVar4 = FUN_d900b2f0(); } else { uVar4 = FUN_d900b334(0,&DAT_d9013000,0x180); } uVar4 = uVar4 & 0xffffffff; } LAB_d900b74c: if (((byte)puVar3[6] >> 5 & 1) != 0) { FUN_d90054cc(&DAT_d9013000,&DAT_d9013000,0x180); } _DAT_d8fd3814 = CONCAT22(DAT_d9013006,DAT_d9013004); _DAT_d8fd3810 = DAT_d9013000 & 0x9fffffff; _DAT_da100248 = _DAT_d8fd3814; _DAT_da100244 = _DAT_d8fd3810; return uVar4; } uint FUN_d900b7ec(long param_1,undefined4 *param_2) { uint uVar1; *(undefined4 *)(param_1 + 0x50) = *param_2; *(undefined4 *)(param_1 + 0x54) = param_2[1]; uVar1 = 0; if ((*(uint *)(param_1 + 0x50) >> 0x1e & 1) != 0) { uVar1 = *(uint *)(param_1 + 0x48) & 0x1fff; } param_2[3] = *(undefined4 *)(param_1 + 0x5c); return uVar1; } void FUN_d900b820(undefined8 param_1,uint param_2) { undefined4 local_10; uint local_c; DAT_d8fd3820 = DAT_d8fd3820 & 0x80 | DAT_d8fd3820 & 0xf | (byte)((param_2 & 7) << 4); local_c = (param_2 & 7) * 0x900 | 0x3b30000; local_10 = 0x6007400; FUN_d900b7ec(param_1,&local_10); return; } uint FUN_d900b870(long param_1,int param_2,int param_3,ulong param_4) { uint uVar1; long lVar2; uint uVar3; int iVar4; int iVar5; int iVar6; iVar6 = 0x200; if (DAT_d8fd3820 < '\0') { iVar6 = 1; } iVar4 = 0; *(undefined4 *)(param_1 + 0x50) = 0x11047201; iVar5 = param_3 + -0x200; uVar3 = 0; while( true ) { if (uVar3 == ((uint)(param_4 >> 9) & 0x7fffff)) { FUN_d90049d0(param_3 + uVar3 * 0x200 + -0x200,param_1 + 0x600,0x200); return 0; } lVar2 = param_1 + 0x400; if ((uVar3 & 1) != 0) { lVar2 = param_1 + 0x600; } *(int *)(param_1 + 0x58) = (int)lVar2; *(int *)(param_1 + 0x54) = iVar4 + iVar6 * param_2; if (uVar3 != 0) { lVar2 = param_1 + 0x600; if ((uVar3 & 1) != 0) { lVar2 = param_1 + 0x400; } FUN_d90049d0(iVar5,lVar2,0x200); } if ((*(uint *)(param_1 + 0x50) >> 0x1e & 1) != 0) break; iVar4 = iVar4 + iVar6; uVar1 = *(uint *)(param_1 + 0x5c) & 0xfcf80000; iVar5 = iVar5 + 0x200; if (uVar1 != 0) { return uVar1; } uVar3 = uVar3 + 1; } return *(uint *)(param_1 + 0x48) & 0x1fff; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d900b988(undefined8 param_1) { int iVar1; int iVar2; uint uVar3; uint uVar4; undefined4 local_10; int local_c; undefined4 local_4; iVar2 = 2; DAT_d8fd3821 = DAT_d8fd3821 | 1; do { local_c = 0; local_10 = 0x17000; FUN_d900b7ec(param_1,&local_10); local_c = 0x1aa; local_10 = 0x8007000; iVar1 = FUN_d900b7ec(param_1,&local_10); if (iVar1 == 0) { DAT_d8fd3821 = DAT_d8fd3821 & 0xfc | DAT_d8fd3821 & 1 | ((local_4 & 0x1ff) == 0x1aa) << 1; break; } iVar2 = iVar2 + -1; } while (iVar2 != 0); uVar3 = 0; while( true ) { uVar4 = 5000; if ((DAT_d8fd3820 >> 3 & 1) != 0) { uVar4 = 10; } if (uVar4 <= uVar3) goto LAB_d900bb1c; local_c = 0; local_10 = 0x37007000; iVar2 = FUN_d900b7ec(param_1,&local_10); if (iVar2 != 0) { return; } local_c = 0x200000; if ((DAT_d8fd3821 >> 1 & 1) != 0) { local_c = 0x40200000; } local_10 = 0x29107000; iVar2 = FUN_d900b7ec(param_1,&local_10); if (iVar2 != 0) { return; } if ((int)local_4 < 0) break; uVar3 = uVar3 + 1; } DAT_d8fd3820 = DAT_d8fd3820 & 0x7f | (byte)((local_4 >> 0x1e & 1) << 7); LAB_d900bb1c: local_10 = 0x2207000; local_c = 0; iVar2 = FUN_d900b7ec(param_1,&local_10); if (iVar2 == 0) { local_c = 0x10000; local_10 = 0x3007000; iVar2 = FUN_d900b7ec(param_1,&local_10); if (iVar2 == 0) { _DAT_d8fd3822 = local_4._2_2_; local_c = (uint)local_4._2_2_ << 0x10; local_10 = 0x9207000; iVar2 = FUN_d900b7ec(param_1,&local_10); if (iVar2 == 0) { local_c = (uint)_DAT_d8fd3822 << 0x10; local_10 = 0x7007400; iVar2 = FUN_d900b7ec(param_1,&local_10); if (iVar2 == 0) { local_c = (uint)_DAT_d8fd3822 << 0x10; local_10 = 0x37007000; iVar2 = FUN_d900b7ec(param_1,&local_10); if (iVar2 == 0) { local_c = (DAT_d8fd3820 & 7) << 1; local_10 = 0x6007000; FUN_d900b7ec(param_1,&local_10); } } } } } return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ ulong FUN_d900bcac(undefined8 param_1) { int iVar1; uint uVar2; uint uVar3; int iVar4; ulong uVar5; ulong uVar6; undefined4 local_10; uint local_c; uint local_4; iVar4 = 2; do { local_c = 0; local_10 = 0x17000; FUN_d900b7ec(param_1,&local_10); local_c = 0x40ff8000; local_10 = 0x1107000; iVar1 = FUN_d900b7ec(param_1,&local_10); if (iVar1 == 0) { uVar3 = 0; goto LAB_d900bd64; } iVar4 = iVar4 + -1; } while (iVar4 != 0); uVar2 = FUN_d900b988(param_1); LAB_d900bf94: return (ulong)uVar2; LAB_d900bd64: uVar2 = 5000; if ((DAT_d8fd3820 >> 3 & 1) != 0) { uVar2 = 10; } if (uVar2 <= uVar3) { LAB_d900bddc: _DAT_d8fd3822 = 1; local_10 = 0x2207000; local_c = 0; uVar5 = FUN_d900b7ec(param_1,&local_10); uVar6 = uVar5 & 0xffffffff; if ((int)uVar5 != 0) { return uVar6; } local_c = (uint)_DAT_d8fd3822 << 0x10; local_10._2_2_ = (undefined2)(uVar5 >> 0x10); local_10._0_1_ = (undefined)uVar5; local_10 = CONCAT13((char)(uVar6 >> 0x18), (int3)CONCAT22(local_10._2_2_, CONCAT11((char)(uVar6 >> 8),(undefined)local_10))) & 0xc0ff0fff | 0x3007000; uVar3 = FUN_d900b7ec(param_1,&local_10); if (uVar3 != 0) { return (ulong)uVar3; } local_c = (uint)_DAT_d8fd3822 << 0x10; local_10 = 0x9207000; uVar5 = FUN_d900b7ec(param_1,&local_10); uVar6 = uVar5 & 0xffffffff; if ((int)uVar5 != 0) { return uVar6; } local_c = (uint)_DAT_d8fd3822 << 0x10; local_10._2_2_ = (undefined2)(uVar5 >> 0x10); local_10._0_1_ = (undefined)uVar5; local_10 = CONCAT13((char)(uVar6 >> 0x18), (int3)CONCAT22(local_10._2_2_, CONCAT11((char)(uVar6 >> 8),(undefined)local_10))) & 0xc0ff0fff | 0x7007400; uVar5 = FUN_d900b7ec(param_1,&local_10); uVar6 = uVar5 & 0xffffffff; if ((int)uVar5 == 0) { local_c = (DAT_d8fd3820 & 7) << 8 | 0x3b70000; local_10._2_2_ = (undefined2)(uVar5 >> 0x10); local_10._0_1_ = (undefined)uVar5; local_10 = CONCAT13((char)(uVar6 >> 0x18), (int3)CONCAT22(local_10._2_2_, CONCAT11((char)(uVar6 >> 8),(undefined)local_10))) & 0xc0ff0fff | 0x6007400; iVar4 = FUN_d900b7ec(param_1,&local_10); if (iVar4 == 0) { local_c = (uint)_DAT_d8fd3822 << 0x10; local_10 = (uint)uVar6 & 0xc0ff0fff | 0xd007000; uVar3 = FUN_d900b7ec(param_1,&local_10); uVar6 = (ulong)uVar3; if (uVar3 != 0) { return uVar6; } if ((local_4 >> 7 & 1) == 0) { return uVar6; } } DAT_d8fd3820 = DAT_d8fd3820 & 0xf8; return uVar6; } return uVar6; } if ((int)local_4 < 0) { DAT_d8fd3820 = DAT_d8fd3820 & 0x7f | (byte)((local_4 >> 0x1e & 1) << 7); goto LAB_d900bddc; } local_c = 0x40ff8000; local_10 = 0x1107000; uVar2 = FUN_d900b7ec(param_1,&local_10); if (uVar2 != 0) goto LAB_d900bf94; uVar3 = uVar3 + 1; goto LAB_d900bd64; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d900bfb4(void) { _DAT_c8834528 = 0xffffffff; _DAT_c88344f0 = 0xffffffff; _DAT_c88344cc = 0xf0000000; _DAT_c88344c8 = 0x3f; _DAT_c8834448 = _DAT_c8834448 & 0xfffffdff; _DAT_c883444c = _DAT_c883444c & 0xfffffdff; FUN_d9004f44(10); _DAT_c883444c = _DAT_c883444c | 0x200; return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d900c05c(undefined4 *param_1) { *param_1 = 0x100023c; FUN_d9004f44(0xfa); _DAT_d8fd3820 = (uint)param_1[0x12] >> 0x13 & 1; param_1[0x11] = _DAT_d8fd3820 | 0x4790; FUN_d900bcac(param_1); param_1[0x11] = _DAT_d8fd3820 & 3 | 0x4790; *param_1 = 0x1000204; _DAT_da100244 = _DAT_d8fd3820; return; } void FUN_d900c12c(undefined8 param_1,undefined4 param_2,undefined8 param_3,undefined8 param_4, undefined4 param_5) { int iVar1; if ((DAT_d8fd3821 & 1) == 0) { iVar1 = FUN_d900b820(param_1,param_5); if (iVar1 != 0) { return; } } FUN_d900b870(param_1,param_2,param_3,param_4); return; } undefined8 FUN_d900c188(undefined8 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4) { undefined8 uVar1; int iVar2; iVar2 = 0; do { uVar1 = FUN_d900b870(param_1,param_2,param_3,param_4); if ((int)uVar1 == 0) { return 0; } if ((DAT_d8fd3821 & 1) != 0) { return uVar1; } uVar1 = FUN_d900b820(param_1,iVar2); if ((int)uVar1 != 0) { return uVar1; } iVar2 = iVar2 + 1; } while (iVar2 != 3); return 0; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined4 FUN_d900c2d4(void) { undefined4 uVar1; uVar1 = 1; if (_DAT_d8fd3828 != 0) { uVar1 = _DAT_d8fd382c; } return uVar1; } undefined8 FUN_d900c2f0(uint param_1) { uint *puVar1; uint uVar2; uint *puVar3; puVar3 = &DAT_d900d1c0; do { uVar2 = *puVar3; if (uVar2 == 0) { return 1; } puVar1 = puVar3 + 1; puVar3 = puVar3 + 2; } while ((*puVar1 < param_1) || (param_1 < uVar2)); return 0; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d900c410(undefined4 param_1) { _DAT_d8fd384c = param_1; return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d900c420(int param_1) { if (((_DAT_d8fd3830 == 1) && (_DAT_d8fd3838 != 0)) && (_DAT_d8fd3850 != param_1)) { _DAT_d8fd3850 = param_1; } return; } bool FUN_d900c450(undefined8 param_1,byte *param_2) { bool bVar1; int iVar2; bVar1 = false; if ((((*param_2 & 0x60) != 0) && ((byte)(param_2[1] - 1) < 7)) && ((1L << ((ulong)(byte)(param_2[1] - 1) & 0x3f) & 0x73U) != 0)) { iVar2 = FUN_d900c2f0((uint)*(ushort *)(param_2 + 4) + (uint)*(ushort *)(param_2 + 2) * 0x10000); bVar1 = iVar2 == 0; } return bVar1; } undefined4 FUN_d900c4b4(long param_1,byte *param_2) { uint uVar1; byte bVar2; uint *puVar3; int iVar4; uint *puVar5; uint uVar6; undefined4 uVar7; uint *puVar8; puVar8 = *(uint **)(param_1 + 0x10); uVar6 = 0; if ((*param_2 & 0x60) == 0) { return 0; } bVar2 = param_2[1]; if (bVar2 == 4) { iVar4 = FUN_d900c2f0(*puVar8); if ((iVar4 != 0) && (iVar4 = FUN_d900c2f0(puVar8[3]), iVar4 != 0)) { return 0; } LAB_d900c514: uVar7 = 1; } else { if (bVar2 < 5) { if (bVar2 == 3) { uVar1 = *(uint *)(param_1 + 0x18); for (; uVar6 < uVar1; uVar6 = uVar6 + 8) { iVar4 = FUN_d900c2f0(*(undefined4 *)((long)puVar8 + (ulong)uVar6)); if (iVar4 == 0) goto LAB_d900c514; } } } else if (bVar2 - 0x11 < 2) { uVar6 = *puVar8; if (uVar6 <= uVar6 + puVar8[1]) { puVar3 = &DAT_d900d1c0; do { puVar5 = puVar3; if (*puVar5 == 0) { return 0; } puVar3 = puVar5 + 2; } while (((uVar6 + puVar8[1]) - 1 < *puVar5) || (puVar5[1] < uVar6)); } goto LAB_d900c514; } uVar7 = 0; } return uVar7; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined8 FUN_d900c5a0(void) { int iVar1; undefined8 uVar2; if ((_DAT_d8fd3838 != 0) && (iVar1 = FUN_d9004f34(), _DAT_d8fd3850 < (uint)(iVar1 - _DAT_d8fd3854))) { return 2; } if ((_DAT_d8fd3848 != 0) && (_DAT_d8fd384c != 0)) { do { /* WARNING: Do nothing block with infinite loop */ } while( true ); } uVar2 = FUN_d90055c8(); return uVar2; } void FUN_d900c618(long param_1) { undefined4 uVar1; *(undefined *)(param_1 + 0x39) = 1; uVar1 = 2; if (*(char *)(param_1 + 0x38) == '\0') { uVar1 = 1; } FUN_d9005a14(param_1,uVar1); return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d900c634(long param_1,char *param_2) { uint uVar1; char cVar2; ushort uVar3; ushort uVar4; byte *pbVar5; uint uVar6; pbVar5 = _DAT_d8fd3840; cVar2 = param_2[1]; uVar3 = *(ushort *)(param_2 + 6); uVar6 = (uint)uVar3; if (cVar2 == '\b') { if (*param_2 == -0x80) { *_DAT_d8fd3840 = 1; *(byte **)(param_1 + 0x10) = pbVar5; *(undefined4 *)(param_1 + 0x18) = 1; } } else if (cVar2 == '\t') { if (*param_2 == '\0') { *(undefined4 *)(param_1 + 0x18) = 0; *(undefined8 *)(param_1 + 0x10) = 0; *(byte *)(param_1 + 0x3a) = *(byte *)(param_1 + 0x3a) | 1; } } else if ((cVar2 == '\x06') && (*param_2 == -0x80)) { uVar4 = *(ushort *)(param_2 + 2) >> 8; _DAT_d8fd3838 = 0; if (uVar4 == 2) { if (9 < uVar6) { FUN_d90049d0(_DAT_d8fd3840 + 9,&DAT_d900d210,0x17); uVar6 = 0x20; } FUN_d90049d0(_DAT_d8fd3840,&DAT_d900d228,9); pbVar5 = _DAT_d8fd3840; *(uint *)(param_1 + 0x18) = uVar6; *(byte **)(param_1 + 0x10) = pbVar5; } else if (uVar4 == 3) { cVar2 = (char)*(ushort *)(param_2 + 2); if (cVar2 == '\x01') { FUN_d90049d0(_DAT_d8fd3840,&DAT_d900d250,0x10); } else if (cVar2 == '\0') { FUN_d90049d0(_DAT_d8fd3840,&LAB_d900d248,4); } else if (cVar2 == '\x02') { FUN_d90049d0(_DAT_d8fd3840,&DAT_d900d260,0x10); } else { FUN_d90049d0(_DAT_d8fd3840,&DAT_d900d270,0x12); } pbVar5 = _DAT_d8fd3840; *(byte **)(param_1 + 0x10) = _DAT_d8fd3840; uVar1 = (uint)*pbVar5; if (uVar6 < *pbVar5) { uVar1 = uVar6; } *(uint *)(param_1 + 0x18) = uVar1; } else if (uVar4 == 1) { uVar6 = (uint)uVar3; if (0x11 < uVar3) { uVar6 = 0x12; } FUN_d90049d0(_DAT_d8fd3840,&DAT_d900d1f8,(short)uVar6); pbVar5 = _DAT_d8fd3840; *(uint *)(param_1 + 0x18) = uVar6; *(byte **)(param_1 + 0x10) = pbVar5; } } return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_d900c820(long param_1,char *param_2) { byte bVar1; ushort uVar2; undefined4 uVar3; undefined *puVar4; int iVar5; uint uVar6; uint uVar7; uint uVar8; puVar4 = _DAT_d8fd3840; bVar1 = param_2[1]; uVar2 = *(ushort *)(param_2 + 6); uVar6 = (uint)uVar2; if (bVar1 != 6) { uVar7 = (uint)*(ushort *)(param_2 + 4); uVar8 = (uint)*(ushort *)(param_2 + 2); if (6 < bVar1) { if (0x12 < bVar1) { if (bVar1 == 0x20) { *_DAT_d8fd3840 = 2; puVar4[1] = 4; uVar3 = _DAT_d8fd3828; puVar4[2] = 0; puVar4[4] = (char)uVar3; uVar3 = _DAT_d8fd382c; puVar4[3] = 0; puVar4[5] = (char)uVar3; puVar4[6] = 0; puVar4[7] = 0; *(undefined **)(param_1 + 0x10) = puVar4; if (8 < uVar6) { uVar6 = 8; } *(uint *)(param_1 + 0x18) = uVar6; _DAT_d8fd3838 = 0; return; } if (bVar1 != 0x35) { return; } *(uint *)(param_1 + 0x18) = uVar6; *(undefined **)(param_1 + 0x10) = puVar4; _DAT_d8fd382c = 0; return; } if (bVar1 < 0x11) { if (bVar1 != 7) { return; } LAB_d900c8e4: if (*param_2 != -0x40) { return; } iVar5 = FUN_d900c2d4(); if (iVar5 != 0) { FUN_d90049d0(_DAT_d8fd3840,uVar7 + uVar8 * 0x10000,uVar2); puVar4 = _DAT_d8fd3840; *(uint *)(param_1 + 0x18) = uVar6; *(undefined **)(param_1 + 0x10) = puVar4; return; } FUN_d90049d0(_DAT_d8fd3840,s_BAD_PASSWORD_d900d288,uVar2); puVar4 = _DAT_d8fd3840; *(uint *)(param_1 + 0x18) = uVar6; *(undefined **)(param_1 + 0x10) = puVar4; return; } *(uint *)(param_1 + 0x28) = uVar8; *(uint *)(param_1 + 0x2c) = uVar7; goto LAB_d900c960; } if ((bVar1 < 5) && (bVar1 < 3)) { if (bVar1 != 1) { if (bVar1 != 2) { return; } goto LAB_d900c8e4; } if (*param_2 != '@') { return; } iVar5 = FUN_d900c2d4(); if (iVar5 != 0) { *(ulong *)(param_1 + 0x10) = (ulong)(uVar7 + uVar8 * 0x10000); *(uint *)(param_1 + 0x18) = uVar6; return; } goto LAB_d900c960; } } if (*param_2 != '@') { return; } LAB_d900c960: puVar4 = _DAT_d8fd3840; *(uint *)(param_1 + 0x18) = uVar6; *(undefined **)(param_1 + 0x10) = puVar4; return; } void FUN_d900c9e4(long param_1) { int iVar1; iVar1 = *(int *)(param_1 + 0x2c) + -1; *(undefined *)(param_1 + 0x39) = 0; *(int *)(param_1 + 0x2c) = iVar1; *(int *)(param_1 + 0x30) = *(int *)(param_1 + 0x30) - *(int *)(param_1 + 0x34); if (iVar1 != 0) { *(long *)(param_1 + 0x20) = *(long *)(param_1 + 0x20) + (long)*(int *)(param_1 + 0x28); FUN_d900c618(); return; } return; } void FUN_d900ca20(long param_1,long param_2) { long lVar1; uint uVar2; long lVar3; lVar1 = 0; lVar3 = 0; for (uVar2 = 0; uVar2 < *(uint *)(param_1 + 0x408); uVar2 = uVar2 + 1) { lVar3 = ((ulong)*(uint *)(param_2 + lVar1) + lVar3) - (ulong)*(uint *)(param_1 + lVar1); *(int *)(param_2 + lVar1) = (int)lVar3; lVar3 = lVar3 >> 0x20; lVar1 = lVar1 + 4; } return; } void FUN_d900ca60(uint *param_1,uint *param_2,long param_3,uint *param_4) { long lVar1; uint uVar2; long lVar3; ulong uVar4; uint uVar5; ulong uVar6; ulong uVar7; ulong uVar8; for (uVar2 = 0; uVar2 < param_1[0x102]; uVar2 = uVar2 + 1) { param_2[uVar2] = 0; } for (uVar2 = 0; uVar2 < param_1[0x102]; uVar2 = uVar2 + 1) { uVar7 = (ulong)*(uint *)(param_3 + (ulong)uVar2 * 4); uVar4 = (ulong)*param_2 + uVar7 * *param_4; uVar8 = (ulong)(param_1[0x101] * (int)uVar4); uVar6 = (uVar4 & 0xffffffff) + uVar8 * *param_1; uVar5 = 1; lVar3 = 0; while( true ) { lVar1 = lVar3 + 4; if (param_1[0x102] <= uVar5) break; uVar5 = uVar5 + 1; uVar4 = (ulong)*(uint *)((long)param_2 + lVar1) + uVar7 * *(uint *)((long)param_4 + lVar1) + (uVar4 >> 0x20); uVar6 = (uVar6 >> 0x20) + uVar8 * *(uint *)((long)param_1 + lVar1) + (uVar4 & 0xffffffff); *(int *)((long)param_2 + lVar3) = (int)uVar6; lVar3 = lVar1; } uVar6 = (uVar6 >> 0x20) + (uVar4 >> 0x20); param_2[uVar5 - 1] = (uint)uVar6; if (uVar6 >> 0x20 != 0) { FUN_d900ca20(param_1,param_2); } } return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined8 FUN_d900cb5c(long param_1,undefined8 param_2,undefined8 param_3,undefined4 *param_4) { undefined4 *puVar1; undefined4 *puVar2; uint uVar3; undefined4 uVar4; uint uVar5; long lVar6; int iVar7; uint uVar8; int iVar9; ulong uVar10; byte *pbVar11; long lVar12; undefined4 *puVar13; undefined4 *puVar14; undefined4 *puVar15; int iVar16; byte local_200 [512]; iVar9 = *(int *)(param_1 + 0x408); if ((param_1 == 0) || (((iVar9 != 0x20 && (iVar9 != 0x40)) && (iVar9 != 0x80)))) { _DAT_d8fd3804 = 0x1391; return 0; } _DAT_d8fd3804 = 0x2784; FUN_d90049d0(local_200,param_2,iVar9 * 4); uVar3 = *(uint *)(param_1 + 0x408); _DAT_d8fd3804 = _DAT_d8fd3804 + 0x27e6; puVar1 = param_4 + (ulong)uVar3 * 2; for (uVar8 = 0; uVar8 < *(uint *)(param_1 + 0x408); uVar8 = uVar8 + 1) { uVar5 = ((*(uint *)(param_1 + 0x408) + 0x3fffffff) - uVar8) * 4; param_4[(int)uVar8] = (uint)local_200[uVar5 + 3] | (uint)local_200[uVar5] << 0x18 | (uint)local_200[uVar5 + 1] << 0x10 | (uint)local_200[uVar5 + 2] << 8; } iVar16 = 0; for (iVar7 = *(int *)(param_1 + 0x200); 0 < iVar7; iVar7 = iVar7 >> 1) { iVar16 = iVar16 + 1; } _DAT_d8fd3804 = _DAT_d8fd3804 + 0x3bd9; FUN_d900ca60(param_1,puVar1,param_4,param_1 + 0x204); puVar13 = puVar1; puVar15 = param_4 + uVar3; for (uVar8 = iVar16 - 2; -1 < (int)uVar8; uVar8 = uVar8 - 1) { FUN_d900ca60(param_1,puVar15,puVar13,puVar13); puVar2 = puVar13; if (puVar13 == puVar1) { puVar2 = param_4; } puVar14 = puVar2; puVar13 = puVar15; if ((1 << (ulong)(uVar8 & 0x1f) & *(uint *)(param_1 + 0x200)) != 0) { FUN_d900ca60(param_1,puVar2,puVar15,puVar1); puVar14 = puVar15; puVar13 = puVar2; } puVar15 = puVar14; } _DAT_d8fd3804 = _DAT_d8fd3804 + 0x13f3; FUN_d9004a48(puVar1,0,((ulong)*(uint *)(param_1 + 0x408) & 0x3fffffff) << 2); _DAT_d8fd3804 = _DAT_d8fd3804 + 0x13f3; *puVar1 = 1; FUN_d900ca60(param_1,puVar15,puVar13,puVar1); _DAT_d8fd3804 = _DAT_d8fd3804 + 0x13f3; do { uVar8 = *(uint *)(param_1 + 0x408); uVar10 = (ulong)uVar8; do { if ((int)uVar10 == 0) break; uVar10 = (ulong)((int)uVar10 - 1); uVar3 = *(uint *)(param_1 + uVar10 * 4); if ((uint)puVar15[uVar10] < uVar3) { pbVar11 = local_200; while (uVar8 = uVar8 - 1, -1 < (int)uVar8) { uVar4 = puVar15[(int)uVar8]; *pbVar11 = (byte)((uint)uVar4 >> 0x18); pbVar11[1] = (byte)((uint)uVar4 >> 0x10); pbVar11[2] = (byte)((uint)uVar4 >> 8); pbVar11[3] = (byte)uVar4; pbVar11 = pbVar11 + 4; } uVar10 = (ulong)(iVar9 * 4 - 0x20); lVar12 = 0; do { iVar9 = (int)lVar12; lVar6 = lVar12 + 2; lVar12 = lVar12 + 1; } while ((ulong)(long)iVar9 < uVar10 - 0x16); _DAT_d8fd3804 = _DAT_d8fd3804 + 0x8ba5; iVar9 = FUN_d9004990(local_200 + lVar6,&DAT_d900d2b8,0x14); if (iVar9 != 0x3c5a69c3) { _DAT_d8fd3804 = _DAT_d8fd3804 + 0x13f3; return 0; } _DAT_d8fd3804 = _DAT_d8fd3804 + 0x3bd9; iVar9 = FUN_d9004990(local_200 + uVar10,param_3,0x20); if (iVar9 != 0x3c5a69c3) { return 0; } _DAT_d8fd3804 = _DAT_d8fd3804 + 0x27e6; return 0x3c5a69c3; } } while ((uint)puVar15[uVar10] <= uVar3); FUN_d900ca20(param_1,puVar15); } while( true ); } undefined8 FUN_d900cf6c(uint param_1,undefined4 param_2) { undefined8 uVar1; if (param_1 < 0x41) { *(undefined4 *)(&DAT_d9013e00 + param_1) = param_2; uVar1 = 0; } else { uVar1 = 0xffffffff; } return uVar1; } undefined8 FUN_d900cfa0(uint param_1,undefined8 param_2,int param_3) { undefined8 uVar1; if ((param_1 < 0xc1) && (param_1 + param_3 < 0xc1)) { FUN_d90049d0(param_2,&DAT_d9013e40,param_3); uVar1 = 0; } else { uVar1 = 0xffffffff; } return uVar1; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined8 FUN_d900cfe8(uint param_1) { undefined8 uVar1; if (param_1 < _DAT_c8100234 >> 0x18) { uVar1 = 0xffffffff; _DAT_d8fd3808 = _DAT_d8fd3808 + 0x2f; } else { _DAT_d8fd3808 = _DAT_d8fd3808 + 0x5e; uVar1 = 0x5a3c69c3; } return uVar1; }