diff --git a/docs/architecture/ghidra-winphone-quick-ref.md b/docs/architecture/ghidra-winphone-quick-ref.md new file mode 100644 index 000000000..9768b7c48 --- /dev/null +++ b/docs/architecture/ghidra-winphone-quick-ref.md @@ -0,0 +1,61 @@ +# Ghidra Windows Phone quick reference + +The reverse-engineering toolchain is installed only in the enclosing workspace, +not globally. + +| Component | Workspace path | +|---|---| +| Ghidra 12.1.2 | `tools/ghidra_12.1.2_PUBLIC` | +| Ghidra projects | `tools/ghidra-projects` | +| v1.2.4.3 project | `WinPhoneTerraria` | +| v1.0.0.0 project | `WinPhoneTerraria1000` | +| Extraction script | `tools/ghidra-scripts/WinPhoneExtract.java` | +| ghidra-mcp v3.0.0 | `tools/ghidra-mcp` | +| MCP virtual environment | `tools/ghidra-mcp/.venv` | + +The Ghidra archive SHA-256 is +`b62e81a0390618466c019c60d8c2f796ced2509c4c1aea4a37644a77272cf99d`. + +## Extract from a saved project + +Set the workspace-local application directories before running headless Ghidra: + +```powershell +$env:APPDATA = 'D:\dev\ai\tedit\tools\ghidra-user\appdata' +$env:LOCALAPPDATA = 'D:\dev\ai\tedit\tools\ghidra-user\localappdata' + +& 'D:\dev\ai\tedit\tools\ghidra_12.1.2_PUBLIC\support\analyzeHeadless.bat' ` + 'D:\dev\ai\tedit\tools\ghidra-projects' 'WinPhoneTerraria1000' ` + -process 'WindowsPhone.exe' -noanalysis ` + -scriptPath 'D:\dev\ai\tedit\tools\ghidra-scripts' ` + -postScript WinPhoneExtract.java ` + 'output:D:\dev\ai\tedit\Terraria-Map-Editor\docs\reverse-engineering\winphone\ghidra\v1.0.0.0' ` + save:0076758c savecalls:0076758c +``` + +Extraction arguments include: + +- `ADDRESS`: print a decompilation. +- `save:ADDRESS`: save a decompilation in the selected output directory. +- `calls:ADDRESS`: print direct callees. +- `savecalls:ADDRESS`: save direct callees. +- `xref:ADDRESS`: list references to an address. +- `range:START:END`: list functions in an address range. +- `string:TEXT`: find defined strings and their callers. +- `scalar:VALUE`: find instructions using a numeric value. + +Durable extracts and the current function index are in +`docs/reverse-engineering/winphone/ghidra/README.md`. + +## Local MCP bridge + +Start the workspace server with `tools/Start-GhidraMcp.ps1`. Configure a project- +local MCP client to run: + +```text +D:\dev\ai\tedit\tools\ghidra-mcp\.venv\Scripts\python.exe +D:\dev\ai\tedit\tools\ghidra-mcp\bridge_mcp_ghidra.py +--ghidra-server http://127.0.0.1:8089/ +``` + +Do not add this server or its Python environment to global configuration. diff --git a/docs/architecture/win-phone-field-map.md b/docs/architecture/win-phone-field-map.md new file mode 100644 index 000000000..ea7779ce6 --- /dev/null +++ b/docs/architecture/win-phone-field-map.md @@ -0,0 +1,93 @@ +# Windows Phone editor field map + +This map records how the typed pre-tile primitive sequence is connected to +TEdit's `World` model. Primitive indices are logical entries, not byte offsets. +All unknown entries retain their original kind and value when saving. + +Status values: + +- **Editable**: loaded into an existing `World` property and written back from it. +- **Derived**: written from structural world data but not independently editable. +- **Opaque**: preserved exactly; no editor property is assigned yet. + +## Container fields + +| Field | v49 | v60 | Status | +|---|---|---|---| +| Version | `uint32` | `uint32` | Structural; changing version is rejected | +| CRC | zero in tutorial | reflected CRC-32 | Recalculated for nonzero-CRC containers | +| Title | UTF-8 | UTF-16LE | Editable through `World.Title` | +| Cloud flag/history | absent | native header values | Opaque | + +## Common metadata primitives + +| Index | Kind | Meaning | TEdit property | Status | +|---:|---|---|---|---| +| 0 | `int32` | World ID | `WorldId` | Editable | +| 1 | `int32` | Native revision/legacy value | — | Opaque | +| 2 | `int32` | Right pixel bound | `RightWorld` | Derived | +| 3 | `int16` | Bottom pixel bound | `BottomWorld` | Derived | +| 4 | `int16` | Tile height | `TilesHigh` | Derived; resizing not supported | +| 5 | `int16` | Tile width | `TilesWide` | Derived; resizing not supported | +| 6 | `int16` | Dungeon X | `DungeonX` | Editable model field | +| 7 | `int16` | Dungeon Y | `DungeonY` | Editable model field | +| 8 | `int16` | Surface level | `GroundLevel` | Editable | +| 9 | `int16` | Rock level | `RockLevel` | Editable | +| 10 | `int32` bits | Time as `float32` | `Time` | Editable | +| 11 | `byte` | Daytime flag | `DayTime` | Editable through time control | +| 12 | `byte` | Moon phase | `MoonPhase` | Editable | +| 13 | `byte` | Blood moon flag | `BloodMoon` | Editable | +| 14 | `int16` | Compact time/moon helper state | — | Opaque | + +## v49 tail + +| Indices | Meaning | Status | +|---|---|---| +| 15–16 | Spawn X/Y (`int16`) | Editable through spawn tool | +| 17–19 | Eye of Cthulhu, Eater of Worlds, Skeletron defeated | Editable | +| 20–22 | Goblin, Wizard, Mechanic rescued | Editable | +| 23–25 | Goblin Army, Clown, Frost Legion defeated | Editable | +| 26 | Shadow orb smashed | Editable | +| 27 | Meteor queued | Editable | +| 28 | Shadow orb count (`byte`) | Editable | +| 29 | Altar count (`int32`) | Editable | +| 30 | Hardmode | Editable | +| 31 | Invasion delay (`byte`) | Editable model field; not shown separately in the editor | +| 32 | Invasion size (`int16`) | Editable | +| 33 | Invasion type (`byte`) | Editable | +| 34 | Invasion X as `float32` bits | Editable | + +## v60 tail + +| Indices | Meaning | Status | +|---|---|---| +| 15–16 | Additional compact helper bytes | Opaque | +| 17–18 | Spawn X/Y (`int16`) | Editable through spawn tool | +| 19 | Crimson-world flag | Editable through `IsCrimson` | +| 20 | Raining flag | Editable through `IsRaining` | +| 21 | Rain time | Editable through `TempRainTime` | +| 22 | Maximum rain intensity as `float32` bits | Editable through `TempMaxRain` | +| 23 | Native weather scheduling value | Opaque | +| 24–32 | Same nine common progression flags as v49 indices 17–25 | Editable | +| 33–34 | Lepus and Turkor defeated | Opaque; mobile-only with no TEdit model field | +| 35 | Queen Bee defeated | Editable | +| 36–38 | Destroyer, Twins, Skeletron Prime defeated | Editable | +| 39 | Any mechanical boss defeated | Derived from the three mechanical boss fields | +| 40–42 | Plantera, Golem, Pirate Invasion defeated | Editable | +| 43–46 | Shadow orb smashed, meteor queued, orb count, altar count | Editable | +| 47–49 | Cobalt, Mythril, Adamantite ore tier IDs (`int16`) | Editable | +| 50 | Hardmode | Editable | +| 51 | Additional time-state snapshot value (`int16`) | Opaque | +| 52–55 | Invasion delay, size, type, and X (`byte`, `int16`, `byte`, `float32`) | Editable | +| 56–69 | Two compact biome-state blocks | Opaque | +| 70–78 | Packed styles and eight background bytes | Opaque | + +## Editable sections + +Tiles, chests, signs, NPCs, and character names use the existing editor models. +Chests and signs are reconciled into their fixed 1,000 native slots at save time. +For tiles, unchanged columns preserve native records; edited columns are written +as validated one-tile records to avoid stale RLE boundaries. + +The corresponding raw Ghidra functions and direct-call indexes are stored under +`docs/reverse-engineering/winphone/ghidra/`. diff --git a/docs/architecture/win-phone.md b/docs/architecture/win-phone.md new file mode 100644 index 000000000..66576cac9 --- /dev/null +++ b/docs/architecture/win-phone.md @@ -0,0 +1,190 @@ +# Windows Phone world format + +Status: Windows Phone v49 and v60 containers are detected and decoded through their character-name tables. The native header, metadata primitives, tiles, chests, signs, NPCs, and names are reconstructed by a section-aware serializer. All three fixtures save byte-for-byte through `World.Save`. + +The implementation is in `src/TEdit.Terraria/World.FileWinPhone.cs`. Reverse-engineering notes for the local Ghidra setup are in `ghidra-winphone-quick-ref.md`. +The editor-to-native metadata mapping is tracked in `win-phone-field-map.md`, and +raw saved Ghidra decompilations are indexed under +`docs/reverse-engineering/winphone/ghidra/`. + +## Verified fixtures + +| Fixture | Version | Size | Result | +|---|---:|---:|---| +| `_reference_sources/winphone/Terraria v1.0.0.0/Tutorial.world` | 49 | 1,538,009 | Full tile load and byte-identical save | +| `_reference_sources/winphone/Terraria v1.2.4.3/Tutorial.world` | 49 | 1,538,009 | Full tile load and byte-identical save; identical to the v1.0 copy | +| `src/TEdit.Tests/WorldFiles/win-phone.world` | 60 | 4,210,977 | Full tile load and byte-identical save | + +The two tutorial files have SHA-256 `2E06CDBDBB29604831AA149A94CDBA8A5C06A20C9DF6D0CE46F0BFEDBC2061F9`. + +## Native container header + +All integers are little-endian. + +| Field | Encoding | +|---|---| +| Version | `uint32` | +| CRC-32 | `uint32`; reflected polynomial `0xEDB88320`, calculated over bytes from offset 8 through EOF | +| Title length | `int32` character/byte count | +| Title | UTF-8 for versions below 50; UTF-16LE for version 50 and newer | +| Cloud flag | One byte for version 53 and newer | +| History | Version 53 has one `uint32`; later versions have `int32 count` followed by that many `uint32` values | + +The v49 tutorial CRC field is zero. The v60 fixture contains and passes the native CRC calculation. The value previously described as a fixed magic number is therefore a file-specific CRC, not a format signature. + +The body begins with these verified fields: + +| Relative offset | Field | Encoding | +|---:|---|---| +| `+0` | World ID | `int32` | +| `+4` | Revision/legacy value | `int32` where present | +| `+8` | Right pixel bound | `int32` | +| `+12` | Bottom pixel bound | `int16` | +| `+14` | Tile height | `int16` | +| `+16` | Tile width | `int16` | +| `+18` | Dungeon X | `int16` | +| `+20` | Dungeon Y | `int16` | +| `+22` | Surface level | `int16` | +| `+24` | Rock level | `int16` | + +Detection validates `right == width * 16` and `bottom == height * 16`. This prevents ordinary desktop V1 files in the same version range from being claimed as Windows Phone files. + +The remaining pre-tile metadata has an exact versioned primitive layout: + +| Block | v49 | v60 | +|---|---:|---:| +| Common bounds and layers above | 26 bytes | 26 bytes | +| World-state helper (`FUN_0073527c`/`FUN_00735318`) | 9 bytes | 11 bytes | +| Spawn X/Y | 4 bytes | 4 bytes | +| Extra v58 state plus weather (`FUN_00749890`/`FUN_00749d20`) | — | 14 bytes | +| Progression flags (`FUN_006598b4`/`FUN_00659a38`) | 9 bytes | 19 bytes | +| Moon/time/invasion/ore fields | 16 bytes | 24 bytes | +| Two biome-state blocks, packed styles, eight background bytes | — | 29 bytes | +| Total body prefix before the first marker | 64 bytes | 127 bytes | + +Fields without a confirmed gameplay name are retained as typed `byte`, `int16`, or `int32` primitives rather than assigned speculative names. The serializer writes the primitive sequence, not copied source bytes. + +Confirmed editor-backed fields are now materialized from the prefix and written +back from the normal `World` model: world ID, dungeon and spawn coordinates, +surface and rock levels, time and moon state, progression flags, rescued NPCs, +orb/meteor/altar state, hardmode, ore tiers, and the active invasion state. +The compact time value is a `float32` stored in the primitive sequence as its raw +four-byte bit pattern. Spawn follows the compact time/moon helper (9 bytes below +v58 and 11 bytes at v58+); it is not the pair at body offsets `+18/+20`. + +The native body is divided by the little-endian `int32` marker `0x162E`. Its complete sequence is: + +1. Metadata, marker. +2. Column-major tile grid, marker. +3. 1,000 sparse chest slots, marker. +4. 1,000 sparse sign slots, marker. +5. Sentinel-terminated NPC records, marker. +6. Character-name strings: 10 for v49 and 18 for v60. + +## Two tile encodings + +The v1.0 executable does not use one version-conditional tile reader. Its body loader dispatches versions below 58 to a legacy reader and versions 58 or newer to a compact reader. + +### Versions below 58 + +Recovered from `FUN_00733bac` in the v1.0.0.0 executable. Each record describes one tile followed by zero or more vertical duplicates. + +| Condition | Field | Encoding | +|---|---|---| +| Always | Active | `byte`, zero or nonzero | +| Active | Stored tile type | `byte` | +| Active and legacy-framed | Frame U, frame V | Two `int16` values | +| Always | Wall type | `byte` | +| Version > 50 | Wall color | `byte` | +| Always | Liquid amount | `byte` | +| Liquid amount != 0 | Lava flag | `byte`, zero for water and nonzero for lava | +| Always | Tile flags | `byte` | +| Always | Vertical repeat count | `int16` | + +The repeat count excludes the first tile, so a value of zero represents one tile. Runs cannot cross a column boundary. + +The legacy frame predicate is recovered exactly from `FUN_0072ad80`. It includes IDs 3–5; 10–18 except 19; 20, 21, 24, 26–29, 31, 33–36, 42, 50, 55, 61, 71–74, 77–79, 81–106, 110, 113, 114, 125–129, 132–139, 141–144, 149, and 150. + +The native migration maps stored types 35 and 36 to type 34 while shifting their frame V by 54 and 108 respectively. Stored type 150 maps to the internal placeholder type 500. Type 127 is decoded and then deactivated. + +### Versions 58 and newer + +Recovered from `FUN_00733858`. The v60 fixture uses this encoding. + +| Condition | Field | Encoding | +|---|---|---| +| Always | Header 1 | `byte`: active, red/green/blue wire, actuator, inactive flags | +| Active | Tile type | `uint16`; the native tile field is nine bits wide | +| Active and frame-important | Frame U, frame V | Two `int16` values | +| Active | Tile color | `byte` | +| Always | Wall type | `byte` | +| Wall != 0 | Wall color | `byte` | +| Always | Liquid amount | `byte` | +| Liquid amount != 0 | Liquid kind | `byte`; native value plus one maps to TEdit's enum | +| Always | Header 2 | `byte`; includes yellow wire | +| Versions 60–68 | Shape | `byte`; high nibble is the brick style | +| Always | Vertical repeat count | One or two bytes, 7-bit continuation encoding | + +Type 500 is a valid framed internal placeholder in the v60 stream, not corrupt input. + +The original RLE boundaries are encoding metadata. The v49 tutorial sometimes ends a run before a following semantically identical tile, so maximizing every run changes six bytes even though the decoded grid is unchanged. TEdit retains and validates those native boundaries. + +## Chests, signs, NPCs, and names + +Each chest slot begins with a presence byte and, when present, `int16 X`, `int16 Y`. + +- v49 has 20 items per chest. Every slot stores a one-byte stack; nonempty items then store `int16 net ID` and `byte prefix`. +- v60 has 40 items per chest. A one-byte mask length and five mask bytes select populated slots; each selected item stores `int16 stack`, `int16 net ID`, and `byte prefix`. + +Each sign slot begins with a presence byte and, when present, `int16 X`, `int16 Y`. v60 then has a text-present byte. Text uses the container string encoding: `int32 length` plus UTF-8 below version 50 or UTF-16LE at version 50 and newer. + +NPC records begin with byte `1`, then contain `byte sprite ID`, two `float32` positions, a homeless byte, and two `int16` home coordinates. A zero presence byte terminates the list. + +The character-name IDs are `17, 18, 19, 20, 22, 54, 38, 107, 108, 124, 160, 178, 207, 208, 209, 227, 228, 229`. v49 stores the first 10; v60 stores all 18. + +The v49 `Tutorial.world` is a fat bundled resource. The native v49 reader stops at offset 201,842 after its tenth name and ignores the remaining 1,336,167 bytes. TEdit reconstructs the complete parsed world and preserves this ignored bundle suffix verbatim. The v60 file ends at its eighteenth name. + +## Save behavior + +`World.SaveWinPhoneUnchanged` remains an explicit raw-copy utility. The normal +`World.Save` and `World.SaveAsync` paths require a full load, validate supported +edits, and reconstruct the header, metadata, tiles, section markers, chests, +signs, NPCs, and character names. They do not emit the original parsed bytes. + +Header edits for the confirmed editor-backed fields are serialized, and nonzero +native CRC values are regenerated. Chests and signs are reconciled back into the +native 1,000-slot sparse tables; NPCs and character names serialize from their +normal TEdit collections. A tile edit causes that native column to be rewritten +as one-tile records while unchanged columns retain their original flags and RLE +boundaries. The writer validates native type, coordinate, item-stack, liquid, +paint, and shape limits rather than silently truncating unsupported values. + +## Recovered native functions + +Addresses below are from the v1.0.0.0 Ghidra project. + +| Address | Purpose | +|---|---| +| `00768ed0` | Read the container version/header | +| `0076a604` | Dispatch body loader at version 58 | +| `00767f5c` | Legacy body reader | +| `00768798` | New body reader | +| `00733bac` | Legacy tile reader used by v49 | +| `00733858` | Compact tile reader used by v58+ | +| `0072ad80` | Legacy framed-tile predicate | +| `00733e90` | Current compact tile writer | +| `0076758c` | World body writer and section markers | +| `00605a60` / `00605b9c` | Read/write one chest inventory | +| `006082a4` / `00606768` | Read/write 1,000 chest slots | +| `00726440` / `007260ec` | Read/write one sign slot | +| `00735318` / `0073527c` | Read/write the compact world-state helper | +| `00749d20` / `00749890` | Read/write weather state | +| `00659a38` / `006598b4` | Read/write progression flags | + +## Tests + +`WinPhoneWorldTests` verifies header dispatch, complete tile allocation, decoded +section counts, native validation, byte-for-byte no-op saves, and edit/reload +behavior for metadata, progression, world state, tiles, and sparse entity data. + +The strongest serializer test loads each file, overwrites every cached source byte from offset zero through the end of the parsed world with `0xA5`, and reconstructs it. Output still matches the original byte-for-byte. For v60 this means no original file bytes participate in reconstruction; for v49 only the native-reader-ignored bundle suffix is preserved. diff --git a/docs/reverse-engineering/winphone/ghidra/README.md b/docs/reverse-engineering/winphone/ghidra/README.md new file mode 100644 index 000000000..a1d956d6b --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/README.md @@ -0,0 +1,66 @@ +# Windows Phone Ghidra extracts + +These files are raw Ghidra decompilations from the local Windows Phone Terraria +projects. They are retained so format work can cite native functions without +rerunning headless analysis or relying on terminal output. + +## Directory layout + +- `v1.0.0.0/` contains the legacy and compact world readers/writers, metadata + helpers, tile codecs, chest codecs, and sign codecs from `WinPhoneTerraria1000`. +- `v1.2.4.3/` contains the container, body, tile, chest, sign, CRC, and transformed + body functions from `WinPhoneTerraria`. +- `v1.0.0.0/world-state-xrefs/` contains durable cross-reference reports for + progression-adjacent orb, meteor, altar, ore, hardmode, time-state, and + invasion globals, plus decompiled callers used to identify their semantics. +- `*.c` is raw decompiler output named by function address. +- `*.calls.txt` lists direct callees for the corresponding orchestration function. + +The decompiler names are not authoritative. Confirm field meanings from paired +read/write order, version gates, fixture values, and observable editor behavior. + +## Key v1.0.0.0 functions + +| Address | Role | +|---|---| +| `0076758c` | Write complete native world body | +| `00767f5c` | Read pre-v58 world body | +| `00768798` | Read v58+ world body | +| `0073527c` / `00735318` | Write/read compact time and moon state | +| `00749890` / `00749d20` | Write/read weather state | +| `006598b4` / `00659a38` | Write/read progression flags | +| `00733bac` | Read legacy tile records | +| `00733858` / `00733e90` | Read/write compact tile records | +| `00605a60` / `00605b9c` | Read/write one chest inventory | +| `006082a4` / `00606768` | Read/write sparse chest table | +| `00726440` / `007260ec` | Read/write one sign slot | + +## Key v1.2.4.3 functions + +| Address | Role | +|---|---| +| `0078d7b4` / `00789a48` | Read/write native container header | +| `0078d0d8` / `0078dc9c` | Read/write complete world body | +| `0075bb00` / `0075c298` | Read/write compact tile records | +| `005ec460` / `005e9ef8` | Read/write sparse chest entries | +| `00749380` / `0074904c` | Read/write sign entries | +| `0078e920` | Verify CRC and dispatch transformed bodies | +| `007783c8` | Decode transformed v66+ body | + +## Regeneration + +The workspace extraction script supports an output directory followed by +`save:` and `savecalls:` arguments: + +```powershell +& 'D:\dev\ai\tedit\tools\ghidra_12.1.2_PUBLIC\support\analyzeHeadless.bat' ` + 'D:\dev\ai\tedit\tools\ghidra-projects' 'WinPhoneTerraria1000' ` + -process 'WindowsPhone.exe' -noanalysis ` + -scriptPath 'D:\dev\ai\tedit\tools\ghidra-scripts' ` + -postScript WinPhoneExtract.java ` + 'output:D:\dev\ai\tedit\Terraria-Map-Editor\docs\reverse-engineering\winphone\ghidra\v1.0.0.0' ` + save:0076758c savecalls:0076758c +``` + +Set workspace-local `APPDATA` and `LOCALAPPDATA` as described by the Ghidra +quick reference before running headless analysis. diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00605a60.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00605a60.c new file mode 100644 index 000000000..fad73d710 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00605a60.c @@ -0,0 +1,85 @@ + +void FUN_00605a60(void) + +{ + undefined4 uVar1; + int *piVar2; + uint uVar3; + int extraout_r2; + uint uVar4; + int iVar5; + uint uVar6; + int iVar7; + int iVar8; + undefined8 uVar9; + byte local_34 [2]; + ushort local_32; + undefined1 local_30; + undefined1 local_2f [3]; + byte local_2c [6]; + short local_26; + + uVar9 = FUN_007ffb80(); + piVar2 = (int *)((ulonglong)uVar9 >> 0x20); + iVar7 = (int)uVar9; + iVar8 = 0x28; + iVar5 = iVar7; + do { + FUN_00612a6c(iVar5); + iVar5 = iVar5 + 0xa0; + iVar8 = iVar8 + -1; + } while (iVar8 != 0); + local_2c[4] = 0; + local_2c[3] = 0; + local_2c[2] = 0; + local_2c[1] = 0; + local_2c[0] = 0; + if (extraout_r2 < 0x3a) { + uVar6 = 0; + do { + uVar4 = uVar6 & 7; + uVar3 = uVar6 >> 3; + uVar6 = uVar6 + 1; + local_2c[uVar3] = local_2c[uVar3] | (byte)(1 << uVar4); + } while ((int)uVar6 < 0x14); + } + else { + (**(code **)(*piVar2 + 0x1c))(piVar2,local_2f,1); + (**(code **)(*piVar2 + 0x1c))(piVar2,local_2c,local_2f[0]); + } + iVar5 = 0x28; + if (extraout_r2 < 0x3a) { + iVar5 = 0x14; + } + uVar6 = 0; + if (iVar5 != 0) { + do { + if ((1 << (uVar6 & 7) & (uint)local_2c[uVar6 >> 3]) != 0) { + local_32 = 0; + if (extraout_r2 < 0x37) { + local_34[0] = 0; + (**(code **)(*piVar2 + 0x1c))(piVar2,local_34,1); + local_32 = (ushort)local_34[0]; + } + else { + (**(code **)(*piVar2 + 0x1c))(piVar2,&local_32,2); + } + if (0 < (short)local_32) { + (**(code **)(*piVar2 + 0x1c))(piVar2,&local_26,2); + (**(code **)(*piVar2 + 0x1c))(piVar2,&local_30,1); + uVar1 = FUN_00613700((int)local_26,extraout_r2); + iVar8 = FUN_006129f8(extraout_r2,uVar1); + if (iVar8 < 0) { + FUN_006317fc(iVar7,uVar1,(int)(short)local_32); + FUN_00613df4(iVar7,local_30); + } + } + } + uVar6 = uVar6 + 1; + iVar7 = iVar7 + 0xa0; + } while ((int)uVar6 < iVar5); + } + FUN_007ffb98(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00605b9c.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00605b9c.c new file mode 100644 index 000000000..4574e66c6 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00605b9c.c @@ -0,0 +1,49 @@ + +void FUN_00605b9c(void) + +{ + int *piVar1; + uint uVar2; + int iVar3; + int iVar4; + undefined8 uVar5; + undefined2 local_2c [4]; + byte local_24 [8]; + + uVar5 = FUN_007ffb80(); + piVar1 = (int *)((ulonglong)uVar5 >> 0x20); + iVar4 = (int)uVar5; + uVar2 = 0; + local_24[4] = 0; + local_24[3] = 0; + local_24[2] = 0; + local_24[1] = 0; + local_24[0] = 0; + iVar3 = iVar4; + do { + if ((0 < *(short *)(iVar3 + 0x42)) && (*(int *)(iVar3 + 4) != 0)) { + local_24[uVar2 >> 3] = local_24[uVar2 >> 3] | (byte)(1 << (uVar2 & 7)); + } + uVar2 = uVar2 + 1; + iVar3 = iVar3 + 0xa0; + } while ((int)uVar2 < 0x28); + local_2c[0] = CONCAT11(local_2c[0]._1_1_,5); + (**(code **)(*piVar1 + 0x18))(piVar1,local_2c,1); + (**(code **)(*piVar1 + 0x18))(piVar1,local_24,5); + uVar2 = 0; + do { + if ((1 << (uVar2 & 7) & (uint)local_24[uVar2 >> 3]) != 0) { + local_2c[0] = *(undefined2 *)(iVar4 + 0x42); + (**(code **)(*piVar1 + 0x18))(piVar1,local_2c,2); + local_2c[0] = *(undefined2 *)(iVar4 + 0x80); + (**(code **)(*piVar1 + 0x18))(piVar1,local_2c,2); + local_2c[0] = CONCAT11(local_2c[0]._1_1_,*(undefined1 *)(iVar4 + 0x2c)); + (**(code **)(*piVar1 + 0x18))(piVar1,local_2c,1); + } + uVar2 = uVar2 + 1; + iVar4 = iVar4 + 0xa0; + } while ((int)uVar2 < 0x28); + FUN_007ffb98(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00606768.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00606768.c new file mode 100644 index 000000000..61ca761dd --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00606768.c @@ -0,0 +1,29 @@ + +void FUN_00606768(void) + +{ + int iVar1; + int *piVar2; + undefined8 uVar3; + undefined2 local_14; + + uVar3 = FUN_007ffb80(); + piVar2 = (int *)((ulonglong)uVar3 >> 0x20); + iVar1 = (int)uVar3; + if (*(char *)(iVar1 + 0x1904) != '\0') { + local_14 = (ushort)local_14._1_1_ << 8; + (**(code **)(*piVar2 + 0x18))(piVar2,&local_14,1); + FUN_007ffb98(); + return; + } + local_14 = CONCAT11(local_14._1_1_,1); + (**(code **)(*piVar2 + 0x18))(piVar2,&local_14,1); + local_14 = *(undefined2 *)(iVar1 + 0x1900); + (**(code **)(*piVar2 + 0x18))(piVar2,&local_14,2); + local_14 = *(undefined2 *)(iVar1 + 0x1902); + (**(code **)(*piVar2 + 0x18))(piVar2,&local_14,2); + FUN_00605b9c(iVar1,piVar2); + FUN_007ffb98(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/006082a4.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/006082a4.c new file mode 100644 index 000000000..8e1da5286 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/006082a4.c @@ -0,0 +1,34 @@ + +void FUN_006082a4(void) + +{ + int iVar1; + int *piVar2; + int iVar3; + int iVar4; + undefined8 uVar5; + char local_28 [4]; + + uVar5 = FUN_007ffb80(); + iVar1 = DAT_0060832c; + piVar2 = (int *)uVar5; + iVar3 = 0; + do { + iVar4 = iVar3 + DAT_00fd643c; + (**(code **)(*piVar2 + 0x1c))(piVar2,local_28,1); + if (local_28[0] == '\0') { + *(undefined1 *)(iVar4 + 0x1904) = 1; + } + else { + FUN_00606b24(iVar4); + *(undefined1 *)(iVar4 + 0x1904) = 0; + (**(code **)(*piVar2 + 0x1c))(piVar2,iVar4 + 0x1900,2); + (**(code **)(*piVar2 + 0x1c))(piVar2,iVar4 + 0x1902,2); + FUN_00605a60(iVar4,piVar2,(int)((ulonglong)uVar5 >> 0x20)); + } + iVar3 = iVar3 + 0x1908; + } while (iVar3 < iVar1); + FUN_007ffb98(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/006598b4.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/006598b4.c new file mode 100644 index 000000000..894a6a8f9 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/006598b4.c @@ -0,0 +1,50 @@ + +void FUN_006598b4(void) + +{ + int *piVar1; + undefined1 local_14 [4]; + + piVar1 = (int *)FUN_007ffb80(); + local_14[0] = DAT_00fe1f73; + (**(code **)(*piVar1 + 0x18))(piVar1,local_14,1); + local_14[0] = DAT_00fe1f7a; + (**(code **)(*piVar1 + 0x18))(piVar1,local_14,1); + local_14[0] = DAT_00fe1f7b; + (**(code **)(*piVar1 + 0x18))(piVar1,local_14,1); + local_14[0] = DAT_00fe1f7e; + (**(code **)(*piVar1 + 0x18))(piVar1,local_14,1); + local_14[0] = DAT_00fe1f7f; + (**(code **)(*piVar1 + 0x18))(piVar1,local_14,1); + local_14[0] = DAT_00fe1f82; + (**(code **)(*piVar1 + 0x18))(piVar1,local_14,1); + local_14[0] = DAT_00fe1f83; + (**(code **)(*piVar1 + 0x18))(piVar1,local_14,1); + local_14[0] = DAT_00fe1f85; + (**(code **)(*piVar1 + 0x18))(piVar1,local_14,1); + local_14[0] = DAT_00fe1f84; + (**(code **)(*piVar1 + 0x18))(piVar1,local_14,1); + local_14[0] = DAT_00fe1f86; + (**(code **)(*piVar1 + 0x18))(piVar1,local_14,1); + local_14[0] = DAT_00fe1f8f; + (**(code **)(*piVar1 + 0x18))(piVar1,local_14,1); + local_14[0] = DAT_00fe1f8c; + (**(code **)(*piVar1 + 0x18))(piVar1,local_14,1); + local_14[0] = DAT_00fe1f88; + (**(code **)(*piVar1 + 0x18))(piVar1,local_14,1); + local_14[0] = DAT_00fe1f89; + (**(code **)(*piVar1 + 0x18))(piVar1,local_14,1); + local_14[0] = DAT_00fe1f8a; + (**(code **)(*piVar1 + 0x18))(piVar1,local_14,1); + local_14[0] = DAT_00fe1f8b; + (**(code **)(*piVar1 + 0x18))(piVar1,local_14,1); + local_14[0] = DAT_00fe1f8d; + (**(code **)(*piVar1 + 0x18))(piVar1,local_14,1); + local_14[0] = DAT_00fe1f8e; + (**(code **)(*piVar1 + 0x18))(piVar1,local_14,1); + local_14[0] = DAT_00fe1f87; + (**(code **)(*piVar1 + 0x18))(piVar1,local_14,1); + FUN_007ffb98(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00659a38.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00659a38.c new file mode 100644 index 000000000..8b246f2cd --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00659a38.c @@ -0,0 +1,32 @@ + +void FUN_00659a38(int *param_1,int param_2,undefined4 param_3,undefined4 param_4) + +{ + (**(code **)(*param_1 + 0x1c))(param_1,&DAT_00fe1f73,1,*(code **)(*param_1 + 0x1c),param_4); + (**(code **)(*param_1 + 0x1c))(param_1,&DAT_00fe1f7a,1); + (**(code **)(*param_1 + 0x1c))(param_1,&DAT_00fe1f7b,1); + (**(code **)(*param_1 + 0x1c))(param_1,&DAT_00fe1f7e,1); + (**(code **)(*param_1 + 0x1c))(param_1,&DAT_00fe1f7f,1); + (**(code **)(*param_1 + 0x1c))(param_1,&DAT_00fe1f82,1); + (**(code **)(*param_1 + 0x1c))(param_1,&DAT_00fe1f83,1); + (**(code **)(*param_1 + 0x1c))(param_1,&DAT_00fe1f85,1); + (**(code **)(*param_1 + 0x1c))(param_1,&DAT_00fe1f84,1); + if (0x33 < param_2) { + (**(code **)(*param_1 + 0x1c))(param_1,&DAT_00fe1f86,1); + } + if (0x38 < param_2) { + (**(code **)(*param_1 + 0x1c))(param_1,&DAT_00fe1f8f,1); + } + if (0x39 < param_2) { + (**(code **)(*param_1 + 0x1c))(param_1,&DAT_00fe1f8c,1); + (**(code **)(*param_1 + 0x1c))(param_1,&DAT_00fe1f88,1); + (**(code **)(*param_1 + 0x1c))(param_1,&DAT_00fe1f89,1); + (**(code **)(*param_1 + 0x1c))(param_1,&DAT_00fe1f8a,1); + (**(code **)(*param_1 + 0x1c))(param_1,&DAT_00fe1f8b,1); + (**(code **)(*param_1 + 0x1c))(param_1,&DAT_00fe1f8d,1); + (**(code **)(*param_1 + 0x1c))(param_1,&DAT_00fe1f8e,1); + (**(code **)(*param_1 + 0x1c))(param_1,&DAT_00fe1f87,1); + } + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/007260ec.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/007260ec.c new file mode 100644 index 000000000..4519e006d --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/007260ec.c @@ -0,0 +1,30 @@ + +void FUN_007260ec(void) + +{ + short *psVar1; + int iVar2; + int *piVar3; + undefined8 uVar4; + undefined2 local_14; + + uVar4 = FUN_007ffb80(); + piVar3 = (int *)((ulonglong)uVar4 >> 0x20); + psVar1 = (short *)uVar4; + if ((-1 < *psVar1) && (iVar2 = thunk_FUN_007aa680(psVar1 + 2), iVar2 == 0)) { + local_14 = CONCAT11(local_14._1_1_,1); + (**(code **)(*piVar3 + 0x18))(piVar3,&local_14,1); + local_14 = *psVar1; + (**(code **)(*piVar3 + 0x18))(piVar3,&local_14,2); + local_14 = psVar1[1]; + (**(code **)(*piVar3 + 0x18))(piVar3,&local_14,2); + FUN_007464e0(psVar1 + 2,piVar3); + FUN_007ffb98(); + return; + } + local_14 = (ushort)local_14._1_1_ << 8; + (**(code **)(*piVar3 + 0x18))(piVar3,&local_14,1); + FUN_007ffb98(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00726440.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00726440.c new file mode 100644 index 000000000..f7cd10f2f --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00726440.c @@ -0,0 +1,56 @@ + +void FUN_00726440(void) + +{ + short *psVar1; + int iVar2; + int *piVar3; + int extraout_r2; + undefined8 uVar4; + undefined1 auStack_bc [48]; + undefined1 local_8c; + undefined1 local_8b; + undefined1 local_8a; + undefined1 auStack_84 [52]; + char local_50 [4]; + undefined1 auStack_4c [52]; + + uVar4 = FUN_007ffb80(); + piVar3 = (int *)((ulonglong)uVar4 >> 0x20); + psVar1 = (short *)uVar4; + (**(code **)(*piVar3 + 0x1c))(piVar3,local_50,1,*(code **)(*piVar3 + 0x1c),0xfffffffe,0xfffffffe); + if (local_50[0] == '\x01') { + if (extraout_r2 < 0x31) { + FUN_007aa9a8(auStack_4c); + FUN_006d6c24(piVar3,auStack_4c); + FUN_0074624c(auStack_bc,auStack_4c); + FUN_007aa80c(psVar1 + 2,auStack_84,auStack_bc); + FUN_007aa754(auStack_84); + *(undefined1 *)(psVar1 + 0x1a) = local_8c; + *(undefined1 *)((int)psVar1 + 0x35) = local_8b; + *(undefined1 *)(psVar1 + 0x1b) = local_8a; + thunk_FUN_007aa754(auStack_bc); + (**(code **)(*piVar3 + 0x1c))(piVar3,psVar1,2); + (**(code **)(*piVar3 + 0x1c))(piVar3,psVar1 + 1,2); + FUN_007aa754(auStack_4c); + } + else { + (**(code **)(*piVar3 + 0x1c))(piVar3,psVar1,2); + (**(code **)(*piVar3 + 0x1c))(piVar3,psVar1 + 1,2); + iVar2 = FUN_0074660c(auStack_84,piVar3,extraout_r2); + FUN_007aa80c(psVar1 + 2,auStack_4c,iVar2); + FUN_007aa754(auStack_4c); + *(undefined1 *)(psVar1 + 0x1a) = *(undefined1 *)(iVar2 + 0x30); + *(undefined1 *)((int)psVar1 + 0x35) = *(undefined1 *)(iVar2 + 0x31); + *(undefined1 *)(psVar1 + 0x1b) = *(undefined1 *)(iVar2 + 0x32); + thunk_FUN_007aa754(auStack_84); + } + FUN_007261a0(psVar1); + } + else if (-1 < *psVar1) { + thunk_FUN_007aa680(psVar1 + 2); + } + FUN_007ffb98(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00733858.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00733858.c new file mode 100644 index 000000000..f87658ee3 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00733858.c @@ -0,0 +1,174 @@ + +void FUN_00733858(void) + +{ + byte bVar1; + ushort uVar2; + int *piVar3; + int iVar4; + int iVar5; + byte *pbVar6; + byte *pbVar7; + byte *pbVar8; + short sVar9; + uint uVar10; + byte *pbVar11; + uint uVar12; + uint in_fpscr; + float fVar13; + float fVar14; + longlong lVar15; + uint local_3c; + byte local_38; + byte local_37; + byte local_36; + byte local_35; + byte local_34; + byte local_33; + byte local_32; + byte local_31 [13]; + + lVar15 = FUN_007ffb80(); + piVar3 = (int *)lVar15; + local_3c = 0; + if (0 < DAT_00902ea0) { + do { + if ((local_3c & 0x1f) == 0) { + iVar4 = FUN_0058ef48(); + fVar14 = (float)VectorSignedToFloat(local_3c,(byte)(in_fpscr >> 0x16) & 3); + fVar13 = (float)VectorSignedToFloat((int)DAT_00902ea0,(byte)(in_fpscr >> 0x16) & 3); + fVar14 = fVar14 / fVar13; + uVar12 = in_fpscr & 0xfffffff | (uint)(fVar14 < 1.0) << 0x1f | (uint)(fVar14 == 1.0) << 0x1e + ; + in_fpscr = uVar12 | (uint)NAN(fVar14) << 0x1c; + *(float *)(iVar4 + 0x2c10) = fVar14; + bVar1 = (byte)(uVar12 >> 0x18); + if (!(bool)(bVar1 >> 6 & 1) && bVar1 >> 7 == ((byte)(in_fpscr >> 0x1c) & 1)) { + *(float *)(iVar4 + 0x2c10) = 1.0; + } + } + iVar4 = 0; + pbVar11 = (byte *)(DAT_00902934 * local_3c * 0xe + DAT_00902928); + if (0 < DAT_00902ea4) { + do { + *pbVar11 = 0; + (**(code **)(*piVar3 + 0x1c))(piVar3,&local_37,1); + bVar1 = (pbVar11[1] ^ local_37) & 1 ^ pbVar11[1]; + pbVar11[1] = bVar1; + bVar1 = bVar1 ^ (bVar1 ^ local_37) & 2; + pbVar11[1] = bVar1; + bVar1 = bVar1 ^ (bVar1 ^ local_37) & 4; + pbVar11[1] = bVar1; + bVar1 = bVar1 ^ (bVar1 ^ local_37) & 0x18; + pbVar11[1] = bVar1; + bVar1 = local_37 ^ (bVar1 ^ local_37) & 0x7f; + pbVar11[1] = bVar1; + if ((bVar1 & 1) != 0) { + if (lVar15 < 0x3b00000000) { + (**(code **)(*piVar3 + 0x1c))(piVar3,local_31,1); + *(ushort *)(pbVar11 + 6) = (ushort)local_31[0]; + } + else { + (**(code **)(*piVar3 + 0x1c))(piVar3,pbVar11 + 6,2); + } + uVar2 = *(ushort *)(pbVar11 + 6); + uVar12 = (uint)uVar2; + if (uVar12 == 0x7f) { + pbVar11[1] = pbVar11[1] & 0xfe; + } + if (((&DAT_010262d0)[uVar12 * 4] & 0x10000) == 0) { + sVar9 = -1; + pbVar11[10] = 0xff; + pbVar11[0xb] = 0xff; + goto LAB_00733a08; + } + (**(code **)(*piVar3 + 0x1c))(piVar3,pbVar11 + 10,2); + (**(code **)(*piVar3 + 0x1c))(piVar3,pbVar11 + 0xc,2); + FUN_0072b00c(pbVar11,(int)((ulonglong)lVar15 >> 0x20)); + if (*(short *)(pbVar11 + 6) == 0x13) { + if (*(short *)(pbVar11 + 0xc) < 0) { + pbVar11[0xc] = 0; + pbVar11[0xd] = 0; + } + } + else if (*(short *)(pbVar11 + 6) == 0x90) { + pbVar11[0xc] = 0; + pbVar11[0xd] = 0; + } + else if (lVar15 < 0x3a00000000) { + if (uVar12 == 0x23) { + sVar9 = *(short *)(pbVar11 + 0xc) + 0x36; + } + else { + if (uVar12 != 0x24) goto LAB_00733a0a; + sVar9 = *(short *)(pbVar11 + 0xc) + 0x6c; + } +LAB_00733a08: + *(short *)(pbVar11 + 0xc) = sVar9; + } +LAB_00733a0a: + *(ushort *)(pbVar11 + 6) = uVar2; + (**(code **)(*piVar3 + 0x1c))(piVar3,&local_35,1); + *(ushort *)(pbVar11 + 2) = + (*(ushort *)(pbVar11 + 2) ^ (ushort)local_35) & 0x1f ^ *(ushort *)(pbVar11 + 2); + } + (**(code **)(*piVar3 + 0x1c))(piVar3,&local_36,1); + if (local_36 != 0) { + (**(code **)(*piVar3 + 0x1c))(piVar3,&local_32,1); + *(ushort *)(pbVar11 + 2) = + (*(ushort *)(pbVar11 + 2) ^ (ushort)local_32 << 5) & 0x3e0 ^ + *(ushort *)(pbVar11 + 2); + } + pbVar11[8] = local_36; + (**(code **)(*piVar3 + 0x1c))(piVar3,pbVar11 + 4,1); + if (pbVar11[4] != 0) { + (**(code **)(*piVar3 + 0x1c))(piVar3,&local_34,1); + *(ushort *)(pbVar11 + 2) = + *(ushort *)(pbVar11 + 2) ^ + (*(ushort *)(pbVar11 + 2) ^ (ushort)local_34 << 0xc) & 0x3000; + } + (**(code **)(*piVar3 + 0x1c))(piVar3,&local_38,1); + *pbVar11 = local_38 & 0x18 | *pbVar11; + uVar2 = (*(ushort *)(pbVar11 + 2) ^ (ushort)local_38 << 5) & 0x400 ^ + *(ushort *)(pbVar11 + 2); + *(ushort *)(pbVar11 + 2) = uVar2; + *(ushort *)(pbVar11 + 2) = uVar2 ^ (uVar2 ^ (ushort)local_38 << 5) & 0x800; + if (0x3bffffffff < lVar15) { + (**(code **)(*piVar3 + 0x1c))(piVar3,&local_33,1); + pbVar11[5] = local_33; + } + iVar5 = FUN_007a7d34(); + if (iVar5 != 0) { + *pbVar11 = *pbVar11 & 0xf7; + } + (**(code **)(*piVar3 + 0x1c))(piVar3,&local_38,1); + uVar12 = (uint)local_38; + if ((local_38 & 0x80) != 0) { + (**(code **)(*piVar3 + 0x1c))(piVar3,&local_38,1); + uVar12 = uVar12 & 0x7f | (uint)local_38 << 7; + } + if (uVar12 != 0) { + uVar10 = uVar12 * 0xe >> 1; + if (uVar10 != 0) { + pbVar6 = pbVar11; + pbVar7 = pbVar11 + 0xe; + do { + pbVar8 = pbVar7 + 2; + *(undefined2 *)pbVar7 = *(undefined2 *)pbVar6; + pbVar6 = pbVar6 + 2; + pbVar7 = pbVar8; + } while (pbVar8 != pbVar11 + 0xe + uVar10 * 2); + } + pbVar11 = pbVar11 + uVar12 * 0xe; + } + iVar4 = iVar4 + uVar12 + 1; + pbVar11 = pbVar11 + 0xe; + } while (iVar4 < DAT_00902ea4); + } + local_3c = local_3c + 1; + } while ((int)local_3c < (int)DAT_00902ea0); + } + FUN_007ffb98(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00733bac.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00733bac.c new file mode 100644 index 000000000..612be314d --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00733bac.c @@ -0,0 +1,151 @@ + +void FUN_00733bac(void) + +{ + int *piVar1; + int iVar2; + byte bVar3; + uint uVar4; + byte *pbVar5; + uint uVar6; + short sVar7; + uint in_fpscr; + float fVar8; + float fVar9; + longlong lVar10; + uint local_3c; + byte local_38 [2]; + short local_36; + char local_34 [2]; + undefined2 local_32; + byte local_30; + byte local_2f [11]; + + lVar10 = FUN_007ffb80(); + piVar1 = (int *)lVar10; + if (0 < DAT_00902ea0) { + local_3c = 0; + do { + if ((local_3c & 0x1f) == 0) { + iVar2 = FUN_0058ef48(); + fVar9 = (float)VectorSignedToFloat(local_3c,(byte)(in_fpscr >> 0x16) & 3); + fVar8 = (float)VectorSignedToFloat((int)DAT_00902ea0,(byte)(in_fpscr >> 0x16) & 3); + fVar9 = fVar9 / fVar8; + uVar4 = in_fpscr & 0xfffffff | (uint)(fVar9 < 1.0) << 0x1f | (uint)(fVar9 == 1.0) << 0x1e; + in_fpscr = uVar4 | (uint)NAN(fVar9) << 0x1c; + *(float *)(iVar2 + 0x2c10) = fVar9; + bVar3 = (byte)(uVar4 >> 0x18); + if (!(bool)(bVar3 >> 6 & 1) && bVar3 >> 7 == ((byte)(in_fpscr >> 0x1c) & 1)) { + *(float *)(iVar2 + 0x2c10) = 1.0; + } + } + sVar7 = 0; + pbVar5 = (byte *)(local_3c * DAT_00902934 * 0xe + DAT_00902928); + if (0 < DAT_00902ea4) { + do { + *pbVar5 = 0; + (**(code **)(*piVar1 + 0x1c))(piVar1,local_2f,1); + bVar3 = (pbVar5[1] ^ local_2f[0]) & 1 ^ pbVar5[1]; + pbVar5[1] = bVar3; + if ((bVar3 & 1) != 0) { + (**(code **)(*piVar1 + 0x1c))(piVar1,local_38,1); + uVar6 = (uint)local_38[0]; + uVar4 = uVar6; + if (lVar10 < 0x3a00000000) { + if ((uVar6 == 0x23) || (uVar6 == 0x24)) { + uVar4 = 0x22; + } + else if (uVar6 == 0x96) { + uVar4 = 500; + } + } + *(short *)(pbVar5 + 6) = (short)uVar4; + if (uVar4 == 0x7f) { + pbVar5[1] = pbVar5[1] & 0xfe; + } + iVar2 = FUN_0072ad80(uVar6); + if (iVar2 == 0) { + if (((&DAT_010262d0)[uVar4 * 4] & 0x10000) == 0) { + pbVar5[10] = 0xff; + pbVar5[0xb] = 0xff; + pbVar5[0xc] = 0xff; + pbVar5[0xd] = 0xff; + } + else { + pbVar5[10] = 0; + pbVar5[0xb] = 0; + pbVar5[0xc] = 0; + pbVar5[0xd] = 0; + } + } + else { + (**(code **)(*piVar1 + 0x1c))(piVar1,&local_32,2); + *(undefined2 *)(pbVar5 + 10) = local_32; + (**(code **)(*piVar1 + 0x1c))(piVar1,&local_32,2); + *(undefined2 *)(pbVar5 + 0xc) = local_32; + if (*(short *)(pbVar5 + 6) == 0x90) { + pbVar5[0xc] = 0; + pbVar5[0xd] = 0; + } + } + FUN_0072b00c(pbVar5,(int)((ulonglong)lVar10 >> 0x20)); + if (*(short *)(pbVar5 + 6) == 0x13) { + if (*(short *)(pbVar5 + 0xc) < 0) { + pbVar5[0xc] = 0; + pbVar5[0xd] = 0; + } + } + else if (*(short *)(pbVar5 + 6) == 0x90) { + pbVar5[0xc] = 0; + pbVar5[0xd] = 0; + } + else if (lVar10 < 0x3a00000000) { + if (uVar6 == 0x23) { + *(short *)(pbVar5 + 0xc) = *(short *)(pbVar5 + 0xc) + 0x36; + } + else if (uVar6 == 0x24) { + *(short *)(pbVar5 + 0xc) = *(short *)(pbVar5 + 0xc) + 0x6c; + } + } + } + (**(code **)(*piVar1 + 0x1c))(piVar1,&local_30,1); + pbVar5[8] = local_30; + if (0x32ffffffff < lVar10) { + (**(code **)(*piVar1 + 0x1c))(piVar1,local_38,1); + pbVar5[5] = local_38[0]; + } + (**(code **)(*piVar1 + 0x1c))(piVar1,local_38,1); + pbVar5[4] = local_38[0]; + if (local_38[0] != 0) { + (**(code **)(*piVar1 + 0x1c))(piVar1,local_34,1); + *(ushort *)(pbVar5 + 2) = + *(ushort *)(pbVar5 + 2) ^ + (*(ushort *)(pbVar5 + 2) ^ (ushort)(local_34[0] != '\0') << 0xc) & 0x3000; + } + (**(code **)(*piVar1 + 0x1c))(piVar1,local_38,1); + *pbVar5 = *pbVar5 | local_38[0]; + iVar2 = FUN_007a7d34(); + if (iVar2 != 0) { + *pbVar5 = *pbVar5 & 0xf7; + } + local_36 = 0; + (**(code **)(*piVar1 + 0x1c))(piVar1,&local_36,2); + sVar7 = sVar7 + local_36; + for (; 0 < local_36; local_36 = local_36 + -1) { + *(undefined4 *)(pbVar5 + 0xe) = *(undefined4 *)pbVar5; + *(undefined4 *)(pbVar5 + 0x12) = *(undefined4 *)(pbVar5 + 4); + *(undefined4 *)(pbVar5 + 0x16) = *(undefined4 *)(pbVar5 + 8); + *(undefined2 *)(pbVar5 + 0x1a) = *(undefined2 *)(pbVar5 + 0xc); + pbVar5 = pbVar5 + 0xe; + } + sVar7 = sVar7 + 1; + pbVar5 = pbVar5 + 0xe; + } while (sVar7 < DAT_00902ea4); + } + local_3c = (uint)(short)((short)local_3c + 1); + } while ((int)local_3c < (int)DAT_00902ea0); + } + FUN_007ffb98(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00733e90.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00733e90.c new file mode 100644 index 000000000..714779992 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00733e90.c @@ -0,0 +1,134 @@ + +void FUN_00733e90(void) + +{ + uint uVar1; + ushort uVar2; + char cVar3; + ushort uVar4; + int *piVar5; + int iVar6; + uint *puVar7; + int iVar8; + uint uVar9; + byte bVar10; + int iVar11; + int iVar12; + uint uVar13; + int iVar14; + int iVar15; + uint uVar16; + uint in_fpscr; + float fVar17; + float fVar18; + undefined4 local_44; + undefined4 local_40; + undefined4 local_3c; + ushort local_38; + undefined2 local_34; + + piVar5 = (int *)FUN_007ffb80(); + uVar16 = 0; + if (0 < DAT_00902ea0) { + do { + if ((uVar16 & 0x1f) == 0) { + iVar6 = FUN_0058ef48(); + fVar18 = (float)VectorSignedToFloat(uVar16,(byte)(in_fpscr >> 0x16) & 3); + fVar17 = (float)VectorSignedToFloat((int)DAT_00902ea0,(byte)(in_fpscr >> 0x16) & 3); + fVar18 = fVar18 / fVar17; + uVar1 = in_fpscr & 0xfffffff | (uint)(fVar18 < 1.0) << 0x1f | (uint)(fVar18 == 1.0) << 0x1e; + in_fpscr = uVar1 | (uint)NAN(fVar18) << 0x1c; + *(float *)(iVar6 + 0x2c10) = fVar18; + bVar10 = (byte)(uVar1 >> 0x18); + if (!(bool)(bVar10 >> 6 & 1) && bVar10 >> 7 == ((byte)(in_fpscr >> 0x1c) & 1)) { + *(float *)(iVar6 + 0x2c10) = 1.0; + } + } + iVar6 = 0; + if (0 < DAT_00902ea4) { + do { + puVar7 = (uint *)((DAT_00902934 * uVar16 + iVar6) * 0xe + DAT_00902928); + uVar9 = *puVar7; + local_3c = puVar7[2]; + uVar1 = puVar7[3]; + local_40._2_2_ = (ushort)(puVar7[1] >> 0x10); + uVar4 = local_40._2_2_; + uVar13 = (uint)local_40._2_2_; + local_44._1_1_ = (byte)(uVar9 >> 8); + bVar10 = local_44._1_1_; + if (uVar13 == 0x7f) { + bVar10 = local_44._1_1_ & 0xfe; + local_44 = uVar9 & 0xfffffeff; + uVar9 = local_44; + } + local_44 = uVar9; + local_34 = CONCAT11(local_34._1_1_,bVar10) & 0xff9f; + local_40 = puVar7[1]; + local_38 = (ushort)uVar1; + (**(code **)(*piVar5 + 0x18))(piVar5,&local_34,1); + uVar9 = local_44; + uVar2 = local_44._2_2_; + if ((bVar10 & 1) != 0) { + local_34 = uVar4; + (**(code **)(*piVar5 + 0x18))(piVar5,&local_34,2); + if (((&DAT_010262d0)[uVar13 * 4] & 0x10000) != 0) { + local_34 = local_3c._2_2_; + (**(code **)(*piVar5 + 0x18))(piVar5,&local_34,2); + local_34 = (ushort)uVar1; + (**(code **)(*piVar5 + 0x18))(piVar5,&local_34,2); + } + local_34 = CONCAT11(local_34._1_1_,(char)(uVar9 >> 0x10)) & 0xff1f; + (**(code **)(*piVar5 + 0x18))(piVar5,&local_34,1); + } + cVar3 = (char)local_3c; + local_34._0_1_ = (char)local_3c; + (**(code **)(*piVar5 + 0x18))(piVar5,&local_34,1); + if (cVar3 != '\0') { + local_34._0_1_ = (byte)(uVar2 >> 5) & 0x1f; + (**(code **)(*piVar5 + 0x18))(piVar5,&local_34,1); + } + cVar3 = (char)local_40; + local_34._0_1_ = (char)local_40; + (**(code **)(*piVar5 + 0x18))(piVar5,&local_34,1); + if (cVar3 != '\0') { + local_34._0_1_ = (byte)(uVar9 >> 0x1c) & 3; + (**(code **)(*piVar5 + 0x18))(piVar5,&local_34,1); + } + local_34._0_1_ = + (byte)local_44 & 0x18 | (byte)((uVar2 >> 10 & 1 | (uVar2 >> 0xb & 1) << 1) << 5); + (**(code **)(*piVar5 + 0x18))(piVar5,&local_34,1); + local_34 = CONCAT11(local_34._1_1_,local_40._1_1_); + (**(code **)(*piVar5 + 0x18))(piVar5,&local_34,1); + iVar11 = 1; + iVar14 = iVar6 + 1; + iVar15 = (int)DAT_00902ea4; + if (iVar14 < iVar15) { + iVar12 = (DAT_00902934 * uVar16 + iVar6 + 1) * 0xe + DAT_00902928; + do { + iVar8 = FUN_0072b574(&local_44,iVar12); + if (iVar8 == 0) break; + iVar14 = iVar14 + 1; + iVar11 = iVar11 + 1; + iVar12 = iVar12 + 0xe; + } while (iVar14 < iVar15); + } + iVar11 = iVar11 + -1; + if (iVar11 < 0x80) { + local_34 = CONCAT11(local_34._1_1_,(char)iVar11); + } + else { + local_34 = CONCAT11(local_34._1_1_,(char)iVar11) | 0x80; + (**(code **)(*piVar5 + 0x18))(piVar5,&local_34,1); + local_34 = CONCAT11(local_34._1_1_,(char)(iVar11 >> 7)); + } + (**(code **)(*piVar5 + 0x18))(piVar5,&local_34,1); + iVar6 = iVar6 + iVar11 + 1; + } while (iVar6 < DAT_00902ea4); + } + uVar16 = uVar16 + 1; + } while ((int)uVar16 < (int)DAT_00902ea0); + } + FUN_007ffb98(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/0073527c.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/0073527c.c new file mode 100644 index 000000000..d93caaabd --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/0073527c.c @@ -0,0 +1,30 @@ + +void FUN_0073527c(void) + +{ + int iVar1; + int *piVar2; + undefined8 uVar3; + undefined4 local_14; + + uVar3 = FUN_007ffb80(); + piVar2 = (int *)((ulonglong)uVar3 >> 0x20); + iVar1 = (int)uVar3; + local_14 = *(undefined4 *)(iVar1 + 4); + (**(code **)(*piVar2 + 0x18))(piVar2,&local_14,4); + local_14._0_1_ = *(undefined1 *)(iVar1 + 8); + (**(code **)(*piVar2 + 0x18))(piVar2,&local_14,1); + local_14._0_1_ = *(undefined1 *)(iVar1 + 0xc); + (**(code **)(*piVar2 + 0x18))(piVar2,&local_14,1); + local_14 = CONCAT31(local_14._1_3_,*(undefined1 *)(iVar1 + 10)); + (**(code **)(*piVar2 + 0x18))(piVar2,&local_14,1); + local_14 = CONCAT22(local_14._2_2_,*(undefined2 *)(iVar1 + 0xe)); + (**(code **)(*piVar2 + 0x18))(piVar2,&local_14,2); + local_14._0_1_ = *(undefined1 *)(iVar1 + 9); + (**(code **)(*piVar2 + 0x18))(piVar2,&local_14,1); + local_14 = CONCAT31(local_14._1_3_,(char)*(undefined2 *)(iVar1 + 0x12) + 'o'); + (**(code **)(*piVar2 + 0x18))(piVar2,&local_14,1); + FUN_007ffb98(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00735318.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00735318.c new file mode 100644 index 000000000..5cd5a2887 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00735318.c @@ -0,0 +1,28 @@ + +void FUN_00735318(void) + +{ + undefined4 *puVar1; + int *piVar2; + int extraout_r2; + undefined8 uVar3; + byte local_1c [8]; + + uVar3 = FUN_007ffb80(); + piVar2 = (int *)((ulonglong)uVar3 >> 0x20); + puVar1 = (undefined4 *)uVar3; + *puVar1 = 0x3f800000; + (**(code **)(*piVar2 + 0x1c))(piVar2,puVar1 + 1,4); + (**(code **)(*piVar2 + 0x1c))(piVar2,puVar1 + 2,1); + (**(code **)(*piVar2 + 0x1c))(piVar2,puVar1 + 3,1); + (**(code **)(*piVar2 + 0x1c))(piVar2,(int)puVar1 + 10,1); + (**(code **)(*piVar2 + 0x1c))(piVar2,(int)puVar1 + 0xe,2); + if (0x39 < extraout_r2) { + (**(code **)(*piVar2 + 0x1c))(piVar2,(int)puVar1 + 9,1); + (**(code **)(*piVar2 + 0x1c))(piVar2,local_1c,1); + *(ushort *)((int)puVar1 + 0x12) = local_1c[0] + 0x1291; + } + FUN_007ffb98(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00749890.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00749890.c new file mode 100644 index 000000000..9e54283c9 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00749890.c @@ -0,0 +1,21 @@ + +void FUN_00749890(void) + +{ + int *piVar1; + undefined1 local_1c [4]; + undefined4 local_18 [2]; + + piVar1 = (int *)FUN_007ffb80(); + local_1c[0] = DAT_010299a0; + (**(code **)(*piVar1 + 0x18))(piVar1,local_1c,1); + local_18[0] = DAT_010299a4; + (**(code **)(*piVar1 + 0x18))(piVar1,local_18,4); + local_18[0] = DAT_010299a8; + (**(code **)(*piVar1 + 0x18))(piVar1,local_18,4); + local_18[0] = DAT_010299b4; + (**(code **)(*piVar1 + 0x18))(piVar1,local_18,4); + FUN_007ffb98(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00749d20.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00749d20.c new file mode 100644 index 000000000..89a153470 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00749d20.c @@ -0,0 +1,27 @@ + +void FUN_00749d20(int *param_1,int param_2) + +{ + uint uVar1; + uint in_fpscr; + float fVar2; + + if (0x39 < param_2) { + (**(code **)(*param_1 + 0x1c))(param_1,&DAT_010299a0,1); + (**(code **)(*param_1 + 0x1c))(param_1,&DAT_010299a4,4); + (**(code **)(*param_1 + 0x1c))(param_1,&DAT_010299a8,4); + (**(code **)(*param_1 + 0x1c))(param_1,&DAT_010299b4,4); + return; + } + uVar1 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar1 = DAT_00fd6800 ^ (uVar1 ^ DAT_00fd6800 >> 0xb) >> 8 ^ uVar1; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = uVar1; + fVar2 = (float)VectorSignedToFloat(uVar1 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_010299b4 = VectorSignedToFloat(DAT_00749ddc - (int)(fVar2 * DAT_00749dd8 * DAT_00749dd4), + (byte)(in_fpscr >> 0x16) & 3); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/0076758c.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/0076758c.c new file mode 100644 index 000000000..d4295d10f --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/0076758c.c @@ -0,0 +1,355 @@ + +void FUN_0076758c(void) + +{ + int *piVar1; + undefined4 uVar2; + int iVar3; + uint uVar4; + undefined4 *puVar5; + undefined4 uVar6; + code *pcVar7; + int iVar8; + uint local_81a [4]; + undefined4 local_80a; + uint local_806; + uint local_802 [4]; + undefined4 local_7f2; + uint local_7ee; + undefined4 local_7ea; + undefined4 local_7e6; + undefined4 local_7e2; + undefined4 local_7de; + undefined4 local_7da; + undefined4 local_7d6; + undefined4 local_7d2; + undefined4 uStack_7ce; + undefined1 auStack_7ca [48]; + undefined1 auStack_79a [48]; + undefined1 auStack_76a [48]; + undefined1 auStack_73a [628]; + undefined1 local_4c6 [4]; + undefined1 local_4c2 [4]; + undefined1 local_4be [4]; + undefined1 local_4ba [4]; + undefined1 local_4b6 [4]; + undefined1 local_4b2 [4]; + undefined1 local_4ae [4]; + undefined1 local_4aa [4]; + undefined1 local_4a6 [4]; + undefined1 local_4a2 [4]; + undefined1 local_49e [4]; + undefined1 local_49a [4]; + undefined1 local_496 [4]; + byte local_492 [4]; + undefined1 local_48e [4]; + undefined1 local_48a [4]; + undefined1 local_486 [4]; + undefined1 local_482 [4]; + undefined1 local_47e [4]; + undefined1 local_47a [4]; + undefined2 local_476 [2]; + undefined2 local_472 [2]; + undefined2 local_46e [2]; + undefined2 local_46a [2]; + undefined2 local_466 [2]; + undefined2 local_462 [2]; + undefined2 local_45e [2]; + undefined2 local_45a [2]; + undefined2 local_456 [2]; + undefined2 local_452 [2]; + undefined2 local_44e [2]; + undefined2 local_44a [2]; + undefined2 local_446 [2]; + undefined2 local_442 [2]; + undefined2 local_43e [2]; + undefined2 local_43a [2]; + undefined1 *local_436; + undefined4 local_432; + undefined4 local_42e; + undefined4 local_42a; + undefined4 local_426; + undefined4 local_422; + undefined4 local_41e; + undefined4 local_41a; + undefined4 local_416; + undefined4 local_412; + undefined4 local_40e; + undefined4 local_40a [2]; + undefined4 local_402; + undefined4 local_3fe; + undefined4 local_3fa; + undefined4 local_3f6; + undefined2 local_3f2; + undefined2 local_3f0; + undefined1 local_3ee [16]; + undefined4 local_3de; + undefined4 local_3da; + undefined2 local_3d6 [8]; + undefined4 local_3c6; + undefined4 local_3c2; + undefined1 local_3be; + undefined1 local_3bd; + undefined1 local_3bc; + undefined1 auStack_3ba [16]; + undefined1 auStack_3aa [256]; + char local_2aa; + undefined4 local_2a6; + char local_292; + undefined1 local_291; + undefined4 local_272; + undefined4 local_26e; + undefined2 local_1b8; + undefined2 local_1b6; + undefined4 local_13a; + undefined1 auStack_132 [270]; + + FUN_007ffb80(); + piVar1 = (int *)FUN_00800e30(); + local_7d2 = 0xfffffffe; + uStack_7ce = 0xfffffffe; + if (DAT_0102a71a == '\x01') { + local_806 = 0xf; + local_80a = 0; + local_81a[0] = local_81a[0] & 0xffffff00; + FUN_0041bc2c(local_81a,"GEN[48]",7); + uVar2 = FUN_005f82b0(auStack_79a,local_81a); + iVar3 = FUN_0058ef48(); + FUN_007aa80c(iVar3 + 0x2b10,auStack_76a,uVar2); + FUN_007aa754(auStack_76a); + FUN_007aa754(auStack_79a); + if (0xf < local_806) { + FUN_00431740(local_81a[0]); + } + local_806 = 0xf; + local_80a = 0; + local_81a[0] = local_81a[0] & 0xffffff00; + local_7ea = 0x20; + local_7e6 = 0; + do { + FUN_004a22ac(&local_7e2,&local_7ea); + local_402 = local_7e2; + local_3fe = local_7de; + local_3f6 = local_7d6; + local_3fa = local_7da; + uVar4 = Concurrency::details::_CurrentScheduler::_Id(); + if (uVar4 == 0xffffffff) { + puVar5 = &local_402; + pcVar7 = _Thrd_sleep_exref; + } + else { + xtime_get(auStack_3ba,1); + puVar5 = (undefined4 *)_Xtime_diff_to_millis2(&local_402,auStack_3ba); + pcVar7 = wait_exref; + } + (*pcVar7)(puVar5); + } while (DAT_0102a71a != '\0'); + } + local_7ee = 0xf; + local_7f2 = 0; + local_802[0] = local_802[0] & 0xffffff00; + FUN_0041bc2c(local_802,"GEN[49]",7); + uVar2 = FUN_005f82b0(auStack_7ca,local_802); + uVar6 = FUN_0058ef48(); + FUN_007369b0(uVar6,1,uVar2); + FUN_007aa754(auStack_7ca); + if (0xf < local_7ee) { + FUN_00431740(local_802[0]); + } + local_7ee = 0xf; + local_7f2 = 0; + local_802[0] = local_802[0] & 0xffffff00; + DAT_01030850 = DAT_010703d8; + DAT_01030854 = DAT_010703dc; + DAT_01030858 = DAT_010703e0; + DAT_01030859 = DAT_010703e1; + DAT_0103085a = DAT_010703e2; + DAT_0103085b = DAT_010703e3; + DAT_0103085c = DAT_010703e4; + DAT_0103085e = DAT_010703e6; + DAT_01030860 = DAT_010703e8; + DAT_01030862 = DAT_010703ea; + DAT_01030864 = DAT_010703ec; + DAT_01030868 = DAT_010703f0; + DAT_0103086c = DAT_010703f4; + DAT_0103086e = DAT_010703f6; + DAT_01030870 = DAT_010703f8; + DAT_01030874 = DAT_010703fc; + DAT_01030878 = DAT_01070400; + DAT_0103087c = DAT_01070404; + DAT_01030880 = DAT_01070408; + DAT_01030884 = DAT_0107040c; + DAT_01030888 = DAT_01070410; + DAT_0103088c = DAT_01070414; + DAT_01030890 = DAT_01070418; + DAT_01030894 = DAT_0107041c; + FUN_0076151c(piVar1); + local_416 = DAT_01033974; + (**(code **)(*piVar1 + 0x18))(piVar1,&local_416,4); + local_42a = DAT_01033970; + (**(code **)(*piVar1 + 0x18))(piVar1,&local_42a,4); + local_40e = DAT_00902e98; + (**(code **)(*piVar1 + 0x18))(piVar1,&local_40e,4); + local_456[0] = (undefined2)DAT_00902e9c; + (**(code **)(*piVar1 + 0x18))(piVar1,local_456,2); + local_43e[0] = DAT_00902ea4; + (**(code **)(*piVar1 + 0x18))(piVar1,local_43e,2); + local_46a[0] = DAT_00902ea0; + (**(code **)(*piVar1 + 0x18))(piVar1,local_46a,2); + local_462[0] = DAT_010338cc; + (**(code **)(*piVar1 + 0x18))(piVar1,local_462,2); + local_45a[0] = DAT_010338c8; + (**(code **)(*piVar1 + 0x18))(piVar1,local_45a,2); + local_452[0] = (undefined2)DAT_00902ebc; + (**(code **)(*piVar1 + 0x18))(piVar1,local_452,2); + local_44a[0] = (undefined2)DAT_01033960; + (**(code **)(*piVar1 + 0x18))(piVar1,local_44a,2); + FUN_0073527c(&DAT_01030850,piVar1); + local_442[0] = DAT_01033968; + (**(code **)(*piVar1 + 0x18))(piVar1,local_442,2); + local_43a[0] = DAT_01033964; + (**(code **)(*piVar1 + 0x18))(piVar1,local_43a,2); + local_4c2[0] = DAT_0102a787; + (**(code **)(*piVar1 + 0x18))(piVar1,local_4c2,1); + FUN_00749890(piVar1); + FUN_006598b4(piVar1); + local_496[0] = DAT_0102a76f; + (**(code **)(*piVar1 + 0x18))(piVar1,local_496,1); + local_4ba[0] = DAT_0102a780; + (**(code **)(*piVar1 + 0x18))(piVar1,local_4ba,1); + local_4b2[0] = (undefined1)DAT_0102a778; + (**(code **)(*piVar1 + 0x18))(piVar1,local_4b2,1); + local_422 = DAT_0102a77c; + (**(code **)(*piVar1 + 0x18))(piVar1,&local_422,4); + local_46e[0] = DAT_00902c30; + (**(code **)(*piVar1 + 0x18))(piVar1,local_46e,2); + local_472[0] = DAT_00902c34; + (**(code **)(*piVar1 + 0x18))(piVar1,local_472,2); + local_476[0] = DAT_00902c38; + (**(code **)(*piVar1 + 0x18))(piVar1,local_476,2); + local_4aa[0] = DAT_010338d3; + (**(code **)(*piVar1 + 0x18))(piVar1,local_4aa,1); + local_446[0] = DAT_01030860; + (**(code **)(*piVar1 + 0x18))(piVar1,local_446,2); + local_4a2[0] = (undefined1)DAT_010339ac; + (**(code **)(*piVar1 + 0x18))(piVar1,local_4a2,1); + local_466[0] = (undefined2)DAT_010339a8; + (**(code **)(*piVar1 + 0x18))(piVar1,local_466,2); + local_49a[0] = (undefined1)DAT_010339a0; + (**(code **)(*piVar1 + 0x18))(piVar1,local_49a,1); + local_41a = DAT_010339a4; + (**(code **)(*piVar1 + 0x18))(piVar1,&local_41a,4); + FUN_0074cb9c(&DAT_0102a710,piVar1); + FUN_0074cb4c(&DAT_0102a704,piVar1); + local_492[0] = (byte)DAT_0102a700 | (byte)((DAT_0102a6f8 | DAT_0102a6fc << 2) << 2); + (**(code **)(*piVar1 + 0x18))(piVar1,local_492,1); + local_48a[0] = (undefined1)DAT_0102a71c; + (**(code **)(*piVar1 + 0x18))(piVar1,local_48a,1); + local_482[0] = (undefined1)DAT_0102a720; + (**(code **)(*piVar1 + 0x18))(piVar1,local_482,1); + local_47a[0] = (undefined1)DAT_0102a724; + (**(code **)(*piVar1 + 0x18))(piVar1,local_47a,1); + local_4be[0] = (undefined1)DAT_0102a728; + (**(code **)(*piVar1 + 0x18))(piVar1,local_4be,1); + local_47e[0] = (undefined1)DAT_0102a72c; + (**(code **)(*piVar1 + 0x18))(piVar1,local_47e,1); + local_4b6[0] = (undefined1)DAT_0102a730; + (**(code **)(*piVar1 + 0x18))(piVar1,local_4b6,1); + local_4c6[0] = (undefined1)DAT_0102a734; + (**(code **)(*piVar1 + 0x18))(piVar1,local_4c6,1); + local_4ae[0] = (undefined1)DAT_0102a738; + (**(code **)(*piVar1 + 0x18))(piVar1,local_4ae,1); + local_412 = 0x162e; + (**(code **)(*piVar1 + 0x18))(piVar1,&local_412,4); + FUN_00733e90(piVar1); + local_42e = 0x162e; + (**(code **)(*piVar1 + 0x18))(piVar1,&local_42e,4); + iVar3 = 0; + do { + FUN_00758688(auStack_132,DAT_00fd643c + iVar3); + FUN_00606768(auStack_132,piVar1); + FUN_008007ec(auStack_132,0xa0,0x28,0x58db61); + iVar3 = iVar3 + 0x1908; + } while (iVar3 < DAT_00767f58); + local_426 = 0x162e; + (**(code **)(*piVar1 + 0x18))(piVar1,&local_426,4); + local_436 = local_3ee; + iVar3 = 0; + do { + iVar8 = DAT_009027f0 + iVar3; + local_3f2 = *(undefined2 *)(DAT_009027f0 + iVar3); + local_3f0 = *(undefined2 *)(iVar8 + 2); + local_3de = 0; + local_3ee[0] = 0; + local_3da = 0xf; + FUN_0041bae0(local_3ee,iVar8 + 4,0,0xffffffff); + local_3c2 = 7; + local_3c6 = 0; + local_3d6[0] = 0; + FUN_00425168(local_3d6,iVar8 + 0x1c,0,0xffffffff); + local_3be = *(undefined1 *)(iVar8 + 0x34); + local_3bd = *(undefined1 *)(iVar8 + 0x35); + local_3bc = *(undefined1 *)(iVar8 + 0x36); + FUN_007260ec(&local_3f2,piVar1); + thunk_FUN_007aa754(local_3ee); + iVar3 = iVar3 + 0x38; + } while (iVar3 < 56000); + local_41e = 0x162e; + (**(code **)(*piVar1 + 0x18))(piVar1,&local_41e,4); + iVar3 = DAT_00767f54; + iVar8 = 0; + do { + local_13a = 0; + FUN_00676ce4(auStack_3aa,DAT_00fe1fa8 + iVar8); + if ((local_292 == '\x01') && (local_2aa != '\0')) { + uVar2 = FUN_0067f530(auStack_3aa,auStack_73a); + FUN_00659df0(auStack_3aa,uVar2); + FUN_0065a2d8(auStack_73a); + local_486[0] = 1; + (**(code **)(*piVar1 + 0x18))(piVar1,local_486,1); + local_4a6[0] = (undefined1)local_2a6; + (**(code **)(*piVar1 + 0x18))(piVar1,local_4a6,1); + local_432 = local_272; + (**(code **)(*piVar1 + 0x18))(piVar1,&local_432,4); + local_40a[0] = local_26e; + (**(code **)(*piVar1 + 0x18))(piVar1,local_40a,4); + local_48e[0] = local_291; + (**(code **)(*piVar1 + 0x18))(piVar1,local_48e,1); + local_44e[0] = local_1b8; + (**(code **)(*piVar1 + 0x18))(piVar1,local_44e,2); + local_45e[0] = local_1b6; + (**(code **)(*piVar1 + 0x18))(piVar1,local_45e,2); + } + FUN_0065a2d8(auStack_3aa); + iVar8 = iVar8 + 0x274; + } while (iVar8 < iVar3); + local_49e[0] = 0; + (**(code **)(*piVar1 + 0x18))(piVar1,local_49e,1); + local_436 = (undefined1 *)0x162e; + (**(code **)(*piVar1 + 0x18))(piVar1,&local_436,4); + (**(code **)(*piVar1 + 0x38))(piVar1,&DAT_00fe22e0); + (**(code **)(*piVar1 + 0x38))(piVar1,&DAT_00fe2310); + (**(code **)(*piVar1 + 0x38))(piVar1,&DAT_00fe2340); + (**(code **)(*piVar1 + 0x38))(piVar1,&DAT_00fe2370); + (**(code **)(*piVar1 + 0x38))(piVar1,&DAT_00fe23d0); + (**(code **)(*piVar1 + 0x38))(piVar1,&DAT_00fe29d0); + (**(code **)(*piVar1 + 0x38))(piVar1,&DAT_00fe26d0); + (**(code **)(*piVar1 + 0x38))(piVar1,&DAT_00fe33c0); + (**(code **)(*piVar1 + 0x38))(piVar1,&DAT_00fe33f0); + (**(code **)(*piVar1 + 0x38))(piVar1,&DAT_00fe36f0); + (**(code **)(*piVar1 + 0x38))(piVar1,&DAT_00fe3db0); + (**(code **)(*piVar1 + 0x38))(piVar1,&DAT_00fe4110); + (**(code **)(*piVar1 + 0x38))(piVar1,&DAT_00fe4680); + (**(code **)(*piVar1 + 0x38))(piVar1,&DAT_00fe46e0); + (**(code **)(*piVar1 + 0x38))(piVar1,&DAT_00fe46b0); + (**(code **)(*piVar1 + 0x38))(piVar1,&DAT_00fe4a40); + (**(code **)(*piVar1 + 0x38))(piVar1,&DAT_00fe4a70); + (**(code **)(*piVar1 + 0x38))(piVar1,&DAT_00fe4aa0); + uVar2 = FUN_00581280(0,0,0); + iVar3 = (**(code **)(*piVar1 + 0x24))(piVar1); + uVar2 = FUN_00581280(uVar2,piVar1[0x1c] + 8,iVar3 + -8); + *(undefined4 *)(piVar1[0x1c] + 4) = uVar2; + FUN_007ffb98(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/0076758c.calls.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/0076758c.calls.txt new file mode 100644 index 000000000..5444b2e33 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/0076758c.calls.txt @@ -0,0 +1,36 @@ +# Calls from FUN_0076758c @ 0076758c +00425168 FUN_00425168 +004a22ac FUN_004a22ac +00746340 thunk_FUN_007aa754 +007aa80c FUN_007aa80c +0067f530 FUN_0067f530 +008007ec FUN_008007ec +0076151c FUN_0076151c +005f82b0 FUN_005f82b0 +00749890 FUN_00749890 +00431740 FUN_00431740 +00606768 FUN_00606768 +007260ec FUN_007260ec +EXTERNAL:0000007b _Thrd_sleep +0041bc2c FUN_0041bc2c +00581280 FUN_00581280 +0074cb4c FUN_0074cb4c +0058ef48 FUN_0058ef48 +006598b4 FUN_006598b4 +0041bae0 FUN_0041bae0 +0065a2d8 FUN_0065a2d8 +007ffb98 FUN_007ffb98 +007369b0 FUN_007369b0 +007ffb80 FUN_007ffb80 +00733e90 FUN_00733e90 +EXTERNAL:0000007d _Xtime_diff_to_millis2 +00758688 FUN_00758688 +00800e30 FUN_00800e30 +EXTERNAL:00000152 _Id +0074cb9c FUN_0074cb9c +0073527c FUN_0073527c +00676ce4 FUN_00676ce4 +EXTERNAL:00000151 wait +007aa754 FUN_007aa754 +EXTERNAL:0000007c xtime_get +00659df0 FUN_00659df0 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00767f5c.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00767f5c.c new file mode 100644 index 000000000..4b94ed98f --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00767f5c.c @@ -0,0 +1,307 @@ + +void FUN_00767f5c(void) + +{ + byte bVar1; + int *piVar2; + int iVar3; + undefined4 uVar4; + undefined4 uVar5; + int iVar6; + undefined2 *puVar7; + longlong lVar8; + uint local_13c [4]; + undefined4 local_12c; + uint local_128; + uint local_124 [4]; + undefined4 local_114; + uint local_110; + uint local_10c [4]; + undefined4 local_fc; + uint local_f8; + uint local_f4 [4]; + undefined4 local_e4; + uint local_e0; + uint local_dc [4]; + undefined4 local_cc; + uint local_c8; + uint local_c4 [4]; + undefined4 local_b4; + uint local_b0; + uint local_ac [4]; + undefined4 local_9c; + uint local_98; + uint local_94 [4]; + undefined4 local_84; + uint local_80; + uint local_7c [4]; + undefined4 local_6c; + uint local_68; + undefined4 local_64; + undefined4 uStack_60; + undefined4 local_5c [5]; + uint local_48; + byte local_44; + char local_43; + short local_42; + char local_40 [4]; + undefined1 auStack_3c [4]; + undefined4 local_38; + undefined4 local_34 [4]; + + lVar8 = FUN_007ffb80(); + uVar5 = (undefined4)((ulonglong)lVar8 >> 0x20); + piVar2 = (int *)lVar8; + local_64 = 0xfffffffe; + uStack_60 = 0xfffffffe; + (**(code **)(*piVar2 + 0x1c))(piVar2,local_34,4); + local_38 = 0; + if (0x2fffffffff < lVar8) { + (**(code **)(*piVar2 + 0x1c))(piVar2,&local_38,4); + } + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_00902e98,4); + (**(code **)(*piVar2 + 0x1c))(piVar2,&local_42,2); + DAT_00902e9c = (int)local_42; + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_00902ea4,2); + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_00902ea0,2); + iVar3 = (int)DAT_00902ea4; + DAT_00902e9c = iVar3 << 4; + DAT_00902e98 = (int)DAT_00902ea0 << 4; + iVar6 = (int)((ulonglong)((longlong)(int)DAT_00902ea0 * (longlong)DAT_00768794) >> 0x20); + DAT_010502fc = (iVar6 >> 3) - (iVar6 >> 0x1f); + iVar3 = (int)((ulonglong)((longlong)iVar3 * (longlong)DAT_00768790) >> 0x20) + iVar3; + DAT_01050300 = (iVar3 >> 3) - (iVar3 >> 0x1f); + FUN_00762228(); + DAT_01033974 = local_34[0]; + DAT_01033970 = local_38; + uVar4 = FUN_0058ef48(); + FUN_007369b0(uVar4,4,&DAT_00fd9438); + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_010338cc,2); + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_010338c8,2); + (**(code **)(*piVar2 + 0x1c))(piVar2,&local_42,2); + DAT_00902ebc = (int)local_42; + DAT_01050304 = DAT_00902ebc << 4; + (**(code **)(*piVar2 + 0x1c))(piVar2,&local_42,2); + DAT_01033960 = (int)local_42; + DAT_0103395c = DAT_01033960 << 4; + iVar3 = (int)((ulonglong) + ((longlong)((DAT_00902ea4 - DAT_00902ebc) + -0xe6) * (longlong)DAT_0076878c) >> 0x20 + ); + DAT_01033958 = DAT_00902ebc + (iVar3 - (iVar3 >> 0x1f)) * 6 + -5; + DAT_010338d4 = DAT_01033958 * 0x10; + FUN_00735318(&DAT_01030850,piVar2,uVar5); + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_01033968,2); + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_01033964,2); + FUN_00749d20(piVar2,uVar5); + FUN_00659a38(piVar2,uVar5); + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_0102a76f,1); + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_0102a780,1); + (**(code **)(*piVar2 + 0x1c))(piVar2,&local_44,1); + DAT_0102a778 = (uint)local_44; + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_0102a77c,4); + if (DAT_0102a77c == 0) { + DAT_00902c38 = 0xffff; + DAT_00902c30 = 0xffff; + DAT_00902c34 = 0xffff; + } + else { + DAT_00902c30 = 0x6b; + DAT_00902c34 = 0x6c; + DAT_00902c38 = 0x6f; + } + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_010338d3,1); + if (0x37ffffffff < lVar8) { + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_01030860,2); + } + (**(code **)(*piVar2 + 0x1c))(piVar2,&local_44,1); + DAT_010339ac = (uint)local_44; + (**(code **)(*piVar2 + 0x1c))(piVar2,&local_42,2); + DAT_010339a8 = (int)local_42; + (**(code **)(*piVar2 + 0x1c))(piVar2,&local_44,1); + DAT_010339a0 = (uint)local_44; + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_010339a4,4); + if (0x39ffffffff < lVar8) { + iVar3 = 0; + do { + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_0102a710 + iVar3,1); + iVar3 = iVar3 + 1; + } while (iVar3 < 4); + puVar7 = &DAT_0102a714; + iVar3 = 3; + do { + (**(code **)(*piVar2 + 0x1c))(piVar2,puVar7,2); + puVar7 = puVar7 + 1; + iVar3 = iVar3 + -1; + } while (iVar3 != 0); + } + FUN_0075fbe8(&DAT_0102a710,(int)DAT_00902ea0); + if (DAT_0102a713 != '\0') { + DAT_0102a713 = DAT_0102a713 + '\x05'; + } + if (DAT_0102a712 != '\0') { + DAT_0102a712 = DAT_0102a712 + '\x05'; + } + if (DAT_0102a711 != '\0') { + DAT_0102a711 = DAT_0102a711 + '\x05'; + } + if (DAT_0102a710 != '\0') { + DAT_0102a710 = DAT_0102a710 + '\x05'; + } + if (0x39ffffffff < lVar8) { + iVar3 = 0; + do { + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_0102a704 + iVar3,1); + iVar3 = iVar3 + 1; + } while (iVar3 < 4); + puVar7 = &DAT_0102a708; + iVar3 = 3; + do { + (**(code **)(*piVar2 + 0x1c))(piVar2,puVar7,2); + puVar7 = puVar7 + 1; + iVar3 = iVar3 + -1; + } while (iVar3 != 0); + } + FUN_00760b10(); + DAT_0102a6fc = 0; + DAT_0102a6f8 = 0; + DAT_0102a700 = 0; + DAT_0102a738 = 0; + DAT_0102a734 = 0; + DAT_0102a730 = 0; + DAT_0102a72c = 0; + DAT_0102a728 = 0; + DAT_0102a724 = 0; + DAT_0102a720 = 0; + DAT_0102a71c = 0; + (**(code **)(*piVar2 + 0x1c))(piVar2,auStack_3c,4); + FUN_00733bac(piVar2,uVar5); + (**(code **)(*piVar2 + 0x1c))(piVar2,auStack_3c,4); + FUN_006082a4(piVar2,uVar5); + (**(code **)(*piVar2 + 0x1c))(piVar2,auStack_3c,4); + iVar3 = 0; + do { + FUN_00726440(iVar3 + DAT_009027f0,piVar2,uVar5); + iVar3 = iVar3 + 0x38; + } while (iVar3 < 56000); + (**(code **)(*piVar2 + 0x1c))(piVar2,auStack_3c,4); + (**(code **)(*piVar2 + 0x1c))(piVar2,local_40,1); + local_43 = local_40[0]; + iVar3 = FUN_007a7d34(); + if (iVar3 == 0) { + if (local_43 == '\x01') { + iVar3 = 0; + do { + (**(code **)(*piVar2 + 0x1c))(piVar2,&local_44,1); + bVar1 = local_44; + iVar6 = FUN_007a7d34(); + if (iVar6 == 0) { + FUN_0066c0b8(0xbf800000,iVar3 + DAT_00fe1fa8,bVar1); + (**(code **)(*piVar2 + 0x1c))(piVar2,DAT_00fe1fa8 + iVar3 + 0x138,4); + (**(code **)(*piVar2 + 0x1c))(piVar2,DAT_00fe1fa8 + iVar3 + 0x13c,4); + *(int *)(iVar3 + DAT_00fe1fa8 + 0x148) = (int)*(float *)(iVar3 + DAT_00fe1fa8 + 0x138); + *(int *)(iVar3 + DAT_00fe1fa8 + 0x14c) = (int)*(float *)(iVar3 + DAT_00fe1fa8 + 0x13c); + (**(code **)(*piVar2 + 0x1c))(piVar2,iVar3 + DAT_00fe1fa8 + 0x119,1); + (**(code **)(*piVar2 + 0x1c))(piVar2,DAT_00fe1fa8 + iVar3 + 0x1f2,2); + (**(code **)(*piVar2 + 0x1c))(piVar2,DAT_00fe1fa8 + iVar3 + 500,2); + } + iVar3 = iVar3 + 0x274; + (**(code **)(*piVar2 + 0x1c))(piVar2,&local_43,1); + } while (local_43 == '\x01'); + } + (**(code **)(*piVar2 + 0x1c))(piVar2,auStack_3c,4); + if (lVar8 < 0x3200000000) { + uVar5 = FUN_00439fe0(piVar2[0xf],local_13c); + FUN_007ab02c(&DAT_00fe22e0,uVar5); + if (0xf < local_128) { + FUN_00431740(local_13c[0]); + } + local_128 = 0xf; + local_12c = 0; + local_13c[0] = local_13c[0] & 0xffffff00; + uVar5 = FUN_00439fe0(piVar2[0xf],local_124); + FUN_007ab02c(&DAT_00fe2310,uVar5); + if (0xf < local_110) { + FUN_00431740(local_124[0]); + } + local_110 = 0xf; + local_114 = 0; + local_124[0] = local_124[0] & 0xffffff00; + uVar5 = FUN_00439fe0(piVar2[0xf],local_94); + FUN_007ab02c(&DAT_00fe2340,uVar5); + if (0xf < local_80) { + FUN_00431740(local_94[0]); + } + local_80 = 0xf; + local_84 = 0; + local_94[0] = local_94[0] & 0xffffff00; + uVar5 = FUN_00439fe0(piVar2[0xf],local_10c); + FUN_007ab02c(&DAT_00fe2370,uVar5); + if (0xf < local_f8) { + FUN_00431740(local_10c[0]); + } + local_f8 = 0xf; + local_fc = 0; + local_10c[0] = local_10c[0] & 0xffffff00; + uVar5 = FUN_00439fe0(piVar2[0xf],local_f4); + FUN_007ab02c(&DAT_00fe23d0,uVar5); + if (0xf < local_e0) { + FUN_00431740(local_f4[0]); + } + local_e0 = 0xf; + local_e4 = 0; + local_f4[0] = local_f4[0] & 0xffffff00; + uVar5 = FUN_00439fe0(piVar2[0xf],local_dc); + FUN_007ab02c(&DAT_00fe29d0,uVar5); + if (0xf < local_c8) { + FUN_00431740(local_dc[0]); + } + local_c8 = 0xf; + local_cc = 0; + local_dc[0] = local_dc[0] & 0xffffff00; + uVar5 = FUN_00439fe0(piVar2[0xf],local_ac); + FUN_007ab02c(&DAT_00fe26d0,uVar5); + if (0xf < local_98) { + FUN_00431740(local_ac[0]); + } + local_98 = 0xf; + local_9c = 0; + local_ac[0] = local_ac[0] & 0xffffff00; + uVar5 = FUN_00439fe0(piVar2[0xf],local_7c); + FUN_007ab02c(&DAT_00fe33c0,uVar5); + if (0xf < local_68) { + FUN_00431740(local_7c[0]); + } + local_68 = 0xf; + local_6c = 0; + local_7c[0] = local_7c[0] & 0xffffff00; + uVar5 = FUN_00439fe0(piVar2[0xf],local_c4); + FUN_007ab02c(&DAT_00fe33f0,uVar5); + if (0xf < local_b0) { + FUN_00431740(local_c4[0]); + } + local_b0 = 0xf; + local_b4 = 0; + local_c4[0] = local_c4[0] & 0xffffff00; + uVar5 = FUN_00439fe0(piVar2[0xf],local_5c); + FUN_007ab02c(&DAT_00fe36f0,uVar5); + if (0xf < local_48) { + FUN_00431740(local_5c[0]); + } + } + else { + FUN_006d6c24(piVar2,&DAT_00fe22e0); + FUN_006d6c24(piVar2,&DAT_00fe2310); + FUN_006d6c24(piVar2,&DAT_00fe2340); + FUN_006d6c24(piVar2,&DAT_00fe2370); + FUN_006d6c24(piVar2,&DAT_00fe23d0); + FUN_006d6c24(piVar2,&DAT_00fe29d0); + FUN_006d6c24(piVar2,&DAT_00fe26d0); + FUN_006d6c24(piVar2,&DAT_00fe33c0); + FUN_006d6c24(piVar2,&DAT_00fe33f0); + FUN_006d6c24(piVar2,&DAT_00fe36f0); + } + } + FUN_007ffb98(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00767f5c.calls.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00767f5c.calls.txt new file mode 100644 index 000000000..477d338de --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00767f5c.calls.txt @@ -0,0 +1,20 @@ +# Calls from FUN_00767f5c @ 00767f5c +007ffb80 FUN_007ffb80 +006082a4 FUN_006082a4 +00726440 FUN_00726440 +00749d20 FUN_00749d20 +007ab02c FUN_007ab02c +00760b10 FUN_00760b10 +00431740 FUN_00431740 +006d6c24 FUN_006d6c24 +0058ef48 FUN_0058ef48 +00659a38 FUN_00659a38 +0075fbe8 FUN_0075fbe8 +007ffb98 FUN_007ffb98 +00762228 FUN_00762228 +007a7d34 FUN_007a7d34 +00439fe0 FUN_00439fe0 +007369b0 FUN_007369b0 +00735318 FUN_00735318 +0066c0b8 FUN_0066c0b8 +00733bac FUN_00733bac diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00768798.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00768798.c new file mode 100644 index 000000000..30a93e6f2 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00768798.c @@ -0,0 +1,207 @@ + +void FUN_00768798(void) + +{ + byte bVar1; + int *piVar2; + int iVar3; + undefined4 uVar4; + undefined4 uVar5; + undefined4 uVar6; + int iVar7; + uint uVar8; + undefined2 *puVar9; + longlong lVar10; + uint local_94 [4]; + undefined4 local_84; + uint local_80; + undefined4 local_7c; + undefined4 uStack_78; + undefined1 auStack_74 [48]; + byte local_44 [2]; + short local_42; + char local_40; + char local_3f [3]; + undefined1 auStack_3c [4]; + undefined4 local_38; + undefined4 local_34 [4]; + + lVar10 = FUN_007ffb80(); + uVar6 = (undefined4)((ulonglong)lVar10 >> 0x20); + piVar2 = (int *)lVar10; + local_7c = 0xfffffffe; + uStack_78 = 0xfffffffe; + (**(code **)(*piVar2 + 0x1c))(piVar2,local_34,4); + local_38 = 0; + (**(code **)(*piVar2 + 0x1c))(piVar2,&local_38,4); + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_00902e98,4); + (**(code **)(*piVar2 + 0x1c))(piVar2,&local_42,2); + DAT_00902e9c = (int)local_42; + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_00902ea4,2); + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_00902ea0,2); + iVar3 = (int)DAT_00902ea4; + DAT_00902e9c = iVar3 << 4; + DAT_00902e98 = (int)DAT_00902ea0 << 4; + iVar7 = (int)((ulonglong)((longlong)(int)DAT_00902ea0 * (longlong)DAT_00768ec8) >> 0x20); + DAT_010502fc = (iVar7 >> 3) - (iVar7 >> 0x1f); + iVar3 = (int)((ulonglong)((longlong)iVar3 * (longlong)DAT_00768ec4) >> 0x20) + iVar3; + DAT_01050300 = (iVar3 >> 3) - (iVar3 >> 0x1f); + FUN_00762228(); + DAT_01033974 = local_34[0]; + DAT_01033970 = local_38; + local_80 = 0xf; + local_84 = 0; + local_94[0] = local_94[0] & 0xffffff00; + FUN_0041bc2c(local_94,"GEN[51]",7); + uVar4 = FUN_005f82b0(auStack_74,local_94); + uVar5 = FUN_0058ef48(); + FUN_007369b0(uVar5,4,uVar4); + FUN_007aa754(auStack_74); + if (0xf < local_80) { + FUN_00431740(local_94[0]); + } + local_80 = 0xf; + local_84 = 0; + local_94[0] = local_94[0] & 0xffffff00; + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_010338cc,2); + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_010338c8,2); + (**(code **)(*piVar2 + 0x1c))(piVar2,&local_42,2); + DAT_00902ebc = (int)local_42; + DAT_01050304 = DAT_00902ebc << 4; + (**(code **)(*piVar2 + 0x1c))(piVar2,&local_42,2); + DAT_01033960 = (int)local_42; + DAT_0103395c = DAT_01033960 << 4; + iVar3 = (int)((ulonglong) + ((longlong)((DAT_00902ea4 - DAT_00902ebc) + -0xe6) * (longlong)DAT_00768ec0) >> 0x20 + ); + DAT_01033958 = DAT_00902ebc + (iVar3 - (iVar3 >> 0x1f)) * 6 + -5; + DAT_010338d4 = DAT_01033958 * 0x10; + FUN_00735318(&DAT_01030850,piVar2,uVar6); + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_01033968,2); + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_01033964,2); + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_0102a787,1); + FUN_00749d20(piVar2,uVar6); + FUN_00659a38(piVar2,uVar6); + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_0102a76f,1); + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_0102a780,1); + (**(code **)(*piVar2 + 0x1c))(piVar2,local_44,1); + DAT_0102a778 = (uint)local_44[0]; + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_0102a77c,4); + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_00902c30,2); + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_00902c34,2); + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_00902c38,2); + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_010338d3,1); + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_01030860,2); + (**(code **)(*piVar2 + 0x1c))(piVar2,local_44,1); + DAT_010339ac = (uint)local_44[0]; + (**(code **)(*piVar2 + 0x1c))(piVar2,&local_42,2); + DAT_010339a8 = (int)local_42; + (**(code **)(*piVar2 + 0x1c))(piVar2,local_44,1); + DAT_010339a0 = (uint)local_44[0]; + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_010339a4,4); + if (0x39ffffffff < lVar10) { + iVar3 = 0; + do { + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_0102a710 + iVar3,1); + iVar3 = iVar3 + 1; + } while (iVar3 < 4); + puVar9 = &DAT_0102a714; + iVar3 = 3; + do { + (**(code **)(*piVar2 + 0x1c))(piVar2,puVar9,2); + puVar9 = puVar9 + 1; + iVar3 = iVar3 + -1; + } while (iVar3 != 0); + iVar3 = 0; + do { + (**(code **)(*piVar2 + 0x1c))(piVar2,&DAT_0102a704 + iVar3,1); + iVar3 = iVar3 + 1; + } while (iVar3 < 4); + puVar9 = &DAT_0102a708; + iVar3 = 3; + do { + (**(code **)(*piVar2 + 0x1c))(piVar2,puVar9,2); + puVar9 = puVar9 + 1; + iVar3 = iVar3 + -1; + } while (iVar3 != 0); + } + (**(code **)(*piVar2 + 0x1c))(piVar2,local_44,1); + uVar8 = (uint)local_44[0]; + DAT_0102a700 = uVar8 & 3; + DAT_0102a6f8 = (uVar8 & 0xf) >> 2; + DAT_0102a6fc = (uVar8 & 0x3f) >> 4; + (**(code **)(*piVar2 + 0x1c))(piVar2,local_44,1); + DAT_0102a71c = (uint)local_44[0]; + (**(code **)(*piVar2 + 0x1c))(piVar2,local_44,1); + DAT_0102a720 = (uint)local_44[0]; + (**(code **)(*piVar2 + 0x1c))(piVar2,local_44,1); + DAT_0102a724 = (uint)local_44[0]; + (**(code **)(*piVar2 + 0x1c))(piVar2,local_44,1); + DAT_0102a728 = (uint)local_44[0]; + (**(code **)(*piVar2 + 0x1c))(piVar2,local_44,1); + DAT_0102a72c = (uint)local_44[0]; + (**(code **)(*piVar2 + 0x1c))(piVar2,local_44,1); + DAT_0102a730 = (uint)local_44[0]; + (**(code **)(*piVar2 + 0x1c))(piVar2,local_44,1); + DAT_0102a734 = (uint)local_44[0]; + (**(code **)(*piVar2 + 0x1c))(piVar2,local_44,1); + DAT_0102a738 = (uint)local_44[0]; + (**(code **)(*piVar2 + 0x1c))(piVar2,auStack_3c,4); + FUN_00733858(piVar2,uVar6); + (**(code **)(*piVar2 + 0x1c))(piVar2,auStack_3c,4); + FUN_006082a4(piVar2,uVar6); + (**(code **)(*piVar2 + 0x1c))(piVar2,auStack_3c,4); + iVar3 = 0; + do { + FUN_00726440(iVar3 + DAT_009027f0,piVar2,uVar6); + iVar3 = iVar3 + 0x38; + } while (iVar3 < 56000); + (**(code **)(*piVar2 + 0x1c))(piVar2,auStack_3c,4); + (**(code **)(*piVar2 + 0x1c))(piVar2,local_3f,1); + local_40 = local_3f[0]; + iVar3 = FUN_007a7d34(); + if (iVar3 == 0) { + if (local_40 == '\x01') { + iVar3 = 0; + do { + (**(code **)(*piVar2 + 0x1c))(piVar2,local_44,1); + bVar1 = local_44[0]; + iVar7 = FUN_007a7d34(); + if (iVar7 == 0) { + FUN_0066c0b8(0xbf800000,iVar3 + DAT_00fe1fa8,bVar1); + (**(code **)(*piVar2 + 0x1c))(piVar2,DAT_00fe1fa8 + iVar3 + 0x138,4); + (**(code **)(*piVar2 + 0x1c))(piVar2,DAT_00fe1fa8 + iVar3 + 0x13c,4); + *(int *)(iVar3 + DAT_00fe1fa8 + 0x148) = (int)*(float *)(iVar3 + DAT_00fe1fa8 + 0x138); + *(int *)(iVar3 + DAT_00fe1fa8 + 0x14c) = (int)*(float *)(iVar3 + DAT_00fe1fa8 + 0x13c); + (**(code **)(*piVar2 + 0x1c))(piVar2,iVar3 + DAT_00fe1fa8 + 0x119,1); + (**(code **)(*piVar2 + 0x1c))(piVar2,DAT_00fe1fa8 + iVar3 + 0x1f2,2); + (**(code **)(*piVar2 + 0x1c))(piVar2,DAT_00fe1fa8 + iVar3 + 500,2); + } + iVar3 = iVar3 + 0x274; + (**(code **)(*piVar2 + 0x1c))(piVar2,&local_40,1); + } while (local_40 == '\x01'); + } + (**(code **)(*piVar2 + 0x1c))(piVar2,auStack_3c,4); + FUN_006d6c24(piVar2,&DAT_00fe22e0); + FUN_006d6c24(piVar2,&DAT_00fe2310); + FUN_006d6c24(piVar2,&DAT_00fe2340); + FUN_006d6c24(piVar2,&DAT_00fe2370); + FUN_006d6c24(piVar2,&DAT_00fe23d0); + FUN_006d6c24(piVar2,&DAT_00fe29d0); + FUN_006d6c24(piVar2,&DAT_00fe26d0); + FUN_006d6c24(piVar2,&DAT_00fe33c0); + FUN_006d6c24(piVar2,&DAT_00fe33f0); + FUN_006d6c24(piVar2,&DAT_00fe36f0); + FUN_006d6c24(piVar2,&DAT_00fe3db0); + FUN_006d6c24(piVar2,&DAT_00fe4110); + FUN_006d6c24(piVar2,&DAT_00fe4680); + FUN_006d6c24(piVar2,&DAT_00fe46e0); + FUN_006d6c24(piVar2,&DAT_00fe46b0); + FUN_006d6c24(piVar2,&DAT_00fe4a40); + FUN_006d6c24(piVar2,&DAT_00fe4a70); + FUN_006d6c24(piVar2,&DAT_00fe4aa0); + } + FUN_007ffb98(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00768798.calls.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00768798.calls.txt new file mode 100644 index 000000000..29946211c --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/00768798.calls.txt @@ -0,0 +1,19 @@ +# Calls from FUN_00768798 @ 00768798 +007ffb80 FUN_007ffb80 +00733858 FUN_00733858 +006082a4 FUN_006082a4 +00726440 FUN_00726440 +00749d20 FUN_00749d20 +005f82b0 FUN_005f82b0 +00431740 FUN_00431740 +0041bc2c FUN_0041bc2c +006d6c24 FUN_006d6c24 +0058ef48 FUN_0058ef48 +00659a38 FUN_00659a38 +007ffb98 FUN_007ffb98 +00762228 FUN_00762228 +007a7d34 FUN_007a7d34 +007aa754 FUN_007aa754 +007369b0 FUN_007369b0 +00735318 FUN_00735318 +0066c0b8 FUN_0066c0b8 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f73.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f73.xrefs.txt new file mode 100644 index 000000000..bd369c39f --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f73.xrefs.txt @@ -0,0 +1,13 @@ +# References to 00fe1f73 +00667846 WRITE FUN_00667810 +0064b6e2 WRITE FUN_0064b17c +00677322 READ FUN_006771d8 +00697870 READ FUN_00697314 +00697a3a READ FUN_00697314 +006598ce READ FUN_006598b4 +00659a4a PARAM FUN_00659a38 +00645696 READ FUN_006452c4 +006597d4 READ FUN_006597c4 +00738578 READ FUN_0073817c +00738570 PARAM FUN_0073817c +006a9b86 WRITE FUN_006a47dc diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f7a.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f7a.xrefs.txt new file mode 100644 index 000000000..f99b6f5f1 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f7a.xrefs.txt @@ -0,0 +1,13 @@ +# References to 00fe1f7a +00667848 WRITE FUN_00667810 +0064b6f2 WRITE FUN_0064b17c +00678268 READ FUN_006771d8 +006786cc READ FUN_006771d8 +00697876 READ FUN_00697314 +00697a40 READ FUN_00697314 +00606f08 READ FUN_00606bc4 +006598de READ FUN_006598b4 +00659a5a PARAM FUN_00659a38 +006456a6 READ FUN_006452c4 +007384ec READ FUN_0073817c +006a9b76 WRITE FUN_006a47dc diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f7b.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f7b.xrefs.txt new file mode 100644 index 000000000..c1dcba765 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f7b.xrefs.txt @@ -0,0 +1,17 @@ +# References to 00fe1f7b +0066784a WRITE FUN_00667810 +0064b702 WRITE FUN_0064b17c +00677aae READ FUN_006771d8 +00677ef4 READ FUN_006771d8 +00697664 READ FUN_00697314 +006977bc READ FUN_00697314 +00697908 READ FUN_00697314 +00606da4 READ FUN_00606bc4 +006598f2 READ FUN_006598b4 +00659a6c PARAM FUN_00659a38 +006456b6 READ FUN_006452c4 +007384b0 READ FUN_0073817c +006a9b96 WRITE FUN_006a47dc +006b697c READ FUN_006b6018 +00694664 READ FUN_00694578 +006ba214 READ FUN_006b9ee8 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f7e.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f7e.xrefs.txt new file mode 100644 index 000000000..566b4b6b1 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f7e.xrefs.txt @@ -0,0 +1,8 @@ +# References to 00fe1f7e +0066784c WRITE FUN_00667810 +006978ac READ FUN_00697314 +00697a86 READ FUN_00697314 +00659906 READ FUN_006598b4 +00659a7e PARAM FUN_00659a38 +006b2f74 READ FUN_006b2ea0 +006b9f84 WRITE FUN_006b9ee8 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f7f.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f7f.xrefs.txt new file mode 100644 index 000000000..9142713c0 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f7f.xrefs.txt @@ -0,0 +1,8 @@ +# References to 00fe1f7f +0066784e WRITE FUN_00667810 +006978be READ FUN_00697314 +00697aa0 READ FUN_00697314 +0065991a READ FUN_006598b4 +00659a90 PARAM FUN_00659a38 +006b3014 READ FUN_006b2ea0 +006b9f96 WRITE FUN_006b9ee8 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f82.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f82.xrefs.txt new file mode 100644 index 000000000..6e78f6d9c --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f82.xrefs.txt @@ -0,0 +1,8 @@ +# References to 00fe1f82 +00667850 WRITE FUN_00667810 +006978d0 READ FUN_00697314 +00697aba READ FUN_00697314 +0065992e READ FUN_006598b4 +00659aa2 PARAM FUN_00659a38 +00694740 READ FUN_00694578 +006b9fa8 WRITE FUN_006b9ee8 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f83.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f83.xrefs.txt new file mode 100644 index 000000000..db03e6b5f --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f83.xrefs.txt @@ -0,0 +1,9 @@ +# References to 00fe1f83 +00667852 WRITE FUN_00667810 +007a7db8 WRITE FUN_007a7d88 +007a7db0 PARAM FUN_007a7d88 +00659942 READ FUN_006598b4 +00659ab4 PARAM FUN_00659a38 +007a9306 READ FUN_007a9278 +006abeec READ FUN_006abb14 +006b2efc READ FUN_006b2ea0 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f84.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f84.xrefs.txt new file mode 100644 index 000000000..e1014cf31 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f84.xrefs.txt @@ -0,0 +1,9 @@ +# References to 00fe1f84 +00667856 WRITE FUN_00667810 +007a7de2 WRITE FUN_007a7d88 +007a7dce PARAM FUN_007a7d88 +006978e2 READ FUN_00697314 +00697ad4 READ FUN_00697314 +00607550 READ FUN_00606bc4 +00659968 READ FUN_006598b4 +00659ad8 PARAM FUN_00659a38 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f85.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f85.xrefs.txt new file mode 100644 index 000000000..fe66790ff --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f85.xrefs.txt @@ -0,0 +1,9 @@ +# References to 00fe1f85 +00667854 WRITE FUN_00667810 +0064b722 WRITE FUN_0064b17c +00607374 READ FUN_00606bc4 +00659956 READ FUN_006598b4 +00659ace PARAM FUN_00659a38 +006456d6 READ FUN_006452c4 +006a7ad0 READ FUN_006a47dc +006a7adc WRITE FUN_006a47dc diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f86.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f86.xrefs.txt new file mode 100644 index 000000000..2bc9845f9 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f86.xrefs.txt @@ -0,0 +1,7 @@ +# References to 00fe1f86 +005aec68 WRITE FUN_005aea30 +005aec62 PARAM FUN_005aea30 +0065997a READ FUN_006598b4 +00659ae8 PARAM FUN_00659a38 +006a9c56 WRITE FUN_006a47dc +006921d8 READ FUN_006921b0 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f87.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f87.xrefs.txt new file mode 100644 index 000000000..64036f26e --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f87.xrefs.txt @@ -0,0 +1,9 @@ +# References to 00fe1f87 +00667858 WRITE FUN_00667810 +007a7de2 WRITE FUN_007a7d88 +007a7ddc PARAM FUN_007a7d88 +00697954 READ FUN_00697314 +00697b5e READ FUN_00697314 +00659a1c READ FUN_006598b4 +00659b64 PARAM FUN_00659a38 +007a9340 READ FUN_007a9278 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f88.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f88.xrefs.txt new file mode 100644 index 000000000..fb00d4745 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f88.xrefs.txt @@ -0,0 +1,9 @@ +# References to 00fe1f88 +0066785a WRITE FUN_00667810 +0064b742 WRITE FUN_0064b17c +006599b0 READ FUN_006598b4 +00659b18 PARAM FUN_00659a38 +006456f6 READ FUN_006452c4 +00655842 READ FUN_006557e4 +006a4b0c READ FUN_006a47dc +006a9c12 WRITE FUN_006a47dc diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f89.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f89.xrefs.txt new file mode 100644 index 000000000..d1c4054c6 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f89.xrefs.txt @@ -0,0 +1,9 @@ +# References to 00fe1f89 +0066785c WRITE FUN_00667810 +0064b752 WRITE FUN_0064b17c +006599c2 READ FUN_006598b4 +00659b24 PARAM FUN_00659a38 +00645706 READ FUN_006452c4 +00655846 READ FUN_006557e4 +006a9bb2 WRITE FUN_006a47dc +006a4b4a READ FUN_006a47dc diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f8a.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f8a.xrefs.txt new file mode 100644 index 000000000..89f7b44ee --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f8a.xrefs.txt @@ -0,0 +1,9 @@ +# References to 00fe1f8a +0066785e WRITE FUN_00667810 +0064b766 WRITE FUN_0064b17c +006599d4 READ FUN_006598b4 +00659b30 PARAM FUN_00659a38 +00645716 READ FUN_006452c4 +00655848 READ FUN_006557e4 +006a9bea WRITE FUN_006a47dc +006a4b88 READ FUN_006a47dc diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f8b.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f8b.xrefs.txt new file mode 100644 index 000000000..cd701f30d --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f8b.xrefs.txt @@ -0,0 +1,18 @@ +# References to 00fe1f8b +00667860 WRITE FUN_00667810 +0064b778 WRITE FUN_0064b17c +00697920 READ FUN_00697314 +00697b14 READ FUN_00697314 +00783438 READ FUN_00783400 +006081c0 READ FUN_00606bc4 +00607842 READ FUN_00606bc4 +006599e6 READ FUN_006598b4 +00659b3c PARAM FUN_00659a38 +007a936c READ FUN_007a9278 +006a481a READ FUN_006a47dc +006a9ef0 READ FUN_006a47dc +006a9bb4 WRITE FUN_006a47dc +006a9bec WRITE FUN_006a47dc +006a9c14 WRITE FUN_006a47dc +006b426e READ FUN_006b2ea0 +006b42a2 READ FUN_006b2ea0 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f8c.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f8c.xrefs.txt new file mode 100644 index 000000000..d4c12d8e1 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f8c.xrefs.txt @@ -0,0 +1,7 @@ +# References to 00fe1f8c +00667862 WRITE FUN_00667810 +00697942 READ FUN_00697314 +00697b44 READ FUN_00697314 +0065999e READ FUN_006598b4 +00659b0a PARAM FUN_00659a38 +006a767a WRITE FUN_006a47dc diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f8d.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f8d.xrefs.txt new file mode 100644 index 000000000..0b3658dd8 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f8d.xrefs.txt @@ -0,0 +1,22 @@ +# References to 00fe1f8d +00667866 WRITE FUN_00667810 +00783b92 READ FUN_00783b20 +00783ca8 READ FUN_00783b20 +0064b732 WRITE FUN_0064b17c +00697986 READ FUN_00697314 +00697b94 READ FUN_00697314 +006e04bc READ FUN_006db640 +006db1de READ FUN_006da85c +00607ebe READ FUN_00606bc4 +00607fb4 READ FUN_00606bc4 +00607892 READ FUN_00606bc4 +0060725c READ FUN_00606bc4 +0078240e READ FUN_007820ec +006599f8 READ FUN_006598b4 +00659b48 PARAM FUN_00659a38 +006456e6 READ FUN_006452c4 +006a8dde READ FUN_006a47dc +006a8e86 READ FUN_006a47dc +006a8e90 WRITE FUN_006a47dc +006a5bd2 READ FUN_006a47dc +0069459a READ FUN_00694578 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f8e.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f8e.xrefs.txt new file mode 100644 index 000000000..9e1cacb25 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f8e.xrefs.txt @@ -0,0 +1,4 @@ +# References to 00fe1f8e +00659a0a READ FUN_006598b4 +00659b56 PARAM FUN_00659a38 +006a6550 WRITE FUN_006a47dc diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f8f.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f8f.xrefs.txt new file mode 100644 index 000000000..dd36b78ec --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/00fe1f8f.xrefs.txt @@ -0,0 +1,4 @@ +# References to 00fe1f8f +0065998c READ FUN_006598b4 +00659af8 PARAM FUN_00659a38 +006a9d3e WRITE FUN_006a47dc diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/005aea30.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/005aea30.c new file mode 100644 index 000000000..728174dc4 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/005aea30.c @@ -0,0 +1,126 @@ + +void FUN_005aea30(void) + +{ + wchar_t *pwVar1; + int iVar2; + void *pvVar3; + undefined4 *puVar4; + undefined4 uVar5; + undefined4 ****ppppuVar6; + wchar_t *pwVar7; + undefined1 auStack_d4 [48]; + undefined4 ***local_a4 [4]; + undefined4 local_94; + uint local_90; + undefined4 ***local_8c [4]; + undefined4 local_7c; + uint local_78; + undefined1 local_74 [16]; + undefined4 local_64; + undefined4 local_60; + undefined1 auStack_44 [48]; + + FUN_007ffb80(); + DAT_0103396b = 0; + if (DAT_00fd293c == '\0') { + FUN_0079ace4(&DAT_01070308); + } + else { + iVar2 = FUN_007a7d34(); + if (iVar2 == 0) { + FUN_00426e64(local_a4,&DAT_00854800); + if (DAT_010339bd != '\0') { + pwVar1 = L".csworld"; + do { + pwVar7 = pwVar1; + pwVar1 = pwVar7 + 1; + } while (*pwVar1 != L'\0'); + FUN_00425974(local_a4,L".csworld",(int)(pwVar7 + -0x42a407) >> 1); + } + FUN_00595220(local_74,&DAT_01033788 + (DAT_00902eb4 + -1) * 0x30); + if (DAT_010339bd != '\0') { + FUN_007aa80c(local_74,auStack_44,&DAT_01070308); + FUN_007aa754(auStack_44); + } + ppppuVar6 = (undefined4 ****)local_a4[0]; + if (local_90 < 8) { + ppppuVar6 = local_a4; + } + uVar5 = FUN_007aada8(auStack_d4,ppppuVar6); + FUN_007aacc4(local_74,auStack_44,uVar5); + FUN_007aa754(auStack_44); + pvVar3 = malloc(0x40); + if (pvVar3 == (void *)0x0) { + puVar4 = (undefined4 *)0x0; + } + else { + *(undefined4 *)((int)pvVar3 + 0x3c) = 0; + puVar4 = (undefined4 *)FUN_0059dd6c(pvVar3,local_74,0,1,pvVar3); + } + FUN_0076a604(puVar4); + FUN_0058ef48(); + FUN_00735aa0(); + FUN_007aa754(local_74); + if (7 < local_90) { + FUN_00431740(local_a4[0]); + } + local_90 = 7; + local_94 = 0; + local_a4[0] = (undefined4 ***)((uint)local_a4[0] & 0xffff0000); + } + else { + local_60 = 0xf; + local_64 = 0; + local_74[0] = 0; + FUN_0041bc2c(local_74,"Tutorial.world",0xe); + (**(code **)(*DAT_00ec768c + 0x1c))(DAT_00ec768c,local_8c,local_74); + ppppuVar6 = (undefined4 ****)local_8c[0]; + if (local_78 < 0x10) { + ppppuVar6 = local_8c; + } + FUN_007ab078(auStack_44,ppppuVar6); + pvVar3 = malloc(0x40); + if (pvVar3 == (void *)0x0) { + puVar4 = (undefined4 *)0x0; + } + else { + *(undefined4 *)((int)pvVar3 + 0x3c) = 0; + puVar4 = (undefined4 *)FUN_0059dd6c(pvVar3,auStack_44,0,0,pvVar3); + } + FUN_0076a604(puVar4); + FUN_0058ef48(); + FUN_00735aa0(); + FUN_007aa754(auStack_44); + if (0xf < local_78) { + FUN_00431740(local_8c[0]); + } + local_78 = 0xf; + local_7c = 0; + local_8c[0] = (undefined4 ***)((uint)local_8c[0] & 0xffffff00); + } + if (puVar4 != (undefined4 *)0x0) { + (**(code **)*puVar4)(puVar4,1); + } + iVar2 = FUN_0058e96c(); + if (*(char *)(iVar2 + 0xa8) == '\0') { + FUN_0058e96c(); + FUN_005bbb70(); + } + FUN_0076e360(); + FUN_00758430(); + FUN_0074a7e8(); + FUN_007a9558(); + FUN_005a5788(); + FUN_007b86a8(); + } + DAT_010338d2 = 1; + DAT_0103396b = 1; + iVar2 = FUN_00735520(); + if (iVar2 == 0) { + DAT_00fe1f86 = 0; + } + FUN_007ffb98(0); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/00606bc4.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/00606bc4.c new file mode 100644 index 000000000..804d7c94c --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/00606bc4.c @@ -0,0 +1,726 @@ + +void FUN_00606bc4(int param_1,undefined4 param_2,int param_3) + +{ + byte bVar1; + int iVar2; + undefined4 uVar3; + int iVar4; + int iVar5; + int iVar6; + uint in_fpscr; + uint uVar7; + float fVar8; + float fVar9; + float fVar10; + + iVar2 = FUN_00592fc8(); + fVar10 = *(float *)(iVar2 + 0x5288); + iVar6 = param_1 + 0x1900; + iVar2 = 0x28; + do { + iVar4 = iVar2; + iVar6 = iVar6 + -0xa0; + iVar2 = iVar4 + -1; + FUN_00612a6c(iVar6); + } while (0 < iVar2); + switch(param_2) { + case 1: + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x58,1,0); + FUN_00616ed8(param_1 + iVar4 * 0xa0,0x57,1,0); + FUN_00616ed8(param_1 + (iVar4 + 1) * 0xa0,0x23,1,0); + FUN_006317fc(param_1 + (iVar4 + 2) * 0xa0,0xfffffff3,1); + FUN_006317fc(param_1 + (iVar4 + 3) * 0xa0,0xfffffff0,1); + FUN_00616ed8(param_1 + (iVar4 + 4) * 0xa0,8,1,0); + iVar6 = iVar4 + 6; + FUN_00616ed8(param_1 + (iVar4 + 5) * 0xa0,0x1c,1,0); + if (param_3 != 0) { + iVar2 = FUN_006c1308(); + fVar10 = (float)VectorSignedToFloat((int)*(short *)(iVar2 + 0x5d0c), + (byte)(in_fpscr >> 0x16) & 3); + fVar8 = (float)VectorSignedToFloat((int)*(short *)(param_3 + 0x5d08), + (byte)(in_fpscr >> 0x16) & 3); + if (fVar10 * 0.25 <= fVar8) { + iVar2 = iVar6 * 0xa0; + iVar6 = iVar4 + 7; + FUN_00616ed8(param_1 + iVar2,0x6e,1,0); + } + } + FUN_00616ed8(param_1 + iVar6 * 0xa0,0x28,1,0); + FUN_00616ed8(param_1 + (iVar6 + 1) * 0xa0,0x2a,1,0); + iVar2 = iVar6 + 3; + FUN_00616ed8(param_1 + (iVar6 + 2) * 0xa0,0x3c5,1,0); + if ((param_3 != 0) && (*(char *)(param_3 + 0xea) != '\0')) { + iVar4 = iVar2 * 0xa0; + iVar2 = iVar6 + 4; + FUN_00616ed8(param_1 + iVar4,0x3c7,1,0); + } + if (DAT_010703e2 != '\0') { + iVar6 = iVar2 * 0xa0; + iVar2 = iVar2 + 1; + FUN_00616ed8(param_1 + iVar6,0x117,1,0); + } + if (DAT_010703e0 == '\0') { + iVar6 = iVar2 * 0xa0; + iVar2 = iVar2 + 1; + FUN_00616ed8(param_1 + iVar6,0x11a,1,0); + } + if (DAT_00fe1f7b != '\0') { + iVar6 = iVar2 * 0xa0; + iVar2 = iVar2 + 1; + FUN_00616ed8(param_1 + iVar6,0x15a,1,0); + } + if (DAT_010338d3 != '\0') { + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x1e8,1,0); + } + if ((param_3 != 0) && (iVar6 = FUN_006beaa8(param_3,0x3a2), iVar6 != 0)) { + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x3a3,1,0); + iVar6 = iVar2 + 1; + iVar2 = iVar2 + 2; + FUN_00616ed8(param_1 + iVar6 * 0xa0,0x64e,1,0); + } + iVar6 = FUN_007354a8(); + if (iVar6 != 0) { + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x6fa,1,0); + iVar2 = iVar2 + 1; + } + if (DAT_010338d3 != '\0') { + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x544,1,0); + iVar2 = iVar2 + 1; + } + iVar6 = FUN_00735594(); + if (iVar6 != 0) { + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x13bb,1,0); + iVar6 = iVar2 + 1; + iVar2 = iVar2 + 2; + FUN_00616ed8(param_1 + iVar6 * 0xa0,0x13b9,1,0); + } + iVar6 = FUN_00735468(); + if (iVar6 != 0) { + iVar6 = iVar2 * 0xa0; + iVar2 = iVar2 + 1; + FUN_00616ed8(param_1 + iVar6,0x13c7,1,0); + } + iVar6 = FUN_007354e4(); + if (iVar6 == 0) goto switchD_00606c02_default; + uVar3 = 0x13d2; + iVar6 = iVar2 + 1; + iVar5 = iVar2; + break; + case 2: + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x61,1,0); + if ((DAT_010703e2 != '\0') || (DAT_010338d3 != '\0')) { + iVar2 = iVar4 * 0xa0; + iVar4 = iVar4 + 1; + FUN_00616ed8(param_1 + iVar2,0x116,1,0); + } + if (((DAT_00fe1f7a != '\0') && (DAT_010703e0 == '\0')) || (DAT_010338d3 != '\0')) { + iVar2 = iVar4 * 0xa0; + iVar4 = iVar4 + 1; + FUN_00616ed8(param_1 + iVar2,0x2f,1,0); + } + FUN_00616ed8(param_1 + iVar4 * 0xa0,0x5f,1,0); + iVar2 = iVar4 + 2; + FUN_00616ed8(param_1 + (iVar4 + 1) * 0xa0,0x62,1,0); + if (DAT_010703e0 == '\0') { + iVar6 = iVar2 * 0xa0; + iVar2 = iVar4 + 3; + FUN_00616ed8(param_1 + iVar6,0x144,1,0); + } + if (DAT_010338d3 != '\0') { + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x216,1,0); + iVar6 = iVar2 + 1; + iVar2 = iVar2 + 2; + FUN_00616ed8(param_1 + iVar6 * 0xa0,0x598,1,0); + } + if (param_3 != 0) { + iVar6 = FUN_006beaa8(param_3,0x4ea); + if (iVar6 != 0) { + iVar6 = iVar2 * 0xa0; + iVar2 = iVar2 + 1; + FUN_00616ed8(param_1 + iVar6,0x4ed,1,0); + } + iVar6 = FUN_006beaa8(param_3,0x72b); + if (iVar6 != 0) { + iVar6 = iVar2 * 0xa0; + iVar2 = iVar2 + 1; + FUN_00616ed8(param_1 + iVar6,0x72c,1,0); + } + iVar6 = FUN_006beaa8(param_3,0x6f6); + if (iVar6 != 0) { + iVar6 = iVar2 * 0xa0; + iVar2 = iVar2 + 1; + FUN_00616ed8(param_1 + iVar6,0x6f7,1,0); + } + iVar6 = FUN_006beaa8(param_3,0x6f8); + if (iVar6 != 0) { + iVar6 = iVar2 * 0xa0; + iVar2 = iVar2 + 1; + FUN_00616ed8(param_1 + iVar6,0x6f9,1,0); + } + } + iVar6 = FUN_007354a8(); + if (iVar6 == 0) goto switchD_00606c02_default; + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x6c8,1,0); + FUN_00616ed8(param_1 + (iVar2 + 1) * 0xa0,0x6c9,1,0); + uVar3 = 0x6ca; + iVar6 = iVar2 + 3; + iVar5 = iVar2 + 2; + break; + case 3: + iVar2 = param_1 + iVar2 * 0xa0; + if (DAT_010703e2 == '\0') { + FUN_00616ed8(iVar2,0x42,1,0); + FUN_00616ed8(param_1 + iVar4 * 0xa0,0x3e,1,0); + iVar2 = iVar4 + 1; + iVar6 = iVar4 + 2; + uVar3 = 0x3f; + } + else { + FUN_00616ed8(iVar2,0x43,1,0); + iVar6 = iVar4 + 1; + uVar3 = 0x3b; + iVar2 = iVar4; + } + FUN_00616ed8(param_1 + iVar2 * 0xa0,uVar3,1,0); + FUN_00616ed8(param_1 + iVar6 * 0xa0,0x1b,1,0); + FUN_00616ed8(param_1 + (iVar6 + 1) * 0xa0,0x72,1,0); + FUN_00616ed8(param_1 + (iVar6 + 2) * 0xa0,0x724,1,0); + FUN_00616ed8(param_1 + (iVar6 + 3) * 0xa0,0x2e9,1,0); + iVar2 = iVar6 + 5; + FUN_00616ed8(param_1 + (iVar6 + 4) * 0xa0,0x2eb,1,0); + if (DAT_010338d3 != '\0') { + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x2ea,1,0); + iVar2 = iVar6 + 7; + FUN_00616ed8(param_1 + (iVar6 + 6) * 0xa0,0x171,1,0); + if ((DAT_010703e0 == '\0') && ((DAT_010703e4 == 4 || (DAT_010703e2 != '\0')))) { + iVar4 = iVar2 * 0xa0; + iVar2 = iVar6 + 8; + FUN_00616ed8(param_1 + iVar4,0x13ab,1,0); + } + } + if ((param_3 != 0) && (iVar6 = FUN_00592fc8(), 10 < *(int *)(iVar6 + 0x4cc0))) { + iVar6 = iVar2 * 0xa0; + iVar2 = iVar2 + 1; + FUN_00616ed8(param_1 + iVar6,0xc2,1,0); + } + iVar6 = FUN_007354a8(); + if (iVar6 == 0) goto switchD_00606c02_default; + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x73d,1,0); + uVar3 = 0x73e; + goto LAB_006081e4; + case 4: + FUN_00616ed8(param_1 + iVar2 * 0xa0,0xa8,1,0); + FUN_00616ed8(param_1 + iVar4 * 0xa0,0xa6,1,0); + iVar2 = iVar4 + 2; + FUN_00616ed8(param_1 + (iVar4 + 1) * 0xa0,0xa7,1,0); + if (DAT_010338d3 == '\0') goto switchD_00606c02_default; + iVar5 = iVar4 + 3; + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x109,1,0); + if (DAT_00fe1f8d != '\0') { + iVar2 = iVar5 * 0xa0; + iVar5 = iVar4 + 4; + FUN_00616ed8(param_1 + iVar2,0x3a9,1,0); + } + uVar3 = 0x543; + iVar6 = iVar5 + 1; + break; + case 5: + FUN_00616ed8(param_1 + iVar2 * 0xa0,0xfe,1,0); + iVar2 = iVar4 + 1; + FUN_00616ed8(param_1 + iVar4 * 0xa0,0x3d5,1,0); + if (DAT_010703e0 != '\0') { + iVar6 = iVar2 * 0xa0; + iVar2 = iVar4 + 2; + FUN_00616ed8(param_1 + iVar6,0xf2,1,0); + } + if (DAT_010703e4 == 0) { + FUN_00616ed8(param_1 + iVar2 * 0xa0,0xf5,1,0); + uVar3 = 0xf6; +LAB_00607326: + iVar6 = iVar2 + 1; + iVar2 = iVar2 + 2; + FUN_00616ed8(param_1 + iVar6 * 0xa0,uVar3,1,0); + } + else if (DAT_010703e4 == 1) { + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x145,1,0); + uVar3 = 0x146; + goto LAB_00607326; + } + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x10d,1,0); + FUN_00616ed8(param_1 + (iVar2 + 1) * 0xa0,0x10e,1,0); + iVar6 = iVar2 + 3; + FUN_00616ed8(param_1 + (iVar2 + 2) * 0xa0,0x10f,1,0); + if (DAT_00fe1f85 != '\0') { + FUN_00616ed8(param_1 + iVar6 * 0xa0,0x1f7,1,0); + FUN_00616ed8(param_1 + (iVar2 + 4) * 0xa0,0x1f8,1,0); + iVar6 = iVar2 + 6; + FUN_00616ed8(param_1 + (iVar2 + 5) * 0xa0,0x1f9,1,0); + } + iVar4 = iVar6; + if (DAT_010703e2 != '\0') { + iVar4 = iVar6 + 1; + FUN_00616ed8(param_1 + iVar6 * 0xa0,0x142,1,0); + switch(DAT_010703e4) { + case 2: + case 5: + if ((param_3 == 0) || (*(char *)(param_3 + 0xdb) != '\0')) { + iVar2 = iVar4 * 0xa0; + iVar4 = iVar6 + 2; + FUN_00616ed8(param_1 + iVar2,0x13a6,1,0); + } + if ((param_3 == 0) || (*(char *)(param_3 + 0xdb) == '\0')) { + uVar3 = 0x13a5; +LAB_00607472: + iVar2 = iVar4 * 0xa0; + iVar4 = iVar4 + 1; + FUN_00616ed8(param_1 + iVar2,uVar3,1,0); + } + break; + case 3: + case 7: + if ((param_3 == 0) || (*(char *)(param_3 + 0xdb) != '\0')) { + iVar2 = iVar4 * 0xa0; + iVar4 = iVar6 + 2; + FUN_00616ed8(param_1 + iVar2,0x13aa,1,0); + } + if ((param_3 == 0) || (*(char *)(param_3 + 0xdb) == '\0')) { + uVar3 = 0x13a9; + goto LAB_00607472; + } + break; + case 6: + if ((param_3 == 0) || (*(char *)(param_3 + 0xdb) != '\0')) { + iVar2 = iVar4 * 0xa0; + iVar4 = iVar6 + 2; + FUN_00616ed8(param_1 + iVar2,0x13a8,1,0); + } + if ((param_3 == 0) || (*(char *)(param_3 + 0xdb) == '\0')) { + uVar3 = 0x13a7; + goto LAB_00607472; + } + } + } + if ((param_3 != 0) && (*(char *)(param_3 + 0xea) != '\0')) { + iVar2 = iVar4 * 0xa0; + iVar4 = iVar4 + 1; + FUN_00616ed8(param_1 + iVar2,0x595,1,0); + } + iVar2 = FUN_007354a8(); + if (iVar2 != 0) { + iVar2 = iVar4 * 0xa0; + iVar4 = iVar4 + 1; + FUN_00616ed8(param_1 + iVar2,0x6cc,1,0); + } + iVar2 = iVar4; + if (DAT_010338d3 != '\0') { + if (DAT_010703e4 == 2) { + iVar2 = iVar4 + 1; + uVar3 = 0x365; + } + else if (DAT_010703e4 == 4) { + FUN_00616ed8(param_1 + iVar4 * 0xa0,0x360,1,0); + iVar2 = iVar4 + 2; + uVar3 = 0x361; + iVar4 = iVar4 + 1; + } + else { + if (DAT_010703e4 != 6) goto LAB_00607548; + FUN_00616ed8(param_1 + iVar4 * 0xa0,0x369,1,0); + FUN_00616ed8(param_1 + (iVar4 + 1) * 0xa0,0x36a,1,0); + iVar2 = iVar4 + 3; + uVar3 = 0x36b; + iVar4 = iVar4 + 2; + } + FUN_00616ed8(param_1 + iVar4 * 0xa0,uVar3,1,0); + } +LAB_00607548: + if (DAT_00fe1f84 == '\0') goto switchD_00606c02_default; + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x4fb,1,0); + uVar3 = 0x4fc; + goto LAB_006081e4; + case 6: + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x80,1,0); + FUN_00616ed8(param_1 + iVar4 * 0xa0,0x18e,1,0); + FUN_00616ed8(param_1 + (iVar4 + 1) * 0xa0,0x54,1,0); + uVar3 = 0xa1; + iVar6 = iVar4 + 3; + iVar5 = iVar4 + 2; + break; + case 7: + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x1e7,1,0); + FUN_00616ed8(param_1 + iVar4 * 0xa0,0x1f0,1,0); + FUN_00616ed8(param_1 + (iVar4 + 1) * 0xa0,500,1,0); + FUN_00616ed8(param_1 + (iVar4 + 2) * 0xa0,0x1fb,1,0); + FUN_00616ed8(param_1 + (iVar4 + 3) * 0xa0,0x1fc,1,0); + FUN_00616ed8(param_1 + (iVar4 + 4) * 0xa0,0x213,1,0); + iVar2 = iVar4 + 6; + FUN_00616ed8(param_1 + (iVar4 + 5) * 0xa0,0x240,1,0); + iVar6 = FUN_007354a8(); + if (iVar6 == 0) goto switchD_00606c02_default; + uVar3 = 0x6cb; + iVar6 = iVar4 + 7; + iVar5 = iVar2; + break; + case 8: + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x1fd,1,0); + FUN_00616ed8(param_1 + iVar4 * 0xa0,0x1fe,1,0); + FUN_00616ed8(param_1 + (iVar4 + 1) * 0xa0,0x212,1,0); + FUN_00616ed8(param_1 + (iVar4 + 2) * 0xa0,0x201,1,0); + FUN_00616ed8(param_1 + (iVar4 + 3) * 0xa0,0x21a,1,0); + FUN_00616ed8(param_1 + (iVar4 + 4) * 0xa0,0x247,1,0); + FUN_00616ed8(param_1 + (iVar4 + 5) * 0xa0,0x248,1,0); + FUN_00616ed8(param_1 + (iVar4 + 6) * 0xa0,0x249,1,0); + FUN_00616ed8(param_1 + (iVar4 + 7) * 0xa0,0x211,1,0); + FUN_00616ed8(param_1 + (iVar4 + 8) * 0xa0,0x21d,1,0); + FUN_00616ed8(param_1 + (iVar4 + 9) * 0xa0,0x21e,1,0); + FUN_00616ed8(param_1 + (iVar4 + 10) * 0xa0,0x21f,1,0); + FUN_00616ed8(param_1 + (iVar4 + 0xb) * 0xa0,0x354,1,0); + FUN_00616ed8(param_1 + (iVar4 + 0xc) * 0xa0,0x355,1,0); + uVar3 = 0x351; + iVar6 = iVar4 + 0xe; + iVar5 = iVar4 + 0xd; + break; + case 9: + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x24c,1,0); + FUN_00616ed8(param_1 + iVar4 * 0xa0,0x24d,1,0); + FUN_00616ed8(param_1 + (iVar4 + 1) * 0xa0,0x24e,1,0); + FUN_00616ed8(param_1 + (iVar4 + 2) * 0xa0,0x255,1,0); + FUN_00616ed8(param_1 + (iVar4 + 3) * 0xa0,0x256,1,0); + uVar3 = 0x254; + iVar6 = iVar4 + 5; + iVar5 = iVar4 + 4; + break; + case 10: + iVar6 = iVar2; + if (DAT_00fe1f8b != '\0') { + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x2f4,1,0); + iVar6 = iVar4 + 1; + FUN_00616ed8(param_1 + iVar4 * 0xa0,0x313,1,0); + } + iVar2 = iVar6 + 1; + FUN_00616ed8(param_1 + iVar6 * 0xa0,0x364,1,0); + if (DAT_00fe1f8d != '\0') { + iVar4 = iVar2 * 0xa0; + iVar2 = iVar6 + 2; + FUN_00616ed8(param_1 + iVar4,0x60f,1,0); + } + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x49d,1,0); + uVar3 = 0x30f; + goto LAB_006081e4; + case 0xb: + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x30b,1,0); + if (DAT_010703e4 < 4) { + FUN_00616ed8(param_1 + iVar4 * 0xa0,0x347,1,0); + FUN_00616ed8(param_1 + (iVar4 + 1) * 0xa0,0x348,1,0); + iVar2 = iVar4 + 2; + iVar6 = iVar4 + 3; + uVar3 = 0x349; + } + else { + iVar6 = iVar4 + 1; + uVar3 = 0x2ec; + iVar2 = iVar4; + } + FUN_00616ed8(param_1 + iVar2 * 0xa0,uVar3,1,0); + if (DAT_010703e0 == '\0') { + uVar3 = 0x3e3; + } + else { + uVar3 = 0x3e6; + } + FUN_00616ed8(param_1 + iVar6 * 0xa0,uVar3,1,0); + FUN_00616ed8(param_1 + (iVar6 + 1) * 0xa0,0x4ef,1,0); + if ((DAT_010703e1 == '\0') && (DAT_010703e2 == '\0')) { + if ((param_3 == 0) || (*(char *)(param_3 + 0xe7) == '\0')) { + uVar3 = 0x30c; + } + else { + uVar3 = 0x30d; + } + } + else if (DAT_0102a787 == '\0') { + uVar3 = 0x30e; + } + else { + uVar3 = 0x310; + } + iVar2 = iVar6 + 3; + FUN_00616ed8(param_1 + (iVar6 + 2) * 0xa0,uVar3,1,0); + if (DAT_010338d3 != '\0') { + iVar4 = iVar2 * 0xa0; + iVar2 = iVar6 + 4; + FUN_00616ed8(param_1 + iVar4,0x540,1,0); + } + iVar6 = FUN_007354a8(); + if (iVar6 == 0) goto switchD_00606c02_default; + uVar3 = 0x6ce; + iVar6 = iVar2 + 1; + iVar5 = iVar2; + break; + case 0xc: + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x40d,1,0); + iVar2 = iVar4 + 1; + FUN_00616ed8(param_1 + iVar4 * 0xa0,0x460,1,0); + iVar6 = FUN_007354a8(); + if (iVar6 == 0) goto switchD_00606c02_default; + uVar3 = 0x6cd; + iVar6 = iVar4 + 2; + iVar5 = iVar2; + break; + case 0xd: + FUN_00616ed8(param_1 + iVar2 * 0xa0,1000,1,0); + FUN_00616ed8(param_1 + iVar4 * 0xa0,0x490,1,0); + FUN_00616ed8(param_1 + (iVar4 + 1) * 0xa0,0x5a9,1,0); + FUN_00616ed8(param_1 + (iVar4 + 2) * 0xa0,0x541,1,0); + iVar2 = iVar4 + 4; + FUN_00616ed8(param_1 + (iVar4 + 3) * 0xa0,0x5aa,1,0); + if (DAT_010338d3 == '\0') goto switchD_00606c02_default; + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x3ca,1,0); + FUN_00616ed8(param_1 + (iVar4 + 5) * 0xa0,0x3cb,1,0); + FUN_00616ed8(param_1 + (iVar4 + 6) * 0xa0,0x3cc,1,0); + uVar3 = 0x3cd; + iVar6 = iVar4 + 8; + iVar5 = iVar4 + 7; + break; + case 0xe: + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x303,1,0); + if (DAT_010703e2 != '\0') { + iVar2 = iVar4 * 0xa0; + iVar4 = iVar4 + 1; + FUN_00616ed8(param_1 + iVar2,0x304,1,0); + } + if ((DAT_010703e0 == '\0') || (iVar6 = iVar4, DAT_010703e1 != '\0')) { + iVar6 = iVar4 + 1; + FUN_00616ed8(param_1 + iVar4 * 0xa0,0x305,1,0); + if (DAT_010703e1 != '\0') { + iVar2 = iVar6 * 0xa0; + iVar6 = iVar4 + 2; + FUN_00616ed8(param_1 + iVar2,0x306,1,0); + } + } + iVar2 = iVar6; + if (DAT_010338d3 != '\0') { + iVar2 = iVar6 + 1; + FUN_00616ed8(param_1 + iVar6 * 0xa0,0x2f8,1,0); + if (DAT_010338d3 != '\0') { + iVar4 = iVar2 * 0xa0; + iVar2 = iVar6 + 2; + FUN_00616ed8(param_1 + iVar4,0x542,1,0); + } + } + iVar6 = FUN_007354a8(); + if (iVar6 == 0) goto switchD_00606c02_default; + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x6cf,1,0); + FUN_00616ed8(param_1 + (iVar2 + 1) * 0xa0,0x6d0,1,0); + uVar3 = 0x6d1; + iVar6 = iVar2 + 3; + iVar5 = iVar2 + 2; + break; + case 0xf: + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x42f,1,0); + FUN_00616ed8(param_1 + iVar4 * 0xa0,0x430,1,0); + FUN_00616ed8(param_1 + (iVar4 + 1) * 0xa0,0x44c,1,0); + iVar6 = 0x431; + iVar2 = iVar4 + 2; + do { + iVar4 = iVar2; + FUN_00616ed8(param_1 + iVar4 * 0xa0,iVar6,1,0); + iVar6 = iVar6 + 1; + iVar2 = iVar4 + 1; + } while (iVar6 < 0x43d); + FUN_00616ed8(param_1 + (iVar4 + 1) * 0xa0,0x449,1,0); + FUN_00616ed8(param_1 + (iVar4 + 2) * 0xa0,1099,1,0); + FUN_00616ed8(param_1 + (iVar4 + 3) * 0xa0,0x44a,1,0); + FUN_00616ed8(param_1 + (iVar4 + 4) * 0xa0,0x5d2,1,0); + if (DAT_010703e4 < 2) { + uVar3 = 0x5c9; + } + else if (DAT_010703e4 < 4) { + uVar3 = 0x5ca; + } + else if (DAT_010703e4 < 6) { + uVar3 = 0x5cb; + } + else { + uVar3 = 0x5cc; + } + iVar2 = iVar4 + 6; + FUN_00616ed8(param_1 + (iVar4 + 5) * 0xa0,uVar3,1,0); + if (param_3 != 0) { + if (*(char *)(param_3 + 0xeb) != '\0') { + iVar6 = iVar2 * 0xa0; + iVar2 = iVar4 + 7; + FUN_00616ed8(param_1 + iVar6,0x5d4,1,0); + } + if (*(char *)(param_3 + 0xe6) != '\0') { + iVar6 = iVar2 * 0xa0; + iVar2 = iVar2 + 1; + FUN_00616ed8(param_1 + iVar6,0x5d0,1,0); + } + if (*(char *)(param_3 + 0xe7) != '\0') { + iVar6 = iVar2 * 0xa0; + iVar2 = iVar2 + 1; + FUN_00616ed8(param_1 + iVar6,0x5d1,1,0); + } + if (*(char *)(param_3 + 0xe9) != '\0') { + iVar6 = iVar2 * 0xa0; + iVar2 = iVar2 + 1; + FUN_00616ed8(param_1 + iVar6,0x5ce,1,0); + } + if (*(char *)(param_3 + 0xea) != '\0') { + iVar6 = iVar2 * 0xa0; + iVar2 = iVar2 + 1; + FUN_00616ed8(param_1 + iVar6,0x5cf,1,0); + } + iVar6 = FUN_00592fc8(); + fVar10 = fVar10 * DAT_00607e70; + fVar8 = (float)VectorSignedToFloat(*(undefined4 *)(iVar6 + 0x4c9c), + (byte)(in_fpscr >> 0x16) & 3); + uVar7 = in_fpscr & 0xfffffff | (uint)(fVar8 < fVar10) << 0x1f | + (uint)(fVar8 == fVar10) << 0x1e; + in_fpscr = uVar7 | (uint)(NAN(fVar8) || NAN(fVar10)) << 0x1c; + bVar1 = (byte)(uVar7 >> 0x18); + if (!(bool)(bVar1 >> 6 & 1) && bVar1 >> 7 == ((byte)(in_fpscr >> 0x1c) & 1)) { + iVar6 = iVar2 * 0xa0; + iVar2 = iVar2 + 1; + FUN_00616ed8(param_1 + iVar6,0x5d3,1,0); + } + } + if (DAT_010703e2 != '\0') { + iVar6 = iVar2 * 0xa0; + iVar2 = iVar2 + 1; + FUN_00616ed8(param_1 + iVar6,0x5d5,1,0); + } + fVar8 = DAT_00607e6c; + fVar10 = DAT_00607e68; + if (param_3 == 0) { + return; + } + fVar9 = (float)VectorSignedToFloat(DAT_00902ebc,(byte)(in_fpscr >> 0x16) & 3); + uVar7 = in_fpscr & 0xfffffff | + (uint)(fVar9 * DAT_00607e68 <= *(float *)(param_3 + 0x114) * DAT_00607e6c) << 0x1d; + if ((byte)(uVar7 >> 0x1d) == 0) { + iVar6 = iVar2 * 0xa0; + iVar2 = iVar2 + 1; + FUN_00616ed8(param_1 + iVar6,0x5cd,1,0); + } + fVar9 = (float)VectorSignedToFloat(DAT_00902ebc,(byte)(uVar7 >> 0x16) & 3); + if ((fVar9 * fVar10 <= *(float *)(param_3 + 0x114) * fVar8) || (DAT_010338d3 == '\0')) + goto switchD_00606c02_default; + uVar3 = 0x5d6; + iVar6 = iVar2 + 1; + iVar5 = iVar2; + break; + case 0x10: + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x596,1,0); + iVar6 = iVar4 + 1; + FUN_00616ed8(param_1 + iVar4 * 0xa0,0x3da,1,0); + if ((DAT_010338d3 != '\0') && (DAT_00fe1f8d != '\0')) { + if ((param_3 != 0) && (iVar2 = FUN_006beaa8(param_3,0x485), iVar2 != 0)) { + FUN_00616ed8(param_1 + iVar6 * 0xa0,0x487,1,0); + FUN_00616ed8(param_1 + (iVar4 + 2) * 0xa0,0x488,1,0); + iVar6 = iVar4 + 4; + FUN_00616ed8(param_1 + (iVar4 + 3) * 0xa0,0x489,1,0); + if (DAT_010703e0 == '\0') { + iVar2 = iVar6 * 0xa0; + iVar6 = iVar4 + 5; + FUN_00616ed8(param_1 + iVar2,0x486,1,0); + } + if (*(char *)(param_3 + 0xe9) != '\0') { + iVar2 = iVar6 * 0xa0; + iVar6 = iVar6 + 1; + FUN_00616ed8(param_1 + iVar2,0x48f,1,0); + } + } + iVar2 = iVar6 * 0xa0; + iVar6 = iVar6 + 1; + FUN_00616ed8(param_1 + iVar2,0x53b,1,0); + } + iVar2 = iVar6; + if (((DAT_010338d3 != '\0') && (param_3 != 0)) && (*(char *)(param_3 + 0xe9) != '\0')) { + iVar2 = iVar6 + 1; + FUN_00616ed8(param_1 + iVar6 * 0xa0,0x493,1,0); + if (DAT_010703e0 == '\0') { + iVar4 = iVar2 * 0xa0; + iVar2 = iVar6 + 2; + FUN_00616ed8(param_1 + iVar4,0x48a,1,0); + } + } + if ((DAT_010338d3 != '\0') && (DAT_00fe1f8d != '\0')) { + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x38d,1,0); + FUN_00616ed8(param_1 + (iVar2 + 1) * 0xa0,0x38e,1,0); + FUN_00616ed8(param_1 + (iVar2 + 2) * 0xa0,0x3ac,1,0); + FUN_00616ed8(param_1 + (iVar2 + 3) * 0xa0,0x3ad,1,0); + FUN_00616ed8(param_1 + (iVar2 + 4) * 0xa0,0x3ae,1,0); + FUN_00616ed8(param_1 + (iVar2 + 5) * 0xa0,0x3af,1,0); + FUN_00616ed8(param_1 + (iVar2 + 6) * 0xa0,0x3b0,1,0); + iVar6 = iVar2 + 7; + iVar2 = iVar2 + 8; + FUN_00616ed8(param_1 + iVar6 * 0xa0,0x3b1,1,0); + } + if (param_3 != 0) { + iVar6 = FUN_006beaa8(param_3,0x72b); + if (iVar6 != 0) { + iVar6 = iVar2 * 0xa0; + iVar2 = iVar2 + 1; + FUN_00616ed8(param_1 + iVar6,0x72c,1,0); + } + iVar6 = FUN_006beaa8(param_3,0x4ea); + if (iVar6 != 0) { + iVar6 = iVar2 * 0xa0; + iVar2 = iVar2 + 1; + FUN_00616ed8(param_1 + iVar6,0x4ed,1,0); + } + } + iVar6 = FUN_007354a8(); + if (iVar6 == 0) goto switchD_00606c02_default; + uVar3 = 0x6ff; + iVar6 = iVar2 + 1; + iVar5 = iVar2; + break; + case 0x11: + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x3a0,1,0); + FUN_00616ed8(param_1 + iVar4 * 0xa0,0x3a1,1,0); + FUN_00616ed8(param_1 + (iVar4 + 1) * 0xa0,0x36c,1,0); + FUN_00616ed8(param_1 + (iVar4 + 2) * 0xa0,0x36d,1,0); + iVar2 = iVar4 + 4; + FUN_00616ed8(param_1 + (iVar4 + 3) * 0xa0,0x36e,1,0); + if (param_3 != 0) { + iVar6 = FUN_00592fc8(); + iVar5 = *(int *)(iVar6 + 0x10c) + DAT_00902e84 / 2; + iVar5 = (int)(iVar5 + ((uint)(iVar5 >> 3) >> 0x1c)) >> 4; + if (((int)(*(int *)(iVar6 + 0x110) + ((uint)(*(int *)(iVar6 + 0x110) >> 3) >> 0x1c)) >> 4 < + DAT_00902ebc + 10) && ((iVar5 < 0x17c || (DAT_00902ea0 + -0x17c < iVar5)))) { + iVar6 = iVar2 * 0xa0; + iVar2 = iVar4 + 5; + FUN_00616ed8(param_1 + iVar6,0x49c,1,0); + } + } + if (((DAT_010338d3 == '\0') || (DAT_00fe1f8b == '\0')) || + (iVar6 = FUN_00656370(0xd0), iVar6 == 0)) goto switchD_00606c02_default; + FUN_00616ed8(param_1 + iVar2 * 0xa0,0x539,1,0); + uVar3 = 0x53a; +LAB_006081e4: + iVar6 = iVar2 + 2; + iVar5 = iVar2 + 1; + break; + default: + goto switchD_00606c02_default; + } + iVar2 = iVar6; + FUN_00616ed8(param_1 + iVar5 * 0xa0,uVar3,1,0); +switchD_00606c02_default: + iVar6 = DAT_00608228; + if (((param_3 != 0) && (*(char *)(param_3 + 0x47) != '\0')) && (0 < iVar2)) { + do { + iVar4 = (int)((ulonglong)((longlong)(*(int *)(param_1 + 0x98) << 3) * (longlong)iVar6) >> 0x20 + ); + *(int *)(param_1 + 0x98) = (iVar4 >> 2) - (iVar4 >> 0x1f); + param_1 = param_1 + 0xa0; + iVar2 = iVar2 + -1; + } while (iVar2 != 0); + } + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006452c4.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006452c4.c new file mode 100644 index 000000000..574241f32 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006452c4.c @@ -0,0 +1,189 @@ + +void FUN_006452c4(void) + +{ + int iVar1; + short sVar2; + int iVar3; + int *piVar4; + undefined1 uVar5; + byte bVar6; + int iVar7; + ushort uVar8; + int iVar9; + undefined4 local_2c [2]; + + iVar3 = FUN_007ffb80(); + EnterCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e5c); + DAT_00fe1e74 = 1; + (**(code **)(DAT_00fe1d38 + 0x24))(&DAT_00fe1d38); + local_2c[0] = CONCAT31(local_2c[0]._1_3_,(char)iVar3); + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_2c,1); + iVar1 = DAT_00fe1ee4; + if (iVar3 < 0x3b) { + if (iVar3 != 0x3a) { + if (iVar3 == 7) { + local_2c[0] = DAT_010703dc; + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_2c,4); + bVar6 = DAT_010703e4 << 5; + if (DAT_010703e0 != '\0') { + bVar6 = bVar6 | 1; + } + if (DAT_010703e1 != '\0') { + bVar6 = bVar6 | 2; + } + if (DAT_010703e2 != '\0') { + bVar6 = bVar6 | 4; + } + if (DAT_010703e3 != '\0') { + bVar6 = bVar6 | 8; + } + local_2c[0] = CONCAT31(local_2c[0]._1_3_,bVar6); + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_2c,1); + local_2c[0]._0_2_ = DAT_00902ea0; + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_2c,2); + local_2c[0]._0_2_ = DAT_00902ea4; + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_2c,2); + local_2c[0]._0_2_ = DAT_010338cc; + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_2c,2); + local_2c[0]._0_2_ = DAT_010338c8; + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_2c,2); + local_2c[0]._0_2_ = (undefined2)DAT_00902ebc; + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_2c,2); + local_2c[0] = CONCAT22(local_2c[0]._2_2_,(short)DAT_01033960); + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_2c,2); + local_2c[0] = DAT_01033974; + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_2c,4); + local_2c[0] = DAT_01033970; + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_2c,4); + FUN_00644b44(&DAT_0102a710,&DAT_00fe1d38); + FUN_00644acc(&DAT_0102a704,&DAT_00fe1d38); + local_2c[0]._0_1_ = (byte)DAT_0102a700 | (byte)((DAT_0102a6f8 | DAT_0102a6fc << 2) << 2); + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_2c,1); + local_2c[0]._0_1_ = (byte)DAT_0102a71c; + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_2c,1); + local_2c[0]._0_1_ = (byte)DAT_0102a720; + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_2c,1); + local_2c[0]._0_1_ = (byte)DAT_0102a724; + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_2c,1); + local_2c[0]._0_1_ = (byte)DAT_0102a728; + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_2c,1); + local_2c[0]._0_1_ = (byte)DAT_0102a72c; + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_2c,1); + local_2c[0]._0_1_ = (byte)DAT_0102a730; + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_2c,1); + local_2c[0]._0_1_ = (byte)DAT_0102a734; + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_2c,1); + local_2c[0]._0_1_ = (byte)DAT_0102a738; + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_2c,1); + local_2c[0] = CONCAT31(local_2c[0]._1_3_,(char)DAT_00901160); + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_2c,1); + local_2c[0] = DAT_01029998; + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_2c,4); + if (DAT_010299a0 == '\0') { + DAT_010299a8 = DAT_00645804; + } + DAT_010299ac = DAT_010299a8; + local_2c[0] = DAT_010299a8; + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_2c,4); + uVar8 = (ushort)(DAT_0102a76f != '\0'); + if (DAT_00fe1f73 != '\0') { + uVar8 = uVar8 | 2; + } + if (DAT_00fe1f7a != '\0') { + uVar8 = uVar8 | 4; + } + if (DAT_00fe1f7b != '\0') { + uVar8 = uVar8 | 8; + } + if (DAT_010338d3 != '\0') { + uVar8 = uVar8 | 0x10; + } + if (DAT_00fe1f85 != '\0') { + uVar8 = uVar8 | 0x20; + } + if (DAT_00fe1f8d != '\0') { + uVar8 = uVar8 | 0x40; + } + if (DAT_00fe1f88 != '\0') { + uVar8 = uVar8 | 0x80; + } + if (DAT_00fe1f89 != '\0') { + uVar8 = uVar8 | 0x100; + } + if (DAT_00fe1f8a != '\0') { + uVar8 = uVar8 | 0x200; + } + if (DAT_0102a787 != '\0') { + uVar8 = uVar8 | 0x400; + } + if (1.0 <= DAT_010299b4) { + uVar8 = uVar8 | 0x800; + } + sVar2 = FUN_00734160(&DAT_010703d8); + local_2c[0] = CONCAT22(local_2c[0]._2_2_,uVar8 | sVar2 << 0xc); + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_2c,2); + (**(code **)(DAT_00fe1d38 + 0x38))(&DAT_00fe1d38,&DAT_01070308); + } + else if ((iVar3 == 0xb) && (DAT_00fe1ec4 == 2)) { + iVar3 = 0; + uVar5 = 0; + iVar7 = *(int *)(DAT_00fe1ee4 + 0x24); + if (0 < iVar7) { + piVar4 = *(int **)(DAT_00fe1ee4 + 0x1c); + do { + iVar3 = iVar3 + *(int *)(*piVar4 + 0x14); + uVar5 = (undefined1)iVar3; + iVar7 = iVar7 + -1; + piVar4 = piVar4 + 1; + } while (iVar7 != 0); + } + local_2c[0] = CONCAT31(local_2c[0]._1_3_,uVar5); + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_2c,1); + iVar3 = 0; + if (0 < *(int *)(iVar1 + 0x24)) { + do { + iVar9 = *(int *)(*(int *)(iVar1 + 0x1c) + iVar3 * 4); + local_2c[0] = CONCAT31(local_2c[0]._1_3_,(char)*(undefined4 *)(iVar9 + 0x14)); + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_2c,1); + iVar7 = 0; + if (0 < *(int *)(iVar9 + 0x14)) { + do { + local_2c[0] = CONCAT31(local_2c[0]._1_3_, + *(undefined1 *) + (*(int *)(*(int *)(iVar9 + 0xc) + iVar7 * 4) + 0x5cc9)); + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_2c,1); + iVar7 = iVar7 + 1; + } while (iVar7 < *(int *)(iVar9 + 0x14)); + } + iVar3 = iVar3 + 1; + } while (iVar3 < *(int *)(iVar1 + 0x24)); + } + } + goto LAB_006457e6; + } + local_2c[0]._0_1_ = DAT_0102a70f; + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_2c,1); + local_2c[0] = CONCAT31(local_2c[0]._1_3_,DAT_0102a70e); + } + else { + if (iVar3 != 0x53) goto LAB_006457e6; + local_2c[0] = DAT_010703dc; + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_2c,4); + bVar6 = DAT_010703e4 << 2; + if (DAT_010703e0 != '\0') { + bVar6 = bVar6 | 1; + } + if (DAT_010703e2 != '\0') { + bVar6 = bVar6 | 2; + } + local_2c[0] = CONCAT31(local_2c[0]._1_3_,bVar6); + } + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_2c,1); +LAB_006457e6: + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e5c); + DAT_00fe1e74 = 0; + FUN_007ffb98(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/0064b17c.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/0064b17c.c new file mode 100644 index 000000000..54d2d3e7d --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/0064b17c.c @@ -0,0 +1,2122 @@ + +void FUN_0064b17c(void) + +{ + undefined1 *puVar1; + byte bVar2; + bool bVar3; + undefined1 uVar4; + undefined2 uVar5; + short sVar6; + uint uVar7; + int iVar8; + uint uVar9; + undefined4 *puVar10; + undefined1 *puVar11; + undefined4 uVar12; + int *piVar13; + undefined4 uVar14; + undefined4 uVar15; + int iVar16; + undefined4 uVar17; + int iVar18; + void *_Dst; + undefined1 *puVar19; + uint uVar20; + undefined2 *puVar21; + int iVar22; + undefined4 *puVar23; + undefined1 *puVar24; + undefined1 uVar25; + uint *puVar26; + undefined *puVar27; + undefined4 *puVar28; + undefined1 *puVar29; + undefined1 *puVar30; + ushort *puVar31; + uint uVar32; + undefined2 *puVar33; + uint in_fpscr; + float fVar34; + float fVar35; + undefined8 uVar36; + undefined8 uVar37; + int local_65c; + undefined1 *local_658; + uint local_654; + undefined4 local_64c; + undefined4 local_648; + undefined1 auStack_644 [8]; + undefined1 auStack_63c [8]; + undefined1 auStack_634 [8]; + undefined2 local_62c [8]; + undefined4 local_61c; + undefined4 local_618; + undefined2 local_614 [8]; + undefined4 local_604; + undefined4 local_600; + undefined2 local_5fc [8]; + undefined4 local_5ec; + undefined4 local_5e8; + undefined1 auStack_5e4 [24]; + undefined1 auStack_5cc [24]; + undefined auStack_5b4 [24]; + undefined1 auStack_59c [8]; + undefined1 auStack_594 [8]; + undefined4 local_58c; + undefined4 uStack_588; + undefined1 auStack_584 [8]; + undefined1 auStack_57c [24]; + undefined1 auStack_564 [8]; + undefined1 auStack_55c [24]; + undefined1 auStack_544 [8]; + undefined1 auStack_53c [8]; + undefined1 auStack_534 [8]; + undefined1 auStack_52c [8]; + undefined1 auStack_524 [24]; + undefined1 auStack_50c [24]; + undefined1 auStack_4f4 [48]; + undefined1 auStack_4c4 [48]; + undefined1 auStack_494 [24]; + undefined1 auStack_47c [48]; + undefined1 auStack_44c [24]; + undefined1 auStack_434 [48]; + undefined1 auStack_404 [24]; + undefined1 auStack_3ec [48]; + undefined1 auStack_3bc [48]; + undefined1 auStack_38c [48]; + undefined1 auStack_35c [48]; + undefined1 auStack_32c [48]; + undefined1 auStack_2fc [48]; + undefined1 auStack_2cc [48]; + undefined1 auStack_29c [48]; + undefined1 auStack_26c [48]; + undefined1 auStack_23c [48]; + undefined1 auStack_20c [48]; + undefined1 auStack_1dc [48]; + undefined1 auStack_1ac [48]; + undefined1 auStack_17c [48]; + undefined1 *local_14c; + short local_148 [2]; + undefined1 *local_144; + undefined4 local_140; + undefined *local_13c; + undefined4 local_134; + undefined4 local_130; + undefined1 auStack_12c [48]; + undefined1 auStack_fc [48]; + undefined1 auStack_cc [4]; + undefined4 local_c8; + undefined2 local_78; + undefined2 local_76; + + uVar7 = FUN_007ffb80(); + local_58c = 0xfffffffe; + uStack_588 = 0xfffffffe; + local_654 = uVar7; + (**(code **)(DAT_00fe1dd8 + 0x1c))(&DAT_00fe1dd8,local_148,1); + puVar19 = DAT_0064b330; + bVar2 = (byte)local_148[0]; + if (DAT_00fe1ec4 != 1) { + if (DAT_00fe1ec4 == 2) { + if ((byte)local_148[0] < 0x40) { + if ((byte)local_148[0] == 0x3f) { + FUN_0068573c(); + } + else if ((byte)local_148[0] < 0x20) { + if ((byte)local_148[0] == 0x1f) { + local_13c = (undefined *)FUN_00644250(&DAT_00fe1dd8); + local_658 = (undefined1 *)(&DAT_0107034c)[(int)local_13c]; + uVar14 = FUN_00644314(&DAT_00fe1dd8); + uVar15 = FUN_00644314(&DAT_00fe1dd8); + iVar8 = FUN_006056e0(uVar14,uVar15); + if (iVar8 != -1) { + iVar16 = FUN_00605a10(); + local_14c = (undefined1 *)FUN_00605844(uVar14,uVar15); + if (iVar16 == 0) { + if (((local_14c == (undefined1 *)0x0) && (iVar8 != -2)) && (iVar8 != -3)) { + iVar16 = 0; + local_144 = &DAT_00fe1e78; + do { + EnterCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 1; + FUN_00646500(0x20,iVar8,iVar16); + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 0; + FUN_006448b4(uVar7); + iVar16 = iVar16 + 1; + } while (iVar16 < 0x28); + } + if (local_14c == (undefined1 *)0x0) { + local_144 = &DAT_00fe1e78; + EnterCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 1; + FUN_00646500(0x21,local_13c,iVar8); + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 0; + FUN_006448b4(uVar7); + *(short *)(local_658 + 0x8de2) = (short)iVar8; + } + } + } + } + else { + switch((byte)local_148[0]) { + case 1: + iVar8 = FUN_00644250(&DAT_00fe1dd8); + if (*(short *)(uVar7 + 0x10) == 0) { + if (iVar8 != 6) { + uVar14 = FUN_00644250(&DAT_00fe1dd8); + FUN_00649fe8(uVar14,0x16); + break; + } + *(undefined2 *)(uVar7 + 0x10) = 1; + } + uVar14 = FUN_00644250(&DAT_00fe1dd8); + FUN_006485c4(uVar7,uVar14); + break; + default: + goto switchD_0064c074_caseD_2; + case 6: + if (*(short *)(uVar7 + 0x10) == 1) { + *(undefined2 *)(uVar7 + 0x10) = 2; + } + FUN_00647dc0(uVar7); + iVar8 = 0; + if (0 < DAT_00fe1fac) { + iVar18 = 0; + iVar16 = DAT_00fe1fac; + do { + if (*(char *)(DAT_00fe1fa8 + iVar18 + 0x100) != '\0') { + FUN_006483ac(iVar8,uVar7); + iVar16 = DAT_00fe1fac; + } + iVar8 = iVar8 + 1; + iVar18 = iVar18 + 0x274; + } while (iVar8 < iVar16); + } + break; + case 8: + local_14c = (undefined1 *)FUN_00644250(&DAT_00fe1dd8); + iVar8 = FUN_006442ec(&DAT_00fe1dd8); + iVar16 = FUN_006442ec(&DAT_00fe1dd8); + if ((iVar8 < 0) || (iVar16 < 0)) { + bVar3 = false; + } + else { + bVar3 = true; + } + if ((bVar3) && + (((iVar8 < 10 || (DAT_00902ea0 + -10 < iVar8)) || + ((iVar16 < 10 || (DAT_00902ea4 + -10 < iVar16)))))) { + bVar3 = false; + } + uVar14 = 0x24; + if (bVar3) { + uVar14 = 0x48; + } + if (*(short *)(uVar7 + 0x10) == 2) { + *(undefined2 *)(uVar7 + 0x10) = 3; + } + FUN_006484b8(uVar7,uVar14); + iVar18 = (int)((ulonglong)((longlong)(int)DAT_010338cc * (longlong)DAT_0064c768) >> + 0x20); + iVar22 = (int)((ulonglong)((longlong)(int)DAT_010338c8 * (longlong)DAT_0064c764) >> + 0x20) + (int)DAT_010338c8; + FUN_0064a14c(uVar7,(iVar18 >> 3) - (iVar18 >> 0x1f),(iVar22 >> 3) - (iVar22 >> 0x1f),6 + ); + if (bVar3) { + iVar8 = (int)((ulonglong)((longlong)iVar8 * (longlong)DAT_0064c768) >> 0x20); + iVar16 = (int)((ulonglong)((longlong)iVar16 * (longlong)DAT_0064c764) >> 0x20) + + iVar16; + FUN_0064a14c(uVar7,(iVar8 >> 3) - (iVar8 >> 0x1f),(iVar16 >> 3) - (iVar16 >> 0x1f),6 + ); + } + puVar27 = &DAT_010731a0; + local_658 = (undefined1 *)0x0; + do { + if (puVar27[8] != '\0') { + iVar8 = FUN_0058ef48(); + uVar4 = *(undefined1 *)(iVar8 + 0x20); + local_144 = &DAT_00fe1e78; + EnterCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 1; + FUN_00646500(0x15,uVar4,local_658); + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 0; + FUN_006448b4(uVar7); + local_13c = &DAT_00fe1e78; + EnterCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 1; + FUN_00645808(0x16,local_658); + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 0; + FUN_006448b4(uVar7); + } + local_658 = local_658 + 1; + puVar27 = puVar27 + 0xa0; + } while ((int)local_658 < 200); + local_65c = 0; + iVar8 = 0; + do { + iVar16 = iVar8 + DAT_00fe1fa8; + if (*(char *)(iVar16 + 0x100) != '\0') { + if (*(char *)(iVar16 + 0x118) != '\0') { + iVar18 = (int)((ulonglong) + ((longlong)*(int *)(iVar16 + 0x148) * (longlong)DAT_0064c768) >> + 0x20); + iVar16 = *(int *)(iVar16 + 0x14c) + + (int)((ulonglong) + ((longlong)*(int *)(iVar16 + 0x14c) * (longlong)DAT_0064c764) >> + 0x20); + FUN_0064a14c(uVar7,(iVar18 >> 7) - (iVar18 >> 0x1f), + (iVar16 >> 7) - (iVar16 >> 0x1f),6); + } + local_144 = &DAT_00fe1e78; + EnterCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 1; + FUN_00645808(0x17,local_65c); + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 0; + FUN_006448b4(uVar7); + } + local_65c = local_65c + 1; + iVar8 = iVar8 + 0x274; + } while (iVar8 < DAT_0064c760); + puVar21 = &DAT_0107af40; + iVar8 = 0; + do { + if ((*(char *)(puVar21 + 2) != '\0') && + ((*(char *)(puVar21 + 8) != '\0' || + (iVar16 = FUN_006444b0(*puVar21), iVar16 != 0)))) { + FUN_006473d8(iVar8,2); + } + iVar8 = iVar8 + 1; + puVar21 = puVar21 + 0x74; + } while (iVar8 < 0x200); + local_144 = &DAT_00fe1e78; + EnterCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 1; + FUN_00645808(0x39,0x11); + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 0; + FUN_006448b4(uVar7); + local_144 = &DAT_00fe1e78; + EnterCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 1; + FUN_00645808(0x39,0x12); + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 0; + FUN_006448b4(uVar7); + local_144 = &DAT_00fe1e78; + EnterCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 1; + FUN_00645808(0x39,0x13); + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 0; + FUN_006448b4(uVar7); + local_144 = &DAT_00fe1e78; + EnterCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 1; + FUN_00645808(0x39,0x14); + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 0; + FUN_006448b4(uVar7); + local_144 = &DAT_00fe1e78; + EnterCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 1; + FUN_00645808(0x39,0x16); + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 0; + FUN_006448b4(uVar7); + local_144 = &DAT_00fe1e78; + EnterCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 1; + FUN_00645808(0x39,0x26); + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 0; + FUN_006448b4(uVar7); + local_144 = &DAT_00fe1e78; + EnterCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 1; + FUN_00645808(0x39,0x36); + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 0; + FUN_006448b4(uVar7); + local_144 = &DAT_00fe1e78; + EnterCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 1; + FUN_00645808(0x39,0x6b); + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 0; + FUN_006448b4(uVar7); + local_144 = &DAT_00fe1e78; + EnterCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 1; + FUN_00645808(0x39,0x6c); + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 0; + FUN_006448b4(uVar7); + local_144 = &DAT_00fe1e78; + EnterCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 1; + FUN_00645808(0x39,0x7c); + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 0; + FUN_006448b4(uVar7); + local_144 = &DAT_00fe1e78; + EnterCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 1; + FUN_00645808(0x39,0xa0); + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 0; + FUN_006448b4(uVar7); + local_144 = &DAT_00fe1e78; + EnterCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 1; + FUN_00645808(0x39,0xb2); + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 0; + FUN_006448b4(uVar7); + local_144 = &DAT_00fe1e78; + EnterCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 1; + FUN_00645808(0x39,0xcf); + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 0; + FUN_006448b4(uVar7); + local_144 = &DAT_00fe1e78; + EnterCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 1; + FUN_00645808(0x39,0xd1); + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 0; + FUN_006448b4(uVar7); + local_144 = &DAT_00fe1e78; + EnterCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 1; + FUN_00645808(0x39,0xd0); + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 0; + FUN_006448b4(uVar7); + local_144 = &DAT_00fe1e78; + EnterCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 1; + FUN_00645808(0x39,0xe3); + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 0; + FUN_006448b4(uVar7); + local_144 = &DAT_00fe1e78; + EnterCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 1; + FUN_00645808(0x39,0xe4); + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 0; + FUN_006448b4(uVar7); + local_144 = &DAT_00fe1e78; + EnterCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 1; + FUN_00645808(0x39,0xe5); + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 0; + FUN_006448b4(uVar7); + local_144 = &DAT_00fe1e78; + EnterCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 1; + FUN_006452c4(0x3a); + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 0; + FUN_006448b4(uVar7); + FUN_00648244(local_14c,uVar7); + break; + case 0xb: + FUN_00647d24(uVar7); + } + } + } + else if ((byte)local_148[0] < 0x37) { + if ((byte)local_148[0] == 0x36) { + iVar8 = FUN_00644250(&DAT_00fe1dd8); + uVar14 = FUN_00644250(&DAT_00fe1dd8); + uVar15 = FUN_006448f8(); + FUN_00659cd4(iVar8 * 0x274 + DAT_00fe1fa8,uVar14,uVar15,1); + FUN_006481dc(iVar8); + } + else if ((byte)local_148[0] == 0x22) { + iVar8 = FUN_00644314(&DAT_00fe1dd8); + iVar16 = FUN_00644314(&DAT_00fe1dd8); + if ((*(short *)((iVar8 * DAT_00902934 + iVar16) * 0xe + DAT_00902928 + 6) == 0x15) && + (iVar18 = FUN_00761b80(iVar8,iVar16), iVar18 != 0)) { + FUN_00647acc(0,iVar8,iVar16,0,0); + } + } + else { + if ((byte)local_148[0] != 0x2f) goto switchD_0064c074_caseD_2; + uVar14 = FUN_00644250(&DAT_00fe1dd8); + uVar15 = FUN_00644314(&DAT_00fe1dd8); + uVar17 = FUN_00644314(&DAT_00fe1dd8); + iVar8 = FUN_007261f8(uVar15,uVar17); + if (-1 < iVar8) { + local_144 = &DAT_00fe1e78; + EnterCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 1; + FUN_00646500(0x30,uVar14,iVar8); + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e78); + DAT_00fe1e90 = 0; + FUN_006448b4(uVar7); + } + } + } + else { + if ((byte)local_148[0] != 0x3e) goto switchD_0064c074_caseD_2; + iVar8 = FUN_00644250(&DAT_00fe1dd8); + iVar16 = FUN_006442ec(&DAT_00fe1dd8); + if (iVar16 == 0x71) { + local_144 = *(undefined1 **)((&DAT_0107034c)[iVar8] + 0x110); + local_140 = *(undefined4 *)((&DAT_0107034c)[iVar8] + 0x114); + FUN_006b77dc(&local_144); + } + else if (iVar16 < 0) { + if (iVar16 == -4) { + if (DAT_010703e0 == '\0') { + FUN_007350a0(); + FUN_00647dc0(0); + FUN_00646f20(0x31,0x32,0xff,0x82,0xffffffff); + goto LAB_0064cc82; + } + } + else if (DAT_010339a0 == 0) { + uVar14 = 0; + DAT_010339ac = 0; + if (iVar16 == -1) { + uVar14 = 1; + } + else if (iVar16 == -2) { + uVar14 = 2; + } + else if (iVar16 == -3) { + uVar14 = 3; + } + FUN_007a8f74(uVar14); + } + } + else { + bVar3 = true; + iVar22 = 0; + iVar18 = DAT_00fe1fa8; + do { + if ((*(int *)(iVar18 + 0x104) == iVar16) && (*(char *)(iVar18 + 0x100) != '\0')) { + bVar3 = false; + break; + } + iVar22 = iVar22 + 1; + iVar18 = iVar18 + 0x274; + } while (iVar22 < 0xc4); + if (bVar3) { + FUN_00685904((&DAT_0107034c)[iVar8],iVar16); + } + } + } + } + else { + switch((byte)local_148[0]) { + case 0x43: + FUN_00643a94(uVar7); + break; + case 0x44: + FUN_00643a7c(uVar7); + break; + default: + goto switchD_0064c074_caseD_2; + case 0x4c: + iVar8 = FUN_0064f3e8(); + iVar16 = *(int *)(uVar7 + 0xc); + if (iVar8 != -1) { + local_14c = (undefined1 *)(&DAT_0107034c)[iVar8]; + local_14c[0x5cc9] = (char)iVar8; + *(undefined4 *)(local_14c + 0x30) = *(undefined4 *)(**(int **)(iVar16 + 0xc) + 0x30); + FUN_0064525c(iVar16 + 0xc,*(undefined4 *)(iVar16 + 0x14),&local_14c); + } + FUN_006486b8(iVar16,iVar8); + break; + case 0x4d: + uVar14 = FUN_00644250(&DAT_00fe1dd8); + FUN_006442ec(&DAT_00fe1dd8); + FUN_006442ec(&DAT_00fe1dd8); + FUN_00648244(uVar14,uVar7); + break; + case 0x4e: + puVar27 = *(undefined **)(uVar7 + 0xc); + local_13c = puVar27; + local_14c = (undefined1 *)FUN_00644250(&DAT_00fe1dd8); + iVar8 = 0; + if (0 < *(int *)(puVar27 + 0x14)) { + do { + iVar16 = *(int *)(*(int *)(puVar27 + 0xc) + iVar8 * 4); + if ((undefined1 *)(uint)*(byte *)(iVar16 + 0x5cc9) == local_14c) { + FUN_006507f0(iVar16); + *(undefined1 *)(iVar16 + 0x5cc9) = 0xff; + *(undefined4 *)(iVar16 + 0x30) = 0; + *(undefined1 *)((&DAT_0107034c)[(int)local_14c] + 0x5cc5) = 0; + iVar16 = *(int *)(local_13c + 0x14) + -1; + *(int *)(local_13c + 0x14) = iVar16; + if (iVar8 < iVar16) { + _Dst = (void *)(*(int *)(local_13c + 0xc) + iVar8 * 4); + memmove(_Dst,(void *)((int)_Dst + 4),(iVar16 - iVar8) * 4); + } + break; + } + iVar8 = iVar8 + 1; + } while (iVar8 < *(int *)(puVar27 + 0x14)); + } + break; + case 0x4f: + iVar8 = FUN_00644314(&DAT_00fe1dd8); + iVar16 = FUN_00644314(&DAT_00fe1dd8); + uVar14 = FUN_00644228(&DAT_00fe1dd8); + if ((*(short *)((iVar8 * DAT_00902934 + iVar16) * 0xe + DAT_00902928 + 6) == 10) && + (iVar18 = FUN_00776dc8(iVar8,iVar16,uVar14), iVar18 != 0)) { + FUN_00648da4(iVar8,iVar16,uVar14); + } + break; + case 0x50: + iVar8 = FUN_00644314(&DAT_00fe1dd8); + iVar16 = FUN_00644314(&DAT_00fe1dd8); + if ((*(short *)((iVar8 * DAT_00902934 + iVar16) * 0xe + DAT_00902928 + 6) == 0xb) && + (iVar18 = FUN_0075784c(iVar8,iVar16), iVar18 != 0)) { + FUN_00772624(iVar8,iVar16,0); + FUN_006494f4(iVar8,iVar16); + } + break; + case 0x57: + uVar14 = FUN_00644250(&DAT_00fe1dd8); + uVar15 = FUN_00644250(&DAT_00fe1dd8); + local_144 = (undefined1 *)VectorSignedToFloat(uVar14,(byte)(in_fpscr >> 0x16) & 3); + local_140 = VectorSignedToFloat(uVar15,(byte)(in_fpscr >> 0x16) & 3); + FUN_00697cec(local_144,local_140); + } + } + goto switchD_0064b212_caseD_1; + } + goto switchD_0064c074_caseD_2; + } + iVar8 = FUN_0058ef48(); + if (0 < DAT_00fe1eac) { + DAT_00fe1eb0 = DAT_00fe1eb0 + 1; + } + switch(bVar2) { + case 0: + puVar11 = (undefined1 *)*DAT_00902020; + local_658 = puVar11; + iVar8 = FUN_00644250(&DAT_00fe1dd8); + if (iVar8 == 0xff) { + DAT_010339bc = 0; + FUN_0074134c(puVar11); + } + else { + FUN_0073ae14(puVar11,iVar8); + **(undefined4 **)(*(int *)(puVar11 + 0x10) + 0xc) = (&DAT_0107034c)[iVar8]; + FUN_00647f6c(); + DAT_00902028 = DAT_00902028 + -1; + if (0 < DAT_00902028) { + memmove(DAT_00902020,DAT_00902020 + 1,DAT_00902028 * 4); + } + FUN_006451f4(&DAT_0090202c,DAT_00902034,&local_658); + } + break; + case 2: + DAT_00fe1ebd = 1; + iVar16 = FUN_00644314(&DAT_00fe1dd8); + FUN_007aa80c(iVar8 + 0x2b10,auStack_32c,&DAT_00fd6948 + iVar16 * 0x30); + FUN_007aa754(auStack_32c); + break; + case 3: + if (DAT_00fe1eb4 == 3) { + DAT_00fe1eb4 = 4; + } + uVar14 = FUN_00644250(&DAT_00fe1dd8); + FUN_00648550(uVar14,0,0); + FUN_00649f70(uVar14,0,0); + FUN_00649bb0(uVar14,0); + FUN_00649ca0(uVar14,0); + iVar8 = 0; + do { + FUN_00649560(uVar14,iVar8); + iVar8 = iVar8 + 1; + } while (iVar8 < 0x31); + iVar8 = 0; + do { + FUN_00649560(uVar14,iVar8 + 0x31); + iVar8 = iVar8 + 1; + } while (iVar8 < 0xb); + FUN_00647ec0(); + break; + case 7: + DAT_010703dc = FUN_0064433c(&DAT_00fe1dd8); + uVar7 = FUN_00644250(&DAT_00fe1dd8); + DAT_010703e0 = (uVar7 & 1) != 0; + DAT_010703e1 = (uVar7 & 2) != 0; + DAT_010703e2 = (uVar7 & 4) != 0; + DAT_010703e3 = (uVar7 & 8) != 0; + DAT_010703e4 = (undefined1)((int)uVar7 >> 5); + DAT_00902ea0 = FUN_006442ec(&DAT_00fe1dd8); + DAT_00902ea4 = FUN_006442ec(&DAT_00fe1dd8); + DAT_010338cc = FUN_006442ec(&DAT_00fe1dd8); + DAT_010338c8 = FUN_006442ec(&DAT_00fe1dd8); + DAT_00902ebc = FUN_006442ec(&DAT_00fe1dd8); + DAT_01050304 = DAT_00902ebc << 4; + DAT_01033960 = FUN_006442ec(&DAT_00fe1dd8); + DAT_0103395c = DAT_01033960 << 4; + iVar8 = FUN_00644278(&DAT_00fe1dd8); + if (iVar8 != DAT_01033974) { + DAT_01033967 = 1; + DAT_01033974 = iVar8; + } + iVar8 = FUN_00644278(&DAT_00fe1dd8); + if (iVar8 != DAT_01033970) { + DAT_01033967 = 1; + DAT_01033970 = iVar8; + } + FUN_006449f8(&DAT_0102a710,&DAT_00fe1dd8); + FUN_00644978(&DAT_0102a704,&DAT_00fe1dd8); + uVar7 = FUN_00644250(&DAT_00fe1dd8); + DAT_0102a700 = uVar7 & 3; + DAT_0102a6f8 = (int)uVar7 >> 2 & 3; + DAT_0102a6fc = (int)uVar7 >> 4; + DAT_0102a71c = FUN_00644250(&DAT_00fe1dd8); + DAT_0102a720 = FUN_00644250(&DAT_00fe1dd8); + DAT_0102a724 = FUN_00644250(&DAT_00fe1dd8); + DAT_0102a728 = FUN_00644250(&DAT_00fe1dd8); + DAT_0102a72c = FUN_00644250(&DAT_00fe1dd8); + DAT_0102a730 = FUN_00644250(&DAT_00fe1dd8); + DAT_0102a734 = FUN_00644250(&DAT_00fe1dd8); + DAT_0102a738 = FUN_00644250(&DAT_00fe1dd8); + FUN_005ff46c(0,DAT_0102a71c); + FUN_005ff46c(1,DAT_0102a720); + FUN_005ff46c(2,DAT_0102a724); + FUN_005ff46c(3,DAT_0102a728); + FUN_005ff46c(4,DAT_0102a72c); + FUN_005ff46c(5,DAT_0102a730); + FUN_005ff46c(6,DAT_0102a734); + FUN_005ff46c(7,DAT_0102a738); + DAT_00901160 = FUN_00644250(&DAT_00fe1dd8); + DAT_01029998 = FUN_0064433c(&DAT_00fe1dd8); + DAT_010299a8 = (float)FUN_0064433c(&DAT_00fe1dd8); + uVar7 = in_fpscr & 0xfffffff | (uint)(DAT_010299a8 < 0.0) << 0x1f | + (uint)(DAT_010299a8 == 0.0) << 0x1e; + in_fpscr = uVar7 | (uint)NAN(DAT_010299a8) << 0x1c; + bVar2 = (byte)(uVar7 >> 0x18); + DAT_010299a0 = !(bool)(bVar2 >> 6 & 1) && bVar2 >> 7 == ((byte)(in_fpscr >> 0x1c) & 1); + uVar7 = FUN_00644314(&DAT_00fe1dd8); + DAT_0102a76f = (byte)uVar7 & 1; + DAT_00fe1f73 = (byte)((int)uVar7 >> 1) & 1; + DAT_00fe1f7a = (byte)((int)uVar7 >> 2) & 1; + DAT_00fe1f7b = (byte)((int)uVar7 >> 3) & 1; + DAT_010338d3 = (byte)((int)uVar7 >> 4) & 1; + DAT_00fe1f85 = (byte)((int)uVar7 >> 5) & 1; + DAT_00fe1f8d = (byte)((int)uVar7 >> 6) & 1; + DAT_00fe1f88 = (byte)((int)uVar7 >> 7) & 1; + DAT_00fe1f89 = (byte)(uVar7 >> 8) & 1; + DAT_00fe1f8a = (byte)((int)uVar7 >> 9) & 1; + DAT_00fe1f8b = (uVar7 & 0x380) != 0; + DAT_0102a787 = (byte)((int)uVar7 >> 10) & 1; + DAT_010299b4 = VectorSignedToFloat((uint)((uVar7 & 0x800) != 0),(byte)(in_fpscr >> 0x16) & 3); + FUN_00734180(&DAT_010703d8,(int)uVar7 >> 0xc); + uVar14 = FUN_0064a1d4(&DAT_00fe1dd8,auStack_2cc); + FUN_007aa80c(&DAT_01070308,auStack_23c,uVar14); + FUN_007aa754(auStack_23c); + FUN_007aa754(auStack_2cc); + FUN_0074a4ac(); + FUN_0074a79c(); + uVar7 = local_654; + if (DAT_00fe1eb4 < 6) { + DAT_00fe1eb4 = 6; + FUN_0041c4d8(auStack_57c,"TXT_REQUESTING_TILE_DATA"); + uVar14 = FUN_005f82b0(auStack_3bc,auStack_57c); + uVar15 = FUN_0058ef48(); + FUN_00736950(uVar15,uVar14); + FUN_007aa754(auStack_3bc); + FUN_0041b8a0(auStack_57c); + uVar7 = local_654; + } + break; + case 9: + iVar8 = FUN_00644250(&DAT_00fe1dd8); + DAT_00fe1eac = DAT_00fe1eac + iVar8; + break; + case 10: + iVar8 = FUN_00644250(&DAT_00fe1dd8); + puVar27 = (undefined *)(iVar8 * 0x14); + local_13c = puVar27; + iVar16 = FUN_00644250(&DAT_00fe1dd8); + local_14c = (undefined1 *)(iVar16 * 0xf); + iVar16 = 0; + puVar10 = (undefined4 *)0x0; + if ((int)puVar27 < (int)(puVar27 + 0x14)) { + puVar23 = (undefined4 *)((int)(local_14c + iVar8 * 20000) * 0xe + DAT_00902928); + local_658 = puVar27 + 0x14 + iVar8 * -0x14; + do { + iVar8 = 0xe; + puVar28 = puVar23; + do { + if (iVar16 == 0) { + FUN_00730d74(puVar28,&DAT_00fe1dd8); + iVar16 = FUN_006448f8(); + puVar10 = puVar28; + } + else { + iVar16 = iVar16 + -1; + *puVar28 = *puVar10; + puVar28[1] = puVar10[1]; + puVar28[2] = puVar10[2]; + *(undefined2 *)(puVar28 + 3) = *(undefined2 *)(puVar10 + 3); + } + iVar8 = iVar8 + -1; + puVar28 = (undefined4 *)((int)puVar28 + 0xe); + } while (-1 < iVar8); + puVar23 = puVar23 + 0xdac; + local_658 = local_658 + -1; + } while (local_658 != (undefined *)0x0); + local_658 = (undefined1 *)0x0; + puVar27 = local_13c; + } + FUN_00772914(puVar27,local_14c); + break; + case 0xe: + uVar9 = FUN_00644250(&DAT_00fe1dd8); + uVar32 = uVar9 & 0x80 ^ uVar9; + iVar8 = (&DAT_0107034c)[uVar32]; + if ((uVar9 & 0x80) == 0) { + *(undefined1 *)(iVar8 + 0x5cc5) = 0; + } + else { + if (*(char *)(iVar8 + 0x5cc5) == '\0') { + FUN_006d62b4(iVar8); + *(undefined1 *)(iVar8 + 0x5cc5) = 1; + } + FUN_0064f4e0(uVar32); + } + break; + case 0x12: + case 0x19: + case 0x25: + case 0x26: + case 0x27: + case 0x40: + uVar14 = FUN_00644250(&DAT_00fe1dd8); + local_13c = (undefined *)FUN_00644250(&DAT_00fe1dd8); + local_14c = (undefined1 *)FUN_00644250(&DAT_00fe1dd8); + iVar8 = 0; + local_140 = 0; + FUN_007aa9a8(auStack_12c); + if (bVar2 == 0x12) { + iVar8 = FUN_00644314(&DAT_00fe1dd8); + local_140 = 0; + FUN_007aa80c(auStack_12c,auStack_26c,&DAT_00fd6948 + iVar8 * 0x30); + puVar11 = auStack_26c; +LAB_0064be72: + FUN_007aa754(puVar11); + } + else { + if (bVar2 == 0x27) { + iVar8 = FUN_00644250(&DAT_00fe1dd8); + local_140 = 0; + uVar15 = FUN_006442ec(&DAT_00fe1dd8); + uVar17 = FUN_007aa6e0(&DAT_00fd6948 + iVar8 * 0x30); + uVar15 = FUN_007ab778(auStack_17c,uVar17,uVar15); + FUN_007aa80c(auStack_12c,auStack_1dc,uVar15); + FUN_007aa754(auStack_1dc); + puVar11 = auStack_17c; + goto LAB_0064be72; + } + if (bVar2 == 0x40) { + uVar36 = FUN_0064429c(&DAT_00fe1dd8); + FUN_0064a1d4(&DAT_00fe1dd8,auStack_fc); + uVar37 = FUN_00595220(auStack_20c,auStack_fc); + uVar15 = FUN_00637788(auStack_38c,(int)((ulonglong)uVar37 >> 0x20),(int)uVar36, + (int)((ulonglong)uVar36 >> 0x20),(int)uVar37); + FUN_007aa80c(auStack_12c,auStack_1ac,uVar15); + FUN_007aa754(auStack_1ac); + FUN_007aa754(auStack_38c); +LAB_0064be6e: + puVar11 = auStack_fc; + goto LAB_0064be72; + } + if (bVar2 != 0x19) { + iVar8 = FUN_00644250(&DAT_00fe1dd8); + local_140 = 0; + } + uVar15 = FUN_0064a1d4(&DAT_00fe1dd8,auStack_2fc); + FUN_007aa80c(auStack_12c,auStack_35c,uVar15); + FUN_007aa754(auStack_35c); + FUN_007aa754(auStack_2fc); + if ((bVar2 == 0x25) || (bVar2 == 0x26)) { + FUN_00595220(auStack_fc,auStack_12c); + FUN_007aa80c(auStack_12c,auStack_29c,&DAT_00fd6948 + iVar8 * 0x30); + FUN_007aa754(auStack_29c); + local_658 = auStack_50c; + uVar15 = FUN_007aa7e4(auStack_fc,auStack_50c); + local_144 = auStack_44c; + uVar17 = FUN_00426e64(auStack_44c,L"#PlayerName#"); + uVar12 = FUN_007aa5e0(auStack_12c); + local_600 = 7; + local_604 = 0; + local_614[0] = 0; + FUN_00425168(local_614,uVar12,0,0xffffffff); + piVar13 = (int *)FUN_00426810(auStack_524,local_614,uVar17,uVar15); + if (7 < (uint)piVar13[5]) { + piVar13 = (int *)*piVar13; + } + FUN_007aaab8(auStack_12c,auStack_4c4,piVar13); + FUN_007aa754(auStack_4c4); + FUN_00423f74(auStack_524); + local_144 = auStack_494; + uVar15 = FUN_007aa7e4(auStack_fc,auStack_494); + local_658 = auStack_404; + uVar17 = FUN_00426e64(auStack_404,L"#BossName#"); + uVar12 = FUN_007aa5e0(auStack_12c); + local_5e8 = 7; + local_5ec = 0; + local_5fc[0] = 0; + FUN_00425168(local_5fc,uVar12,0,0xffffffff); + piVar13 = (int *)FUN_00426810(auStack_55c,local_5fc,uVar17,uVar15); + if (7 < (uint)piVar13[5]) { + piVar13 = (int *)*piVar13; + } + FUN_007aaab8(auStack_12c,auStack_47c,piVar13); + FUN_007aa754(auStack_47c); + FUN_00423f74(auStack_55c); + local_144 = auStack_5b4; + uVar15 = FUN_007aa7e4(auStack_fc,auStack_5b4); + local_658 = auStack_5cc; + uVar17 = FUN_00426e64(auStack_5cc,&DAT_0086f630); + uVar12 = FUN_007aa5e0(auStack_12c); + local_618 = 7; + local_61c = 0; + local_62c[0] = 0; + FUN_00425168(local_62c,uVar12,0,0xffffffff); + piVar13 = (int *)FUN_00426810(auStack_5e4,local_62c,uVar17,uVar15); + if (7 < (uint)piVar13[5]) { + piVar13 = (int *)*piVar13; + } + FUN_007aaab8(auStack_12c,auStack_434,piVar13); + FUN_007aa754(auStack_434); + FUN_00423f74(auStack_5e4); + goto LAB_0064be6e; + } + } + FUN_006050e4(auStack_12c,uVar14,local_13c,local_14c,600); + FUN_007aa754(auStack_12c); + break; + case 0x17: + puVar11 = (undefined1 *)FUN_00644250(&DAT_00fe1dd8); + iVar16 = (int)puVar11 * 0x274 + DAT_00fe1fa8; + local_14c = puVar11; + iVar8 = FUN_006448f8(); + *(int *)(iVar16 + 0x1b4) = iVar8; + if ((iVar8 != 0) && (*(char *)(iVar16 + 0x100) != '\0')) { + iVar8 = FUN_006442ec(&DAT_00fe1dd8); + puVar10 = (undefined4 *)FUN_006451b4(&DAT_00fe1dd8,auStack_644); + *(undefined4 *)(iVar16 + 0x138) = *puVar10; + *(undefined4 *)(iVar16 + 0x13c) = puVar10[1]; + *(int *)(iVar16 + 0x148) = (int)*(float *)(iVar16 + 0x138); + *(int *)(iVar16 + 0x14c) = (int)*(float *)(iVar16 + 0x13c); + if (*(short *)(iVar16 + 0x1f0) != iVar8) { + uVar14 = *(undefined4 *)(iVar16 + 0x104); + FUN_00684770(iVar16,iVar8); + FUN_0065b0d4(iVar16,uVar14,*(undefined4 *)(iVar16 + 0x104)); + puVar11 = local_14c; + } + if (iVar8 == 0x106) { + puVar26 = &DAT_0090252c; +LAB_0064baa2: + *puVar26 = (uint)puVar11; + } + else if (iVar8 == 0xf5) { + puVar26 = &DAT_00902528; + goto LAB_0064baa2; + } + puVar10 = (undefined4 *)FUN_006451b4(&DAT_00fe1dd8,auStack_634); + *(undefined4 *)(iVar16 + 0x140) = *puVar10; + *(undefined4 *)(iVar16 + 0x144) = puVar10[1]; + bVar2 = FUN_00644250(&DAT_00fe1dd8); + *(byte *)(iVar16 + 0x175) = bVar2 & 0xf; + if ((bVar2 & 0x10) == 0) { + uVar4 = 0xff; + } + else { + uVar4 = 1; + } + uVar25 = 0xff; + *(undefined1 *)(iVar16 + 0x171) = uVar4; + if ((bVar2 & 0x20) == 0) { + uVar4 = 0xff; + } + else { + uVar4 = 1; + } + *(undefined1 *)(iVar16 + 0x172) = uVar4; + if ((bVar2 & 0x40) != 0) { + uVar25 = 1; + } + *(undefined1 *)(iVar16 + 0x1e1) = uVar25; + uVar9 = FUN_00644250(&DAT_00fe1dd8); + puVar11 = puVar19; + if ((uVar9 & 1) != 0) { + puVar11 = (undefined1 *)FUN_0064433c(&DAT_00fe1dd8); + } + *(undefined1 **)(iVar16 + 0x178) = puVar11; + puVar11 = puVar19; + if ((uVar9 & 2) != 0) { + puVar11 = (undefined1 *)FUN_0064433c(&DAT_00fe1dd8); + } + *(undefined1 **)(iVar16 + 0x17c) = puVar11; + puVar11 = puVar19; + if ((uVar9 & 4) != 0) { + puVar11 = (undefined1 *)FUN_0064433c(&DAT_00fe1dd8); + } + *(undefined1 **)(iVar16 + 0x180) = puVar11; + puVar11 = puVar19; + if ((uVar9 & 8) != 0) { + puVar11 = (undefined1 *)FUN_0064433c(&DAT_00fe1dd8); + } + *(undefined1 **)(iVar16 + 0x184) = puVar11; + } + break; + case 0x32: + uVar9 = FUN_00644250(&DAT_00fe1dd8); + local_14c = (undefined1 *)FUN_0058ef48(); + if ((*(int *)(local_14c + 0x10) != 0) && ((byte)local_14c[0x20] == uVar9)) { + FUN_006451f4(&DAT_00902038,DAT_00902040,&local_14c); + break; + } + if (6 < DAT_00fe1eb4) { + DAT_00fe1eb4 = 8; + } + goto LAB_0064cc82; + case 0x37: + uVar9 = FUN_00644314(&DAT_00fe1dd8); + iVar16 = 5; + iVar8 = (uVar9 >> 6) * 0x274 + DAT_00fe1fa8; + do { + if ((uVar9 & 1) == 0) { + *(undefined2 *)(iVar8 + 0x68) = 0; + *(undefined2 *)(iVar8 + 0x6a) = 0; + } + else { + uVar5 = FUN_00644250(&DAT_00fe1dd8); + *(undefined2 *)(iVar8 + 0x68) = uVar5; + uVar5 = FUN_006448f8(); + *(undefined2 *)(iVar8 + 0x6a) = uVar5; + } + uVar9 = uVar9 >> 1; + iVar8 = iVar8 + 6; + iVar16 = iVar16 + -1; + } while (iVar16 != 0); + break; + case 0x39: + iVar8 = FUN_00644250(&DAT_00fe1dd8); + uVar14 = FUN_0064a1d4(&DAT_00fe1dd8,auStack_4f4); + FUN_007aa80c(&DAT_00fe1fb0 + iVar8 * 0x30,auStack_3ec,uVar14); + FUN_007aa754(auStack_3ec); + FUN_007aa754(auStack_4f4); + break; + case 0x3a: + DAT_0102a70f = FUN_00644250(&DAT_00fe1dd8); + DAT_0102a70e = FUN_00644250(&DAT_00fe1dd8); + break; + case 0x41: + iVar8 = FUN_00644250(&DAT_00fe1dd8); + iVar8 = *(int *)((&DAT_0107034c)[iVar8] + 0x34); + uVar14 = FUN_00644250(&DAT_00fe1dd8); + if (iVar8 != 0) { + FUN_00738154(iVar8,uVar14); + } + break; + case 0x42: + iVar8 = FUN_00644250(&DAT_00fe1dd8); + iVar8 = *(int *)((&DAT_0107034c)[iVar8] + 0x34); + uVar14 = FUN_00644250(&DAT_00fe1dd8); + if (iVar8 != 0) { + iVar8 = FUN_0058ef48(); + FUN_00727e04(*(undefined4 *)(iVar8 + 0x3470),uVar14,1); + } + break; + case 0x4a: + iVar16 = FUN_00644250(&DAT_00fe1dd8); + iVar8 = DAT_00fe1fa8; + local_134 = 0; + local_130 = 0; + uVar14 = FUN_00644250(&DAT_00fe1dd8); + local_134 = FUN_00644278(&DAT_00fe1dd8); + local_130 = FUN_00644278(&DAT_00fe1dd8); + FUN_00654608(iVar16 * 0x274 + iVar8,&local_134,uVar14); + uVar7 = local_654; + break; + case 0x53: + DAT_010703dc = FUN_0064433c(&DAT_00fe1dd8); + uVar9 = FUN_00644250(&DAT_00fe1dd8); + DAT_010703e0 = (uVar9 & 1) != 0; + DAT_010703e2 = (uVar9 & 2) != 0; + DAT_010703e4 = (undefined1)((int)uVar9 >> 2); + break; + case 0x54: + FUN_007624d4(); + break; + case 0x55: + iVar8 = FUN_00644250(&DAT_00fe1dd8); + FUN_00644250(&DAT_00fe1dd8); + uVar14 = FUN_006442ec(&DAT_00fe1dd8); + FUN_00684770(iVar8 * 0x274 + DAT_00fe1fa8,uVar14); + puVar10 = (undefined4 *)FUN_006451b4(&DAT_00fe1dd8,auStack_63c); + iVar16 = iVar8 * 0x274 + DAT_00fe1fa8; + *(undefined4 *)(iVar16 + 0x138) = *puVar10; + *(undefined4 *)(iVar16 + 0x13c) = puVar10[1]; + iVar16 = iVar8 * 0x274 + DAT_00fe1fa8; + *(int *)(iVar16 + 0x148) = (int)*(float *)(iVar16 + 0x138); + iVar8 = iVar8 * 0x274 + DAT_00fe1fa8; + *(int *)(iVar8 + 0x14c) = (int)*(float *)(iVar8 + 0x13c); + goto LAB_0064cc82; + case 0x56: + iVar8 = FUN_00644250(&DAT_00fe1dd8); + *(undefined1 *)(iVar8 * 0x274 + DAT_00fe1fa8 + 0x100) = 0; + *(undefined4 *)(iVar8 * 0x274 + DAT_00fe1fa8 + 0x1b4) = 0; + goto LAB_0064cc82; + } +switchD_0064b212_caseD_1: +switchD_0064c074_caseD_2: +LAB_0064cc82: + uVar4 = 0xff; + switch((byte)local_148[0]) { + case 4: + if (DAT_00fe1ec4 == 2) { + FUN_00644d18(uVar7); + } + uVar7 = FUN_00644314(&DAT_00fe1dd8); + iVar8 = (&DAT_0107034c)[uVar7 & 3]; + *(byte *)(iVar8 + 0x8d78) = (byte)((int)uVar7 >> 4) & 0x3f; + *(char *)(iVar8 + 0x5c80) = (char)((int)uVar7 >> 0xb); + *(bool *)(iVar8 + 0xdb) = ((int)uVar7 >> 10 & 1U) != 0; + uVar4 = FUN_00644250(&DAT_00fe1dd8); + *(undefined1 *)(iVar8 + 0x8d5c) = uVar4; + uVar4 = FUN_00644250(&DAT_00fe1dd8); + *(undefined1 *)(iVar8 + 0x8d5d) = uVar4; + uVar4 = FUN_00644250(&DAT_00fe1dd8); + *(undefined1 *)(iVar8 + 0x8d5e) = uVar4; + uVar4 = FUN_00644250(&DAT_00fe1dd8); + *(undefined1 *)(iVar8 + 0x8d60) = uVar4; + uVar4 = FUN_00644250(&DAT_00fe1dd8); + *(undefined1 *)(iVar8 + 0x8d61) = uVar4; + uVar4 = FUN_00644250(&DAT_00fe1dd8); + *(undefined1 *)(iVar8 + 0x8d62) = uVar4; + uVar4 = FUN_00644250(&DAT_00fe1dd8); + *(undefined1 *)(iVar8 + 0x8d64) = uVar4; + uVar4 = FUN_00644250(&DAT_00fe1dd8); + *(undefined1 *)(iVar8 + 0x8d65) = uVar4; + uVar4 = FUN_00644250(&DAT_00fe1dd8); + *(undefined1 *)(iVar8 + 0x8d66) = uVar4; + uVar4 = FUN_00644250(&DAT_00fe1dd8); + *(undefined1 *)(iVar8 + 0x8d68) = uVar4; + uVar4 = FUN_00644250(&DAT_00fe1dd8); + *(undefined1 *)(iVar8 + 0x8d69) = uVar4; + uVar4 = FUN_00644250(&DAT_00fe1dd8); + *(undefined1 *)(iVar8 + 0x8d6a) = uVar4; + uVar4 = FUN_00644250(&DAT_00fe1dd8); + *(undefined1 *)(iVar8 + 0x8d6c) = uVar4; + uVar4 = FUN_00644250(&DAT_00fe1dd8); + *(undefined1 *)(iVar8 + 0x8d6d) = uVar4; + uVar4 = FUN_00644250(&DAT_00fe1dd8); + *(undefined1 *)(iVar8 + 0x8d6e) = uVar4; + uVar4 = FUN_00644250(&DAT_00fe1dd8); + *(undefined1 *)(iVar8 + 0x8d70) = uVar4; + uVar4 = FUN_00644250(&DAT_00fe1dd8); + *(undefined1 *)(iVar8 + 0x8d71) = uVar4; + uVar4 = FUN_00644250(&DAT_00fe1dd8); + *(undefined1 *)(iVar8 + 0x8d72) = uVar4; + uVar4 = FUN_00644250(&DAT_00fe1dd8); + *(undefined1 *)(iVar8 + 0x8d74) = uVar4; + uVar4 = FUN_00644250(&DAT_00fe1dd8); + *(undefined1 *)(iVar8 + 0x8d75) = uVar4; + uVar4 = FUN_00644250(&DAT_00fe1dd8); + *(undefined1 *)(iVar8 + 0x8d76) = uVar4; + FUN_007aa80c(iVar8 + 0x8e2c,auStack_4f4,iVar8 + 0x5c1c); + FUN_007aa754(auStack_4f4); + uVar14 = FUN_0064a1d4(&DAT_00fe1dd8,auStack_434); + FUN_007aa80c(iVar8 + 0x5c1c,auStack_3ec,uVar14); + FUN_007aa754(auStack_3ec); + FUN_007aa754(auStack_434); + FUN_007aa80c(iVar8 + 0x8e2c,auStack_47c,iVar8 + 0x5c1c); + FUN_007aa754(auStack_47c); + *(undefined4 *)(iVar8 + 0x5bd8) = 0; + break; + case 5: + if (DAT_00fe1ec4 == 2) { + FUN_00644d18(uVar7); + } + iVar8 = FUN_00644250(&DAT_00fe1dd8); + iVar18 = (&DAT_0107034c)[iVar8]; + iVar8 = FUN_00644250(&DAT_00fe1dd8); + iVar16 = FUN_006448f8(); + uVar15 = 0; + uVar14 = 0; + if (0 < iVar16) { + uVar14 = FUN_00644250(&DAT_00fe1dd8); + uVar15 = FUN_006442ec(&DAT_00fe1dd8); + } + if (iVar8 < 0x30) { + iVar8 = iVar18 + iVar8 * 0xa0 + 0x948; + } + else { + iVar8 = iVar8 + -0x30; + if (iVar8 < 0xb) { + iVar8 = iVar18 + iVar8 * 0xa0 + 0x268; + } + else { + iVar8 = iVar18 + iVar8 * 0xa0 + 0x2108; + } + } + if (iVar16 < 1) { + FUN_00612a6c(iVar8); + } + else { + FUN_006317fc(iVar8,uVar15,iVar16); + FUN_00613df4(iVar8,uVar14); + } + break; + case 0xc: + iVar8 = FUN_00644250(&DAT_00fe1dd8); + iVar16 = (&DAT_0107034c)[iVar8]; + if (DAT_00fe1ec4 == 1) { + iVar18 = FUN_006becfc(iVar16); + if (iVar18 == 0) { + FUN_006becfc(iVar16); + } + if (*(int *)(iVar16 + 0x34) != 0) { + FUN_00739ad8(*(int *)(iVar16 + 0x34),0); + } + } + else { + FUN_00644d18(uVar7); + } + uVar14 = FUN_006442ec(&DAT_00fe1dd8); + *(undefined4 *)(iVar16 + 0x5d98) = uVar14; + uVar14 = FUN_006442ec(&DAT_00fe1dd8); + *(undefined4 *)(iVar16 + 0x5d9c) = uVar14; + FUN_006d8a34(iVar16); + if ((DAT_00fe1ec4 == 2) && (2 < *(short *)(uVar7 + 0x10))) { + if (*(short *)(uVar7 + 0x10) == 3) { + *(undefined2 *)(uVar7 + 0x10) = 10; + FUN_0064a230(); + FUN_0064afe0(); + } + else { + FUN_0064ab90(iVar8); + } + } + break; + case 0xd: + uVar9 = FUN_00644250(&DAT_00fe1dd8); + iVar8 = (&DAT_0107034c)[uVar9 & 0x1f]; + if ((uVar9 & 0x40) != 0) { + uVar4 = 1; + } + *(undefined1 *)(iVar8 + 0x5cc8) = uVar4; + if ((uVar9 & 0x80) == 0) { + uVar32 = 0; + } + else { + uVar32 = FUN_00644250(&DAT_00fe1dd8); + } + *(bool *)(iVar8 + 0x5cb6) = (uVar32 & 1) != 0; + *(bool *)(iVar8 + 0x5cb8) = (uVar32 & 2) != 0; + *(bool *)(iVar8 + 0x5cb0) = (uVar32 & 4) != 0; + *(bool *)(iVar8 + 0x5cb2) = (uVar32 & 8) != 0; + *(bool *)(iVar8 + 0x5cb9) = (uVar32 & 0x10) != 0; + *(bool *)(iVar8 + 0x5cba) = (uVar32 & 0x20) != 0; + *(bool *)(iVar8 + 0x67) = (uVar32 & 0x40) != 0; + if ((uVar32 & 0x80) == 0) { + uVar4 = 1; + } + else { + uVar4 = 2; + } + *(undefined1 *)(iVar8 + 0x66) = uVar4; + if ((uVar9 & 0x20) != 0) { + uVar4 = FUN_00644228(&DAT_00fe1dd8); + *(undefined1 *)(iVar8 + 0x14c) = uVar4; + } + puVar10 = (undefined4 *)FUN_006451b4(&DAT_00fe1dd8,auStack_634); + *(undefined4 *)(iVar8 + 0x110) = *puVar10; + *(undefined4 *)(iVar8 + 0x114) = puVar10[1]; + *(int *)(iVar8 + 0x100) = (int)*(float *)(iVar8 + 0x110); + *(int *)(iVar8 + 0x104) = (int)*(float *)(iVar8 + 0x114); + puVar10 = (undefined4 *)FUN_006451b4(&DAT_00fe1dd8,auStack_644); + *(undefined4 *)(iVar8 + 0x120) = *puVar10; + *(undefined4 *)(iVar8 + 0x124) = puVar10[1]; + *(short *)(iVar8 + 0x8dec) = (short)(*(int *)(iVar8 + 0x104) >> 4); + if ((DAT_00fe1ec4 == 2) && (*(short *)(uVar7 + 0x10) == 10)) { + FUN_00644d18(uVar7); + } + break; + case 0xf: + iVar8 = FUN_00644314(&DAT_00fe1dd8); + iVar16 = FUN_00644314(&DAT_00fe1dd8); + FUN_00730d74((iVar8 * DAT_00902934 + iVar16) * 0xe + DAT_00902928,&DAT_00fe1dd8); + FUN_0076e528(iVar8,iVar16,0); + FUN_0074dfcc(iVar8,iVar16,0); + if (DAT_00fe1ec4 == 2) { + FUN_00646500(0xf,iVar8,iVar16); + FUN_00644da0(uVar7); + } + break; + case 0x10: + if (DAT_00fe1ec4 == 2) { + FUN_00644d18(uVar7); + } + iVar8 = FUN_00644250(&DAT_00fe1dd8); + iVar16 = (&DAT_0107034c)[iVar8]; + iVar8 = FUN_006448f8(); + *(short *)(iVar16 + 0x5d02) = (short)iVar8; + sVar6 = *(short *)(iVar16 + 0x5d00); + if (*(short *)(iVar16 + 0x5d00) <= iVar8) { + sVar6 = (short)iVar8; + } + *(short *)(iVar16 + 0x5d00) = sVar6; + break; + case 0x11: + puVar19 = (undefined1 *)FUN_00644250(&DAT_00fe1dd8); + local_658 = puVar19; + iVar8 = FUN_00644314(&DAT_00fe1dd8); + iVar16 = FUN_00644314(&DAT_00fe1dd8); + if ((int)puVar19 < 5) { + local_65c = FUN_00644314(&DAT_00fe1dd8); + if (local_65c == 1) goto LAB_0064d210; + local_654 = 0; + } + else { + local_65c = 1; +LAB_0064d210: + local_654 = 1; + } + if (DAT_00fe1ec4 == 2) { + if ((local_654 == 0) && + ((((puVar19 == (undefined1 *)0x0 || (puVar19 == (undefined1 *)0x2)) || + (puVar19 == (undefined1 *)0x4)) && + (iVar18 = (int)((ulonglong)((longlong)iVar8 * (longlong)DAT_0064d294) >> 0x20), + iVar22 = (int)((ulonglong)((longlong)iVar16 * (longlong)DAT_0064d290) >> 0x20) + iVar16, + puVar19 = local_658, + *(char *)(((iVar18 >> 3) - (iVar18 >> 0x1f)) * *(int *)(uVar7 + 0x20) + + ((iVar22 >> 3) - (iVar22 >> 0x1f)) + *(int *)(uVar7 + 0x14)) == '\0')))) { + local_654 = 1; + } + FUN_00644d18(uVar7); + } + switch(puVar19) { + case (undefined1 *)0x0: + FUN_007743f8(iVar8,iVar16,local_654,0,0,0); + break; + case (undefined1 *)0x1: + uVar14 = FUN_00644250(&DAT_00fe1dd8); + FUN_007749e4(iVar8,iVar16,local_65c,0,1,0xffffffff,uVar14); + if ((local_65c == 0x35) && (DAT_00fe1ec4 == 2)) { + FUN_00646500(0xf,iVar8,iVar16); + FUN_00644ee4(); + } + break; + case (undefined1 *)0x2: + FUN_00772a70(iVar8,iVar16); + break; + case (undefined1 *)0x3: + FUN_0075b374(iVar8,iVar16,local_65c); + break; + case (undefined1 *)0x4: + FUN_007743f8(iVar8,iVar16,local_654,0,1,0); + break; + case (undefined1 *)0x5: + FUN_00752628(iVar8,iVar16,0); + break; + case (undefined1 *)0x6: + FUN_0075250c(iVar8,iVar16,0); + break; + case (undefined1 *)0x7: + FUN_00777168(iVar8,iVar16); + break; + case (undefined1 *)0x8: + FUN_00752788(iVar8,iVar16); + break; + case (undefined1 *)0x9: + FUN_007526b4(iVar8,iVar16,local_654); + break; + case (undefined1 *)0xa: + FUN_00752628(iVar8,iVar16,1); + break; + case (undefined1 *)0xb: + FUN_0075250c(iVar8,iVar16,1); + break; + case (undefined1 *)0xc: + FUN_00752628(iVar8,iVar16,2); + break; + case (undefined1 *)0xd: + FUN_0075250c(iVar8,iVar16,2); + break; + case (undefined1 *)0xe: + FUN_00777238(iVar8,iVar16,0); + } + break; + case 0x13: + if (DAT_00fe1ec4 == 2) { + FUN_00644d18(uVar7); + } + uVar14 = FUN_00644314(&DAT_00fe1dd8); + uVar15 = FUN_00644314(&DAT_00fe1dd8); + uVar17 = FUN_00644228(&DAT_00fe1dd8); + FUN_00776dc8(uVar14,uVar15,uVar17); + break; + case 0x14: + puVar27 = (undefined *)FUN_00644250(&DAT_00fe1dd8); + local_13c = puVar27; + puVar11 = (undefined1 *)FUN_00644314(&DAT_00fe1dd8); + local_14c = puVar11; + puVar19 = (undefined1 *)FUN_00644314(&DAT_00fe1dd8); + puVar24 = puVar11 + (int)puVar27; + local_658 = puVar19; + if ((int)puVar11 < (int)puVar24) { + puVar30 = puVar19 + (int)puVar27; + puVar1 = puVar19; + uVar7 = local_654; + puVar27 = local_13c; + puVar29 = puVar11; + do { + for (; puVar11 = local_14c, local_654 = uVar7, local_14c = puVar11, local_13c = puVar27, + (int)puVar1 < (int)puVar30; puVar1 = puVar1 + 1) { + FUN_00730d74((int)(puVar1 + DAT_00902934 * (int)puVar29) * 0xe + DAT_00902928, + &DAT_00fe1dd8); + puVar19 = local_658; + uVar7 = local_654; + puVar27 = local_13c; + } + puVar29 = puVar29 + 1; + puVar1 = puVar19; + } while ((int)puVar29 < (int)puVar24); + } + FUN_007728b0(puVar11,puVar19,puVar24,puVar19 + (int)puVar27); + if (DAT_00fe1ec4 == 2) { + EnterCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e5c); + DAT_00fe1e74 = 1; + (**(code **)(DAT_00fe1d38 + 0x24))(&DAT_00fe1d38); + local_148[0]._0_1_ = 0x14; + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_148,1); + local_148[0] = CONCAT11(local_148[0]._1_1_,(char)puVar27); + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_148,1); + local_148[0] = (short)puVar11; + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_148,2); + local_148[0] = (short)local_658; + (**(code **)(DAT_00fe1d38 + 0x18))(&DAT_00fe1d38,local_148,2); + puVar1 = local_658; + for (; puVar29 = puVar1, (int)puVar11 < (int)puVar24; puVar11 = puVar11 + 1) { + for (; (int)puVar29 < (int)(puVar19 + (int)puVar27); puVar29 = puVar29 + 1) { + FUN_00730f00((int)(puVar29 + (int)puVar11 * DAT_00902934) * 0xe + DAT_00902928, + &DAT_00fe1d38); + puVar1 = local_658; + } + uVar7 = local_654; + } + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_00fe1e5c); + DAT_00fe1e74 = 0; + FUN_00644da0(uVar7); + } + break; + case 0x15: + iVar18 = FUN_00644250(&DAT_00fe1dd8); + local_14c = (undefined1 *)(iVar18 * 5); + iVar8 = iVar18 * 0xa0; + uVar7 = FUN_00644278(&DAT_00fe1dd8); + local_654 = (uint)(byte)(&DAT_010731dc)[iVar8]; + uVar9 = uVar7 & 0xf; + iVar16 = (int)uVar7 >> 4; + if (DAT_00fe1ec4 == 1) { + if (iVar16 == 0) { + (&DAT_010731a8)[iVar8] = 0; + } + else { + FUN_006317fc(&DAT_010731a0 + iVar8,iVar16,1); + bVar2 = FUN_00644250(&DAT_00fe1dd8); + if ((bVar2 & 0x80) != 0) { + bVar2 = bVar2 ^ 0x80; + uVar14 = FUN_00644250(&DAT_00fe1dd8); + FUN_00613df4(&DAT_010731a0 + iVar8,uVar14); + } + (&DAT_010731cd)[iVar8] = bVar2; + uVar5 = FUN_006448f8(); + *(undefined2 *)(&DAT_010731e2 + iVar8) = uVar5; + puVar10 = (undefined4 *)FUN_006451b4(&DAT_00fe1dd8,auStack_63c); + (&DAT_010731f8)[iVar18 * 0x28] = *puVar10; + (&DAT_010731fc)[iVar18 * 0x28] = puVar10[1]; + puVar10 = (undefined4 *)FUN_006451b4(&DAT_00fe1dd8,auStack_564); + (&DAT_01073200)[iVar18 * 0x28] = *puVar10; + (&DAT_01073204)[iVar18 * 0x28] = puVar10[1]; + uVar4 = FUN_0060a19c(&DAT_010731f8 + (int)local_14c * 8, + (&DAT_010731f4)[(int)local_14c * 0x10], + (&DAT_010731f6)[(int)local_14c * 0x10]); + (&DAT_010731ac)[iVar8] = uVar4; + (&DAT_010731dc)[iVar8] = (char)local_654; + } + } + else if (iVar16 == 0) { + (&DAT_010731a8)[iVar8] = 0; + FUN_0064998c(uVar9,iVar18,0); + } + else { + uVar7 = FUN_00644250(&DAT_00fe1dd8); + local_65c = 0; + if ((uVar7 & 0x80) != 0) { + uVar7 = uVar7 ^ 0x80; + local_65c = FUN_00644250(&DAT_00fe1dd8); + } + puVar19 = (undefined1 *)FUN_006448f8(); + local_14c = puVar19; + fVar35 = (float)FUN_0064433c(&DAT_00fe1dd8); + fVar34 = (float)FUN_0064433c(&DAT_00fe1dd8); + local_658 = (undefined1 *)(uint)(iVar18 == 200); + if (local_658 == (undefined1 *)0x0) { + (&DAT_010731f8)[iVar18 * 0x28] = fVar35; + (&DAT_010731fc)[iVar18 * 0x28] = fVar34; + } + else { + FUN_00613968(auStack_cc); + FUN_006317fc(auStack_cc,iVar16,puVar19); + sVar6 = FUN_00631590((int)fVar35,(int)fVar34,local_78,local_76,local_c8,puVar19,1,0,0); + iVar18 = (int)sVar6; + } + FUN_006317fc(&DAT_010731a0 + iVar18 * 0xa0,iVar16,local_14c); + FUN_00613df4(&DAT_010731a0 + iVar18 * 0xa0,local_65c); + iVar8 = iVar18 * 0xa0; + (&DAT_010731cd)[iVar8] = (char)uVar7; + puVar10 = (undefined4 *)FUN_006451b4(&DAT_00fe1dd8,auStack_594); + (&DAT_01073200)[iVar18 * 0x28] = *puVar10; + (&DAT_01073204)[iVar18 * 0x28] = puVar10[1]; + FUN_0064998c(uVar9,iVar18,2); + if (local_658 == (undefined1 *)0x0) { + (&DAT_010731dc)[iVar8] = (char)local_654; + FUN_00644da0(*(undefined4 *)((&DAT_0107034c)[uVar9] + 0x30)); + } + else { + FUN_00644ee4(); + if (uVar7 == 0) { + (&DAT_010731dd)[iVar8] = (char)uVar9; + (&DAT_010731de)[iVar8] = 100; + } + } + } + break; + case 0x16: + iVar8 = FUN_00644250(&DAT_00fe1dd8); + uVar9 = FUN_00644250(&DAT_00fe1dd8); + uVar32 = uVar9 & 0x80 ^ uVar9; + (&DAT_010731dc)[iVar8 * 0xa0] = (char)uVar32; + if ((int)uVar32 < 4) { + (&DAT_010731df)[iVar8 * 0xa0] = 0xf; + puVar10 = (undefined4 *)FUN_006451b4(&DAT_00fe1dd8,auStack_59c); + (&DAT_010731f8)[iVar8 * 0x28] = *puVar10; + (&DAT_010731fc)[iVar8 * 0x28] = puVar10[1]; + if ((uVar9 & 0x80) == 0) { + (&DAT_01073200)[iVar8 * 0x28] = puVar19; + (&DAT_01073204)[iVar8 * 0x28] = puVar19; + } + else { + puVar10 = (undefined4 *)FUN_006451b4(&DAT_00fe1dd8,auStack_53c); + (&DAT_01073200)[iVar8 * 0x28] = *puVar10; + (&DAT_01073204)[iVar8 * 0x28] = puVar10[1]; + } + } + if (DAT_00fe1ec4 == 2) { + FUN_00644d18(uVar7); + } + break; + case 0x18: + if (DAT_00fe1ec4 == 2) { + FUN_00644d18(uVar7); + } + uVar14 = FUN_00644314(&DAT_00fe1dd8); + uVar15 = FUN_00644314(&DAT_00fe1dd8); + FUN_00772624(uVar14,uVar15,1); + break; + case 0x1a: + if (DAT_00fe1ec4 == 2) { + FUN_00644d18(uVar7); + } + uVar7 = FUN_00644250(&DAT_00fe1dd8); + uVar14 = FUN_00644228(&DAT_00fe1dd8); + uVar15 = FUN_006442ec(&DAT_00fe1dd8); + FUN_0064429c(&DAT_00fe1dd8); + FUN_006d6464((&DAT_0107034c)[uVar7 & 3],uVar15,uVar14,(uVar7 & 0x40) != 0,1); + break; + case 0x1b: + uVar9 = FUN_00644250(&DAT_00fe1dd8); + local_14c = (undefined1 *)((int)uVar9 >> 4); + uVar32 = FUN_006448f8(); + uVar20 = FUN_006448f8(); + puVar33 = &DAT_0107af40; + bVar3 = false; + iVar8 = 0x200; + iVar16 = 0; + puVar21 = puVar33; + do { + if ((((ushort)puVar21[1] == uVar20) && ((uint)*(byte *)(puVar21 + 0x11) == (uVar9 & 0xf))) && + (*(char *)(puVar21 + 2) != '\0')) { + bVar3 = true; + iVar8 = iVar16; + } + iVar16 = iVar16 + 1; + puVar21 = puVar21 + 0x74; + } while (iVar16 < 0x200); + iVar16 = iVar8; + if (!bVar3) { + iVar18 = 0; + do { + iVar16 = iVar18; + if (*(char *)(puVar33 + 2) == '\0') break; + iVar18 = iVar18 + 1; + puVar33 = puVar33 + 0x74; + iVar16 = iVar8; + } while (iVar18 < 0x200); + } + iVar8 = iVar16 * 0xe8; + puVar31 = &DAT_0107af40 + iVar16 * 0x74; + if (((&DAT_0107af44)[iVar8] == '\0') || (*puVar31 != uVar32)) { + FUN_006f0e64(puVar31); + } + (&DAT_0107af62)[iVar8] = (char)(uVar9 & 0xf); + (&DAT_0107af42)[iVar16 * 0x74] = (short)uVar20; + puVar10 = (undefined4 *)FUN_006451b4(&DAT_00fe1dd8,auStack_584); + (&DAT_0107af84)[iVar16 * 0x3a] = *puVar10; + (&DAT_0107af88)[iVar16 * 0x3a] = puVar10[1]; + fVar35 = (float)(&DAT_0107af88)[iVar16 * 0x3a]; + *(int *)(&DAT_0107af6c + iVar8) = (int)(float)(&DAT_0107af84)[iVar16 * 0x3a]; + *(int *)(&DAT_0107af70 + iVar8) = (int)fVar35; + puVar10 = (undefined4 *)FUN_006451b4(&DAT_00fe1dd8,auStack_544); + puVar11 = local_14c; + *(undefined4 *)(&DAT_0107af94 + iVar8) = *puVar10; + *(undefined4 *)(&DAT_0107af98 + iVar8) = puVar10[1]; + if (((uint)local_14c & 1) == 0) { + *(undefined1 **)(&DAT_0107af7c + iVar8) = puVar19; + } + else { + (**(code **)(DAT_00fe1dd8 + 0x1c))(&DAT_00fe1dd8,&local_14c,4); + *(undefined1 **)(&DAT_0107af7c + iVar8) = local_14c; + } + if (((uint)puVar11 & 2) == 0) { + sVar6 = 0; + } + else { + (**(code **)(DAT_00fe1dd8 + 0x1c))(&DAT_00fe1dd8,local_148,2); + sVar6 = local_148[0]; + } + *(short *)(&DAT_0107afc2 + iVar8) = sVar6; + puVar24 = puVar19; + if (((uint)puVar11 & 4) != 0) { + (**(code **)(DAT_00fe1dd8 + 0x1c))(&DAT_00fe1dd8,&local_14c,4); + puVar24 = local_14c; + } + (&DAT_0107afb4)[iVar16 * 0x3a] = puVar24; + if (((uint)puVar11 & 8) != 0) { + (**(code **)(DAT_00fe1dd8 + 0x1c))(&DAT_00fe1dd8,&local_14c,4); + puVar19 = local_14c; + } + (&DAT_0107afb8)[iVar16 * 0x3a] = (int)(float)puVar19; + if (DAT_00fe1ec4 == 2) { + FUN_00644c88(uVar7,puVar31); + } + break; + case 0x1c: + if (DAT_00fe1ec4 == 2) { + FUN_00644d18(uVar7); + } + iVar8 = FUN_00644250(&DAT_00fe1dd8); + iVar16 = FUN_006442ec(&DAT_00fe1dd8); + if (iVar16 < 0) { + *(undefined4 *)(iVar8 * 0x274 + DAT_00fe1fa8 + 0x1b4) = 0; + iVar16 = iVar8 * 0x274 + DAT_00fe1fa8; + if (*(char *)(iVar16 + 0x100) == '\0') break; + FUN_00697e24(0x41200000,iVar16,0); + *(undefined1 *)(iVar8 * 0x274 + DAT_00fe1fa8 + 0x100) = 0; + } + else { + uVar14 = FUN_0064433c(&DAT_00fe1dd8); + uVar7 = FUN_00644228(&DAT_00fe1dd8); + FUN_006b4dbc(uVar14,iVar8 * 0x274 + DAT_00fe1fa8,iVar16,(int)uVar7 >> 1,(uVar7 & 1) != 0,0); + } + if (DAT_00fe1ec4 == 2) { + iVar16 = iVar8 * 0x274 + DAT_00fe1fa8; + if (*(int *)(iVar16 + 0x1b4) < 1) { + FUN_00649e80(iVar8,0); + } + else { + *(undefined1 *)(iVar16 + 0x10c) = 1; + } + } + break; + case 0x1d: + uVar9 = FUN_006448f8(); + uVar32 = FUN_00644250(&DAT_00fe1dd8); + if (DAT_00fe1ec4 == 2) { + FUN_00644d18(uVar7); + } + puVar21 = &DAT_0107af40; + iVar8 = 0; + do { + if (((*(byte *)(puVar21 + 0x11) == uVar32) && ((ushort)puVar21[1] == uVar9)) && + (*(char *)(puVar21 + 2) != '\0')) { + FUN_006fde70(&DAT_0107af40 + iVar8 * 0x74); + break; + } + iVar8 = iVar8 + 1; + puVar21 = puVar21 + 0x74; + } while (iVar8 < 0x200); + break; + case 0x1e: + uVar9 = FUN_00644250(&DAT_00fe1dd8); + uVar32 = uVar9 & 0x80; + iVar8 = (&DAT_0107034c)[uVar32 ^ uVar9]; + if (DAT_00fe1ec4 == 2) { + FUN_00644d18(uVar7); + if (uVar32 == 0) { + uVar14 = 0x19; + } + else { + uVar14 = 0x18; + } + uVar15 = FUN_00595220(auStack_20c,iVar8 + 0x5c1c); + iVar16 = (uint)*(byte *)(iVar8 + 0x142) * 4; + FUN_0064a758(uVar15,uVar14,*(undefined1 *)(&DAT_01070338 + *(byte *)(iVar8 + 0x142)), + *(undefined1 *)((int)&DAT_01070338 + iVar16 + 1), + *(undefined1 *)((int)&DAT_01070338 + iVar16 + 2),0xffffffff); + } + *(bool *)(iVar8 + 0x8d79) = uVar32 != 0; + break; + case 0x20: + iVar8 = FUN_006448f8(); + iVar16 = FUN_00644250(&DAT_00fe1dd8); + iVar8 = iVar8 * 0x1908 + DAT_00fd643c; + if (*(char *)(iVar8 + 0x1904) != '\0') { + *(undefined1 *)(iVar8 + 0x1904) = 0; + } + iVar18 = FUN_006442ec(&DAT_00fe1dd8); + if (iVar18 == 0) { + FUN_00612a6c(iVar8 + iVar16 * 0xa0); + } + else { + uVar14 = FUN_00644250(&DAT_00fe1dd8); + uVar15 = FUN_006448f8(); + FUN_006317fc(iVar8 + iVar16 * 0xa0,iVar18,uVar15); + FUN_00613df4(iVar8 + iVar16 * 0xa0,uVar14); + } + break; + case 0x21: + uVar7 = FUN_006442ec(&DAT_00fe1dd8); + iVar18 = (int)uVar7 >> 5; + iVar16 = (&DAT_0107034c)[uVar7 & 0x1f]; + iVar8 = FUN_006becfc(iVar16); + if (iVar8 == 0) { + *(short *)(iVar16 + 0x8de2) = (short)iVar18; + if (-1 < iVar18) { + FUN_006104a0(&DAT_00fe1dd8,4); + } + } + else { + sVar6 = *(short *)(iVar16 + 0x8de2); + *(short *)(iVar16 + 0x8de2) = (short)iVar18; + if (-1 < iVar18) { + uVar5 = FUN_006442ec(&DAT_00fe1dd8); + *(undefined2 *)(iVar16 + 0x8de4) = uVar5; + uVar5 = FUN_006442ec(&DAT_00fe1dd8); + *(undefined2 *)(iVar16 + 0x8de6) = uVar5; + } + if (sVar6 == -1) { + FUN_0073b56c(*(undefined4 *)(iVar16 + 0x34)); + FUN_007a7bf4(10); + } + else if (iVar18 == -1) { + if (*(int *)(*(int *)(iVar16 + 0x34) + 0x2c78) == 2) { + FUN_0073b540(); + FUN_007a7bf4(0xb); + } + } + else if (sVar6 != iVar18) { + FUN_0073b56c(*(undefined4 *)(iVar16 + 0x34)); + FUN_007a7bf4(0xc); + } + } + break; + case 0x23: + if (DAT_00fe1ec4 == 2) { + FUN_00644d18(uVar7); + } + iVar8 = FUN_00644250(&DAT_00fe1dd8); + uVar15 = (&DAT_0107034c)[iVar8]; + uVar14 = FUN_006448f8(); + FUN_006c0368(uVar15,uVar14,0); + break; + case 0x24: + if (DAT_00fe1ec4 == 2) { + FUN_00644d18(uVar7); + } + iVar8 = FUN_00644250(&DAT_00fe1dd8); + iVar16 = (&DAT_0107034c)[iVar8]; + iVar8 = FUN_00644250(&DAT_00fe1dd8); + *(byte *)(iVar16 + 0xe6) = (byte)iVar8 & 1; + *(byte *)(iVar16 + 0xe8) = (byte)(iVar8 >> 1) & 1; + *(byte *)(iVar16 + 0xe5) = (byte)(iVar8 >> 2) & 1; + *(byte *)(iVar16 + 0xe9) = (byte)(iVar8 >> 3) & 1; + *(byte *)(iVar16 + 0xe7) = (byte)(iVar8 >> 4) & 1; + *(byte *)(iVar16 + 0xea) = (byte)(iVar8 >> 5) & 1; + *(byte *)(iVar16 + 0xeb) = (byte)(iVar8 >> 6) & 1; + *(byte *)(iVar16 + 0xec) = (byte)(iVar8 >> 7) & 1; + break; + case 0x29: + if (DAT_00fe1ec4 == 2) { + FUN_00644d18(uVar7); + } + iVar8 = FUN_00644250(&DAT_00fe1dd8); + iVar8 = (&DAT_0107034c)[iVar8]; + uVar5 = FUN_006442ec(&DAT_00fe1dd8); + *(undefined2 *)(iVar8 + 0x8df0) = uVar5; + break; + case 0x2a: + if (DAT_00fe1ec4 == 2) { + FUN_00644d18(uVar7); + } + iVar8 = FUN_00644250(&DAT_00fe1dd8); + iVar8 = (&DAT_0107034c)[iVar8]; + uVar14 = FUN_0064433c(&DAT_00fe1dd8); + *(undefined4 *)(iVar8 + 0x164) = uVar14; + uVar5 = FUN_006442ec(&DAT_00fe1dd8); + *(undefined2 *)(iVar8 + 0x154) = uVar5; + *(undefined1 *)(iVar8 + 0x5cf9) = + *(undefined1 *)(iVar8 + *(char *)(iVar8 + 0x14c) * 0xa0 + 0x95e); + break; + case 0x2b: + if (DAT_00fe1ec4 == 2) { + FUN_00644d18(uVar7); + } + uVar7 = FUN_00644278(&DAT_00fe1dd8); + iVar8 = (&DAT_0107034c)[uVar7 & 0xf]; + *(short *)(iVar8 + 0x5d06) = (short)uVar7 >> 4; + *(short *)(iVar8 + 0x5d08) = (short)(uVar7 >> 0x10); + break; + case 0x2c: + if (DAT_00fe1ec4 == 2) { + FUN_00644d18(uVar7); + } + iVar8 = FUN_00644250(&DAT_00fe1dd8); + uVar14 = FUN_006442ec(&DAT_00fe1dd8); + FUN_006c032c((&DAT_0107034c)[iVar8],uVar14); + break; + case 0x2d: + if (DAT_00fe1ec4 == 2) { + FUN_00644d18(uVar7); + } + iVar8 = FUN_00644250(&DAT_00fe1dd8); + uVar14 = FUN_00644228(&DAT_00fe1dd8); + uVar15 = FUN_006442ec(&DAT_00fe1dd8); + iVar16 = FUN_00644250(&DAT_00fe1dd8); + uVar36 = FUN_0064429c(&DAT_00fe1dd8); + uVar15 = VectorSignedToFloat(uVar15,(byte)(in_fpscr >> 0x16) & 3); + FUN_006d3458(uVar15,(&DAT_0107034c)[iVar8],uVar14,iVar16 != 0,(&DAT_0107034c)[iVar8],uVar36); + break; + case 0x2e: + uVar32 = FUN_00644250(&DAT_00fe1dd8); + uVar9 = (int)uVar32 >> 4; + iVar8 = (&DAT_0107034c)[uVar32 & 0xf]; + bVar2 = *(byte *)(iVar8 + 0x142); + *(char *)(iVar8 + 0x142) = (char)uVar9; + if (bVar2 != uVar9) { + if (DAT_00fe1ec4 == 2) { + FUN_00644d18(uVar7); + } + FUN_00595220(auStack_12c,iVar8 + 0x5c1c); + FUN_00595220(auStack_fc,&DAT_00fd6948 + (uVar9 + 0x1a) * 0x30); + local_144 = auStack_5e4; + uVar14 = FUN_007aa7e4(auStack_12c,auStack_5e4); + local_14c = auStack_5cc; + uVar15 = FUN_00426e64(auStack_5cc,L"#PlayerName#"); + uVar17 = FUN_007aa5e0(auStack_fc); + uVar17 = FUN_00425930(auStack_55c,uVar17); + piVar13 = (int *)FUN_00426810(auStack_5b4,uVar17,uVar15,uVar14); + if (7 < (uint)piVar13[5]) { + piVar13 = (int *)*piVar13; + } + FUN_007aaab8(auStack_fc,auStack_4c4,piVar13); + FUN_007aa754(auStack_4c4); + FUN_00423f74(auStack_5b4); + FUN_006050e4(auStack_fc,*(undefined1 *)(&DAT_01070338 + uVar9), + *(undefined1 *)((int)&DAT_01070338 + uVar9 * 4 + 1), + *(undefined1 *)((int)&DAT_01070338 + uVar9 * 4 + 2),600); + FUN_007aa754(auStack_fc); + FUN_007aa754(auStack_12c); + } + break; + case 0x30: + FUN_00644250(&DAT_00fe1dd8); + iVar8 = FUN_006448f8(); + FUN_00725fe8(iVar8 * 0x38 + DAT_009027f0,&DAT_00fe1dd8); + break; + case 0x31: + uVar7 = FUN_00644314(&DAT_00fe1dd8); + uVar9 = uVar7 & 0xffff3fff; + local_14c = (undefined1 *)FUN_00644314(&DAT_00fe1dd8); + uVar32 = (uint)local_14c & 0xffff3fff; + if ((uVar7 & 0x8000) == 0) { + iVar8 = uVar9 * DAT_00902934 + uVar32; + if ((uVar7 & 0x4000) == 0) { + *(undefined1 *)(iVar8 * 0xe + DAT_00902928 + 4) = 0; + } + else { + *(undefined1 *)(iVar8 * 0xe + DAT_00902928 + 4) = 0xff; + } + } + else { + uVar4 = FUN_00644250(&DAT_00fe1dd8); + *(undefined1 *)((uVar9 * DAT_00902934 + uVar32) * 0xe + DAT_00902928 + 4) = uVar4; + } + iVar8 = (uVar9 * DAT_00902934 + uVar32) * 0xe + DAT_00902928; + *(ushort *)(iVar8 + 2) = + *(ushort *)(iVar8 + 2) ^ + (*(ushort *)(iVar8 + 2) ^ (ushort)(((int)local_14c >> 0xe) << 0xc)) & 0x3000; + if (DAT_00fe1ec4 == 2) { + FUN_007729e8(uVar9,uVar32,0xffffffff); + } + break; + case 0x33: + if (DAT_00fe1ec4 == 2) { + FUN_00644d18(uVar7); + } + iVar8 = FUN_00644250(&DAT_00fe1dd8); + iVar8 = (&DAT_0107034c)[iVar8]; + uVar7 = FUN_00644314(&DAT_00fe1dd8); + uVar9 = 0; + do { + if ((1 << (uVar9 & 0xff) & uVar7) == 0) { + *(undefined2 *)(iVar8 + 0x17c) = 0; + *(undefined2 *)(iVar8 + 0x17e) = 0; + } + else { + uVar5 = FUN_00644250(&DAT_00fe1dd8); + *(undefined2 *)(iVar8 + 0x17c) = uVar5; + *(undefined2 *)(iVar8 + 0x17e) = 0x3c; + } + uVar9 = uVar9 + 1; + iVar8 = iVar8 + 6; + } while ((int)uVar9 < 10); + break; + case 0x34: + if (DAT_00fe1ec4 == 2) { + FUN_00644d18(uVar7); + } + iVar8 = FUN_00644250(&DAT_00fe1dd8); + FUN_007a8384(2,*(undefined4 *)((&DAT_0107034c)[iVar8] + 0x100), + *(undefined4 *)((&DAT_0107034c)[iVar8] + 0x104),1); + break; + case 0x35: + if (DAT_00fe1ec4 == 2) { + FUN_00644d18(uVar7); + } + FUN_00644250(&DAT_00fe1dd8); + uVar14 = FUN_00644314(&DAT_00fe1dd8); + uVar15 = FUN_00644314(&DAT_00fe1dd8); + FUN_00605890(uVar14,uVar15); + if (DAT_00fe1ec4 == 2) { + FUN_006496ec(uVar14,uVar15,2); + } + break; + case 0x38: + if (DAT_00fe1ec4 == 2) { + FUN_00644d18(uVar7); + } + iVar8 = FUN_00644250(&DAT_00fe1dd8); + uVar17 = (&DAT_0107034c)[iVar8]; + uVar14 = FUN_00644250(&DAT_00fe1dd8); + uVar15 = FUN_006448f8(); + FUN_006c48cc(uVar17,uVar14,uVar15,1); + break; + case 0x3b: + if (DAT_00fe1ec4 == 2) { + FUN_00644d18(uVar7); + } + iVar8 = FUN_00644250(&DAT_00fe1dd8); + iVar8 = (&DAT_0107034c)[iVar8]; + DAT_0103397c = FUN_0064433c(&DAT_00fe1dd8); + if (*(int *)(iVar8 + *(char *)(iVar8 + 0x14c) * 0xa0 + 0x94c) == 0x1fb) { + uVar14 = 0x23; + } + else { + uVar14 = 0x1a; + } + FUN_007a8384(2,*(undefined4 *)(iVar8 + 0x100),*(undefined4 *)(iVar8 + 0x104),uVar14); + break; + case 0x3c: + if (DAT_00fe1ec4 == 2) { + FUN_00644d18(uVar7); + } + uVar14 = FUN_00644314(&DAT_00fe1dd8); + uVar15 = FUN_00644314(&DAT_00fe1dd8); + FUN_00772d30(uVar14,uVar15); + break; + case 0x3d: + iVar8 = FUN_00644250(&DAT_00fe1dd8); + uVar14 = FUN_006442ec(&DAT_00fe1dd8); + uVar15 = FUN_006442ec(&DAT_00fe1dd8); + iVar16 = FUN_006442c4(&DAT_00fe1dd8); + if (DAT_00fe1ec4 == 1) { + *(char *)(iVar8 * 0x274 + DAT_00fe1fa8 + 0x119) = (char)iVar16; + *(short *)(iVar8 * 0x274 + DAT_00fe1fa8 + 0x1f2) = (short)uVar14; + *(short *)(iVar8 * 0x274 + DAT_00fe1fa8 + 500) = (short)uVar15; + } + else if (iVar16 == 0) { + FUN_0074bd1c(iVar8); + } + else { + FUN_00761ac8(uVar14,uVar15,iVar8); + } + break; + case 0x45: + if (DAT_00fe1ec4 == 2) { + FUN_00644d18(uVar7); + } + FUN_00644250(&DAT_00fe1dd8); + uVar14 = FUN_00644314(&DAT_00fe1dd8); + uVar15 = FUN_00644314(&DAT_00fe1dd8); + FUN_00755fb4(uVar14,uVar15); + if (DAT_00fe1ec4 == 2) { + FUN_006496ec(uVar14,uVar15,2); + } + break; + case 0x46: + if (DAT_00fe1ec4 == 2) { + FUN_00644d18(uVar7); + } + uVar7 = FUN_00644250(&DAT_00fe1dd8); + if ((int)uVar7 >> 4 == 1) { + FUN_006c2824((&DAT_0107034c)[uVar7 & 0xf]); + } + else if ((int)uVar7 >> 4 == 2) { + FUN_006c4a44((&DAT_0107034c)[uVar7 & 0xf]); + } + break; + case 0x47: + if (DAT_00fe1ec4 == 2) { + FUN_00644d18(uVar7); + } + uVar14 = FUN_00644250(&DAT_00fe1dd8); + uVar15 = FUN_006442ec(&DAT_00fe1dd8); + uVar17 = FUN_006442ec(&DAT_00fe1dd8); + FUN_00758620(uVar15,uVar17,uVar14,0); + break; + case 0x48: + if (DAT_00fe1ec4 == 2) { + FUN_00644d18(uVar7); + } + uVar14 = FUN_00644250(&DAT_00fe1dd8); + uVar15 = FUN_006442ec(&DAT_00fe1dd8); + uVar17 = FUN_006442ec(&DAT_00fe1dd8); + FUN_007585b8(uVar15,uVar17,uVar14,0); + break; + case 0x49: + if (DAT_00fe1ec4 == 2) { + FUN_00644d18(uVar7); + } + uVar7 = FUN_00644250(&DAT_00fe1dd8); + uVar17 = (&DAT_0107034c)[uVar7 & 0xf]; + uVar14 = FUN_00644278(&DAT_00fe1dd8); + uVar15 = FUN_00644278(&DAT_00fe1dd8); + local_64c = VectorSignedToFloat(uVar14,(byte)(in_fpscr >> 0x16) & 3); + local_648 = VectorSignedToFloat(uVar15,(byte)(in_fpscr >> 0x16) & 3); + FUN_006eecc4(uVar17,&local_64c,(int)uVar7 >> 4); + break; + case 0x51: + if (DAT_00fe1ec4 == 2) { + FUN_00644d18(uVar7); + } + iVar8 = FUN_00644250(&DAT_00fe1dd8); + iVar8 = (&DAT_0107034c)[iVar8]; + uVar14 = FUN_00644250(&DAT_00fe1dd8); + *(undefined4 *)(iVar8 + 0x5bd8) = uVar14; + break; + case 0x52: + uVar9 = FUN_00644250(&DAT_00fe1dd8); + local_658 = (undefined1 *)((int)uVar9 >> 4); + local_13c = (undefined *)(uVar9 & 0xf); + uVar32 = FUN_006442ec(&DAT_00fe1dd8); + local_14c = (undefined1 *)FUN_00644314(&DAT_00fe1dd8); + puVar33 = &DAT_0107af40; + iVar8 = 0; + puVar21 = puVar33; + do { + if ((((undefined *)(uint)*(byte *)(puVar21 + 0x11) == (undefined *)(uVar9 & 0xf)) && + ((undefined1 *)(uint)(ushort)puVar21[1] == local_14c)) && + (*(char *)(puVar21 + 2) == '\x01')) break; + iVar8 = iVar8 + 1; + puVar21 = puVar21 + 0x74; + } while (iVar8 < 0x200); + iVar8 = 0; + do { + iVar16 = iVar8; + if (*(char *)(puVar33 + 2) == '\0') break; + iVar8 = iVar8 + 1; + puVar33 = puVar33 + 0x74; + iVar16 = 0x200; + } while (iVar8 < 0x200); + iVar8 = iVar16 * 0xe8; + if (((&DAT_0107af44)[iVar8] == '\0') || + (puVar31 = &DAT_0107af40 + iVar16 * 0x74, *puVar31 != uVar32)) { + puVar31 = &DAT_0107af40 + iVar16 * 0x74; + FUN_006f0e64(puVar31); + } + *puVar31 = (ushort)uVar32; + (&DAT_0107af62)[iVar8] = (char)local_13c; + (&DAT_0107af42)[iVar16 * 0x74] = (short)local_14c; + puVar10 = (undefined4 *)FUN_006451b4(&DAT_00fe1dd8,auStack_52c); + (&DAT_0107af84)[iVar16 * 0x3a] = *puVar10; + (&DAT_0107af88)[iVar16 * 0x3a] = puVar10[1]; + *(int *)(&DAT_0107af6c + iVar8) = (int)(float)(&DAT_0107af84)[iVar16 * 0x3a]; + *(int *)(&DAT_0107af70 + iVar8) = (int)(float)(&DAT_0107af88)[iVar16 * 0x3a]; + puVar10 = (undefined4 *)FUN_006451b4(&DAT_00fe1dd8,auStack_534); + puVar11 = local_658; + *(undefined4 *)(&DAT_0107af94 + iVar16 * 0xe8) = *puVar10; + *(undefined4 *)(&DAT_0107af98 + iVar16 * 0xe8) = puVar10[1]; + if (((uint)local_658 & 1) == 0) { + *(undefined1 **)(&DAT_0107af7c + iVar8) = puVar19; + } + else { + (**(code **)(DAT_00fe1dd8 + 0x1c))(&DAT_00fe1dd8,&local_14c,4); + *(undefined1 **)(&DAT_0107af7c + iVar8) = local_14c; + } + if (((uint)puVar11 & 2) == 0) { + sVar6 = 0; + } + else { + (**(code **)(DAT_00fe1dd8 + 0x1c))(&DAT_00fe1dd8,local_148,2); + sVar6 = local_148[0]; + } + *(short *)(&DAT_0107afc2 + iVar8) = sVar6; + if (((uint)puVar11 & 4) != 0) { + (**(code **)(DAT_00fe1dd8 + 0x1c))(&DAT_00fe1dd8,&local_14c,4); + puVar19 = local_14c; + } + (&DAT_0107afb4)[iVar16 * 0x3a] = puVar19; + if (((uint)puVar11 & 8) == 0) { + iVar8 = 0; + } + else { + (**(code **)(DAT_00fe1dd8 + 0x1c))(&DAT_00fe1dd8,local_148,2); + iVar8 = (int)local_148[0]; + } + (&DAT_0107afb8)[iVar16 * 0x3a] = iVar8; + if (DAT_00fe1ec4 == 2) { + FUN_00644c88(uVar7,puVar31); + } + } + FUN_007ffb98(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006557e4.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006557e4.c new file mode 100644 index 000000000..60f569746 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006557e4.c @@ -0,0 +1,48 @@ + +longlong FUN_006557e4(undefined4 param_1,uint param_2,undefined4 param_3,undefined4 param_4) + +{ + char cVar1; + char cVar2; + char cVar3; + int iVar4; + int iVar5; + undefined4 uVar6; + + if (((((DAT_00fe1ec4 != 1) && (DAT_010338d3 != '\0')) && (DAT_010703e3 == '\0')) && + ((0 < DAT_0102a77c && (DAT_00fe1f71 == '\0')))) && + (iVar4 = FUN_00608330(&DAT_00fd67f4,10), cVar3 = DAT_00fe1f8a, cVar2 = DAT_00fe1f89, + cVar1 = DAT_00fe1f88, iVar4 == 0)) { + if (((DAT_00fe1f88 == '\0') || (DAT_00fe1f89 == '\0')) || (DAT_00fe1f8a == '\0')) { + iVar4 = 0; + do { + iVar5 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar5 == 0) { + if (cVar1 == '\0') { + DAT_00fe1f70 = 1; + uVar6 = 0xffffffff; + FUN_00646f20(0x2e,0x32,0xff,0x82,0xffffffff,param_3,param_4); + return CONCAT44(uVar6,1); + } + } + else if (iVar5 == 1) { + if (cVar2 == '\0') { + DAT_00fe1f70 = 2; + uVar6 = 0xffffffff; + FUN_00646f20(0x2f,0x32,0xff,0x82,0xffffffff,param_3,param_4); + return CONCAT44(uVar6,1); + } + } + else if (cVar3 == '\0') { + DAT_00fe1f70 = 3; + uVar6 = 0xffffffff; + FUN_00646f20(0x30,0x32,0xff,0x82,0xffffffff,param_3,param_4); + return CONCAT44(uVar6,1); + } + iVar4 = iVar4 + 1; + } while (iVar4 < 1000); + } + } + return (ulonglong)param_2 << 0x20; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/00667810.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/00667810.c new file mode 100644 index 000000000..2f63cb57c --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/00667810.c @@ -0,0 +1,46 @@ + +undefined8 FUN_00667810(void) + +{ + int iVar1; + int iVar2; + int iVar3; + short sVar4; + + FUN_0065942c(); + iVar1 = DAT_006678a4; + sVar4 = 0; + DAT_00fe1f71 = 0; + DAT_00fe1f70 = 0; + DAT_00fe1f6c = 0; + DAT_00fe1f7c = 0; + DAT_00fe1f73 = 0; + DAT_00fe1f7a = 0; + DAT_00fe1f7b = 0; + DAT_00fe1f7e = 0; + DAT_00fe1f7f = 0; + DAT_00fe1f82 = 0; + DAT_00fe1f83 = 0; + DAT_00fe1f85 = 0; + DAT_00fe1f84 = 0; + DAT_00fe1f87 = 0; + DAT_00fe1f88 = 0; + DAT_00fe1f89 = 0; + DAT_00fe1f8a = 0; + DAT_00fe1f8b = 0; + DAT_00fe1f8c = 0; + DAT_00fe1f8d = 0; + iVar3 = 0; + do { + iVar2 = iVar3 + DAT_00fe1fa8; + FUN_0065a2d8(iVar2); + if (iVar2 != 0) { + FUN_0065a358(iVar2); + } + *(short *)(DAT_00fe1fa8 + iVar3 + 0x1e6) = sVar4; + iVar3 = iVar3 + 0x274; + sVar4 = sVar4 + 1; + } while (iVar3 < iVar1); + return CONCAT44(iVar2,iVar2); +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006771d8.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006771d8.c new file mode 100644 index 000000000..35bca96c9 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006771d8.c @@ -0,0 +1,1927 @@ + +void FUN_006771d8(void) + +{ + byte bVar1; + bool bVar2; + bool bVar3; + bool bVar4; + bool bVar5; + uint uVar6; + undefined4 uVar7; + undefined1 *puVar8; + undefined1 *puVar9; + int iVar10; + int extraout_r2; + int iVar11; + uint uVar12; + uint uVar13; + uint uVar14; + int iVar15; + int iVar16; + uint uVar17; + uint in_fpscr; + float fVar18; + float fVar19; + double dVar20; + double dVar21; + undefined1 auStack_fc [48]; + undefined1 auStack_cc [48]; + int local_9c; + int local_98; + int local_94; + int local_90; + int local_8c; + int local_88; + undefined1 *local_84; + int local_80; + undefined4 local_7c; + int local_78; + int local_74; + int local_70; + int local_6c; + undefined8 local_68; + undefined4 local_5c; + undefined4 uStack_58; + undefined1 auStack_54 [24]; + undefined1 auStack_3c [24]; + + local_68 = FUN_007ffb80(); + local_84 = (undefined1 *)((ulonglong)local_68 >> 0x20); + puVar8 = auStack_fc; + local_5c = 0xfffffffe; + uStack_58 = 0xfffffffe; + local_7c = 0; + local_70 = 0; + local_9c = 0; + local_6c = 0; + local_90 = 0; + local_80 = 0; + local_94 = 0; + local_88 = 0; + local_74 = 0; + local_78 = 0; + local_98 = 0; + iVar16 = 0; + bVar5 = false; + bVar3 = false; + bVar2 = false; + bVar4 = false; + iVar10 = 0xc4; + iVar11 = DAT_00fe1fa8; + do { + if (*(char *)(iVar11 + 0x100) != '\0') { + iVar15 = *(int *)(iVar11 + 0x104); + if (iVar15 == 0x11) { + local_70 = 1; + } + else if (iVar15 == 0x12) { + bVar5 = true; + } + else if (iVar15 == 0x13) { + bVar3 = true; + } + else if (iVar15 == 0x14) { + local_9c = 1; + } + else if (iVar15 == 0x25) { + local_6c = 1; + } + else if (iVar15 == 0x26) { + iVar16 = 1; + } + else if (iVar15 == 0x7c) { + bVar2 = true; + } + else if (iVar15 == 0x6b) { + local_90 = 1; + } + else if (iVar15 == 0x36) { + local_80 = 1; + } + else if (iVar15 == 0xa0) { + local_94 = 1; + } + else if (iVar15 == 0xb2) { + local_88 = 1; + } + else if (iVar15 == 0xe5) { + bVar4 = true; + } + else if (iVar15 == 0xd1) { + local_74 = 1; + } + else if (iVar15 == 0xd0) { + local_78 = 1; + } + else if (iVar15 == 0x16) { + local_98 = 1; + } + } + iVar11 = iVar11 + 0x274; + iVar10 = iVar10 + -1; + } while (iVar10 != 0); + local_8c = iVar16; + FUN_007ab078(auStack_54,&DAT_0080ed7b); + puVar9 = local_84; + uVar13 = DAT_00fd67fc; + uVar14 = DAT_00fd67f8; + uVar12 = DAT_00fd67f4; + iVar11 = *(int *)((int)local_68 + 0x104); + if (iVar11 == 0x11) { + uVar6 = DAT_00fd6800; + uVar17 = DAT_00fd67fc; + if (DAT_00fe1f73 != '\0') { +LAB_006773f4: + DAT_00fd67fc = uVar6; + if (DAT_010703e0 == '\0') { + if (DAT_010703e2 == '\0') { + uVar12 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + uVar12 = uVar12 ^ (uVar12 ^ uVar6 >> 0xb) >> 8; + if (DAT_006779f0 <= DAT_010703dc) { + uVar14 = in_fpscr & 0xfffffff | (uint)(DAT_010703dc < DAT_006779ec) << 0x1f | + (uint)(DAT_010703dc == DAT_006779ec) << 0x1e; + bVar1 = (byte)(uVar14 >> 0x18); + if ((bool)(bVar1 >> 6 & 1) || + (bool)(bVar1 >> 7) != (NAN(DAT_010703dc) || NAN(DAT_006779ec))) { + DAT_00fd6800 = uVar12 ^ uVar6; + fVar18 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff, + (byte)(uVar14 >> 0x16) & 3); + iVar11 = (int)(fVar18 * DAT_0067750c * 3.0); + if (iVar11 == 0) { + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = uVar17; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x16); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = uVar17; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x17); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = uVar17; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x18); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + else { + DAT_00fd6800 = uVar12 ^ uVar6; + fVar18 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff, + (byte)(uVar14 >> 0x16) & 3); + if ((int)(fVar18 * DAT_0067750c * 2.0) == 0) { + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = uVar17; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x14); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = uVar17; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x15); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + } + else { + DAT_00fd6800 = uVar12 ^ uVar6; + fVar18 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff, + (byte)((in_fpscr & 0xfffffff) >> 0x16) & 3); + if ((int)(fVar18 * DAT_0067750c * 2.0) == 0) { + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = uVar17; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x12); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = uVar17; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x13); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + } + else { + uVar12 = uVar17; + uVar14 = DAT_00fd67f8; + if ((bVar5) && (bVar2)) { + uVar12 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67fc = uVar12 ^ (uVar12 ^ uVar6 >> 0xb) >> 8 ^ uVar6; + fVar18 = (float)VectorSignedToFloat(DAT_00fd67fc & 0x7fffffff, + (byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67f4 = DAT_00fd67f8; + uVar12 = uVar6; + uVar14 = uVar17; + if ((int)(fVar18 * DAT_0067750c * 3.0) == 0) { + DAT_00fd67f8 = uVar17; + DAT_00fd6800 = DAT_00fd67fc; + DAT_00fd67fc = uVar6; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xd); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + uVar13 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd6800 = uVar13 ^ (uVar13 ^ DAT_00fd67fc >> 0xb) >> 8 ^ DAT_00fd67fc; + fVar18 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3 + ); + iVar11 = (int)(fVar18 * DAT_0067750c * 4.0); + DAT_00fd67f4 = uVar14; + DAT_00fd67f8 = uVar12; + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xe); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xf); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 2) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x10); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x11); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + } + else { + uVar12 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + uVar12 = uVar12 ^ (uVar12 ^ uVar6 >> 0xb) >> 8; + if (DAT_00677508 <= DAT_010703dc) { + uVar14 = in_fpscr & 0xfffffff | (uint)(DAT_010703dc < DAT_00677504) << 0x1f | + (uint)(DAT_010703dc == DAT_00677504) << 0x1e; + bVar1 = (byte)(uVar14 >> 0x18); + if ((bool)(bVar1 >> 6 & 1) || + (bool)(bVar1 >> 7) != (NAN(DAT_010703dc) || NAN(DAT_00677504))) { + DAT_00fd6800 = uVar12 ^ uVar6; + fVar18 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(uVar14 >> 0x16) & 3 + ); + iVar11 = (int)(fVar18 * DAT_0067750c * 3.0); + if (iVar11 == 0) { + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = uVar17; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,10); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = uVar17; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xb); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = uVar17; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xc); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + else { + DAT_00fd6800 = uVar12 ^ uVar6; + fVar18 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(uVar14 >> 0x16) & 3 + ); + iVar11 = (int)(fVar18 * DAT_0067750c * 3.0); + if (iVar11 == 0) { + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = uVar17; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,7); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = uVar17; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,8); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = uVar17; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,9); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + } + else { + DAT_00fd6800 = uVar12 ^ uVar6; + fVar18 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff, + (byte)((in_fpscr & 0xfffffff) >> 0x16) & 3); + iVar11 = (int)(fVar18 * DAT_0067750c * 3.0); + if (iVar11 == 0) { + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = uVar17; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,4); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = uVar17; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,5); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = uVar17; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,6); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + } + goto LAB_00679f24; + } + DAT_00fd67f4 = DAT_00fd67f8; + uVar12 = uVar12 ^ uVar12 << 0xb; + DAT_00fd67f8 = DAT_00fd67fc; + uVar6 = uVar12 ^ (uVar12 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + DAT_00fd67fc = DAT_00fd6800; + fVar18 = (float)VectorSignedToFloat(uVar6 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + uVar17 = DAT_00fd6800; + if ((int)(fVar18 * DAT_0067750c * 3.0) != 0) goto LAB_006773f4; + DAT_00fd6800 = uVar6; + if (199 < *(short *)(extraout_r2 + 0x5d00)) { + if (*(short *)(extraout_r2 + 0x5cfa) < 0xb) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,2); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,3); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + goto LAB_00679f24; + } + uVar7 = FUN_0063a50c(auStack_fc,extraout_r2,1); + FUN_007aa80c(auStack_54,auStack_cc,uVar7); + FUN_007aa754(auStack_cc); +LAB_00679f28: + FUN_007aa754(puVar8); + } + else { + if (iVar11 == 0x12) { + if (DAT_010703e2 == '\0') { + DAT_00fd67f4 = DAT_00fd67f8; + uVar12 = uVar12 ^ uVar12 << 0xb; + DAT_00fd67f8 = DAT_00fd67fc; + uVar12 = uVar12 ^ (uVar12 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + DAT_00fd67fc = DAT_00fd6800; + fVar18 = (float)VectorSignedToFloat(uVar12 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + if (((int)(fVar18 * DAT_00677d7c * 3.0) == 0) && (DAT_00fe1f7b == '\0')) { + DAT_00fd6800 = uVar12; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x20); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + DAT_00fd67fc = uVar12; + uVar6 = DAT_00fd6800; + if (local_8c != 0) { + uVar14 = uVar14 ^ uVar14 << 0xb; + DAT_00fd67f4 = uVar13; + DAT_00fd67fc = uVar14 ^ (uVar14 ^ uVar12 >> 0xb) >> 8 ^ uVar12; + DAT_00fd67f8 = DAT_00fd6800; + fVar18 = (float)VectorSignedToFloat(DAT_00fd67fc & 0x7fffffff, + (byte)(in_fpscr >> 0x16) & 3); + uVar14 = uVar13; + uVar6 = uVar12; + uVar13 = DAT_00fd6800; + if ((int)(fVar18 * DAT_00677d7c * 4.0) == 0) { + DAT_00fd6800 = DAT_00fd67fc; + DAT_00fd67fc = uVar12; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x21); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + DAT_00fd67f4 = uVar14; + DAT_00fd67f8 = uVar13; + DAT_00fd6800 = DAT_00fd67fc; + if (bVar3) { + uVar14 = uVar14 ^ uVar14 << 0xb; + DAT_00fd6800 = uVar14 ^ (uVar14 ^ DAT_00fd67fc >> 0xb) >> 8 ^ DAT_00fd67fc; + fVar18 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff, + (byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67f4 = uVar13; + DAT_00fd67f8 = uVar6; + uVar6 = DAT_00fd67fc; + if ((int)(fVar18 * DAT_00677d7c * 4.0) == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x22); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + DAT_00fd67fc = uVar6; + uVar12 = DAT_00fd67f8; + uVar14 = DAT_00fd67fc; + uVar13 = DAT_00fd6800; + if (local_98 != 0) { + uVar12 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + uVar13 = uVar12 ^ (uVar12 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar18 = (float)VectorSignedToFloat(uVar13 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67f4 = DAT_00fd67f8; + uVar12 = DAT_00fd67fc; + uVar14 = DAT_00fd6800; + if ((int)(fVar18 * DAT_00677d7c * 4.0) == 0) { + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = uVar13; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x23); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + DAT_00fd6800 = uVar13; + DAT_00fd67fc = uVar14; + DAT_00fd67f8 = uVar12; + fVar18 = (float)VectorSignedToFloat((int)*(short *)(extraout_r2 + 0x5d00), + (byte)(in_fpscr >> 0x16) & 3); + fVar19 = (float)VectorSignedToFloat((int)*(short *)(extraout_r2 + 0x5d02), + (byte)(in_fpscr >> 0x16) & 3); + in_fpscr = in_fpscr & 0xfffffff; + if (fVar18 * DAT_00677d78 <= fVar19) { + dVar21 = (double)VectorSignedToFloat((int)*(short *)(extraout_r2 + 0x5d00), + (byte)(in_fpscr >> 0x16) & 3); + dVar20 = (double)VectorSignedToFloat((int)*(short *)(extraout_r2 + 0x5d02), + (byte)(in_fpscr >> 0x16) & 3); + if (dVar21 * DAT_00677d70 <= dVar20) { + iVar11 = FUN_00608330(&DAT_00fd67f4,4); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x30); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x31); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 2) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x32); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x33); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + else { + iVar11 = FUN_00608330(&DAT_00fd67f4,7); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x29); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x2a); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 2) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x2b); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 3) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x2c); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 4) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x2d); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 5) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x2e); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x2f); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + } + else { + uVar12 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + uVar12 = uVar12 ^ (uVar12 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar18 = (float)VectorSignedToFloat(uVar12 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + iVar11 = (int)(fVar18 * DAT_00677d7c * 5.0); + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + if (iVar11 == 0) { + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = uVar12; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x24); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = uVar12; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x25); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 2) { + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = uVar12; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x26); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 3) { + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = uVar12; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x27); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = uVar12; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x28); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + } + } + else { + uVar12 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + dVar21 = (double)VectorSignedToFloat((int)*(short *)(extraout_r2 + 0x5d02), + (byte)(in_fpscr >> 0x16) & 3); + dVar20 = (double)VectorSignedToFloat((int)*(short *)(extraout_r2 + 0x5d00), + (byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar12 = uVar12 ^ (uVar12 ^ DAT_00fd6800 >> 0xb) >> 8; + DAT_00fd67fc = DAT_00fd6800; + if (dVar20 * DAT_006779e4 <= dVar21) { + DAT_00fd6800 = uVar12 ^ DAT_00fd6800; + fVar18 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff, + (byte)((in_fpscr & 0xfffffff) >> 0x16) & 3); + iVar11 = (int)(fVar18 * DAT_006779e0 * 4.0); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x1c); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x1d); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 2) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x1e); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x1f); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + else { + DAT_00fd6800 = uVar12 ^ DAT_00fd6800; + fVar18 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff, + (byte)((in_fpscr & 0xfffffff) >> 0x16) & 3); + iVar11 = (int)(fVar18 * DAT_006779e0 * 3.0); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x19); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x1a); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x1b); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + } +LAB_00679f24: + puVar8 = auStack_cc; + goto LAB_00679f28; + } + if (iVar11 == 0x13) { + if ((DAT_00fe1f7b == '\0') || (DAT_010338d3 != '\0')) { + if (bVar5) { + DAT_00fd67f4 = DAT_00fd67f8; + uVar12 = uVar12 ^ uVar12 << 0xb; + DAT_00fd67f8 = DAT_00fd67fc; + uVar12 = uVar12 ^ (uVar12 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + DAT_00fd67fc = DAT_00fd6800; + fVar18 = (float)VectorSignedToFloat(uVar12 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd6800 = uVar12; + if ((int)(fVar18 * DAT_00678228 * 5.0) == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x3b); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + uVar12 = DAT_00fd67f8; + uVar14 = DAT_00fd67fc; + uVar13 = DAT_00fd6800; + if (bVar5) { + uVar12 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + uVar13 = uVar12 ^ (uVar12 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar18 = (float)VectorSignedToFloat(uVar13 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67f4 = DAT_00fd67f8; + uVar12 = DAT_00fd67fc; + uVar14 = DAT_00fd6800; + if ((int)(fVar18 * DAT_00678228 * 5.0) == 0) { + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = uVar13; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x3c); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + DAT_00fd6800 = uVar13; + DAT_00fd67fc = uVar14; + DAT_00fd67f8 = uVar12; + uVar12 = DAT_00fd67f8; + uVar14 = DAT_00fd67fc; + uVar13 = DAT_00fd6800; + if (local_9c != 0) { + uVar12 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + uVar13 = uVar12 ^ (uVar12 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar18 = (float)VectorSignedToFloat(uVar13 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67f4 = DAT_00fd67f8; + uVar12 = DAT_00fd67fc; + uVar14 = DAT_00fd6800; + if ((int)(fVar18 * DAT_00678228 * 5.0) == 0) { + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = uVar13; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x3d); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + DAT_00fd6800 = uVar13; + DAT_00fd67fc = uVar14; + DAT_00fd67f8 = uVar12; + uVar12 = DAT_00fd67f8; + uVar14 = DAT_00fd67fc; + uVar13 = DAT_00fd6800; + if (local_8c != 0) { + uVar12 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + uVar13 = uVar12 ^ (uVar12 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar18 = (float)VectorSignedToFloat(uVar13 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + if ((int)(fVar18 * DAT_00678228 * 5.0) == 0) { + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = uVar13; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x3e); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + uVar12 = DAT_00fd67fc; + uVar14 = DAT_00fd6800; + if (local_8c != 0) { + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = uVar13; + iVar11 = FUN_00608330(&DAT_00fd67f4,5); + uVar12 = DAT_00fd67f8; + uVar14 = DAT_00fd67fc; + uVar13 = DAT_00fd6800; + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x3f); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + } + DAT_00fd6800 = uVar13; + DAT_00fd67fc = uVar14; + DAT_00fd67f8 = uVar12; + if (DAT_010703e2 == '\0') { + iVar11 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x42); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x43); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x44); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + else { + iVar11 = FUN_00608330(&DAT_00fd67f4,2); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x40); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x41); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + } + else { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x3a); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + goto LAB_00679f24; + } + if (iVar11 == 0x14) { + uVar12 = DAT_01070468 ^ DAT_01070468 << 0xb; + DAT_01070468 = DAT_0107046c; + DAT_0107046c = DAT_01070470; + uVar12 = uVar12 ^ (uVar12 ^ DAT_01070474 >> 0xb) >> 8 ^ DAT_01070474; + DAT_01070470 = DAT_01070474; + fVar18 = (float)VectorSignedToFloat(uVar12 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_01070474 = uVar12; + if ((DAT_010338d3 != '\0') && ((int)(fVar18 * DAT_00678228 * 2.0) == 1)) { + FUN_00636b34(local_84); + local_7c = 1; + FUN_007aa754(auStack_54); + goto LAB_00679f6e; + } + if (DAT_00fe1f7a == '\0') { + uVar12 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar12 = uVar12 ^ (uVar12 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + DAT_00fd67fc = DAT_00fd6800; + fVar18 = (float)VectorSignedToFloat(uVar12 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd6800 = uVar12; + if ((int)(fVar18 * DAT_00678228 * 3.0) == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x45); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if (bVar3) { + iVar11 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x46); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if (local_70 != 0) { + iVar11 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x47); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if (local_6c != 0) { + iVar11 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x48); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if (local_94 != 0) { + iVar11 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xee); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if (DAT_010703e2 == '\0') { + iVar11 = FUN_00608330(&DAT_00fd67f4,5); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x4d); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x4e); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 2) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x4f); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 3) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x50); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x51); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + else { + iVar11 = FUN_00608330(&DAT_00fd67f4,4); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x49); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x4a); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 2) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x4b); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x4c); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + goto LAB_00679f24; + } + if (iVar11 == 0x25) { + if (DAT_010703e0 == '\0') { + if ((*(short *)(extraout_r2 + 0x5d00) < 300) || (*(short *)(extraout_r2 + 0x5cfa) < 10)) { + iVar11 = FUN_00608330(&DAT_00fd67f4,4); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x55); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x56); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 2) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x57); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x58); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + else { + iVar11 = FUN_00608330(&DAT_00fd67f4,4); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x59); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x5a); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 2) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x5b); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x5c); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + } + else { + iVar11 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x52); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x53); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x54); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + goto LAB_00679f24; + } + if (iVar11 == 0x26) { + if (DAT_00fe1f7a == '\0') { + iVar11 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x5d); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + FUN_007aa754(auStack_cc); + } + } + if (DAT_010703e2 == '\0') { + if (bVar3) { + iVar11 = FUN_00608330(&DAT_00fd67f4,5); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x61); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + iVar11 = FUN_00608330(&DAT_00fd67f4,5); + if (iVar11 != 0) goto LAB_006787f8; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x62); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + else { +LAB_006787f8: + if (bVar5) { + iVar11 = FUN_00608330(&DAT_00fd67f4,4); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,99); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if (local_9c != 0) { + iVar11 = FUN_00608330(&DAT_00fd67f4,4); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,100); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if (DAT_010703e0 == '\0') { + iVar11 = FUN_00608330(&DAT_00fd67f4,4); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x65); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x66); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 2) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x67); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x68); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + else { + iVar11 = FUN_00608330(&DAT_00fd67f4,5); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x69); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x6a); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 2) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x6b); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 3) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x6c); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x6d); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + } + } + else { + iVar11 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x5e); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x5f); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x60); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + goto LAB_00679f24; + } + if (iVar11 == 0x36) { + if (!bVar2) { + iVar11 = FUN_00608330(&DAT_00fd67f4,2); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x6e); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if (local_94 != 0) { + iVar11 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xed); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if (DAT_010703e2 == '\0') { + if (bVar5) { + iVar11 = FUN_00608330(&DAT_00fd67f4,4); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x70); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if (*(short *)(extraout_r2 + 0x5c98) == 0x18) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x71); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + iVar11 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x72); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x73); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 2) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x74); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 3) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x75); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 4) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x76); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x77); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + } + else { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x6f); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + goto LAB_00679f24; + } + if (iVar11 == 0x69) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x78); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + if (iVar11 == 0x6b) { + if (*(char *)((int)local_68 + 0x119) == '\0') { + if (bVar2) { + iVar11 = FUN_00608330(&DAT_00fd67f4,4); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x7e); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if (DAT_010703e0 == '\0') { + iVar11 = FUN_00608330(&DAT_00fd67f4,5); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x7f); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x80); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 2) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x81); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 3) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x82); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x83); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + else { + iVar11 = FUN_00608330(&DAT_00fd67f4,5); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x84); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x85); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 2) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x86); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 3) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x87); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x88); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + } + else { + iVar11 = FUN_00608330(&DAT_00fd67f4,5); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x79); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x7a); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 2) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x7b); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 3) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x7c); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x7d); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + goto LAB_00679f24; + } + if (iVar11 == 0x6a) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x89); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + if (iVar11 != 0x6c) { + if (iVar11 == 0x7b) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x9c); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 0x7c) { + if (*(char *)((int)local_68 + 0x119) == '\0') { + if (DAT_010703e2 == '\0') { + if (local_90 != 0) { + iVar11 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xa5); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if (bVar3) { + iVar11 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xa6); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + iVar11 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xa7); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xa8); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xa9); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + else { + iVar11 = FUN_00608330(&DAT_00fd67f4,4); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xa1); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xa2); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 2) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xa3); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xa4); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + } + else { + iVar11 = FUN_00608330(&DAT_00fd67f4,4); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x9d); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x9e); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 2) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x9f); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xa0); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + } + else if (iVar11 == 0x16) { + if (DAT_010703e2 == '\0') { + if (DAT_010703e0 == '\0') { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xad); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + iVar11 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xae); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xaf); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xb0); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + } + else { + iVar11 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xaa); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xab); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xac); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + } + else if (iVar11 == 0x8e) { + iVar11 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xe0); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xe1); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + if (iVar11 != 2) goto LAB_00679f2c; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xe2); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + else if (iVar11 == 0xa0) { + iVar11 = FUN_00608330(&DAT_00fd67f4,6); + if (local_9c != 0) { + iVar10 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar10 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xe8); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if (local_80 != 0) { + iVar10 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar10 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xec); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xe7); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xe9); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 2) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xea); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 3) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xeb); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 4) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xf0); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + if (iVar11 != 5) goto LAB_00679f2c; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xf1); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + else if (iVar11 == 0xb2) { + iVar11 = FUN_00608330(&DAT_00fd67f4,5); + if (DAT_010703e2 != '\0') { + iVar10 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar10 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xf5); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if (local_74 != 0) { + iVar10 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar10 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xf6); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if (bVar4) { + iVar10 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar10 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xf7); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xf2); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xf3); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 2) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xf4); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 3) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xf8); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + if (iVar11 != 4) goto LAB_00679f2c; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xf9); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + else if (iVar11 == 0xcf) { + iVar11 = FUN_00608330(&DAT_00fd67f4,3); + if (bVar4) { + iVar10 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar10 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x104); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x101); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x102); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + if (iVar11 != 2) goto LAB_00679f2c; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x103); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + else if (iVar11 == 0xd0) { + iVar11 = FUN_00608330(&DAT_00fd67f4,7); + if (*(char *)(extraout_r2 + 0xdb) != '\0') { + iVar10 = FUN_00608330(&DAT_00fd67f4,5); + if (iVar10 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x10c); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x109); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x10a); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 2) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x10b); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 3) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x10d); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 4) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x10e); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 5) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x10f); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + if (iVar11 != 6) goto LAB_00679f2c; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x110); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + else if (iVar11 == 0xd1) { + iVar11 = FUN_00608330(&DAT_00fd67f4,5); + if (bVar4) { + iVar10 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar10 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x11c); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if (local_88 != 0) { + iVar10 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar10 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x11b); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x118); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x119); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 2) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x11a); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 3) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x11d); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + if (iVar11 != 4) goto LAB_00679f2c; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x11e); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + else if (iVar11 == 0xe3) { + iVar11 = FUN_00608330(&DAT_00fd67f4,5); + if (DAT_010338d3 != '\0') { + iVar10 = FUN_00608330(&DAT_00fd67f4,7); + if (iVar10 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xfa); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if (local_78 != 0) { + iVar10 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar10 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xfb); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xfc); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xfd); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 2) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xfe); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 3) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0xff); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + if (iVar11 != 4) goto LAB_00679f2c; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x100); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + else if (iVar11 == 0xe4) { + iVar11 = FUN_00608330(&DAT_00fd67f4,3); + if (bVar5) { + iVar10 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar10 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x107); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x105); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x106); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + if (iVar11 != 2) goto LAB_00679f2c; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x108); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + else { + if (iVar11 != 0xe5) goto LAB_00679f2c; + iVar11 = FUN_00608330(&DAT_00fd67f4,6); + if (*(char *)(extraout_r2 + 0xdb) == '\0') { + iVar10 = FUN_00608330(&DAT_00fd67f4,5); + if (iVar10 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x114); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x111); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x112); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 2) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x113); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 3) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x115); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 4) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x116); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + if (iVar11 != 5) goto LAB_00679f2c; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x117); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + goto LAB_00679f24; + } + if (*(char *)((int)local_68 + 0x119) == '\0') { + if ((*(char *)(extraout_r2 + 0xdb) != '\0') && (local_98 != 0)) { + iVar11 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x8e); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if ((*(char *)(extraout_r2 + 0xdb) != '\0') && (iVar16 != 0)) { + iVar11 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x8f); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if ((*(char *)(extraout_r2 + 0xdb) != '\0') && (local_90 != 0)) { + iVar11 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x90); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if ((*(char *)(extraout_r2 + 0xdb) == '\0') && (bVar5)) { + iVar11 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x91); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if ((*(char *)(extraout_r2 + 0xdb) == '\0') && (bVar2)) { + iVar11 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x92); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if ((*(char *)(extraout_r2 + 0xdb) == '\0') && (local_9c != 0)) { + iVar11 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x93); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } + if (DAT_010703e0 == '\0') { + iVar11 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x94); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x95); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + if (iVar11 != 2) goto LAB_00679f2c; + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x96); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + else { + iVar11 = FUN_00608330(&DAT_00fd67f4,5); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x97); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 1) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x98); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 2) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x99); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else if (iVar11 == 3) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x9a); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x9b); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + } + goto LAB_00679f24; + } + iVar11 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar11 == 0) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x8a); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + if (iVar11 == 1) { + if (*(char *)(extraout_r2 + 0xdb) == '\0') { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x8b); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + else { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x8c); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + } + goto LAB_00679f24; + } + if (iVar11 == 2) { + uVar7 = FUN_0063a50c(auStack_cc,extraout_r2,0x8d); + FUN_007aa80c(auStack_54,auStack_fc,uVar7); + FUN_007aa754(auStack_fc); + goto LAB_00679f24; + } + } +LAB_00679f2c: + puVar9 = local_84; + *(undefined4 *)(local_84 + 0x14) = 0xf; + *(undefined4 *)(local_84 + 0x10) = 0; + *local_84 = 0; + FUN_0041bae0(local_84,auStack_54,0,0xffffffff); + *(undefined4 *)(puVar9 + 0x2c) = 7; + *(undefined4 *)(puVar9 + 0x28) = 0; + *(undefined2 *)(puVar9 + 0x18) = 0; + FUN_00425168(puVar9 + 0x18,auStack_3c,0,0xffffffff); + local_7c = 1; + FUN_007aa754(auStack_54); +LAB_00679f6e: + FUN_007ffb98(puVar9); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006921b0.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006921b0.c new file mode 100644 index 000000000..9abd66c7e --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006921b0.c @@ -0,0 +1,95 @@ + +void FUN_006921b0(int param_1,int param_2,undefined4 param_3,undefined4 param_4) + +{ + float fVar1; + undefined1 uVar2; + int iVar3; + int iVar4; + int iVar5; + uint in_fpscr; + float fVar6; + undefined4 uVar7; + undefined4 uVar8; + + uVar7 = 0xfffffffe; + uVar8 = 0xfffffffe; + iVar3 = FUN_00735520(); + if (((iVar3 == 0) || (DAT_00fe1f86 != '\0')) || (DAT_010703e6 < 6)) { + iVar5 = 0; + iVar3 = DAT_00fe1fa8; + do { + if (*(char *)(iVar3 + 0x100) == '\0') { + if (0xc3 < iVar5) { + return; + } + FUN_00684770(iVar5 * 0x274 + DAT_00fe1fa8,0x2e,iVar3,0,uVar7,uVar8,param_4); + iVar3 = iVar5 * 0x274 + DAT_00fe1fa8; + param_1 = param_1 - (uint)(*(ushort *)(iVar3 + 0x168) >> 1); + *(int *)(iVar3 + 0x148) = param_1; + uVar7 = VectorSignedToFloat(param_1,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar3 + 0x138) = uVar7; + iVar3 = iVar5 * 0x274 + DAT_00fe1fa8; + param_2 = param_2 - (uint)*(ushort *)(iVar3 + 0x16a); + *(int *)(iVar3 + 0x14c) = param_2; + uVar7 = VectorSignedToFloat(param_2,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar3 + 0x13c) = uVar7; + *(undefined1 *)(iVar5 * 0x274 + DAT_00fe1fa8 + 0x100) = 1; + *(undefined4 *)(iVar5 * 0x274 + DAT_00fe1fa8 + 0x198) = 0x2ee; + iVar3 = iVar5 * 0x274 + DAT_00fe1fa8; + uVar2 = FUN_0060a19c(iVar3 + 0x138,*(undefined2 *)(iVar3 + 0x168), + *(undefined2 *)(iVar3 + 0x16a)); + *(undefined1 *)(iVar5 * 0x274 + DAT_00fe1fa8 + 100) = uVar2; + FUN_00649e08(iVar5,1); + return; + } + iVar5 = iVar5 + 1; + iVar3 = iVar3 + 0x274; + } while (iVar5 < 0xc4); + } + else { + iVar5 = 0xc4; + iVar4 = 0; + iVar3 = DAT_00fe1fa8; + do { + if (*(char *)(iVar3 + 0x100) == '\0') { + iVar5 = iVar4; + if (iVar4 < 0xc4) { + FUN_00684770(iVar4 * 0x274 + DAT_00fe1fa8,0x400,iVar3,0,uVar7,uVar8,param_4); + iVar3 = iVar4 * 0x274 + DAT_00fe1fa8; + param_1 = param_1 - (uint)(*(ushort *)(iVar3 + 0x168) >> 1); + *(int *)(iVar3 + 0x148) = param_1; + uVar7 = VectorSignedToFloat(param_1,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar3 + 0x138) = uVar7; + iVar3 = iVar4 * 0x274 + DAT_00fe1fa8; + param_2 = param_2 - (uint)*(ushort *)(iVar3 + 0x16a); + *(int *)(iVar3 + 0x14c) = param_2; + uVar7 = VectorSignedToFloat(param_2,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar3 + 0x13c) = uVar7; + *(undefined1 *)(iVar4 * 0x274 + DAT_00fe1fa8 + 0x100) = 1; + *(undefined4 *)(iVar4 * 0x274 + DAT_00fe1fa8 + 0x198) = 0x2ee; + iVar3 = iVar4 * 0x274 + DAT_00fe1fa8; + uVar2 = FUN_0060a19c(iVar3 + 0x138,*(undefined2 *)(iVar3 + 0x168), + *(undefined2 *)(iVar3 + 0x16a)); + *(undefined1 *)(iVar4 * 0x274 + DAT_00fe1fa8 + 100) = uVar2; + FUN_00649e08(iVar4,1); + } + break; + } + iVar4 = iVar4 + 1; + iVar3 = iVar3 + 0x274; + } while (iVar4 < 0xc4); + fVar1 = DAT_006923dc; + iVar3 = iVar5 * 0x274 + DAT_00fe1fa8; + fVar6 = (float)VectorSignedToFloat(*(undefined4 *)(iVar3 + 0x19c),(byte)(in_fpscr >> 0x16) & 3); + *(int *)(iVar3 + 0x19c) = (int)(fVar6 * DAT_006923dc); + iVar3 = iVar5 * 0x274 + DAT_00fe1fa8; + fVar6 = (float)VectorSignedToFloat(*(undefined4 *)(iVar3 + 0x1b8),(byte)(in_fpscr >> 0x16) & 3); + *(int *)(iVar3 + 0x1b8) = (int)(fVar6 * fVar1); + iVar3 = iVar5 * 0x274 + DAT_00fe1fa8; + fVar6 = (float)VectorSignedToFloat(*(undefined4 *)(iVar3 + 0x1b4),(byte)(in_fpscr >> 0x16) & 3); + *(int *)(iVar3 + 0x1b4) = (int)(fVar6 * fVar1); + } + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/00694578.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/00694578.c new file mode 100644 index 000000000..c68597dc5 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/00694578.c @@ -0,0 +1,375 @@ + +int FUN_00694578(int *param_1) + +{ + bool bVar1; + uint uVar2; + uint uVar3; + char cVar4; + undefined1 uVar5; + int iVar6; + int iVar7; + uint uVar8; + int iVar9; + int iVar10; + int iVar11; + int iVar12; + uint in_fpscr; + undefined4 uVar13; + float fVar14; + undefined1 auStack_58 [52]; + + iVar12 = param_1[2]; + iVar7 = param_1[3]; + iVar10 = *param_1; + iVar11 = param_1[1]; + iVar9 = -1; + bVar1 = false; + if ((DAT_00fe1f8d != '\0') && (DAT_010338d3 != '\0')) { + bVar1 = true; + } + if (*(char *)((&DAT_0107034c)[param_1[6]] + 0xe5) != '\0') { + iVar9 = 0; + if (((*(char *)((DAT_00902934 * iVar12 + iVar7) * 0xe + DAT_00902928 + 8) == '^') || + (*(char *)((DAT_00902934 * iVar12 + iVar7) * 0xe + DAT_00902928 + 8) == '`')) || + (*(char *)((DAT_00902934 * iVar12 + iVar7) * 0xe + DAT_00902928 + 8) == 'b')) { + iVar9 = 1; + } + else if (((*(char *)((DAT_00902934 * iVar12 + iVar7) * 0xe + DAT_00902928 + 8) == '_') || + (*(char *)((DAT_00902934 * iVar12 + iVar7) * 0xe + DAT_00902928 + 8) == 'a')) || + (*(char *)((DAT_00902934 * iVar12 + iVar7) * 0xe + DAT_00902928 + 8) == 'c')) { + iVar9 = 2; + } + if (DAT_00fe1f7b == '\0') { + iVar9 = 0xc4; + iVar12 = 0; + iVar7 = DAT_00fe1fa8; + do { + if (*(char *)(iVar7 + 0x100) == '\0') { + if (0xc3 < iVar12) { + return iVar12; + } + FUN_00684770(iVar12 * 0x274 + DAT_00fe1fa8,0x44); + iVar9 = iVar12 * 0x274 + DAT_00fe1fa8; + iVar10 = iVar10 - (uint)(*(ushort *)(iVar9 + 0x168) >> 1); + *(int *)(iVar9 + 0x148) = iVar10; + uVar13 = VectorSignedToFloat(iVar10,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar9 + 0x138) = uVar13; + iVar9 = iVar12 * 0x274 + DAT_00fe1fa8; + iVar11 = iVar11 - (uint)*(ushort *)(iVar9 + 0x16a); + *(int *)(iVar9 + 0x14c) = iVar11; + uVar13 = VectorSignedToFloat(iVar11,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar9 + 0x13c) = uVar13; + *(undefined1 *)(iVar12 * 0x274 + DAT_00fe1fa8 + 0x100) = 1; + *(undefined4 *)(iVar12 * 0x274 + DAT_00fe1fa8 + 0x198) = 0x2ee; + iVar9 = iVar12 * 0x274 + DAT_00fe1fa8; + uVar5 = FUN_0060a19c(iVar9 + 0x138,*(undefined2 *)(iVar9 + 0x168), + *(undefined2 *)(iVar9 + 0x16a)); + *(undefined1 *)(iVar12 * 0x274 + DAT_00fe1fa8 + 100) = uVar5; + FUN_00649e08(iVar12,1); + return iVar12; + } + iVar12 = iVar12 + 1; + iVar7 = iVar7 + 0x274; + } while (iVar12 < 0xc4); + } + else if (((DAT_00fe1f82 == '\0') && (*(char *)((int)param_1 + 0x11) == '\0')) && + ((iVar6 = FUN_00608330(&DAT_00fd67f4,5), iVar6 == 0 && + ((DAT_01033960 < iVar7 && (iVar6 = FUN_00656370(0x7b), iVar6 == 0)))))) { + iVar9 = FUN_00685550(iVar10,iVar11,0x7b,0); + } + else { + uVar3 = DAT_00fd67fc; + uVar2 = DAT_00fd67f8; + if (bVar1) { + uVar8 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar8 = DAT_00fd6800 ^ (uVar8 ^ DAT_00fd6800 >> 0xb) >> 8 ^ uVar8; + DAT_00fd67fc = DAT_00fd6800; + fVar14 = (float)VectorSignedToFloat(uVar8 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + if ((int)(fVar14 * DAT_006947f0 * DAT_006947ec) == 0) { + iVar7 = 0; + iVar9 = DAT_00fe1fa8; + do { + if (*(char *)(iVar9 + 0x100) == '\0') { + if (0xc3 < iVar7) { + DAT_00fd67f4 = uVar2; + DAT_00fd67f8 = uVar3; + DAT_00fd6800 = uVar8; + return iVar7; + } + DAT_00fd6800 = uVar8; + FUN_00684770(iVar7 * 0x274 + DAT_00fe1fa8,0x11f); + iVar9 = iVar7 * 0x274 + DAT_00fe1fa8; + iVar10 = iVar10 - (uint)(*(ushort *)(iVar9 + 0x168) >> 1); + *(int *)(iVar9 + 0x148) = iVar10; + uVar13 = VectorSignedToFloat(iVar10,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar9 + 0x138) = uVar13; + iVar9 = iVar7 * 0x274 + DAT_00fe1fa8; + iVar11 = iVar11 - (uint)*(ushort *)(iVar9 + 0x16a); + *(int *)(iVar9 + 0x14c) = iVar11; + uVar13 = VectorSignedToFloat(iVar11,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar9 + 0x13c) = uVar13; + *(undefined1 *)(iVar7 * 0x274 + DAT_00fe1fa8 + 0x100) = 1; + *(undefined4 *)(iVar7 * 0x274 + DAT_00fe1fa8 + 0x198) = 0x2ee; + iVar9 = iVar7 * 0x274 + DAT_00fe1fa8; + uVar5 = FUN_0060a19c(iVar9 + 0x138,*(undefined2 *)(iVar9 + 0x168), + *(undefined2 *)(iVar9 + 0x16a)); + *(undefined1 *)(iVar7 * 0x274 + DAT_00fe1fa8 + 100) = uVar5; + FUN_00649e08(iVar7,1); + return iVar7; + } + iVar7 = iVar7 + 1; + iVar9 = iVar9 + 0x274; + } while (iVar7 < 0xc4); + DAT_00fd67f4 = uVar2; + DAT_00fd67f8 = uVar3; + DAT_00fd6800 = uVar8; + return 0xc4; + } + DAT_00fd6800 = uVar8; + iVar6 = FUN_00608330(&DAT_00fd67f4,0x19); + if (iVar6 == 0) { + if ((iVar9 == 0) || (iVar7 = FUN_00608330(&DAT_00fd67f4,10), iVar7 == 0)) { + iVar7 = 0; + iVar9 = DAT_00fe1fa8; + do { + if (*(char *)(iVar9 + 0x100) == '\0') { + if (0xc3 < iVar7) { + return iVar7; + } + FUN_00684770(iVar7 * 0x274 + DAT_00fe1fa8,0x125); + iVar9 = iVar7 * 0x274 + DAT_00fe1fa8; + iVar10 = iVar10 - (uint)(*(ushort *)(iVar9 + 0x168) >> 1); + *(int *)(iVar9 + 0x148) = iVar10; + uVar13 = VectorSignedToFloat(iVar10,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar9 + 0x138) = uVar13; + iVar9 = iVar7 * 0x274 + DAT_00fe1fa8; + iVar11 = iVar11 - (uint)*(ushort *)(iVar9 + 0x16a); + *(int *)(iVar9 + 0x14c) = iVar11; + uVar13 = VectorSignedToFloat(iVar11,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar9 + 0x13c) = uVar13; + *(undefined1 *)(iVar7 * 0x274 + DAT_00fe1fa8 + 0x100) = 1; + *(undefined4 *)(iVar7 * 0x274 + DAT_00fe1fa8 + 0x198) = 0x2ee; + iVar9 = iVar7 * 0x274 + DAT_00fe1fa8; + uVar5 = FUN_0060a19c(iVar9 + 0x138,*(undefined2 *)(iVar9 + 0x168), + *(undefined2 *)(iVar9 + 0x16a)); + *(undefined1 *)(iVar7 * 0x274 + DAT_00fe1fa8 + 100) = uVar5; + FUN_00649e08(iVar7,1); + return iVar7; + } + iVar7 = iVar7 + 1; + iVar9 = iVar9 + 0x274; + } while (iVar7 < 0xc4); + return 0xc4; + } + if ((iVar9 != 1) && (iVar7 = FUN_00608330(&DAT_00fd67f4,10), iVar7 != 0)) { + if ((iVar9 != 2) && (iVar9 = FUN_00608330(&DAT_00fd67f4,10), iVar9 != 0)) { + return -1; + } + iVar7 = 0; + iVar9 = DAT_00fe1fa8; + do { + if (*(char *)(iVar9 + 0x100) == '\0') { + if (0xc3 < iVar7) { + return iVar7; + } + FUN_00684770(iVar7 * 0x274 + DAT_00fe1fa8,0x124); + iVar9 = iVar7 * 0x274 + DAT_00fe1fa8; + iVar10 = iVar10 - (uint)(*(ushort *)(iVar9 + 0x168) >> 1); + *(int *)(iVar9 + 0x148) = iVar10; + uVar13 = VectorSignedToFloat(iVar10,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar9 + 0x138) = uVar13; + iVar9 = iVar7 * 0x274 + DAT_00fe1fa8; + iVar11 = iVar11 - (uint)*(ushort *)(iVar9 + 0x16a); + *(int *)(iVar9 + 0x14c) = iVar11; + uVar13 = VectorSignedToFloat(iVar11,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar9 + 0x13c) = uVar13; + *(undefined1 *)(iVar7 * 0x274 + DAT_00fe1fa8 + 0x100) = 1; + *(undefined4 *)(iVar7 * 0x274 + DAT_00fe1fa8 + 0x198) = 0x2ee; + iVar9 = iVar7 * 0x274 + DAT_00fe1fa8; + uVar5 = FUN_0060a19c(iVar9 + 0x138,*(undefined2 *)(iVar9 + 0x168), + *(undefined2 *)(iVar9 + 0x16a)); + *(undefined1 *)(iVar7 * 0x274 + DAT_00fe1fa8 + 100) = uVar5; + FUN_00649e08(iVar7,1); + return iVar7; + } + iVar7 = iVar7 + 1; + iVar9 = iVar9 + 0x274; + } while (iVar7 < 0xc4); + return 0xc4; + } + iVar7 = 0; + iVar9 = DAT_00fe1fa8; + do { + if (*(char *)(iVar9 + 0x100) == '\0') { + if (0xc3 < iVar7) { + return iVar7; + } + FUN_00684770(iVar7 * 0x274 + DAT_00fe1fa8,0x123); + iVar9 = iVar7 * 0x274 + DAT_00fe1fa8; + iVar10 = iVar10 - (uint)(*(ushort *)(iVar9 + 0x168) >> 1); + *(int *)(iVar9 + 0x148) = iVar10; + uVar13 = VectorSignedToFloat(iVar10,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar9 + 0x138) = uVar13; + iVar9 = iVar7 * 0x274 + DAT_00fe1fa8; + iVar11 = iVar11 - (uint)*(ushort *)(iVar9 + 0x16a); + *(int *)(iVar9 + 0x14c) = iVar11; + uVar13 = VectorSignedToFloat(iVar11,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar9 + 0x13c) = uVar13; + *(undefined1 *)(iVar7 * 0x274 + DAT_00fe1fa8 + 0x100) = 1; + *(undefined4 *)(iVar7 * 0x274 + DAT_00fe1fa8 + 0x198) = 0x2ee; + iVar9 = iVar7 * 0x274 + DAT_00fe1fa8; + uVar5 = FUN_0060a19c(iVar9 + 0x138,*(undefined2 *)(iVar9 + 0x168), + *(undefined2 *)(iVar9 + 0x16a)); + *(undefined1 *)(iVar7 * 0x274 + DAT_00fe1fa8 + 100) = uVar5; + FUN_00649e08(iVar7,1); + return iVar7; + } + iVar7 = iVar7 + 1; + iVar9 = iVar9 + 0x274; + } while (iVar7 < 0xc4); + return 0xc4; + } + } + cVar4 = DAT_01033966; + if (bVar1) { + if ((((DAT_01033966 != '\0') && (iVar6 = FUN_00656370(0x122), iVar6 == 0)) && (iVar9 == 0)) + && (iVar6 = FUN_00608330(&DAT_00fd67f4,0x2d), iVar6 == 0)) { + iVar7 = 0; + iVar9 = DAT_00fe1fa8; + do { + if (*(char *)(iVar9 + 0x100) == '\0') { + if (0xc3 < iVar7) { + return iVar7; + } + FUN_00684770(iVar7 * 0x274 + DAT_00fe1fa8,0x122); + iVar9 = iVar7 * 0x274 + DAT_00fe1fa8; + iVar10 = iVar10 - (uint)(*(ushort *)(iVar9 + 0x168) >> 1); + *(int *)(iVar9 + 0x148) = iVar10; + uVar13 = VectorSignedToFloat(iVar10,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar9 + 0x138) = uVar13; + iVar9 = iVar7 * 0x274 + DAT_00fe1fa8; + iVar11 = iVar11 - (uint)*(ushort *)(iVar9 + 0x16a); + *(int *)(iVar9 + 0x14c) = iVar11; + uVar13 = VectorSignedToFloat(iVar11,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar9 + 0x13c) = uVar13; + *(undefined1 *)(iVar7 * 0x274 + DAT_00fe1fa8 + 0x100) = 1; + *(undefined4 *)(iVar7 * 0x274 + DAT_00fe1fa8 + 0x198) = 0x2ee; + iVar9 = iVar7 * 0x274 + DAT_00fe1fa8; + uVar5 = FUN_0060a19c(iVar9 + 0x138,*(undefined2 *)(iVar9 + 0x168), + *(undefined2 *)(iVar9 + 0x16a)); + *(undefined1 *)(iVar7 * 0x274 + DAT_00fe1fa8 + 100) = uVar5; + FUN_00649e08(iVar7,1); + return iVar7; + } + iVar7 = iVar7 + 1; + iVar9 = iVar9 + 0x274; + } while (iVar7 < 0xc4); + return 0xc4; + } + if (((cVar4 != '\0') && ((iVar9 == 1 || (iVar9 == 2)))) && + (iVar6 = FUN_00608330(&DAT_00fd67f4,0x1e), iVar6 == 0)) { + iVar9 = FUN_00685550(iVar10,iVar11,0x121,0); + return iVar9; + } + iVar6 = FUN_00608330(&DAT_00fd67f4,0x14); + if (iVar6 == 0) { + iVar7 = 0x119; + if (iVar9 == 0) { + iVar7 = 0x11b; + } + else if (iVar9 == 2) { + iVar7 = 0x11d; + } + iVar9 = FUN_00608330(&DAT_00fd67f4,2); + iVar12 = FUN_00656370(iVar9 + iVar7); + if (iVar12 != 0) { + return -1; + } + iVar9 = FUN_00685550(iVar10,iVar11,iVar9 + iVar7,0); + return iVar9; + } + iVar6 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar6 != 0) { + iVar7 = 0x10d; + if (iVar9 == 0) { + iVar7 = 0x111; + } + else if (iVar9 == 2) { + iVar7 = 0x115; + } + iVar9 = FUN_00608330(&DAT_00fd67f4,4); + iVar9 = FUN_00685550(iVar10,iVar11,iVar9 + iVar7,0); + return iVar9; + } + } + iVar6 = FUN_00608330(&DAT_00fd67f4,0x25); + if (iVar6 == 0) { + iVar9 = FUN_00685550(iVar10,iVar11,0x47,0); + } + else { + if (iVar9 == 1) { + iVar9 = FUN_00608330(&DAT_00fd67f4,4); + if ((iVar9 == 0) && (iVar9 = FUN_0065aaa8(iVar12,iVar7), iVar9 == 0)) { + iVar9 = FUN_00685550(iVar10,iVar11,0x46,0); + return iVar9; + } + } + else if ((iVar9 == 2) && (iVar9 = FUN_00608330(&DAT_00fd67f4,0xf), iVar9 == 0)) { + iVar9 = FUN_00685550(iVar10,iVar11,0x48,0); + return iVar9; + } + iVar9 = FUN_00608330(&DAT_00fd67f4,9); + if (iVar9 == 0) { + iVar9 = FUN_00608330(&DAT_01070468,4); + if (iVar9 == 0) { + uVar13 = 0x3f4; + } + else { + uVar13 = 0x22; + } + iVar9 = FUN_00685550(iVar10,iVar11,uVar13,0); + } + else { + iVar9 = FUN_00608330(&DAT_00fd67f4,7); + if (iVar9 == 0) { + iVar9 = FUN_00685550(iVar10,iVar11,0x20,0); + } + else { + iVar9 = FUN_00608330(&DAT_00fd67f4,5); + if (iVar9 == 0) { + iVar9 = FUN_00685550(iVar10,iVar11,0x126,0); + } + else if (iVar9 == 1) { + iVar9 = FUN_00685550(iVar10,iVar11,0x127,0); + } + else if (iVar9 == 2) { + iVar9 = FUN_00685550(iVar10,iVar11,0x128,0); + } + else { + iVar9 = FUN_00685550(iVar10,iVar11,0x1f,0); + iVar7 = FUN_00608330(&DAT_00fd67f4,4); + if (iVar7 == 0) { + FUN_007ab078(auStack_58,"Big Boned"); + FUN_0067a84c(iVar9 * 0x274 + DAT_00fe1fa8,auStack_58); + } + else { + iVar7 = FUN_00608330(&DAT_00fd67f4,5); + if (iVar7 != 0) { + return iVar9; + } + FUN_007ab078(auStack_58,"Short Bones"); + FUN_0067a84c(iVar9 * 0x274 + DAT_00fe1fa8,auStack_58); + } + FUN_007aa754(auStack_58); + } + } + } + } + } + } + return iVar9; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/00697314.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/00697314.c new file mode 100644 index 000000000..c81db32de --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/00697314.c @@ -0,0 +1,441 @@ + +void FUN_00697314(void) + +{ + bool bVar1; + bool bVar2; + bool bVar3; + bool bVar4; + bool bVar5; + undefined1 uVar6; + int iVar7; + int iVar8; + undefined4 uVar9; + uint uVar10; + int iVar11; + int *piVar12; + int iVar13; + int iVar14; + int iVar15; + int iVar16; + int iVar17; + int iVar18; + uint in_fpscr; + float fVar19; + int local_158; + int local_154; + int local_150; + int local_14c; + int local_148; + int local_144; + int local_140; + int local_13c; + int local_138; + int local_134; + int local_12c; + int local_124; + int local_120; + int local_118; + int local_114; + int local_110; + int local_10c; + int local_108; + int local_104; + undefined1 local_ec [16]; + undefined4 local_dc; + undefined4 local_d8; + undefined2 local_d4 [8]; + undefined4 local_c4; + undefined4 local_c0; + undefined4 local_bc; + undefined4 uStack_b8; + undefined1 auStack_b4 [48]; + undefined1 auStack_84 [24]; + undefined1 auStack_6c [24]; + undefined1 auStack_54 [48]; + + FUN_007ffb80(); + local_bc = 0xfffffffe; + uStack_b8 = 0xfffffffe; + iVar7 = FUN_007a7d34(); + if ((iVar7 == 0) && (DAT_00fe1f78 = DAT_00fe1f78 + 1, 0x1c1f < DAT_00fe1f78)) { + DAT_00fe1f78 = 0; + memset(&DAT_00fee0d0,0,0x405); + iVar7 = DAT_00697824; + DAT_00fe1f6c = 0; + local_158 = 0; + local_120 = 0; + local_118 = 0; + local_140 = 0; + local_148 = 0; + iVar8 = 0; + iVar17 = 0; + iVar16 = 0; + iVar18 = 0; + iVar14 = 0; + local_110 = 0; + local_138 = 0; + local_108 = 0; + local_12c = 0; + local_154 = 0; + local_10c = 0; + local_124 = 0; + local_13c = 0; + local_150 = 0; + local_144 = 0; + local_114 = 0; + local_134 = 0; + local_104 = 0; + local_14c = 0; + iVar13 = 0; + iVar15 = DAT_00fe1fa8; + do { + iVar11 = iVar13 + iVar15; + if ((*(char *)(iVar11 + 0x100) != '\0') && (*(char *)(iVar11 + 0x118) != '\0')) { + if ((*(int *)(iVar11 + 0x104) != 0x25) && (*(char *)(iVar11 + 0x119) == '\0')) { + FUN_0076098c(iVar14); + iVar8 = local_104; + iVar15 = DAT_00fe1fa8; + iVar18 = local_14c; + } + iVar11 = *(int *)(iVar13 + iVar15 + 0x104); + if (iVar11 < 0x26) { + if (iVar11 == 0x25) { + iVar8 = iVar8 + 1; + local_104 = iVar8; + } + else { + switch(iVar11) { + case 0x11: + local_158 = local_158 + 1; + break; + case 0x12: + local_120 = local_120 + 1; + break; + case 0x13: + local_140 = local_140 + 1; + break; + case 0x14: + local_118 = local_118 + 1; + break; + case 0x16: + local_148 = local_148 + 1; + } + } + } + else if (iVar11 < 0xb3) { + if (iVar11 == 0xb2) { + local_10c = local_10c + 1; + } + else if (iVar11 < 0x6d) { + if (iVar11 == 0x6c) { + local_110 = local_110 + 1; + } + else if (iVar11 == 0x26) { + iVar17 = iVar17 + 1; + } + else if (iVar11 == 0x36) { + iVar16 = iVar16 + 1; + } + else if (iVar11 == 0x6b) { + local_138 = local_138 + 1; + } + } + else if (iVar11 == 0x7c) { + local_108 = local_108 + 1; + } + else if (iVar11 == 0x8e) { + local_12c = local_12c + 1; + } + else if (iVar11 == 0xa0) { + local_154 = local_154 + 1; + } + } + else { + switch(iVar11) { + case 0xcf: + local_124 = local_124 + 1; + break; + case 0xd0: + local_13c = local_13c + 1; + break; + case 0xd1: + local_150 = local_150 + 1; + break; + case 0xe3: + local_144 = local_144 + 1; + break; + case 0xe4: + local_114 = local_114 + 1; + break; + case 0xe5: + local_134 = local_134 + 1; + } + } + iVar18 = iVar18 + 1; + local_14c = iVar18; + } + iVar13 = iVar13 + 0x274; + iVar14 = iVar14 + 1; + } while (iVar13 < iVar7); + if (DAT_00fe1f6c == 0) { + bVar2 = false; + iVar7 = 0; + bVar3 = false; + bVar4 = false; + bVar5 = false; + iVar8 = 4; + piVar12 = &DAT_0107034c; + do { + iVar15 = *piVar12; + if (*(char *)(iVar15 + 0x5cc5) != '\0') { + iVar13 = 0x30; + iVar18 = iVar15; + do { + iVar14 = *(int *)(iVar18 + 0x94c); + if ((0 < iVar14) && (iVar11 = (int)*(short *)(iVar18 + 0x98a), 0 < iVar11)) { + if (iVar14 == 0x47) { + iVar7 = iVar7 + iVar11; + } + else if (iVar14 == 0x48) { + iVar7 = iVar11 * 100 + iVar7; + } + else if (iVar14 == 0x49) { + iVar7 = iVar11 * 10000 + iVar7; + } + else if (iVar14 == 0x4a) { + iVar7 = iVar11 * DAT_00697820 + iVar7; + } + if ((*(short *)(iVar18 + 0x9ce) == 0xe) || (*(short *)(iVar18 + 0x9d0) == 0xe)) { + bVar4 = true; + } + if ((((iVar14 == 0xa6) || (iVar14 == 0xa7)) || (iVar14 == 0xa8)) || (iVar14 == 0xeb)) + { + bVar5 = true; + } + if ((*(char *)(iVar18 + 0x97f) != '\0') || (iVar14 - 0x453U < 0xe)) { + bVar2 = true; + } + } + iVar18 = iVar18 + 0xa0; + iVar13 = iVar13 + -1; + } while (iVar13 != 0); + iVar18 = (int)((ulonglong) + ((longlong)(int)*(short *)(iVar15 + 0x5d00) * (longlong)DAT_0069781c) >> + 0x20); + if (5 < (iVar18 >> 3) - (iVar18 >> 0x1f)) { + bVar3 = true; + } + if (!bVar2) { + if ((0 < *(short *)(iVar15 + 0x282a)) && (*(char *)(iVar15 + 0x281f) != '\0')) { + bVar2 = true; + } + if ((0 < *(short *)(iVar15 + 0x28ca)) && (*(char *)(iVar15 + 0x28bf) != '\0')) { + bVar2 = true; + } + if ((0 < *(short *)(iVar15 + 0x296a)) && (*(char *)(iVar15 + 0x295f) != '\0')) { + bVar2 = true; + } + } + } + iVar8 = iVar8 + -1; + piVar12 = piVar12 + 1; + } while (iVar8 != 0); + if ((DAT_00fe1f7b == '\0') && (local_104 == 0)) { + iVar15 = 0xc4; + iVar18 = (int)DAT_01033964; + iVar13 = (int)DAT_01033968; + iVar14 = 0; + iVar8 = DAT_00fe1fa8; + do { + if (*(char *)(iVar8 + 0x100) == '\0') { + iVar15 = iVar14; + if (iVar14 < 0xc4) { + FUN_00684770(iVar14 * 0x274 + DAT_00fe1fa8,0x25); + iVar8 = iVar14 * 0x274 + DAT_00fe1fa8; + iVar13 = (iVar13 * 0x10 + 8) - (uint)(*(ushort *)(iVar8 + 0x168) >> 1); + *(int *)(iVar8 + 0x148) = iVar13; + uVar9 = VectorSignedToFloat(iVar13,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar8 + 0x138) = uVar9; + iVar8 = iVar14 * 0x274 + DAT_00fe1fa8; + iVar18 = iVar18 * 0x10 - (uint)*(ushort *)(iVar8 + 0x16a); + *(int *)(iVar8 + 0x14c) = iVar18; + uVar9 = VectorSignedToFloat(iVar18,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar8 + 0x13c) = uVar9; + *(undefined1 *)(iVar14 * 0x274 + DAT_00fe1fa8 + 0x100) = 1; + *(undefined4 *)(iVar14 * 0x274 + DAT_00fe1fa8 + 0x198) = 0x2ee; + iVar8 = iVar14 * 0x274 + DAT_00fe1fa8; + uVar6 = FUN_0060a19c(iVar8 + 0x138,*(undefined2 *)(iVar8 + 0x168), + *(undefined2 *)(iVar8 + 0x16a)); + *(undefined1 *)(iVar14 * 0x274 + DAT_00fe1fa8 + 100) = uVar6; + FUN_00649e08(iVar14,1); + } + break; + } + iVar14 = iVar14 + 1; + iVar8 = iVar8 + 0x274; + } while (iVar14 < 0xc4); + *(undefined1 *)(iVar15 * 0x274 + DAT_00fe1fa8 + 0x119) = 0; + *(short *)(iVar15 * 0x274 + DAT_00fe1fa8 + 0x1f2) = DAT_01033968; + *(short *)(iVar15 * 0x274 + DAT_00fe1fa8 + 500) = DAT_01033964; + } + uVar10 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar10 = DAT_00fd6800 ^ (uVar10 ^ DAT_00fd6800 >> 0xb) >> 8 ^ uVar10; + DAT_00fd67fc = DAT_00fd6800; + fVar19 = (float)VectorSignedToFloat(uVar10 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + bVar1 = (int)(fVar19 * DAT_00697818 * DAT_00697814) != 0; + if (local_148 < 1) { + DAT_00fee0e6 = 1; + } + if ((5000 < iVar7) && (local_158 < 1)) { + DAT_00fee0e1 = 1; + } + if (((bVar3) && (local_120 < 1)) && (0 < local_158)) { + DAT_00fee0e2 = 1; + } + if ((bVar4) && (local_140 < 1)) { + DAT_00fee0e3 = 1; + } + if ((((DAT_00fe1f73 != '\0') || (DAT_00fe1f7a != '\0')) || (DAT_00fe1f7b != '\0')) && + (local_118 < 1)) { + DAT_00fee0e4 = 1; + } + if (((bVar5) && (0 < local_158)) && (iVar17 < 1)) { + DAT_00fee0f6 = 1; + } + if ((DAT_00fe1f7b != '\0') && (iVar16 < 1)) { + DAT_00fee106 = 1; + } + if ((DAT_00fe1f7e != '\0') && (local_138 < 1)) { + DAT_00fee13b = 1; + } + if ((DAT_00fe1f7f != '\0') && (local_110 < 1)) { + DAT_00fee13c = 1; + } + if ((DAT_00fe1f82 != '\0') && (local_108 < 1)) { + DAT_00fee14c = 1; + } + DAT_00fd6800 = uVar10; + if (((DAT_00fe1f84 != '\0') && (local_12c < 1)) && (iVar8 = FUN_0073542c(), iVar8 != 0)) { + DAT_00fee15e = 1; + } + if ((DAT_00fe1f8b != '\0') && (local_10c < 1)) { + DAT_00fee182 = 1; + } + if ((bVar2) && (local_124 < 1)) { + DAT_00fee19f = 1; + } + if ((DAT_00fe1f8c != '\0') && (local_114 < 1)) { + DAT_00fee1b4 = 1; + } + if ((DAT_00fe1f87 != '\0') && (local_134 < 1)) { + DAT_00fee1b5 = 1; + } + if ((local_154 < 1) && (DAT_010338d3 != '\0')) { + DAT_00fee170 = 1; + } + if (((DAT_010338d3 != '\0') && (DAT_00fe1f8d != '\0')) && (local_150 < 1)) { + DAT_00fee1a1 = 1; + } + if ((3 < local_14c) && (local_144 < 1)) { + DAT_00fee1b3 = 1; + } + if (((!bVar1) && (local_13c < 1)) && (7 < local_14c)) { + DAT_00fee1a0 = 1; + } + if ((local_148 < 1) && (DAT_00fee0e6 = 1, DAT_00fe1f6c == 0)) { + DAT_00fe1f6c = 0x16; + } + if (((5000 < iVar7) && (local_158 < 1)) && (DAT_00fee0e1 = 1, DAT_00fe1f6c == 0)) { + DAT_00fe1f6c = 0x11; + } + if (((bVar3) && (local_120 < 1)) && ((0 < local_158 && (DAT_00fee0e2 = 1, DAT_00fe1f6c == 0))) + ) { + DAT_00fe1f6c = 0x12; + } + if (((bVar4) && (local_140 < 1)) && (DAT_00fee0e3 = 1, DAT_00fe1f6c == 0)) { + DAT_00fe1f6c = 0x13; + } + if ((local_118 < 1) && + ((((DAT_00fe1f73 != '\0' || (DAT_00fe1f7a != '\0')) || (DAT_00fe1f7b != '\0')) && + (DAT_00fee0e4 = 1, DAT_00fe1f6c == 0)))) { + DAT_00fe1f6c = 0x14; + } + if (((bVar5) && (0 < local_158)) && ((iVar17 < 1 && (DAT_00fee0f6 = 1, DAT_00fe1f6c == 0)))) { + DAT_00fe1f6c = 0x26; + } + if (((DAT_00fe1f7b != '\0') && (iVar16 < 1)) && (DAT_00fee106 = 1, DAT_00fe1f6c == 0)) { + DAT_00fe1f6c = 0x36; + } + if (((DAT_00fe1f7e != '\0') && (local_138 < 1)) && (DAT_00fee13b = 1, DAT_00fe1f6c == 0)) { + DAT_00fe1f6c = 0x6b; + } + if (((DAT_00fe1f7f != '\0') && (local_110 < 1)) && (DAT_00fee13c = 1, DAT_00fe1f6c == 0)) { + DAT_00fe1f6c = 0x6c; + } + if (((DAT_00fe1f82 != '\0') && (local_108 < 1)) && (DAT_00fee14c = 1, DAT_00fe1f6c == 0)) { + DAT_00fe1f6c = 0x7c; + } + if ((((DAT_00fe1f84 != '\0') && (local_12c < 1)) && (iVar7 = FUN_0073542c(), iVar7 != 0)) && + (DAT_00fee15e = 1, DAT_00fe1f6c == 0)) { + DAT_00fe1f6c = 0x8e; + } + if (((DAT_00fe1f8b != '\0') && (local_10c < 1)) && (DAT_00fee182 = 1, DAT_00fe1f6c == 0)) { + DAT_00fe1f6c = 0xb2; + } + if (((bVar2) && (local_124 < 1)) && (DAT_00fee19f = 1, DAT_00fe1f6c == 0)) { + DAT_00fe1f6c = 0xcf; + } + if (((DAT_00fe1f8c != '\0') && (local_114 < 1)) && (DAT_00fee1b4 = 1, DAT_00fe1f6c == 0)) { + DAT_00fe1f6c = 0xe4; + } + if (((DAT_00fe1f87 != '\0') && (local_134 < 1)) && (DAT_00fee1b5 = 1, DAT_00fe1f6c == 0)) { + DAT_00fe1f6c = 0xe5; + } + if (DAT_010338d3 != '\0') { + if ((local_154 < 1) && (DAT_00fee170 = 1, DAT_00fe1f6c == 0)) { + DAT_00fe1f6c = 0xa0; + } + if ((((DAT_010338d3 != '\0') && (DAT_00fe1f8d != '\0')) && (local_150 < 1)) && + (DAT_00fee1a1 = 1, DAT_00fe1f6c == 0)) { + DAT_00fe1f6c = 0xd1; + } + } + if (((3 < local_14c) && (local_144 < 1)) && (DAT_00fee1b3 = 1, DAT_00fe1f6c == 0)) { + DAT_00fe1f6c = 0xe3; + } + if (((bVar1) || (local_14c < 8)) || (0 < local_13c)) { + if (DAT_00fe1f6c == 0) goto LAB_00697cc4; + } + else { + DAT_00fee1a0 = 1; + if (DAT_00fe1f6c == 0) { + DAT_00fe1f6c = 0xd0; + } + } + } + FUN_007ab35c(auStack_54,&DAT_00821498,&DAT_00fdb658); + FUN_007ab078(auStack_84,&DAT_0080ed7b); + uVar9 = FUN_007ab4d4(&DAT_00fe1fb0 + DAT_00fe1f6c * 0x30,auStack_b4,auStack_54); + FUN_007aa80c(auStack_84,local_ec,uVar9); + FUN_007aa754(local_ec); + FUN_007aa754(auStack_b4); + local_d8 = 0xf; + local_dc = 0; + local_ec[0] = 0; + FUN_0041bae0(local_ec,auStack_84,0,0xffffffff); + local_c0 = 7; + local_c4 = 0; + local_d4[0] = 0; + FUN_00425168(local_d4,auStack_6c,0,0xffffffff); + FUN_00646c1c(local_ec,0xff,0xff,0xff,0xffffffff); + FUN_007aa754(auStack_84); + FUN_007aa754(auStack_54); + } +LAB_00697cc4: + FUN_007ffb98(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006a47dc.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006a47dc.c new file mode 100644 index 000000000..bf2ff06b9 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006a47dc.c @@ -0,0 +1,3304 @@ + +void FUN_006a47dc(void) + +{ + int iVar1; + code *pcVar2; + short sVar3; + byte bVar4; + char cVar5; + int iVar6; + int iVar7; + int iVar8; + uint uVar9; + uint uVar10; + uint uVar11; + uint uVar12; + uint uVar13; + undefined2 uVar14; + uint uVar15; + uint uVar16; + undefined4 uVar17; + undefined4 uVar18; + int iVar19; + uint uVar20; + uint uVar21; + int iVar22; + int iVar23; + int iVar24; + bool bVar25; + uint in_fpscr; + float fVar26; + float fVar27; + float fVar28; + float fVar29; + float fVar30; + undefined4 uVar31; + int local_1a4; + uint local_19c; + undefined1 auStack_18c [24]; + undefined1 auStack_174 [24]; + undefined1 auStack_15c [24]; + undefined1 auStack_144 [24]; + undefined1 auStack_12c [24]; + undefined1 auStack_114 [24]; + undefined1 auStack_fc [48]; + undefined1 auStack_cc [48]; + undefined4 local_9c; + int local_98; + undefined4 local_94; + undefined4 local_90; + undefined1 auStack_8c [104]; + + iVar6 = FUN_007ffb80(); + cVar5 = DAT_00fe1f8b; + if (DAT_00fe1ec4 == 1) goto LAB_006aa94a; + iVar7 = FUN_006c314c(iVar6 + 0x148); + if (DAT_010338d3 != '\0') { + if ((*(int *)(iVar6 + 0x104) == 0x79) || (*(int *)(iVar6 + 0x104) == 0x17)) { + bVar25 = false; + } + else if (((*(int *)(iVar6 + 0x1b8) < 2) || (*(int *)(iVar6 + 0x19c) < 1)) || + (*(char *)(iVar6 + 0x11a) != '\0')) { + bVar25 = false; + } + else { + bVar25 = true; + } + if (bVar25) { + fVar26 = *(float *)(iVar6 + 0x1ec); + uVar15 = in_fpscr & 0xfffffff | (uint)(fVar26 < 0.0) << 0x1f | (uint)(fVar26 == 0.0) << 0x1e; + in_fpscr = uVar15 | (uint)NAN(fVar26) << 0x1c; + bVar4 = (byte)(uVar15 >> 0x18); + if (((!(bool)(bVar4 >> 6 & 1) && bVar4 >> 7 == ((byte)(in_fpscr >> 0x1c) & 1)) && + (iVar8 = FUN_00608330(&DAT_00fd67f4,5), iVar8 == 0)) && + ((DAT_0103395c < *(int *)(iVar6 + 0x14c) || + (iVar8 = FUN_00608330(&DAT_01070468,6), iVar8 == 0)))) { + if (*(char *)(iVar7 + 0xe6) == '\x01') { + FUN_00631590(*(undefined4 *)(iVar6 + 0x148),*(undefined4 *)(iVar6 + 0x14c), + *(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0x209,1,0,0,0); + } + if (*(char *)(iVar7 + 0xe7) == '\x01') { + FUN_00631590(*(undefined4 *)(iVar6 + 0x148),*(undefined4 *)(iVar6 + 0x14c), + *(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0x208,1,0,0,0); + } + } + } + } + fVar26 = DAT_006a4d04; + iVar8 = *(int *)(iVar6 + 0x104); + if (iVar8 < 0x87) { + if (iVar8 != 0x86) { + if (iVar8 < 0x24) { + if ((iVar8 != 0x23) && (iVar8 != 4)) { + bVar25 = iVar8 == 0xd; + goto LAB_006a4942; + } + } + else if ((iVar8 < 0x7d) || (0x7f < iVar8)) goto LAB_006a4944; + } +LAB_006a4962: + local_9c = *(undefined4 *)(iVar7 + 0x100); + local_94 = *(undefined4 *)(iVar7 + 0x108); + local_98 = *(int *)(iVar7 + 0x104) + -0x20; + local_90 = *(undefined4 *)(iVar7 + 0x10c); + } + else { + if ((iVar8 == 0xde) || (iVar8 == 0x106)) goto LAB_006a4962; + bVar25 = iVar8 == 0x3fc; +LAB_006a4942: + if (bVar25) goto LAB_006a4962; +LAB_006a4944: + local_9c = *(undefined4 *)(iVar6 + 0x148); + local_98 = *(int *)(iVar6 + 0x14c); + local_94 = *(undefined4 *)(iVar6 + 0x150); + local_90 = *(undefined4 *)(iVar6 + 0x154); + } + uVar15 = DAT_00fd67f4; + uVar10 = DAT_00fd6800; + if (*(int *)(iVar6 + 0x104) == 0x16) { + FUN_007aa89c(&DAT_00fe23d0,"Harald"); + FUN_007aa89c(&DAT_00fe23d0,"Niels"); + FUN_007aa89c(&DAT_00fe23d0,"Andrew"); + uVar15 = DAT_00fd67f8; + uVar10 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar10 = uVar10 ^ (uVar10 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + DAT_00fd67fc = DAT_00fd6800; + fVar27 = (float)VectorSignedToFloat(uVar10 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + if ((int)(fVar27 * fVar26 * DAT_006a4d00) == 0) { + DAT_00fd6800 = uVar10; + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x363,1,0,0,0); + uVar15 = DAT_00fd67f4; + uVar10 = DAT_00fd6800; + } + } + iVar7 = local_98; + uVar17 = local_9c; + fVar27 = DAT_006a4cfc; + uVar15 = uVar15 ^ uVar15 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd6800 = uVar15 ^ (uVar15 ^ uVar10 >> 0xb) >> 8 ^ uVar10; + fVar28 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67fc = uVar10; + if (((int)(fVar28 * fVar26 * DAT_006a4cfc) == 0) && + (iVar8 = FUN_00654790(*(undefined4 *)(iVar6 + 0x104)), 0 < iVar8)) { + FUN_00631590(uVar17,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),iVar8,1, + 0,0,0); + iVar7 = local_98; + uVar17 = local_9c; + } + if (DAT_010338d3 != '\0') { + fVar28 = *(float *)(iVar6 + 0x1ec); + uVar15 = in_fpscr & 0xfffffff | (uint)(fVar28 < 0.0) << 0x1f | (uint)(fVar28 == 0.0) << 0x1e; + in_fpscr = uVar15 | (uint)NAN(fVar28) << 0x1c; + bVar4 = (byte)(uVar15 >> 0x18); + if (!(bool)(bVar4 >> 6 & 1) && bVar4 >> 7 == ((byte)(in_fpscr >> 0x1c) & 1)) { + if ((DAT_00fe1f88 == '\0') && (iVar8 = FUN_00608330(&DAT_00fd67f4,2000), iVar8 == 0)) { + FUN_00631590(uVar17,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x22c,1,0,0,0); + } + else if ((DAT_00fe1f89 == '\0') && (iVar8 = FUN_00608330(&DAT_00fd67f4,2000), iVar8 == 0)) { + FUN_00631590(uVar17,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x220,1,0,0,0); + } + else if ((DAT_00fe1f8a == '\0') && (iVar8 = FUN_00608330(&DAT_00fd67f4,2000), iVar8 == 0)) { + FUN_00631590(uVar17,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x22d,1,0,0,0); + } + } + } + iVar7 = FUN_007354a8(); + if (iVar7 != 0) { + fVar28 = *(float *)(iVar6 + 0x1ec); + uVar15 = in_fpscr & 0xfffffff | (uint)(fVar28 < 0.0) << 0x1f | (uint)(fVar28 == 0.0) << 0x1e; + in_fpscr = uVar15 | (uint)NAN(fVar28) << 0x1c; + bVar4 = (byte)(uVar15 >> 0x18); + if (((!(bool)(bVar4 >> 6 & 1) && bVar4 >> 7 == ((byte)(in_fpscr >> 0x1c) & 1)) && + (*(int *)(iVar6 + 0x19c) < 0x28)) && (*(int *)(iVar6 + 0x1a0) < 0x14)) { + iVar7 = FUN_00608330(&DAT_00fd67f4,0x6a4); + if (iVar7 == 0) { + uVar17 = 0x721; + } + else { + iVar7 = FUN_00608330(&DAT_00fd67f4,700); + if (iVar7 != 0) goto LAB_006a4c3a; + uVar17 = 0x723; + } + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + uVar17,1,0,0,0); + } + } +LAB_006a4c3a: + uVar15 = DAT_00fd67f8; + uVar10 = DAT_00fd67fc; + uVar9 = DAT_00fd6800; + if (DAT_010338d3 != '\0') { + fVar28 = *(float *)(iVar6 + 0x1ec); + uVar11 = in_fpscr & 0xfffffff | (uint)(fVar28 < 0.0) << 0x1f | (uint)(fVar28 == 0.0) << 0x1e; + in_fpscr = uVar11 | (uint)NAN(fVar28) << 0x1c; + bVar4 = (byte)(uVar11 >> 0x18); + if (!(bool)(bVar4 >> 6 & 1) && bVar4 >> 7 == ((byte)(in_fpscr >> 0x1c) & 1)) { + iVar7 = FUN_006c314c(&local_9c); + uVar9 = DAT_00fd67fc; + uVar10 = DAT_00fd67f8; + uVar15 = DAT_00fd67f4; + fVar28 = DAT_006a4cf8; + DAT_00fd67f4 = DAT_00fd67f8; + uVar15 = uVar15 ^ uVar15 << 0xb; + DAT_00fd67f8 = DAT_00fd67fc; + uVar15 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + DAT_00fd67fc = DAT_00fd6800; + fVar29 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + uVar11 = DAT_00fd6800; + if (((int)(fVar29 * fVar26 * DAT_006a4cf8) == 0) && + (uVar11 = DAT_00fd6800, *(char *)(iVar7 + 0xe9) != '\0')) { + DAT_00fd6800 = uVar15; + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a) + ,0x70b,1,0,0,0); + uVar10 = DAT_00fd67f4; + uVar15 = DAT_00fd6800; + uVar11 = DAT_00fd67fc; + uVar9 = DAT_00fd67f8; + } + DAT_00fd67f4 = uVar9; + DAT_00fd67f8 = uVar11; + DAT_00fd67fc = uVar15; + uVar10 = uVar10 ^ uVar10 << 0xb; + DAT_00fd6800 = uVar10 ^ (uVar10 ^ DAT_00fd67fc >> 0xb) >> 8 ^ DAT_00fd67fc; + fVar29 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + if (((int)(fVar29 * fVar26 * fVar28) == 0) && (*(char *)(iVar7 + 0xe6) != '\0')) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a) + ,0x70c,1,0,0,0); + } + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + uVar15 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar29 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + uVar10 = DAT_00fd67f8; + if (((int)(fVar29 * fVar26 * fVar28) == 0) && (*(char *)(iVar7 + 0xeb) != '\0')) { + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = uVar15; + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a) + ,0x70d,1,0,0,0); + uVar15 = DAT_00fd6800; + DAT_00fd6800 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd67f8; + uVar10 = DAT_00fd67f4; + } + DAT_00fd67f4 = DAT_00fd67fc; + DAT_00fd67f8 = DAT_00fd6800; + DAT_00fd67fc = uVar15; + uVar10 = uVar10 ^ uVar10 << 0xb; + DAT_00fd6800 = uVar10 ^ (uVar10 ^ DAT_00fd67fc >> 0xb) >> 8 ^ DAT_00fd67fc; + fVar29 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + if (((int)(fVar29 * fVar26 * fVar28) == 0) && (*(char *)(iVar7 + 0xe7) != '\0')) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a) + ,0x70e,1,0,0,0); + } + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + uVar9 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar29 = (float)VectorSignedToFloat(uVar9 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67f4 = DAT_00fd67f8; + uVar15 = DAT_00fd67fc; + uVar10 = DAT_00fd6800; + if (((int)(fVar29 * fVar26 * fVar28) == 0) && + (uVar15 = DAT_00fd67fc, uVar10 = DAT_00fd6800, *(char *)(iVar7 + 0xea) != '\0')) { + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = uVar9; + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a) + ,0x70f,1,0,0,0); + uVar15 = DAT_00fd67f8; + uVar10 = DAT_00fd67fc; + uVar9 = DAT_00fd6800; + } + } + } + DAT_00fd6800 = uVar9; + DAT_00fd67fc = uVar10; + DAT_00fd67f8 = uVar15; + if (*(int *)(iVar6 + 0x104) == 0x44) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x491,1,0,0,0); + } + if (DAT_010703e3 != '\0') { + FUN_006558d8(iVar6,&local_9c); + } + if (*(int *)(iVar6 + 0x104) == 0x145) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar15 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar28 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = uVar15; + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x6c1,0x1e - (int)(fVar28 * fVar26 * -21.0),0,0,0); + } + if (*(int *)(iVar6 + 0x104) == 0x146) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar15 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar28 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = uVar15; + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x6c1,1 - (int)(fVar28 * fVar26 * -4.0),0,0,0); + } + uVar15 = DAT_00fd6800; + if ((0x130 < *(int *)(iVar6 + 0x104)) && (*(int *)(iVar6 + 0x104) < 0x13b)) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar15 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar28 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67fc = DAT_00fd6800; + if ((int)(fVar28 * fVar26 * 4.0) == 0) { + DAT_00fd6800 = uVar15; + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x3a,1,0,0,0); + uVar15 = DAT_00fd6800; + } + } + DAT_00fd6800 = uVar15; + uVar15 = DAT_00fd6800; + if (*(int *)(iVar6 + 0x104) == 0x146) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar15 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar28 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67fc = DAT_00fd6800; + if ((int)(fVar28 * fVar26 * 6.0) == 0) { + DAT_00fd6800 = uVar15; + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x3a,1,0,0,0); + uVar15 = DAT_00fd6800; + } + } + DAT_00fd6800 = uVar15; + uVar15 = DAT_00fd6800; + if (*(int *)(iVar6 + 0x104) == 0x149) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar15 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar28 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67fc = DAT_00fd6800; + if ((int)(fVar28 * fVar26 * 4.0) == 0) { + DAT_00fd6800 = uVar15; + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x3a,1,0,0,0); + uVar15 = DAT_00fd6800; + } + } + DAT_00fd6800 = uVar15; + uVar15 = DAT_00fd6800; + if (*(int *)(iVar6 + 0x104) == 0x14a) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar15 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar28 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67fc = DAT_00fd6800; + if ((int)(fVar28 * fVar26 * 4.0) == 0) { + DAT_00fd6800 = uVar15; + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x3a,1,0,0,0); + uVar15 = DAT_00fd6800; + } + } + DAT_00fd6800 = uVar15; + if (*(int *)(iVar6 + 0x104) == 0x13b) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x3a,1,0,0,0); + } + if ((*(int *)(iVar6 + 0x104) == 0x145) || (*(int *)(iVar6 + 0x104) == 0x147)) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar15 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar28 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + iVar7 = 6 - (int)(fVar28 * fVar26 * -6.0); + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = uVar15; + if (0 < iVar7) { + do { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a) + ,0x3a,1,0,0,0); + iVar7 = iVar7 + -1; + } while (iVar7 != 0); + } + } + uVar15 = DAT_00fd6800; + if (*(int *)(iVar6 + 0x104) == 0x9c) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar15 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar28 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67fc = DAT_00fd6800; + if ((int)(fVar28 * fVar26 * DAT_006a5508) == 0) { + DAT_00fd6800 = uVar15; + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x5ee,1,0,0,0); + uVar15 = DAT_00fd6800; + } + } + DAT_00fd6800 = uVar15; + uVar15 = DAT_00fd6800; + if (*(int *)(iVar6 + 0x104) == 0xf3) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar15 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar28 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67fc = DAT_00fd6800; + if ((int)(fVar28 * fVar26 * 3.0) == 0) { + DAT_00fd6800 = uVar15; + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x5ef,1,0,0,0); + uVar15 = DAT_00fd6800; + } + } + DAT_00fd6800 = uVar15; + uVar15 = DAT_00fd6800; + if ((0x10c < *(int *)(iVar6 + 0x104)) && (*(int *)(iVar6 + 0x104) < 0x119)) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar15 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar28 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67fc = DAT_00fd6800; + if ((int)(fVar28 * fVar26 * DAT_006a5504) == 0) { + DAT_00fd6800 = uVar15; + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x5ed,1,0,0,0); + uVar15 = DAT_00fd6800; + } + } + DAT_00fd6800 = uVar15; + fVar28 = DAT_006a5500; + if ((*(int *)(iVar6 + 0x104) == 0x9e) || (uVar15 = DAT_00fd6800, *(int *)(iVar6 + 0x104) == 0x9f)) + { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar15 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar29 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67fc = DAT_00fd6800; + if ((int)(fVar29 * fVar26 * DAT_006a5500) == 0) { + DAT_00fd6800 = uVar15; + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x5f0,1,0,0,0); + uVar15 = DAT_00fd6800; + } + } + DAT_00fd6800 = uVar15; + uVar15 = DAT_00fd6800; + if (*(int *)(iVar6 + 0x104) == 0xb0) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar15 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar29 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67fc = DAT_00fd6800; + if ((int)(fVar29 * fVar26 * fVar27) == 0) { + DAT_00fd6800 = uVar15; + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x5f1,1,0,0,0); + uVar15 = DAT_00fd6800; + } + } + DAT_00fd6800 = uVar15; + uVar15 = DAT_00fd6800; + if (*(int *)(iVar6 + 0x104) == 0x30) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar15 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar27 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67fc = DAT_00fd6800; + if ((int)(fVar27 * fVar26 * DAT_006a5918) == 0) { + DAT_00fd6800 = uVar15; + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x5ec,1,0,0,0); + uVar15 = DAT_00fd6800; + } + } + DAT_00fd6800 = uVar15; + uVar15 = DAT_00fd6800; + if (*(int *)(iVar6 + 0x104) == 0xcd) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar15 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar27 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67fc = DAT_00fd6800; + if ((int)(fVar27 * fVar26 * 2.0) == 0) { + DAT_00fd6800 = uVar15; + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x64b,1,0,0,0); + uVar15 = DAT_00fd6800; + } + } + DAT_00fd6800 = uVar15; + iVar7 = FUN_007354a8(); + if (iVar7 != 0) { + if ((*(int *)(iVar6 + 0x104) == 0x79) || (*(int *)(iVar6 + 0x104) == 0x17)) { + bVar25 = false; + } + else if (((*(int *)(iVar6 + 0x1b8) < 2) || (*(int *)(iVar6 + 0x19c) < 1)) || + (*(char *)(iVar6 + 0x11a) != '\0')) { + bVar25 = false; + } + else { + bVar25 = true; + } + if (bVar25) { + fVar27 = *(float *)(iVar6 + 0x1ec); + uVar15 = in_fpscr & 0xfffffff | (uint)(fVar27 < 0.0) << 0x1f | (uint)(fVar27 == 0.0) << 0x1e; + in_fpscr = uVar15 | (uint)NAN(fVar27) << 0x1c; + bVar4 = (byte)(uVar15 >> 0x18); + if (!(bool)(bVar4 >> 6 & 1) && bVar4 >> 7 == ((byte)(in_fpscr >> 0x1c) & 1)) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar15 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + DAT_00fd67fc = DAT_00fd6800; + fVar27 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd6800 = uVar15; + if ((int)(fVar27 * fVar26 * DAT_006a5914) == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x6ee,1,0,0,0); + } + } + } + } + iVar7 = FUN_0073542c(); + uVar9 = DAT_00fd67fc; + uVar10 = DAT_00fd67f8; + uVar15 = DAT_00fd67f4; + uVar11 = DAT_00fd6800; + if (iVar7 != 0) { + if ((*(int *)(iVar6 + 0x104) == 0x79) || (*(int *)(iVar6 + 0x104) == 0x17)) { + bVar25 = false; + } + else if (((*(int *)(iVar6 + 0x1b8) < 2) || (*(int *)(iVar6 + 0x19c) < 1)) || + (*(char *)(iVar6 + 0x11a) != '\0')) { + bVar25 = false; + } + else { + bVar25 = true; + } + if (bVar25) { + fVar27 = *(float *)(iVar6 + 0x1ec); + uVar16 = in_fpscr & 0xfffffff | (uint)(fVar27 < 0.0) << 0x1f | (uint)(fVar27 == 0.0) << 0x1e; + in_fpscr = uVar16 | (uint)NAN(fVar27) << 0x1c; + bVar4 = (byte)(uVar16 >> 0x18); + if (!(bool)(bVar4 >> 6 & 1) && bVar4 >> 7 == ((byte)(in_fpscr >> 0x1c) & 1)) { + DAT_00fd67f4 = DAT_00fd67f8; + uVar15 = uVar15 ^ uVar15 << 0xb; + DAT_00fd67f8 = DAT_00fd67fc; + uVar11 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + DAT_00fd67fc = DAT_00fd6800; + fVar27 = (float)VectorSignedToFloat(uVar11 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + if ((int)(fVar27 * fVar26 * 13.0) == 0) { + uVar10 = uVar10 ^ uVar10 << 0xb; + DAT_00fd67f4 = uVar9; + uVar15 = uVar10 ^ (uVar10 ^ uVar11 >> 0xb) >> 8 ^ uVar11; + DAT_00fd67f8 = DAT_00fd6800; + fVar27 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67fc = uVar11; + DAT_00fd6800 = uVar15; + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),599 - (int)(fVar27 * fVar26 * -3.0),1,0,0,0); + uVar11 = DAT_00fd6800; + } + } + } + } + DAT_00fd6800 = uVar11; + iVar7 = *(int *)(iVar6 + 0x104); + if (((iVar7 == 0x3e) || (iVar7 == 0x3fb)) || (fVar27 = 1.0, iVar7 == 0x42)) { + fVar27 = 8.0; + } + iVar7 = FUN_006c1308(); + if (*(char *)(iVar7 + 0x5d23) == '\x1e') { + fVar27 = fVar27 * 5.0; + } + iVar7 = FUN_00735468(); + fVar29 = DAT_006a5910; + if (iVar7 == 1) { + if ((*(int *)(iVar6 + 0x104) == 0x79) || (*(int *)(iVar6 + 0x104) == 0x17)) { + bVar25 = false; + } + else if (((*(int *)(iVar6 + 0x1b8) < 2) || (*(int *)(iVar6 + 0x19c) < 1)) || + (*(char *)(iVar6 + 0x11a) != '\0')) { + bVar25 = false; + } + else { + bVar25 = true; + } + if (bVar25) { + uVar15 = DAT_01070468 ^ DAT_01070468 << 0xb; + DAT_01070468 = DAT_0107046c; + DAT_0107046c = DAT_01070470; + uVar15 = uVar15 ^ (uVar15 ^ DAT_01070474 >> 0xb) >> 8 ^ DAT_01070474; + DAT_01070470 = DAT_01070474; + fVar30 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + fVar30 = (float)VectorSignedToFloat((int)(fVar30 * fVar26 * DAT_006a5910), + (byte)(in_fpscr >> 0x16) & 3); + in_fpscr = in_fpscr & 0xfffffff | (uint)(fVar27 <= fVar30) << 0x1d; + DAT_01070474 = uVar15; + if ((byte)(in_fpscr >> 0x1d) == 0) { + FUN_00631590(*(undefined4 *)(iVar6 + 0x148),*(undefined4 *)(iVar6 + 0x14c), + *(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0x13c8,1,0,0,0); + } + } + } + if ((*(int *)(iVar6 + 0x104) == 0x119) || (*(int *)(iVar6 + 0x104) == 0x11a)) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar15 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + DAT_00fd67fc = DAT_00fd6800; + fVar27 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd6800 = uVar15; + if ((int)(fVar27 * fVar26 * fVar28) == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x5a6,1,0,0xffffffff,0); + } + } + if ((*(int *)(iVar6 + 0x104) == 0x11b) || + (uVar15 = DAT_00fd6800, *(int *)(iVar6 + 0x104) == 0x11c)) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar15 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar27 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67fc = DAT_00fd6800; + if ((int)(fVar27 * fVar26 * fVar28) == 0) { + DAT_00fd6800 = uVar15; + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x5a4,1,0,0xffffffff,0); + uVar15 = DAT_00fd6800; + } + } + DAT_00fd6800 = uVar15; + if ((*(int *)(iVar6 + 0x104) == 0x11d) || + (uVar15 = DAT_00fd6800, *(int *)(iVar6 + 0x104) == 0x11e)) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar15 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar27 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67fc = DAT_00fd6800; + if ((int)(fVar27 * fVar26 * fVar28) == 0) { + DAT_00fd6800 = uVar15; + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x5a5,1,0,0xffffffff,0); + uVar15 = DAT_00fd6800; + } + } + DAT_00fd6800 = uVar15; + if (*(int *)(iVar6 + 0x104) == 0x120) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar15 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar27 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = uVar15; + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x5e4,2 - (int)(fVar27 * fVar26 * -2.0),0,0xffffffff,0); + } + else if ((((DAT_010338d3 != '\0') && (DAT_00fe1f8d != '\0')) && (*(byte *)(iVar6 + 0x175) != 4)) + && ((*(char *)((&DAT_0107034c)[*(byte *)(iVar6 + 0x175)] + 0xe5) != '\0' && + (iVar7 = FUN_00608330(&DAT_00fd67f4,0xc), iVar7 == 0)))) { + FUN_00685550(*(int *)(iVar6 + 0x148) + (*(int *)(iVar6 + 0x150) >> 1), + *(int *)(iVar6 + 0x14c) + (*(int *)(iVar6 + 0x154) >> 1),0x120,0); + } + if ((*(int *)(iVar6 + 0x104) == 0xa2) || (uVar15 = DAT_00fd6800, *(int *)(iVar6 + 0x104) == 0xa6)) + { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar15 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar27 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67fc = DAT_00fd6800; + if ((int)(fVar27 * fVar26 * DAT_006a5d90) == 0) { + DAT_00fd6800 = uVar15; + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x622,1,0,0xffffffff,0); + uVar15 = DAT_00fd6800; + } + } + DAT_00fd6800 = uVar15; + if ((*(int *)(iVar6 + 0x104) == 0x9e) || (uVar15 = DAT_00fd6800, *(int *)(iVar6 + 0x104) == 0x9f)) + { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar15 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar27 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67fc = DAT_00fd6800; + if ((int)(fVar27 * fVar26 * fVar29) == 0) { + DAT_00fd6800 = uVar15; + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 900,1,0,0xffffffff,0); + uVar15 = DAT_00fd6800; + } + } + DAT_00fd6800 = uVar15; + if (*(int *)(iVar6 + 0x104) == 0x23) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar15 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar27 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = uVar15; + if ((int)(fVar27 * fVar26 * 7.0) == 0) { + uVar17 = 0x501; + } + else { + iVar7 = FUN_00608330(&DAT_00fd67f4,7); + if (iVar7 == 0) { + uVar17 = 0x4f9; + } + else { + iVar7 = FUN_00608330(&DAT_00fd67f4,7); + if (iVar7 != 0) goto LAB_006a5de8; + uVar17 = 0x521; + } + } + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + uVar17,1,0,0xffffffff,0); + } +LAB_006a5de8: + if (((DAT_010703e2 != '\0') && (DAT_010338d3 != '\0')) && + (iVar7 = FUN_00608330(&DAT_00fd67f4,1000), iVar7 == 0)) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x522,1,0,0xffffffff,0); + } + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar15 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar27 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67fc = DAT_00fd6800; + if ((int)(fVar27 * fVar26 * fVar29) == 0) { + iVar7 = *(int *)(iVar6 + 0x104); + if (((iVar7 == 0x68) || (iVar7 == 0x66)) || ((0x10c < iVar7 && (iVar7 < 0x111)))) { + DAT_00fd6800 = uVar15; + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x375,1,0,0xffffffff,0); + uVar15 = DAT_00fd6800; + } + DAT_00fd6800 = uVar15; + iVar7 = *(int *)(iVar6 + 0x104); + if ((iVar7 == 0x4d) || ((0x110 < iVar7 && (iVar7 < 0x115)))) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x376,1,0,0xffffffff,0); + } + iVar7 = *(int *)(iVar6 + 0x104); + if (((((iVar7 == 0x8d) || (iVar7 == 0xb2)) || (iVar7 == 0x2a)) || + ((0xe6 < iVar7 && (iVar7 < 0xec)))) || (iVar7 == 0x3f3)) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x377,1,0,0xffffffff,0); + } + iVar7 = *(int *)(iVar6 + 0x104); + if (((iVar7 == 0x4f) || (iVar7 == 0x51)) || (iVar7 == 0x3ec)) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x378,1,0,0xffffffff,0); + } + iVar7 = *(int *)(iVar6 + 0x104); + if (((iVar7 == 0x4b) || (iVar7 == 0x4e)) || (iVar7 == 0x52)) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x379,1,0,0xffffffff,0); + } + iVar7 = *(int *)(iVar6 + 0x104); + if (((iVar7 == 0x4b) || (iVar7 == 0x4f)) || ((iVar7 == 0x67 || (iVar7 == 0x3ee)))) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x37a,1,0,0xffffffff,0); + } + iVar7 = *(int *)(iVar6 + 0x104); + if (((iVar7 == 0x22) || (iVar7 == 0x3f4)) || + ((iVar7 == 0x53 || ((iVar7 == 0x54 || (iVar7 == 0x3ed)))))) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x37b,1,0,0xffffffff,0); + } + if ((*(int *)(iVar6 + 0x104) == 0x5e) || (*(int *)(iVar6 + 0x104) == 0xb6)) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x37c,1,0,0xffffffff,0); + } + iVar7 = *(int *)(iVar6 + 0x104); + if ((((iVar7 == 0x5d) || (iVar7 == 0x6d)) || (iVar7 == 0x50)) || + (uVar15 = DAT_00fd6800, iVar7 == 0x3f1)) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x37d,1,0,0xffffffff,0); + uVar15 = DAT_00fd6800; + } + } + DAT_00fd6800 = uVar15; + if (*(int *)(iVar6 + 0x104) == 0x122) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = DAT_00fd6800 ^ uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8; + fVar27 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + if ((int)(fVar27 * fVar26 * DAT_006a6150) == 0) { + uVar17 = 0x5e9; + } + else { + iVar7 = FUN_00608330(&DAT_00fd67f4,0xf); + if (iVar7 != 0) goto LAB_006a618a; + uVar17 = 0x3aa; + } + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + uVar17,1,0,0xffffffff,0); + } +LAB_006a618a: + if (*(int *)(iVar6 + 0x104) == 0x123) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = DAT_00fd6800 ^ uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8; + fVar27 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + if ((int)(fVar27 * fVar26 * 15.0) == 0) { + uVar17 = 0x514; + } + else { + iVar7 = FUN_00608330(&DAT_00fd67f4,0xf); + if (iVar7 != 0) goto LAB_006a6236; + uVar17 = 0x4e6; + } + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + uVar17,1,0,0xffffffff,0); + } +LAB_006a6236: + if (*(int *)(iVar6 + 0x104) == 0x124) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = DAT_00fd6800 ^ uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8; + fVar27 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + if ((int)(fVar27 * fVar26 * 15.0) == 0) { + uVar17 = 0x5ea; + } + else { + iVar7 = FUN_00608330(&DAT_00fd67f4,0xf); + if (iVar7 != 0) goto LAB_006a62dc; + uVar17 = 0x2a7; + } + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + uVar17,1,0,0xffffffff,0); + } +LAB_006a62dc: + if (*(int *)(iVar6 + 0x104) == 0x125) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = DAT_00fd6800 ^ uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8; + fVar27 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + if ((int)(fVar27 * fVar26 * 20.0) == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x2f7,1,0,0xffffffff,0); + } + } + if (*(int *)(iVar6 + 0x104) == 0x9c) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = DAT_00fd6800 ^ uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8; + fVar27 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + if ((int)(fVar27 * fVar26 * 30.0) == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x2ab,1,0,0xffffffff,0); + } + } + if (*(int *)(iVar6 + 0x104) == 0xf5) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = DAT_00fd6800 ^ uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8; + fVar27 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + iVar7 = (int)(fVar27 * fVar26 * 8.0); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x4ea,1,0,0xffffffff,0); + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,0x3c,100); + uVar31 = 0; + uVar18 = 0x4ed; +LAB_006a6528: + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + uVar18,uVar17,0,uVar31,0); + } + else { + if (iVar7 == 1) { + uVar31 = 0xffffffff; + uVar17 = 1; + uVar18 = 0x462; + goto LAB_006a6528; + } + if (iVar7 == 2) { + uVar31 = 0xffffffff; + uVar17 = 1; + uVar18 = 899; + goto LAB_006a6528; + } + if (iVar7 == 3) { + uVar31 = 0xffffffff; + uVar17 = 1; + uVar18 = 0x4e0; + goto LAB_006a6528; + } + if (iVar7 == 4) { + uVar31 = 0xffffffff; + uVar17 = 1; + uVar18 = 0x50e; + goto LAB_006a6528; + } + if (iVar7 == 5) { + uVar31 = 0xffffffff; + uVar17 = 1; + uVar18 = 0x50f; + goto LAB_006a6528; + } + if (iVar7 == 6) { + uVar31 = 0xffffffff; + uVar17 = 1; + uVar18 = 0x510; + goto LAB_006a6528; + } + if (iVar7 == 7) { + uVar31 = 0xffffffff; + uVar17 = 1; + uVar18 = 0x511; + goto LAB_006a6528; + } + } + DAT_00fe1f8e = 1; + } + if (*(int *)(iVar6 + 0x104) == 0x10c) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = DAT_00fd6800 ^ uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8; + fVar27 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x534,2 - (int)(fVar27 * fVar26 * -2.0),0,0,0); + } + if (*(int *)(iVar6 + 0x104) == 0x99) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = DAT_00fd6800 ^ uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8; + fVar27 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + if ((int)(fVar27 * fVar26 * 17.0) != 0) goto LAB_006a664c; + uVar17 = 0x530; +LAB_006a6706: + uVar14 = *(undefined2 *)(iVar6 + 0x168); +LAB_006a6712: + FUN_00631590(local_9c,local_98,uVar14,*(undefined2 *)(iVar6 + 0x16a),uVar17,1,0,0xffffffff,0); + } + else { +LAB_006a664c: + if ((*(int *)(iVar6 + 0x104) == 0xfd) && (iVar7 = FUN_00608330(&DAT_00fd67f4,0xfa), iVar7 == 0)) + { + uVar17 = 0x52f; + goto LAB_006a6706; + } + if ((*(int *)(iVar6 + 0x104) == 0x78) && (iVar7 = FUN_00608330(&DAT_00fd67f4,500), iVar7 == 0)) + { + uVar17 = 0x52e; + goto LAB_006a6706; + } + if ((*(int *)(iVar6 + 0x104) == 0x31) && (iVar7 = FUN_00608330(&DAT_00fd67f4,0xfa), iVar7 == 0)) + { + uVar17 = 0x52d; + goto LAB_006a6706; + } + if ((*(int *)(iVar6 + 0x104) == 0xb9) && (iVar7 = FUN_00608330(&DAT_00fd67f4,0x96), iVar7 == 0)) + { + uVar17 = 0x3b7; + goto LAB_006a6706; + } + if ((*(int *)(iVar6 + 0x104) == 0x2c) && (iVar7 = FUN_00608330(&DAT_00fd67f4,0x4b), iVar7 == 0)) + { + uVar17 = 0x528; + goto LAB_006a6706; + } + if ((*(int *)(iVar6 + 0x104) == 0x6e) && (iVar7 = FUN_00608330(&DAT_00fd67f4,100), iVar7 == 0)) + { + uVar17 = 0x529; + goto LAB_006a6706; + } + if (((*(int *)(iVar6 + 0x104) == 0x3c) && (iVar7 = FUN_00608330(&DAT_00fd67f4,0x96), iVar7 == 0) + ) || ((*(int *)(iVar6 + 0x104) == 0x97 && + (iVar7 = FUN_00608330(&DAT_00fd67f4,0x32), iVar7 == 0)))) { + uVar17 = 0x52a; + goto LAB_006a6706; + } + if ((*(int *)(iVar6 + 0x104) != 0x18) || (iVar7 = FUN_00608330(&DAT_00fd67f4,0x4b), iVar7 != 0)) + { + if ((*(int *)(iVar6 + 0x104) == 0x6d) && + (iVar7 = FUN_00608330(&DAT_00fd67f4,0x1e), iVar7 == 0)) { + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,1,5); + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a) + ,0x52c,uVar17,0,0xffffffff,0); + goto LAB_006a7160; + } + iVar7 = *(int *)(iVar6 + 0x104); + if ((iVar7 == 0xa3) || (iVar7 == 0xee)) { + iVar7 = FUN_00608330(&DAT_00fd67f4,0x28); + if (iVar7 == 0) { + uVar17 = 0x51c; + goto LAB_006a6706; + } + goto LAB_006a7160; + } + if (iVar7 != 0x11f) { + if (iVar7 == 0x4d) { + iVar7 = FUN_00608330(&DAT_00fd67f4,0x96); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x2d3,1,0,0xffffffff,0); + } + } + else if (iVar7 == 0xfb) { + iVar7 = FUN_00608330(&DAT_00fd67f4,0x32); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x51f,1,0,0xffffffff,0); + } + } + else if (iVar7 == 0xc5) { + iVar7 = FUN_00608330(&DAT_00fd67f4,200); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x51a,1,0,0xffffffff,0); + } + } + else if (iVar7 == 0xf4) { + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,1,6); + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x17,uVar17,0,0,0); + iVar7 = FUN_00608330(&DAT_00fd67f4,2); + if (iVar7 == 0) { + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,1,6); + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x17,uVar17,0,0,0); + } + iVar7 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar7 == 0) { + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,3,9); + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x17,uVar17,0,0,0); + } + iVar7 = FUN_00608330(&DAT_00fd67f4,4); + if (iVar7 == 0) { + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,6,0xc); + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x17,uVar17,0,0,0); + } + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,0x1e,0x3c); + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x296,uVar17,0,0,0); + } + else if (iVar7 == 0xfa) { + iVar7 = FUN_00608330(&DAT_00fd67f4,0xf); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x4dc,1,0,0xffffffff,0); + } + } + else if (iVar7 == 0xac) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x2f2,1,0,0xffffffff,0); + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x2f3,1,0,0xffffffff,0); + } + else if (iVar7 == 0x6e) { + iVar7 = FUN_00608330(&DAT_00fd67f4,200); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x2aa,1,0,0xffffffff,0); + } + } + else { + if ((0x10c < iVar7) && (iVar7 < 0x119)) { + iVar7 = FUN_00608330(&DAT_00fd67f4,600); + if (iVar7 == 0) { + uVar17 = 0x49f; + } + else { + iVar7 = FUN_00608330(&DAT_00fd67f4,400); + if (iVar7 != 0) { + iVar7 = FUN_00608330(&DAT_00fd67f4,300); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x29f,1,0,0xffffffff,0); + } + goto LAB_006a7160; + } + uVar17 = 0x4f2; + } + goto LAB_006a6706; + } + if (iVar7 == 0x9a) { + iVar7 = FUN_00608330(&DAT_00fd67f4,100); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x4e5,1,0,0xffffffff,0); + } + } + else if (((iVar7 == 0xa9) || (iVar7 == 0xce)) || (iVar7 == 0x96)) { + iVar7 = FUN_00608330(&DAT_00fd67f4,0x32); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x2d6,1,0,0xffffffff,0); + } + } + else if (iVar7 == 0xf3) { + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,0x2ac,0x2af); + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),uVar17,1,0,0xffffffff,0); + } + else if (((iVar7 == 0xc6) || (iVar7 == 199)) || (iVar7 == 0xe2)) { + iVar7 = FUN_00608330(&DAT_00fd67f4,3000); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x494,1,0,0xffffffff,0); + } + iVar7 = FUN_00608330(&DAT_00fd67f4,100); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x50d,1,0,0xffffffff,0); + } + } + else if (((iVar7 == 0x4e) || (iVar7 == 0x4f)) || + ((iVar7 == 0x50 || ((iVar7 == 0x3ee || (iVar7 == 0x3f1)))))) { + iVar7 = FUN_00608330(&DAT_00fd67f4,0x4b); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x366,1,0,0xffffffff,0); + } + iVar7 = FUN_00608330(&DAT_00fd67f4,0x4b); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x367,1,0,0xffffffff,0); + } + iVar7 = FUN_00608330(&DAT_00fd67f4,0x4b); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x368,1,0,0xffffffff,0); + } + } + else if ((iVar7 < 0xd4) || (0xd7 < iVar7)) { + if (iVar7 == 0xd8) { + iVar7 = FUN_00608330(&DAT_00fd67f4,4000); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x389,1,0,0xffffffff,0); + } + iVar7 = FUN_00608330(&DAT_00fd67f4,2000); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x357,1,0,0xffffffff,0); + } + iVar7 = FUN_00608330(&DAT_00fd67f4,1000); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x356,1,0,0xffffffff,0); + } + iVar7 = FUN_00608330(&DAT_00fd67f4,100); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x2a0,1,0,0xffffffff,0); + } + } + } + else { + iVar7 = FUN_00608330(&DAT_00fd67f4,8000); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x389,1,0,0xffffffff,0); + } + iVar7 = FUN_00608330(&DAT_00fd67f4,4000); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x357,1,0,0xffffffff,0); + } + iVar7 = FUN_00608330(&DAT_00fd67f4,2000); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x356,1,0,0xffffffff,0); + } + iVar7 = FUN_00608330(&DAT_00fd67f4,200); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x2a0,1,0,0xffffffff,0); + } + iVar7 = FUN_00608330(&DAT_00fd67f4,500); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x4fd,1,0,0,0); + } + iVar7 = FUN_00608330(&DAT_00fd67f4,500); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x4fe,1,0,0,0); + } + iVar7 = FUN_00608330(&DAT_00fd67f4,500); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x4ff,1,0,0,0); + } + iVar7 = FUN_00608330(&DAT_00fd67f4,500); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x500,1,0,0,0); + } + iVar7 = FUN_00608330(&DAT_00fd67f4,300); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x6a8,1,0,0,0); + } + iVar7 = FUN_00608330(&DAT_00fd67f4,300); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x6a9,1,0,0,0); + } + iVar7 = FUN_00608330(&DAT_00fd67f4,300); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x6ae,1,0,0,0); + } + iVar7 = FUN_00608330(&DAT_00fd67f4,300); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x6b4,1,0,0,0); + } + iVar7 = FUN_00608330(&DAT_00fd67f4,300); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x6b8,1,0,0,0); + } + } + } + goto LAB_006a7160; + } + iVar7 = FUN_00608330(&DAT_00fd67f4,7); + if (iVar7 != 0) goto LAB_006a7160; + iVar7 = FUN_00608330(&DAT_00fd67f4,2); + uVar14 = *(undefined2 *)(iVar6 + 0x168); + if (iVar7 != 0) { + FUN_00631590(local_9c,local_98,uVar14,*(undefined2 *)(iVar6 + 0x16a),0x3d1,1,0,0xffffffff,0) + ; + goto LAB_006a7160; + } + uVar17 = 0x3c3; + goto LAB_006a6712; + } + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x52b,1,0,0xffffffff,0); + } +LAB_006a7160: + if (*(int *)(iVar6 + 0x104) == 0xa1) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = DAT_00fd6800 ^ uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8; + fVar27 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + if ((int)(fVar27 * fVar26 * DAT_006a7204) == 0) { + iVar7 = FUN_00608330(&DAT_00fd67f4,3); + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + iVar7 + 0x323,1,0,0,0); + } + } + iVar7 = *(int *)(iVar6 + 0x104); + if (iVar7 == 0xd9) { + uVar17 = 0x45b; +LAB_006a7400: + uVar18 = 0xffffffff; +LAB_006a7402: + uVar14 = *(undefined2 *)(iVar6 + 0x168); +LAB_006a7418: + FUN_00631590(local_9c,local_98,uVar14,*(undefined2 *)(iVar6 + 0x16a),uVar17,1,0,uVar18,0); + } + else { + if (iVar7 == 0xda) { + uVar17 = 0x45c; + goto LAB_006a7400; + } + if (iVar7 == 0xdb) { + uVar17 = 0x45d; + goto LAB_006a7400; + } + if (iVar7 == 0xdc) { + uVar17 = 0x45e; + goto LAB_006a7400; + } + if (iVar7 == 0xdd) { + uVar17 = 0x45f; + goto LAB_006a7400; + } + if (iVar7 == 0xa7) { + iVar7 = FUN_00608330(&DAT_00fd67f4,0x32); + if (iVar7 != 0) goto LAB_006a7422; + uVar17 = 0x36f; + goto LAB_006a7400; + } + if (iVar7 == 0x31) { + iVar7 = FUN_00608330(&DAT_00fd67f4,200); + if (iVar7 != 0) goto LAB_006a7422; + uVar17 = 0x12; + goto LAB_006a7400; + } + if ((((iVar7 == 0x15) || (iVar7 == 0xc9)) || (iVar7 == 0xca)) || + (((iVar7 == 0xcb || (iVar7 == 0x142)) || ((iVar7 == 0x143 || (iVar7 == 0x144)))))) { + iVar7 = FUN_00608330(&DAT_00fd67f4,100); + if (iVar7 == 0) { + uVar17 = 0x3ba; + } + else { + iVar7 = FUN_00608330(&DAT_00fd67f4,200); + if (iVar7 == 0) { + uVar17 = 0x3bb; + } + else { + iVar7 = FUN_00608330(&DAT_00fd67f4,200); + if (iVar7 == 0) { + uVar17 = 0x48e; + } + else { + iVar7 = FUN_00608330(&DAT_00fd67f4,500); + if (iVar7 != 0) goto LAB_006a7422; + uVar17 = 0x4fa; + } + } + } + goto LAB_006a7400; + } + if (iVar7 == 6) { + iVar7 = FUN_00608330(&DAT_00fd67f4,0x96); + if (iVar7 != 0) goto LAB_006a7422; + iVar7 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar7 == 0) { + uVar17 = 0x3bc; + goto LAB_006a7400; + } + uVar14 = *(undefined2 *)(iVar6 + 0x168); + uVar18 = 0xffffffff; + if (iVar7 == 1) { + uVar17 = 0x3bd; + } + else { + uVar17 = 0x3be; + } + goto LAB_006a7418; + } + if (((iVar7 != 0x2a) && (iVar7 != 0x2b)) && ((iVar7 < 0xe7 || (0xeb < iVar7)))) { + if ((((iVar7 == 0x1f) || (iVar7 == 0x20)) || (iVar7 == 0x126)) || + ((iVar7 == 0x127 || (iVar7 == 0x128)))) { + iVar7 = FUN_00608330(&DAT_00fd67f4,0x1c2); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x3bf,1,0,0xffffffff,0); + } + iVar7 = FUN_00608330(&DAT_00fd67f4,300); + if (iVar7 == 0) { + uVar17 = 0x51b; + goto LAB_006a7400; + } + goto LAB_006a7422; + } + if ((((iVar7 != 0xae) && (iVar7 != 0xb3)) && ((iVar7 != 0xb6 && (iVar7 != 0xb7)))) || + (iVar7 = FUN_00608330(&DAT_00fd67f4,200), iVar7 != 0)) goto LAB_006a7422; + uVar18 = 0; + uVar17 = 0x3e4; + goto LAB_006a7402; + } + iVar7 = FUN_00608330(&DAT_00fd67f4,100); + if (iVar7 == 0) { + iVar7 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a) + ,0x3c0,1,0,0xffffffff,0); + } + else if (iVar7 == 1) { + uVar17 = 0x3c1; + goto LAB_006a7400; + } + uVar17 = 0x3c2; + goto LAB_006a7400; + } + } +LAB_006a7422: + if (*(int *)(iVar6 + 0x104) == 0xba) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = DAT_00fd6800 ^ uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8; + fVar27 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x28,1 - (int)(fVar27 * fVar26 * -9.0),0,0,0); + } + if (*(int *)(iVar6 + 0x104) == 0xe1) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = DAT_00fd6800 ^ uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8; + fVar27 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + if ((int)(fVar27 * fVar26 * DAT_006a7518) == 0) { + uVar17 = 1; + uVar18 = 0x4db; + } + else { + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,2,6); + uVar18 = 0x17; + } + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + uVar18,uVar17,0,0,0); + } + if (*(int *)(iVar6 + 0x104) == 0xdf) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = DAT_00fd6800 ^ uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8; + fVar27 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + if ((int)(fVar27 * fVar26 * 10.0) == 0) { + iVar7 = FUN_00608330(&DAT_00fd67f4,2); + if (iVar7 == 0) { + uVar17 = 0x46f; + } + else { + uVar17 = 0x470; + } + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + uVar17,1,0,0xffffffff,0); + } + } + iVar7 = local_98; + fVar27 = *(float *)(iVar6 + 0x1ec); + uVar15 = in_fpscr & 0xfffffff | (uint)(fVar27 < 0.0) << 0x1f | (uint)(fVar27 == 0.0) << 0x1e; + uVar10 = uVar15 | (uint)NAN(fVar27) << 0x1c; + bVar4 = (byte)(uVar15 >> 0x18); + if (((!(bool)(bVar4 >> 6 & 1) && bVar4 >> 7 == ((byte)(uVar10 >> 0x1c) & 1)) && + (DAT_010338d3 != '\0')) && (local_98 < DAT_01050304 + 0xa0)) { + iVar19 = *(int *)(iVar6 + 0x148) + (*(int *)(iVar6 + 0x150) >> 1); + iVar8 = (DAT_0087e6f4 + 0x1e) * 0x10; + if (((iVar19 < iVar8) || (iVar8 < iVar19)) && + (iVar8 = FUN_00608330(&DAT_00fd67f4,100), iVar8 == 0)) { + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x523,1,0,0,0); + iVar7 = local_98; + } + } + if (*(int *)(iVar6 + 0x104) == 0xde) { + DAT_00fe1f8c = 1; + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = DAT_00fd6800 ^ uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8; + fVar27 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + iVar8 = (int)(fVar27 * fVar26 * 3.0); + if (iVar8 == 0) { + iVar8 = 0x461; + } + else if (iVar8 == 1) { + iVar8 = 0x463; + } + else if (iVar8 == 2) { + iVar8 = 0x46c; + } + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),iVar8, + 1,0,0,0); + uVar11 = DAT_00fd67fc; + uVar9 = DAT_00fd67f8; + uVar15 = DAT_00fd67f4; + DAT_00fd67f4 = DAT_00fd67f8; + uVar15 = uVar15 ^ uVar15 << 0xb; + DAT_00fd67f8 = DAT_00fd67fc; + uVar15 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + DAT_00fd67fc = DAT_00fd6800; + fVar27 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + if ((int)(fVar27 * fVar26 * 20.0) == 0) { + DAT_00fd6800 = uVar15; + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x492,1,0,0,0); + uVar15 = DAT_00fd6800; + uVar9 = DAT_00fd67f4; + uVar11 = DAT_00fd67f8; + } + uVar9 = uVar9 ^ uVar9 << 0xb; + DAT_00fd6800 = uVar15 ^ (uVar9 ^ uVar15 >> 0xb) >> 8 ^ uVar9; + fVar27 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + DAT_00fd67f4 = uVar11; + DAT_00fd67f8 = DAT_00fd67fc; + if ((int)(fVar27 * fVar26 * 3.0) == 0) { + uVar17 = 0x469; + DAT_00fd67fc = uVar15; +LAB_006a77fa: + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + uVar17,1,0,0,0); + } + else { + DAT_00fd67fc = uVar15; + iVar7 = FUN_00608330(&DAT_00fd67f4,2); + if (iVar7 == 0) { + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,0x34a,0x34d); + goto LAB_006a77fa; + } + } + iVar8 = FUN_00608330(&DAT_00fd67f4,4); + iVar7 = local_98; + if (iVar8 != 0) { + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,10,0x1e); + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x46a,uVar17,0,0,0); + iVar7 = local_98; + } + } + iVar8 = 0x10b; + if (*(int *)(iVar6 + 0x104) == 0x10a) { + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,0xf,0x29); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0x370, + uVar17,0,0,0); + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,0xf,0x29); + uVar18 = 0x370; +LAB_006a7962: + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + uVar18,uVar17,0,0,0); + iVar7 = local_98; + } + else if ((*(int *)(iVar6 + 0x104) == 0x10b) && (iVar19 = FUN_00656370(0x10a), iVar19 != 0)) { + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,2,6); + iVar19 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar19 != 0) { + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x531,uVar17,0,0,0); + iVar7 = local_98; + } + iVar19 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar19 != 0) { + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,4,0xb); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x370,uVar17,0,0,0); + iVar7 = local_98; + } + iVar19 = FUN_00608330(&DAT_00fd67f4,2); + if (iVar19 == 0) { + FUN_006c314c(&local_9c); + iVar19 = FUN_006be868(); + iVar7 = local_98; + if (iVar19 != 0) { + uVar17 = 1; + uVar18 = 0x3a; + goto LAB_006a7962; + } + } + } + iVar19 = *(int *)(iVar6 + 0x104); + if (0x93 < iVar19) { + if (iVar19 < 0x13f) { + if (0x13c < iVar19) { +switchD_006a79a2_caseD_2: + iVar8 = FUN_00608330(&DAT_00fd67f4,0x96); + if (iVar8 < 100) { + if (iVar8 == 0x26) { + uVar17 = 0xec; + } + else { + uVar17 = 0x26; + } + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + uVar17,1,0,0,0); + iVar7 = local_98; + goto LAB_006a99ce; + } + goto switchD_006a79a2_caseD_5; + } + if (200 < iVar19) { + if (iVar19 < 0xec) { + if (0xe6 < iVar19) goto switchD_006a79a2_caseD_2a; + if (iVar19 < 0xe0) { + if (iVar19 == 0xdf) goto switchD_006a79a2_caseD_3; + if (200 < iVar19) { + if (iVar19 < 0xcc) goto switchD_006a79a2_caseD_15; + if (iVar19 == 0xcc) goto switchD_006a79a2_caseD_1; + } + } + else if (iVar19 == 0xe6) goto switchD_006a79a2_caseD_37; + } + else if (iVar19 < 0x107) { + if (iVar19 == 0x106) { + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x475,1,0,0xffffffff,0); + iVar7 = FUN_00608330(&DAT_00fd67f4,0x14); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x49e,1,0,0xffffffff,0); + } + iVar7 = FUN_00608330(&DAT_00fd67f4,200); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x519,1,0,0xffffffff,0); + } + iVar7 = FUN_00608330(&DAT_00fd67f4,4); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x485,1,0,0xffffffff,0); + } + iVar7 = FUN_00608330(&DAT_00fd67f4,6); + if ((DAT_00fe1f8d == '\0') || (iVar7 == 0)) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x2f6,1,0,0xffffffff,0); + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,0x14,0x32); + uVar31 = 0; + uVar18 = 0x303; +LAB_006a8e68: + uVar14 = *(undefined2 *)(iVar6 + 0x168); + } + else { + uVar31 = 0xffffffff; + uVar17 = 1; + if (iVar7 == 1) { + uVar18 = 0x4e7; + goto LAB_006a8e68; + } + if (iVar7 == 2) { + uVar18 = 0x314; + goto LAB_006a8e68; + } + if (iVar7 == 3) { + uVar18 = 0x49a; + goto LAB_006a8e68; + } + uVar14 = *(undefined2 *)(iVar6 + 0x168); + if (iVar7 == 4) { + uVar18 = 0x4eb; + } + else { + uVar18 = 0x483; + } + } + FUN_00631590(local_9c,local_98,uVar14,*(undefined2 *)(iVar6 + 0x16a),uVar18,uVar17,0, + uVar31,0); + iVar7 = local_98; + if (DAT_00fe1f8d == '\0') { + DAT_00fe1f8d = '\x01'; + FUN_00646f20(0x33,0x32,0xff,0x82,0xffffffff); + iVar7 = local_98; + } + goto LAB_006a99ce; + } + if (iVar19 - 0xefU < 2) goto switchD_006a8ba2_caseD_ad; + } + else if (iVar19 == 0x12e) goto switchD_006a79a2_caseD_1; + goto switchD_006a79a2_caseD_5; + } + if (iVar19 == 200) { +switchD_006a79a2_caseD_3: +LAB_006a8ffc: + iVar8 = FUN_00608330(&DAT_00fd67f4,0x32); + if (iVar8 == 0) { + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0xd8,1,0,0xffffffff,0); + iVar7 = local_98; + } + iVar8 = FUN_00608330(&DAT_00fd67f4,0xfa); + if (iVar8 == 0) { + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x518,1,0,0xffffffff,0); + iVar7 = local_98; + goto LAB_006a99ce; + } + } + else { + switch(iVar19) { + case 0xa7: + goto switchD_006a79a2_caseD_15; + case 0xad: + case 0xb5: +switchD_006a8ba2_caseD_ad: + iVar8 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar8 == 0) { + uVar17 = 0; + iVar8 = 0x532; + goto LAB_006a7c10; + } + break; + case 0xaf: + iVar8 = FUN_00608330(&DAT_00fd67f4,200); + if (iVar8 == 0) { + iVar8 = 0x4f1; + goto LAB_006a7c0a; + } + break; + case 0xb8: + goto switchD_006a79a2_caseD_1; + case 0xba: + iVar8 = FUN_005c4e6c(&DAT_00fd67f4,1,10); + uVar17 = 0x28; + goto LAB_006a8428; + case 0xbb: + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,1,3); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x17,uVar17,0,0,0); + iVar8 = FUN_00608330(&DAT_00fd67f4,5000); + iVar7 = local_98; + if (iVar8 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x51d,1,0,0xffffffff,0); + iVar7 = local_98; + } + goto LAB_006a8ffc; + case 0xbc: + case 0xbd: + goto switchD_006a79a2_caseD_3; + case 0xbe: + case 0xbf: + case 0xc0: + case 0xc1: + case 0xc2: + goto switchD_006a79a2_caseD_2; + } + } + goto switchD_006a79a2_caseD_5; + } + if (0x3f0 < iVar19) { + switch(iVar19) { + case 0x3f1: + iVar8 = FUN_00608330(&DAT_01070468,5); + if (iVar8 == 0) { + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x210,1,0,0,0); + iVar7 = local_98; + } +LAB_006a93fa: + uVar17 = FUN_005c4e6c(&DAT_01070468,0x28,0x5f); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x48,uVar17,0,0,0); + iVar7 = local_98; + break; + case 0x3f2: + uVar17 = FUN_005c4e6c(&DAT_01070468,10,0x23); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x48,uVar17,0,0,0); + iVar7 = local_98; + break; + case 0x3f3: + iVar8 = FUN_00608330(&DAT_00fd67f4,10); + if (iVar8 == 0) { + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x139b,1,0,0,0); + iVar7 = local_98; + } + iVar8 = FUN_00608330(&DAT_00fd67f4,10); + if (iVar8 != 0) goto switchD_006a79a2_caseD_2a; + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0xd1,2,0,0,0); + iVar7 = local_98; + goto LAB_006a99a2; + case 0x3f4: + iVar8 = FUN_00608330(&DAT_01070468,8); + if (iVar8 == 0) { + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x147,1,0,0,0); + iVar7 = local_98; + } + iVar8 = FUN_00608330(&DAT_01070468,2); + if (iVar8 == 0) { + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x49,1,0,0,0); + iVar7 = local_98; + } + break; + case 0x3f5: + uVar17 = FUN_005c4e6c(&DAT_01070468,8,0xf); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x23f,uVar17,0,0,0); + iVar7 = FUN_00608330(&DAT_01070468,3); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x149,1,0,0,0); + iVar7 = local_98; + } + else { + uVar17 = FUN_005c4e6c(&DAT_01070468,1,2); + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x49,uVar17,0,0,0); + iVar7 = local_98; + } + break; + default: + goto switchD_006a79a2_caseD_5; + case 0x3fb: + iVar8 = FUN_00608330(&DAT_01070468,0xfa); + if (iVar8 == 0) { + uVar17 = 0x206; + goto LAB_006a82c0; + } + iVar8 = FUN_00608330(&DAT_01070468,10); + if (iVar8 == 0) goto LAB_006a82b6; + uVar17 = FUN_005c4e6c(&DAT_01070468,5,10); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x1f6,uVar17,0,0,0); + iVar7 = local_98; + break; + case 0x3fc: + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,10,0x1e); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x16e,uVar17,0,0,0); + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,0x14,0x1e); + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a) + ,0x1399,uVar17,0,0,0); + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,0x14,0x32); + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a) + ,0x1395,uVar17,0,0,0); + iVar8 = FUN_00608330(&DAT_00fd67f4,2); + iVar7 = local_98; + if (iVar8 == 0) { + iVar8 = FUN_00608330(&DAT_00fd67f4,9); + iVar8 = iVar8 + 0x1389; + uVar17 = 0; + uVar18 = 1; + iVar7 = local_98; + goto LAB_006a7c16; + } + break; + case 0x400: + goto switchD_006a79a2_caseD_2f; + } + goto LAB_006a99ce; + } + if (iVar19 == 0x3f0) goto LAB_006a9554; + if (iVar19 < 0x3ec) { + if (iVar19 == 0x3eb) { + iVar8 = FUN_00608330(&DAT_00fd67f4,10); + if (iVar8 == 0) { + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x139c,1,0,0,0); + iVar7 = local_98; + } + iVar8 = FUN_00608330(&DAT_00fd67f4,10); + if (iVar8 == 0) { + iVar8 = FUN_005c4e6c(&DAT_00fd67f4,0x19a,0x19c); + uVar17 = 0; + uVar18 = 1; + goto LAB_006a7c16; + } + } + else if (iVar19 < 0x3ea) { + if (iVar19 == 0x3e9) goto switchD_006a79a2_caseD_45; + switch(iVar19) { + case 0x13f: + case 0x140: + case 0x141: + goto switchD_006a79a2_caseD_3; + case 0x142: + case 0x143: + case 0x144: + goto switchD_006a79a2_caseD_15; + } + } + else if ((iVar19 == 0x3ea) && (iVar8 = FUN_00608330(&DAT_00fd67f4,0x19), iVar8 == 0)) { + uVar17 = 0; + iVar8 = 0x10c; + goto LAB_006a7c10; + } + goto switchD_006a79a2_caseD_5; + } + switch(iVar19) { + case 0x3ec: + uVar17 = FUN_005c4e6c(&DAT_01070468,5,8); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0x17 + ,uVar17,0,0,0); + uVar17 = FUN_005c4e6c(&DAT_01070468,0x14,0x4d); + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x48,uVar17,0,0,0); + iVar8 = FUN_00608330(&DAT_00fd67f4,0x14); + iVar7 = local_98; + if (iVar8 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a) + ,0x139a,1,0,0,0); + iVar7 = local_98; + } + break; + case 0x3ed: + iVar8 = FUN_00608330(&DAT_01070468,6); + if (iVar8 == 0) { + uVar17 = FUN_005c4e6c(&DAT_01070468,2,5); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x187,uVar17,0,0,0); + iVar7 = local_98; + } + else { + iVar8 = FUN_00608330(&DAT_01070468,3); + if (iVar8 == 0) { + uVar17 = FUN_005c4e6c(&DAT_01070468,2,5); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x17e,uVar17,0,0,0); + iVar7 = local_98; + } + else { + uVar17 = FUN_005c4e6c(&DAT_01070468,2,5); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x17d,uVar17,0,0,0); + iVar7 = local_98; + } + } + break; + case 0x3ee: + iVar8 = FUN_00608330(&DAT_01070468,5); + if (iVar8 == 0) { + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x20f,1,0,0,0); + iVar7 = local_98; + } + goto LAB_006a93fa; + case 0x3ef: + uVar17 = FUN_005c4e6c(&DAT_01070468,9,0x23); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0x17 + ,uVar17,0,0,0); + uVar17 = FUN_005c4e6c(&DAT_01070468,10,0x25); + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x48,uVar17,0,0,0); + iVar7 = local_98; + break; + default: + goto switchD_006a79a2_caseD_5; + } + goto LAB_006a99ce; + } + if (iVar19 == 0x93) { +switchD_006a79a2_caseD_1: + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,1,3); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0x17, + uVar17,0,0,0); + iVar7 = FUN_00608330(&DAT_00fd67f4,3000); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x51d,1,0,0xffffffff,0); + } + iVar7 = local_98; + if ((*(int *)(iVar6 + 0x104) == 0xcc) && + (iVar8 = FUN_00608330(&DAT_00fd67f4,3), iVar7 = local_98, iVar8 == 0)) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0xd1,1,0,0,0); + iVar7 = local_98; + } + goto LAB_006a99ce; + } + switch(iVar19) { + case 1: + case 0x10: + case 0x8a: + case 0x8d: + goto switchD_006a79a2_caseD_1; + case 2: + goto switchD_006a79a2_caseD_2; + case 3: + case 0x84: + goto switchD_006a79a2_caseD_3; + case 4: + iVar8 = FUN_00608330(&DAT_00fd67f4,0x96); + if (iVar8 == 0) { + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x513,1,0,0,0); + iVar7 = local_98; + } + if (DAT_0102a787 == '\0') { + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,0x14,0x32); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0x2f + ,uVar17,0,0,0); + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,10,0x1e); + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x38,uVar17,0,0,0); + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,10,0x1e); + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x38,uVar17,0,0,0); + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,10,0x1e); + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x38,uVar17,0,0,0); + iVar8 = FUN_005c4e6c(&DAT_00fd67f4,1,4); + uVar17 = 0x3b; + iVar7 = local_98; + } + else { + iVar8 = FUN_00608330(&DAT_00fd67f4,0x14); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x370,iVar8 + 10,0,0,0); + iVar7 = FUN_00608330(&DAT_00fd67f4,0x14); + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x370,iVar7 + 10,0,0,0); + iVar8 = FUN_00608330(&DAT_00fd67f4,0x14); + iVar8 = iVar8 + 10; + uVar17 = 0x370; + iVar7 = local_98; + } + goto LAB_006a8428; + default: + goto switchD_006a79a2_caseD_5; + case 6: + case 0x5e: + iVar8 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar8 == 0) { + uVar17 = 0; + iVar8 = 0x44; + goto LAB_006a7c10; + } + goto switchD_006a79a2_caseD_5; + case 7: + case 8: + case 9: + iVar8 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar8 == 0) { + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,1,3); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0x44 + ,uVar17,0,0,0); + iVar8 = FUN_00608330(&DAT_00fd67f4,3); + iVar7 = local_98; + if (iVar8 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a) + ,0x13c3,1,0,0,0); + iVar7 = local_98; + } + } + uVar18 = FUN_005c4e6c(&DAT_00fd67f4,3,9); + uVar17 = 0; + iVar8 = 0x45; + goto LAB_006a7c16; + case 10: + case 0xb: + case 0xc: + case 0x5f: + case 0x60: + case 0x61: + iVar8 = FUN_00608330(&DAT_00fd67f4,100); + if (iVar8 == 0) { + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0xd7 + ,1,0,0,0); + iVar7 = local_98; + } + iVar8 = FUN_00608330(&DAT_01070468,0x32); + if (iVar8 == 0) { + uVar17 = FUN_005c4e6c(&DAT_01070468,5,10); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0x43 + ,uVar17,0,0,0); + iVar7 = local_98; + } + iVar8 = FUN_00608330(&DAT_01070468,10); + if (iVar8 == 0) { + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x13c3,1,0,0,0); + iVar7 = local_98; + } + break; + case 0xd: + case 0xe: + case 0xf: + iVar8 = FUN_00608330(&DAT_00fd67f4,2); + if (iVar8 == 0) { + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,1,3); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0x56 + ,uVar17,0,0,0); + iVar7 = local_98; + } + iVar8 = FUN_00608330(&DAT_01070468,3); + if (iVar8 == 0) { + uVar17 = FUN_005c4e6c(&DAT_01070468,1,3); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0x44 + ,uVar17,0,0,0); + iVar7 = local_98; + } + iVar8 = FUN_00608330(&DAT_01070468,2); + if (iVar8 == 0) { + uVar17 = FUN_005c4e6c(&DAT_01070468,2,6); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0x38 + ,uVar17,0,0,0); + iVar7 = local_98; + } + if (*(char *)(iVar6 + 0x110) != '\0') { + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,10,0x1e); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0x38 + ,uVar17,0,0,0); + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,10,0x1f); + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x38,uVar17,0,0,0); + iVar7 = FUN_00608330(&DAT_00fd67f4,0x1e); + if (iVar7 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a) + ,0x3e2,1,0,0,0); + } + iVar8 = FUN_00608330(&DAT_01070468,10); + iVar7 = local_98; + if (iVar8 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a) + ,0x13c3,1,0,0,0); + iVar7 = local_98; + } + } + iVar8 = FUN_00608330(&DAT_01070468,3); + if (iVar8 == 0) { + FUN_006c314c(&local_9c); + iVar8 = FUN_006be868(); + iVar7 = local_98; + if (iVar8 != 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a) + ,0x3a,1,0,0,0); + iVar7 = local_98; + } + } + break; + case 0x15: + case 0x2c: +switchD_006a79a2_caseD_15: + iVar8 = FUN_00608330(&DAT_00fd67f4,0x19); + if (iVar8 == 0) { + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0x76 + ,1,0,0,0); + iVar7 = local_98; + } + if ((*(int *)(iVar6 + 0x104) == 0x15) || (*(int *)(iVar6 + 0x104) == 0x6e)) { + uVar17 = FUN_005c4e6c(&DAT_01070468,1,4); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0x9a + ,uVar17,0,0,0); + iVar7 = local_98; + } + if (*(int *)(iVar6 + 0x104) == 0x2c) { + iVar8 = FUN_00608330(&DAT_00fd67f4,0x14); + if (iVar8 == 0) { + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,0x19a,0x19c); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + uVar17,1,0,0,0); + iVar7 = local_98; + } + else { + uVar17 = FUN_005c4e6c(&DAT_01070468,1,4); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0xa6,uVar17,0,0,0); + iVar7 = local_98; + } + } + else { + if (*(int *)(iVar6 + 0x104) != 0x3eb) goto switchD_006a79a2_caseD_5; + uVar17 = FUN_005c4e6c(&DAT_01070468,0xf,0x37); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0x48 + ,uVar17,0,0,0); + iVar8 = FUN_00608330(&DAT_01070468,10); + iVar7 = local_98; + if (iVar8 == 0) { + uVar17 = FUN_005c4e6c(&DAT_01070468,0x19a,0x19c); + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a) + ,uVar17,1,0,0,0); + iVar7 = local_98; + } + } + break; + case 0x17: + iVar8 = FUN_00608330(&DAT_00fd67f4,0x32); + if (iVar8 == 0) { + uVar17 = 0; + iVar8 = 0x74; + goto LAB_006a7c10; + } + goto switchD_006a79a2_caseD_5; + case 0x18: + iVar8 = FUN_00608330(&DAT_00fd67f4,300); + if (iVar8 == 0) { + uVar17 = 0; + iVar8 = 0xf4; + goto LAB_006a7c10; + } + goto switchD_006a79a2_caseD_5; + case 0x1a: + case 0x1b: + case 0x1c: + case 0x1d: + case 0x6f: + iVar8 = FUN_00608330(&DAT_00fd67f4,200); + if (iVar8 < 100) { + if (iVar8 == 0) { + uVar17 = 0; + iVar8 = 0xa0; + goto LAB_006a7c10; + } + iVar8 = FUN_005c4e6c(&DAT_00fd67f4,1,6); + uVar17 = 0xa1; + goto LAB_006a8428; + } + goto switchD_006a79a2_caseD_5; + case 0x1f: + case 0x20: + iVar8 = FUN_00608330(&DAT_00fd67f4,0xfa); + if (iVar8 == 0) { + uVar17 = 0; + iVar8 = 0x3a4; + goto LAB_006a7c10; + } + iVar8 = FUN_00608330(&DAT_01070468,0x14); + if (iVar8 == 0) { + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x147,1,0,0,0); + iVar7 = local_98; + } + else { + uVar17 = FUN_005c4e6c(&DAT_01070468,1,4); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0x9a + ,uVar17,0,0,0); + iVar7 = local_98; + } + break; + case 0x22: + iVar8 = FUN_00608330(&DAT_01070468,0x11); + if (iVar8 == 0) { + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x147,1,0,0,0); + iVar7 = local_98; + } + break; + case 0x2a: +switchD_006a79a2_caseD_2a: +LAB_006a99a2: + iVar8 = 0xd1; + iVar19 = FUN_00608330(&DAT_00fd67f4,2); + if (iVar19 == 0) goto switchD_006a79a2_caseD_42; + goto switchD_006a79a2_caseD_5; + case 0x2b: + iVar8 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar8 == 0) { + uVar17 = 0; + iVar8 = 0xd2; + goto LAB_006a7c10; + } + goto switchD_006a79a2_caseD_5; + case 0x2d: + uVar17 = 0; + iVar8 = 0xee; + goto LAB_006a7c10; + case 0x2f: +switchD_006a79a2_caseD_2f: + iVar7 = FUN_00735520(); + if (iVar7 != 0) { + fVar27 = *(float *)(iVar6 + 0x1ec); + uVar15 = uVar10 & 0xfffffff | (uint)(fVar27 < 15.0) << 0x1f | (uint)(fVar27 == 15.0) << 0x1e; + uVar10 = uVar15 | (uint)NAN(fVar27) << 0x1c; + bVar4 = (byte)(uVar15 >> 0x18); + if (!(bool)(bVar4 >> 6 & 1) && bVar4 >> 7 == ((byte)(uVar10 >> 0x1c) & 1)) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a) + ,0x13c0,1,0,0,0); + } + } + iVar8 = FUN_00608330(&DAT_01070468,0x4b); + iVar7 = local_98; + if (iVar8 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0xf3,1,0,0,0); + iVar7 = local_98; + } + break; + case 0x30: + iVar8 = FUN_00608330(&DAT_00fd67f4,2); + if (iVar8 == 0) { + uVar17 = 0; + iVar8 = 0x140; + goto LAB_006a7c10; + } + goto switchD_006a79a2_caseD_5; + case 0x32: + iVar8 = FUN_005c4e6c(&DAT_00fd67f4,0x100,0x103); + uVar18 = 1; + uVar17 = 0; + goto LAB_006a7c16; + case 0x34: + uVar17 = 0; + iVar8 = 0xfb; + goto LAB_006a7c10; + case 0x35: + iVar8 = FUN_00608330(&DAT_00fd67f4,5); + if (iVar8 == 0) { + iVar8 = 0x139e; + } + else { + iVar8 = 0xef; + } + uVar17 = 0; + goto LAB_006a7c10; + case 0x36: + uVar17 = 0; + iVar8 = 0x104; + goto LAB_006a7c10; + case 0x37: +switchD_006a79a2_caseD_37: + uVar17 = 0; + iVar8 = 0x105; + goto LAB_006a7c10; + case 0x3a: + iVar8 = FUN_00608330(&DAT_00fd67f4,500); + if (0xc < iVar8) goto switchD_006a79a2_caseD_5; + if (iVar8 == 0) { + uVar17 = 0x107; + } + else { + uVar17 = 0x76; + } + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),uVar17 + ,1,0,0,0); + iVar7 = local_98; + break; + case 0x3e: + iVar8 = FUN_00608330(&DAT_01070468,0x32); + if (iVar8 == 0) { +LAB_006a82b6: + uVar17 = 0x110; +LAB_006a82c0: + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + uVar17,1,0,0xffffffff,0); + iVar7 = local_98; + } + break; + case 0x3f: + case 0x40: + case 0x67: + iVar8 = FUN_00608330(&DAT_00fd67f4,100); + if (iVar8 == 0) { + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x517,1,0,0xffffffff,0); + iVar7 = local_98; + } + uVar18 = FUN_005c4e6c(&DAT_00fd67f4,1,5); + uVar17 = 0; + iVar8 = 0x11a; + goto LAB_006a7c16; + case 0x41: + iVar8 = FUN_00608330(&DAT_00fd67f4,0x32); + uVar14 = *(undefined2 *)(iVar6 + 0x168); + if (iVar8 == 0) { + uVar18 = 1; + uVar17 = 0; + iVar8 = 0x10c; + } + else { + uVar18 = 1; + uVar17 = 0; + iVar8 = 0x13f; + } + goto LAB_006a7c1e; + case 0x42: +switchD_006a79a2_caseD_42: + uVar18 = 1; + uVar17 = 0; + goto LAB_006a7c16; + case 0x45: +switchD_006a79a2_caseD_45: + iVar8 = FUN_00608330(&DAT_01070468,2); + if (iVar8 == 0) { + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x143,1,0,0,0); + iVar7 = local_98; + } + break; + case 0x47: + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0x147, + 1,0,0,0); + iVar7 = local_98; + break; + case 0x49: + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,1,3); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0x16a, + uVar17,0,0,0); + iVar7 = local_98; + break; + case 0x4b: + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,1,4); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0x1f5, + uVar17,0,0,0); + iVar7 = local_98; + break; + case 0x4f: + iVar8 = FUN_00608330(&DAT_01070468,10); + if (iVar8 == 0) { + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x20f,1,0,0,0); + iVar7 = local_98; + } + break; + case 0x50: + iVar8 = FUN_00608330(&DAT_01070468,10); + if (iVar8 == 0) { + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x210,1,0,0,0); + iVar7 = local_98; + } + break; + case 0x51: + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,2,5); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0x17, + uVar17,0,0,0); + iVar7 = local_98; + break; + case 0x53: + iVar8 = FUN_00608330(&DAT_01070468,0xc); + if (iVar8 == 0) { + uVar17 = FUN_005c4e6c(&DAT_01070468,2,5); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x187,uVar17,0,0,0); + iVar7 = local_98; + } + else { + iVar8 = FUN_00608330(&DAT_01070468,6); + if (iVar8 == 0) { + uVar17 = FUN_005c4e6c(&DAT_01070468,2,5); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x17e,uVar17,0,0,0); + iVar7 = local_98; + } + else { + iVar8 = FUN_00608330(&DAT_01070468,3); + if (iVar8 == 0) { + uVar17 = FUN_005c4e6c(&DAT_01070468,2,5); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x17d,uVar17,0,0,0); + iVar7 = local_98; + } + } + } + break; + case 0x55: + fVar27 = *(float *)(iVar6 + 0x1ec); + uVar15 = uVar10 & 0xfffffff; + uVar9 = uVar15 | (uint)(fVar27 < 0.0) << 0x1f | (uint)(fVar27 == 0.0) << 0x1e; + uVar10 = uVar9 | (uint)NAN(fVar27) << 0x1c; + bVar4 = (byte)(uVar9 >> 0x18); + if (!(bool)(bVar4 >> 6 & 1) && bVar4 >> 7 == ((byte)(uVar10 >> 0x1c) & 1)) { + uVar10 = uVar15 | (uint)(*(float *)(iVar6 + 0x184) == 4.0) << 0x1e; + if ((byte)(uVar10 >> 0x1e) == 0) { + uVar17 = FUN_00608330(&DAT_00fd67f4,7); + switch(uVar17) { + case 0: + iVar8 = 0x1b5; + break; + case 1: + iVar8 = 0x205; + break; + case 2: + iVar8 = 0x217; + break; + case 3: + iVar8 = 0x218; + break; + case 4: + iVar8 = 0x214; + break; + case 5: + uVar17 = FUN_005c4e6c(&DAT_01070468,1,2); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x231,uVar17,0,0xffffffff,0); + iVar7 = local_98; + goto LAB_006a99ce; + default: + iVar8 = 0x22a; + } + } + else { + iVar8 = FUN_00608330(&DAT_00fd67f4,0x14); + if (iVar8 == 0) { + iVar8 = 0x520; + } + else { + iVar8 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar8 == 0) { + iVar8 = 0x2a4; + } + else if (iVar8 == 1) { + iVar8 = 0x2d5; + } + else { + if (iVar8 != 2) goto switchD_006a79a2_caseD_5; + iVar8 = 0x4f0; + } + } + } +LAB_006a7c0a: + uVar17 = 0xffffffff; + goto LAB_006a7c10; + } + goto switchD_006a79a2_caseD_5; + case 0x56: + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0x20e, + 1,0,0,0); + iVar8 = FUN_00608330(&DAT_00fd67f4,100); + iVar7 = local_98; + if (iVar8 == 0) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x358,1,0,0,0); + iVar7 = local_98; + } + break; + case 0x57: + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,5,0xb); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0x23f, + uVar17,0,0,0); + iVar7 = local_98; + break; + case 0x62: + case 0x65: + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,2,6); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0x20a, + uVar17,0,0,0); + iVar7 = local_98; + break; + case 0x66: + iVar8 = FUN_00608330(&DAT_00fd67f4,500); + if (iVar8 != 0) goto switchD_006a79a2_caseD_5; + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0x107, + 1,0,0,0); + iVar7 = local_98; + break; + case 0x68: + iVar8 = FUN_00608330(&DAT_00fd67f4,0x3c); + if (iVar8 == 0) { + iVar8 = 0x1e5; + goto LAB_006a7c0a; + } + iVar8 = FUN_00608330(&DAT_00fd67f4,0x14); + if (iVar8 != 0) goto switchD_006a79a2_caseD_5; + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0x139d + ,1,0,0,0); + iVar7 = local_98; + break; + case 0x6d: + if ((DAT_00fe1f85 == '\0') && (DAT_00fe1f85 = '\x01', DAT_00fe1ec4 == 2)) { + FUN_00647dc0(0); + iVar7 = local_98; + } +switchD_006a79a2_caseD_5: + break; + case 0x71: + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0x16f, + 1,0,0xffffffff,0); + iVar7 = FUN_00608330(&DAT_00fd67f4,2); + if (iVar7 == 0) { + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,0x1e9,0x1ec); + } + else { + iVar7 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar7 == 0) { + uVar17 = 0x202; + } + else if (iVar7 == 1) { + uVar17 = 0x1aa; + } + else { + uVar17 = 0x1b2; + } + } + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + uVar17,1,0,0xffffffff,0); + iVar19 = (*(ushort *)(iVar6 + 0x168) >> 5) + 1; + iVar8 = *(int *)(iVar6 + 0x148) + (*(int *)(iVar6 + 0x150) >> 1) >> 4; + iVar24 = iVar8 - iVar19; + iVar8 = iVar19 + iVar8; + iVar7 = local_98; + if (iVar24 <= iVar8) { + iVar1 = *(int *)(iVar6 + 0x14c) + (*(int *)(iVar6 + 0x154) >> 1) >> 4; + iVar22 = iVar1 - iVar19; + iVar19 = iVar19 + iVar1; + iVar1 = iVar22; + iVar23 = iVar24; + do { + for (; local_98 = iVar7, iVar1 <= iVar19; iVar1 = iVar1 + 1) { + bVar25 = false; + iVar7 = (DAT_00902934 * iVar23 + iVar1) * 0xe + DAT_00902928; + if (((((iVar23 == iVar24) || (iVar23 == iVar8)) || (iVar1 == iVar22)) || (iVar1 == iVar19) + ) && ((*(byte *)(iVar7 + 1) & 1) == 0)) { + *(byte *)(iVar7 + 1) = *(byte *)(iVar7 + 1) | 1; + *(undefined2 *)(iVar7 + 6) = 0x8c; + FUN_007729e8(iVar23,iVar1,0xffffffff); + bVar25 = true; + } + if (*(char *)(iVar7 + 4) != '\0') { + *(ushort *)(iVar7 + 2) = *(ushort *)(iVar7 + 2) & 0xcfff; + *(undefined1 *)(iVar7 + 4) = 0; + bVar25 = true; + } + if (bVar25) { + FUN_00649a94(iVar23,iVar1,0,0); + } + iVar7 = local_98; + } + iVar23 = iVar23 + 1; + iVar1 = iVar22; + } while (iVar23 <= iVar8); + goto switchD_006a79a2_caseD_5; + } + break; + case 0x74: + case 0x75: + case 0x76: + case 0x77: + case 0x8b: + uVar17 = 0; + iVar8 = 0x3a; +LAB_006a7c10: + uVar18 = 1; +LAB_006a7c16: + uVar14 = *(undefined2 *)(iVar6 + 0x168); +LAB_006a7c1e: + FUN_00631590(local_9c,iVar7,uVar14,*(undefined2 *)(iVar6 + 0x16a),iVar8,uVar18,0,uVar17,0); + iVar7 = local_98; + break; + case 0x78: + iVar8 = FUN_00608330(&DAT_01070468,0x32); + if (iVar8 == 0) { + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x1ef,1,0,0,0); + iVar7 = local_98; + } +LAB_006a9554: + iVar8 = FUN_00608330(&DAT_01070468,3); + if (iVar8 == 0) { + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x208,1,0,0,0); + iVar7 = local_98; + } + break; + case 0x7a: + uVar17 = FUN_005c4e6c(&DAT_01070468,5,0xb); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0x17, + uVar17,0,0,0); + iVar7 = local_98; + break; + case 0x7d: + case 0x7e: + if (iVar19 == 0x7d) { + uVar17 = 0x7e; + } + else { + uVar17 = 0x7d; + } + iVar8 = FUN_00656370(uVar17); + if (iVar8 == 0) { + uVar18 = FUN_005c4e6c(&DAT_00fd67f4,0x14,0x1f); + uVar17 = 0x225; + goto LAB_006a8b0c; + } + *(undefined4 *)(iVar6 + 0x1ec) = DAT_006a8b5c; + *(undefined1 *)(iVar6 + 0x110) = 0; + iVar7 = local_98; + break; + case 0x7f: + uVar18 = FUN_005c4e6c(&DAT_00fd67f4,0x14,0x1f); + uVar17 = 0x223; + goto LAB_006a8b0c; + case 0x86: + uVar18 = FUN_005c4e6c(&DAT_00fd67f4,0x14,0x1f); + uVar17 = 0x224; +LAB_006a8b0c: + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),uVar17 + ,uVar18,0,0,0); + iVar8 = FUN_005c4e6c(&DAT_00fd67f4,0x14,0x24); + uVar17 = 0x4c9; + iVar7 = local_98; +LAB_006a8428: + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),uVar17 + ,iVar8,0,0,0); + iVar7 = local_98; + break; + case 0x8f: + case 0x90: + case 0x91: + uVar17 = FUN_005c4e6c(&DAT_00fd67f4,5,0xb); + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a),0x251, + uVar17,0,0,0); + iVar7 = local_98; + } +LAB_006a99ce: + if (((*(char *)(iVar6 + 0x110) != '\0') || (*(int *)(iVar6 + 0x104) == 0x7d)) || + (*(int *)(iVar6 + 0x104) == 0x7e)) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = DAT_00fd6800 ^ uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8; + fVar27 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + if ((int)(fVar27 * fVar26 * 10.0) == 0) { + iVar8 = *(int *)(iVar6 + 0x104); + if (iVar8 == 4) { + uVar17 = 0x550; + } + else if (((iVar8 == 0xd) || (iVar8 == 0xe)) || (iVar8 == 0xf)) { + uVar17 = 0x551; + } + else if (iVar8 == 0x10a) { + uVar17 = 0x552; + } + else if (iVar8 == 0x23) { + uVar17 = 0x553; + } + else if (iVar8 == 0xde) { + uVar17 = 0x554; + } + else if (iVar8 == 0x71) { + uVar17 = 0x555; + } + else if (iVar8 == 0x86) { + uVar17 = 0x556; + } + else if (iVar8 == 0x7f) { + uVar17 = 0x557; + } + else if (iVar8 == 0x7d) { + uVar17 = 0x558; + } + else if (iVar8 == 0x7e) { + uVar17 = 0x559; + } + else if (iVar8 == 0x106) { + uVar17 = 0x55a; + } + else if (iVar8 == 0xf5) { + uVar17 = 0x55b; + } + else { + if (iVar8 != 0x3fc) goto LAB_006a9af2; + uVar17 = 0x13ac; + } + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + uVar17,1,0,0,0); + iVar7 = local_98; + } + } +LAB_006a9af2: + if (((*(char *)(iVar6 + 0x110) != '\0') || (*(int *)(iVar6 + 0x104) == 0x147)) || + (*(int *)(iVar6 + 0x104) == 0x145)) { + sVar3 = *(short *)(iVar6 + 0x1f0); + if (0 < *(int *)(iVar6 + 0x5c)) { + sVar3 = *(short *)(*(int *)(iVar6 + 0x5c) * 0x274 + DAT_00fe1fa8 + 0x1f0); + } + FUN_0072701c((int)sVar3); + FUN_00736e98(); + iVar7 = local_98; + } + if (*(char *)(iVar6 + 0x110) != '\0') { + FUN_00595220(auStack_8c,iVar6 + 0x234); + iVar7 = *(int *)(iVar6 + 0x104); + if (iVar7 < 0x80) { + if (iVar7 == 0x7f) { + FUN_00736ecc(0xd); + DAT_00fe1f8a = '\x01'; + DAT_00fe1f8b = '\x01'; + } + else if (iVar7 < 0x24) { + if (iVar7 == 0x23) { + DAT_00fe1f7b = 1; + } + else if (iVar7 == 4) { + DAT_00fe1f73 = 1; + } + else if (iVar7 - 0xdU < 3) { + DAT_00fe1f7a = 1; + } + } + else if (iVar7 - 0x7dU < 2) { + DAT_00fe1f89 = '\x01'; + DAT_00fe1f8b = '\x01'; + FUN_007aa80c(auStack_8c,auStack_fc,&DAT_00fd6d08); + FUN_007aa754(auStack_fc); + FUN_00736ecc(0xc); + } + } + else if (iVar7 < 0x3ff) { + if (iVar7 == 0x3fe) { + iVar8 = FUN_00656030(); + iVar7 = DAT_006aa14c; + if (iVar8 != 1) goto LAB_006a9d04; + do { + if (*(int *)(iVar7 + DAT_00fe1fa8 + 0x104) == 0x3ff) { + *(undefined1 *)(iVar7 + DAT_00fe1fa8 + 0x100) = 0; + } + iVar7 = iVar7 + -0x274; + } while (-1 < iVar7); + DAT_00fe1f86 = 1; + uVar17 = FUN_0041c4d8(auStack_15c,&DAT_0080ed7b); + uVar18 = FUN_0041c4d8(auStack_18c,&DAT_0080ed7b); + uVar31 = FUN_0041c4d8(auStack_12c,"EasterBunniesKilled"); + FUN_004c9784(uVar31,uVar18,uVar17); + iVar7 = FUN_00608330(&DAT_01070468,3); + if (iVar7 == 0) { + uVar17 = 0x13c2; + } + else { + uVar17 = 0x13c1; + } + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a) + ,uVar17,1,0,0,0); + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a) + ,0x13c0,1,0,0,0); + } + else if (iVar7 == 0x86) { + FUN_00736ecc(0xe); + DAT_00fe1f88 = '\x01'; + DAT_00fe1f8b = '\x01'; + } + } + else if (iVar7 - 0x401U < 2) { + iVar7 = FUN_00656030(0x402); + iVar8 = FUN_00656030(0x401); + if (iVar8 + iVar7 == 1) { + DAT_00fe1f8f = 1; + uVar17 = FUN_0041c4d8(auStack_174,&DAT_0080ed7b); + uVar18 = FUN_0041c4d8(auStack_144,&DAT_0080ed7b); + uVar31 = FUN_0041c4d8(auStack_114,"TurkorsKilled"); + FUN_004c9784(uVar31,uVar18,uVar17); + iVar7 = FUN_00608330(&DAT_01070468,5); + if (1 < iVar7) { + iVar7 = iVar7 + -1; + do { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x140,1,0,0xffffffff,0); + iVar7 = iVar7 + -1; + } while (iVar7 != 0); + } + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a) + ,0x13c9,1,0,0xffffffff,0); + } + else { +LAB_006a9d04: + *(undefined1 *)(iVar6 + 0x110) = 0; + } + } + if (*(char *)(iVar6 + 0x110) != '\0') { + iVar7 = *(int *)(iVar6 + 0x104); + uVar17 = 0x1c; + if (iVar7 == 0x71) { + uVar17 = 0xbc; + } + else if (iVar7 == 0xde) { + uVar17 = 0x46e; + } + else if ((((0x71 < iVar7) && (iVar7 < 0xde)) || (iVar7 == 0xf5)) || (iVar7 == 0x106)) { + uVar17 = 499; + } + uVar18 = FUN_005c4e6c(&DAT_00fd67f4,5,0x10); + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + uVar17,uVar18,0,0,0); + for (iVar7 = FUN_005c4e6c(&DAT_00fd67f4,5,10); 0 < iVar7; iVar7 = iVar7 + -1) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a) + ,0x3a,1,0,0,0); + } + if (*(int *)(iVar6 + 0x104) == 0x71) { + FUN_00767524(); + } + uVar17 = FUN_00595220(auStack_cc,auStack_8c); + FUN_0064a758(uVar17,0x11,0xaf,0x4b,0xff,0xffffffff); + FUN_00647dc0(0); + } + FUN_007aa754(auStack_8c); + iVar7 = local_98; + } + if ((cVar5 == '\0') && (DAT_00fe1f8b != '\0')) { + FUN_00646f20(0x32,0x32,0xff,0x82,0xffffffff); + FUN_007832fc(); + FUN_007832fc(); + FUN_007832fc(); + iVar7 = local_98; + } + uVar15 = DAT_00fd6800; + if ((1 < *(int *)(iVar6 + 0x1b8)) && (0 < *(int *)(iVar6 + 0x19c))) { + uVar17 = FUN_006c314c(&local_9c); + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar15 = uVar15 ^ DAT_00fd6800 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8; + DAT_00fd67fc = DAT_00fd6800; + fVar27 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + DAT_00fd6800 = uVar15; + if ((int)(fVar27 * fVar26 * 6.0) == 0) { + iVar7 = FUN_00608330(&DAT_00fd67f4,2); + if ((iVar7 == 0) && (iVar7 = FUN_006be850(uVar17), iVar7 != 0)) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a) + ,0xb8,1,0,0,0); + } + else { + iVar7 = FUN_00608330(&DAT_00fd67f4,2); + if ((iVar7 == 0) && (iVar7 = FUN_006be868(uVar17), iVar7 != 0)) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168), + *(undefined2 *)(iVar6 + 0x16a),0x3a,1,0,0,0); + } + } + } + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar15 = DAT_00fd6800 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ uVar15; + fVar27 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + iVar7 = local_98; + DAT_00fd67fc = DAT_00fd6800; + if (((int)(fVar27 * fVar26 * 2.0) == 0) && + (DAT_00fd6800 = uVar15, iVar8 = FUN_006be850(uVar17), iVar7 = local_98, uVar15 = DAT_00fd6800 + , iVar8 != 0)) { + FUN_00631590(local_9c,local_98,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0xb8,1,0,0,0); + iVar7 = local_98; + uVar15 = DAT_00fd6800; + } + } + DAT_00fd6800 = uVar15; + fVar27 = *(float *)(iVar6 + 0x1ec); + if (*(char *)(iVar6 + 0xf2) != '\0') { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = DAT_00fd6800 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ uVar15; + fVar28 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + fVar28 = (float)VectorSignedToFloat(10 - (int)(fVar28 * fVar26 * DAT_006aa144), + (byte)(uVar10 >> 0x16) & 3); + fVar27 = (fVar28 * DAT_006aa148 + 1.0) * fVar27; + } + uVar11 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + uVar11 = uVar11 ^ DAT_00fd6800 ^ (uVar11 ^ DAT_00fd6800 >> 0xb) >> 8; + fVar28 = (float)VectorSignedToFloat(uVar11 & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + uVar16 = DAT_00fd67f8 ^ DAT_00fd67f8 << 0xb; + fVar28 = (float)VectorSignedToFloat(-0x14 - (int)(fVar28 * fVar26 * DAT_006aa140), + (byte)(uVar10 >> 0x16) & 3); + uVar16 = uVar11 ^ (uVar16 ^ uVar11 >> 0xb) >> 8 ^ uVar16; + fVar27 = (fVar28 * DAT_006aa148 + 1.0) * fVar27; + fVar28 = (float)VectorSignedToFloat(uVar16 & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + uVar15 = uVar11; + uVar9 = DAT_00fd6800; + DAT_00fd67f4 = uVar16; + if ((int)(fVar28 * fVar26 * 5.0) == 0) { + uVar15 = DAT_00fd67fc ^ DAT_00fd67fc << 0xb; + DAT_00fd67f4 = uVar15 ^ uVar16 ^ (uVar15 ^ uVar16 >> 0xb) >> 8; + fVar28 = (float)VectorSignedToFloat(DAT_00fd67f4 & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + fVar28 = (float)VectorSignedToFloat(5 - (int)(fVar28 * fVar26 * -6.0),(byte)(uVar10 >> 0x16) & 3 + ); + fVar27 = (fVar28 * DAT_006aa148 + 1.0) * fVar27; + uVar15 = uVar16; + uVar9 = uVar11; + DAT_00fd67fc = DAT_00fd6800; + } + uVar16 = DAT_00fd67fc ^ DAT_00fd67fc << 0xb; + uVar16 = DAT_00fd67f4 ^ (uVar16 ^ DAT_00fd67f4 >> 0xb) >> 8 ^ uVar16; + fVar28 = (float)VectorSignedToFloat(uVar16 & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + uVar11 = uVar15; + DAT_00fd67f8 = uVar16; + if ((int)(fVar28 * fVar26 * 10.0) == 0) { + uVar9 = uVar9 ^ uVar9 << 0xb; + DAT_00fd67f8 = uVar9 ^ uVar16 ^ (uVar9 ^ uVar16 >> 0xb) >> 8; + fVar28 = (float)VectorSignedToFloat(DAT_00fd67f8 & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + fVar28 = (float)VectorSignedToFloat(10 - (int)(fVar28 * fVar26 * -11.0), + (byte)(uVar10 >> 0x16) & 3); + fVar27 = (fVar28 * DAT_006aa148 + 1.0) * fVar27; + uVar11 = DAT_00fd67f4; + uVar9 = uVar15; + DAT_00fd67f4 = uVar16; + } + uVar9 = uVar9 ^ uVar9 << 0xb; + uVar9 = DAT_00fd67f8 ^ (uVar9 ^ DAT_00fd67f8 >> 0xb) >> 8 ^ uVar9; + fVar28 = (float)VectorSignedToFloat(uVar9 & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + DAT_00fd67fc = uVar9; + if ((int)(fVar28 * fVar26 * 15.0) == 0) { + uVar11 = uVar11 ^ uVar11 << 0xb; + DAT_00fd67fc = uVar11 ^ uVar9 ^ (uVar11 ^ uVar9 >> 0xb) >> 8; + fVar28 = (float)VectorSignedToFloat(DAT_00fd67fc & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + fVar28 = (float)VectorSignedToFloat(0xf - (int)(fVar28 * fVar26 * -16.0), + (byte)(uVar10 >> 0x16) & 3); + fVar27 = (fVar28 * DAT_006aa148 + 1.0) * fVar27; + uVar11 = DAT_00fd67f4; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = uVar9; + } + uVar11 = uVar11 ^ uVar11 << 0xb; + uVar11 = DAT_00fd67fc ^ (uVar11 ^ DAT_00fd67fc >> 0xb) >> 8 ^ uVar11; + fVar28 = (float)VectorSignedToFloat(uVar11 & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + DAT_00fd6800 = uVar11; + if ((int)(fVar28 * fVar26 * 20.0) == 0) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd6800 = uVar11 ^ (uVar15 ^ uVar11 >> 0xb) >> 8 ^ uVar15; + fVar28 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + fVar28 = (float)VectorSignedToFloat(0x14 - (int)(fVar28 * fVar26 * -21.0), + (byte)(uVar10 >> 0x16) & 3); + fVar27 = (fVar28 * DAT_006aa148 + 1.0) * fVar27; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = uVar11; + } + iVar8 = (int)fVar27; + uVar15 = DAT_00fd6800; + uVar9 = DAT_00fd67f4; + uVar11 = DAT_00fd67f8; + uVar16 = DAT_00fd67fc; + while (0 < iVar8) { + if (DAT_006aa980 < iVar8) { + iVar19 = (int)((ulonglong)((longlong)iVar8 * (longlong)DAT_006aa97c) >> 0x20); + local_1a4 = (iVar19 >> 0x12) - (iVar19 >> 0x1f); + local_19c = uVar15; + uVar12 = uVar11; + uVar13 = uVar16; + if (0x32 < local_1a4) { + uVar9 = uVar9 ^ uVar9 << 0xb; + uVar20 = uVar15 ^ (uVar9 ^ uVar15 >> 0xb) >> 8 ^ uVar9; + fVar27 = (float)VectorSignedToFloat(uVar20 & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + local_19c = uVar20; + uVar9 = uVar11; + uVar12 = uVar16; + uVar13 = uVar15; + if ((int)(fVar27 * fVar26 * 5.0) == 0) { + uVar11 = uVar11 ^ uVar11 << 0xb; + local_19c = uVar20 ^ (uVar11 ^ uVar20 >> 0xb) >> 8 ^ uVar11; + fVar27 = (float)VectorSignedToFloat(local_19c & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + iVar19 = 1 - (int)(fVar27 * fVar26 * -3.0); + if (iVar19 == 0) { + /* WARNING: Does not return */ + pcVar2 = (code *)software_udf(0xf9,0x6aa41e); + (*pcVar2)(); + } + local_1a4 = FUN_007ffe94(iVar19,local_1a4); + uVar9 = uVar16; + uVar12 = uVar15; + uVar13 = uVar20; + } + } + uVar9 = uVar9 ^ uVar9 << 0xb; + uVar16 = local_19c ^ (uVar9 ^ local_19c >> 0xb) >> 8 ^ uVar9; + fVar27 = (float)VectorSignedToFloat(uVar16 & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + uVar15 = uVar16; + uVar9 = uVar12; + uVar11 = uVar13; + DAT_00fd67f4 = uVar12; + DAT_00fd67f8 = uVar13; + DAT_00fd67fc = local_19c; + DAT_00fd6800 = uVar16; + if ((int)(fVar27 * fVar26 * 5.0) == 0) { + uVar12 = uVar12 ^ uVar12 << 0xb; + uVar15 = uVar16 ^ (uVar12 ^ uVar16 >> 0xb) >> 8 ^ uVar12; + fVar27 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + iVar19 = 1 - (int)(fVar27 * fVar26 * -3.0); + DAT_00fd67fc = uVar16; + DAT_00fd6800 = uVar15; + DAT_00fd67f4 = uVar13; + DAT_00fd67f8 = local_19c; + if (iVar19 == 0) { + /* WARNING: Does not return */ + pcVar2 = (code *)software_udf(0xf9,0x6aa4ba); + (*pcVar2)(); + } + local_1a4 = FUN_007ffe94(iVar19,local_1a4); + uVar9 = uVar13; + uVar11 = local_19c; + local_19c = uVar16; + } + uVar16 = local_19c; + if (0 < local_1a4) { + iVar8 = iVar8 - local_1a4 * DAT_006aa980; + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x4a,local_1a4,0,0,0); + iVar7 = local_98; + uVar15 = DAT_00fd6800; + uVar9 = DAT_00fd67f4; + uVar11 = DAT_00fd67f8; + uVar16 = DAT_00fd67fc; + } + } + else if (iVar8 < 0x2711) { + if (iVar8 < 0x65) { + if (iVar8 < 1) break; + DAT_00fd6800 = uVar15; + DAT_00fd67f4 = uVar9; + DAT_00fd67f8 = uVar11; + DAT_00fd67fc = uVar16; + local_1a4 = iVar8; + if (0x32 < iVar8) { + uVar9 = uVar9 ^ uVar9 << 0xb; + DAT_00fd6800 = uVar15 ^ (uVar9 ^ uVar15 >> 0xb) >> 8 ^ uVar9; + fVar27 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + DAT_00fd67f4 = uVar11; + DAT_00fd67f8 = uVar16; + DAT_00fd67fc = uVar15; + if ((int)(fVar27 * fVar26 * 5.0) == 0) { + iVar19 = FUN_005c4e6c(&DAT_00fd67f4,1,4); + if (iVar19 == 0) { + /* WARNING: Does not return */ + pcVar2 = (code *)software_udf(0xf9,0x6aa854); + (*pcVar2)(); + } + local_1a4 = FUN_007ffe94(iVar19,iVar8); + } + } + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + uVar11 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar27 = (float)VectorSignedToFloat(uVar11 & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + DAT_00fd67f4 = DAT_00fd67f8; + uVar15 = DAT_00fd67fc; + uVar9 = DAT_00fd6800; + if ((int)(fVar27 * fVar26 * 5.0) == 0) { + uVar15 = DAT_00fd67f8 ^ DAT_00fd67f8 << 0xb; + uVar15 = uVar15 ^ (uVar15 ^ uVar11 >> 0xb) >> 8 ^ uVar11; + fVar27 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + iVar19 = 1 - (int)(fVar27 * fVar26 * -3.0); + DAT_00fd67f4 = DAT_00fd67fc; + DAT_00fd67f8 = DAT_00fd6800; + if (iVar19 == 0) { + /* WARNING: Does not return */ + pcVar2 = (code *)software_udf(0xf9,0x6aa8ee); + DAT_00fd67fc = uVar11; + DAT_00fd6800 = uVar15; + (*pcVar2)(); + } + DAT_00fd67fc = uVar11; + DAT_00fd6800 = uVar15; + local_1a4 = FUN_007ffe94(iVar19,local_1a4); + uVar15 = DAT_00fd67f8; + uVar9 = DAT_00fd67fc; + uVar11 = DAT_00fd6800; + } + DAT_00fd6800 = uVar11; + DAT_00fd67fc = uVar9; + DAT_00fd67f8 = uVar15; + if (local_1a4 < 1) { + local_1a4 = 1; + } + iVar8 = iVar8 - local_1a4; + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x47,local_1a4,0,0,0); + iVar7 = local_98; + uVar15 = DAT_00fd6800; + uVar9 = DAT_00fd67f4; + uVar11 = DAT_00fd67f8; + uVar16 = DAT_00fd67fc; + } + else { + iVar19 = (int)((ulonglong)((longlong)iVar8 * (longlong)DAT_006aa984) >> 0x20); + local_1a4 = (iVar19 >> 5) - (iVar19 >> 0x1f); + uVar12 = uVar15; + uVar13 = uVar11; + uVar20 = uVar16; + if (0x32 < local_1a4) { + uVar9 = uVar9 ^ uVar9 << 0xb; + uVar21 = uVar15 ^ (uVar9 ^ uVar15 >> 0xb) >> 8 ^ uVar9; + fVar27 = (float)VectorSignedToFloat(uVar21 & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + uVar12 = uVar21; + uVar9 = uVar11; + uVar13 = uVar16; + uVar20 = uVar15; + if ((int)(fVar27 * fVar26 * 5.0) == 0) { + uVar11 = uVar11 ^ uVar11 << 0xb; + uVar12 = uVar21 ^ (uVar11 ^ uVar21 >> 0xb) >> 8 ^ uVar11; + fVar27 = (float)VectorSignedToFloat(uVar12 & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + iVar19 = 1 - (int)(fVar27 * fVar26 * -3.0); + if (iVar19 == 0) { + /* WARNING: Does not return */ + pcVar2 = (code *)software_udf(0xf9,0x6aa706); + (*pcVar2)(); + } + local_1a4 = FUN_007ffe94(iVar19,local_1a4); + uVar9 = uVar16; + uVar13 = uVar15; + uVar20 = uVar21; + } + } + uVar9 = uVar9 ^ uVar9 << 0xb; + uVar9 = uVar12 ^ (uVar9 ^ uVar12 >> 0xb) >> 8 ^ uVar9; + fVar27 = (float)VectorSignedToFloat(uVar9 & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + uVar15 = uVar9; + DAT_00fd67f4 = uVar13; + DAT_00fd67f8 = uVar20; + DAT_00fd67fc = uVar12; + DAT_00fd6800 = uVar9; + if ((int)(fVar27 * fVar26 * 5.0) == 0) { + uVar13 = uVar13 ^ uVar13 << 0xb; + uVar15 = uVar13 ^ (uVar13 ^ uVar9 >> 0xb) >> 8 ^ uVar9; + fVar27 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + iVar19 = 1 - (int)(fVar27 * fVar26 * -3.0); + DAT_00fd67fc = uVar9; + DAT_00fd6800 = uVar15; + DAT_00fd67f4 = uVar20; + DAT_00fd67f8 = uVar12; + if (iVar19 == 0) { + /* WARNING: Does not return */ + pcVar2 = (code *)software_udf(0xf9,0x6aa7a2); + (*pcVar2)(); + } + local_1a4 = FUN_007ffe94(iVar19,local_1a4); + uVar13 = uVar20; + uVar20 = uVar12; + uVar12 = uVar9; + } + uVar9 = uVar13; + uVar11 = uVar20; + uVar16 = uVar12; + if (0 < local_1a4) { + iVar8 = iVar8 + local_1a4 * -100; + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x48,local_1a4,0,0,0); + iVar7 = local_98; + uVar15 = DAT_00fd6800; + uVar9 = DAT_00fd67f4; + uVar11 = DAT_00fd67f8; + uVar16 = DAT_00fd67fc; + } + } + } + else { + iVar19 = (int)((ulonglong)((longlong)iVar8 * (longlong)DAT_006aa988) >> 0x20); + local_1a4 = (iVar19 >> 0xc) - (iVar19 >> 0x1f); + uVar12 = uVar15; + uVar13 = uVar11; + uVar20 = uVar16; + if (0x32 < local_1a4) { + uVar9 = uVar9 ^ uVar9 << 0xb; + uVar21 = uVar15 ^ (uVar9 ^ uVar15 >> 0xb) >> 8 ^ uVar9; + fVar27 = (float)VectorSignedToFloat(uVar21 & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + uVar12 = uVar21; + uVar9 = uVar11; + uVar13 = uVar16; + uVar20 = uVar15; + if ((int)(fVar27 * fVar26 * 5.0) == 0) { + uVar11 = uVar11 ^ uVar11 << 0xb; + uVar12 = uVar21 ^ (uVar11 ^ uVar21 >> 0xb) >> 8 ^ uVar11; + fVar27 = (float)VectorSignedToFloat(uVar12 & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + iVar19 = 1 - (int)(fVar27 * fVar26 * -3.0); + if (iVar19 == 0) { + /* WARNING: Does not return */ + pcVar2 = (code *)software_udf(0xf9,0x6aa592); + (*pcVar2)(); + } + local_1a4 = FUN_007ffe94(iVar19,local_1a4); + uVar9 = uVar16; + uVar13 = uVar15; + uVar20 = uVar21; + } + } + uVar9 = uVar9 ^ uVar9 << 0xb; + uVar9 = uVar12 ^ (uVar9 ^ uVar12 >> 0xb) >> 8 ^ uVar9; + fVar27 = (float)VectorSignedToFloat(uVar9 & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + uVar15 = uVar9; + DAT_00fd67f4 = uVar13; + DAT_00fd67f8 = uVar20; + DAT_00fd67fc = uVar12; + DAT_00fd6800 = uVar9; + if ((int)(fVar27 * fVar26 * 5.0) == 0) { + uVar13 = uVar13 ^ uVar13 << 0xb; + uVar15 = uVar9 ^ (uVar13 ^ uVar9 >> 0xb) >> 8 ^ uVar13; + fVar27 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(uVar10 >> 0x16) & 3); + iVar19 = 1 - (int)(fVar27 * fVar26 * -3.0); + DAT_00fd67fc = uVar9; + DAT_00fd6800 = uVar15; + DAT_00fd67f4 = uVar20; + DAT_00fd67f8 = uVar12; + if (iVar19 == 0) { + /* WARNING: Does not return */ + pcVar2 = (code *)software_udf(0xf9,0x6aa62c); + (*pcVar2)(); + } + local_1a4 = FUN_007ffe94(iVar19,local_1a4); + uVar13 = uVar20; + uVar20 = uVar12; + uVar12 = uVar9; + } + uVar9 = uVar13; + uVar11 = uVar20; + uVar16 = uVar12; + if (0 < local_1a4) { + iVar8 = iVar8 + local_1a4 * -10000; + FUN_00631590(local_9c,iVar7,*(undefined2 *)(iVar6 + 0x168),*(undefined2 *)(iVar6 + 0x16a), + 0x49,local_1a4,0,0,0); + iVar7 = local_98; + uVar15 = DAT_00fd6800; + uVar9 = DAT_00fd67f4; + uVar11 = DAT_00fd67f8; + uVar16 = DAT_00fd67fc; + } + } + } +LAB_006aa94a: + FUN_007ffb98(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006abb14.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006abb14.c new file mode 100644 index 000000000..40c834180 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006abb14.c @@ -0,0 +1,254 @@ + +int FUN_006abb14(int *param_1) + +{ + uint uVar1; + uint uVar2; + undefined1 uVar3; + int iVar4; + int iVar5; + uint uVar6; + uint uVar7; + int iVar8; + int iVar9; + uint uVar10; + uint uVar11; + int iVar12; + int iVar13; + uint in_fpscr; + float fVar14; + float fVar15; + undefined4 uVar16; + + uVar2 = DAT_00fd6800; + uVar1 = DAT_00fd67fc; + uVar7 = DAT_00fd67f8; + uVar6 = DAT_00fd67f4; + fVar14 = DAT_006abfe4; + iVar8 = param_1[1]; + iVar13 = *param_1; + iVar12 = param_1[3]; + iVar4 = param_1[5]; + uVar10 = param_1[2] - (int)DAT_010338cc >> 0x1f; + iVar9 = (param_1[2] - (int)DAT_010338cc ^ uVar10) - uVar10; + iVar5 = (int)((ulonglong)((longlong)(int)DAT_00902ea0 * (longlong)DAT_006abc24) >> 0x20); + if (iVar5 - (iVar5 >> 0x1f) <= iVar9) { + if (iVar9 <= DAT_00902ea0) { + return -1; + } + uVar10 = DAT_00fd6800; + uVar11 = DAT_00fd67fc; + if (iVar4 == 2) { + DAT_00fd67f4 = DAT_00fd67f8; + uVar6 = uVar6 ^ uVar6 << 0xb; + DAT_00fd67f8 = DAT_00fd67fc; + uVar10 = DAT_00fd6800 ^ (uVar6 ^ DAT_00fd6800 >> 0xb) >> 8 ^ uVar6; + DAT_00fd67fc = DAT_00fd6800; + fVar15 = (float)VectorSignedToFloat(uVar10 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + uVar11 = uVar2; + uVar6 = uVar7; + uVar7 = uVar1; + if (((int)(fVar15 * DAT_006abfe4 * DAT_006abfe0) == 0) && + (DAT_00fd6800 = uVar10, iVar4 = FUN_00656370(0x32), iVar4 == 0)) { + iVar4 = FUN_00685550(iVar13,iVar8,0x32,0); + return iVar4; + } + } + uVar6 = uVar6 ^ uVar6 << 0xb; + DAT_00fd6800 = uVar6 ^ (uVar6 ^ uVar10 >> 0xb) >> 8 ^ uVar10; + fVar15 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67f4 = uVar7; + DAT_00fd67f8 = uVar11; + DAT_00fd67fc = uVar10; + if ((int)(fVar15 * fVar14 * 15.0) != 0) { + if (DAT_00fe1f83 != '\0') { + return -1; + } + if (DAT_0102a76f == '\0') { + return -1; + } + iVar4 = FUN_00608330(&DAT_00fd67f4,7); + if (iVar4 != 0) { + return -1; + } + } + iVar5 = 0; + iVar4 = DAT_00fe1fa8; + while (*(char *)(iVar4 + 0x100) != '\0') { + iVar5 = iVar5 + 1; + iVar4 = iVar4 + 0x274; + if (0xc3 < iVar5) { + return 0xc4; + } + } + if (0xc3 < iVar5) { + return iVar5; + } + FUN_00684770(iVar5 * 0x274 + DAT_00fe1fa8,0x49); + iVar4 = iVar5 * 0x274 + DAT_00fe1fa8; + iVar13 = iVar13 - (uint)(*(ushort *)(iVar4 + 0x168) >> 1); + goto LAB_006abf56; + } + DAT_00fd67f4 = DAT_00fd67f8; + uVar6 = uVar6 ^ uVar6 << 0xb; + DAT_00fd67f8 = DAT_00fd67fc; + uVar6 = DAT_00fd6800 ^ (uVar6 ^ DAT_00fd6800 >> 0xb) >> 8 ^ uVar6; + DAT_00fd67fc = DAT_00fd6800; + fVar14 = (float)VectorSignedToFloat(uVar6 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + if ((int)(fVar14 * DAT_006abc20 * 15.0) == 0) { + if ((iVar4 != 2) && (iVar4 != 0x6d)) { + if (iVar4 == 0x93) goto LAB_006abcc2; + if (iVar4 != 0xa1) goto LAB_006abd88; + } + if ((iVar4 == 0x93) || (iVar4 == 0xa1)) { +LAB_006abcc2: + uVar7 = uVar7 ^ uVar7 << 0xb; + DAT_00fd67f4 = uVar1; + uVar7 = uVar6 ^ (uVar7 ^ uVar6 >> 0xb) >> 8 ^ uVar7; + DAT_00fd67f8 = DAT_00fd6800; + fVar14 = (float)VectorSignedToFloat(uVar7 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + if ((int)(fVar14 * DAT_006abc20 * 2.0) == 0) { + iVar5 = 0; + iVar4 = DAT_00fe1fa8; + do { + if (*(char *)(iVar4 + 0x100) == '\0') { + if (0xc3 < iVar5) { + DAT_00fd67fc = uVar6; + DAT_00fd6800 = uVar7; + return iVar5; + } + DAT_00fd67fc = uVar6; + DAT_00fd6800 = uVar7; + FUN_00684770(iVar5 * 0x274 + DAT_00fe1fa8,0x94); + iVar4 = iVar5 * 0x274 + DAT_00fe1fa8; + iVar13 = iVar13 - (uint)(*(ushort *)(iVar4 + 0x168) >> 1); + goto LAB_006abf56; + } + iVar5 = iVar5 + 1; + iVar4 = iVar4 + 0x274; + } while (iVar5 < 0xc4); + } + else { + iVar5 = 0; + iVar4 = DAT_00fe1fa8; + do { + if (*(char *)(iVar4 + 0x100) == '\0') { + if (0xc3 < iVar5) { + DAT_00fd67fc = uVar6; + DAT_00fd6800 = uVar7; + return iVar5; + } + DAT_00fd67fc = uVar6; + DAT_00fd6800 = uVar7; + FUN_00684770(iVar5 * 0x274 + DAT_00fe1fa8,0x95); + iVar4 = iVar5 * 0x274 + DAT_00fe1fa8; + iVar13 = iVar13 - (uint)(*(ushort *)(iVar4 + 0x168) >> 1); + goto LAB_006abf56; + } + iVar5 = iVar5 + 1; + iVar4 = iVar4 + 0x274; + } while (iVar5 < 0xc4); + } + DAT_00fd67fc = uVar6; + DAT_00fd6800 = uVar7; + return 0xc4; + } + DAT_00fd6800 = uVar6; + iVar4 = FUN_007354a8(); + if ((iVar4 == 0) || (iVar4 = FUN_00608330(&DAT_00fd67f4,3), iVar4 == 0)) { + iVar4 = FUN_00608330(&DAT_00fd67f4,3); + if ((iVar4 != 0) || (DAT_00902ebc < iVar12)) { + FUN_006921b0(iVar13,iVar8); + return -1; + } + iVar5 = 0; + iVar4 = DAT_00fe1fa8; + while (*(char *)(iVar4 + 0x100) != '\0') { + iVar5 = iVar5 + 1; + iVar4 = iVar4 + 0x274; + if (0xc3 < iVar5) { + return 0xc4; + } + } + if (0xc3 < iVar5) { + return iVar5; + } + FUN_00684770(iVar5 * 0x274 + DAT_00fe1fa8,299); + iVar4 = iVar5 * 0x274 + DAT_00fe1fa8; + iVar13 = iVar13 - (uint)(*(ushort *)(iVar4 + 0x168) >> 1); + } + else { + iVar5 = 0; + iVar4 = DAT_00fe1fa8; + while (*(char *)(iVar4 + 0x100) != '\0') { + iVar5 = iVar5 + 1; + iVar4 = iVar4 + 0x274; + if (0xc3 < iVar5) { + return 0xc4; + } + } + if (0xc3 < iVar5) { + return iVar5; + } + FUN_00684770(iVar5 * 0x274 + DAT_00fe1fa8,0x12f); + iVar4 = iVar5 * 0x274 + DAT_00fe1fa8; + iVar13 = iVar13 - (uint)(*(ushort *)(iVar4 + 0x168) >> 1); + } + } + else { +LAB_006abd88: + uVar7 = uVar7 ^ uVar7 << 0xb; + DAT_00fd67f4 = uVar1; + uVar7 = uVar6 ^ (uVar7 ^ uVar6 >> 0xb) >> 8 ^ uVar7; + DAT_00fd67f8 = DAT_00fd6800; + fVar14 = (float)VectorSignedToFloat(uVar7 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + if ((int)(fVar14 * DAT_006abc20 * 15.0) != 0) { + DAT_00fd67fc = uVar6; + DAT_00fd6800 = uVar7; + return -1; + } + if (((iVar4 != 2) && (iVar4 != 0x6d)) && (iVar4 != 0x93)) { + DAT_00fd67fc = uVar6; + DAT_00fd6800 = uVar7; + return -1; + } + iVar5 = 0; + iVar4 = DAT_00fe1fa8; + while (*(char *)(iVar4 + 0x100) != '\0') { + iVar5 = iVar5 + 1; + iVar4 = iVar4 + 0x274; + if (0xc3 < iVar5) { + DAT_00fd67fc = uVar6; + DAT_00fd6800 = uVar7; + return 0xc4; + } + } + if (0xc3 < iVar5) { + DAT_00fd67fc = uVar6; + DAT_00fd6800 = uVar7; + return iVar5; + } + DAT_00fd67fc = uVar6; + DAT_00fd6800 = uVar7; + FUN_00684770(iVar5 * 0x274 + DAT_00fe1fa8,0x4a); + iVar4 = iVar5 * 0x274 + DAT_00fe1fa8; + iVar13 = iVar13 - (uint)(*(ushort *)(iVar4 + 0x168) >> 1); + } +LAB_006abf56: + *(int *)(iVar4 + 0x148) = iVar13; + uVar16 = VectorSignedToFloat(iVar13,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar4 + 0x138) = uVar16; + iVar4 = iVar5 * 0x274 + DAT_00fe1fa8; + iVar8 = iVar8 - (uint)*(ushort *)(iVar4 + 0x16a); + *(int *)(iVar4 + 0x14c) = iVar8; + uVar16 = VectorSignedToFloat(iVar8,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar4 + 0x13c) = uVar16; + *(undefined1 *)(iVar5 * 0x274 + DAT_00fe1fa8 + 0x100) = 1; + *(undefined4 *)(iVar5 * 0x274 + DAT_00fe1fa8 + 0x198) = 0x2ee; + iVar4 = iVar5 * 0x274 + DAT_00fe1fa8; + uVar3 = FUN_0060a19c(iVar4 + 0x138,*(undefined2 *)(iVar4 + 0x168),*(undefined2 *)(iVar4 + 0x16a)); + *(undefined1 *)(iVar5 * 0x274 + DAT_00fe1fa8 + 100) = uVar3; + FUN_00649e08(iVar5,1); + return iVar5; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006b2ea0.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006b2ea0.c new file mode 100644 index 000000000..2c07ab2d8 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006b2ea0.c @@ -0,0 +1,1075 @@ + +int FUN_006b2ea0(int *param_1) + +{ + char cVar1; + float fVar2; + char cVar3; + undefined1 uVar4; + int iVar5; + uint uVar6; + undefined4 uVar7; + uint uVar8; + uint uVar9; + int iVar10; + int iVar11; + undefined4 uVar12; + char cVar13; + int iVar14; + int iVar15; + int iVar16; + uint in_fpscr; + float fVar17; + uint local_2f8; + uint local_2f0; + int local_2e8; + int local_2e4; + undefined1 auStack_2d8 [48]; + undefined1 auStack_2a8 [48]; + undefined4 local_278; + undefined4 uStack_274; + undefined1 auStack_270 [48]; + undefined1 auStack_240 [48]; + undefined1 auStack_210 [48]; + undefined1 auStack_1e0 [48]; + undefined1 auStack_1b0 [48]; + undefined1 auStack_180 [48]; + undefined1 auStack_150 [48]; + undefined1 auStack_120 [48]; + undefined1 auStack_f0 [48]; + undefined1 auStack_c0 [48]; + undefined1 auStack_90 [48]; + undefined1 auStack_60 [60]; + + fVar2 = DAT_006b30cc; + local_278 = 0xfffffffe; + uStack_274 = 0xfffffffe; + iVar10 = param_1[2]; + iVar14 = *param_1; + iVar15 = param_1[1]; + iVar11 = param_1[3]; + iVar16 = param_1[5]; + local_2e4 = (int)DAT_00902ea4; + if (DAT_00fe1f83 == '\0') { + local_2f8 = DAT_00fd6800; + local_2f0 = DAT_00fd67f4; + } + else { + uVar6 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + local_2f0 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + local_2f8 = uVar6 ^ (uVar6 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + DAT_00fd67fc = DAT_00fd6800; + fVar17 = (float)VectorSignedToFloat(local_2f8 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd6800 = local_2f8; + if ((((((int)(fVar17 * DAT_006b30cc * 20.0) == 0) && (*(char *)((int)param_1 + 0x11) == '\0')) + && (DAT_01033960 <= param_1[3])) && + ((param_1[3] < local_2e4 + -0xd2 && (DAT_00fe1f7e == '\0')))) && + (iVar5 = FUN_00656370(0x69), iVar5 == 0)) { + uVar12 = 0; + uVar7 = 0x69; + goto LAB_006b490e; + } + } + cVar13 = DAT_010338d3; + uVar6 = local_2f8; + if (DAT_010338d3 != '\0') { + uVar6 = local_2f0 ^ local_2f0 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + local_2f0 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar6 = uVar6 ^ (uVar6 ^ local_2f8 >> 0xb) >> 8 ^ local_2f8; + fVar17 = (float)VectorSignedToFloat(uVar6 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67fc = local_2f8; + DAT_00fd6800 = uVar6; + if ((((int)(fVar17 * fVar2 * 20.0) == 0) && (*(char *)((int)param_1 + 0x11) == '\0')) && + ((DAT_01033960 <= param_1[3] && + (((param_1[3] < local_2e4 + -0xd2 && (DAT_00fe1f7f == '\0')) && + (iVar5 = FUN_00656370(0x6a), iVar5 == 0)))))) { + uVar12 = 0; + uVar7 = 0x6a; + goto LAB_006b490e; + } + } + local_2f8 = uVar6; + cVar1 = DAT_010703e0; + uVar9 = DAT_00fd67fc; + uVar6 = DAT_00fd67f8; + local_2e8 = DAT_00902ebc; + uVar8 = local_2f8; + if ((DAT_01033966 != '\0') && (DAT_00902ebc < iVar11)) { + uVar8 = local_2f0 ^ local_2f0 << 0xb; + local_2f0 = DAT_00fd67f8; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd6800 = uVar8 ^ (uVar8 ^ local_2f8 >> 0xb) >> 8 ^ local_2f8; + DAT_00fd67fc = local_2f8; + fVar17 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + uVar8 = DAT_00fd6800; + if ((int)(fVar17 * fVar2 * DAT_006b30c8) == 0) { + iVar11 = 0; + iVar10 = DAT_00fe1fa8; + while (uVar8 = DAT_00fd67fc, *(char *)(iVar10 + 0x100) != '\0') { + iVar11 = iVar11 + 1; + iVar10 = iVar10 + 0x274; + if (0xc3 < iVar11) { + DAT_00fd67f4 = uVar6; + DAT_00fd67f8 = uVar9; + return 0xc4; + } + } + goto LAB_006b3176; + } + } + local_2f8 = uVar8; + uVar6 = DAT_00fd67f8; + uVar9 = local_2f8; + uVar8 = DAT_00fd67fc; + if ((cVar13 != '\0') && + (*(char *)((DAT_00902934 * iVar10 + iVar11 + -1) * 0xe + DAT_00902928 + 8) == '\x02')) { + uVar9 = local_2f0 ^ local_2f0 << 0xb; + local_2f0 = DAT_00fd67f8; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd6800 = local_2f8 ^ (uVar9 ^ local_2f8 >> 0xb) >> 8 ^ uVar9; + fVar17 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + uVar9 = DAT_00fd6800; + uVar8 = local_2f8; + if ((int)(fVar17 * fVar2 * 20.0) == 0) { + iVar11 = 0; + iVar10 = DAT_00fe1fa8; + while (uVar8 = local_2f8, *(char *)(iVar10 + 0x100) != '\0') { + iVar11 = iVar11 + 1; + iVar10 = iVar10 + 0x274; + if (0xc3 < iVar11) { + DAT_00fd67f4 = uVar6; + DAT_00fd67fc = local_2f8; + return 0xc4; + } + } +LAB_006b3176: + DAT_00fd67fc = uVar8; + if (0xc3 < iVar11) { + return iVar11; + } + FUN_00684770(iVar11 * 0x274 + DAT_00fe1fa8,0x55); + iVar10 = iVar11 * 0x274 + DAT_00fe1fa8; + iVar14 = iVar14 - (uint)(*(ushort *)(iVar10 + 0x168) >> 1); + *(int *)(iVar10 + 0x148) = iVar14; + uVar7 = VectorSignedToFloat(iVar14,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar10 + 0x138) = uVar7; + iVar10 = iVar11 * 0x274 + DAT_00fe1fa8; + iVar15 = iVar15 - (uint)*(ushort *)(iVar10 + 0x16a); + *(int *)(iVar10 + 0x14c) = iVar15; + uVar7 = VectorSignedToFloat(iVar15,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar10 + 0x13c) = uVar7; + *(undefined1 *)(iVar11 * 0x274 + DAT_00fe1fa8 + 0x100) = 1; + *(undefined4 *)(iVar11 * 0x274 + DAT_00fe1fa8 + 0x198) = 0x2ee; + iVar10 = iVar11 * 0x274 + DAT_00fe1fa8; + uVar4 = FUN_0060a19c(iVar10 + 0x138,*(undefined2 *)(iVar10 + 0x168), + *(undefined2 *)(iVar10 + 0x16a)); + *(undefined1 *)(iVar11 * 0x274 + DAT_00fe1fa8 + 100) = uVar4; + FUN_00649e08(iVar11,1); + return iVar11; + } + } + DAT_00fd67fc = uVar8; + if (cVar13 != '\0') { + if ((iVar11 <= DAT_00902ebc) && (DAT_010703e0 == '\0')) { + iVar5 = FUN_00608330(&DAT_00fd67f4,0x14); + if ((iVar5 == 0) || + ((iVar5 = FUN_00608330(&DAT_00fd67f4,5), iVar5 == 0 && (DAT_010703e4 == '\x04')))) { + iVar11 = 0; + iVar10 = DAT_00fe1fa8; + do { + if (*(char *)(iVar10 + 0x100) == '\0') { + if (0xc3 < iVar11) { + return iVar11; + } + FUN_00684770(iVar11 * 0x274 + DAT_00fe1fa8,0x52); + iVar10 = iVar11 * 0x274 + DAT_00fe1fa8; + iVar14 = iVar14 - (uint)(*(ushort *)(iVar10 + 0x168) >> 1); + *(int *)(iVar10 + 0x148) = iVar14; + uVar7 = VectorSignedToFloat(iVar14,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar10 + 0x138) = uVar7; + iVar10 = iVar11 * 0x274 + DAT_00fe1fa8; + iVar15 = iVar15 - (uint)*(ushort *)(iVar10 + 0x16a); + *(int *)(iVar10 + 0x14c) = iVar15; + uVar7 = VectorSignedToFloat(iVar15,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar10 + 0x13c) = uVar7; + *(undefined1 *)(iVar11 * 0x274 + DAT_00fe1fa8 + 0x100) = 1; + *(undefined4 *)(iVar11 * 0x274 + DAT_00fe1fa8 + 0x198) = 0x2ee; + iVar10 = iVar11 * 0x274 + DAT_00fe1fa8; + uVar4 = FUN_0060a19c(iVar10 + 0x138,*(undefined2 *)(iVar10 + 0x168), + *(undefined2 *)(iVar10 + 0x16a)); + *(undefined1 *)(iVar11 * 0x274 + DAT_00fe1fa8 + 100) = uVar4; + FUN_00649e08(iVar11,1); + return iVar11; + } + iVar11 = iVar11 + 1; + iVar10 = iVar10 + 0x274; + } while (iVar11 < 0xc4); + return 0xc4; + } + local_2f0 = DAT_00fd67f4; + uVar9 = DAT_00fd6800; + } + if (cVar13 != '\0') { + iVar5 = FUN_007354a8(); + cVar1 = DAT_010703e0; + cVar13 = DAT_010338d3; + local_2f0 = DAT_00fd67f4; + uVar9 = DAT_00fd6800; + if (iVar5 == 0) { + local_2e4 = (int)DAT_00902ea4; + local_2e8 = DAT_00902ebc; + } + else { + local_2e8 = DAT_00902ebc; + if (DAT_00902ebc < iVar11) { + local_2e4 = (int)DAT_00902ea4; + } + else { + if ((DAT_010703e0 == '\0') && (iVar5 = FUN_00608330(&DAT_00fd67f4,10), iVar5 == 0)) { + iVar11 = 0; + iVar10 = DAT_00fe1fa8; + do { + if (*(char *)(iVar10 + 0x100) == '\0') { + if (0xc3 < iVar11) { + return iVar11; + } + FUN_00684770(iVar11 * 0x274 + DAT_00fe1fa8,0x130); + iVar10 = iVar11 * 0x274 + DAT_00fe1fa8; + iVar14 = iVar14 - (uint)(*(ushort *)(iVar10 + 0x168) >> 1); + *(int *)(iVar10 + 0x148) = iVar14; + uVar7 = VectorSignedToFloat(iVar14,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar10 + 0x138) = uVar7; + iVar10 = iVar11 * 0x274 + DAT_00fe1fa8; + iVar15 = iVar15 - (uint)*(ushort *)(iVar10 + 0x16a); + *(int *)(iVar10 + 0x14c) = iVar15; + uVar7 = VectorSignedToFloat(iVar15,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar10 + 0x13c) = uVar7; + *(undefined1 *)(iVar11 * 0x274 + DAT_00fe1fa8 + 0x100) = 1; + *(undefined4 *)(iVar11 * 0x274 + DAT_00fe1fa8 + 0x198) = 0x2ee; + iVar10 = iVar11 * 0x274 + DAT_00fe1fa8; + uVar4 = FUN_0060a19c(iVar10 + 0x138,*(undefined2 *)(iVar10 + 0x168), + *(undefined2 *)(iVar10 + 0x16a)); + *(undefined1 *)(iVar11 * 0x274 + DAT_00fe1fa8 + 100) = uVar4; + FUN_00649e08(iVar11,1); + return iVar11; + } + iVar11 = iVar11 + 1; + iVar10 = iVar10 + 0x274; + } while (iVar11 < 0xc4); + return 0xc4; + } + local_2e4 = (int)DAT_00902ea4; + local_2f0 = DAT_00fd67f4; + uVar9 = DAT_00fd6800; + cVar13 = DAT_010338d3; + } + } + } + } + uVar6 = DAT_00fd67f8; + if (iVar16 == 0x3c) { + local_2f0 = local_2f0 ^ local_2f0 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd6800 = uVar9 ^ (local_2f0 ^ uVar9 >> 0xb) >> 8 ^ local_2f0; + fVar17 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + if (((int)(fVar17 * fVar2 * DAT_006b3854) == 0) && (cVar1 == '\0')) { + iVar11 = 0; + iVar10 = DAT_00fe1fa8; + do { + if (*(char *)(iVar10 + 0x100) == '\0') { + if (0xc3 < iVar11) { + DAT_00fd67f4 = uVar6; + DAT_00fd67fc = uVar9; + return iVar11; + } + DAT_00fd67fc = uVar9; + FUN_00684770(iVar11 * 0x274 + DAT_00fe1fa8,0x34); + iVar10 = iVar11 * 0x274 + DAT_00fe1fa8; + iVar14 = iVar14 - (uint)(*(ushort *)(iVar10 + 0x168) >> 1); + *(int *)(iVar10 + 0x148) = iVar14; + uVar7 = VectorSignedToFloat(iVar14,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar10 + 0x138) = uVar7; + iVar10 = iVar11 * 0x274 + DAT_00fe1fa8; + iVar15 = iVar15 - (uint)*(ushort *)(iVar10 + 0x16a); + *(int *)(iVar10 + 0x14c) = iVar15; + uVar7 = VectorSignedToFloat(iVar15,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar10 + 0x13c) = uVar7; + *(undefined1 *)(iVar11 * 0x274 + DAT_00fe1fa8 + 0x100) = 1; + *(undefined4 *)(iVar11 * 0x274 + DAT_00fe1fa8 + 0x198) = 0x2ee; + iVar10 = iVar11 * 0x274 + DAT_00fe1fa8; + uVar4 = FUN_0060a19c(iVar10 + 0x138,*(undefined2 *)(iVar10 + 0x168), + *(undefined2 *)(iVar10 + 0x16a)); + *(undefined1 *)(iVar11 * 0x274 + DAT_00fe1fa8 + 100) = uVar4; + FUN_00649e08(iVar11,1); + return iVar11; + } + iVar11 = iVar11 + 1; + iVar10 = iVar10 + 0x274; + } while (iVar11 < 0xc4); + DAT_00fd67f4 = uVar6; + DAT_00fd67fc = uVar9; + return 0xc4; + } + DAT_00fd67fc = uVar9; + if (local_2e8 < iVar11) { + iVar5 = FUN_00608330(&DAT_00fd67f4,0x3c); + if (iVar5 == 0) { + uVar12 = 0; + uVar7 = 0xdb; + goto LAB_006b490e; + } + goto LAB_006b3634; + } + } + else { +LAB_006b3634: + if ((((local_2e8 < iVar11) && (iVar11 < local_2e4 + -0xd2)) && + (iVar5 = param_1[6], *(char *)((&DAT_0107034c)[iVar5] + 0xea) == '\0')) && + (((*(char *)((&DAT_0107034c)[iVar5] + 0xeb) == '\0' && + (*(char *)((&DAT_0107034c)[iVar5] + 0xe6) == '\0')) && + ((*(char *)((&DAT_0107034c)[iVar5] + 0xe9) == '\0' && + ((*(char *)((&DAT_0107034c)[iVar5] + 0xe7) == '\0' && + (iVar5 = FUN_00608330(&DAT_00fd67f4,10), iVar5 == 0)))))))) { + uVar7 = 300; + uVar12 = 0; + goto LAB_006b490e; + } + } + if (((cVar13 != '\0') && (iVar16 == 0x35)) && (iVar5 = FUN_00608330(&DAT_00fd67f4,3), iVar5 == 0)) + { + uVar12 = 0; + uVar7 = 0x4e; + goto LAB_006b490e; + } + if (param_1[3] <= local_2e8) { + if (cVar1 != '\0') { + iVar11 = FUN_006abb14(param_1); + cVar13 = DAT_010299a0; + if (-1 < iVar11) { + return iVar11; + } + if ((iVar16 == 0x35) && (*(char *)((int)param_1 + 0x11) == '\0')) { + iVar10 = FUN_00608330(&DAT_00fd67f4,5); + if (iVar10 == 0) { + iVar10 = FUN_00608330(&DAT_00fd67f4,2); + if (iVar10 == 0) { + uVar7 = 0x45; + } + else { + uVar7 = 0x3e9; + } + uVar12 = 0; + } + else { + uVar12 = 0; + uVar7 = 0x3d; + } + } + else { + if (DAT_010299a0 == '\0') { +LAB_006b3734: + iVar11 = FUN_00685550(iVar14,iVar15,1,0); + uVar9 = iVar10 - DAT_010338cc; + uVar6 = (int)uVar9 >> 0x1f; + iVar10 = (uVar9 ^ uVar6) - uVar6; + if (iVar16 == 0x3c) { + FUN_007ab078(auStack_2a8,"Jungle Slime"); + FUN_0067a84c(iVar11 * 0x274 + DAT_00fe1fa8,auStack_2a8); + FUN_007aa754(auStack_2a8); + return iVar11; + } + if ((iVar16 == 0xa1) || (iVar16 == 0x93)) { + FUN_0066c0b8(0xbf800000,iVar11 * 0x274 + DAT_00fe1fa8,0x93); + return iVar11; + } + iVar14 = FUN_007354a8(); + if ((iVar14 != 0) && (iVar14 = FUN_00608330(&DAT_00fd67f4,3), iVar14 != 0)) { + FUN_0066c0b8(0xbf800000,iVar11 * 0x274 + DAT_00fe1fa8,0x12e); + return iVar11; + } + iVar15 = FUN_00608330(&DAT_00fd67f4,3); + iVar14 = DAT_006b3850; + if ((iVar15 != 0) && + (iVar16 = (int)DAT_00902ea0, + iVar15 = (int)((ulonglong)((longlong)iVar16 * (longlong)DAT_006b3850) >> 0x20), + (iVar15 >> 2) - (iVar15 >> 0x1f) <= iVar10)) { + iVar15 = FUN_00608330(&DAT_00fd67f4,10); + if (iVar15 != 0) { + return iVar11; + } + iVar14 = (int)((ulonglong)((longlong)iVar16 * (longlong)iVar14) >> 0x20); + if (iVar10 <= (iVar14 >> 1) - (iVar14 >> 0x1f)) { + return iVar11; + } + FUN_007ab078(auStack_2a8,"Purple Slime"); + FUN_0067a84c(iVar11 * 0x274 + DAT_00fe1fa8,auStack_2a8); + FUN_007aa754(auStack_2a8); + return iVar11; + } + FUN_007ab078(auStack_2a8,"Green Slime"); + FUN_0067a84c(iVar11 * 0x274 + DAT_00fe1fa8,auStack_2a8); + FUN_007aa754(auStack_2a8); + return iVar11; + } + iVar11 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar11 == 0) { + uVar12 = 0; + uVar7 = 0xe0; + } + else { + if ((cVar13 == '\0') || (iVar11 = FUN_00608330(&DAT_00fd67f4,2), iVar11 != 0)) + goto LAB_006b3734; + uVar12 = 0; + uVar7 = 0xe1; + } + } + goto LAB_006b490e; + } + iVar10 = FUN_00608330(&DAT_00fd67f4,10); + if ((iVar10 == 0) && (iVar10 = FUN_007354a8(), cVar13 = DAT_010338d3, iVar10 != 0)) { + uVar7 = 0x12d; + uVar12 = 0; + goto LAB_006b490e; + } + iVar10 = FUN_00608330(&DAT_00fd67f4,6); + cVar1 = DAT_010703e4; + if ((iVar10 == 0) || + ((DAT_010703e4 == '\x04' && (iVar10 = FUN_00608330(&DAT_00fd67f4,2), iVar10 == 0)))) { + if ((cVar13 == '\0') || (iVar10 = FUN_00608330(&DAT_00fd67f4,3), iVar10 != 0)) { + iVar10 = FUN_007354a8(); + if ((iVar10 == 0) || (iVar10 = FUN_00608330(&DAT_00fd67f4,2), iVar10 != 0)) { + uVar7 = FUN_00608330(&DAT_00fd67f4,10); + switch(uVar7) { + case 0: + goto switchD_006b3ed8_caseD_0; + case 1: + iVar10 = FUN_00685550(iVar14,iVar15,0xbf,0); + iVar11 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar11 != 0) { + return iVar10; + } + FUN_007ab078(auStack_1b0,"Sleepy Eye 2"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_1b0); + FUN_007aa754(auStack_1b0); + return iVar10; + case 2: + iVar10 = FUN_00685550(iVar14,iVar15,0xc0,0); + iVar11 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar11 != 0) { + return iVar10; + } + FUN_007ab078(auStack_210,"Dialated Eye 2"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_210); + FUN_007aa754(auStack_210); + return iVar10; + case 3: + iVar10 = FUN_00685550(iVar14,iVar15,0xc1,0); + iVar11 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar11 != 0) { + return iVar10; + } + FUN_007ab078(auStack_270,"Green Eye 2"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_270); + FUN_007aa754(auStack_270); + return iVar10; + case 4: + iVar10 = FUN_00685550(iVar14,iVar15,0xc2,0); + iVar11 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar11 != 0) { + return iVar10; + } + FUN_007ab078(auStack_1e0,"Purple Eye 2"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_1e0); + FUN_007aa754(auStack_1e0); + return iVar10; + default: + iVar10 = FUN_00685550(iVar14,iVar15,2,0); + iVar11 = FUN_00608330(&DAT_00fd67f4,4); + if (iVar11 != 0) { + return iVar10; + } + FUN_007ab078(auStack_240,"Demon Eye 2"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_240); + FUN_007aa754(auStack_240); + return iVar10; + } + } + uVar7 = FUN_005c4e6c(&DAT_00fd67f4,0x13d,0x13f); + uVar12 = 0; + } + else { + uVar12 = 0; + uVar7 = 0x85; + } + goto LAB_006b490e; + } + cVar3 = DAT_010703e2; + if ((((DAT_01033966 != '\0') && (DAT_010703e2 != '\0')) && + (iVar10 = FUN_00608330(&DAT_00fd67f4,0x32), iVar10 == 0)) && + (iVar10 = FUN_00656370(0x6d), iVar10 == 0)) { + uVar12 = 0; + uVar7 = 0x6d; + goto LAB_006b490e; + } + iVar10 = FUN_00608330(&DAT_00fd67f4,0x96); + if ((iVar10 == 0) && (cVar3 != '\0')) { + uVar12 = 0; + uVar7 = 0x35; + goto LAB_006b490e; + } + if (cVar1 == '\0') { + if (cVar13 != '\0') { + iVar10 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar10 != 0) { + uVar12 = 0; + uVar7 = 0x68; + goto LAB_006b490e; + } + goto LAB_006b3964; + } + } + else { +LAB_006b3964: + if ((cVar13 != '\0') && (iVar10 = FUN_00608330(&DAT_00fd67f4,3), iVar10 == 0)) + goto LAB_006b3970; + } + if ((((iVar16 != 0x93) && (iVar16 != 0xa1)) && (iVar16 != 0xa3)) && + ((iVar16 != 0xa4 && (iVar16 != 0xa2)))) { + if ((DAT_010299a0 != '\0') && (iVar10 = FUN_00608330(&DAT_00fd67f4,2), iVar10 == 0)) { + iVar10 = FUN_00685550(iVar14,iVar15,0xdf,0); + iVar11 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar11 != 0) { + return iVar10; + } + iVar11 = FUN_00608330(&DAT_00fd67f4,2); + if (iVar11 == 0) { + FUN_007ab078(auStack_2a8,"Small Rain Zombie"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_2a8); + FUN_007aa754(auStack_2a8); + return iVar10; + } + FUN_007ab078(auStack_2a8,"Big Rain Zombie"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_2a8); + FUN_007aa754(auStack_2a8); + return iVar10; + } + iVar10 = FUN_007354a8(); + if ((iVar10 == 0) || (iVar10 = FUN_00608330(&DAT_00fd67f4,2), iVar10 != 0)) { + uVar7 = FUN_00608330(&DAT_00fd67f4,7); + switch(uVar7) { + case 0: + goto switchD_006b3a80_caseD_0; + case 1: + iVar10 = FUN_00685550(iVar14,iVar15,0x84,0); + iVar11 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar11 == 0) { + FUN_007ab078(auStack_f0,"Small Bald Zombie"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_f0); + FUN_007aa754(auStack_f0); + return iVar10; + } + if (iVar11 != 1) { + return iVar10; + } + FUN_007ab078(auStack_180,"Big Bald Zombie"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_180); + FUN_007aa754(auStack_180); + return iVar10; + case 2: + iVar10 = FUN_00685550(iVar14,iVar15,0xba,0); + iVar11 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar11 == 0) { + FUN_007ab078(auStack_120,"Small Pincushion Zombie"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_120); + FUN_007aa754(auStack_120); + return iVar10; + } + if (iVar11 != 1) { + return iVar10; + } + FUN_007ab078(auStack_150,"Big Pincushion Zombie"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_150); + FUN_007aa754(auStack_150); + return iVar10; + case 3: + iVar10 = FUN_00685550(iVar14,iVar15,0xbb,0); + iVar11 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar11 == 0) { + FUN_007ab078(auStack_60,"Small Slimed Zombie"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_60); + FUN_007aa754(auStack_60); + return iVar10; + } + if (iVar11 != 1) { + return iVar10; + } + FUN_007ab078(auStack_c0,"Big Slimed Zombie"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_c0); + FUN_007aa754(auStack_c0); + return iVar10; + case 4: + iVar10 = FUN_00685550(iVar14,iVar15,0xbc,0); + iVar11 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar11 == 0) { + FUN_007ab078(auStack_1e0,"Small Swamp Zombie"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_1e0); + FUN_007aa754(auStack_1e0); + return iVar10; + } + if (iVar11 != 1) { + return iVar10; + } + FUN_007ab078(auStack_240,"Big Swamp Zombie"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_240); + FUN_007aa754(auStack_240); + return iVar10; + case 5: + iVar10 = FUN_00685550(iVar14,iVar15,0xbd,0); + iVar11 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar11 == 0) { + FUN_007ab078(auStack_210,"Small Twiggy Zombie"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_210); + FUN_007aa754(auStack_210); + return iVar10; + } + if (iVar11 != 1) { + return iVar10; + } + FUN_007ab078(auStack_270,"Big Twiggy Zombie"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_270); + FUN_007aa754(auStack_270); + return iVar10; + default: + iVar10 = FUN_00685550(iVar14,iVar15,200,0); + iVar11 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar11 == 0) { + FUN_007ab078(auStack_2d8,"Small Female Zombie"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_2d8); + FUN_007aa754(auStack_2d8); + return iVar10; + } + if (iVar11 != 1) { + return iVar10; + } + FUN_007ab078(auStack_1b0,"Big Female Zombie"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_1b0); + FUN_007aa754(auStack_1b0); + return iVar10; + } + } + uVar7 = FUN_005c4e6c(&DAT_00fd67f4,0x13f,0x142); + uVar12 = 0; + goto LAB_006b490e; + } + if ((cVar13 == '\0') || (iVar10 = FUN_00608330(&DAT_00fd67f4,4), iVar10 != 0)) { + if ((DAT_01033966 == '\0') || (iVar10 = FUN_00608330(&DAT_00fd67f4,3), iVar10 != 0)) { + uVar12 = 0; + uVar7 = 0xa1; + } + else { + uVar12 = 0; + uVar7 = 0x9b; + } + goto LAB_006b490e; + } +LAB_006b3e62: + uVar12 = 0; + uVar7 = 0xa9; + goto LAB_006b490e; + } + if (DAT_01033960 < iVar11) { + if (local_2e4 + -0xbe < iVar11) { + uVar7 = 0x3c; + uVar12 = 0; + iVar10 = FUN_00608330(&DAT_00fd67f4,0x28); + if ((iVar10 == 0) && (iVar10 = FUN_00656370(0x27), iVar10 == 0)) { + uVar7 = 0x27; + uVar12 = 1; + } + else { + iVar10 = FUN_00608330(&DAT_00fd67f4,0xe); + if (iVar10 == 0) { + uVar7 = 0x18; + } + else { + iVar10 = FUN_00608330(&DAT_00fd67f4,8); + if (iVar10 == 0) { + iVar10 = FUN_00608330(&DAT_00fd67f4,5); + if (iVar10 == 0) { + uVar7 = 0x42; + } + else if (iVar10 - 1U < 3) { + if ((DAT_00fe1f8b == '\0') || (iVar10 = FUN_00608330(&DAT_00fd67f4,5), iVar10 == 0)) { + uVar7 = 0x3e; + } + else { + uVar7 = 0x9c; + } + } + else { + uVar7 = 0x3fb; + } + } + else { + iVar10 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar10 == 0) { + uVar7 = 0x3b; + } + else if ((DAT_00fe1f8b != '\0') && (iVar10 = FUN_00608330(&DAT_00fd67f4,5), iVar10 != 0) + ) { + uVar7 = 0x97; + } + } + } + } + goto LAB_006b490e; + } + if ((((iVar16 == 0x93) || (iVar16 == 0xa1)) || + ((iVar16 == 0xa2 || ((iVar16 == 0xa3 || (iVar16 == 0xa4)))))) && + (((char)param_1[4] == '\0' && + ((cVar13 != '\0' && (iVar10 = FUN_00608330(&DAT_00fd67f4,0x1e), iVar10 == 0)))))) { + iVar10 = (&DAT_0107034c)[param_1[6]]; + if (*(char *)(iVar10 + 0xe6) == '\0') { + if (*(char *)(iVar10 + 0xe7) == '\0') { + if (*(char *)(iVar10 + 0xeb) == '\0') { + return -1; + } + uVar12 = 0; + uVar7 = 0xb4; + } + else { + uVar12 = 0; + uVar7 = 0xab; + } + } + else { + uVar12 = 0; + uVar7 = 0xaa; + } + goto LAB_006b490e; + } + iVar10 = FUN_00608330(&DAT_00fd67f4,0x3c); + if (iVar10 == 0) { + if (*(char *)((&DAT_0107034c)[param_1[6]] + 0xea) == '\0') { + uVar12 = 0; + uVar7 = 0xd9; + } + else { + uVar12 = 0; + uVar7 = 0xda; + } + goto LAB_006b490e; + } + if ((char)param_1[4] == '\0') { + if (cVar13 != '\0') { + if ((((iVar16 == 0x74) || (iVar16 == 0x75)) || (iVar16 == 0xa4)) && + (iVar10 = FUN_00608330(&DAT_00fd67f4,8), iVar10 == 0)) { + iVar10 = FUN_00608330(&DAT_01070468,4); + if (iVar10 == 0) { + uVar7 = 0x3f0; + } + else { + uVar7 = 0x78; + } + uVar12 = 0; + goto LAB_006b490e; + } + goto LAB_006b4392; + } + } + else { +LAB_006b4392: + if (((cVar13 != '\0') && (*(char *)((&DAT_0107034c)[param_1[6]] + 0xea) != '\0')) && + (iVar10 = FUN_00608330(&DAT_00fd67f4,10), iVar10 == 0)) { + uVar12 = 0; + uVar7 = 0x9a; + goto LAB_006b490e; + } + } + if ((((char)param_1[4] != '\0') || (*(char *)((&DAT_0107034c)[param_1[6]] + 0xe7) != '\0')) || + (iVar10 = FUN_00608330(&DAT_00fd67f4,0x4b), iVar10 != 0)) { + if ((*(char *)((&DAT_0107034c)[param_1[6]] + 0xea) == '\0') || + (iVar10 = FUN_00608330(&DAT_00fd67f4,0x14), iVar10 != 0)) { + if (cVar13 == '\0') { + iVar10 = FUN_00608330(&DAT_00fd67f4,10); + if (iVar10 == 0) { + iVar10 = FUN_00685550(iVar14,iVar15,0x10,0); + if (*(char *)((&DAT_0107034c)[param_1[6]] + 0xea) == '\0') { + return iVar10; + } +LAB_006b444c: + FUN_0066c0b8(0xbf800000,iVar10 * 0x274 + DAT_00fe1fa8,0xb8); + return iVar10; + } + iVar10 = FUN_00608330(&DAT_00fd67f4,4); + if (iVar10 == 0) { + iVar10 = FUN_00685550(iVar14,iVar15,1,0); + if (*(char *)((&DAT_0107034c)[param_1[6]] + 0xe9) != '\0') { + FUN_007ab078(auStack_2d8,"Jungle Slime"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_2d8); + FUN_007aa754(auStack_2d8); + return iVar10; + } + if (*(char *)((&DAT_0107034c)[param_1[6]] + 0xea) == '\0') { + FUN_007ab078(auStack_2d8,"Black Slime"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_2d8); + FUN_007aa754(auStack_2d8); + return iVar10; + } + goto LAB_006b444c; + } + } + iVar10 = FUN_00608330(&DAT_00fd67f4,2); + if (iVar10 != 0) { + if (*(char *)((&DAT_0107034c)[param_1[6]] + 0xe9) != '\0') { + uVar12 = 0; + uVar7 = 0x33; + goto LAB_006b490e; + } + if ((cVar13 != '\0') && (iVar10 = FUN_00608330(&DAT_00fd67f4,6), 0 < iVar10)) { + uVar12 = 0; + uVar7 = 0x5d; + goto LAB_006b490e; + } + if ((iVar16 != 0x93) && ((iVar16 != 0xa1 && (iVar16 != 0xa2)))) { + uVar12 = 0; + uVar7 = 0x31; + goto LAB_006b490e; + } + if (cVar13 == '\0') { + uVar12 = 0; + uVar7 = 0x96; + goto LAB_006b490e; + } + goto LAB_006b3e62; + } + if ((cVar13 != '\0') && (iVar10 = FUN_00608330(&DAT_00fd67f4,10), iVar10 != 0)) { + iVar10 = FUN_00608330(&DAT_00fd67f4,2); + if (iVar10 == 0) { + if (*(char *)((&DAT_0107034c)[param_1[6]] + 0xea) == '\0') { + iVar10 = FUN_007354a8(); + if ((iVar10 == 0) || (iVar10 = FUN_00608330(&DAT_00fd67f4,5), iVar10 != 0)) { + iVar10 = FUN_00685550(iVar14,iVar15,0x4d,0); + if (iVar11 <= DAT_01033960 + DAT_00902ea4 >> 1) { + return iVar10; + } + iVar11 = FUN_00608330(&DAT_00fd67f4,5); + if (iVar11 != 0) { + return iVar10; + } + FUN_007ab078(auStack_2d8,"Heavy Skeleton"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_2d8); + FUN_007aa754(auStack_2d8); + return iVar10; + } + uVar7 = 0x13c; + uVar12 = 0; + } + else { + uVar12 = 0; + uVar7 = 0xc5; + } + } + else if (*(char *)((&DAT_0107034c)[param_1[6]] + 0xea) == '\0') { + uVar12 = 0; + uVar7 = 0x6e; + } + else { + uVar12 = 0; + uVar7 = 0xce; + } + goto LAB_006b490e; + } + iVar10 = FUN_00608330(&DAT_00fd67f4,0xd); + if (iVar10 == 0) { + iVar10 = FUN_00608330(&DAT_01070468,4); + if (iVar10 == 0) { + uVar7 = 0x3eb; + } + else { + uVar7 = 0x2c; + } + uVar12 = 0; + goto LAB_006b490e; + } + if (((iVar16 == 0x93) || (iVar16 == 0xa1)) || (iVar16 == 0xa2)) { + uVar12 = 0; + uVar7 = 0xa7; + goto LAB_006b490e; + } + if (*(char *)((&DAT_0107034c)[param_1[6]] + 0xea) == '\0') { + iVar10 = FUN_007354a8(); + if ((iVar10 == 0) || (iVar10 = FUN_00608330(&DAT_00fd67f4,2), iVar10 != 0)) { + iVar10 = FUN_00608330(&DAT_00fd67f4,4); + if (iVar10 == 0) { + iVar10 = FUN_00685550(iVar14,iVar15,0x15,0); + iVar11 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar11 != 0) { + return iVar10; + } + iVar11 = FUN_00608330(&DAT_00fd67f4,2); + if (iVar11 == 0) { + FUN_007ab078(auStack_2d8,"Big Skeleton"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_2d8); + FUN_007aa754(auStack_2d8); + return iVar10; + } + FUN_007ab078(auStack_2d8,"Small Skeleton"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_2d8); + FUN_007aa754(auStack_2d8); + return iVar10; + } + if (iVar10 == 1) { + iVar10 = FUN_00685550(iVar14,iVar15,0xc9,0); + iVar11 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar11 != 0) { + return iVar10; + } + iVar11 = FUN_00608330(&DAT_00fd67f4,2); + if (iVar11 == 0) { + FUN_007ab078(auStack_2d8,"Big Headache Skeleton"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_2d8); + FUN_007aa754(auStack_2d8); + return iVar10; + } + FUN_007ab078(auStack_2d8,"Small Headache Skeleton"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_2d8); + FUN_007aa754(auStack_2d8); + return iVar10; + } + if (iVar10 != 2) { + iVar10 = FUN_00685550(iVar14,iVar15,0xcb,0); + iVar11 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar11 != 0) { + return iVar10; + } + iVar11 = FUN_00608330(&DAT_00fd67f4,2); + if (iVar11 == 0) { + FUN_007ab078(auStack_2d8,"Big Pantless Skeleton"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_2d8); + FUN_007aa754(auStack_2d8); + return iVar10; + } + FUN_007ab078(auStack_2d8,"Small Pantless Skeleton"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_2d8); + FUN_007aa754(auStack_2d8); + return iVar10; + } + iVar10 = FUN_00685550(iVar14,iVar15,0xca,0); + iVar11 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar11 != 0) { + return iVar10; + } + iVar11 = FUN_00608330(&DAT_00fd67f4,2); + if (iVar11 == 0) { + FUN_007ab078(auStack_2d8,"Big Misassembled Skeleton"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_2d8); + FUN_007aa754(auStack_2d8); + return iVar10; + } + FUN_007ab078(auStack_2d8,"Small Misassembled Skeleton"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_2d8); + FUN_007aa754(auStack_2d8); + return iVar10; + } + uVar7 = FUN_005c4e6c(&DAT_00fd67f4,0x142,0x145); + uVar12 = 0; + goto LAB_006b490e; + } + } + uVar12 = 0; + uVar7 = 0xb9; + goto LAB_006b490e; + } + if (cVar13 == '\0') goto LAB_006b4110; + } + else { + if (((char)param_1[4] != '\0') || (iVar10 = FUN_00608330(&DAT_00fd67f4,0x32), iVar10 != 0)) { + if ((DAT_01033966 == '\0') || (iVar10 = FUN_00608330(&DAT_00fd67f4,3), iVar10 != 0)) { + if ((cVar13 == '\0') || (iVar10 = FUN_00608330(&DAT_00fd67f4,4), iVar10 == 0)) { + if ((iVar16 != 0x93) && + ((iVar16 != 0xa1 && (*(char *)((&DAT_0107034c)[param_1[6]] + 0xea) == '\0')))) { + iVar10 = FUN_00685550(iVar14,iVar15,1,0); + iVar11 = FUN_00608330(&DAT_00fd67f4,5); + if (iVar11 == 0) { + FUN_007ab078(auStack_2d8,"Yellow Slime"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_2d8); + FUN_007aa754(auStack_2d8); + return iVar10; + } + iVar11 = FUN_00608330(&DAT_00fd67f4,2); + if (iVar11 != 0) { + return iVar10; + } + FUN_007ab078(auStack_2d8,"Red Slime"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_2d8); + FUN_007aa754(auStack_2d8); + return iVar10; + } + uVar12 = 0; + uVar7 = 0x93; + } + else { + uVar12 = 0; + uVar7 = 0x8d; + } + goto LAB_006b490e; + } +LAB_006b3970: + uVar12 = 0; + uVar7 = 0x8c; + goto LAB_006b490e; + } + if ((cVar13 == '\0') || (*(char *)((&DAT_0107034c)[param_1[6]] + 0xea) != '\0')) { +LAB_006b4110: + if (*(char *)((&DAT_0107034c)[param_1[6]] + 0xea) == '\0') { + uVar12 = 1; + uVar7 = 10; + } + else { + uVar12 = 0; + uVar7 = 0xb9; + } + goto LAB_006b490e; + } + } + uVar12 = 1; + uVar7 = 0x5f; +LAB_006b490e: + iVar10 = FUN_00685550(iVar14,iVar15,uVar7,uVar12); + return iVar10; +switchD_006b3ed8_caseD_0: + iVar10 = FUN_00685550(iVar14,iVar15,0xbe,0); + iVar11 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar11 != 0) { + return iVar10; + } + FUN_007ab078(auStack_2d8,"Cataract Eye 2"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_2d8); + FUN_007aa754(auStack_2d8); + return iVar10; +switchD_006b3a80_caseD_0: + iVar10 = FUN_00685550(iVar14,iVar15,3,0); + iVar11 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar11 == 0) { + FUN_007ab078(auStack_90,"Small Zombie"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_90); + FUN_007aa754(auStack_90); + return iVar10; + } + if (iVar11 != 1) { + return iVar10; + } + FUN_007ab078(auStack_2a8,"Big Zombie"); + FUN_0067a84c(iVar10 * 0x274 + DAT_00fe1fa8,auStack_2a8); + FUN_007aa754(auStack_2a8); + return iVar10; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006b6018.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006b6018.c new file mode 100644 index 000000000..d4e6e0e8c --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006b6018.c @@ -0,0 +1,866 @@ + +void FUN_006b6018(void) + +{ + uint uVar1; + bool bVar2; + byte bVar3; + double dVar4; + bool bVar5; + double dVar6; + float fVar7; + double dVar8; + double dVar9; + float fVar10; + undefined1 uVar11; + int iVar12; + int iVar13; + int iVar14; + uint uVar15; + int iVar16; + int *piVar17; + int *piVar18; + int iVar19; + undefined4 uVar20; + uint uVar21; + undefined4 uVar22; + int iVar23; + uint in_fpscr; + float fVar24; + float fVar25; + float fVar26; + float fVar27; + double dVar28; + double dVar29; + float fVar30; + float fVar31; + undefined1 local_170; + byte local_16f; + char local_16e [2]; + int local_16c; + int local_168; + int local_164; + uint local_160; + int local_15c; + int local_158; + uint local_154; + int local_150; + int local_14c; + uint local_148; + int local_144; + int local_140; + uint local_13c; + int local_138; + int local_134; + float local_130; + int local_12c; + int local_128 [2]; + int local_120; + int local_11c; + int local_118; + int local_114; + undefined1 local_110; + undefined1 local_10f; + undefined1 local_10e; + int local_10c; + int local_108; + float local_f0; + float local_ec; + float local_e8; + float local_e4; + float local_e0; + float local_dc; + int local_d8; + float local_d4; + int local_d0; + float local_cc; + float local_c8; + int local_c4; + float local_c0; + int local_bc; + float local_b8; + int local_b4; + float local_b0; + int local_ac; + double local_a8; + double local_a0; + double local_98; + double local_90; + double local_88; + double local_80; + double local_78; + undefined4 local_70; + undefined4 uStack_6c; + + fVar10 = DAT_006b6344; + dVar9 = DAT_006b633c; + dVar8 = DAT_006b6330; + fVar7 = DAT_006b632c; + fVar26 = DAT_006b6328; + dVar6 = DAT_006b6318; + local_70 = 0xfffffffe; + uStack_6c = 0xfffffffe; + if (DAT_00fe1f72 != '\0') { + DAT_00fe1f72 = 0; + return; + } + local_16e[0] = '\0'; + local_164 = 0x1f5; + local_158 = 0; + local_128[0] = 0; + local_16c = 0; + local_12c = 0; + bVar2 = *(char *)(DAT_0107034c + 0x5cc5) != '\0'; + local_154 = (uint)bVar2; + if (*(char *)(DAT_01070350 + 0x5cc5) != '\0') { + local_154 = bVar2 + 1; + } + if (*(char *)(DAT_01070354 + 0x5cc5) != '\0') { + local_154 = local_154 + 1; + } + if (*(char *)(DAT_01070358 + 0x5cc5) != '\0') { + local_154 = local_154 + 1; + } + local_e8 = 6.0; + local_a8 = DAT_006b6358; + local_80 = 0.75; + local_f0 = DAT_006b634c; + local_c8 = 0.5; + local_cc = DAT_006b6348; + local_e0 = DAT_006b6338; + local_15c = DAT_00902928; + local_140 = 0; + local_98 = DAT_006b6320; + local_c0 = DAT_006b6314; + local_78 = DAT_006b6350; + local_b0 = DAT_006b6310; + local_ec = DAT_006b630c; + local_e4 = DAT_006b6308; + local_dc = 1.5; + local_88 = DAT_006b6300; + local_d4 = 3.0; + dVar29 = (double)VectorSignedToFloat(local_154,(byte)(in_fpscr >> 0x16) & 3); + local_130 = DAT_006b62fc; + fVar24 = (float)VectorSignedToFloat(local_154,(byte)(in_fpscr >> 0x16) & 3); + dVar28 = (double)VectorSignedToFloat(local_154,(byte)(in_fpscr >> 0x16) & 3); + local_b8 = 1.125 - fVar24 * 0.125; + local_a0 = dVar28 * DAT_006b6350; + local_90 = dVar29 * DAT_006b6350; + uVar15 = local_154; + do { + iVar12 = (&DAT_0107034c)[local_140]; + if ((*(char *)(iVar12 + 0x5cc5) != '\0') && (*(char *)(iVar12 + 0x5c18) == '\0')) { + local_160 = 0; + local_138 = 0; + local_144 = 0; + local_150 = 0; + if ((0 < DAT_010339a0) && + (((DAT_010339ac == 0 && (0 < DAT_010339a8)) && + (*(int *)(iVar12 + 0x104) < DAT_01050304 + 0x438)))) { + fVar27 = (float)VectorSignedToFloat(*(undefined4 *)(iVar12 + 0x100), + (byte)(in_fpscr >> 0x16) & 3); + fVar24 = DAT_010339a4 * 16.0 - fVar10; + uVar21 = in_fpscr & 0xfffffff; + uVar1 = uVar21 | (uint)(fVar27 < fVar24) << 0x1f | (uint)(fVar27 == fVar24) << 0x1e; + in_fpscr = uVar1 | (uint)(NAN(fVar27) || NAN(fVar24)) << 0x1c; + bVar3 = (byte)(uVar1 >> 0x18); + if ((!(bool)(bVar3 >> 6 & 1) && bVar3 >> 7 == ((byte)(in_fpscr >> 0x1c) & 1)) && + (in_fpscr = uVar21 | (uint)(DAT_010339a4 * 16.0 + fVar10 <= fVar27) << 0x1d, + (byte)(in_fpscr >> 0x1d) == 0)) { + local_150 = 1; + } + } + local_13c = 0; + local_16f = 0; + DAT_00902534 = 800; + DAT_00902538 = 4; + iVar13 = 800; + if ((DAT_010703e6 < 3) && (iVar13 = 800, DAT_010338d3 == '\0')) { + iVar12 = FUN_006c1308(4,iVar12,800); + if (*(short *)(iVar12 + 0x5cfa) < 2) { + iVar12 = 3 - DAT_010703e6; + DAT_00902538 = DAT_00902538 - iVar12; + iVar13 = (int)((ulonglong)((longlong)iVar12 * (longlong)DAT_006b62f8) >> 0x20); + fVar24 = (float)VectorSignedToFloat(iVar13 - (iVar13 >> 0x1f),(byte)(in_fpscr >> 0x16) & 3 + ); + local_15c = DAT_00902928; + fVar27 = (float)VectorSignedToFloat(DAT_00902534,(byte)(in_fpscr >> 0x16) & 3); + iVar13 = (int)((fVar24 + 1.0) * fVar27); + uVar15 = local_154; + } + else { + local_15c = DAT_00902928; + iVar12 = DAT_00902928; + iVar13 = DAT_00902534; + } + } + if (DAT_010338d3 == '\x01') { + DAT_00902534 = 800; + iVar12 = FUN_006c1308(DAT_00902538,iVar12,iVar13); + iVar13 = DAT_00902534; + if (0x12 < *(short *)(iVar12 + 0x5cfa)) { + iVar13 = 0x2a8; + } + iVar12 = 3 - DAT_010703e8; + DAT_00902538 = DAT_00902538 + 1; + local_15c = DAT_00902928; + if (0 < iVar12) { + fVar24 = (float)VectorSignedToFloat(iVar12,(byte)(in_fpscr >> 0x16) & 3); + fVar27 = (float)VectorSignedToFloat(iVar13,(byte)(in_fpscr >> 0x16) & 3); + DAT_00902538 = DAT_00902538 - iVar12; + iVar13 = (int)((fVar24 / local_e8 + 1.0) * fVar27); + } + } + iVar12 = DAT_00902538 + uVar15; + local_b4 = iVar12 + -1; + fVar24 = (float)VectorSignedToFloat(iVar13,(byte)(in_fpscr >> 0x16) & 3); + iVar13 = (int)(fVar24 * local_b8); + dVar29 = (double)VectorSignedToFloat(iVar13,(byte)(in_fpscr >> 0x16) & 3); + dVar28 = local_a8; + if (DAT_010338d3 != '\0') { + dVar28 = dVar9; + } + dVar4 = dVar9; + if (DAT_010338d3 != '\0') { + dVar4 = dVar8; + } + fVar24 = (float)VectorSignedToFloat(iVar13,(byte)(in_fpscr >> 0x16) & 3); + local_c4 = (int)(fVar24 * fVar7); + local_168 = (int)(longlong)(dVar29 * dVar9); + local_bc = (int)(longlong)(dVar29 * local_a8); + local_d8 = (int)(fVar24 * fVar26); + local_148 = local_bc; + if (DAT_010338d3 != '\0') { + local_148 = local_168; + } + fVar30 = (float)VectorSignedToFloat(local_b4,(byte)(in_fpscr >> 0x16) & 3); + iVar16 = (&DAT_0107034c)[local_140]; + fVar31 = (float)VectorSignedToFloat((DAT_00902ea4 + -200) * 0x10,(byte)(in_fpscr >> 0x16) & 3) + ; + fVar27 = *(float *)(iVar16 + 0x114); + local_134 = iVar16; + local_14c = iVar13 * 3; + iVar14 = iVar12 + 1; + uVar15 = in_fpscr & 0xfffffff; + uVar21 = uVar15 | (uint)(fVar27 < fVar31) << 0x1f | (uint)(fVar27 == fVar31) << 0x1e; + local_d0 = local_b4; + local_ac = local_b4 / 2; + bVar3 = (byte)(uVar21 >> 0x18); + DAT_00902534 = iVar13; + DAT_00902538 = iVar14; + if ((bool)(bVar3 >> 6 & 1) || (bool)(bVar3 >> 7) != (NAN(fVar27) || NAN(fVar31))) { + fVar25 = (float)VectorSignedToFloat(DAT_01033960 * 0x10 + 0x438,(byte)(uVar21 >> 0x16) & 3); + uVar21 = uVar15 | (uint)(fVar27 < fVar25) << 0x1f | (uint)(fVar27 == fVar25) << 0x1e; + bVar3 = (byte)(uVar21 >> 0x18); + DAT_00902534 = (int)(longlong)(dVar29 * dVar28); + if ((bool)(bVar3 >> 6 & 1) || (bool)(bVar3 >> 7) != (NAN(fVar27) || NAN(fVar25))) { + fVar25 = (float)VectorSignedToFloat(DAT_00902ebc * 0x10 + 0x438,(byte)(uVar21 >> 0x16) & 3 + ); + uVar21 = uVar15 | (uint)(fVar27 < fVar25) << 0x1f | (uint)(fVar27 == fVar25) << 0x1e; + bVar3 = (byte)(uVar21 >> 0x18); + DAT_00902534 = (int)(longlong)(dVar29 * dVar4); + DAT_00902538 = iVar12; + if ((bool)(bVar3 >> 6 & 1) || (bool)(bVar3 >> 7) != (NAN(fVar27) || NAN(fVar25))) { + DAT_00902538 = local_b4; + if (DAT_010703e0 == '\0') { + DAT_00902534 = (int)(longlong)(dVar29 * local_80); + if (DAT_010703e2 != '\0') { + DAT_00902534 = local_168; + DAT_00902538 = iVar14; + } + } + else { + DAT_00902534 = iVar13; + if (DAT_010703e1 != '\0') { + DAT_00902534 = (int)(fVar24 * local_f0); + DAT_00902538 = (int)(fVar30 * local_cc); + } + } + } + } + } + piVar18 = &DAT_00902538; + if (*(char *)(iVar16 + 0xea) != '\0') { + fVar27 = (float)VectorSignedToFloat(DAT_00902ebc,(byte)(uVar21 >> 0x16) & 3); + uVar21 = uVar21 & 0xfffffff; + if (*(float *)(iVar16 + 0x114) * local_e0 < fVar27) { + DAT_00902534 = (int)(((1.0 - DAT_010299b0) + 1.0) * fVar24 * local_c8); + DAT_00902538 = (int)(fVar30 + fVar30 * DAT_010299b0); + } + } + iVar13 = local_c4; + if (((*(char *)(iVar16 + 0xe5) == '\0') && + (iVar13 = (int)(fVar24 * fVar26), iVar14 = iVar12, *(char *)(iVar16 + 0xe9) == '\0')) && + ((iVar19 = local_148, *(char *)(iVar16 + 0xe6) != '\0' || + ((*(char *)(iVar16 + 0xeb) != '\0' || + (iVar19 = local_bc, iVar13 = DAT_00902534, iVar14 = DAT_00902538, + *(char *)(iVar16 + 0xe8) != '\0')))))) { + DAT_00902534 = iVar19; + iVar13 = DAT_00902534; + iVar14 = local_b4; + } + DAT_00902538 = iVar14; + DAT_00902534 = iVar13; + if ((*(char *)(iVar16 + 0xe7) != '\0') && + (DAT_01033960 * 0x10 + 0x438 < *(int *)(iVar16 + 0x104))) { + DAT_00902534 = local_168; + DAT_00902538 = iVar12; + } + if (-1 < DAT_0090211c) { + fVar24 = *(float *)(iVar16 + 0x114); + uVar21 = uVar21 & 0xfffffff | (uint)(fVar24 < fVar31) << 0x1f | + (uint)(fVar24 == fVar31) << 0x1e; + bVar3 = (byte)(uVar21 >> 0x18); + if (!(bool)(bVar3 >> 6 & 1) && (bool)(bVar3 >> 7) == (NAN(fVar24) || NAN(fVar31))) { + DAT_00902534 = local_14c; + DAT_00902538 = local_b4 / 2; + } + } + dVar28 = (double)VectorSignedToFloat(DAT_00902538,(byte)(uVar21 >> 0x16) & 3); + iVar12 = (int)*(float *)(iVar16 + 0x150); + if (iVar12 < (int)(longlong)(dVar28 * local_98)) { + fVar24 = (float)VectorSignedToFloat(DAT_00902534,(byte)(uVar21 >> 0x16) & 3); + fVar24 = fVar24 * local_c0; +LAB_006b67b2: + DAT_00902534 = (int)fVar24; + } + else { + if (iVar12 < (int)(longlong)(dVar28 * local_78)) { + fVar24 = (float)VectorSignedToFloat(DAT_00902534,(byte)(uVar21 >> 0x16) & 3); + fVar24 = fVar24 * fVar7; + goto LAB_006b67b2; + } + if (iVar12 < (int)(longlong)(dVar28 * dVar6)) { + fVar24 = (float)VectorSignedToFloat(DAT_00902534,(byte)(uVar21 >> 0x16) & 3); + fVar24 = fVar24 * fVar26; + goto LAB_006b67b2; + } + } + if ((*(char *)(iVar16 + 0xe6) == '\0') && (*(char *)(iVar16 + 0xeb) == '\0')) { + bVar2 = false; + } + else { + bVar2 = true; + } + fVar27 = *(float *)(iVar16 + 0x114) * 16.0; + fVar24 = (float)VectorSignedToFloat(DAT_01033960 + DAT_00902ebc >> 1, + (byte)(uVar21 >> 0x16) & 3); + uVar21 = uVar21 & 0xfffffff; + uVar15 = uVar21 | (uint)(fVar27 < fVar24) << 0x1f | (uint)(fVar27 == fVar24) << 0x1e; + in_fpscr = uVar15 | (uint)(NAN(fVar27) || NAN(fVar24)) << 0x1c; + bVar3 = (byte)(uVar15 >> 0x18); + if ((!(bool)(bVar3 >> 6 & 1) && bVar3 >> 7 == ((byte)(in_fpscr >> 0x1c) & 1)) || (bVar2)) { + dVar29 = (double)VectorSignedToFloat(iVar12,(byte)(in_fpscr >> 0x16) & 3); + in_fpscr = uVar21 | (uint)(dVar28 * local_98 <= dVar29) << 0x1d; + fVar24 = local_b0; + if (((byte)(in_fpscr >> 0x1d) == 0) || + (in_fpscr = uVar21 | (uint)(dVar28 * dVar6 <= dVar29) << 0x1d, fVar24 = local_ec, + (byte)(in_fpscr >> 0x1d) == 0)) { + fVar27 = (float)VectorSignedToFloat(DAT_00902534,(byte)(in_fpscr >> 0x16) & 3); + DAT_00902534 = (int)(fVar27 * fVar24); + } + } + if ((*(int *)(iVar16 + *(char *)(iVar16 + 0x14c) * 0xa0 + 0x94c) == 0x94) || + (*(char *)(iVar16 + 0xec) != '\0')) { + fVar24 = (float)VectorSignedToFloat(DAT_00902534,(byte)(in_fpscr >> 0x16) & 3); + fVar27 = (float)VectorSignedToFloat(DAT_00902538,(byte)(in_fpscr >> 0x16) & 3); + DAT_00902534 = (int)(fVar24 * local_e4); + DAT_00902538 = (int)(fVar27 * local_dc); + } + if (*(char *)(iVar16 + 0x8dd7) == '\x01') { + dVar28 = (double)VectorSignedToFloat(DAT_00902534,(byte)(in_fpscr >> 0x16) & 3); + fVar24 = (float)VectorSignedToFloat(DAT_00902538,(byte)(in_fpscr >> 0x16) & 3); + DAT_00902534 = (int)(longlong)(dVar28 * local_88); + DAT_00902538 = (int)(fVar24 * 2.0); + } + if (DAT_00902534 < 0x50) { + DAT_00902534 = 0x50; + } + if (0xc < DAT_00902538) { + DAT_00902538 = 0xc; + } + if (DAT_010703e3 != '\0') { + local_14c = 10; + piVar17 = piVar18; + if (9 < (int)(longlong)((local_a0 + 1.0) * 4.0)) { + piVar17 = &local_14c; + } + DAT_00902538 = *piVar17; + DAT_00902534 = 100; + } + if (local_150 != 0) { + local_14c = 10; + if (9 < (int)(longlong)((local_90 + 1.0) * 4.0)) { + piVar18 = &local_14c; + } + DAT_00902538 = *piVar18; + DAT_00902534 = 100; + } + iVar12 = DAT_00902538; + if ((*(char *)(iVar16 + 0xe5) != '\0') && (DAT_00fe1f7b == '\0')) { + DAT_00902534 = 10; + } + iVar13 = DAT_00902534; + bVar2 = false; + local_170 = 0; + if (((local_150 == 0) && + (((((DAT_010703e2 == '\0' && (DAT_010703e3 == '\0')) || (DAT_010703e0 != '\0')) && + ((DAT_010703e1 == '\0' || (DAT_010703e0 == '\0')))) && + (*(char *)(iVar16 + 0xe5) == '\0')))) && + (((*(char *)(iVar16 + 0xe6) == '\0' && (*(char *)(iVar16 + 0xeb) == '\0')) && + (*(char *)(iVar16 + 0xe8) == '\0')))) { + fVar24 = *(float *)(iVar16 + 0xf4); + uVar15 = in_fpscr & 0xfffffff; + in_fpscr = uVar15 | (uint)(fVar24 == 1.0) << 0x1e; + if ((byte)(in_fpscr >> 0x1e) == 0) { + in_fpscr = uVar15 | (uint)(fVar24 == 2.0) << 0x1e; + if ((byte)(in_fpscr >> 0x1e) == 0) { + uVar15 = uVar15 | (uint)(fVar24 < local_d4) << 0x1f; + in_fpscr = uVar15 | (uint)(NAN(fVar24) || NAN(local_d4)) << 0x1c; + if ((byte)(uVar15 >> 0x1f) == ((byte)(in_fpscr >> 0x1c) & 1)) { + fVar24 = (float)VectorSignedToFloat(DAT_00902538,(byte)(in_fpscr >> 0x16) & 3); + local_160 = 1; + DAT_00902538 = (int)(fVar24 * fVar26); + goto LAB_006b6a94; + } + } + else { + local_160 = 1; + iVar14 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar14 < 2) { + dVar28 = (double)VectorSignedToFloat(iVar12,(byte)(in_fpscr >> 0x16) & 3); + DAT_00902538 = (int)(longlong)(dVar28 * dVar8); +LAB_006b6a94: + bVar2 = true; + local_170 = 1; + iVar12 = DAT_00902538; + } + else { + iVar13 = iVar13 * 3; + DAT_00902534 = iVar13; + } + } + } + else { + local_160 = 1; + iVar14 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar14 == 0) { + dVar28 = (double)VectorSignedToFloat(iVar12,(byte)(in_fpscr >> 0x16) & 3); + DAT_00902538 = (int)(longlong)(dVar28 * dVar8); + goto LAB_006b6a94; + } + iVar13 = iVar13 << 1; + DAT_00902534 = iVar13; + } + } + uVar15 = (uint)*(byte *)((DAT_00902934 * + (*(int *)(iVar16 + 0x100) + (*(int *)(iVar16 + 0x108) >> 1) >> 4) + + (*(int *)(iVar16 + 0x104) + (*(int *)(iVar16 + 0x10c) >> 1) >> 4)) * + 0xe + local_15c + 8); + local_148 = (byte)(&DAT_01026168)[uVar15] | local_160; + local_160 = (uint)(uVar15 == 0x57); + if ((int)*(float *)(iVar16 + 0x150) < iVar12) { + fVar27 = (float)VectorSignedToFloat(iVar13,(byte)(in_fpscr >> 0x16) & 3); + uVar15 = DAT_01070468 ^ DAT_01070468 << 0xb; + DAT_01070468 = DAT_0107046c; + DAT_0107046c = DAT_01070470; + DAT_01070470 = DAT_01070474; + DAT_01070474 = DAT_01070474 ^ uVar15 ^ (uVar15 ^ DAT_01070474 >> 0xb) >> 8; + fVar24 = (float)VectorSignedToFloat(DAT_01070474 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + if ((int)(fVar24 * local_130 * fVar27) == 0) { + FUN_0065b508(*(int *)(iVar16 + 0x100) >> 4,*(int *)(iVar16 + 0x104) >> 4,local_150, + local_16e,&local_170,&local_164,local_128,&local_12c,&local_16f); + local_13c = (uint)local_16f; + local_158 = local_128[0]; + local_16c = local_12c; + } + } + iVar12 = local_158; + iVar13 = local_144; + uVar21 = local_13c; + if (local_13c != 0) { + iVar14 = 0; + piVar18 = &DAT_0107034c; + do { + iVar16 = *piVar18; + if (*(char *)(iVar16 + 0x5cc5) != '\0') { + iVar19 = *(int *)(iVar16 + 0x104) + (uint)(DAT_00878508 >> 1); + iVar16 = *(int *)(iVar16 + 0x100) + (uint)(DAT_00878504 >> 1); + if ((((iVar16 + -0x3fe < local_158 * 0x10 + 0x10) && (local_158 * 0x10 < iVar16 + 0x3fe) + ) && (iVar19 + -0x23e < local_16c * 0x10 + 0x10)) && + (local_16c * 0x10 < iVar19 + 0x23e)) { + bVar5 = true; + } + else { + bVar5 = false; + } + if (bVar5) { + uVar21 = 0; + break; + } + } + iVar14 = iVar14 + 1; + piVar18 = piVar18 + 1; + } while (iVar14 < 4); + if (uVar21 != 0) { + if ((*(char *)(local_134 + 0xe5) != '\0') && + ((((&DAT_010262d0) + [(uint)*(ushort *)((DAT_00902934 * local_158 + local_16c) * 0xe + local_15c + 6) * 4 + ] & 0x2000) == 0 || + (*(char *)((DAT_00902934 * local_158 + local_16c + -1) * 0xe + local_15c + 8) == '\0') + ))) { + uVar21 = 0; + } + iVar14 = local_16c + -1; + if (((*(char *)((DAT_00902934 * local_158 + iVar14) * 0xe + local_15c + 4) != '\0') && + (*(char *)((DAT_00902934 * local_158 + local_16c + -2) * 0xe + local_15c + 4) != '\0') + ) && ((*(ushort *)((DAT_00902934 * local_158 + iVar14) * 0xe + local_15c + 2) & 0x3000 + ) != 0x1000)) { + if ((*(ushort *)((DAT_00902934 * local_158 + iVar14) * 0xe + local_15c + 2) & 0x3000) == + 0x2000) { + iVar13 = 1; + } + else { + local_138 = 1; + } + } + } + } + if (iVar13 != 0) { + uVar21 = 0; + } + uVar15 = local_154; + if (uVar21 != 0) { + iVar16 = local_158 * 0x10 + 8; + iVar19 = local_16c * 0x10; + FUN_007ab078(&local_120,"Spawning NPC"); + FUN_007a7b00(&local_120,0x37,200,0x37,600); + FUN_007aa754(&local_120); + iVar14 = local_164; + iVar13 = local_16c; + local_110 = (undefined1)local_148; + local_118 = iVar12; + local_10e = (undefined1)local_150; + local_108 = local_140; + local_114 = local_16c; + local_10f = (undefined1)local_138; + local_10c = local_164; + local_120 = iVar16; + local_11c = iVar19; + if (!bVar2) goto LAB_006b72c4; + if (local_138 != 0) { + iVar13 = 0xc4; + iVar23 = 0; + iVar12 = DAT_00fe1fa8; + break; + } + if ((local_164 == 0x93) || (local_164 == 0xa1)) { + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar15 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + DAT_00fd67fc = DAT_00fd6800; + fVar26 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + iVar12 = 0x94 - (int)(fVar26 * local_130 * -2.0); + DAT_00fd6800 = uVar15; + } + else { + if (((local_16c <= DAT_00902ebc) && (local_164 != 2)) && (local_164 != 0x6d)) { + return; + } + if (DAT_010299a0 != '\0') { + iVar13 = 0xc4; + iVar23 = 0; + iVar12 = DAT_00fe1fa8; + goto LAB_006b6ea0; + } + uVar15 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar15 = uVar15 ^ (uVar15 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + DAT_00fd67fc = DAT_00fd6800; + fVar26 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd6800 = uVar15; + if (((int)(fVar26 * local_130 * 2.0) == 0) && (local_16c <= DAT_00902ebc)) { + iVar12 = FUN_00608330(&DAT_00fd67f4,4); + if (iVar12 == 0) { + iVar13 = 0xc4; + iVar23 = 0; + iVar12 = DAT_00fe1fa8; + goto LAB_006b6fda; + } + if (iVar12 != 1) { + iVar13 = 0xc4; + iVar23 = 0; + iVar12 = DAT_00fe1fa8; + goto LAB_006b716a; + } + iVar13 = 0xc4; + iVar23 = 0; + iVar12 = DAT_00fe1fa8; + goto LAB_006b70a4; + } + iVar12 = FUN_007354a8(); + if ((iVar12 == 0) || (iVar12 = FUN_00608330(&DAT_00fd67f4,3), iVar12 == 0)) { + if ((DAT_00902ebc < iVar13) || (iVar12 = FUN_00608330(&DAT_00fd67f4,4), iVar12 != 0)) { + FUN_006921b0(iVar16,iVar19); + goto LAB_006b72c4; + } + iVar12 = 299; + } + else { + iVar12 = 0x12f; + } + } + iVar13 = FUN_00685550(iVar16,iVar19,iVar12,0); + goto LAB_006b72bc; + } + } + local_140 = local_140 + 1; + if (3 < local_140) { + return; + } + } while( true ); + while( true ) { + iVar23 = iVar23 + 1; + iVar12 = iVar12 + 0x274; + if (0xc3 < iVar23) break; + if (*(char *)(iVar12 + 0x100) == '\0') { + iVar13 = iVar23; + if (iVar23 < 0xc4) { + FUN_00684770(iVar23 * 0x274 + DAT_00fe1fa8,0x37); + iVar12 = iVar23 * 0x274 + DAT_00fe1fa8; + iVar14 = iVar16 - (uint)(*(ushort *)(iVar12 + 0x168) >> 1); + *(int *)(iVar12 + 0x148) = iVar14; + uVar22 = VectorSignedToFloat(iVar14,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar12 + 0x138) = uVar22; + iVar12 = iVar23 * 0x274 + DAT_00fe1fa8; + iVar14 = iVar19 - (uint)*(ushort *)(iVar12 + 0x16a); + *(int *)(iVar12 + 0x14c) = iVar14; + uVar22 = VectorSignedToFloat(iVar14,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar12 + 0x13c) = uVar22; + *(undefined1 *)(iVar23 * 0x274 + DAT_00fe1fa8 + 0x100) = 1; + *(undefined4 *)(iVar23 * 0x274 + DAT_00fe1fa8 + 0x198) = 0x2ee; + iVar12 = iVar23 * 0x274 + DAT_00fe1fa8; + uVar11 = FUN_0060a19c(iVar12 + 0x138,*(undefined2 *)(iVar12 + 0x168), + *(undefined2 *)(iVar12 + 0x16a)); + *(undefined1 *)(iVar23 * 0x274 + DAT_00fe1fa8 + 100) = uVar11; + FUN_00649e08(iVar23,1); + iVar14 = local_164; + } + break; + } + } + goto LAB_006b72bc; + while( true ) { + iVar23 = iVar23 + 1; + iVar12 = iVar12 + 0x274; + if (0xc3 < iVar23) break; +LAB_006b6ea0: + if (*(char *)(iVar12 + 0x100) == '\0') { + iVar13 = iVar23; + if (iVar23 < 0xc4) { + FUN_00684770(iVar23 * 0x274 + DAT_00fe1fa8,0xe6); + iVar12 = iVar23 * 0x274 + DAT_00fe1fa8; + iVar14 = iVar16 - (uint)(*(ushort *)(iVar12 + 0x168) >> 1); + *(int *)(iVar12 + 0x148) = iVar14; + uVar22 = VectorSignedToFloat(iVar14,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar12 + 0x138) = uVar22; + iVar12 = iVar23 * 0x274 + DAT_00fe1fa8; + iVar14 = iVar19 - (uint)*(ushort *)(iVar12 + 0x16a); + *(int *)(iVar12 + 0x14c) = iVar14; + uVar22 = VectorSignedToFloat(iVar14,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar12 + 0x13c) = uVar22; + *(undefined1 *)(iVar23 * 0x274 + DAT_00fe1fa8 + 0x100) = 1; + *(undefined4 *)(iVar23 * 0x274 + DAT_00fe1fa8 + 0x198) = 0x2ee; + iVar12 = iVar23 * 0x274 + DAT_00fe1fa8; + uVar11 = FUN_0060a19c(iVar12 + 0x138,*(undefined2 *)(iVar12 + 0x168), + *(undefined2 *)(iVar12 + 0x16a)); + *(undefined1 *)(iVar23 * 0x274 + DAT_00fe1fa8 + 100) = uVar11; + FUN_00649e08(iVar23,1); + iVar14 = local_164; + } + break; + } + } + goto LAB_006b72bc; + while( true ) { + iVar23 = iVar23 + 1; + iVar12 = iVar12 + 0x274; + if (0xc3 < iVar23) break; +LAB_006b6fda: + if (*(char *)(iVar12 + 0x100) == '\0') { + iVar13 = iVar23; + if (iVar23 < 0xc4) { + FUN_00684770(iVar23 * 0x274 + DAT_00fe1fa8,0x129); + iVar12 = iVar23 * 0x274 + DAT_00fe1fa8; + iVar14 = iVar16 - (uint)(*(ushort *)(iVar12 + 0x168) >> 1); + *(int *)(iVar12 + 0x148) = iVar14; + uVar22 = VectorSignedToFloat(iVar14,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar12 + 0x138) = uVar22; + iVar12 = iVar23 * 0x274 + DAT_00fe1fa8; + iVar14 = iVar19 - (uint)*(ushort *)(iVar12 + 0x16a); + *(int *)(iVar12 + 0x14c) = iVar14; + uVar22 = VectorSignedToFloat(iVar14,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar12 + 0x13c) = uVar22; + *(undefined1 *)(iVar23 * 0x274 + DAT_00fe1fa8 + 0x100) = 1; + *(undefined4 *)(iVar23 * 0x274 + DAT_00fe1fa8 + 0x198) = 0x2ee; + iVar12 = iVar23 * 0x274 + DAT_00fe1fa8; + uVar11 = FUN_0060a19c(iVar12 + 0x138,*(undefined2 *)(iVar12 + 0x168), + *(undefined2 *)(iVar12 + 0x16a)); + *(undefined1 *)(iVar23 * 0x274 + DAT_00fe1fa8 + 100) = uVar11; + FUN_00649e08(iVar23,1); + iVar14 = local_164; + } + break; + } + } + goto LAB_006b72bc; + while( true ) { + iVar23 = iVar23 + 1; + iVar12 = iVar12 + 0x274; + if (0xc3 < iVar23) break; +LAB_006b70a4: + if (*(char *)(iVar12 + 0x100) == '\0') { + iVar13 = iVar23; + if (iVar23 < 0xc4) { + FUN_00684770(iVar23 * 0x274 + DAT_00fe1fa8,0x12a); + iVar12 = iVar23 * 0x274 + DAT_00fe1fa8; + iVar14 = iVar16 - (uint)(*(ushort *)(iVar12 + 0x168) >> 1); + *(int *)(iVar12 + 0x148) = iVar14; + uVar22 = VectorSignedToFloat(iVar14,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar12 + 0x138) = uVar22; + iVar12 = iVar23 * 0x274 + DAT_00fe1fa8; + iVar14 = iVar19 - (uint)*(ushort *)(iVar12 + 0x16a); + *(int *)(iVar12 + 0x14c) = iVar14; + uVar22 = VectorSignedToFloat(iVar14,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar12 + 0x13c) = uVar22; + *(undefined1 *)(iVar23 * 0x274 + DAT_00fe1fa8 + 0x100) = 1; + *(undefined4 *)(iVar23 * 0x274 + DAT_00fe1fa8 + 0x198) = 0x2ee; + iVar12 = iVar23 * 0x274 + DAT_00fe1fa8; + uVar11 = FUN_0060a19c(iVar12 + 0x138,*(undefined2 *)(iVar12 + 0x168), + *(undefined2 *)(iVar12 + 0x16a)); + *(undefined1 *)(iVar23 * 0x274 + DAT_00fe1fa8 + 100) = uVar11; + FUN_00649e08(iVar23,1); + iVar14 = local_164; + } + break; + } + } + goto LAB_006b72bc; + while( true ) { + iVar23 = iVar23 + 1; + iVar12 = iVar12 + 0x274; + if (0xc3 < iVar23) break; +LAB_006b716a: + if (*(char *)(iVar12 + 0x100) == '\0') { + iVar13 = iVar23; + if (iVar23 < 0xc4) { + FUN_00684770(iVar23 * 0x274 + DAT_00fe1fa8,0x4a); + iVar12 = iVar23 * 0x274 + DAT_00fe1fa8; + iVar14 = iVar16 - (uint)(*(ushort *)(iVar12 + 0x168) >> 1); + *(int *)(iVar12 + 0x148) = iVar14; + uVar22 = VectorSignedToFloat(iVar14,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar12 + 0x138) = uVar22; + iVar12 = iVar23 * 0x274 + DAT_00fe1fa8; + iVar14 = iVar19 - (uint)*(ushort *)(iVar12 + 0x16a); + *(int *)(iVar12 + 0x14c) = iVar14; + uVar22 = VectorSignedToFloat(iVar14,(byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar12 + 0x13c) = uVar22; + *(undefined1 *)(iVar23 * 0x274 + DAT_00fe1fa8 + 0x100) = 1; + *(undefined4 *)(iVar23 * 0x274 + DAT_00fe1fa8 + 0x198) = 0x2ee; + iVar12 = iVar23 * 0x274 + DAT_00fe1fa8; + uVar11 = FUN_0060a19c(iVar12 + 0x138,*(undefined2 *)(iVar12 + 0x168), + *(undefined2 *)(iVar12 + 0x16a)); + *(undefined1 *)(iVar23 * 0x274 + DAT_00fe1fa8 + 100) = uVar11; + FUN_00649e08(iVar23,1); + iVar14 = local_164; + } + break; + } + } +LAB_006b72bc: + if (iVar13 != -1) goto LAB_006b74b4; +LAB_006b72c4: + if ((local_138 != 0) && (iVar13 = FUN_006937c4(&local_120), iVar13 != -1)) goto LAB_006b74b4; + if (local_16e[0] != '\0') { + if (((local_148 == 0) && (DAT_010338d3 != '\0')) && + (iVar12 = FUN_00608330(&DAT_00fd67f4,7), iVar12 == 0)) { + uVar22 = 0x3f5; + iVar12 = FUN_00656328(0x57,0x3f5); + if (iVar12 != 0) goto LAB_006b7320; + iVar12 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar12 != 0) { + uVar22 = 0x57; + } + uVar20 = 1; + } + else { +LAB_006b7320: + uVar20 = 0; + uVar22 = 0x30; + } + iVar13 = FUN_00685550(iVar16,iVar19,uVar22,uVar20); + if (iVar13 != -1) goto LAB_006b74b4; + } + if (local_150 != 0) { + if (DAT_010339a0 == 1) { + iVar13 = FUN_00697070(iVar16,iVar19); + } + else if (DAT_010339a0 == 2) { + iVar13 = FUN_00696e9c(iVar16,iVar19); + } + else { + if (DAT_010339a0 != 3) goto LAB_006b7376; + iVar13 = FUN_00696b8c(iVar16,iVar19); + } + if (iVar13 != -1) goto LAB_006b74b4; + } +LAB_006b7376: + if (local_16c <= DAT_00902ebc) { + if (DAT_010703e0 == '\0') { + if (DAT_010703e3 != '\0') { + iVar13 = FUN_00696128(iVar16,iVar19); +LAB_006b73ae: + if (iVar13 != -1) goto LAB_006b74b4; + } + } + else if (DAT_010703e1 != '\0') { + iVar13 = FUN_00695e5c(iVar16,iVar19); + goto LAB_006b73ae; + } + } + iVar13 = FUN_00694e70(&local_120); + if (((((iVar13 == -1) && (iVar13 = FUN_00693bec(&local_120), iVar13 == -1)) && + ((iVar13 = FUN_006943e0(&local_120), iVar13 == -1 && + ((iVar13 = FUN_00694578(&local_120), iVar13 == -1 && + (iVar13 = FUN_00694ff4(&local_120), iVar13 == -1)))))) && + (iVar13 = FUN_006928f0(&local_120), iVar13 == -1)) && + ((iVar13 = FUN_00693198(&local_120), iVar13 == -1 && + (iVar13 = FUN_00695420(&local_120), iVar13 == -1)))) { + if ((iVar14 == 0xe2) && (local_160 != 0)) { + iVar12 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar12 == 0) { + uVar22 = 0xe2; + } + else { + uVar22 = 0xc6; + } + iVar13 = FUN_00685550(iVar16,iVar19,uVar22,0); + if (iVar13 != -1) goto LAB_006b74b4; + } + iVar13 = FUN_006923e0(&local_120); + if ((iVar13 == -1) && (iVar13 = FUN_006b2ea0(&local_120), iVar13 == -1)) { + FUN_007ab078(&local_120,"No NPC was spawned!"); + FUN_007a7b00(&local_120,0x37,200,0x37,600); + FUN_007aa754(&local_120); + return; + } + } +LAB_006b74b4: + if (iVar13 < 0xc4) { + FUN_00649e80(iVar13,0); + } + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006b9ee8.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006b9ee8.c new file mode 100644 index 000000000..ff61a074e --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006b9ee8.c @@ -0,0 +1,931 @@ + +void FUN_006b9ee8(int param_1) + +{ + bool bVar1; + byte bVar2; + byte bVar3; + ushort uVar4; + char cVar5; + bool bVar6; + bool bVar7; + int *piVar8; + int iVar9; + uint uVar10; + uint uVar11; + int iVar12; + int iVar13; + int iVar14; + int iVar15; + int iVar16; + int iVar17; + uint in_fpscr; + uint uVar18; + uint uVar19; + float fVar20; + float fVar21; + undefined4 uVar22; + undefined4 uVar23; + float fVar24; + float fVar25; + float fVar26; + float fVar27; + float fVar28; + int *local_4c; + + uVar22 = DAT_006b9ffc; + fVar25 = DAT_006b9ff8; + if (((DAT_010299a0 == '\0') && (DAT_010703e1 == '\0')) && (DAT_010703e0 != '\0')) { + bVar7 = false; + } + else { + bVar7 = true; + } + iVar15 = *(int *)(param_1 + 0x104); + local_4c = &DAT_0107034c; + if ((((iVar15 == 0x2e) || (iVar15 == 0x94)) || + ((iVar15 == 0x95 || ((iVar15 == 0xe6 || (iVar15 == 299)))))) || + ((iVar15 == 300 || (iVar15 == 0x12f)))) { + if (*(char *)(param_1 + 0x175) == '\x04') { + FUN_0065b1e4(param_1,1); + fVar21 = *(float *)(param_1 + 0x138); + fVar20 = *(float *)((&DAT_0107034c)[*(byte *)(param_1 + 0x175)] + 0x110); + uVar18 = in_fpscr & 0xfffffff; + in_fpscr = uVar18 | (uint)(fVar20 <= fVar21) << 0x1d; + if ((byte)(in_fpscr >> 0x1d) == 0) { + *(undefined1 *)(param_1 + 0x171) = 1; + *(undefined1 *)(param_1 + 0x1e1) = 1; + } + else { + uVar18 = uVar18 | (uint)(fVar21 < fVar20) << 0x1f | (uint)(fVar21 == fVar20) << 0x1e; + in_fpscr = uVar18 | (uint)(NAN(fVar21) || NAN(fVar20)) << 0x1c; + bVar2 = (byte)(uVar18 >> 0x18); + if (!(bool)(bVar2 >> 6 & 1) && bVar2 >> 7 == ((byte)(in_fpscr >> 0x1c) & 1)) { + *(undefined1 *)(param_1 + 0x171) = 0xff; + *(undefined1 *)(param_1 + 0x1e1) = 0xff; + } + } + if (*(short *)(param_1 + 0x1f2) == -1) { + *(short *)(param_1 + 0x1f2) = + (short)(*(int *)(param_1 + 0x148) + (*(int *)(param_1 + 0x150) >> 1) >> 4); + } + } + if (((*(int *)(param_1 + 0x104) == 0x94) || (*(int *)(param_1 + 0x104) == 0x95)) && + (*(int *)(param_1 + 0x188) == 0)) { + uVar18 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar18 = uVar18 ^ (uVar18 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + DAT_00fd67fc = DAT_00fd6800; + fVar21 = (float)VectorSignedToFloat(uVar18 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd6800 = uVar18; + *(int *)(param_1 + 0x188) = 1 - (int)(fVar21 * fVar25 * -4.0); + } + } + else if (iVar15 == 0x6b) { + DAT_00fe1f7e = 1; + } + else if (iVar15 == 0x6c) { + DAT_00fe1f7f = 1; + } + else if (iVar15 == 0x7c) { + DAT_00fe1f82 = 1; + } + else if (((iVar15 == 0x8e) && (iVar15 = FUN_0073542c(), iVar15 == 0)) && (DAT_00fe1ec4 != 1)) { + FUN_006b4dbc(param_1,9999,0,0,0); + FUN_00647074((int)DAT_006b9ff0,(int)*(short *)(param_1 + 0x1e6),9999,0,0); + } + uVar23 = DAT_006ba35c; + fVar21 = DAT_006ba358; + iVar15 = *(int *)(param_1 + 0x148) + (*(int *)(param_1 + 0x150) >> 1) >> 4; + iVar16 = (int)(*(int *)(param_1 + 0x14c) + (uint)*(ushort *)(param_1 + 0x16a) + 1) >> 4; + bVar1 = false; + *(undefined1 *)(param_1 + 0x172) = 0xff; + *(byte *)(param_1 + 0x171) = *(byte *)(param_1 + 0x171) | 1; + iVar17 = 4; + piVar8 = &DAT_0107034c; + do { + if ((*(char *)(*piVar8 + 0x5cc5) != '\0') && + (*(short *)(*piVar8 + 0x8df0) == *(short *)(param_1 + 0x1e6))) { + bVar1 = true; + in_fpscr = in_fpscr & 0xfffffff | (uint)(*(float *)(param_1 + 0x178) == 0.0) << 0x1e; + if ((byte)(in_fpscr >> 0x1e) == 0) { + *(undefined1 *)(param_1 + 0x10c) = 1; + } + *(undefined4 *)(param_1 + 0x178) = uVar22; + *(undefined4 *)(param_1 + 0x17c) = uVar23; + *(float *)(param_1 + 0x180) = fVar21; + if (*(int *)(*piVar8 + 0x100) + (*(int *)(*piVar8 + 0x108) >> 1) < + *(int *)(param_1 + 0x148) + (*(int *)(param_1 + 0x150) >> 1)) { + *(undefined1 *)(param_1 + 0x171) = 0xff; + } + else { + *(undefined1 *)(param_1 + 0x171) = 1; + } + } + iVar17 = iVar17 + -1; + piVar8 = piVar8 + 1; + } while (iVar17 != 0); + fVar20 = *(float *)(param_1 + 0x184); + uVar11 = in_fpscr & 0xfffffff | (uint)(fVar20 < 0.0) << 0x1f | (uint)(fVar20 == 0.0) << 0x1e; + uVar18 = uVar11 | (uint)NAN(fVar20) << 0x1c; + bVar2 = (byte)(uVar11 >> 0x18); + if (((bool)(bVar2 >> 6 & 1) || bVar2 >> 7 != ((byte)(uVar18 >> 0x1c) & 1)) || + (*(char *)(param_1 + 0x100) == '\0')) { +LAB_006ba1d4: + if ((*(int *)(param_1 + 0x104) == 0x25) && (DAT_00fe1ec4 != 1)) { + *(undefined1 *)(param_1 + 0x119) = 0; + *(undefined2 *)(param_1 + 0x1f2) = DAT_01033968; + *(undefined2 *)(param_1 + 500) = DAT_01033964; + if (DAT_00fe1f7b != '\0') { + *(undefined4 *)(param_1 + 0x184) = 0x3f800000; + *(undefined1 *)(param_1 + 0x10c) = 1; + } + } + } + else { + *(undefined4 *)(param_1 + 0x1b4) = 0xffffffff; + FUN_00697e24(0x41200000,param_1,0); + *(undefined1 *)(param_1 + 0x100) = 0; + if (*(int *)(param_1 + 0x104) == 0x25) { + FUN_007a8384(0xf,*(undefined4 *)(param_1 + 0x148),*(undefined4 *)(param_1 + 0x14c),0); + goto LAB_006ba1d4; + } + } + fVar20 = DAT_006ba354; + iVar17 = (int)*(short *)(param_1 + 500); + if (DAT_00fe1ec4 != 1) { + if (0 < iVar17) { + iVar9 = FUN_007521fc((int)*(short *)(param_1 + 0x1f2),iVar17); + while ((iVar9 == 0 && (iVar17 < DAT_00902ea4 + -0x14))) { + iVar17 = iVar17 + 1; + iVar9 = FUN_007521fc((int)*(short *)(param_1 + 0x1f2),iVar17); + } + } + if (((((DAT_00fe1ec4 != 1) && (*(char *)(param_1 + 0x118) != '\0')) && + (*(char *)(param_1 + 0x119) == '\0')) && + ((iVar15 != *(short *)(param_1 + 0x1f2) || (iVar16 != iVar17)))) && + ((bVar7 || ((DAT_010703e0 == '\0' || + (((&DAT_010262d0) + [(uint)*(ushort *)((DAT_00902934 * iVar15 + iVar16) * 0xe + DAT_00902928 + 6) * + 4] & 0x2000) != 0)))))) { + iVar12 = *(int *)(param_1 + 0x148) + (*(int *)(param_1 + 0x150) >> 1); + iVar13 = *(int *)(param_1 + 0x14c) + (*(int *)(param_1 + 0x154) >> 1); + iVar9 = 0; + piVar8 = &DAT_0107034c; + do { + iVar14 = *piVar8; + if (*(char *)(iVar14 + 0x5cc5) != '\0') { + if ((((*(int *)(iVar14 + 0x100) < iVar12 + 0x3fe) && + (iVar12 + -0x3fe < *(int *)(iVar14 + 0x108) + *(int *)(iVar14 + 0x100))) && + (*(int *)(iVar14 + 0x104) < iVar13 + 0x23e)) && + (iVar13 + -0x23e < *(int *)(iVar14 + 0x10c) + *(int *)(iVar14 + 0x104))) { + bVar6 = true; + } + else { + bVar6 = false; + } + if (bVar6) { + bVar6 = false; + goto LAB_006ba36e; + } + } + iVar9 = iVar9 + 1; + piVar8 = piVar8 + 1; + } while (iVar9 < 4); + bVar6 = true; +LAB_006ba36e: + if (bVar6) { + iVar12 = 0; + iVar9 = *(short *)(param_1 + 0x1f2) * 0x10; + do { + iVar13 = *local_4c; + if (*(char *)(iVar13 + 0x5cc5) != '\0') { + if (((*(int *)(iVar13 + 0x100) < iVar9 + 0x406) && + (iVar9 + -0x3f6 < *(int *)(iVar13 + 0x108) + *(int *)(iVar13 + 0x100))) && + ((*(int *)(iVar13 + 0x104) < iVar17 * 0x10 + 0x246 && + (iVar17 * 0x10 + -0x236 < *(int *)(iVar13 + 0x10c) + *(int *)(iVar13 + 0x104))))) { + bVar6 = true; + } + else { + bVar6 = false; + } + if (bVar6) { + bVar6 = false; + break; + } + } + iVar12 = iVar12 + 1; + bVar6 = true; + local_4c = local_4c + 1; + } while (iVar12 < 4); + if (bVar6) { + if ((*(int *)(param_1 + 0x104) == 0x25) || + (iVar9 = FUN_00609344(*(short *)(param_1 + 0x1f2) + -1,*(short *)(param_1 + 0x1f2) + 1, + iVar17 + -3,iVar17 + -1), iVar9 == 0)) { + *(undefined4 *)(param_1 + 0x140) = DAT_00900110; + *(undefined4 *)(param_1 + 0x144) = DAT_00900114; + iVar9 = (*(short *)(param_1 + 0x1f2) * 0x10 - (uint)(*(ushort *)(param_1 + 0x168) >> 1)) + + 8; + fVar24 = (float)VectorSignedToFloat(iVar17 * 0x10 - (uint)*(ushort *)(param_1 + 0x16a), + (byte)(uVar18 >> 0x16) & 3); + *(int *)(param_1 + 0x148) = iVar9; + uVar23 = VectorSignedToFloat(iVar9,(byte)(uVar18 >> 0x16) & 3); + *(undefined1 *)(param_1 + 0x10c) = 1; + *(float *)(param_1 + 0x13c) = fVar24 - fVar20; + *(undefined4 *)(param_1 + 0x138) = uVar23; + *(int *)(param_1 + 0x14c) = (int)(fVar24 - fVar20); + } + else { + *(undefined1 *)(param_1 + 0x119) = 1; + FUN_0076098c((int)*(short *)(param_1 + 0x1e6)); + } + } + } + } + } + uVar18 = uVar18 & 0xfffffff; + if (*(float *)(param_1 + 0x178) != 0.0) { + uVar11 = uVar18 | (uint)(*(float *)(param_1 + 0x178) == 1.0) << 0x1e; + if ((byte)(uVar11 >> 0x1e) == 0) { + return; + } + if (DAT_00fe1ec4 != 1) { + if ((((bVar7) && (iVar15 == *(short *)(param_1 + 0x1f2))) && + (iVar16 == *(short *)(param_1 + 500))) && + (((((iVar17 = *(int *)(param_1 + 0x104), iVar17 != 0x2e && (iVar17 != 0x94)) && + ((iVar17 != 0x95 && ((iVar17 != 0xe6 && (iVar17 != 299)))))) && (iVar17 != 300)) && + (iVar17 != 0x12f)))) { + *(undefined4 *)(param_1 + 0x178) = uVar22; + iVar15 = FUN_00608330(&DAT_00fd67f4,200); + *(undefined4 *)(param_1 + 0x180) = DAT_006ba9e4; + uVar22 = VectorSignedToFloat(iVar15 + 200,(byte)(uVar11 >> 0x16) & 3); + *(undefined1 *)(param_1 + 0x10c) = 1; + *(undefined4 *)(param_1 + 0x17c) = uVar22; + return; + } + if (((*(char *)(param_1 + 0x119) == '\0') && + (((&DAT_010262d0) + [(uint)*(ushort *)((DAT_00902934 * iVar15 + iVar16) * 0xe + DAT_00902928 + 6) * 4] & + 0x2000) == 0)) && + ((iVar16 = (int)*(short *)(param_1 + 0x1f2), iVar15 < iVar16 + -0x23 || + (iVar16 + 0x23 < iVar15)))) { + if ((*(int *)(param_1 + 0x148) < iVar16 * 0x10) && (*(char *)(param_1 + 0x171) < '\0')) { + *(float *)(param_1 + 0x17c) = *(float *)(param_1 + 0x17c) - 5.0; + } + else if ((iVar16 * 0x10 < *(int *)(param_1 + 0x148)) && ('\0' < *(char *)(param_1 + 0x171))) + { + *(float *)(param_1 + 0x17c) = *(float *)(param_1 + 0x17c) - 5.0; + } + } + } + fVar20 = *(float *)(param_1 + 0x17c) - 1.0; + uVar18 = uVar18 | (uint)(fVar20 == 0.0) << 0x1e | (uint)(0.0 <= fVar20) << 0x1d; + *(float *)(param_1 + 0x17c) = fVar20; + bVar2 = (byte)(uVar18 >> 0x18); + if (!(bool)(bVar2 >> 5 & 1) || (bool)(bVar2 >> 6)) { + *(undefined4 *)(param_1 + 0x178) = uVar22; + uVar11 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar11 = uVar11 ^ (uVar11 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + DAT_00fd67fc = DAT_00fd6800; + fVar20 = (float)VectorSignedToFloat(uVar11 & 0x7fffffff,(byte)(uVar18 >> 0x16) & 3); + iVar16 = *(int *)(param_1 + 0x104); + uVar23 = VectorSignedToFloat(300 - (int)(fVar20 * fVar25 * DAT_006ba9e0), + (byte)(uVar18 >> 0x16) & 3); + DAT_00fd6800 = uVar11; + *(undefined4 *)(param_1 + 0x17c) = uVar23; + uVar11 = DAT_00fd67f4; + if ((((iVar16 == 0x2e) || (iVar16 == 0x94)) || (iVar16 == 0x95)) || + (((iVar16 == 0xe6 || (iVar16 == 299)) || ((iVar16 == 300 || (iVar16 == 0x12f)))))) { + DAT_00fd67f4 = DAT_00fd67f8; + uVar11 = uVar11 ^ uVar11 << 0xb; + DAT_00fd67f8 = DAT_00fd67fc; + uVar11 = uVar11 ^ (uVar11 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + DAT_00fd67fc = DAT_00fd6800; + fVar20 = (float)VectorSignedToFloat(uVar11 & 0x7fffffff,(byte)(uVar18 >> 0x16) & 3); + fVar21 = (float)VectorSignedToFloat((int)(fVar20 * fVar25 * fVar21), + (byte)(uVar18 >> 0x16) & 3); + DAT_00fd6800 = uVar11; + *(float *)(param_1 + 0x17c) = *(float *)(param_1 + 0x17c) - fVar21; + } + uVar23 = DAT_006bad50; + *(undefined1 *)(param_1 + 0x10c) = 1; + *(undefined4 *)(param_1 + 0x180) = uVar23; + } + if (*(char *)(param_1 + 0x11b) != '\0') { + iVar16 = (int)*(short *)(param_1 + 0x1fa); + iVar17 = *(int *)(param_1 + 0x148) + (*(int *)(param_1 + 0x150) >> 1) >> 4; + if ((iVar16 + 2 < iVar17) || (iVar17 < iVar16 + -2)) { + iVar16 = FUN_00772624(iVar16,(int)*(short *)(param_1 + 0x1fc),0); + if (iVar16 == 0) { + iVar16 = *(int *)(param_1 + 0x14c) + (*(int *)(param_1 + 0x154) >> 1) >> 4; + if ((((*(short *)(param_1 + 0x1fa) + 4 < iVar17) || + (iVar17 < *(short *)(param_1 + 0x1fa) + -4)) || + (*(short *)(param_1 + 0x1fc) + 4 < iVar16)) || + (iVar16 < *(short *)(param_1 + 0x1fc) + -4)) { + *(undefined1 *)(param_1 + 0x11b) = 0; + } + } + else { + *(undefined1 *)(param_1 + 0x11b) = 0; + FUN_006494f4((int)*(short *)(param_1 + 0x1fa),(int)*(short *)(param_1 + 0x1fc)); + } + } + } + fVar21 = 1.0; + if (*(int *)(param_1 + 0x104) == 299) { + fVar21 = 1.5; + } + fVar20 = DAT_006bad4c; + if (*(int *)(param_1 + 0x104) == 300) { + fVar21 = 2.0; + fVar20 = 1.0; + } + fVar24 = *(float *)(param_1 + 0x140); + fVar26 = -fVar21; + uVar18 = uVar18 & 0xfffffff; + uVar11 = uVar18; + if ((fVar24 < fVar26) || + (uVar11 = uVar18 | (uint)(fVar24 < fVar21) << 0x1f, + fVar24 != fVar21 && SUB41(uVar11 >> 0x1f,0) == (NAN(fVar24) || NAN(fVar21)))) { + uVar11 = uVar11 & 0xfffffff; + if (*(float *)(param_1 + 0x144) == 0.0) { + fVar21 = *(float *)(param_1 + 0x144) * DAT_006bad48; + *(float *)(param_1 + 0x140) = *(float *)(param_1 + 0x140) * DAT_006bad48; + *(float *)(param_1 + 0x144) = fVar21; + } + } + else if ((fVar21 <= fVar24) || (*(char *)(param_1 + 0x171) != '\x01')) { + uVar11 = uVar18 | (uint)(fVar24 < fVar26) << 0x1f; + if ((fVar24 != fVar26 && SUB41(uVar11 >> 0x1f,0) == (NAN(fVar24) || NAN(fVar26))) && + (*(char *)(param_1 + 0x171) == -1)) { + fVar24 = fVar24 - fVar20; + uVar11 = uVar18 | (uint)(fVar24 < fVar21) << 0x1f; + *(float *)(param_1 + 0x140) = fVar24; + if (fVar24 != fVar21 && SUB41(uVar11 >> 0x1f,0) == (NAN(fVar24) || NAN(fVar21))) { + *(float *)(param_1 + 0x140) = fVar21; + } + } + } + else { + fVar24 = fVar24 + fVar20; + uVar11 = uVar18 | (uint)(fVar24 < fVar21) << 0x1f; + *(float *)(param_1 + 0x140) = fVar24; + if (fVar24 != fVar21 && SUB41(uVar11 >> 0x1f,0) == (NAN(fVar24) || NAN(fVar21))) { + *(float *)(param_1 + 0x140) = fVar21; + } + } + fVar21 = (float)VectorSignedToFloat((*(short *)(param_1 + 500) + -2) * 0x10, + (byte)(uVar11 >> 0x16) & 3); + uVar11 = uVar11 & 0xfffffff; + bVar1 = fVar21 <= *(float *)(param_1 + 0x13c); + cVar5 = *(char *)(param_1 + 0x171); + if (((cVar5 == '\x01') && + (*(short *)(param_1 + 0x1f2) * 0x10 < + *(int *)(param_1 + 0x148) + (*(int *)(param_1 + 0x150) >> 1))) || + ((cVar5 == -1 && + (*(int *)(param_1 + 0x148) + (*(int *)(param_1 + 0x150) >> 1) < + *(short *)(param_1 + 0x1f2) * 0x10)))) { + bVar1 = true; + } + fVar21 = *(float *)(param_1 + 0x144); + uVar18 = uVar11 | (uint)(fVar21 < 0.0) << 0x1f; + if (SUB41(uVar18 >> 0x1f,0) == NAN(fVar21)) { + fVar20 = *(float *)(param_1 + 0x140); + iVar16 = 0; + if (fVar20 < 0.0) { + iVar16 = -1; + } + uVar18 = uVar11 | (uint)(fVar20 < 0.0) << 0x1f; + if (fVar20 != 0.0 && SUB41(uVar18 >> 0x1f,0) == NAN(fVar20)) { + iVar16 = 1; + } + uVar4 = *(ushort *)(param_1 + 0x168); + fVar26 = (float)VectorSignedToFloat((uint)(uVar4 >> 1),(byte)(uVar18 >> 0x16) & 3); + fVar20 = fVar20 + *(float *)(param_1 + 0x138); + fVar24 = (float)VectorSignedToFloat(((uVar4 >> 1) + 1) * iVar16,(byte)(uVar18 >> 0x16) & 3); + fVar28 = (float)VectorSignedToFloat((uint)*(ushort *)(param_1 + 0x16a), + (byte)(uVar18 >> 0x16) & 3); + iVar17 = (int)((fVar26 + fVar20 + fVar24) * DAT_006bad44); + fVar27 = fVar28 + *(float *)(param_1 + 0x13c); + fVar26 = (float)VectorSignedToFloat((uint)uVar4,(byte)(uVar18 >> 0x16) & 3); + fVar24 = (float)VectorSignedToFloat(iVar17 * 0x10,(byte)(uVar18 >> 0x16) & 3); + iVar9 = (int)((fVar27 - 1.0) * DAT_006bad44); + uVar18 = uVar11; + if (fVar24 < fVar26 + fVar20) { + fVar24 = (float)VectorSignedToFloat(iVar17 * 0x10 + 0x10,(byte)(uVar11 >> 0x16) & 3); + uVar18 = uVar11 | (uint)(fVar24 < fVar20) << 0x1f; + if (fVar24 != fVar20 && SUB41(uVar18 >> 0x1f,0) == (NAN(fVar24) || NAN(fVar20))) { + iVar12 = DAT_00902934 * iVar17 + iVar9; + iVar13 = iVar12 * 0xe + DAT_00902928; + if (((*(byte *)(iVar13 + 1) & 1) == 0) || ((*(byte *)(iVar13 + 1) & 2) != 0)) { + bVar6 = false; + } + else { + bVar6 = true; + } + if (((bVar6) && ((*(byte *)(iVar13 + 1) & 0x18) == 0)) && + (bVar2 = *(byte *)(iVar13 + -0xd), (bVar2 & 0x18) == 0)) { + uVar19 = (uint)*(ushort *)(iVar13 + 6); + uVar10 = (&DAT_010262d0)[uVar19 * 4]; + if (((uVar10 & 1) == 0) || ((uVar10 & 2) != 0)) { + if ((bVar1) && (((uVar10 & 2) != 0 && (*(short *)(iVar13 + 0xc) == 0)))) { + if (((&DAT_010262d0)[(uint)*(ushort *)(iVar13 + -8) * 4] & 1) != 0) { + bVar3 = *(byte *)(iVar12 * 0xe + DAT_00902928 + -0xd); + if (((bVar3 & 1) == 0) || ((bVar3 & 2) != 0)) { + bVar1 = false; + } + else { + bVar1 = true; + } + if (bVar1) goto LAB_006bade0; + } + if (((uVar19 != 0x10) && (uVar19 != 0x12)) && (uVar19 != 0x86)) goto LAB_006bae10; + } + goto LAB_006bade0; + } +LAB_006bae10: + bVar3 = *(byte *)(iVar12 * 0xe + DAT_00902928 + -0xd); + if (((bVar3 & 1) == 0) || ((bVar3 & 2) != 0)) { + bVar1 = false; + } + else { + bVar1 = true; + } + if (((bVar1) && (((&DAT_010262d0)[(uint)*(ushort *)(iVar13 + -8) * 4] & 1) != 0)) && + (((&DAT_010262d0)[(uint)*(ushort *)(iVar13 + -8) * 4] & 2) == 0)) { + if ((bVar2 & 4) == 0) { + bVar3 = *(byte *)((iVar12 + -4) * 0xe + DAT_00902928 + 1); + if (((bVar3 & 1) == 0) || ((bVar3 & 2) != 0)) { + bVar1 = false; + } + else { + bVar1 = true; + } + if (((!bVar1) || (((&DAT_010262d0)[(uint)*(ushort *)(iVar13 + -0x32) * 4] & 1) == 0) + ) || (((&DAT_010262d0)[(uint)*(ushort *)(iVar13 + -0x32) * 4] & 2) != 0)) + goto LAB_006bae84; + } + } + else { +LAB_006bae84: + bVar3 = *(byte *)((iVar12 + -2) * 0xe + DAT_00902928 + 1); + if (((bVar3 & 1) == 0) || ((bVar3 & 2) != 0)) { + bVar1 = false; + } + else { + bVar1 = true; + } + if (((!bVar1) || (((&DAT_010262d0)[(uint)*(ushort *)(iVar13 + -0x16) * 4] & 1) == 0)) + || (((&DAT_010262d0)[(uint)*(ushort *)(iVar13 + -0x16) * 4] & 2) != 0)) { + bVar3 = *(byte *)((iVar12 + -3) * 0xe + DAT_00902928 + 1); + if (((bVar3 & 1) == 0) || ((bVar3 & 2) != 0)) { + bVar1 = false; + } + else { + bVar1 = true; + } + if (((!bVar1) || (((&DAT_010262d0)[(uint)*(ushort *)(iVar13 + -0x24) * 4] & 1) == 0) + ) || (((&DAT_010262d0)[(uint)*(ushort *)(iVar13 + -0x24) * 4] & 2) != 0)) { + iVar16 = (iVar17 - iVar16) * DAT_00902934 + iVar9; + bVar3 = *(byte *)((iVar16 + -3) * 0xe + DAT_00902928 + 1); + if (((bVar3 & 1) == 0) || ((bVar3 & 2) != 0)) { + bVar1 = false; + } + else { + bVar1 = true; + } + if (((!bVar1) || + (((&DAT_010262d0)[(uint)*(ushort *)(iVar16 * 0xe + DAT_00902928 + -0x24) * 4] + & 1) == 0)) || + (((&DAT_010262d0)[(uint)*(ushort *)(iVar16 * 0xe + DAT_00902928 + -0x24) * 4] & + 2) != 0)) { + fVar20 = (float)VectorSignedToFloat(iVar9 << 4,(byte)(uVar18 >> 0x16) & 3); + if ((*(byte *)(iVar13 + 1) & 4) != 0) { + fVar20 = fVar20 + 8.0; + } + if ((bVar2 & 4) != 0) { + fVar20 = fVar20 - 8.0; + } + uVar18 = uVar11; + if ((fVar20 < fVar27) && (fVar27 - fVar20 <= DAT_006bb130)) { + fVar24 = *(float *)(param_1 + 0x13c); + *(float *)(param_1 + 0x13c) = fVar20 - fVar28; + *(int *)(param_1 + 0x14c) = (int)(fVar20 - fVar28); + *(float *)(param_1 + 0x130) = + ((fVar24 + fVar28) - fVar20) + *(float *)(param_1 + 0x130); + if (9.0 <= fVar27 - fVar20) { + *(undefined4 *)(param_1 + 0x134) = 0x40000000; + } + else { + *(undefined4 *)(param_1 + 0x134) = 0x3f800000; + } + } + } + } + } + } + } + else { +LAB_006bade0: + bVar2 = *(byte *)(iVar13 + -0xd); + if ((bVar2 & 4) != 0) { + bVar3 = *(byte *)(iVar12 * 0xe + DAT_00902928 + -0xd); + if (((bVar3 & 1) == 0) || ((bVar3 & 2) != 0)) { + bVar1 = false; + } + else { + bVar1 = true; + } + if (bVar1) goto LAB_006bae10; + } + } + } + } + } + if (fVar21 != 0.0) { + return; + } + uVar18 = uVar18 & 0xfffffff | + (uint)(*(float *)(param_1 + 0x138) == *(float *)(param_1 + 0x180)) << 0x1e; + if ((byte)(uVar18 >> 0x1e) != 0) { + *(char *)(param_1 + 0x171) = -cVar5; + } + *(undefined4 *)(param_1 + 0x180) = 0xbf800000; + iVar9 = FUN_0041e400(*(int *)(param_1 + 0x148) + + *(char *)(param_1 + 0x171) * 0xf + (*(int *)(param_1 + 0x150) >> 1) >> 4,1, + DAT_00902ea0 + -1); + iVar12 = FUN_0041e400((int)(*(int *)(param_1 + 0x14c) + (uint)*(ushort *)(param_1 + 0x16a) + + -0x10) >> 4,2,DAT_00902ea4 + -1); + uVar19 = DAT_00fd67fc; + uVar11 = DAT_00fd67f8; + iVar17 = DAT_00902934; + iVar16 = DAT_00902928; + uVar10 = DAT_00fd6800; + if (*(char *)(param_1 + 0x118) != '\0') { + iVar13 = iVar9 * DAT_00902934 + iVar12; + bVar2 = *(byte *)((iVar13 + -2) * 0xe + DAT_00902928 + 1); + if (((bVar2 & 1) == 0) || ((bVar2 & 2) != 0)) { + bVar1 = false; + } + else { + bVar1 = true; + } + if ((bVar1) && (*(short *)(iVar13 * 0xe + DAT_00902928 + -0x16) == 10)) { + uVar10 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar10 = uVar10 ^ (uVar10 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + DAT_00fd67fc = DAT_00fd6800; + fVar21 = (float)VectorSignedToFloat(uVar10 & 0x7fffffff,(byte)(uVar18 >> 0x16) & 3); + if (((int)(fVar21 * fVar25 * 10.0) == 0) || (bVar7)) { + if (DAT_00fe1ec4 == 1) { + DAT_00fd67f4 = uVar11; + DAT_00fd67f8 = uVar19; + DAT_00fd6800 = uVar10; + return; + } + DAT_00fd6800 = uVar10; + iVar15 = FUN_00776dc8(iVar9,iVar12 + -2,(int)*(char *)(param_1 + 0x171)); + if (iVar15 != 0) { + *(undefined1 *)(param_1 + 0x11b) = 1; + *(short *)(param_1 + 0x1fa) = (short)iVar9; + *(short *)(param_1 + 0x1fc) = (short)(iVar12 + -2); + FUN_00648da4(iVar9,iVar12,iVar15); + fVar25 = DAT_006bb12c; + *(undefined1 *)(param_1 + 0x10c) = 1; + *(float *)(param_1 + 0x17c) = fVar25 + *(float *)(param_1 + 0x17c); + return; + } + *(char *)(param_1 + 0x171) = -*(char *)(param_1 + 0x171); + *(undefined1 *)(param_1 + 0x10c) = 1; + return; + } + } + } + DAT_00fd6800 = uVar10; + fVar25 = *(float *)(param_1 + 0x140); + uVar18 = uVar18 & 0xfffffff; + if (((0.0 <= fVar25) || (*(char *)(param_1 + 0x1e1) != -1)) && + ((uVar18 = uVar18 | (uint)(fVar25 < 0.0) << 0x1f | (uint)(fVar25 == 0.0) << 0x1e, + bVar2 = (byte)(uVar18 >> 0x18), (bool)(bVar2 >> 6 & 1) || (bool)(bVar2 >> 7) != NAN(fVar25) + || (*(char *)(param_1 + 0x1e1) != '\x01')))) goto LAB_006bb49e; + iVar13 = iVar9 * DAT_00902934 + iVar12; + iVar14 = (iVar13 + -2) * 0xe + DAT_00902928; + bVar2 = *(byte *)(iVar14 + 1); + if (((bVar2 & 1) == 0) || ((bVar2 & 2) != 0)) { + bVar7 = false; + } + else { + bVar7 = true; + } + if ((bVar7) && (((&DAT_010262d0)[(uint)*(ushort *)(iVar14 + 6) * 4] & 3) == 1)) { + bVar7 = true; + } + else { + bVar7 = false; + } + if (bVar7) { + if ((((*(char *)(param_1 + 0x171) < '\x01') || + (iVar16 = FUN_00609344(iVar9 + -2,iVar9 + -1,iVar12 + -5,iVar12 + -1), iVar16 != 0)) && + ((-1 < *(char *)(param_1 + 0x171) || + (iVar16 = FUN_00609344(iVar9 + 1,iVar9 + 2,iVar12 + -5,iVar12 + -1), iVar16 != 0)))) || + (iVar16 = FUN_00609344(iVar9,iVar9,iVar12 + -5,iVar12 + -3), iVar16 != 0)) { + if (*(int *)(param_1 + 0x104) == 300) { + iVar16 = FUN_007521fc((int)*(char *)(param_1 + 0x171) + + (*(int *)(param_1 + 0x148) + (*(int *)(param_1 + 0x150) >> 1) >> 4), + *(int *)(param_1 + 0x14c) + (*(int *)(param_1 + 0x154) >> 1) >> 4); + if (iVar16 == 0) goto LAB_006bb242; + *(undefined4 *)(param_1 + 0x140) = uVar22; + } +LAB_006bb238: + *(char *)(param_1 + 0x171) = -*(char *)(param_1 + 0x171); + } + else { + *(undefined4 *)(param_1 + 0x144) = 0xc0c00000; + } +LAB_006bb242: + *(undefined1 *)(param_1 + 0x10c) = 1; + iVar16 = DAT_00902928; + iVar17 = DAT_00902934; + } + else { + iVar14 = iVar13 * 0xe + DAT_00902928; + bVar2 = *(byte *)(iVar14 + -0xd); + if (((bVar2 & 1) == 0) || ((bVar2 & 2) != 0)) { + bVar7 = false; + } + else { + bVar7 = true; + } + if ((bVar7) && (((&DAT_010262d0)[(uint)*(ushort *)(iVar14 + -8) * 4] & 3) == 1)) { + bVar7 = true; + } + else { + bVar7 = false; + } + if (bVar7) { + if ((((*(char *)(param_1 + 0x171) < '\x01') || + (iVar16 = FUN_00609344(iVar9 + -2,iVar9 + -1,iVar12 + -4,iVar12 + -1), iVar16 != 0)) && + ((-1 < *(char *)(param_1 + 0x171) || + (iVar16 = FUN_00609344(iVar9 + 1,iVar9 + 2,iVar12 + -4,iVar12 + -1), iVar16 != 0)))) || + (iVar16 = FUN_00609344(iVar9,iVar9,iVar12 + -4,iVar12 + -2), iVar16 != 0)) + goto LAB_006bb238; + *(undefined4 *)(param_1 + 0x144) = 0xc0a00000; + goto LAB_006bb242; + } + fVar21 = (float)VectorSignedToFloat(iVar12 << 4,(byte)(uVar18 >> 0x16) & 3); + fVar25 = (float)VectorSignedToFloat((uint)*(ushort *)(param_1 + 0x16a), + (byte)(uVar18 >> 0x16) & 3); + if (20.0 < (fVar25 + *(float *)(param_1 + 0x13c)) - fVar21) { + iVar14 = iVar13 * 0xe + DAT_00902928; + iVar13 = FUN_00609074(iVar14); + if ((iVar13 != 0) && ((*(byte *)(iVar14 + 1) & 0x18) == 0)) { + if (((*(char *)(param_1 + 0x171) < '\x01') || + (iVar16 = FUN_00609344(iVar9 + -2,iVar9,iVar12 + -3,iVar12 + -1), iVar16 != 0)) && + ((-1 < *(char *)(param_1 + 0x171) || + (iVar16 = FUN_00609344(iVar9,iVar9 + 2,iVar12 + -3,iVar12 + -1), iVar16 != 0)))) + goto LAB_006bb238; + *(undefined4 *)(param_1 + 0x144) = DAT_006bb4f0; + goto LAB_006bb242; + } + } + } + if ((*(short *)(param_1 + 0x1f2) + -0x23 <= iVar15) && + (iVar15 <= *(short *)(param_1 + 0x1f2) + 0x23)) { + iVar13 = iVar9 * iVar17 + iVar12; + iVar15 = (iVar13 + 1) * 0xe + iVar16; + bVar2 = *(byte *)(iVar15 + 1); + if (((bVar2 & 1) == 0) || ((bVar2 & 2) != 0)) { + bVar7 = false; + } + else { + bVar7 = true; + } + if ((bVar7) && (((&DAT_010262d0)[(uint)*(ushort *)(iVar15 + 6) * 4] & 1) != 0)) { + bVar7 = true; + } + else { + bVar7 = false; + } + if (!bVar7) { + cVar5 = *(char *)(param_1 + 0x171); + iVar12 = (iVar9 - cVar5) * iVar17 + iVar12; + iVar15 = (iVar12 + 1) * 0xe + iVar16; + if (((*(byte *)(iVar15 + 1) & 1) == 0) || + (((&DAT_010262d0)[(uint)*(ushort *)(iVar15 + 6) * 4] & 1) == 0)) { + bVar7 = false; + } + else { + bVar7 = true; + } + if (((((((!bVar7) && (iVar15 = FUN_00655f64((iVar13 + 2) * 0xe + iVar16), iVar15 == 0)) && + (iVar15 = FUN_00655f98((iVar12 + 2) * 0xe + iVar16), iVar15 == 0)) && + ((iVar15 = FUN_00655f64((iVar13 + 3) * 0xe + iVar16), iVar15 == 0 && + (iVar15 = FUN_00655f98((iVar12 + 3) * 0xe + iVar16), iVar15 == 0)))) && + ((iVar15 = FUN_00655f64((iVar13 + 4) * 0xe + iVar16), iVar15 == 0 && + ((iVar15 = FUN_00655f64((iVar12 + 4) * 0xe + iVar16), iVar15 == 0 && + (iVar15 = *(int *)(param_1 + 0x104), iVar15 != 0x2e)))))) && (iVar15 != 0x94)) && + ((((iVar15 != 0x95 && (iVar15 != 0xe6)) && (iVar15 != 299)) && + ((iVar15 != 300 && (iVar15 != 0x12f)))))) { + *(char *)(param_1 + 0x171) = -cVar5; + *(undefined1 *)(param_1 + 0x10c) = 1; + *(float *)(param_1 + 0x140) = -*(float *)(param_1 + 0x140); + } + } + } + if (0.0 <= *(float *)(param_1 + 0x144)) { + return; + } + *(undefined4 *)(param_1 + 0x180) = *(undefined4 *)(param_1 + 0x138); +LAB_006bb49e: + fVar25 = DAT_006bb4ec; + if (*(float *)(param_1 + 0x144) < 0.0) { + if (*(char *)(param_1 + 100) != '\0') { + *(float *)(param_1 + 0x144) = *(float *)(param_1 + 0x144) * DAT_006bb4ec; + } + iVar15 = *(int *)(param_1 + 0x104); + if (((iVar15 == 0x2e) || (iVar15 == 299)) || (iVar15 == 0x12f)) { + *(float *)(param_1 + 0x144) = *(float *)(param_1 + 0x144) * fVar25; + } + } + return; + } + fVar21 = *(float *)(param_1 + 0x180); + uVar11 = uVar18 | (uint)(fVar21 < 0.0) << 0x1f | (uint)(fVar21 == 0.0) << 0x1e; + uVar19 = uVar11 | (uint)NAN(fVar21) << 0x1c; + bVar2 = (byte)(uVar11 >> 0x18); + if (!(bool)(bVar2 >> 6 & 1) && bVar2 >> 7 == ((byte)(uVar19 >> 0x1c) & 1)) { + *(float *)(param_1 + 0x180) = fVar21 - 1.0; + } + if ((((!bVar7) || (DAT_010703e0 != '\0')) || (bVar1)) || + (((iVar9 = *(int *)(param_1 + 0x104), iVar9 == 0x2e || (iVar9 == 0x94)) || + ((iVar9 == 0x95 || ((iVar9 == 0xe6 || (iVar9 == 299)))))))) { +LAB_006ba5de: + if (*(int *)(param_1 + 0x104) == 300) goto LAB_006ba5e8; + } + else { + if (iVar9 != 300) { + if (iVar9 != 0x12f) { + if (DAT_00fe1ec4 == 1) { + return; + } + if ((iVar15 == *(short *)(param_1 + 0x1f2)) && (iVar16 == iVar17)) { + fVar21 = *(float *)(param_1 + 0x140); + if (fVar21 != 0.0) { + *(undefined1 *)(param_1 + 0x10c) = 1; + } + uVar11 = uVar18 | (uint)(fVar21 < fVar20) << 0x1f | (uint)(fVar21 == fVar20) << 0x1e; + uVar19 = uVar11 | (uint)(NAN(fVar21) || NAN(fVar20)) << 0x1c; + bVar2 = (byte)(uVar11 >> 0x18); + if ((bool)(bVar2 >> 6 & 1) || bVar2 >> 7 != ((byte)(uVar19 >> 0x1c) & 1)) { + uVar19 = uVar18 | (uint)(DAT_006ba66c <= fVar21) << 0x1d; + if ((byte)(uVar19 >> 0x1d) == 0) { + *(float *)(param_1 + 0x140) = fVar21 + fVar20; + } + else { + *(undefined4 *)(param_1 + 0x140) = uVar22; + } + } + else { + *(float *)(param_1 + 0x140) = fVar21 - fVar20; + } + } + else { + if (*(short *)(param_1 + 0x1f2) < iVar15) { + *(undefined1 *)(param_1 + 0x171) = 0xff; + } + else { + *(undefined1 *)(param_1 + 0x171) = 1; + } + *(undefined4 *)(param_1 + 0x178) = 0x3f800000; + iVar9 = FUN_00608330(&DAT_00fd67f4,200); + *(undefined4 *)(param_1 + 0x180) = uVar22; + *(undefined1 *)(param_1 + 0x10c) = 1; + uVar22 = VectorSignedToFloat(iVar9 + 200,(byte)(uVar19 >> 0x16) & 3); + *(undefined4 *)(param_1 + 0x17c) = uVar22; + } + goto LAB_006ba758; + } + goto LAB_006ba5de; + } +LAB_006ba5e8: + *(float *)(param_1 + 0x140) = *(float *)(param_1 + 0x140) * 0.5; + } + fVar21 = *(float *)(param_1 + 0x140); + uVar11 = uVar18 | (uint)(fVar21 < fVar20) << 0x1f | (uint)(fVar21 == fVar20) << 0x1e; + uVar19 = uVar11 | (uint)(NAN(fVar21) || NAN(fVar20)) << 0x1c; + bVar2 = (byte)(uVar11 >> 0x18); + if ((bool)(bVar2 >> 6 & 1) || bVar2 >> 7 != ((byte)(uVar19 >> 0x1c) & 1)) { + uVar19 = uVar18 | (uint)(DAT_006ba66c <= fVar21) << 0x1d; + if ((byte)(uVar19 >> 0x1d) == 0) { + *(float *)(param_1 + 0x140) = fVar21 + fVar20; + } + else { + *(undefined4 *)(param_1 + 0x140) = uVar22; + } + } + else { + *(float *)(param_1 + 0x140) = fVar21 - fVar20; + } + if (DAT_00fe1ec4 == 1) { + return; + } + if (0.0 < *(float *)(param_1 + 0x17c)) { + *(float *)(param_1 + 0x17c) = *(float *)(param_1 + 0x17c) - 1.0; + } + uVar19 = uVar19 & 0xfffffff | (uint)(*(float *)(param_1 + 0x17c) == 0.0) << 0x1e | + (uint)(0.0 <= *(float *)(param_1 + 0x17c)) << 0x1d; + bVar2 = (byte)(uVar19 >> 0x18); + if (!(bool)(bVar2 >> 5 & 1) || (bool)(bVar2 >> 6)) { + *(undefined4 *)(param_1 + 0x178) = 0x3f800000; + fVar21 = DAT_006ba668; + uVar18 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar18 = uVar18 ^ (uVar18 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + DAT_00fd67fc = DAT_00fd6800; + fVar20 = (float)VectorSignedToFloat(uVar18 & 0x7fffffff,(byte)(uVar19 >> 0x16) & 3); + iVar9 = *(int *)(param_1 + 0x104); + uVar23 = VectorSignedToFloat(200 - (int)(fVar20 * fVar25 * DAT_006ba668), + (byte)(uVar19 >> 0x16) & 3); + DAT_00fd6800 = uVar18; + *(undefined4 *)(param_1 + 0x17c) = uVar23; + if ((((((iVar9 == 0x2e) || (iVar9 == 0x94)) || (iVar9 == 0x95)) || + ((iVar9 == 0xe6 || (iVar9 == 299)))) || (iVar9 == 300)) || (iVar9 == 0x12f)) { + uVar18 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar18 = uVar18 ^ (uVar18 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + DAT_00fd67fc = DAT_00fd6800; + fVar20 = (float)VectorSignedToFloat(uVar18 & 0x7fffffff,(byte)(uVar19 >> 0x16) & 3); + fVar21 = (float)VectorSignedToFloat(200 - (int)(fVar20 * fVar25 * fVar21), + (byte)(uVar19 >> 0x16) & 3); + DAT_00fd6800 = uVar18; + *(float *)(param_1 + 0x17c) = *(float *)(param_1 + 0x17c) + fVar21; + } + *(undefined4 *)(param_1 + 0x180) = uVar22; + *(undefined1 *)(param_1 + 0x10c) = 1; + } +LAB_006ba758: + uVar11 = DAT_00fd67fc; + uVar18 = DAT_00fd67f8; + uVar22 = DAT_006ba9e8; + if (DAT_00fe1ec4 == 1) { + return; + } + if (bVar7) { + if (iVar15 != *(short *)(param_1 + 0x1f2)) { + return; + } + if (iVar16 != iVar17) { + return; + } + } + iVar16 = (int)*(short *)(param_1 + 0x1f2); + if ((iVar16 + -0x19 <= iVar15) && (iVar15 <= iVar16 + 0x19)) { + uVar10 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar10 = uVar10 ^ (uVar10 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + DAT_00fd67fc = DAT_00fd6800; + fVar21 = (float)VectorSignedToFloat(uVar10 & 0x7fffffff,(byte)(uVar19 >> 0x16) & 3); + if ((int)(fVar21 * fVar25 * DAT_006ba9ec) != 0) { + DAT_00fd67f4 = uVar18; + DAT_00fd67f8 = uVar11; + DAT_00fd6800 = uVar10; + return; + } + if (*(float *)(param_1 + 0x180) != 0.0) { + DAT_00fd67f4 = uVar18; + DAT_00fd67f8 = uVar11; + DAT_00fd6800 = uVar10; + return; + } + DAT_00fd6800 = uVar10; + *(undefined1 *)(param_1 + 0x10c) = 1; + *(char *)(param_1 + 0x171) = -*(char *)(param_1 + 0x171); + *(undefined4 *)(param_1 + 0x180) = uVar22; + return; + } + if (*(float *)(param_1 + 0x180) != 0.0) { + return; + } + if ((iVar15 < iVar16 + -0x32) && (*(char *)(param_1 + 0x171) < '\0')) { + *(undefined1 *)(param_1 + 0x171) = 1; + *(undefined1 *)(param_1 + 0x10c) = 1; + return; + } + if (iVar15 <= iVar16 + 0x32) { + return; + } + if (*(char *)(param_1 + 0x171) < '\x01') { + return; + } + *(undefined1 *)(param_1 + 0x171) = 0xff; + *(undefined1 *)(param_1 + 0x10c) = 1; + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006da85c.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006da85c.c new file mode 100644 index 000000000..0d820eef8 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006da85c.c @@ -0,0 +1,473 @@ + +/* WARNING: Heritage AFTER dead removal. Example location: s1 : 0x006db1a6 */ +/* WARNING: Restarted to delay deadcode elimination for space: register */ + +void FUN_006da85c(void) + +{ + uint uVar1; + ushort uVar2; + short sVar3; + int iVar4; + undefined4 uVar5; + undefined4 uVar6; + int *piVar7; + int *piVar8; + undefined1 *puVar9; + int extraout_r2; + int iVar10; + int iVar11; + bool bVar12; + int iVar13; + int iVar14; + int iVar15; + int iVar16; + uint in_fpscr; + uint uVar17; + undefined8 in_d0; + double dVar18; + float fVar19; + float fVar20; + undefined8 in_d1; + double dVar21; + float fVar22; + undefined8 uVar23; + undefined1 auStack_3b4 [24]; + undefined4 local_39c; + undefined4 uStack_398; + undefined1 auStack_394 [24]; + undefined1 auStack_37c [24]; + undefined1 auStack_364 [48]; + undefined1 auStack_334 [48]; + undefined1 auStack_304 [48]; + undefined1 auStack_2d4 [48]; + undefined1 auStack_2a4 [48]; + undefined1 auStack_274 [48]; + undefined1 auStack_244 [48]; + undefined1 auStack_214 [48]; + undefined1 auStack_1e4 [48]; + undefined1 auStack_1b4 [48]; + undefined1 auStack_184 [48]; + undefined1 auStack_154 [48]; + undefined1 auStack_124 [48]; + undefined1 auStack_f4 [48]; + undefined1 auStack_c4 [48]; + undefined1 auStack_94 [48]; + undefined1 auStack_64 [64]; + + uVar23 = FUN_007ffb80(); + iVar10 = (int)((ulonglong)uVar23 >> 0x20); + iVar4 = (int)uVar23; + local_39c = 0xfffffffe; + uStack_398 = 0xfffffffe; + iVar15 = iVar10 >> 4; + iVar14 = extraout_r2 >> 4; + iVar13 = (DAT_00902934 * iVar15 + iVar14) * 0xe + DAT_00902928; + if ((*(byte *)(iVar13 + 1) & 1) == 0) goto switchD_006daf52_caseD_81; + uVar2 = *(ushort *)(iVar13 + 6); + if (0x7d < uVar2) { + if (0xcf < uVar2) { + if (uVar2 < 0xd9) { + if (uVar2 == 0xd8) { + FUN_007523e8(iVar15,iVar14); + } + else if (uVar2 == 0xd1) { + FUN_00754554(iVar15,iVar14); + } + else if ((uVar2 == 0xd4) && (*(char *)(iVar4 + 0xb7) == '\0')) { + iVar16 = 0; + iVar10 = iVar4; + do { + if ((*(int *)(iVar10 + 0x94c) == 0x3b5) && (0 < *(short *)(iVar10 + 0x98a))) { + iVar10 = iVar4 + iVar16 * 0xa0; + sVar3 = *(short *)(iVar10 + 0x98a) + -1; + *(short *)(iVar10 + 0x98a) = sVar3; + if (sVar3 < 1) { + FUN_00612a6c(iVar10 + 0x948); + } + *(undefined1 *)(iVar4 + 0xb7) = 10; + FUN_007a8384(2,*(undefined4 *)(iVar4 + 0x100),*(undefined4 *)(iVar4 + 0x104),0xb); + iVar10 = (int)((ulonglong) + ((longlong)(int)*(short *)(iVar13 + 10) * (longlong)DAT_006db304) >> + 0x20); + iVar16 = (iVar10 >> 2) - (iVar10 >> 0x1f); + iVar10 = (int)((ulonglong) + ((longlong)(int)*(short *)(iVar13 + 0xc) * (longlong)DAT_006db304) >> + 0x20); + iVar11 = (iVar10 >> 2) - (iVar10 >> 0x1f); + uVar5 = FUN_00608330(&DAT_00fd67f4,0x1c2); + fVar19 = (float)VectorSignedToFloat(uVar5,(byte)(in_fpscr >> 0x16) & 3); + fVar19 = fVar19 * DAT_006db300; + uVar5 = FUN_005c4e6c(&DAT_00fd67f4,0x55,0x69); + fVar22 = (float)VectorSignedToFloat(uVar5,(byte)(in_fpscr >> 0x16) & 3); + uVar5 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffdd,0xb); + iVar10 = (int)((ulonglong)((longlong)iVar16 * (longlong)DAT_006db2fc) >> 0x20); + fVar20 = (float)VectorSignedToFloat(uVar5,(byte)(in_fpscr >> 0x16) & 3); + iVar10 = iVar10 - (iVar10 >> 0x1f); + iVar13 = (int)((ulonglong)((longlong)iVar11 * (longlong)DAT_006db2fc) >> 0x20); + VectorSignedToFloat(((iVar10 * 3 - iVar16) + iVar15) * 0x10 + 0x18, + (byte)(in_fpscr >> 0x16) & 3); + VectorSignedToFloat((((iVar13 - (iVar13 >> 0x1f)) * 3 - iVar11) + iVar14) * 0x10 + + 0x18,(byte)(in_fpscr >> 0x16) & 3); + if (iVar10 == 0) { + fVar22 = -fVar22; + } + FUN_006f7004((int)in_d0,(int)((ulonglong)in_d0 >> 0x20), + ((fVar19 + 12.0) / SQRT(fVar22 * fVar22 + fVar20 * fVar20)) * fVar22, + (int)((ulonglong)in_d1 >> 0x20),0x40600000,0xa6,0x11, + *(undefined1 *)(iVar4 + 0x5cc9)); + break; + } + iVar16 = iVar16 + 1; + iVar10 = iVar10 + 0xa0; + } while (iVar16 < 0x30); + } + } + else if (uVar2 == 0xdb) { + *(short *)(iVar4 + 0x8960) = (short)((int)(iVar10 + ((uint)(iVar10 >> 3) >> 0x1c)) >> 4); + *(short *)(iVar4 + 0x8962) = + (short)((int)(extraout_r2 + ((uint)(extraout_r2 >> 3) >> 0x1c)) >> 4); + *(undefined2 *)(iVar4 + 0x154) = 1; + *(undefined1 *)(iVar4 + 0x5cba) = 1; + FUN_006d74f0(iVar4); + } + else if (((uVar2 == 0xed) && (iVar15 = FUN_00656370(0xf5), iVar15 == 0)) && + (DAT_00fe1f8d != '\0')) { + iVar14 = 0; + iVar15 = iVar4; + do { + if (*(int *)(iVar15 + 0x94c) == 0x50d) { + iVar15 = iVar4 + iVar14 * 0xa0; + sVar3 = *(short *)(iVar15 + 0x98a) + -1; + *(short *)(iVar15 + 0x98a) = sVar3; + if (sVar3 < 1) { + FUN_00612a6c(iVar15 + 0x948); + } + FUN_007a8384(0xf,*(undefined4 *)(iVar4 + 0x100),*(undefined4 *)(iVar4 + 0x104),0); + if (DAT_00fe1ec4 == 1) { + FUN_0064937c(*(undefined1 *)(iVar4 + 0x5cc9),0xf5); + } + else { + FUN_00685904(iVar4,0xf5); + } + break; + } + iVar14 = iVar14 + 1; + iVar15 = iVar15 + 0xa0; + } while (iVar14 < 0x30); + } + goto switchD_006daf52_caseD_81; + } + if (uVar2 == 0xcf) { + FUN_007a8384(0x1c,iVar10,extraout_r2,0); + FUN_00754178(iVar15,iVar14); + uVar5 = 1; + goto LAB_006db286; + } + switch(uVar2) { + case 0x80: + iVar4 = (int)((ulonglong)((longlong)(int)*(short *)(iVar13 + 10) * (longlong)DAT_006db308) >> + 0x20); + iVar4 = (int)*(short *)(iVar13 + 10) + ((iVar4 >> 5) - (iVar4 >> 0x1f)) * -100; + iVar10 = (int)((ulonglong)((longlong)iVar4 * (longlong)DAT_006db304) >> 0x20); + iVar4 = iVar4 + ((iVar10 >> 3) - (iVar10 >> 0x1f)) * -0x24; + if (iVar4 == 0x12) { + iVar15 = iVar15 + -1; + iVar4 = (int)*(short *)((DAT_00902934 * iVar15 + iVar14) * 0xe + DAT_00902928 + 10); + } + if (99 < iVar4) { + FUN_007743f8(iVar15,iVar14,1,0,0,0); + FUN_00647acc(0,iVar15,iVar14,1,0); + uVar5 = 1; + break; + } + default: +switchD_006daf52_caseD_81: + uVar5 = 0; + break; + case 0x84: + case 0x88: + case 0x90: + FUN_00772d30(iVar15,iVar14); + FUN_00649310(iVar15,iVar14); + uVar5 = 1; + break; + case 0x8b: + FUN_007a8384(0x1c,iVar10,extraout_r2,0); + FUN_0075425c(iVar15,iVar14); + uVar5 = 1; + } +LAB_006db286: + FUN_007ffb98(uVar5); + return; + } + if (uVar2 == 0x7d) { + FUN_006c48cc(iVar4,0x1d,36000,1); + FUN_007a8384(2,*(undefined4 *)(iVar4 + 0x100),*(undefined4 *)(iVar4 + 0x104),4); + uVar5 = 1; + goto LAB_006db286; + } + if (uVar2 < 0x22) { + if (uVar2 == 0x21) { +LAB_006da9ea: + FUN_00761b80(iVar15,iVar14); + FUN_00647acc(0,iVar15,iVar14,0,0); + uVar5 = 1; + goto LAB_006db286; + } + if (uVar2 < 0xe) { + if ((uVar2 == 0xd) || (uVar2 == 4)) goto LAB_006da9ea; + if (uVar2 == 10) { + if ((*(short *)(iVar13 + 0xc) < 0x252) || (0x286 < *(short *)(iVar13 + 0xc))) { + iVar4 = FUN_00776dc8(iVar15,iVar14,(int)*(char *)(iVar4 + 0x5cc8)); + if (iVar4 != 0) { + iVar10 = FUN_0058ef48(); + *(int *)(iVar10 + 0x3488) = *(int *)(iVar10 + 0x3488) + 1; + FUN_00648da4(iVar15,iVar14,iVar4); + uVar5 = 1; + goto LAB_006db286; + } + } + else { + iVar13 = 0; + iVar10 = iVar4; + do { + if ((*(int *)(iVar10 + 0x94c) == 0x475) && (0 < *(short *)(iVar10 + 0x98a))) { + iVar10 = FUN_00755fb4(iVar15,iVar14); + if (iVar10 != 0) { + iVar10 = iVar4 + iVar13 * 0xa0; + sVar3 = *(short *)(iVar10 + 0x98a) + -1; + *(short *)(iVar10 + 0x98a) = sVar3; + if (sVar3 < 1) { + FUN_00612a6c(iVar10 + 0x948); + } + FUN_00648744(*(undefined1 *)(iVar4 + 0x5cc9),iVar15,iVar14); + } + break; + } + iVar13 = iVar13 + 1; + iVar10 = iVar10 + 0xa0; + } while (iVar13 < 0x30); + } + } + else if ((uVar2 == 0xb) && (iVar4 = FUN_00772624(iVar15,iVar14,0), iVar4 != 0)) { + iVar4 = FUN_0058ef48(); + *(int *)(iVar4 + 0x348c) = *(int *)(iVar4 + 0x348c) + 1; + FUN_006494f4(iVar15,iVar14); + uVar5 = 1; + goto LAB_006db286; + } + } + else if ((uVar2 == 0x15) || (uVar2 == 0x1d)) goto LAB_006dac90; + } + else if (uVar2 < 0x50) { + if (uVar2 == 0x4f) { + iVar10 = (int)((ulonglong)((longlong)(int)*(short *)(iVar13 + 10) * (longlong)DAT_006dac8c) >> + 0x20); + iVar15 = iVar15 - ((iVar10 >> 2) - (iVar10 >> 0x1f)); + if (*(short *)(iVar13 + 10) < 0x48) { + iVar15 = iVar15 + 2; + } + else { + iVar15 = iVar15 + 5; + } + iVar10 = (int)((ulonglong)((longlong)(int)*(short *)(iVar13 + 0xc) * (longlong)DAT_006dac8c) + >> 0x20); + iVar14 = iVar14 - ((iVar10 >> 2) - (iVar10 >> 0x1f) & 1U); + iVar10 = FUN_006c3490(iVar15,iVar14 + 2); + if (iVar10 != 0) { + FUN_006c0828(iVar4,iVar15,iVar14 + 2); + FUN_0041c4d8(auStack_3b4,"MENU[57]"); + uVar5 = FUN_005f82b0(auStack_2d4,auStack_3b4); + FUN_006050e4(uVar5,0xff,0xf0,0x14,600); + FUN_007aa754(auStack_2d4); + FUN_0041b8a0(auStack_3b4); + uVar5 = 1; + goto LAB_006db286; + } + } + else if ((uVar2 == 0x31) || ((uVar2 == 0x32 && (*(short *)(iVar13 + 10) == 0x5a)))) + goto LAB_006da9ea; + } + else if (uVar2 == 0x61) { +LAB_006dac90: + if (*(short *)(iVar4 + 0x8df0) == -1) { + iVar10 = (int)*(short *)(iVar13 + 10); + iVar16 = -1; + iVar11 = (int)((ulonglong)((longlong)iVar10 * (longlong)DAT_006db304) >> 0x20); + iVar15 = iVar15 - ((iVar11 >> 2) - (iVar11 >> 0x1f) & 1U); + iVar11 = (int)((ulonglong)((longlong)(int)*(short *)(iVar13 + 0xc) * (longlong)DAT_006db304) + >> 0x20); + iVar14 = iVar14 - ((iVar11 >> 2) - (iVar11 >> 0x1f)); + if (uVar2 == 0x1d) { + iVar16 = -2; + } + else if (uVar2 == 0x61) { + iVar16 = -3; + } + else { + if (iVar10 < 0xfc) { + if (iVar10 < 0xd8) { + if (iVar10 < 0xb4) { + uVar5 = FUN_00633a94(auStack_154,0x30); + iVar10 = FUN_0058ef48(); + FUN_007aa80c(iVar10 + 0x33b4,auStack_124,uVar5); + FUN_007aa754(auStack_124); + puVar9 = auStack_154; + } + else { + uVar5 = FUN_00633a94(auStack_184,0x157); + iVar10 = FUN_0058ef48(); + FUN_007aa80c(iVar10 + 0x33b4,auStack_1e4,uVar5); + FUN_007aa754(auStack_1e4); + puVar9 = auStack_184; + } + } + else { + uVar5 = FUN_00633a94(auStack_244,0x15c); + iVar10 = FUN_0058ef48(); + FUN_007aa80c(iVar10 + 0x33b4,auStack_2a4,uVar5); + FUN_007aa754(auStack_2a4); + puVar9 = auStack_244; + } + } + else { + uVar5 = FUN_00633a94(auStack_304,0x30); + iVar10 = FUN_0058ef48(); + FUN_007aa80c(iVar10 + 0x33b4,auStack_334,uVar5); + FUN_007aa754(auStack_334); + puVar9 = auStack_304; + } + FUN_007aa754(puVar9); + } + iVar10 = (int)*(short *)(iVar13 + 10); + if (DAT_00fe1ec4 == 1) { + if (iVar16 != -1) goto LAB_006daee8; + if ((((0x47 < iVar10) && (iVar10 < 0x6b)) || ((0x8f < iVar10 && (iVar10 < 0xb3)))) || + ((0x33b < iVar10 && (iVar10 < 0x3ef)))) goto LAB_006dae2e; + if (((iVar15 == *(short *)(iVar4 + 0x8de4)) && (iVar14 == *(short *)(iVar4 + 0x8de6))) && + (*(short *)(iVar4 + 0x8de2) != -1)) goto LAB_006dae08; + FUN_00648990(*(undefined1 *)(iVar4 + 0x5cc9),iVar15,iVar14); + } + else { + if (iVar16 == -1) { +LAB_006dae2e: + bVar12 = false; + if (((0x47 < iVar10) && (iVar10 < 0x6b)) || + (((0x8f < iVar10 && (iVar10 < 0xb3)) || (iVar10 - 0x33cU < 0xb3)))) { + iVar13 = 0x149; + if ((0x22 < iVar10 - 0x90U) && (iVar13 = 0x147, iVar10 - 0x33cU < 0xb3)) { + iVar10 = (int)((ulonglong)((longlong)iVar10 * (longlong)DAT_006db304) >> 0x20); + iVar13 = ((iVar10 >> 3) - (iVar10 >> 0x1f)) + 0x5e6; + } + bVar12 = true; + iVar16 = 0; + iVar10 = iVar4; + do { + if ((*(int *)(iVar10 + 0x94c) == iVar13) && (0 < *(short *)(iVar10 + 0x98a))) { + if (iVar13 != 0x149) { + iVar10 = iVar4 + iVar16 * 0xa0; + sVar3 = *(short *)(iVar10 + 0x98a) + -1; + *(short *)(iVar10 + 0x98a) = sVar3; + if (sVar3 < 1) { + FUN_00612a6c(iVar10 + 0x948); + } + } + FUN_00605890(iVar15,iVar14); + FUN_006488a4(*(undefined1 *)(iVar4 + 0x5cc9),iVar15,iVar14); + uVar5 = 1; + goto LAB_006db286; + } + iVar16 = iVar16 + 1; + iVar10 = iVar10 + 0xa0; + } while (iVar16 < 0x30); + } + if ((bVar12) || (iVar16 = FUN_006056e0(iVar15,iVar14), iVar16 == -1)) + goto switchD_006daf52_caseD_81; + } +LAB_006daee8: + if (iVar16 != *(short *)(iVar4 + 0x8de2)) { + if (*(short *)(iVar4 + 0x8de2) == -1) { + uVar5 = 10; + } + else { + uVar5 = 0xc; + } + FUN_007a7bf4(uVar5); + *(short *)(iVar4 + 0x8de4) = (short)iVar15; + *(short *)(iVar4 + 0x8de6) = (short)iVar14; + *(short *)(iVar4 + 0x8de2) = (short)iVar16; + FUN_006d0250(iVar4); + uVar5 = 1; + goto LAB_006db286; + } +LAB_006dae08: + *(undefined2 *)(iVar4 + 0x8de2) = 0xffff; + FUN_007a7bf4(0xb); + } + uVar5 = 1; + goto LAB_006db286; + } + } + else if (uVar2 == 0x68) { + FUN_007ab078(auStack_94,&DAT_00879344); + dVar21 = (double)DAT_010703dc; + if (DAT_010703e0 == '\0') { + dVar21 = dVar21 + DAT_006dac84; + } + dVar21 = ((dVar21 / DAT_006dac7c) * 24.0 - 7.5) - 12.0; + if (dVar21 < 0.0) { + dVar21 = dVar21 + 24.0; + } + uVar1 = in_fpscr & 0xfffffff | (uint)(dVar21 < 12.0) << 0x1f; + uVar17 = uVar1 | (uint)NAN(dVar21) << 0x1c; + if ((byte)(uVar1 >> 0x1f) == ((byte)(uVar17 >> 0x1c) & 1)) { + FUN_007aaef0(auStack_94,auStack_274,&DAT_00879348); + FUN_007aa754(auStack_274); + } + iVar15 = (int)(longlong)dVar21; + dVar18 = (double)VectorSignedToFloat(iVar15,(byte)(uVar17 >> 0x16) & 3); + dVar21 = (double)VectorSignedToFloat((int)(longlong)((dVar21 - dVar18) * DAT_006dac74), + (byte)(uVar17 >> 0x16) & 3); + FUN_007ab778(auStack_c4,&DAT_00865e48,(int)(longlong)dVar21); + if (dVar21 < 10.0) { + uVar5 = FUN_007ab680(auStack_214,&DAT_0080f438,auStack_c4); + FUN_007aa80c(auStack_c4,auStack_364,uVar5); + FUN_007aa754(auStack_364); + FUN_007aa754(auStack_214); + } + if (0xc < iVar15) { + iVar15 = iVar15 + -0xc; + } + if (iVar15 == 0) { + iVar15 = 0xc; + } + uVar5 = FUN_0041c4d8(auStack_394,&DAT_0087934c); + uVar6 = FUN_0046b9a8(); + piVar7 = (int *)FUN_0049d0e0(uVar6,auStack_37c,uVar5); + if (7 < (uint)piVar7[5]) { + piVar7 = (int *)*piVar7; + } + FUN_007aada8(auStack_64,piVar7); + FUN_00423f74(auStack_37c); + piVar7 = (int *)FUN_007aa600(auStack_94); + if (0xf < (uint)piVar7[5]) { + piVar7 = (int *)*piVar7; + } + piVar8 = (int *)FUN_007aa600(auStack_c4); + if (0xf < (uint)piVar8[5]) { + piVar8 = (int *)*piVar8; + } + uVar5 = FUN_007ab778(auStack_f4," %i:%s %s",iVar15,piVar8,piVar7); + FUN_007aacc4(auStack_64,auStack_1b4,uVar5); + FUN_007aa754(auStack_1b4); + FUN_006050e4(auStack_64,0xff,0xf0,0x14,600); + FUN_007aa754(auStack_64); + FUN_007aa754(auStack_c4); + FUN_007aa754(auStack_94); + uVar5 = 1; + goto LAB_006db286; + } + goto switchD_006daf52_caseD_81; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006db640.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006db640.c new file mode 100644 index 000000000..d155608f5 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/006db640.c @@ -0,0 +1,4416 @@ + +/* WARNING: Heritage AFTER dead removal. Example location: s1 : 0x006dd284 */ +/* WARNING: Restarted to delay deadcode elimination for space: register */ + +void FUN_006db640(void) + +{ + undefined1 uVar1; + longlong lVar2; + longlong lVar3; + byte bVar4; + undefined1 *puVar5; + undefined1 *puVar6; + undefined1 *puVar7; + undefined1 *puVar8; + undefined2 uVar9; + int iVar10; + undefined4 uVar11; + undefined4 uVar12; + int iVar13; + int iVar14; + int *piVar15; + int iVar16; + uint uVar17; + undefined4 *puVar18; + undefined4 uVar19; + undefined4 uVar20; + char cVar21; + undefined1 **ppuVar22; + uint uVar23; + ushort uVar24; + int iVar25; + int iVar26; + uint uVar27; + int iVar28; + uint uVar29; + undefined1 uVar30; + short sVar31; + int iVar32; + ushort *puVar33; + short *psVar34; + int iVar35; + undefined2 *puVar36; + int iVar37; + int iVar38; + uint uVar39; + short sVar40; + int iVar41; + bool bVar42; + bool bVar43; + uint in_fpscr; + float fVar44; + float fVar45; + float fVar46; + float fVar47; + float fVar48; + float fVar49; + double in_d0; + float fVar51; + float fVar52; + double dVar50; + float fVar53; + double in_d1; + double dVar54; + undefined4 in_s5; + undefined1 *puVar55; + float fVar56; + float fVar57; + undefined1 *puVar58; + float fVar59; + undefined1 *puVar60; + undefined1 *puVar61; + undefined8 uVar62; + int local_508; + int local_504; + int local_4ec; + uint local_4e8; + int *local_4dc; + undefined1 *local_4d8; + int local_4cc; + int local_4c8; + int local_4c4; + int local_4c0; + undefined1 *local_4bc; + undefined1 *local_4b8; + undefined4 local_4b4; + undefined4 local_4ac; + undefined4 local_4a8; + undefined4 local_4a4; + undefined4 local_4a0; + undefined4 local_49c; + undefined4 local_498; + undefined1 *local_494; + undefined1 *local_490; + undefined1 *local_48c; + undefined1 *local_488; + undefined1 *local_484; + undefined1 *local_480; + undefined4 local_47c; + undefined4 local_478; + undefined1 *local_474; + undefined1 *local_470; + undefined4 local_46c; + undefined4 local_468; + undefined1 *local_464; + undefined1 *local_460; + undefined4 local_45c; + undefined4 local_458; + undefined1 *local_454; + undefined1 *local_450; + undefined4 local_44c; + undefined4 local_448; + undefined4 local_444; + undefined4 local_440; + undefined4 local_43c; + undefined4 local_438; + undefined1 *local_434; + undefined1 *local_430; + undefined1 *local_42c; + undefined1 *local_424; + undefined4 local_420; + undefined1 *local_41c; + undefined1 *local_414; + undefined1 *local_410; + undefined1 *local_40c; + undefined1 *local_404; + undefined4 local_400; + undefined1 *local_3fc; + undefined1 *local_3f4; + undefined1 *local_3f0; + undefined4 local_3ec; + undefined1 *local_3e4; + undefined1 *local_3e0; + undefined4 local_3dc; + undefined1 *local_3d4; + undefined1 *local_3d0; + undefined4 local_3cc; + undefined1 *local_3c4; + undefined1 *local_3c0; + undefined4 local_3bc; + undefined4 local_3b8; + undefined4 local_3b4; + undefined4 local_3b0; + undefined4 local_3ac; + undefined4 local_3a8; + undefined4 local_3a4; + undefined4 local_3a0; + undefined4 local_39c; + undefined4 local_398; + undefined4 local_394; + undefined4 local_390; + undefined4 local_38c; + undefined4 local_388; + undefined4 local_384; + undefined4 local_380; + undefined1 *local_37c; + undefined1 *local_378; + undefined1 *local_374; + undefined4 local_370; + undefined4 local_36c; + undefined1 *local_368; + undefined1 *local_364; + undefined4 local_360; + undefined1 *local_35c; + undefined4 local_358; + undefined1 *local_354; + undefined4 local_350; + undefined1 *local_34c; + undefined1 *local_348; + undefined1 *local_344; + undefined4 local_340; + undefined1 *local_33c; + undefined1 *local_338; + undefined1 *local_334; + undefined4 local_330; + undefined1 *local_32c; + undefined1 *local_328; + undefined1 *local_324; + undefined4 local_320; + undefined1 *local_31c; + undefined1 *local_318; + undefined1 *local_314; + undefined4 local_310; + undefined1 *local_30c; + undefined4 local_308; + undefined1 *local_304; + undefined4 local_300; + undefined1 *local_2fc; + undefined1 *local_2f8; + undefined4 local_2f4; + undefined4 local_2f0; + undefined4 local_2ec; + undefined4 local_2e8; + undefined1 *local_2e4; + undefined4 local_2e0; + undefined4 local_2dc; + undefined4 local_2d8; + undefined1 *local_2d4; + undefined4 local_2d0; + undefined4 local_2cc; + undefined1 *local_2c8; + undefined1 *local_2c4; + undefined4 local_2c0; + undefined1 *local_2bc; + undefined4 local_2b8; + undefined1 *local_2b4; + undefined4 local_2b0; + undefined1 *local_2ac; + undefined1 *local_2a8; + undefined1 *local_2a4; + undefined4 local_2a0; + undefined1 *local_29c; + undefined1 *local_298; + undefined1 *local_294; + undefined4 local_290; + undefined1 *local_28c; + undefined1 *local_288; + undefined1 *local_284; + undefined4 local_280; + undefined1 *local_27c; + undefined1 *local_278; + undefined1 *local_274; + undefined4 local_270; + undefined1 *local_26c; + undefined1 *local_268; + undefined1 *local_264; + undefined1 auStack_25c [24]; + undefined1 auStack_244 [8]; + undefined4 local_23c; + undefined4 uStack_238; + undefined1 auStack_234 [24]; + undefined1 auStack_21c [48]; + float local_1ec; + float local_1e8; + undefined1 *local_1e4; + undefined1 *local_1e0; + undefined1 *local_1dc; + undefined1 *local_1d4; + undefined1 *local_1d0; + undefined1 *local_1cc; + int local_1c4; + int local_1c0; + float local_1bc; + float local_1b8; + float local_1b4; + float local_1b0; + float local_1ac [2]; + undefined1 auStack_1a4 [4]; + int local_1a0; + short local_162; + undefined1 auStack_104 [4]; + int local_100; + short local_c2; + + uVar62 = FUN_007ffb80(); + uVar23 = (uint)((ulonglong)uVar62 >> 0x20); + iVar10 = (int)uVar62; + local_23c = 0xfffffffe; + uStack_238 = 0xfffffffe; + if ((*(int *)(iVar10 + 0x8e84) == 0) && (-1 < *(int *)(iVar10 + 0x8e80))) { + *(char *)(iVar10 + 0x14c) = (char)*(int *)(iVar10 + 0x8e80); + *(undefined4 *)(iVar10 + 0x8e80) = 0xffffffff; + } + if (0 < *(int *)(iVar10 + 0x8e84)) { + *(int *)(iVar10 + 0x8e84) = *(int *)(iVar10 + 0x8e84) + -1; + } + if (*(char *)(iVar10 + 0x41) != '\0') goto LAB_006e2b46; + iVar32 = iVar10 + *(char *)(iVar10 + 0x14c) * 0xa0; + iVar37 = iVar32 + 0x948; + local_4b8 = auStack_234; + uVar11 = FUN_0041c4d8(auStack_234,"hudstate"); + uVar12 = FUN_0058b210(); + iVar13 = FUN_0055b2ec(uVar12,uVar11); + if ((*(int *)(iVar13 + 0x104) != 0) && (iVar14 = FUN_005e6680(), iVar14 != 0)) goto LAB_006e2b46; + uVar11 = FUN_006132c8(iVar37); + piVar15 = (int *)FUN_0059170c(); + iVar14 = (**(code **)(*piVar15 + 0x1c))(piVar15,uVar11); + local_504 = (int)*(short *)(iVar32 + 0x992); + if (0 < local_504) { + if (*(char *)(iVar32 + 0x96a) == '\0') { + if (*(char *)(iVar32 + 0x96c) == '\0') { + if (*(char *)(iVar32 + 0x96b) != '\0') { + fVar51 = (float)VectorSignedToFloat(local_504,(byte)(in_fpscr >> 0x16) & 3); + local_504 = (int)(fVar51 * *(float *)(iVar10 + 0x5d4c)); + } + } + else { + fVar51 = (float)VectorSignedToFloat(local_504,(byte)(in_fpscr >> 0x16) & 3); + sVar31 = *(short *)(iVar10 + *(char *)(iVar10 + 0x14c) * 0xa0 + 0x9d0); + if ((sVar31 == 1) || (sVar31 == 0x143)) { + VectorSignedToFloat((int)(fVar51 * *(float *)(iVar10 + 0x5d48)), + (byte)(in_fpscr >> 0x16) & 3); + } + local_504 = SUB84(in_d0,0); + if ((sVar31 == 0xe) || (sVar31 == 0x137)) { + fVar51 = (float)VectorSignedToFloat(local_504,(byte)(in_fpscr >> 0x16) & 3); + local_504 = (int)(fVar51 * *(float *)(iVar10 + 0x88)); + } + if (((sVar31 == 0x303) || (sVar31 == 0xf6)) || (sVar31 == 0x138)) { + fVar51 = (float)VectorSignedToFloat(local_504,(byte)(in_fpscr >> 0x16) & 3); + local_504 = (int)(fVar51 * *(float *)(iVar10 + 0x90)); + } + } + } + else { + fVar51 = (float)VectorSignedToFloat(local_504,(byte)(in_fpscr >> 0x16) & 3); + local_504 = (int)(fVar51 * *(float *)(iVar10 + 0x5d44)); + } + } + if (((*(char *)(iVar32 + 0x962) != '\0') && (*(char *)(iVar10 + 0x5d2c) == '\0')) && + ((*(undefined1 *)(iVar10 + 0x5cc0) = 1, *(short *)(iVar10 + 0x154) == 1 && + (0 < *(short *)(iVar32 + 0x98a))))) { + if (((*(short *)(iVar32 + 0x9d2) < 1) || (iVar16 = FUN_006becfc(iVar10), iVar16 != 0)) || + (*(char *)(iVar10 + 0x5cba) == '\0')) { + iVar16 = FUN_00613084(iVar37); + if ((iVar16 == 0) && + (((cVar21 = *(char *)(iVar32 + 0x977), cVar21 == '\x01' || (cVar21 == '\x03')) || + (cVar21 == '\x05')))) { + *(undefined2 *)(iVar10 + 0x154) = 0xffff; + } + else { + *(undefined2 *)(iVar10 + 0x154) = 0; + } + } + else { + *(undefined2 *)(iVar10 + 0x154) = 2; + } + } + if ((*(short *)(iVar10 + 0x154) == 0) && (*(byte *)(iVar10 + 0x146) != 0)) { + *(ushort *)(iVar10 + 0x154) = (ushort)*(byte *)(iVar10 + 0x146); + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar10 + 0x146); + *(undefined1 *)(iVar10 + 0x146) = 0; + } + if (((*(char *)(iVar10 + 0x5cba) != '\0') && (*(char *)(iVar10 + 0x5cc0) != '\0')) && + (iVar16 = FUN_00612f1c(iVar37), iVar16 != 0)) { + if (*(char *)(iVar32 + 0x977) == '\0') { + *(undefined1 *)(iVar10 + 0x5cc0) = 0; + } + iVar38 = (int)*(short *)(iVar10 + 0x8960); + iVar35 = (int)*(short *)(iVar10 + 0x8962); + iVar25 = DAT_00902934 * iVar38 + iVar35; + iVar16 = iVar25 * 0xe + DAT_00902928; + if ((*(short *)(iVar16 + 6) == 0x80) && ((*(byte *)(iVar16 + 1) & 1) != 0)) { + bVar42 = true; + } + else { + bVar42 = false; + } + if (bVar42) { + iVar16 = 0; + if (*(short *)(iVar32 + 0x9c0) == 0xff) { + if (*(short *)(iVar32 + 0x9c2) != 0xff) { + iVar16 = 2; + } + } + else { + iVar16 = 1; + } + iVar26 = (int)((ulonglong) + ((longlong)(int)*(short *)(iVar25 * 0xe + DAT_00902928 + 0xc) * + (longlong)DAT_006dbbcc) >> 0x20); + iVar26 = (iVar26 >> 2) - (iVar26 >> 0x1f); + if (iVar26 < iVar16) { + iVar25 = iVar25 * 0xe + DAT_00902928; + do { + iVar35 = iVar35 + 1; + iVar26 = (int)((ulonglong) + ((longlong)(int)*(short *)(iVar25 + 0x1a) * (longlong)DAT_006dbbcc) >> 0x20 + ); + iVar26 = (iVar26 >> 2) - (iVar26 >> 0x1f); + iVar25 = iVar25 + 0xe; + } while (iVar26 < iVar16); + } + if (iVar16 < iVar26) { + iVar25 = (DAT_00902934 * iVar38 + iVar35) * 0xe + DAT_00902928; + do { + iVar35 = iVar35 + -1; + iVar26 = (int)((ulonglong) + ((longlong)(int)*(short *)(iVar25 + -2) * (longlong)DAT_006dbbcc) >> 0x20); + iVar26 = (iVar26 >> 2) - (iVar26 >> 0x1f); + iVar25 = iVar25 + -0xe; + } while (iVar16 < iVar26); + } + iVar16 = (int)*(short *)((DAT_00902934 * iVar38 + iVar35) * 0xe + DAT_00902928 + 10); + iVar25 = (int)((ulonglong)((longlong)iVar16 * (longlong)DAT_006dbbc8) >> 0x20); + iVar16 = iVar16 + ((iVar25 >> 5) - (iVar25 >> 0x1f)) * -100; + if (0x23 < iVar16) { + iVar16 = iVar16 + -0x24; + } + iVar16 = (int)((ulonglong)((longlong)iVar16 * (longlong)DAT_006dbbcc) >> 0x20); + iVar38 = iVar38 - ((iVar16 >> 2) - (iVar16 >> 0x1f)); + sVar31 = *(short *)((DAT_00902934 * iVar38 + iVar35) * 0xe + DAT_00902928 + 10); + FUN_007743f8(iVar38,iVar35,1,0,0,0); + FUN_00647acc(0,iVar38,iVar35,1,0); + lVar2 = (longlong)(int)sVar31 * (longlong)DAT_006dbbc8; + if (iVar26 == 0) { + sVar40 = *(short *)(iVar32 + 0x9be); + } + else if (iVar26 == 1) { + sVar40 = *(short *)(iVar32 + 0x9c0); + } + else { + if (iVar26 != 2) goto LAB_006dbac0; + sVar40 = *(short *)(iVar32 + 0x9c2); + } + if (sVar40 != 0xff) { + *(short *)((DAT_00902934 * iVar38 + iVar35) * 0xe + DAT_00902928 + 10) = + sVar40 * 100 + sVar31 + ((short)(int)(lVar2 >> 0x25) - (short)(lVar2 >> 0x3f)) * -100; + FUN_00649a94(iVar38,iVar35,0,0); + FUN_00612a6c(iVar37); + iVar16 = FUN_0058ef48(); + FUN_00612a6c(iVar16 + 0x311c); + *(undefined1 *)(iVar10 + 0x5cc0) = 0; + } + } + } +LAB_006dbac0: + iVar16 = FUN_00613084(iVar37); + local_4dc = &DAT_0107034c; + if (iVar16 != 0) { + *(undefined1 *)(iVar10 + 0x8df5) = 0; + iVar16 = (*(short *)((&DAT_0107034c)[DAT_0103399c] + 0x8960) * DAT_00902934 + + (int)*(short *)((&DAT_0107034c)[DAT_0103399c] + 0x8962)) * 0xe + DAT_00902928; + if ((*(char *)(iVar16 + 8) == '\0') && ((*(byte *)(iVar16 + 1) & 1) == 0)) { + bVar42 = false; + } + else { + bVar42 = true; + } + if (bVar42) { + iVar16 = FUN_0058ef48(); + if (*(char *)(iVar16 + 0x3800) == '\0') { + iVar16 = FUN_0058ef48(); + iVar16 = FUN_00611450(iVar16 + 0x289c); + if (iVar16 == 0) goto LAB_006dbb5c; + } + *(undefined1 *)(iVar10 + 0x8df5) = 1; + } + else { + iVar16 = FUN_0058ef48(); + if (*(char *)(iVar16 + 0x3800) == '\0') { + FUN_0058ef48(); + FUN_00735a6c(); + } + } + } +LAB_006dbb5c: + iVar16 = 0; + if (*(int *)(iVar13 + 0x104) != 0) { + iVar16 = FUN_005e6580(); + } + puVar5 = DAT_006dbbc4; + if ((((*(char *)(iVar10 + 0x5cba) != '\0') && (*(short *)(iVar10 + 0x154) == 0)) && + (*(char *)(iVar10 + 0x5cc0) != '\0')) && + ((*(char *)(iVar32 + 0x977) != '\0' && (iVar16 == 0)))) { + uVar17 = (uint)(*(char *)(iVar10 + 0x5d2c) == '\0'); + if (*(short *)(iVar32 + 0x9d2) == 0) { + *(undefined1 **)(iVar10 + 0x164) = DAT_006dbbc4; + } + if (uVar17 != 0) { + if ((*(int *)(iVar32 + 0x94c) == 0x42f) || (*(int *)(iVar32 + 0x94c) == 0x430)) { + uVar17 = FUN_006beaf8(iVar10); + } + else if (*(short *)(iVar32 + 0x9dc) < 0) { + uVar27 = (uint)*(short *)(iVar32 + 0x9d2); + if (((uVar27 == 0x55) || (uVar27 == 0xf)) || (uVar27 == 0x22)) { + if (*(char *)(iVar10 + 0x5c81) == '\0') { + uVar17 = 1; + } + else { + uVar17 = 0; + } + } + else if (((((uVar27 == 6) || (uVar27 == 0x13)) || + ((uVar27 == 0x21 || ((uVar27 == 0x34 || (uVar27 == 0x71)))))) || (uVar27 == 0xb6)) + || (uVar27 == 0x140)) { + puVar33 = &DAT_0107af40; + iVar13 = 0; + do { + if ((((char)puVar33[2] != '\0') && ((char)puVar33[0x11] == *(char *)(iVar10 + 0x5cc9))) + && (*puVar33 == uVar27)) goto LAB_006dbd16; + iVar13 = iVar13 + 1; + puVar33 = puVar33 + 0x74; + } while (iVar13 < 0x200); + } + else if (uVar27 == 0x6a) { + psVar34 = &DAT_0107af40; + iVar16 = 0; + iVar13 = 0; + do { + if ((((char)psVar34[2] != '\0') && ((char)psVar34[0x11] == *(char *)(iVar10 + 0x5cc9))) + && ((*psVar34 == 0x6a && (iVar16 = iVar16 + 1, *(short *)(iVar32 + 0x98a) <= iVar16)) + )) goto LAB_006dbd16; + iVar13 = iVar13 + 1; + psVar34 = psVar34 + 0x74; + } while (iVar13 < 0x200); + } + else if (uVar27 == 0x110) { + iVar16 = 0; + iVar13 = 0; + psVar34 = &DAT_0107af40; + do { + if ((((*psVar34 == 0x110) && ((char)psVar34[2] != '\0')) && + ((char)psVar34[0x11] == *(char *)(iVar10 + 0x5cc9))) && + (iVar16 = iVar16 + 1, *(short *)(iVar32 + 0x98a) <= iVar16)) goto LAB_006dbd16; + iVar13 = iVar13 + 1; + psVar34 = psVar34 + 0x74; + } while (iVar13 < 0x200); + } + else if (((uVar27 == 0xd) || (uVar27 == 0x20)) || + (((0xe5 < (int)uVar27 && ((int)uVar27 < 0xec)) || (uVar27 == 0x13b)))) { + iVar13 = 0; + puVar33 = &DAT_0107af40; + do { + if (((*puVar33 == uVar27) && ((char)puVar33[2] != '\0')) && + (((char)puVar33[0x11] == *(char *)(iVar10 + 0x5cc9) && + (in_fpscr = in_fpscr & 0xfffffff | (uint)(*(float *)(puVar33 + 0x3a) == 2.0) << 0x1e + , (byte)(in_fpscr >> 0x1e) == 0)))) goto LAB_006dbd16; + iVar13 = iVar13 + 1; + puVar33 = puVar33 + 0x74; + } while (iVar13 < 0x200); + } + } + else { + uVar17 = FUN_006beaa8(iVar10); + } + goto LAB_006dbd60; + } + goto LAB_006dbd92; + } +LAB_006dc31a: + if (*(char *)(iVar10 + 0x5cba) == '\0') { + *(undefined1 *)(iVar10 + 0x5cf9) = 0; + } + uVar11 = FUN_006132c8(iVar37); + uVar12 = FUN_005b0708(); + puVar18 = (undefined4 *)FUN_00569340(uVar12,auStack_244,uVar11); + puVar60 = DAT_006dc410; + fVar59 = DAT_006dc40c; + fVar51 = DAT_006dc408; + iVar13 = DAT_006dc404; + puVar55 = DAT_006dc400; + local_1bc = (float)VectorSignedToFloat(*puVar18,(byte)(in_fpscr >> 0x16) & 3); + local_1b8 = (float)VectorSignedToFloat(puVar18[1],(byte)(in_fpscr >> 0x16) & 3); + local_4bc = (undefined1 *)0xc0800000; + *(short *)(iVar10 + 0x168) = (short)(int)local_1bc; + local_4d8 = (undefined1 *)0xc1000000; + local_4b4 = 0xc0000000; + *(short *)(iVar10 + 0x16a) = (short)(int)local_1b8; + if (*(short *)(iVar10 + 0x154) < 1) { + cVar21 = *(char *)(iVar32 + 0x976); + if ((cVar21 == '\x01') && (*(char *)(iVar10 + 0x67) == '\0')) { + iVar13 = *(int *)(iVar32 + 0x94c); + if (iVar13 == 0x3a2) { + *(int *)(iVar10 + 0x16c) = + (*(int *)(iVar10 + 0x100) + (*(int *)(iVar10 + 0x108) >> 1) >> 1) + + (*(char *)(iVar10 + 0x5cc8) + 6) * -2; + iVar13 = FUN_006c0208(iVar10,0x3a3); + if (-1 < iVar13) { + iVar13 = *(int *)(iVar10 + iVar13 * 0xa0 + 0x94c); + if (iVar13 == 0x3a3) { + iVar13 = 0x7f; + } + else if (iVar13 == 0x64e) { + iVar13 = 0xbb; + } + else if (iVar13 < 1) goto LAB_006dcd16; + iVar14 = *(char *)(iVar10 + 0x5cc8) * 0x26 + (*(int *)(iVar10 + 0x108) >> 1) + + *(int *)(iVar10 + 0x100); + if (0 < *(char *)(iVar10 + 0x5cc8)) { + iVar14 = iVar14 + -10; + } + iVar16 = (*(int *)(iVar10 + 0x10c) >> 1) + *(char *)(iVar10 + 0x5d1d) * -4 + + *(int *)(iVar10 + 0x104); + if (*(char *)(iVar10 + 0x5d1d) < 0) { + iVar16 = iVar16 + -8; + } + local_290 = 0; + iVar13 = FUN_0060d7ac(&DAT_01073158,iVar14,iVar16 + (int)*(float *)(iVar10 + 0xf8),6,6, + iVar13,100,0); + *(undefined1 *)(iVar13 + 1) = 1; + fVar44 = (float)VectorSignedToFloat((int)*(char *)(iVar10 + 0x5d1d) << 2, + (byte)(in_fpscr >> 0x16) & 3); + *(float *)(iVar13 + 0x28) = *(float *)(iVar13 + 0x28) - fVar44; + } + } + else if (iVar13 == 0x3c8) { + iVar16 = (*(int *)(iVar10 + 0x108) >> 1) + *(char *)(iVar10 + 0x5cc8) * 8 + + *(int *)(iVar10 + 0x100); + *(int *)(iVar10 + 0x16c) = iVar16; + iVar13 = FUN_006becfc(iVar10); + if (iVar13 != 0) { + fVar44 = (float)VectorSignedToFloat(*(undefined4 *)(iVar14 + 8), + (byte)(in_fpscr >> 0x16) & 3); + fVar52 = (float)VectorSignedToFloat((int)*(char *)(iVar10 + 0x5cc8), + (byte)(in_fpscr >> 0x16) & 3); + fVar45 = (float)VectorSignedToFloat(iVar16,(byte)(in_fpscr >> 0x16) & 3); + iVar16 = (int)(fVar45 + fVar44 * (float)puVar55 * fVar52); + iVar13 = *(int *)(iVar10 + 0x170) + (*(int *)(iVar14 + 0xc) >> 1); + iVar13 = (((int)(iVar16 + ((uint)(iVar16 >> 3) >> 0x1c)) >> 4) * DAT_00902934 + + ((int)(iVar13 + ((uint)(iVar13 >> 3) >> 0x1c)) >> 4)) * 0xe + DAT_00902928; + if ((*(short *)(iVar13 + 6) == 0xd7) && ((*(byte *)(iVar13 + 1) & 1) != 0)) { + bVar42 = true; + } + else { + bVar42 = false; + } + if (bVar42) { + *(int *)(iVar10 + 0xe0) = *(int *)(iVar10 + 0xe0) + 1; + iVar13 = FUN_00608330(&DAT_00fd67f4,5); + if (iVar13 == 0) { + *(int *)(iVar10 + 0xe0) = *(int *)(iVar10 + 0xe0) + 1; + } + if (900 < *(int *)(iVar10 + 0xe0)) { + *(undefined4 *)(iVar10 + 0xe0) = 0; + FUN_00616ed8(iVar37,0x3c9,1); + iVar14 = 0; + iVar13 = iVar10; + do { + if (((*(int *)(iVar13 + 0x94c) == *(int *)(iVar32 + 0x94c)) && + (iVar14 != *(char *)(iVar10 + 0x14c))) && + (*(short *)(iVar13 + 0x98a) < *(short *)(iVar13 + 0x98c))) { + FUN_007a7bf4(7); + *(short *)(iVar13 + 0x98a) = *(short *)(iVar13 + 0x98a) + 1; + FUN_00612a6c(iVar37); + } + iVar14 = iVar14 + 1; + iVar13 = iVar13 + 0xa0; + } while (iVar14 < 0x30); + FUN_006d0adc(iVar10,0xd7); + } + } + else { + *(undefined4 *)(iVar10 + 0xe0) = 0; + } + } + } + else if (iVar13 == 0x358) { + *(int *)(iVar10 + 0x16c) = + *(int *)(iVar10 + 0x100) + + (*(int *)(iVar10 + 0x108) >> 1) + *(char *)(iVar10 + 0x5cc8) * 4; + } + else { + iVar13 = (((int)*(short *)(iVar10 + 0x168) >> 1) + 2) * (int)*(char *)(iVar10 + 0x5cc8) + + (*(int *)(iVar10 + 0x108) >> 1) + *(int *)(iVar10 + 0x100); + *(int *)(iVar10 + 0x16c) = iVar13; + if ((*(int *)(iVar32 + 0x94c) == 0x11a) || (*(int *)(iVar32 + 0x94c) == 0x11e)) { + *(int *)(iVar10 + 0x16c) = iVar13 + *(char *)(iVar10 + 0x5cc8) * -2; + *(int *)(iVar10 + 0x170) = *(int *)(iVar10 + 0x170) + 4; + } + } +LAB_006dcd16: + if (*(int *)(iVar32 + 0x94c) == 0x358) { + iVar13 = *(int *)(iVar10 + 0x104) + 0x22; + } + else if (*(int *)(iVar32 + 0x94c) == 0x3a2) { + iVar13 = *(int *)(iVar10 + 0x104) + 9; + } + else { + iVar13 = *(int *)(iVar10 + 0x104) + 0x18; + } + *(int *)(iVar10 + 0x170) = iVar13; + *(undefined1 **)(iVar10 + 0x164) = puVar5; + if (*(char *)(iVar10 + 0x5d1d) < '\0') { + *(undefined4 *)(iVar10 + 0x164) = DAT_006dcd84; + iVar13 = (*(int *)(iVar10 + 0x104) + 0x15) * 2 - *(int *)(iVar10 + 0x170); + *(int *)(iVar10 + 0x170) = iVar13; + if (*(int *)(iVar10 + *(char *)(iVar10 + 0x14c) * 0xa0 + 0x94c) == 0x3a2) { + *(int *)(iVar10 + 0x170) = iVar13 + -0x18; + } + } + } + else if ((cVar21 == '\x02') && (*(char *)(iVar10 + 0x67) == '\0')) { + if (*(int *)(iVar32 + 0x94c) != 0x3b2) { + *(int *)(iVar10 + 0x16c) = + *(int *)(iVar10 + 0x100) + + (*(int *)(iVar10 + 0x108) >> 1) + *(char *)(iVar10 + 0x5cc8) * 6; + *(int *)(iVar10 + 0x170) = *(int *)(iVar10 + 0x104) + 0x10; + fVar44 = (float)VectorSignedToFloat((int)*(char *)(iVar10 + 0x5cc8), + (byte)(in_fpscr >> 0x16) & 3); + *(float *)(iVar10 + 0x164) = fVar44 * DAT_006dd0d0; + cVar21 = *(char *)(iVar10 + 0x5d1d); + goto LAB_006dce64; + } + *(undefined1 **)(iVar10 + 0x164) = puVar5; + *(int *)(iVar10 + 0x16c) = + *(int *)(iVar10 + 0x100) + + (*(int *)(iVar10 + 0x108) >> 1) + *(char *)(iVar10 + 0x5cc8) * -0x10; + *(int *)(iVar10 + 0x170) = *(int *)(iVar10 + 0x104) + 0x16; + FUN_006d0938(iVar10); + if (*(char *)(iVar10 + 0x5d1d) < '\0') { + *(float *)(iVar10 + 0x164) = -*(float *)(iVar10 + 0x164); + *(int *)(iVar10 + 0x170) = (*(int *)(iVar10 + 0x104) + 0x15) * 2 - *(int *)(iVar10 + 0x170); + in_fpscr = in_fpscr & 0xfffffff | (uint)(-2.0 <= *(float *)(iVar10 + 0x124)) << 0x1d; + if ((byte)(in_fpscr >> 0x1d) == 0) { + *(undefined4 *)(iVar10 + 0x124) = 0xc0000000; + } + } + else { + fVar44 = *(float *)(iVar10 + 0x124); + uVar17 = in_fpscr & 0xfffffff | (uint)(fVar44 < 2.0) << 0x1f | (uint)(fVar44 == 2.0) << 0x1e + ; + in_fpscr = uVar17 | (uint)NAN(fVar44) << 0x1c; + bVar4 = (byte)(uVar17 >> 0x18); + if (!(bool)(bVar4 >> 6 & 1) && bVar4 >> 7 == ((byte)(in_fpscr >> 0x1c) & 1)) { + *(undefined4 *)(iVar10 + 0x124) = 0x40000000; + } + } + } + else if ((cVar21 == '\x03') && (*(char *)(iVar10 + 0x67) == '\0')) { + *(int *)(iVar10 + 0x16c) = + *(int *)(iVar10 + 0x100) + + ((*(int *)(iVar10 + 0x108) >> 1) - ((int)*(short *)(iVar10 + 0x168) >> 1)) + + *(char *)(iVar10 + 0x5cc8) * -2; + *(int *)(iVar10 + 0x170) = + *(int *)(iVar10 + 0x104) + + ((*(int *)(iVar10 + 0x10c) >> 1) - ((int)*(short *)(iVar10 + 0x16a) >> 1)); + *(undefined1 **)(iVar10 + 0x164) = puVar5; + } + } + else { + if (*(char *)(iVar32 + 0x96a) == '\0') { + uVar24 = (ushort)*(byte *)(iVar32 + 0x978); + } + else { + fVar44 = (float)VectorSignedToFloat((uint)*(byte *)(iVar32 + 0x978), + (byte)(in_fpscr >> 0x16) & 3); + uVar24 = (ushort)(int)(fVar44 * *(float *)(iVar10 + 0x5d50)); + in_d0 = (double)CONCAT62((int6)((ulonglong)in_d0 >> 0x10),uVar24); + } + *(ushort *)(iVar10 + 0x156) = uVar24; + if ((*(char *)(iVar32 + 0x9d9) != '\0') && + ((*(int *)(iVar32 + 0x94c) != 0x7f || (*(char *)(iVar10 + 0x5d1c) == '\0')))) { + *(undefined2 *)(iVar10 + 0x5d18) = *(undefined2 *)(iVar10 + 0x148); + } + bVar42 = false; + if (((DAT_0103399c == *(byte *)(iVar10 + 0x5cc9)) && (*(char *)(iVar10 + 0x5cc0) == '\0')) && + ((iVar14 = *(int *)(iVar32 + 0x94c), iVar14 == 0x181 || + (((iVar14 == 0x184 || (iVar14 == 0x182)) || (iVar14 == 0x243)))))) { + FUN_004737f0(); + FUN_00471740(); + iVar13 = FUN_00470520(); + if ((iVar13 != 0) && + (iVar13 = FUN_00610b50(*(int *)(iVar10 + 0x34) + 0x289c,0x200), iVar13 != 0)) { + bVar42 = true; + } + iVar13 = FUN_0058ef48(); + iVar13 = FUN_00611450(iVar13 + 0x289c); + if ((iVar13 != 0) || + (iVar14 = FUN_0058ef48(), iVar13 = DAT_006dc890, *(char *)(iVar14 + 0x3800) != '\0')) { + bVar42 = true; + iVar13 = DAT_006dc890; + } + } + if (!bVar42) { + *(short *)(iVar10 + 0x154) = *(short *)(iVar10 + 0x154) + -1; + } + uVar11 = DAT_006dc88c; + cVar21 = *(char *)(iVar32 + 0x977); + if (cVar21 == '\x01') { + iVar16 = (int)*(short *)(iVar10 + 0x156); + iVar14 = (int)*(short *)(iVar10 + 0x154); + iVar25 = (int)((ulonglong)((longlong)iVar16 * (longlong)iVar13) >> 0x20); + iVar25 = iVar25 - (iVar25 >> 0x1f); + if (*(int *)(iVar32 + 0x94c) == 0x723) { + if (iVar14 < iVar25) { + *(int *)(iVar10 + 0x16c) = + *(int *)(iVar10 + 0x100) + + (((int)*(short *)(iVar10 + 0x168) >> 1) + -10) * (int)*(char *)(iVar10 + 0x5cc8) + + (*(int *)(iVar10 + 0x108) >> 1); + iVar13 = *(int *)(iVar10 + 0x104) + 0x1a; + } + else { + iVar13 = (int)((ulonglong)((longlong)(iVar16 << 1) * (longlong)iVar13) >> 0x20); + iVar16 = (int)*(short *)(iVar10 + 0x168) >> 1; + if (iVar14 < iVar13 - (iVar13 >> 0x1f)) { + *(int *)(iVar10 + 0x16c) = + *(int *)(iVar10 + 0x100) + + (iVar16 + -8) * (int)*(char *)(iVar10 + 0x5cc8) + (*(int *)(iVar10 + 0x108) >> 1); + iVar13 = *(int *)(iVar10 + 0x104) + 0x18; + } + else { + *(int *)(iVar10 + 0x16c) = + *(int *)(iVar10 + 0x100) + + (iVar16 + -6) * (int)*(char *)(iVar10 + 0x5cc8) + (*(int *)(iVar10 + 0x108) >> 1); + iVar13 = *(int *)(iVar10 + 0x104) + 0x14; + } + } + } + else if (iVar14 < iVar25) { + iVar13 = (int)*(short *)(iVar10 + 0x168); + iVar14 = 10; + if (0x20 < iVar13) { + if (iVar13 < 0x5c) { + if (iVar13 < 0x40) { + if (iVar13 < 0x34) { + iVar14 = 0xe; + } + else { + iVar14 = 0x18; + } + } + else { + iVar14 = 0x1c; + } + } + else { + iVar14 = 0x26; + } + } + *(int *)(iVar10 + 0x16c) = + *(int *)(iVar10 + 0x100) + + ((iVar13 >> 1) - iVar14) * (int)*(char *)(iVar10 + 0x5cc8) + + (*(int *)(iVar10 + 0x108) >> 1); + iVar13 = *(int *)(iVar10 + 0x104) + 0x18; + } + else { + iVar13 = (int)((ulonglong)((longlong)(iVar16 << 1) * (longlong)iVar13) >> 0x20); + iVar16 = (int)*(short *)(iVar10 + 0x168); + if (iVar14 < iVar13 - (iVar13 >> 0x1f)) { + iVar13 = 10; + if (0x20 < iVar16) { + if (iVar16 < 0x5c) { + if (iVar16 < 0x40) { + if (iVar16 < 0x34) { + iVar13 = 0x12; + } + else { + iVar13 = 0x18; + } + } + else { + iVar13 = 0x1c; + } + } + else { + iVar13 = 0x26; + } + } + *(int *)(iVar10 + 0x16c) = + *(int *)(iVar10 + 0x100) + + ((iVar16 >> 1) - iVar13) * (int)*(char *)(iVar10 + 0x5cc8) + + (*(int *)(iVar10 + 0x108) >> 1); + sVar31 = *(short *)(iVar10 + 0x168); + iVar13 = 10; + if (0x20 < sVar31) { + if (sVar31 < 0x41) { + if (sVar31 < 0x35) { + iVar13 = 8; + } + else { + iVar13 = 0xc; + } + } + else { + iVar13 = 0xe; + } + } + } + else { + iVar13 = 6; + if (0x20 < iVar16) { + if (iVar16 < 0x5c) { + if (iVar16 < 0x40) { + if (iVar16 < 0x34) { + iVar13 = 0xe; + } + else { + iVar13 = 0x18; + } + } + else { + iVar13 = 0x1c; + } + } + else { + iVar13 = 0x26; + } + } + *(int *)(iVar10 + 0x16c) = + *(int *)(iVar10 + 0x100) + + ((iVar16 >> 1) - iVar13) * (int)*(char *)(iVar10 + 0x5cc8) + + (*(int *)(iVar10 + 0x108) >> 1); + sVar31 = *(short *)(iVar10 + 0x168); + iVar13 = 10; + if (0x20 < sVar31) { + if (sVar31 < 0x41) { + if (sVar31 < 0x35) { + iVar13 = 10; + } + else { + iVar13 = 0xc; + } + } + else { + iVar13 = 0xe; + } + } + } + iVar13 = *(int *)(iVar10 + 0x104) + iVar13; + } + *(int *)(iVar10 + 0x170) = iVar13; + fVar53 = (float)VectorSignedToFloat((int)*(short *)(iVar10 + 0x154), + (byte)(in_fpscr >> 0x16) & 3); + fVar44 = (float)VectorSignedToFloat((int)*(short *)(iVar10 + 0x156), + (byte)(in_fpscr >> 0x16) & 3); + fVar45 = (float)VectorSignedToFloat((int)*(char *)(iVar10 + 0x5cc8), + (byte)(in_fpscr >> 0x16) & 3); + fVar52 = (float)VectorSignedToFloat(-(int)*(char *)(iVar10 + 0x5cc8), + (byte)(in_fpscr >> 0x16) & 3); + *(float *)(iVar10 + 0x164) = (fVar53 / fVar44 - 0.5) * fVar52 * 3.5 - fVar45 * (float)puVar60; + cVar21 = *(char *)(iVar10 + 0x5d1d); +LAB_006dce64: + if (cVar21 < '\0') { + *(float *)(iVar10 + 0x164) = -SUB84(in_d0,0); + *(int *)(iVar10 + 0x170) = (*(int *)(iVar10 + 0x104) + 0x15) * 2 - *(int *)(iVar10 + 0x170); + } + } + else if (cVar21 == '\x02') { + fVar53 = (float)VectorSignedToFloat((int)*(short *)(iVar10 + 0x154), + (byte)(in_fpscr >> 0x16) & 3); + fVar44 = (float)VectorSignedToFloat((int)*(short *)(iVar10 + 0x156), + (byte)(in_fpscr >> 0x16) & 3); + fVar45 = (float)VectorSignedToFloat((int)*(char *)(iVar10 + 0x5cc8) << 1, + (byte)(in_fpscr >> 0x16) & 3); + fVar52 = (float)VectorSignedToFloat((int)*(char *)(iVar10 + 0x5cc8), + (byte)(in_fpscr >> 0x16) & 3); + fVar44 = (fVar53 / fVar44) * fVar45 - fVar52 * fVar59; + *(float *)(iVar10 + 0x164) = fVar44; + iVar13 = (int)*(char *)(iVar10 + 0x5cc8); + if (*(short *)(iVar10 + 0x154) < *(short *)(iVar10 + 0x156) >> 1) { + fVar45 = (float)VectorSignedToFloat(iVar13 * 0xc,(byte)(in_fpscr >> 0x16) & 3); + *(int *)(iVar10 + 0x16c) = + *(int *)(iVar10 + 0x100) + + ((((int)*(short *)(iVar10 + 0x168) >> 1) - (int)(fVar45 * fVar44)) + -9) * iVar13 + + (*(int *)(iVar10 + 0x108) >> 1); + iVar13 = (int)*(char *)(iVar10 + 0x5cc8) << 2; + } + else { + fVar45 = (float)VectorSignedToFloat(iVar13 << 4,(byte)(in_fpscr >> 0x16) & 3); + *(int *)(iVar10 + 0x16c) = + *(int *)(iVar10 + 0x100) + + ((((int)*(short *)(iVar10 + 0x168) >> 1) - (int)(fVar45 * fVar44)) + -9) * iVar13 + + (*(int *)(iVar10 + 0x108) >> 1); + iVar13 = (int)*(char *)(iVar10 + 0x5cc8); + } + fVar44 = (float)VectorSignedToFloat(iVar13,(byte)(in_fpscr >> 0x16) & 3); + *(int *)(iVar10 + 0x170) = + *(int *)(iVar10 + 0x104) + (int)(fVar44 * *(float *)(iVar10 + 0x164)) + 0x26; + if (*(char *)(iVar10 + 0x5d1d) < '\0') { + *(float *)(iVar10 + 0x164) = -*(float *)(iVar10 + 0x164); + *(int *)(iVar10 + 0x170) = (*(int *)(iVar10 + 0x104) + 0x15) * 2 - *(int *)(iVar10 + 0x170); + } + } + else if (cVar21 == '\x03') { + iVar13 = (int)((ulonglong) + ((longlong)((int)*(short *)(iVar10 + 0x156) << 1) * (longlong)iVar13) >> 0x20); + if (iVar13 - (iVar13 >> 0x1f) < (int)*(short *)(iVar10 + 0x154)) { + *(undefined4 *)(iVar10 + 0x16c) = DAT_006dc88c; + *(undefined4 *)(iVar10 + 0x170) = uVar11; + VectorSignedToFloat((int)*(char *)(iVar10 + 0x5cc8),(byte)(in_fpscr >> 0x16) & 3); + } + else { + *(int *)(iVar10 + 0x16c) = + (((int)*(short *)(iVar10 + 0x168) >> 1) + -4) * (int)*(char *)(iVar10 + 0x5cc8) + + (*(int *)(iVar10 + 0x108) >> 1) + *(int *)(iVar10 + 0x100); + *(int *)(iVar10 + 0x170) = *(int *)(iVar10 + 0x104) + 0x18; + iVar13 = (int)*(char *)(iVar10 + 0x5cc8); + fVar46 = (float)VectorSignedToFloat((int)*(short *)(iVar10 + 0x154), + (byte)(in_fpscr >> 0x16) & 3); + fVar44 = (float)VectorSignedToFloat((int)*(short *)(iVar10 + 0x156), + (byte)(in_fpscr >> 0x16) & 3); + fVar45 = (float)VectorSignedToFloat((int)*(short *)(iVar10 + 0x168), + (byte)(in_fpscr >> 0x16) & 3); + fVar52 = (float)VectorSignedToFloat(iVar13,(byte)(in_fpscr >> 0x16) & 3); + fVar53 = (float)VectorSignedToFloat(iVar13 * 10,(byte)(in_fpscr >> 0x16) & 3); + fVar53 = (fVar46 / fVar44) * fVar45 * fVar52 * *(float *)(iVar32 + 0x9b8) * fVar51 - fVar53; + uVar17 = in_fpscr & 0xfffffff; + uVar27 = uVar17 | (uint)(fVar53 < (float)local_4bc) << 0x1f | + (uint)(fVar53 == (float)local_4bc) << 0x1e; + in_fpscr = uVar27 | (uint)(NAN(fVar53) || NAN((float)local_4bc)) << 0x1c; + bVar4 = (byte)(uVar27 >> 0x18); + if ((((!(bool)(bVar4 >> 6 & 1) && bVar4 >> 7 == ((byte)(in_fpscr >> 0x1c) & 1)) && + (iVar13 < 0)) || + (in_fpscr = uVar17 | (uint)(4.0 <= fVar53) << 0x1d, (byte)(in_fpscr >> 0x1d) == 0)) && + (0 < iVar13)) { + in_d0 = (double)CONCAT44((int)((ulonglong)in_d0 >> 0x20),0x41000000); + } + *(int *)(iVar10 + 0x16c) = *(int *)(iVar10 + 0x16c) - (int)SUB84(in_d0,0); + VectorSignedToFloat((int)*(char *)(iVar10 + 0x5cc8),(byte)(in_fpscr >> 0x16) & 3); + } + *(float *)(iVar10 + 0x164) = SUB84(in_d0,0); + if (*(char *)(iVar10 + 0x5d1d) < '\0') { + *(float *)(iVar10 + 0x164) = -SUB84(in_d0,0); + *(int *)(iVar10 + 0x170) = (*(int *)(iVar10 + 0x104) + 0x15) * 2 - *(int *)(iVar10 + 0x170); + } + } + else if (cVar21 == '\x04') { + *(undefined1 **)(iVar10 + 0x164) = puVar5; + fVar44 = (float)VectorSignedToFloat(*(char *)(iVar10 + 0x5cc8) * 0xe, + (byte)(in_fpscr >> 0x16) & 3); + *(int *)(iVar10 + 0x16c) = + *(int *)(iVar10 + 0x100) + + ((((int)*(short *)(iVar10 + 0x168) >> 1) - (int)(fVar44 * (float)puVar5)) + -0xd) * + (int)*(char *)(iVar10 + 0x5cc8) + (*(int *)(iVar10 + 0x108) >> 1); + *(int *)(iVar10 + 0x170) = + *(int *)(iVar10 + 0x104) + ((int)*(short *)(iVar10 + 0x16a) >> 1) + 4; + if (*(char *)(iVar10 + 0x5d1d) < '\0') { + *(float *)(iVar10 + 0x164) = -*(float *)(iVar10 + 0x164); + *(int *)(iVar10 + 0x170) = (*(int *)(iVar10 + 0x104) + 0x15) * 2 - *(int *)(iVar10 + 0x170); + } + } + else if (cVar21 == '\x05') { + *(int *)(iVar10 + 0x16c) = + *(int *)(iVar10 + 0x100) + + ((*(int *)(iVar10 + 0x108) >> 1) - ((int)*(short *)(iVar10 + 0x168) >> 1)) + + *(char *)(iVar10 + 0x5cc8) * -2; + *(int *)(iVar10 + 0x170) = + *(int *)(iVar10 + 0x104) + + ((*(int *)(iVar10 + 0x10c) >> 1) - ((int)*(short *)(iVar10 + 0x16a) >> 1)); + } + } + puVar58 = DAT_006dd0cc; + puVar8 = DAT_006dd0c8; + puVar7 = DAT_006dd0c4; + puVar6 = DAT_006dd0c0; + puVar61 = DAT_006dd0bc; + iVar13 = *(int *)(iVar32 + 0x94c); + if (((iVar13 == 0x3ce) || (iVar13 == 8)) || + ((iVar13 == 0x4dd || ((0x1aa < iVar13 && (iVar13 < 0x1b2)))))) { + bVar42 = true; + } + else { + bVar42 = false; + } + if ((iVar13 == 0x20b) || (iVar13 == 0x535)) { + bVar43 = true; + } + else { + bVar43 = false; + } + uVar11 = (undefined4)((ulonglong)in_d0 >> 0x20); + if ((((bVar42) && (*(char *)(iVar10 + 0x5c81) == '\0')) || (bVar43)) && + (*(char *)(iVar10 + 0x67) == '\0')) { + iVar14 = 0; + if (iVar13 == 0x20b) { + iVar14 = 8; +LAB_006dd076: + local_308 = 0x3f800000; + local_304 = DAT_006dd0c4; + local_1e0 = (undefined1 *)0x3f800000; + local_30c = DAT_006dd0b8; + local_1e4 = DAT_006dd0b8; + local_1dc = DAT_006dd0c4; +LAB_006dd124: + if (iVar14 == 0) { + iVar14 = 6; + } + else if (iVar14 == 8) { + iVar14 = 0x4b; + } + else if (iVar14 == 9) { + iVar14 = 0x87; + } + else if (iVar14 == 10) { + iVar14 = 0x9e; + } + else { + if (iVar14 != 0xb) goto LAB_006dd14e; + iVar14 = 0xa9; + } + } + else { + if (iVar13 == 0x3ce) { + iVar14 = 9; +LAB_006dd098: + local_2fc = DAT_006dd0c4; + local_2f4 = 0x3f800000; + local_1e4 = DAT_006dd0c4; + local_2f8 = DAT_006dd0b8; + local_1e0 = DAT_006dd0b8; + local_1dc = (undefined1 *)0x3f800000; + goto LAB_006dd124; + } + if (iVar13 == 0x4dd) { + iVar14 = 10; +LAB_006dd0d8: + local_2ec = 0x3f800000; + local_2e8 = 0x3f000000; + local_2e4 = puVar5; + local_1e0 = (undefined1 *)0x3f000000; + local_1dc = puVar5; +LAB_006dd120: + local_1e4 = (undefined1 *)0x3f800000; + goto LAB_006dd124; + } + if (iVar13 == 0x535) { + iVar14 = 0xb; +LAB_006dd0f2: + local_2dc = 0x3fa00000; + local_2d8 = 0x3fa00000; + local_2d4 = puVar55; + local_1e4 = (undefined1 *)0x3fa00000; + local_1e0 = (undefined1 *)0x3fa00000; + local_1dc = puVar55; + goto LAB_006dd124; + } + if (iVar13 < 0x1ab) { +LAB_006dd10c: + local_2cc = 0x3f800000; + local_2c8 = DAT_006dd0bc; + local_2c4 = puVar55; + local_1e0 = DAT_006dd0bc; + local_1dc = puVar55; + goto LAB_006dd120; + } + iVar14 = iVar13 + -0x1aa; + if (iVar14 == 1) { + local_37c = puVar5; + local_378 = DAT_006dd0cc; + local_374 = DAT_006dd0c0; + local_1e4 = puVar5; + local_1e0 = DAT_006dd0cc; +LAB_006dd14a: + local_1dc = DAT_006dd0c0; + } + else if (iVar14 == 2) { + local_36c = 0x3f800000; + local_368 = DAT_006dd0cc; + local_364 = DAT_006dd0cc; + local_1e4 = (undefined1 *)0x3f800000; + local_1e0 = DAT_006dd0cc; + local_1dc = DAT_006dd0cc; + } + else if (iVar14 == 3) { + local_35c = puVar5; + local_358 = 0x3f800000; + local_354 = DAT_006dd0cc; + local_1e4 = puVar5; + local_1e0 = (undefined1 *)0x3f800000; + local_1dc = DAT_006dd0cc; + } + else if (iVar14 == 4) { + local_34c = DAT_006dd0c8; + local_348 = puVar5; + local_344 = DAT_006dd0c8; + local_1e4 = DAT_006dd0c8; + local_1e0 = puVar5; + local_1dc = DAT_006dd0c8; + } + else { + if (iVar14 == 5) { + local_33c = DAT_006dd0c0; + local_338 = DAT_006dd0c0; + local_334 = DAT_006dd0c0; + local_1e4 = DAT_006dd0c0; + local_1e0 = DAT_006dd0c0; + goto LAB_006dd14a; + } + if (iVar14 == 6) { + local_32c = DAT_006dd0c8; + local_328 = DAT_006dd0c8; + local_324 = puVar5; + local_1e4 = DAT_006dd0c8; + local_1e0 = DAT_006dd0c8; + local_1dc = puVar5; + } + else { + if (iVar14 != 7) { + if (iVar14 == 8) goto LAB_006dd076; + if (iVar14 == 9) goto LAB_006dd098; + if (iVar14 == 10) goto LAB_006dd0d8; + if (iVar14 == 0xb) goto LAB_006dd0f2; + goto LAB_006dd10c; + } + local_318 = puVar60; + local_1e0 = puVar60; + local_314 = (undefined1 *)(DAT_00902ec0 + (1.0 - DAT_00902ec0) * 0.5); + local_31c = (undefined1 *)((1.0 - DAT_00902ec0) + DAT_00902ec0 * 0.5); + local_1e4 = local_31c; + local_1dc = local_314; + } + } +LAB_006dd14e: + iVar14 = iVar14 + 0x3a; + } + uVar12 = 0x14; + if (0 < *(short *)(iVar10 + 0x154)) { + uVar12 = 7; + } + if (*(char *)(iVar10 + 0x5cc8) < '\0') { + iVar13 = FUN_00608330(&DAT_00fd67f4,uVar12); + if (iVar13 == 0) { + local_390 = 0; + iVar13 = FUN_0060d7ac(puVar5,uVar11,0x3f800000,&DAT_01073158, + *(int *)(iVar10 + 0x16c) + -0x10, + *(int *)(iVar10 + 0x170) + *(char *)(iVar10 + 0x5d1d) * -0xe,4,4, + iVar14,100,0); + iVar14 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar14 != 0) { + *(undefined1 *)(iVar13 + 1) = 1; + } + *(float *)(iVar13 + 0x24) = *(float *)(iVar13 + 0x24) * (float)puVar60; + fVar44 = *(float *)(iVar13 + 0x28) * (float)puVar60; + *(float *)(iVar13 + 0x28) = fVar44; + *(float *)(iVar13 + 0x28) = fVar44 - 1.5; + } + fVar44 = (float)VectorSignedToFloat(*(int *)(iVar10 + 0x170) + -0xe, + (byte)(in_fpscr >> 0x16) & 3); + fVar45 = (float)VectorSignedToFloat(*(int *)(iVar10 + 0x16c) + -0xc, + (byte)(in_fpscr >> 0x16) & 3); + FUN_0063ae24((int)(fVar45 + *(float *)(iVar10 + 0x120)) >> 4, + (int)(*(float *)(iVar10 + 0x124) + fVar44) >> 4,&local_1e4); + } + else { + iVar13 = FUN_00608330(&DAT_00fd67f4,uVar12); + if (iVar13 == 0) { + local_300 = 0; + iVar13 = FUN_0060d7ac(puVar5,uVar11,0x3f800000,&DAT_01073158,*(int *)(iVar10 + 0x16c) + 6, + *(int *)(iVar10 + 0x170) + *(char *)(iVar10 + 0x5d1d) * -0xe,4,4, + iVar14,100,0); + iVar14 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar14 != 0) { + *(undefined1 *)(iVar13 + 1) = 1; + } + *(float *)(iVar13 + 0x24) = *(float *)(iVar13 + 0x24) * (float)puVar60; + fVar44 = *(float *)(iVar13 + 0x28) * (float)puVar60; + *(float *)(iVar13 + 0x28) = fVar44; + *(float *)(iVar13 + 0x28) = fVar44 - 1.5; + } + fVar44 = (float)VectorSignedToFloat(*(int *)(iVar10 + 0x170) + -0xe, + (byte)(in_fpscr >> 0x16) & 3); + fVar45 = (float)VectorSignedToFloat(*(int *)(iVar10 + 0x16c) + 0xc, + (byte)(in_fpscr >> 0x16) & 3); + FUN_0063ae24((int)(fVar45 + *(float *)(iVar10 + 0x120)) >> 4, + (int)(*(float *)(iVar10 + 0x124) + fVar44) >> 4,&local_1e4); + } + } + if (((*(int *)(iVar32 + 0x94c) == 0x69) && (*(char *)(iVar10 + 0x5c81) == '\0')) && + (*(char *)(iVar10 + 0x67) == '\0')) { + uVar12 = 0x14; + if (0 < *(short *)(iVar10 + 0x154)) { + uVar12 = 7; + } + if (*(char *)(iVar10 + 0x5cc8) < '\0') { + iVar13 = FUN_00608330(&DAT_00fd67f4,uVar12); + if (iVar13 == 0) { + local_388 = 0; + iVar13 = FUN_0060d7ac(puVar5,uVar11,0x3f800000,&DAT_01073158,*(int *)(iVar10 + 0x16c) + -0xc + ,*(int *)(iVar10 + 0x170) + *(char *)(iVar10 + 0x5d1d) * -0x14,4,4,6, + 100,0); + iVar14 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar14 != 0) { + *(undefined1 *)(iVar13 + 1) = 1; + } + *(float *)(iVar13 + 0x24) = *(float *)(iVar13 + 0x24) * (float)puVar60; + fVar44 = *(float *)(iVar13 + 0x28) * (float)puVar60; + *(float *)(iVar13 + 0x28) = fVar44; + *(float *)(iVar13 + 0x28) = fVar44 - 1.5; + } + local_434 = (undefined1 *)0x3f800000; + local_430 = puVar61; + local_42c = puVar55; + iVar13 = *(int *)(iVar10 + 0x16c) + -0x10; + ppuVar22 = &local_434; + } + else { + iVar13 = FUN_00608330(&DAT_00fd67f4,uVar12); + if (iVar13 == 0) { + local_2b0 = 0; + iVar13 = FUN_0060d7ac(puVar5,uVar11,0x3f800000,&DAT_01073158,*(int *)(iVar10 + 0x16c) + 4, + *(int *)(iVar10 + 0x170) + *(char *)(iVar10 + 0x5d1d) * -0x14,4,4,6, + 100,0); + iVar14 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar14 != 0) { + *(undefined1 *)(iVar13 + 1) = 1; + } + *(float *)(iVar13 + 0x24) = *(float *)(iVar13 + 0x24) * (float)puVar60; + fVar44 = *(float *)(iVar13 + 0x28) * (float)puVar60; + *(float *)(iVar13 + 0x28) = fVar44; + *(float *)(iVar13 + 0x28) = fVar44 - 1.5; + } + local_414 = (undefined1 *)0x3f800000; + local_410 = puVar61; + local_40c = puVar55; + iVar13 = *(int *)(iVar10 + 0x16c) + 6; + ppuVar22 = &local_414; + } +LAB_006dd53a: + fVar44 = (float)VectorSignedToFloat(iVar13,(byte)(in_fpscr >> 0x16) & 3); + FUN_0063ae24((int)(fVar44 + *(float *)(iVar10 + 0x120)) >> 4, + *(int *)(iVar10 + 0x170) + -0xe >> 4,ppuVar22); + } + else if ((*(int *)(iVar32 + 0x94c) == 0x94) && (*(char *)(iVar10 + 0x5c81) == '\0')) { + uVar12 = 10; + if (0 < *(short *)(iVar10 + 0x154)) { + uVar12 = 7; + } + if (*(char *)(iVar10 + 0x5cc8) < '\0') { + iVar13 = FUN_00608330(&DAT_00fd67f4,uVar12); + if (iVar13 == 0) { + local_380 = 0; + iVar13 = FUN_0060d7ac(puVar5,uVar11,0x3f800000,&DAT_01073158,*(int *)(iVar10 + 0x16c) + -0xc + ,*(int *)(iVar10 + 0x170) + *(char *)(iVar10 + 0x5d1d) * -0x14,4,4, + 0x1d,100,0); + iVar14 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar14 != 0) { + *(undefined1 *)(iVar13 + 1) = 1; + } + *(float *)(iVar13 + 0x24) = *(float *)(iVar13 + 0x24) * (float)puVar60; + fVar44 = *(float *)(iVar13 + 0x28) * (float)puVar60; + *(float *)(iVar13 + 0x28) = fVar44; + *(float *)(iVar13 + 0x28) = fVar44 - 1.5; + } + local_3d4 = puVar60; + local_3cc = 0x3f400000; + local_3d0 = puVar60; + iVar13 = *(int *)(iVar10 + 0x16c) + -0x10; + ppuVar22 = &local_3d4; + } + else { + iVar13 = FUN_00608330(&DAT_00fd67f4,uVar12); + if (iVar13 == 0) { + local_2f0 = 0; + iVar13 = FUN_0060d7ac(puVar5,uVar11,0x3f800000,&DAT_01073158,*(int *)(iVar10 + 0x16c) + 4, + *(int *)(iVar10 + 0x170) + *(char *)(iVar10 + 0x5d1d) * -0x14,4,4,0x1d + ,100,0); + iVar14 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar14 != 0) { + *(undefined1 *)(iVar13 + 1) = 1; + } + *(float *)(iVar13 + 0x24) = *(float *)(iVar13 + 0x24) * (float)puVar60; + fVar44 = *(float *)(iVar13 + 0x28) * (float)puVar60; + *(float *)(iVar13 + 0x28) = fVar44; + *(float *)(iVar13 + 0x28) = fVar44 - 1.5; + } + local_3ec = 0x3f400000; + iVar13 = *(int *)(iVar10 + 0x16c) + 6; + ppuVar22 = &local_3f4; + local_3f4 = puVar60; + local_3f0 = puVar60; + } + goto LAB_006dd53a; + } + if ((*(int *)(iVar32 + 0x94c) == 0x11a) && (*(char *)(iVar10 + 0x67) == '\0')) { + if (*(char *)(iVar10 + 0x5cc8) < '\0') { + local_424 = puVar7; + local_420 = 0x3f800000; + local_41c = puVar55; + iVar13 = *(int *)(iVar10 + 0x16c) + -0x10; + ppuVar22 = &local_424; + } + else { + local_404 = puVar7; + local_400 = 0x3f800000; + local_3fc = puVar55; + iVar13 = *(int *)(iVar10 + 0x16c) + 6; + ppuVar22 = &local_404; + } +LAB_006dd68a: + fVar44 = (float)VectorSignedToFloat(iVar13,(byte)(in_fpscr >> 0x16) & 3); + FUN_0063ae24((int)(fVar44 + *(float *)(iVar10 + 0x120)) >> 4, + *(int *)(iVar10 + 0x170) + -0xe >> 4,ppuVar22); + } + else if ((*(int *)(iVar32 + 0x94c) == 0x11e) && (*(char *)(iVar10 + 0x67) == '\0')) { + if (*(char *)(iVar10 + 0x5cc8) < '\0') { + local_3e4 = puVar7; + local_3e0 = puVar55; + local_3dc = 0x3f800000; + iVar13 = *(int *)(iVar10 + 0x16c) + -0x10; + ppuVar22 = &local_3e4; + } + else { + local_3c4 = puVar7; + local_3c0 = puVar55; + local_3bc = 0x3f800000; + iVar13 = *(int *)(iVar10 + 0x16c) + 6; + ppuVar22 = &local_3c4; + } + goto LAB_006dd68a; + } + *(bool *)(iVar10 + 0x5cc0) = *(char *)(iVar10 + 0x5cba) == '\0'; + if ((((0 < *(short *)(iVar10 + 0x158)) && + (sVar31 = *(short *)(iVar10 + 0x158) + -1, *(short *)(iVar10 + 0x158) = sVar31, sVar31 == 0)) + && (iVar13 = FUN_006becfc(iVar10), iVar13 != 0)) && + (((((iVar13 = *(int *)(iVar10 + *(char *)(iVar10 + 0x14c) * 0xa0 + 0x94c), iVar13 == 0x41 || + (iVar13 == 0x2a2)) || ((iVar13 == 0x2a3 || ((iVar13 == 0x2a4 || (iVar13 == 0x2d3)))))) || + (iVar13 == 0x2d4)) || + ((((iVar13 == 0x2f5 || (iVar13 == 0x3dd)) || (iVar13 == 0x4ca)) || (iVar13 == 0x4cb)))))) { + FUN_007a7bf4(0x19); + iVar13 = 4; + do { + uVar12 = FUN_005c4e6c(&DAT_00fd67f4,0x14,0x1a); + local_370 = 0; + fVar44 = (float)VectorSignedToFloat(uVar12,(byte)(in_fpscr >> 0x16) & 3); + iVar14 = FUN_0060d7ac(puVar5,uVar11,fVar44 * (float)puVar58,&DAT_01073158, + *(undefined4 *)(iVar10 + 0x100),*(undefined4 *)(iVar10 + 0x104), + *(undefined4 *)(iVar10 + 0x108),*(undefined4 *)(iVar10 + 0x10c),0x2d, + 0xff,0); + *(undefined1 *)(iVar14 + 2) = 1; + *(undefined1 *)(iVar14 + 1) = 1; + iVar13 = iVar13 + -1; + *(float *)(iVar14 + 0x24) = *(float *)(iVar14 + 0x24) * 0.5; + *(float *)(iVar14 + 0x28) = *(float *)(iVar14 + 0x28) * 0.5; + } while (iVar13 != 0); + } + fVar52 = DAT_006dd96c; + fVar45 = DAT_006dd968; + fVar44 = DAT_006dd964; + puVar55 = DAT_006dd960; + local_4b8 = (undefined1 *)0x41a00000; + if (DAT_0103399c == *(byte *)(iVar10 + 0x5cc9)) { + bVar42 = true; + iVar13 = *(int *)(iVar10 + *(char *)(iVar10 + 0x14c) * 0xa0 + 0x94c); + if ((((iVar13 == 0x41) || (iVar13 == 0x2a2)) || + ((((iVar13 == 0x2a3 || ((iVar13 == 0x2a4 || (iVar13 == 0x2d3)))) || (iVar13 == 0x2d4)) || + ((((iVar13 == 0x2f5 || (iVar13 == 0x3dd)) || (iVar13 == 0x4ca)) || (iVar13 == 0x4cb)))))) + && ((int)*(short *)(iVar10 + 0x154) != *(short *)(iVar10 + 0x156) + -1)) { + bVar42 = false; + } + if (((bVar42) && (local_508 = (int)*(short *)(iVar32 + 0x9d2), 0 < local_508)) && + ((0 < *(short *)(iVar10 + 0x154) && (*(short *)(iVar10 + 0x158) == 0)))) { + fVar53 = *(float *)(iVar32 + 0x9d4); + if (((*(char *)(iVar32 + 0x96a) != '\0') && (local_508 != 0x19)) && + ((local_508 != 0x1a && (local_508 != 0x23)))) { + fVar53 = fVar53 / *(float *)(iVar10 + 0x5d50); + } + if ((((local_508 == 0xd) || (local_508 == 0x20)) || (local_508 == 0x13b)) || + (local_508 - 0xe6U < 6)) { + *(undefined2 *)(iVar10 + 0x8d92) = 0xffff; + puVar33 = &DAT_0107af40; + *(undefined1 *)(iVar10 + 0x8dba) = 0; + iVar13 = 0x200; + do { + if ((((char)puVar33[2] != '\0') && ((byte)puVar33[0x11] == uVar23)) && + (((uVar24 = *puVar33, uVar24 == 0xd || (uVar24 == 0x13b)) || + ((0xe5 < uVar24 && (uVar24 < 0xec)))))) { + FUN_006fde70(puVar33); + } + puVar33 = puVar33 + 0x74; + iVar13 = iVar13 + -1; + } while (iVar13 != 0); + } + iVar13 = (int)*(short *)(iVar32 + 0x9d0); + puVar61 = *(undefined1 **)(iVar32 + 0x9b0); + if (iVar13 < 1) { + bVar42 = true; +LAB_006ddb8c: + iVar13 = local_508; + if (local_508 == 0xe) { + iVar14 = *(int *)(iVar32 + 0x94c); + if (((iVar14 == 0x4e6) || (iVar14 == 0x4e7)) || (iVar14 == 0x4f1)) { + local_508 = 0xf2; + iVar13 = 0xf2; + } + } + else if (local_508 == 0x49) { + psVar34 = &DAT_0107af40; + iVar14 = 0; + do { + if (((char)psVar34[2] != '\0') && (*(byte *)(psVar34 + 0x11) == uVar23)) { + if (*psVar34 == 0x49) { + iVar13 = 0x4a; + local_508 = 0x4a; + } + else if (*psVar34 == 0x4a) { + bVar42 = false; + break; + } + } + iVar14 = iVar14 + 1; + psVar34 = psVar34 + 0x74; + } while (iVar14 < 0x200); + } + } + else { + if (iVar13 == 0x47) { + iVar14 = FUN_006c0278(); + } + else { + iVar14 = FUN_006c0208(iVar10,iVar13); + } + bVar42 = -1 < iVar14; + if (!bVar42) goto LAB_006ddb8c; + iVar14 = iVar10 + iVar14 * 0xa0; + iVar16 = (int)*(short *)(iVar14 + 0x9d2); + if (iVar13 == 0x303) { + iVar16 = local_508 + iVar16; +LAB_006dd9b2: + local_508 = iVar16; + } + else { + if (iVar13 == 0x30c) { + iVar16 = local_508 + iVar16; + goto LAB_006dd9b2; + } + if (0 < iVar16) goto LAB_006dd9b2; + } + if (local_508 == 0x2a) { + if (*(int *)(iVar14 + 0x94c) == 0x172) { + local_508 = 0x41; + } + else { + if (*(int *)(iVar14 + 0x94c) != 0x198) goto LAB_006dd9dc; + local_508 = 0x44; + } + local_504 = local_504 + 5; + } +LAB_006dd9dc: + if ((*(char *)(iVar10 + 0x9c) != '\0') && ((iVar13 == 1 || (iVar13 == 0x143)))) { + fVar53 = fVar53 * fVar52; + puVar61 = (undefined1 *) + VectorSignedToFloat((int)((float)puVar61 * fVar52),(byte)(in_fpscr >> 0x16) & 3) + ; + } + fVar53 = fVar53 + *(float *)(iVar14 + 0x9d4); + if (*(char *)(iVar14 + 0x96c) == '\0') { + iVar16 = (int)*(short *)(iVar14 + 0x992); + } + else { + fVar46 = (float)VectorSignedToFloat((int)*(short *)(iVar14 + 0x992), + (byte)(in_fpscr >> 0x16) & 3); + iVar16 = (int)(fVar46 * *(float *)(iVar10 + 0x5d48)); + } + local_504 = local_504 + iVar16; + if ((iVar13 == 1) && (*(char *)(iVar10 + 0x5d24) != '\0')) { + uVar17 = in_fpscr & 0xfffffff; + in_fpscr = uVar17 | (uint)(20.0 <= fVar53) << 0x1d; + if ((byte)(in_fpscr >> 0x1d) == 0) { + fVar53 = fVar53 * fVar51; + uVar17 = uVar17 | (uint)(fVar53 < 20.0) << 0x1f | (uint)(fVar53 == 20.0) << 0x1e; + in_fpscr = uVar17 | (uint)NAN(fVar53) << 0x1c; + bVar4 = (byte)(uVar17 >> 0x18); + if (!(bool)(bVar4 >> 6 & 1) && bVar4 >> 7 == ((byte)(in_fpscr >> 0x1c) & 1)) { + fVar53 = 20.0; + } + } + iVar16 = (int)((ulonglong)((longlong)local_504 * (longlong)DAT_006ddc80) >> 0x20); + local_504 = local_504 + ((iVar16 >> 1) - (iVar16 >> 0x1f)); + } + puVar61 = (undefined1 *)((float)puVar61 + *(float *)(iVar14 + 0x9b0)); + if (((((((*(char *)(iVar10 + 0x9c) != '\0') && (iVar13 == 1)) && + (iVar13 = FUN_00608330(&DAT_00fd67f4,5), iVar13 == 0)) || + ((*(int *)(iVar32 + 0x94c) == 0x6f6 && + (iVar13 = FUN_00608330(&DAT_00fd67f4,3), iVar13 == 0)))) || + ((*(int *)(iVar32 + 0x94c) == 0x611 && + (iVar13 = FUN_00608330(&DAT_00fd67f4,2), iVar13 == 0)))) || + (((*(int *)(iVar32 + 0x94c) == 0x62 && + (iVar13 = FUN_00608330(&DAT_00fd67f4,3), iVar13 == 0)) || + ((*(int *)(iVar32 + 0x94c) == 0x215 && + (iVar13 = FUN_00608330(&DAT_00fd67f4,2), iVar13 == 0)))))) || + (((*(int *)(iVar32 + 0x94c) == 0x1b2 && + ((int)*(short *)(iVar10 + 0x154) < (int)(*(byte *)(iVar32 + 0x978) - 2))) || + (iVar13 = FUN_00608330(&DAT_00fd67f4,100), + iVar13 < (int)(uint)*(byte *)(iVar10 + 0x5d1e))))) goto LAB_006ddb8c; + if (local_508 != 0x55) { + if ((4 < local_508 - 0x91U) || + (*(short *)(iVar10 + 0x156) + -5 <= (int)*(short *)(iVar10 + 0x154))) + goto LAB_006ddb60; + goto LAB_006ddb8c; + } + iVar13 = local_508; + if (*(short *)(iVar10 + 0x156) + -6 <= (int)*(short *)(iVar10 + 0x154)) { +LAB_006ddb60: + sVar31 = *(short *)(iVar14 + 0x98a) + -1; + *(short *)(iVar14 + 0x98a) = sVar31; + if (sVar31 < 1) { + FUN_00612a6c(iVar14 + 0x948); + } + goto LAB_006ddb8c; + } + } + if (bVar42) { + if ((*(uint *)(iVar32 + 0x970) & 1) != 0) { + puVar61 = (undefined1 *)((float)puVar61 + *(float *)(iVar10 + 0x50)); + fVar46 = (float)VectorSignedToFloat(local_504,(byte)(in_fpscr >> 0x16) & 3); + local_504 = (int)(fVar46 * *(float *)(iVar10 + 0x4c)); + } + if (iVar13 == 0xe4) { + puVar61 = puVar5; + } + if ((*(char *)(iVar10 + 0x5d3a) != '\0') && (*(char *)(iVar32 + 0x953) != '\0')) { + puVar61 = (undefined1 *)((float)puVar61 * DAT_006ddc7c); + } + if ((*(char *)(iVar32 + 0x96c) != '\0') && (*(char *)(iVar10 + 0x22e) != '\0')) { + puVar61 = (undefined1 *) + (((1.0 - *(float *)(iVar10 + 0x234)) * 0.5 + 1.0) * (float)puVar61); + } + iVar14 = *(int *)(iVar32 + 0x94c); + if (iVar14 == 0x78) { + if (iVar13 == 1) { + iVar13 = 2; + local_508 = iVar13; + } + } + else if (iVar14 == 0x1394) { + iVar13 = 0x3ea; + local_508 = iVar13; + } + else if (iVar14 == 0x1396) { + iVar13 = 0x3eb; + local_508 = iVar13; + } + else if (iVar14 == 0x2aa) { + iVar13 = 0x75; + local_508 = iVar13; + } + else if (iVar14 == 0x2d5) { + iVar13 = 0x78; + local_508 = iVar13; + } + else if (iVar14 == 0x13c2) { + iVar13 = 0x3f8; + local_508 = iVar13; + } + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + iVar14 = FUN_0058ef48(); + iVar16 = FUN_00592fc8(); + if (*(int *)(iVar10 + 0x100) + (*(int *)(iVar10 + 0x108) >> 1) < + (int)*(short *)(iVar14 + 0x27fc) + *(int *)(iVar16 + 0x10c)) { + uVar12 = 1; + } + else { + uVar12 = 0xffffffff; + } + FUN_006c27a4(iVar10,uVar12); + FUN_006c2118(iVar10,&local_1ec); + if (iVar13 == 9) { + iVar14 = FUN_00608330(&DAT_00fd67f4,0x259); + fVar46 = (float)VectorSignedToFloat(*(char *)(iVar10 + 0x5cc8) * iVar14, + (byte)(in_fpscr >> 0x16) & 3); + local_1ec = local_1ec - fVar46; + iVar14 = FUN_00608330(&DAT_00fd67f4,100); + local_504 = local_504 << 1; + fVar46 = (float)VectorSignedToFloat(DAT_006de118 - iVar14,(byte)(in_fpscr >> 0x16) & 3); + local_1e8 = fVar46 + local_1e8; + puVar61 = puVar5; + } + else if (iVar13 == 0x33) { + fVar46 = (float)VectorSignedToFloat(*(char *)(iVar10 + 0x5d1d) * 6, + (byte)(in_fpscr >> 0x16) & 3); + local_1e8 = local_1e8 - fVar46; + } + iVar14 = FUN_00592fc8(); + fVar47 = (float)VectorSignedToFloat(*(undefined4 *)(iVar14 + 0x10c), + (byte)(in_fpscr >> 0x16) & 3); + fVar47 = fVar47 - local_1ec; + iVar14 = FUN_00592fc8(); + fVar46 = local_1e8; + fVar48 = (float)VectorSignedToFloat(*(undefined4 *)(iVar14 + 0x110), + (byte)(in_fpscr >> 0x16) & 3); + fVar48 = fVar48 - local_1e8; + iVar14 = FUN_006becfc(iVar10); + if (iVar14 != 0) { + FUN_0058ef48(); + iVar14 = FUN_0058ef48(); + fVar46 = (float)VectorSignedToFloat((int)*(short *)(iVar14 + 0x27fc), + (byte)(in_fpscr >> 0x16) & 3); + fVar47 = fVar47 + fVar46; + iVar14 = FUN_0058ef48(); + fVar46 = (float)VectorSignedToFloat((int)*(short *)(iVar14 + 0x27fe), + (byte)(in_fpscr >> 0x16) & 3); + fVar48 = fVar48 + fVar46; + fVar46 = local_1e8; + } + fVar57 = SQRT(fVar47 * fVar47 + fVar48 * fVar48); + fVar49 = fVar53 / fVar57; + fVar47 = fVar49 * fVar47; + fVar49 = fVar49 * fVar48; + if ((iVar13 == 0x33) && + (iVar14 = FUN_0058ef48(), fVar46 = local_1e8, *(char *)(iVar14 + 0x2800) != '\0')) { + fVar46 = (float)VectorSignedToFloat(*(char *)(iVar10 + 0x5d1d) * 6, + (byte)(in_fpscr >> 0x16) & 3); + local_1e8 = local_1e8 - fVar46; + fVar46 = local_1e8; + } + if (*(int *)(iVar32 + 0x94c) == 0x2f5) { + fVar48 = (float)VectorSignedToFloat(local_504,(byte)(in_fpscr >> 0x16) & 3); + local_504 = (int)(fVar48 * 1.25); + } + if (iVar13 == 0xfa) { + psVar34 = &DAT_0107af40; + iVar14 = 0x200; + do { + if ((((char)psVar34[2] != '\0') && ((char)psVar34[0x11] == *(char *)(iVar10 + 0x5cc9))) + && ((*psVar34 == 0xfa || (*psVar34 == 0xfb)))) { + FUN_006fde70(psVar34); + } + psVar34 = psVar34 + 0x74; + iVar14 = iVar14 + -1; + fVar46 = local_1e8; + } while (iVar14 != 0); + } + else if (iVar13 == 0xc) { + local_1e8 = fVar46 + fVar49 * 3.0; + local_1ec = local_1ec + fVar47 * 3.0; + fVar46 = local_1e8; + } + else if (iVar13 == 0x11) { + iVar14 = FUN_0058ef48(); + iVar16 = FUN_00592fc8(); + local_1ec = (float)VectorSignedToFloat(*(int *)(iVar16 + 0x10c) + + (int)*(short *)(iVar14 + 0x27fc), + (byte)(in_fpscr >> 0x16) & 3); + iVar14 = FUN_0058ef48(); + iVar16 = FUN_00592fc8(); + local_1e8 = (float)VectorSignedToFloat(*(int *)(iVar16 + 0x110) + + (int)*(short *)(iVar14 + 0x27fe), + (byte)(in_fpscr >> 0x16) & 3); + fVar46 = local_1e8; + } + if (*(char *)(iVar32 + 0x977) == '\x05') { + fVar46 = (float)VectorSignedToFloat((int)*(char *)(iVar10 + 0x5cc8), + (byte)(in_fpscr >> 0x16) & 3); + atan2f(fVar49 * fVar46); + *(int *)(iVar10 + 0x164) = SUB84(in_d0,0); + FUN_00648444(*(undefined1 *)(iVar10 + 0x5cc9),0,0); + FUN_006482dc(*(undefined1 *)(iVar10 + 0x5cc9)); + fVar46 = local_1e8; + } + fVar56 = local_1ec; + fVar48 = DAT_006de48c; + uVar12 = (undefined4)((ulonglong)in_d1 >> 0x20); + if (iVar13 == 0x4c) { + iVar13 = FUN_00608330(&DAT_00fd67f4,3); + fVar45 = (float)VectorSignedToFloat(DAT_00902e88 >> 1,(byte)(in_fpscr >> 0x16) & 3); + fVar57 = fVar57 / fVar45; + uVar17 = in_fpscr & 0xfffffff | (uint)(fVar57 < 1.0) << 0x1f | + (uint)(fVar57 == 1.0) << 0x1e; + in_fpscr = uVar17 | (uint)NAN(fVar57) << 0x1c; + bVar4 = (byte)(uVar17 >> 0x18); + if (!(bool)(bVar4 >> 6 & 1) && bVar4 >> 7 == ((byte)(in_fpscr >> 0x1c) & 1)) { + fVar57 = 1.0; + } + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffd8,0x29); + uVar20 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffd8,0x29); + fVar45 = (float)VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + VectorSignedToFloat(uVar20,(byte)(in_fpscr >> 0x16) & 3); + iVar13 = FUN_006f7004(fVar56,uVar11,(fVar47 + fVar45 * fVar44) * (fVar57 + 0.25),uVar12, + puVar61,in_s5,puVar5,iVar13 + 0x4c,local_504,uVar23); + if (-1 < iVar13) { + fVar45 = fVar57 * 2.0 - 1.0; + uVar17 = in_fpscr & 0xfffffff; + in_fpscr = uVar17 | (uint)(-1.0 <= fVar45) << 0x1d; + (&DAT_0107afb8)[iVar13 * 0x3a] = 1; + if ((byte)(in_fpscr >> 0x1d) == 0) { + in_d0 = (double)CONCAT44(uVar11,0xbf800000); + } + else { + uVar17 = uVar17 | (uint)(fVar45 < 1.0) << 0x1f | (uint)(fVar45 == 1.0) << 0x1e; + in_fpscr = uVar17 | (uint)NAN(fVar45) << 0x1c; + bVar4 = (byte)(uVar17 >> 0x18); + if (!(bool)(bVar4 >> 6 & 1) && bVar4 >> 7 == ((byte)(in_fpscr >> 0x1c) & 1)) { + in_d0 = (double)CONCAT44(uVar11,0x3f800000); + } + } + (&DAT_0107afb4)[iVar13 * 0x3a] = SUB84(in_d0,0); + FUN_0064721c(); + } + } + else { + iVar14 = *(int *)(iVar32 + 0x94c); + if ((iVar14 == 0x62) || (iVar14 == 0x215)) { + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffd8,0x29); + fVar45 = (float)VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffd8,0x29); + VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + FUN_006f7004(fVar56,uVar11,fVar47 + fVar45 * fVar44,uVar12,puVar61,in_s5,puVar5,iVar13, + local_504,uVar23); + } + else if (iVar14 == 0x611) { + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffd8,0x29); + fVar45 = (float)VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + fVar45 = fVar45 * DAT_006de114; + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffd8,0x29); + VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + FUN_006f7004(fVar56,uVar11,fVar47 + fVar45,uVar12,puVar61,in_s5,puVar5,iVar13,local_504, + uVar23); + } + else if (iVar14 == 0x206) { + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffd8,0x29); + fVar45 = (float)VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + fVar45 = fVar45 * DAT_006de48c; + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffd8,0x29); + VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + FUN_006f7004(fVar56,uVar11,fVar47 + fVar45,uVar12,puVar61,in_s5,puVar5,iVar13,local_504, + uVar23); + } + else if (iVar14 == 0x4f1) { + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffe2,0x1f); + fVar45 = (float)VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + fVar45 = fVar45 * DAT_006de490; + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffe2,0x1f); + VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + FUN_006f7004(fVar56,uVar11,fVar47 + fVar45,uVar12,puVar61,in_s5,puVar5,iVar13,local_504, + uVar23); + } + else if (iVar14 == 0x216) { + iVar14 = 4; + do { + fVar45 = local_1ec; + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffd8,0x29); + fVar53 = (float)VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffd8,0x29); + VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + FUN_006f7004(fVar45,uVar11,fVar47 + fVar53 * (float)puVar55,uVar12,puVar61,in_s5, + puVar5,iVar13,local_504,uVar23); + iVar14 = iVar14 + -1; + } while (iVar14 != 0); + } + else if (iVar14 == 0x51c) { + iVar14 = 0; + do { + fVar45 = local_1ec; + fVar46 = (float)VectorSignedToFloat(iVar14,(byte)(in_fpscr >> 0x16) & 3); + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffdd,0x24); + fVar48 = (float)VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + fVar57 = fVar47 + fVar48 * fVar46 * (float)puVar55; + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffdd,0x24); + fVar48 = (float)VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + fVar46 = fVar49 + fVar48 * fVar46 * (float)puVar55; + FUN_006f7004(fVar45,uVar11,fVar57 * (fVar53 / SQRT(fVar57 * fVar57 + fVar46 * fVar46)) + ,uVar12,puVar61,iVar13,local_504,uVar23); + iVar14 = iVar14 + 1; + } while (iVar14 < 4); + } + else if (iVar14 == 0x4ea) { + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffd8,0x29); + fVar45 = (float)VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffd8,0x29); + VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffd8,0x29); + fVar53 = (float)VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + fVar56 = fVar56 + fVar53 * (float)puVar55; + local_1ec = fVar56; + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffd3,0x24); + fVar53 = (float)VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + local_1e8 = fVar46 + fVar53 * (float)puVar55; + FUN_006f7004(fVar56,uVar11,fVar47 + fVar45 * fVar44,uVar12,puVar61,in_s5,puVar5,iVar13, + local_504,uVar23); + } + else if (iVar14 == 0x3c4) { + iVar14 = 3; + do { + fVar45 = local_1ec; + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffdd,0x24); + fVar53 = (float)VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffdd,0x24); + VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + FUN_006f7004(fVar45,uVar11,fVar47 + fVar53 * fVar48,uVar12,puVar61,in_s5,puVar5,iVar13 + ,local_504,uVar23); + iVar14 = iVar14 + -1; + } while (iVar14 != 0); + } + else if (iVar14 == 0x621) { + iVar16 = 4; + iVar14 = FUN_00608330(&DAT_00fd67f4,2); + if (iVar14 == 0) { + iVar16 = 5; + } + iVar14 = FUN_00608330(&DAT_00fd67f4,4); + if (iVar14 == 0) { + iVar16 = iVar16 + 1; + } + iVar14 = FUN_00608330(&DAT_00fd67f4,8); + if (iVar14 == 0) { + iVar16 = iVar16 + 1; + } + iVar14 = FUN_00608330(&DAT_00fd67f4,0x10); + if (iVar14 == 0) { + iVar16 = iVar16 + 1; + } + iVar14 = 0; + if (iVar16 != 0) { + do { + fVar45 = (float)VectorSignedToFloat(iVar14,(byte)(in_fpscr >> 0x16) & 3); + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffdd,0x24); + fVar46 = (float)VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + fVar48 = fVar47 + fVar46 * fVar45 * (float)puVar55; + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffdd,0x24); + fVar46 = (float)VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + fVar45 = fVar49 + fVar46 * fVar45 * (float)puVar55; + FUN_006f7004(fVar56,uVar11, + fVar48 * (fVar53 / SQRT(fVar48 * fVar48 + fVar45 * fVar45)),uVar12, + puVar61,iVar13,local_504,uVar23); + iVar14 = iVar14 + 1; + fVar56 = local_1ec; + } while (iVar14 < iVar16); + } + } + else if (iVar14 == 0x624) { + psVar34 = &DAT_0107af40; + iVar13 = 0x200; + do { + if (((char)psVar34[0x11] == *(char *)(iVar10 + 0x5cc9)) && (*psVar34 == 0x134)) { + FUN_006fde70(psVar34); + } + psVar34 = psVar34 + 0x74; + iVar13 = iVar13 + -1; + } while (iVar13 != 0); + iVar13 = FUN_0058ef48(); + iVar14 = FUN_00592fc8(); + iVar16 = *(int *)(iVar14 + 0x10c) + (int)*(short *)(iVar13 + 0x27fc) >> 4; + iVar13 = FUN_0058ef48(); + iVar14 = FUN_00592fc8(); + iVar13 = *(int *)(iVar14 + 0x110) + (int)*(short *)(iVar13 + 0x27fe) >> 4; + if (iVar13 < DAT_00902ea4 + -10) { + iVar14 = (iVar16 * DAT_00902934 + iVar13) * 0xe + DAT_00902928; + do { + if (((((&DAT_010262d0)[(uint)*(ushort *)(iVar14 + 6) * 4] & 1) != 0) || + (((&DAT_010262d0) + [(uint)*(ushort *) + ((DAT_00902934 * (iVar16 + -1) + iVar13) * 0xe + DAT_00902928 + 6) * 4 + ] & 1) != 0)) || + (((&DAT_010262d0) + [(uint)*(ushort *) + ((DAT_00902934 * (iVar16 + 1) + iVar13) * 0xe + DAT_00902928 + 6) * 4] + & 1) != 0)) break; + iVar13 = iVar13 + 1; + iVar14 = iVar14 + 0xe; + } while (iVar13 < DAT_00902ea4 + -10); + } + iVar14 = FUN_0058ef48(); + iVar16 = FUN_00592fc8(); + VectorSignedToFloat((iVar13 + -1) * 0x10 + -0x18,(byte)(in_fpscr >> 0x16) & 3); + uVar19 = VectorSignedToFloat(*(int *)(iVar16 + 0x10c) + (int)*(short *)(iVar14 + 0x27fc) + ,(byte)(in_fpscr >> 0x16) & 3); + FUN_006f7004(uVar19,uVar11,puVar5,uVar12,puVar61,in_s5,puVar5,local_508,local_504,uVar23 + ); + } + else if ((iVar14 == 0x4dc) || (iVar14 == 0x4e8)) { + iVar13 = FUN_006f7004(local_1ec,uVar11,fVar47,uVar12,puVar61,in_s5,puVar5,iVar13, + local_504,uVar23); + iVar14 = FUN_0058ef48(); + iVar16 = FUN_00592fc8(); + uVar11 = VectorSignedToFloat(*(int *)(iVar16 + 0x10c) + (int)*(short *)(iVar14 + 0x27fc) + ,(byte)(in_fpscr >> 0x16) & 3); + (&DAT_0107afb4)[iVar13 * 0x3a] = uVar11; + iVar14 = FUN_0058ef48(); + iVar16 = FUN_00592fc8(); + (&DAT_0107afb8)[iVar13 * 0x3a] = + *(int *)(iVar16 + 0x110) + (int)*(short *)(iVar14 + 0x27fe); + } + else if (iVar14 == 0x4cd) { + iVar14 = FUN_005c4e6c(&DAT_00fd67f4,2,4); + iVar16 = FUN_00608330(&DAT_00fd67f4,5); + fVar45 = DAT_006dea2c; + if (iVar16 == 0) { + iVar14 = iVar14 + 1; + } + iVar16 = 0; + if (0 < iVar14) { + do { + fVar53 = fVar47; + if (0 < iVar16) { + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffdd,0x24); + fVar53 = (float)VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + fVar53 = fVar47 + fVar53 * fVar45; + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffdd,0x24); + VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + } + if (1 < iVar16) { + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffdd,0x24); + fVar46 = (float)VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + fVar53 = fVar53 + fVar46 * fVar45; + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffdd,0x24); + VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + } + if (2 < iVar16) { + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffdd,0x24); + fVar46 = (float)VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + fVar53 = fVar53 + fVar46 * fVar45; + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffdd,0x24); + VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + } + iVar25 = FUN_006f7004(fVar56,uVar11,fVar53,uVar12,puVar61,in_s5,puVar5,iVar13, + local_504,uVar23); + iVar16 = iVar16 + 1; + (&DAT_0107af51)[iVar25 * 0xe8] = 1; + fVar56 = local_1ec; + } while (iVar16 < iVar14); + } + } + else { + if (iVar14 == 0x461) { + iVar14 = FUN_005c4e6c(&DAT_00fd67f4,1,4); + iVar16 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar16 == 0) { + iVar14 = iVar14 + 1; + } + uVar19 = 6; + } + else { + if (iVar14 != 0x483) { + if (iVar14 == 0x709) { + iVar14 = FUN_005c4e6c(&DAT_00fd67f4,1,4); + if (0 < iVar14) { + do { + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffdd,0x24); + fVar45 = (float)VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffdd,0x24); + VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + FUN_006f7004(fVar56,uVar11,fVar47 + fVar45 * (float)puVar55,uVar12,puVar61, + in_s5,puVar5,iVar13,local_504,uVar23); + iVar14 = iVar14 + -1; + fVar56 = local_1ec; + } while (iVar14 != 0); + } + } + else if (iVar14 == 0x2a7) { + iVar14 = 6; + do { + fVar45 = local_1ec; + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffd8,0x29); + fVar53 = (float)VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffd8,0x29); + VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + FUN_006f7004(fVar45,uVar11,fVar47 + fVar53 * (float)puVar55,uVar12,puVar61,in_s5 + ,puVar5,iVar13,local_504,uVar23); + iVar14 = iVar14 + -1; + } while (iVar14 != 0); + } + else if (iVar14 == 0x1b2) { + if (*(short *)(iVar10 + 0x154) < 5) { + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffd8,0x29); + uVar20 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffd8,0x29); + fVar45 = (float)VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + VectorSignedToFloat(uVar20,(byte)(in_fpscr >> 0x16) & 3); + fVar47 = (fVar47 + fVar45 * fVar44) * fVar52; + } + else if (*(short *)(iVar10 + 0x154) < 10) { + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffec,0x15); + uVar20 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffec,0x15); + fVar45 = (float)VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + VectorSignedToFloat(uVar20,(byte)(in_fpscr >> 0x16) & 3); + fVar47 = (fVar47 + fVar45 * fVar44) * DAT_006dea28; + } + FUN_006f7004(fVar56,uVar11,fVar47,uVar12,puVar61,in_s5,puVar5,iVar13,local_504, + uVar23); + } + else if (iVar14 == 0x485) { + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xbf,0xc3); + iVar13 = FUN_0058ef48(); + iVar14 = FUN_00592fc8(); + local_1ec = (float)VectorSignedToFloat(*(int *)(iVar14 + 0x10c) + + (int)*(short *)(iVar13 + 0x27fc), + (byte)(in_fpscr >> 0x16) & 3); + iVar13 = FUN_0058ef48(); + iVar14 = FUN_00592fc8(); + iVar13 = *(int *)(iVar14 + 0x110) + (int)*(short *)(iVar13 + 0x27fe); + local_1e8 = (float)VectorSignedToFloat(iVar13,(byte)(in_fpscr >> 0x16) & 3); + iVar13 = FUN_006f7004(local_1ec,uVar11,puVar5,uVar12,puVar61,in_s5,puVar5,uVar19, + local_504,uVar23,iVar13); + *(undefined4 *)(&DAT_0107afcc + iVar13 * 0xe8) = 0x1e; + } + else if (iVar14 == 0x70a) { + iVar14 = FUN_0058ef48(); + iVar16 = FUN_00592fc8(); + local_1ec = (float)VectorSignedToFloat((int)*(short *)(iVar14 + 0x27fc) + + *(int *)(iVar16 + 0x10c), + (byte)(in_fpscr >> 0x16) & 3); + iVar14 = FUN_0058ef48(); + iVar16 = FUN_00592fc8(); + local_1e8 = (float)VectorSignedToFloat((int)*(short *)(iVar14 + 0x27fe) + + *(int *)(iVar16 + 0x110), + (byte)(in_fpscr >> 0x16) & 3); + FUN_006f7004(local_1ec,uVar11,puVar5,uVar12,puVar61,iVar13,local_504,uVar23); + } + else if (iVar14 == 0x51d) { + iVar14 = FUN_0058ef48(); + iVar16 = FUN_00592fc8(); + local_1ec = (float)VectorSignedToFloat((int)*(short *)(iVar14 + 0x27fc) + + *(int *)(iVar16 + 0x10c), + (byte)(in_fpscr >> 0x16) & 3); + iVar14 = FUN_0058ef48(); + iVar16 = FUN_00592fc8(); + local_1e8 = (float)VectorSignedToFloat((int)*(short *)(iVar14 + 0x27fe) + + *(int *)(iVar16 + 0x110), + (byte)(in_fpscr >> 0x16) & 3); + FUN_006f7004(local_1ec,uVar11,puVar5,uVar12,puVar61,iVar13,local_504,uVar23); + } + else { + iVar14 = (int)*(short *)(iVar32 + 0x9d2); + if ((((iVar14 < 1) || (iVar16 = FUN_006444b0(iVar14), iVar16 != 0)) || + ((iVar14 != 0x48 && (iVar14 != 0x12)))) || + ((*(uint *)(iVar32 + 0x970) & 1) != 0)) { + iVar14 = FUN_005b66c8(*(undefined1 *)(iVar32 + 0x9c6)); + if ((iVar14 == 0) && + (iVar14 = FUN_006f7004(fVar56,uVar11,fVar47,uVar12,puVar61,in_s5,puVar5, + iVar13,local_504,uVar23), -1 < iVar14)) { + iVar16 = *(int *)(iVar32 + 0x94c); + if (iVar16 == 0x2d6) { + (&DAT_0107af4f)[iVar14 * 0xe8] = 1; + } + else if ((iVar16 == 0x2d4) || (iVar16 == 0x2a4)) { + (&DAT_0107af4d)[iVar14 * 0xe8] = 1; + } + if (iVar13 == 0x50) { + uVar11 = VectorSignedToFloat((int)*(short *)(iVar10 + 0x8960), + (byte)(in_fpscr >> 0x16) & 3); + (&DAT_0107afb4)[iVar14 * 0x3a] = uVar11; + (&DAT_0107afb8)[iVar14 * 0x3a] = (int)*(short *)(iVar10 + 0x8962); + } + } + } + else { + puVar33 = &DAT_0107af40; + iVar13 = 0x200; + do { + if (((char)puVar33[2] != '\0') && + ((char)puVar33[0x11] == *(char *)(iVar10 + 0x5cc9))) { + uVar17 = (uint)*puVar33; + if ((int)*(short *)(iVar32 + 0x9d2) == 0x48) { + if ((uVar17 != 0x48) && (uVar17 != 0x56)) { + bVar42 = uVar17 == 0x57; + goto LAB_006dec38; + } + } + else { + bVar42 = (int)*(short *)(iVar32 + 0x9d2) == uVar17; +LAB_006dec38: + if (!bVar42) goto LAB_006dec40; + } + FUN_006fde70(puVar33); + } +LAB_006dec40: + puVar33 = puVar33 + 0x74; + iVar13 = iVar13 + -1; + } while (iVar13 != 0); + if ((local_508 == 0x48) && (iVar13 = FUN_00608330(&DAT_00fd67f4,3), iVar13 != 0) + ) { + local_508 = iVar13 + 0x55; + } + FUN_006f7004(local_1ec,uVar11,fVar47,uVar12,puVar61,in_s5,puVar5,local_508, + local_504,uVar23); + } + } + goto LAB_006def4e; + } + iVar14 = FUN_005c4e6c(&DAT_00fd67f4,2,5); + iVar16 = FUN_00608330(&DAT_00fd67f4,5); + if (iVar16 == 0) { + iVar14 = iVar14 + 1; + } + uVar19 = 5; + } + iVar16 = FUN_00608330(&DAT_00fd67f4,uVar19); + if (iVar16 == 0) { + iVar14 = iVar14 + 1; + } + if (0 < iVar14) { + do { + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffdd,0x24); + fVar53 = (float)VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffdd,0x24); + VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + FUN_006f7004(fVar56,uVar11,fVar47 + fVar53 * fVar45,uVar12,puVar61,in_s5,puVar5, + iVar13,local_504,uVar23); + iVar14 = iVar14 + -1; + fVar56 = local_1ec; + } while (iVar14 != 0); + } + } + } + } + else if (*(char *)(iVar32 + 0x977) == '\x05') { + *(undefined1 **)(iVar10 + 0x164) = puVar5; + FUN_006482dc(*(undefined1 *)(iVar10 + 0x5cc9)); + } + } +LAB_006def4e: + if ((DAT_0103399c == *(byte *)(iVar10 + 0x5cc9)) && + ((((((iVar13 = *(int *)(iVar32 + 0x94c), iVar13 == 0x1fd || (iVar13 == 0x1fe)) || + (iVar13 == 0x351)) || ((iVar13 == 0x352 || (iVar13 == 0x353)))) && + (0 < *(short *)(iVar10 + 0x154))) && + ((*(short *)(iVar10 + 0x158) == 0 && (*(char *)(iVar10 + 0x5cba) != '\0')))))) { + iVar16 = 0; + iVar14 = iVar10; + do { + if ((*(int *)(iVar14 + 0x94c) == 0x212) && (iVar25 = iVar16, 0 < *(short *)(iVar14 + 0x98a)) + ) break; + iVar16 = iVar16 + 1; + iVar14 = iVar14 + 0xa0; + iVar25 = -1; + } while (iVar16 < 0x30); + iVar14 = (int)*(short *)(iVar10 + 0x8960); + iVar16 = (int)*(short *)(iVar10 + 0x8962); + iVar35 = 0; + if ((iVar13 == 0x1fd) && (-1 < iVar25)) { + iVar13 = FUN_00752628(iVar14,iVar16,0); + if (iVar13 != 0) { + iVar13 = iVar10 + iVar25 * 0xa0; + sVar31 = *(short *)(iVar13 + 0x98a) + -1; + *(short *)(iVar13 + 0x98a) = sVar31; + if (sVar31 < 1) { + FUN_00612a6c(iVar13 + 0x948); + } + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + iVar14 = (int)*(short *)(iVar10 + 0x8962); + iVar13 = (int)*(short *)(iVar10 + 0x8960); + uVar11 = 5; +LAB_006df102: + FUN_00647acc(uVar11,iVar13,iVar14,0,0); + iVar13 = FUN_0058ef48(); + *(int *)(iVar13 + 0x34b4) = *(int *)(iVar13 + 0x34b4) + 1; + iVar13 = FUN_0058ef48(); + if (*(int *)(iVar13 + 0x34b4) == 100) { + uVar11 = FUN_0058ef48(); + FUN_00738154(uVar11,0x1b); + } + goto LAB_006df292; + } + } + else if ((iVar13 == 0x352) && (-1 < iVar25)) { + iVar13 = FUN_00752628(iVar14,iVar16,1); + if (iVar13 != 0) { + iVar13 = iVar10 + iVar25 * 0xa0; + sVar31 = *(short *)(iVar13 + 0x98a) + -1; + *(short *)(iVar13 + 0x98a) = sVar31; + if (sVar31 < 1) { + FUN_00612a6c(iVar13 + 0x948); + } + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + iVar14 = (int)*(short *)(iVar10 + 0x8962); + iVar13 = (int)*(short *)(iVar10 + 0x8960); + uVar11 = 10; + goto LAB_006df102; + } + } + else if ((iVar13 == 0x353) && (-1 < iVar25)) { + iVar13 = FUN_00752628(iVar14,iVar16,2); + if (iVar13 != 0) { + iVar13 = iVar10 + iVar25 * 0xa0; + sVar31 = *(short *)(iVar13 + 0x98a) + -1; + *(short *)(iVar13 + 0x98a) = sVar31; + if (sVar31 < 1) { + FUN_00612a6c(iVar13 + 0x948); + } + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + iVar14 = (int)*(short *)(iVar10 + 0x8962); + iVar13 = (int)*(short *)(iVar10 + 0x8960); + uVar11 = 0xc; + goto LAB_006df102; + } + } + else if (iVar13 == 0x1fe) { + iVar13 = FUN_007526b4(iVar14,iVar16); + if (iVar13 == 0) { + iVar13 = FUN_0075250c(iVar14,iVar16,2); + if (iVar13 == 0) { + iVar13 = FUN_0075250c(iVar14,iVar16,1); + if (iVar13 == 0) { + iVar13 = FUN_0075250c(iVar14,iVar16,0); + if (iVar13 != 0) { + iVar35 = -1; + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + FUN_00647acc(6,(int)*(short *)(iVar10 + 0x8960),(int)*(short *)(iVar10 + 0x8962),0,0 + ); + } + } + else { + iVar35 = -1; + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + FUN_00647acc(5,(int)*(short *)(iVar10 + 0x8960),(int)*(short *)(iVar10 + 0x8962),0,0); + } + } + else { + iVar35 = -1; + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + FUN_00647acc(0xd,(int)*(short *)(iVar10 + 0x8960),(int)*(short *)(iVar10 + 0x8962),0,0); + } + } + else { + iVar35 = -1; + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + FUN_00647acc(9,(int)*(short *)(iVar10 + 0x8960),(int)*(short *)(iVar10 + 0x8962),0,0); + } + } + else if (((iVar13 == 0x351) && (0 < *(short *)(iVar32 + 0x98a))) && + (iVar13 = FUN_00752788(iVar14,iVar16), iVar13 != 0)) { + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + FUN_00647acc(8,(int)*(short *)(iVar10 + 0x8960),(int)*(short *)(iVar10 + 0x8962),0,0); + sVar31 = *(short *)(iVar32 + 0x98a) + -1; + *(short *)(iVar32 + 0x98a) = sVar31; + if (sVar31 < 1) { + FUN_00612a6c(iVar37); + } + } + iVar13 = FUN_0058ef48(); + if (*(uint *)(iVar13 + 0x34b4) < (uint)-iVar35) { + iVar13 = FUN_0058ef48(); + *(undefined4 *)(iVar13 + 0x34b4) = 0; + } + else { + iVar13 = FUN_0058ef48(); + *(int *)(iVar13 + 0x34b4) = *(int *)(iVar13 + 0x34b4) + iVar35; + } + } +LAB_006df292: + if (((0 < *(short *)(iVar10 + 0x154)) && (*(short *)(iVar10 + 0x158) == 0)) && + ((*(int *)(iVar32 + 0x94c) == 0x1fb || (*(int *)(iVar32 + 0x94c) == 0x1fc)))) { + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + FUN_006c2118(iVar10,&local_1b4); + iVar13 = FUN_0058ef48(); + iVar14 = FUN_00592fc8(); + fVar45 = (float)VectorSignedToFloat((int)*(short *)(iVar13 + 0x27fc) + + *(int *)(iVar14 + 0x10c),(byte)(in_fpscr >> 0x16) & 3); + iVar13 = FUN_0058ef48(); + iVar14 = FUN_00592fc8(); + fVar53 = (float)VectorSignedToFloat((int)*(short *)(iVar13 + 0x27fe) + + *(int *)(iVar14 + 0x110),(byte)(in_fpscr >> 0x16) & 3); + fVar46 = (float)VectorSignedToFloat(DAT_00902e88 >> 1,(byte)(in_fpscr >> 0x16) & 3); + uVar17 = in_fpscr & 0xfffffff; + if (1.0 < SQRT((fVar45 - local_1b4) * (fVar45 - local_1b4) + + (fVar53 - local_1b0) * (fVar53 - local_1b0)) / fVar46) { + in_d0 = (double)CONCAT44((int)((ulonglong)in_d0 >> 0x20),0x3f800000); + } + fVar45 = SUB84(in_d0,0) * 2.0 - 1.0; + in_fpscr = uVar17 | (uint)(-1.0 <= fVar45) << 0x1d; + uVar11 = (undefined4)((ulonglong)in_d0 >> 0x20); + if ((byte)(in_fpscr >> 0x1d) == 0) { + in_d0 = (double)CONCAT44(uVar11,0xbf800000); + } + else { + uVar17 = uVar17 | (uint)(fVar45 < 1.0) << 0x1f | (uint)(fVar45 == 1.0) << 0x1e; + in_fpscr = uVar17 | (uint)NAN(fVar45) << 0x1c; + bVar4 = (byte)(uVar17 >> 0x18); + if (!(bool)(bVar4 >> 6 & 1) && bVar4 >> 7 == ((byte)(in_fpscr >> 0x1c) & 1)) { + in_d0 = (double)CONCAT44(uVar11,0x3f800000); + } + } + DAT_0103397c = SUB84(in_d0,0); + uVar11 = 0x23; + if (*(int *)(iVar32 + 0x94c) == 0x1fc) { + uVar11 = 0x1a; + } + FUN_007a8384(2,*(undefined4 *)(iVar10 + 0x100),*(undefined4 *)(iVar10 + 0x104),uVar11); + FUN_0064803c(*(undefined1 *)(iVar10 + 0x5cc9)); + } + iVar14 = DAT_00902934; + iVar13 = DAT_00902928; + iVar16 = *(int *)(iVar32 + 0x94c); + if ((((0xcc < iVar16) && (iVar16 < 0xd0)) || (iVar16 == 0x468)) && + (((*(short *)(iVar10 + 0x158) == 0 && (0 < *(short *)(iVar10 + 0x154))) && + (*(char *)(iVar10 + 0x5cba) != '\0')))) { + if (iVar16 == 0xcd) { + iVar14 = (int)*(short *)(iVar10 + 0x8962); + iVar25 = (int)*(short *)(iVar10 + 0x8960); + iVar13 = 0; + uVar17 = (*(ushort *)((iVar25 * DAT_00902934 + iVar14) * 0xe + DAT_00902928 + 2) & 0x3fff) + >> 0xc; + iVar16 = iVar25 + -1; + if (iVar16 <= iVar25 + 1) { + iVar35 = DAT_00902934 * iVar16; + iVar38 = iVar14 + -1; + iVar41 = iVar14 + 1; + iVar26 = ((iVar25 + 1) - iVar16) + 1; + iVar16 = iVar41 - iVar38; + do { + if (iVar38 <= iVar41) { + iVar28 = (iVar38 + iVar35) * 0xe + DAT_00902928; + iVar16 = iVar16 + 1; + do { + if ((*(ushort *)(iVar28 + 2) & 0x3fff) >> 0xc == uVar17) { + iVar13 = iVar13 + (uint)*(byte *)(iVar28 + 4); + } + iVar28 = iVar28 + 0xe; + iVar16 = iVar16 + -1; + } while (iVar16 != 0); + iVar16 = iVar41 - iVar38; + } + iVar35 = iVar35 + DAT_00902934; + iVar26 = iVar26 + -1; + } while (iVar26 != 0); + } + if ((*(char *)((iVar25 * DAT_00902934 + iVar14) * 0xe + DAT_00902928 + 4) != '\0') && + (100 < iVar13)) { + uVar11 = 0; + uVar27 = (*(ushort *)((iVar25 * DAT_00902934 + iVar14) * 0xe + DAT_00902928 + 2) & 0x3fff) + >> 0xc; + if (uVar27 == 0) { + uVar11 = 0xce; + } + else if (uVar27 == 1) { + uVar11 = 0xcf; + } + else if (uVar27 == 2) { + uVar11 = 0x468; + } + FUN_00613968(auStack_1a4); + FUN_00616ed8(auStack_1a4,uVar11,1,0); + iVar13 = FUN_006d5b64(iVar10,auStack_1a4,0); + if ((iVar13 == 0) || (local_1a0 != 0)) { + FUN_006be5d8(iVar10 + 0x100,uVar11,(int)local_162,0,0); + } + sVar31 = *(short *)(iVar32 + 0x98a) + -1; + *(short *)(iVar32 + 0x98a) = sVar31; + if (sVar31 < 1) { + FUN_00612a6c(iVar37); + } + FUN_007a8384(0x13,*(undefined4 *)(iVar10 + 0x100),*(undefined4 *)(iVar10 + 0x104),1); + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + uVar39 = (uint)*(byte *)((*(short *)(iVar10 + 0x8960) * DAT_00902934 + + (int)*(short *)(iVar10 + 0x8962)) * 0xe + DAT_00902928 + 4); + *(undefined1 *) + ((*(short *)(iVar10 + 0x8960) * DAT_00902934 + (int)*(short *)(iVar10 + 0x8962)) * 0xe + + DAT_00902928 + 4) = 0; + FUN_0063e24c((DAT_00902934 * *(short *)(iVar10 + 0x8960) + + (int)*(short *)(iVar10 + 0x8962)) * 0xe + DAT_00902928,0); + FUN_006be5ac((DAT_00902934 * *(short *)(iVar10 + 0x8960) + + (int)*(short *)(iVar10 + 0x8962)) * 0xe + DAT_00902928,0); + iVar13 = (DAT_00902934 * *(short *)(iVar10 + 0x8960) + (int)*(short *)(iVar10 + 0x8962)) * + 0xe + DAT_00902928; + *(ushort *)(iVar13 + 2) = *(ushort *)(iVar13 + 2) & 0xcfff; + FUN_007729e8((int)*(short *)(iVar10 + 0x8960),(int)*(short *)(iVar10 + 0x8962),0); + if (DAT_00fe1ec4 == 1) { + FUN_006495cc(); + } + else { + FUN_0063e8c0((int)*(short *)(iVar10 + 0x8960),(int)*(short *)(iVar10 + 0x8962)); + } + iVar14 = *(short *)(iVar10 + 0x8960) + -1; + iVar13 = DAT_00902928; + if (iVar14 <= *(short *)(iVar10 + 0x8960) + 1) { + do { + iVar16 = *(short *)(iVar10 + 0x8962) + -1; + if (iVar16 <= *(short *)(iVar10 + 0x8962) + 1) { + do { + if (((int)uVar39 < 0x100) && + ((*(ushort *)((DAT_00902934 * iVar14 + iVar16) * 0xe + iVar13 + 2) & 0x3fff) >> + 0xc == uVar17)) { + uVar29 = (uint)*(byte *)((DAT_00902934 * iVar14 + iVar16) * 0xe + iVar13 + 4); + if (0xff < (int)(uVar29 + uVar39)) { + uVar29 = 0xff - uVar39; + } + iVar13 = (DAT_00902934 * iVar14 + iVar16) * 0xe + iVar13; + uVar39 = uVar39 + uVar29; + *(char *)(iVar13 + 4) = *(char *)(iVar13 + 4) - (char)uVar29; + iVar13 = (DAT_00902934 * iVar14 + iVar16) * 0xe + DAT_00902928; + uVar24 = *(ushort *)(iVar13 + 2); + *(ushort *)(iVar13 + 2) = (uVar24 ^ (ushort)(uVar27 << 0xc)) & 0x3000 ^ uVar24; + if (*(char *)((DAT_00902934 * iVar14 + iVar16) * 0xe + DAT_00902928 + 4) == '\0' + ) { + FUN_0063e24c((DAT_00902934 * iVar14 + iVar16) * 0xe + DAT_00902928,0); + FUN_006be5ac((DAT_00902934 * iVar14 + iVar16) * 0xe + DAT_00902928,0); + } + FUN_007729e8(iVar14,iVar16,0); + if (DAT_00fe1ec4 == 1) { + FUN_006495cc(); + iVar13 = DAT_00902928; + } + else { + FUN_0063e8c0(iVar14,iVar16); + iVar13 = DAT_00902928; + } + } + iVar16 = iVar16 + 1; + } while (iVar16 <= *(short *)(iVar10 + 0x8962) + 1); + } + iVar14 = iVar14 + 1; + } while (iVar14 <= *(short *)(iVar10 + 0x8960) + 1); + } + } + } + else { + iVar25 = (int)*(short *)(iVar10 + 0x8962); + iVar35 = (int)*(short *)(iVar10 + 0x8960); + if ((*(byte *)((iVar35 * DAT_00902934 + iVar25) * 0xe + DAT_00902928 + 4) < 200) && + (iVar38 = FUN_00609074((DAT_00902934 * iVar35 + iVar25) * 0xe + DAT_00902928), + iVar38 == 0)) { + bVar42 = false; + if (iVar16 == 0xce) { + sVar40 = 0; + sVar31 = 0; + if ((*(char *)((iVar14 * iVar35 + iVar25) * 0xe + iVar13 + 4) == '\0') || + (sVar31 = sVar40, + (*(ushort *)((iVar14 * iVar35 + iVar25) * 0xe + iVar13 + 2) & 0x3000) == 0)) { +LAB_006df7c2: + sVar40 = sVar31; + bVar42 = true; + } + else { + bVar42 = false; + } + } + else if (iVar16 == 0xcf) { + sVar40 = 1; + sVar31 = sVar40; + if ((*(char *)((iVar14 * iVar35 + iVar25) * 0xe + iVar13 + 4) == '\0') || + ((*(ushort *)((iVar14 * iVar35 + iVar25) * 0xe + iVar13 + 2) & 0x3000) == 0x1000)) + goto LAB_006df7c2; + bVar42 = false; + } + else if (iVar16 == 0x468) { + sVar40 = 2; + sVar31 = sVar40; + if ((*(char *)((iVar14 * iVar35 + iVar25) * 0xe + iVar13 + 4) == '\0') || + ((*(ushort *)((iVar14 * iVar35 + iVar25) * 0xe + iVar13 + 2) & 0x3000) == 0x2000)) + goto LAB_006df7c2; + bVar42 = false; + } + else { + sVar40 = -1; + } + if (bVar42) { + FUN_007a8384(0x13,*(undefined4 *)(iVar10 + 0x100),*(undefined4 *)(iVar10 + 0x104),1); + iVar13 = (DAT_00902934 * *(short *)(iVar10 + 0x8960) + (int)*(short *)(iVar10 + 0x8962)) + * 0xe + DAT_00902928; + *(ushort *)(iVar13 + 2) = + *(ushort *)(iVar13 + 2) ^ (*(ushort *)(iVar13 + 2) ^ sVar40 << 0xc) & 0x3000; + *(undefined1 *) + ((DAT_00902934 * *(short *)(iVar10 + 0x8960) + (int)*(short *)(iVar10 + 0x8962)) * 0xe + + DAT_00902928 + 4) = 0xff; + FUN_007729e8((int)*(short *)(iVar10 + 0x8960),(int)*(short *)(iVar10 + 0x8962), + 0xffffffff); + sVar31 = *(short *)(iVar32 + 0x98a) + -1; + *(short *)(iVar32 + 0x98a) = sVar31; + if (sVar31 < 1) { + FUN_00612a6c(iVar37); + } + FUN_00613968(auStack_104); + FUN_00616ed8(auStack_104,0xcd,1,0); + iVar13 = FUN_006d5b64(iVar10,auStack_104,0); + if ((iVar13 == 0) || (local_100 != 0)) { + FUN_006be5d8(iVar10 + 0x100,0xcd,(int)local_c2,0,0); + } + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + FUN_006495cc((int)*(short *)(iVar10 + 0x8960),(int)*(short *)(iVar10 + 0x8962)); + } + } + } + } + if (*(char *)(iVar10 + 0x5cf9) == '\0') { + uVar24 = *(ushort *)(iVar10 + 0x158); +LAB_006df924: + *(ushort *)(iVar10 + 0x160) = uVar24; + } + else { + sVar31 = *(short *)(iVar10 + 0x160) + -1; + *(short *)(iVar10 + 0x160) = sVar31; + if (sVar31 < 0) { + if (*(char *)(iVar32 + 0x97c) == '\0') { + fVar45 = (float)VectorSignedToFloat((uint)*(byte *)(iVar32 + 0x979), + (byte)(in_fpscr >> 0x16) & 3); + uVar24 = (ushort)(int)(fVar45 * *(float *)(iVar10 + 0x5d58)); + in_d0 = (double)CONCAT62((int6)((ulonglong)in_d0 >> 0x10),uVar24); + } + else { + uVar24 = (ushort)*(byte *)(iVar32 + 0x979); + } + goto LAB_006df924; + } + } + iVar13 = FUN_00613084(iVar37); + if ((iVar13 != 0) && (*(char *)(iVar10 + 0x8df5) != '\0')) { + bVar42 = true; + local_4ec = (DAT_00902934 * *(short *)(iVar10 + 0x8960) + (int)*(short *)(iVar10 + 0x8962)) * + 0xe + DAT_00902928; + if (((*(short *)(iVar10 + 0x160) == 0) && + ((0 < *(short *)(iVar10 + 0x154) && (*(char *)(iVar10 + 0x5cba) != '\0')))) && + (((*(byte *)(local_4ec + 1) & 1) == 0 || + ((iVar13 = FUN_00613758(local_4ec), iVar13 == 0 && + (((&DAT_010262d0)[(uint)*(ushort *)(local_4ec + 6) * 4] & 1) == 0)))))) { + *(undefined1 *)(iVar10 + 0x5cc3) = 0; + } + if ((*(byte *)(local_4ec + 1) & 1) != 0) { + if ((((*(char *)(iVar32 + 0x97c) != '\0') && (iVar13 = FUN_006c0548(local_4ec), iVar13 != 0) + ) || ((*(char *)(iVar32 + 0x97d) != '\0' && + (iVar13 = FUN_0061377c(local_4ec), iVar13 != 0)))) || + ((*(char *)(iVar32 + 0x97e) != '\0' && (iVar13 = FUN_00613758(local_4ec), iVar13 != 0)))) + { + bVar42 = false; + } + if (((*(short *)(iVar10 + 0x160) == 0) && (0 < *(short *)(iVar10 + 0x154))) && + (*(char *)(iVar10 + 0x5cba) != '\0')) { + if ((*(short *)(iVar10 + 0x5c88) != *(short *)(iVar10 + 0x8960)) || + (*(short *)(iVar10 + 0x5c8a) != *(short *)(iVar10 + 0x8962))) { + *(undefined2 *)(iVar10 + 0x5c86) = 0; + *(undefined2 *)(iVar10 + 0x5c88) = *(undefined2 *)(iVar10 + 0x8960); + *(undefined2 *)(iVar10 + 0x5c8a) = *(undefined2 *)(iVar10 + 0x8962); + } + if (((&DAT_010262d0)[(uint)*(ushort *)(local_4ec + 6) * 4] & 0x8000) != 0) { + *(undefined2 *)(iVar10 + 0x5c86) = 100; + } + uVar17 = (uint)*(ushort *)(local_4ec + 6); + iVar13 = FUN_00613758(local_4ec); + if (iVar13 == 0) { + if (((&DAT_010262d0)[uVar17 * 4] & 0x40) == 0) { + if (*(byte *)(iVar32 + 0x97c) != 0) { + fVar45 = (float)VectorSignedToFloat((uint)*(byte *)(iVar32 + 0x97c), + (byte)(in_fpscr >> 0x16) & 3); + iVar13 = (int)(fVar45 * fVar51); + if (((((&DAT_010262d0)[uVar17 * 4] & 0x2000) == 0) && (uVar17 != 0x19)) && + ((uVar17 != 0x3a && ((uVar17 != 0x75 && (uVar17 != 0xcb)))))) { + sVar31 = (short)(iVar13 >> 2); + if ((uVar17 == 0x30) || (uVar17 == 0xe8)) { +LAB_006dfcd2: + sVar31 = *(short *)(iVar10 + 0x5c86) + sVar31; + goto LAB_006dfcf6; + } + if (uVar17 == 0xe2) { + *(short *)(iVar10 + 0x5c86) = *(short *)(iVar10 + 0x5c86) + sVar31; +LAB_006dfd7c: + if (0xd1 < *(byte *)(iVar32 + 0x97c)) goto LAB_006dfd8c; + *(undefined2 *)(iVar10 + 0x5c86) = 0; + goto LAB_006dfe86; + } + if ((uVar17 == 0x6b) || (uVar17 == 0xdd)) goto LAB_006dfcee; + if ((uVar17 == 0x6c) || (uVar17 == 0xde)) { + sVar31 = *(short *)(iVar10 + 0x5c86) + + ((short)((ulonglong)((longlong)iVar13 * (longlong)DAT_006dfe28) >> 0x20 + ) - (short)((longlong)iVar13 * (longlong)DAT_006dfe28 >> 0x3f)) + ; + goto LAB_006dfcf6; + } + if ((uVar17 == 0x6f) || (uVar17 == 0xdf)) goto LAB_006dfcd2; + if (uVar17 != 0xd3) { + sVar31 = *(short *)(iVar10 + 0x5c86) + (short)iVar13; + goto LAB_006dfcf6; + } + *(short *)(iVar10 + 0x5c86) = + *(short *)(iVar10 + 0x5c86) + + ((short)(int)((longlong)iVar13 * (longlong)DAT_006dfe2c >> 0x21) - + (short)((longlong)iVar13 * (longlong)DAT_006dfe2c >> 0x3f)); +LAB_006dfcfe: + if (*(byte *)(iVar32 + 0x97c) < 200) { + *(undefined2 *)(iVar10 + 0x5c86) = 0; + goto LAB_006dfeb6; + } +LAB_006dfd8c: + iVar14 = FUN_006bed18(uVar17,(int)*(short *)(local_4ec + 0xc)); + if ((iVar14 == 0) || (0xd1 < *(byte *)(iVar32 + 0x97c))) { + if ((((&DAT_010262d0)[(uint)*(ushort *)(local_4ec + 6) * 4] & 0x2000) == 0) || + (0x40 < *(byte *)(iVar32 + 0x97c))) { + if (((uVar17 == 0x6b) || (uVar17 == 0xdd)) && + (*(byte *)(iVar32 + 0x97c) < 100)) { + *(undefined2 *)(iVar10 + 0x5c86) = 0; + } + else if (((uVar17 == 0x6c) || (uVar17 == 0xde)) && + (*(byte *)(iVar32 + 0x97c) < 0x6e)) { + *(undefined2 *)(iVar10 + 0x5c86) = 0; + } + else if (((uVar17 == 0x6f) || (uVar17 == 0xdf)) && + (*(byte *)(iVar32 + 0x97c) < 0x78)) { + *(undefined2 *)(iVar10 + 0x5c86) = 0; + } + } + else { + fVar45 = (float)VectorSignedToFloat((int)DAT_00902ea0, + (byte)(in_fpscr >> 0x16) & 3); + if (((int)*(short *)(iVar10 + 0x8960) < (int)(fVar45 * DAT_006dfe24)) || + ((int)(fVar45 * DAT_006dfe20) < (int)*(short *)(iVar10 + 0x8960))) { + *(undefined2 *)(iVar10 + 0x5c86) = 0; + } + } + } + else { + *(undefined2 *)(iVar10 + 0x5c86) = 0; + } +LAB_006dfe86: + if ((((uVar17 == 0x93) || (uVar17 == 0)) || (uVar17 == 0x28)) || + (((uVar17 == 0x35 || (uVar17 == 0x39)) || + ((uVar17 == 0x3b || ((uVar17 == 0x7b || (uVar17 == 0xe0)))))))) { + *(short *)(iVar10 + 0x5c86) = *(short *)(iVar10 + 0x5c86) + (short)iVar13; + } + if ((uVar17 != 0xa5) && (uVar17 != 199)) goto LAB_006dfeb6; +LAB_006dfed0: + *(undefined2 *)(iVar10 + 0x5c86) = 100; + } + else { +LAB_006dfcee: + sVar31 = *(short *)(iVar10 + 0x5c86) + (short)(iVar13 >> 1); +LAB_006dfcf6: + *(short *)(iVar10 + 0x5c86) = sVar31; + if (uVar17 == 0xd3) goto LAB_006dfcfe; + if (uVar17 != 0x25) { + if ((((uVar17 == 0x16) || (uVar17 == 0xcc)) && + (DAT_00902ebc < *(short *)(iVar10 + 0x8962))) && + (*(byte *)(iVar32 + 0x97c) < 0x37)) { + *(undefined2 *)(iVar10 + 0x5c86) = 0; + } + else { + if ((((uVar17 != 0x19) && (uVar17 != 0x38)) && + ((uVar17 != 0x3a && ((uVar17 != 0x75 && (uVar17 != 0xcb)))))) || + (0x40 < *(byte *)(iVar32 + 0x97c))) { + if ((uVar17 == 0xe2) || (uVar17 == 0xed)) goto LAB_006dfd7c; + goto LAB_006dfd8c; + } + *(undefined2 *)(iVar10 + 0x5c86) = 0; + } + goto LAB_006dfe86; + } + if (0x31 < *(byte *)(iVar32 + 0x97c)) goto LAB_006dfd8c; + *(undefined2 *)(iVar10 + 0x5c86) = 0; +LAB_006dfeb6: + if ((((&DAT_010262d0)[(uint)*(ushort *)(local_4ec + 6) * 4] & 0x200000) != 0) || + (((&DAT_010262d0)[(uint)*(ushort *)(local_4ec + 6) * 4] & 0x400000) != 0)) + goto LAB_006dfed0; + } + if ((99 < *(short *)(iVar10 + 0x5c86)) && + (((((uVar17 == 2 || (uVar17 == 0x17)) || (uVar17 == 0x3c)) || + ((uVar17 == 0x46 || (uVar17 == 0x6d)))) || + ((uVar17 == 0x47 || + ((uVar17 == 199 || + (((&DAT_010262d0)[(uint)*(ushort *)(local_4ec + 6) * 4] & 0x200000) != 0)))))) + )) { + *(undefined2 *)(iVar10 + 0x5c86) = 0; + } + if (uVar17 == 0x80) { + if ((*(short *)(local_4ec + 10) == 0x12) || (*(short *)(local_4ec + 10) == 0x36)) + { + local_4ec = local_4ec + -14000; + *(short *)(iVar10 + 0x8960) = *(short *)(iVar10 + 0x8960) + -1; + } + if (99 < *(short *)(local_4ec + 10)) { + *(undefined2 *)(iVar10 + 0x5c86) = 0; + } + } + if (*(short *)(iVar10 + 0x5c86) < 100) { + FUN_007743f8((int)*(short *)(iVar10 + 0x8960),(int)*(short *)(iVar10 + 0x8962),1,0 + ,0,0); + sVar40 = *(short *)(iVar10 + 0x8962); + sVar31 = *(short *)(iVar10 + 0x8960); + uVar11 = 1; +LAB_006dffde: + FUN_00647acc(0,(int)sVar31,(int)sVar40,uVar11,0); + } + else { + *(undefined2 *)(iVar10 + 0x5c86) = 0; + if ((uVar17 != 0x15) || (DAT_00fe1ec4 != 1)) { + iVar13 = FUN_00761b80((int)*(short *)(iVar10 + 0x8960), + (int)*(short *)(iVar10 + 0x8962)); + if (iVar13 != 0) { + FUN_006d0e58(iVar10,uVar17); + } + sVar31 = *(short *)(iVar10 + 0x8960); + sVar40 = *(short *)(iVar10 + 0x8962); + uVar11 = 0; + goto LAB_006dffde; + } + FUN_007743f8((int)*(short *)(iVar10 + 0x8960),(int)*(short *)(iVar10 + 0x8962),1,0 + ,0,0); + FUN_006491cc((int)*(short *)(iVar10 + 0x8960),(int)*(short *)(iVar10 + 0x8962)); + } + fVar45 = (float)VectorSignedToFloat((uint)*(byte *)(iVar32 + 0x979), + (byte)(in_fpscr >> 0x16) & 3); + fVar45 = fVar45 * *(float *)(iVar10 + 0x5d58); + uVar24 = (ushort)(0.0 < fVar45) * (short)(int)fVar45 & 0xff; + goto LAB_006e000c; + } + } + else { + uVar24 = (ushort)*(byte *)(iVar32 + 0x97d); + if (uVar24 != 0) { + if (uVar17 == 0x50) { + sVar31 = uVar24 * 4; + } + else { + sVar31 = uVar24 * 2; + } + sVar31 = *(short *)(iVar10 + 0x5c86) + sVar31; + *(short *)(iVar10 + 0x5c86) = sVar31; + if (sVar31 < 100) { + FUN_007743f8((int)*(short *)(iVar10 + 0x8960),(int)*(short *)(iVar10 + 0x8962),1,0 + ,0,0); + FUN_00647acc(0,(int)*(short *)(iVar10 + 0x8960),(int)*(short *)(iVar10 + 0x8962),1 + ,0); + } + else { + *(undefined2 *)(iVar10 + 0x5c86) = 0; + if (uVar17 == 5) { + iVar13 = FUN_0058ef48(); + *(int *)(iVar13 + 0x3478) = *(int *)(iVar13 + 0x3478) + 1; + DAT_0102a774 = 0; + } + iVar13 = FUN_0058ef48(); + *(int *)(iVar13 + 0x3480) = *(int *)(iVar13 + 0x3480) + 1; + FUN_00761b80((int)*(short *)(iVar10 + 0x8960),(int)*(short *)(iVar10 + 0x8962)); + FUN_00647acc(0,(int)*(short *)(iVar10 + 0x8960),(int)*(short *)(iVar10 + 0x8962),0 + ,0); + if (uVar17 == 5) { + iVar13 = FUN_0058ef48(); + FUN_00727760(*(undefined4 *)(iVar13 + 0x3470),DAT_0102a774); + } + } + uVar24 = (ushort)*(byte *)(iVar32 + 0x979); + goto LAB_006e000c; + } + } + } + else { + bVar42 = false; + if (*(byte *)(iVar32 + 0x97e) == 0) goto LAB_006e0010; + *(ushort *)(iVar10 + 0x5c86) = + *(short *)(iVar10 + 0x5c86) + (ushort)*(byte *)(iVar32 + 0x97e); + if ((uVar17 == 0x1a) && ((*(byte *)(iVar32 + 0x97e) < 0x50 || (DAT_010338d3 == '\0')))) + { + *(undefined2 *)(iVar10 + 0x5c86) = 0; + FUN_0063302c(0xffffffff,0,0,0xffffffff,0); + FUN_006d6464(iVar10,(int)*(short *)(iVar10 + 0x5d02) >> 1, + -(int)*(char *)(iVar10 + 0x5cc8),0,0); + } + bVar43 = *(short *)(iVar10 + 0x5c86) < 100; + if (bVar43) { + FUN_007743f8((int)*(short *)(iVar10 + 0x8960),(int)*(short *)(iVar10 + 0x8962),1,0,0,0 + ); + } + else { + *(undefined2 *)(iVar10 + 0x5c86) = 0; + FUN_00761b80((int)*(short *)(iVar10 + 0x8960),(int)*(short *)(iVar10 + 0x8962)); + } + FUN_00647acc(0,(int)*(short *)(iVar10 + 0x8960),(int)*(short *)(iVar10 + 0x8962),bVar43, + 0); + uVar24 = (ushort)*(byte *)(iVar32 + 0x979); +LAB_006e000c: + *(ushort *)(iVar10 + 0x158) = uVar24; + } +LAB_006e0010: + if ((((*(char *)(iVar32 + 0x97e) == '\0') || (*(char *)(iVar10 + 0x5cc3) == '\0')) || + (iVar13 = FUN_00655f98(local_4ec), iVar13 == 0)) || (*(short *)(local_4ec + 6) == 10)) + goto LAB_006e0176; + bVar42 = false; + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + if ((*(short *)(local_4ec + -8) == 10) && ((*(byte *)(local_4ec + -0xd) & 1) != 0)) { + bVar43 = true; + } + else { + bVar43 = false; + } + if (!bVar43) { + if ((*(short *)(local_4ec + 0x14) == 10) && ((*(byte *)(local_4ec + 0xf) & 1) != 0)) { + bVar43 = true; + } + else { + bVar43 = false; + } + if (!bVar43) { + *(undefined2 *)(iVar10 + 0x5c86) = 0; + uVar17 = (uint)*(byte *)(local_4ec + 1); + if (((uVar17 & 0x1f) >> 3 == 0) && ((*(byte *)(local_4ec + 1) & 4) == 0)) { + bVar43 = false; + } + else { + bVar43 = true; + } + if ((bVar43) && (((&DAT_010262d0)[(uint)*(ushort *)(local_4ec + 6) * 4] & 2) == 0)) { + uVar27 = 1; + uVar39 = 2; + iVar13 = FUN_00609028(local_4ec + 14000); + if ((iVar13 != 0) && (iVar13 = FUN_00609028(local_4ec + -14000), iVar13 == 0)) { + uVar27 = 2; + uVar39 = 1; + } + if (((uVar17 & 0x1f) >> 3 != 0) && + (bVar43 = (uVar17 & 0x1f) >> 3 == uVar27, uVar27 = 0, bVar43)) { + uVar27 = uVar39; + } + iVar13 = FUN_00777238((int)*(short *)(iVar10 + 0x8960), + (int)*(short *)(iVar10 + 0x8962),uVar27); + if (iVar13 != 0) { + sVar31 = *(short *)(iVar10 + 0x8962); + sVar40 = *(short *)(iVar10 + 0x8960); + uVar11 = 0xe; +LAB_006e0138: + FUN_00647acc(uVar11,(int)sVar40,(int)sVar31,uVar27,0); + } + } + else { + iVar13 = FUN_00777168((int)*(short *)(iVar10 + 0x8960), + (int)*(short *)(iVar10 + 0x8962)); + if (iVar13 != 0) { + sVar31 = *(short *)(iVar10 + 0x8962); + sVar40 = *(short *)(iVar10 + 0x8960); + uVar27 = 1; + uVar11 = 7; + goto LAB_006e0138; + } + } +LAB_006e0176: + *(undefined1 *)(iVar10 + 0x5cc3) = 0; + goto LAB_006e0184; + } + } + FUN_007743f8((int)*(short *)(iVar10 + 0x8960),(int)*(short *)(iVar10 + 0x8962),1,1,0,0); + FUN_007a8384(0,(int)*(short *)(iVar10 + 0x8960) << 4,(int)*(short *)(iVar10 + 0x8962) << 4 + ,1); + } + } +LAB_006e0184: + if (*(char *)(iVar10 + 0x5cc0) != '\0') { + *(undefined1 *)(iVar10 + 0x5cc3) = 1; + } + local_504 = (int)*(short *)(iVar10 + 0x8960); + iVar13 = (int)*(short *)(iVar10 + 0x8962); + if ((*(char *)((DAT_00902934 * local_504 + iVar13) * 0xe + DAT_00902928 + 8) == '\0') || + (iVar14 = FUN_007524a4(local_504,iVar13), iVar14 == 0)) { + bVar43 = true; + } + else { + bVar43 = false; + } + if ((bVar43) && + ((*(byte *)((DAT_00902934 * local_504 + iVar13) * 0xe + DAT_00902928 + 1) & 1) == 0)) { + iVar35 = -1; + local_4ec = -1; + iVar16 = FUN_0058ef48(); + iVar25 = FUN_00592fc8(); + iVar14 = iVar35; + if ((*(int *)(iVar25 + 0x10c) + (uint)*(ushort *)(iVar16 + 0x27fc) & 0xf) < 8) { + iVar14 = 0; + local_4ec = 0; + } + iVar16 = FUN_0058ef48(); + iVar25 = FUN_00592fc8(); + if ((*(int *)(iVar25 + 0x110) + (uint)*(ushort *)(iVar16 + 0x27fe) & 0xf) < 8) { + iVar35 = 0; + } + iVar14 = iVar14 + *(short *)(iVar10 + 0x8960); + if (iVar14 <= iVar14 + 1) { + do { + iVar16 = *(short *)(iVar10 + 0x8962) + iVar35; + if (iVar16 <= iVar16 + 1) { + do { + iVar13 = iVar16; + local_504 = iVar14; + if ((*(char *)((DAT_00902934 * iVar14 + iVar13) * 0xe + DAT_00902928 + 8) != '\0') + && (iVar16 = FUN_007524a4(iVar14,iVar13), iVar16 != 0)) goto LAB_006e02ca; + iVar16 = iVar13 + 1; + } while (iVar13 + 1 <= *(short *)(iVar10 + 0x8962) + iVar35 + 1); + } + iVar14 = iVar14 + 1; + } while (iVar14 <= *(short *)(iVar10 + 0x8960) + local_4ec + 1); + } + } +LAB_006e02ca: + iVar14 = (DAT_00902934 * local_504 + iVar13) * 0xe + DAT_00902928; + if (((bVar42) && (*(char *)(iVar14 + 8) != '\0')) && + (((((*(byte *)(iVar14 + 1) & 1) == 0 || + ((local_504 != *(short *)(iVar10 + 0x8960) || (iVar13 != *(short *)(iVar10 + 0x8962))))) + || ((*(char *)(iVar10 + 0x5cc3) == '\0' && (iVar14 = FUN_00613758(), iVar14 == 0)))) && + ((((*(short *)(iVar10 + 0x160) == 0 && (0 < *(short *)(iVar10 + 0x154))) && + (*(char *)(iVar10 + 0x5cba) != '\0')) && + ((*(char *)(iVar32 + 0x97e) != '\0' && + (iVar14 = FUN_007524a4(local_504,iVar13), iVar14 != 0)))))))) { + if ((*(short *)(iVar10 + 0x5c88) != local_504) || (*(short *)(iVar10 + 0x5c8a) != iVar13)) { + *(undefined2 *)(iVar10 + 0x5c86) = 0; + *(short *)(iVar10 + 0x5c88) = (short)local_504; + *(short *)(iVar10 + 0x5c8a) = (short)iVar13; + } + sVar31 = *(short *)(iVar10 + 0x5c86) + + (ushort)*(byte *)(iVar32 + 0x97e) + (ushort)(*(byte *)(iVar32 + 0x97e) >> 1); + *(short *)(iVar10 + 0x5c86) = sVar31; + if (sVar31 < 100) { + FUN_00772a70(local_504,iVar13,1); + } + else { + *(undefined2 *)(iVar10 + 0x5c86) = 0; + FUN_00772a70(local_504,iVar13,0); + } + FUN_00647acc(2,local_504,iVar13,sVar31 < 100,0); + *(ushort *)(iVar10 + 0x158) = (ushort)(*(byte *)(iVar32 + 0x979) >> 1); + } + } + iVar13 = *(int *)(iVar32 + 0x94c); + if (iVar13 == 0x52e) { + if (((DAT_0103399c == *(byte *)(iVar10 + 0x5cc9)) && (0 < *(short *)(iVar10 + 0x154))) && + (*(short *)(iVar10 + 0x158) == 0)) { + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + local_1c4 = 0; + local_1c0 = 0; + iVar13 = FUN_0058ef48(); + iVar14 = FUN_00592fc8(); + local_1c4 = *(int *)(iVar14 + 0x10c) + (int)*(short *)(iVar13 + 0x27fc); + iVar13 = FUN_0058ef48(); + iVar14 = FUN_00592fc8(); + local_1c0 = (int)*(short *)(iVar13 + 0x27fe) + *(int *)(iVar14 + 0x110) + -0x2a; + local_1c4 = local_1c4 + -10; + if (((0x32 < local_1c4) && (local_1c4 < DAT_00902ea0 * 0x10 + -0x32)) && + ((0x32 < local_1c0 && (local_1c0 < DAT_00902ea4 * 0x10 + -0x32)))) { + if (((DAT_00fe1f8d != '\0') || (local_1c0 >> 4 <= DAT_00902ebc)) || + (*(char *)((DAT_00902934 * (local_1c4 >> 4) + (local_1c0 >> 4)) * 0xe + DAT_00902928 + + 8) != 'W')) { + local_4ac = VectorSignedToFloat(local_1c4,(byte)(in_fpscr >> 0x16) & 3); + local_4a8 = VectorSignedToFloat(local_1c0,(byte)(in_fpscr >> 0x16) & 3); + iVar13 = FUN_00609b38(&local_4ac,0x14,0x2a); + if (iVar13 == 0) { + local_46c = VectorSignedToFloat(local_1c4,(byte)(in_fpscr >> 0x16) & 3); + local_468 = VectorSignedToFloat(local_1c0,(byte)(in_fpscr >> 0x16) & 3); + FUN_006eecc4(iVar10,&local_46c,1); + FUN_006476a0(*(undefined1 *)(iVar10 + 0x5cc9),1,local_1c4,local_1c0); + if (*(char *)(iVar10 + 0x5d39) != '\0') { + lVar2 = (longlong)(int)*(short *)(iVar10 + 0x5d00) * (longlong)DAT_006e0c08; + sVar31 = *(short *)(iVar10 + 0x5d02) - + ((short)(int)(lVar2 >> 0x21) - (short)(lVar2 >> 0x3f)); + *(short *)(iVar10 + 0x5d02) = sVar31; + if (sVar31 < 1) { + iVar13 = FUN_00608330(&DAT_00fd67f4,2); + iVar13 = iVar13 + 8; + if ((iVar13 == 9) && (*(char *)(iVar10 + 0xdb) == '\0')) { + iVar13 = 10; + } + FUN_0063302c(0xffffffff,0,0,(int)(short)iVar13,0); + FUN_006d3458(0x3f800000,iVar10,0,0); + } + *(undefined2 *)(iVar10 + 0x5d10) = 0; + *(undefined2 *)(iVar10 + 0x5d12) = 0; + } + FUN_006c48cc(iVar10,0x58,0x1e0,1); + } + } + } + } + } + else if (iVar13 == 0x1d) { + if (((*(short *)(iVar10 + 0x158) == 0) && (0 < *(short *)(iVar10 + 0x154))) && + ((int)*(short *)(iVar10 + 0x5d00) < *(short *)(iVar10 + 0x5d04) + -100)) { + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + *(short *)(iVar10 + 0x5d00) = *(short *)(iVar10 + 0x5d00) + 0x14; + *(short *)(iVar10 + 0x5d02) = *(short *)(iVar10 + 0x5d02) + 0x14; + FUN_006c0368(iVar10,0x14,0); +LAB_006e06f4: + iVar13 = FUN_006be6fc(iVar10); + if (iVar13 != 0) { + uVar11 = FUN_0058ef48(); + FUN_00738154(uVar11,7); + } + } + } + else if (iVar13 == 0x50b) { + if (((*(short *)(iVar10 + 0x158) == 0) && (0 < *(short *)(iVar10 + 0x154))) && + ((399 < *(short *)(iVar10 + 0x5d00) && (*(short *)(iVar10 + 0x5d00) < 500)))) { + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + *(short *)(iVar10 + 0x5d00) = *(short *)(iVar10 + 0x5d00) + 5; + *(short *)(iVar10 + 0x5d02) = *(short *)(iVar10 + 0x5d02) + 5; + FUN_006c0368(iVar10,5,0); + goto LAB_006e06f4; + } + } + else if (iVar13 == 0x6d) { + if (((*(short *)(iVar10 + 0x158) == 0) && (0 < *(short *)(iVar10 + 0x154))) && + (*(short *)(iVar10 + 0x5d08) < *(short *)(iVar10 + 0x5d0c))) { + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + *(short *)(iVar10 + 0x5d08) = *(short *)(iVar10 + 0x5d08) + 0x14; + *(short *)(iVar10 + 0x5d06) = *(short *)(iVar10 + 0x5d06) + 0x14; + FUN_006c032c(iVar10,0x14); + goto LAB_006e06f4; + } + } + else if (iVar13 == 0x6ee) { + if ((*(short *)(iVar10 + 0x158) == 0) && (0 < *(short *)(iVar10 + 0x154))) { + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + FUN_006bfb48(iVar10); + } + } + else if (iVar13 == 0x10b) { + if ((*(short *)(iVar10 + 0x158) == 0) && (0 < *(short *)(iVar10 + 0x154))) { + FUN_00612a6c(iVar37); + if (DAT_00fe1ec4 == 1) { + FUN_0064937c(*(undefined1 *)(iVar10 + 0x5cc9),0x71); + } + else { + FUN_006b77dc(iVar10 + 0x110); + } + iVar13 = FUN_0058ef48(); + FUN_0064998c(*(undefined1 *)(iVar13 + 0x20),uVar23,0); + } + } + else { + FUN_006d74f0(iVar10); + } + } + if (((((-1 < *(short *)(iVar32 + 0x992)) && (iVar13 = *(int *)(iVar32 + 0x94c), 0 < iVar13)) && + (*(char *)(iVar32 + 0x966) == '\0')) || (iVar13 = *(int *)(iVar32 + 0x94c), iVar13 == 0x5aa)) + && (iVar14 = (int)*(short *)(iVar10 + 0x154), 0 < iVar14)) { + local_4c8 = *(int *)(iVar10 + 0x170); + cVar21 = *(char *)(iVar10 + 0x5cc8); + bVar42 = false; + fVar45 = (float)VectorSignedToFloat((int)*(short *)(iVar10 + 0x16a),(byte)(in_fpscr >> 0x16) & 3 + ); + local_4c0 = (int)(fVar45 * *(float *)(iVar32 + 0x9b8)); + local_4cc = *(int *)(iVar10 + 0x16c); + fVar45 = (float)VectorSignedToFloat((int)*(short *)(iVar10 + 0x168),(byte)(in_fpscr >> 0x16) & 3 + ); + local_4c4 = (int)(fVar45 * *(float *)(iVar32 + 0x9b8)); + if (cVar21 < '\0') { + local_4cc = local_4cc - local_4c4; + } + iVar16 = (int)*(char *)(iVar10 + 0x5d1d); + if (0 < iVar16) { + local_4c8 = local_4c8 - local_4c0; + } + if (*(char *)(iVar32 + 0x977) == '\x01') { + iVar25 = (int)((ulonglong)((longlong)(int)*(short *)(iVar10 + 0x156) * (longlong)DAT_006e0c04) + >> 0x20); + if (iVar14 < iVar25 - (iVar25 >> 0x1f)) { + if (cVar21 < '\0') { + fVar45 = (float)VectorSignedToFloat(local_4c4,(byte)(in_fpscr >> 0x16) & 3); + local_4cc = local_4cc + (int)(fVar45 - fVar45 * fVar59); + } + fVar45 = (float)VectorSignedToFloat(local_4c4,(byte)(in_fpscr >> 0x16) & 3); + fVar53 = (float)VectorSignedToFloat(local_4c0,(byte)(in_fpscr >> 0x16) & 3); + local_4c4 = (int)(fVar45 * fVar59); + local_4c8 = (local_4c0 >> 1) * iVar16 + local_4c8; + local_4c0 = (int)(fVar53 * fVar52); + } + else { + iVar25 = (int)((ulonglong) + ((longlong)((int)*(short *)(iVar10 + 0x156) << 1) * (longlong)DAT_006e0c04) + >> 0x20); + if (iVar25 - (iVar25 >> 0x1f) <= iVar14) { + if ('\0' < cVar21) { + fVar45 = (float)VectorSignedToFloat(local_4c4,(byte)(in_fpscr >> 0x16) & 3); + local_4cc = local_4cc - (int)(fVar45 * fVar51); + } + fVar53 = (float)VectorSignedToFloat(iVar16,(byte)(in_fpscr >> 0x16) & 3); + fVar45 = (float)VectorSignedToFloat(local_4c0,(byte)(in_fpscr >> 0x16) & 3); + local_4c4 = local_4c4 << 1; + local_4c8 = local_4c8 - (int)((fVar45 * fVar59 - fVar45) * fVar53); + local_4c0 = (int)(fVar45 * fVar59); + } + } + } + else if (*(char *)(iVar32 + 0x977) == '\x03') { + iVar16 = (int)((ulonglong) + ((longlong)((int)*(short *)(iVar10 + 0x156) << 1) * (longlong)DAT_006e0c04) >> + 0x20); + if (iVar16 - (iVar16 >> 0x1f) < iVar14) { + bVar42 = true; + } + else { + if (cVar21 < '\0') { + dVar50 = (double)VectorSignedToFloat(local_4c4,(byte)(in_fpscr >> 0x16) & 3); + local_4cc = local_4cc + (int)(longlong)(dVar50 - dVar50 * DAT_006e0bfc); + } + dVar50 = (double)VectorSignedToFloat(local_4c4,(byte)(in_fpscr >> 0x16) & 3); + dVar54 = (double)VectorSignedToFloat(local_4c0,(byte)(in_fpscr >> 0x16) & 3); + in_d0 = dVar54 * DAT_006e0bec; + in_d1 = dVar54 * DAT_006e0bf4; + local_4c4 = (int)(longlong)(dVar50 * DAT_006e0bfc); + local_4c8 = local_4c8 - (int)(longlong)in_d0; + local_4c0 = (int)(longlong)in_d1; + } + } + iVar35 = local_4c0; + iVar25 = local_4c4; + iVar16 = local_4c8; + iVar14 = local_4cc; + if ((iVar13 == 0x5aa) && (iVar13 = FUN_00608330(&DAT_00fd67f4,3), iVar13 == 0)) { + iVar13 = FUN_00608330(&DAT_00fd67f4,iVar25); + uVar11 = VectorSignedToFloat(iVar13 + iVar14,(byte)(in_fpscr >> 0x16) & 3); + iVar13 = FUN_00608330(&DAT_00fd67f4,iVar35); + uVar12 = VectorSignedToFloat(iVar13 + iVar16,(byte)(in_fpscr >> 0x16) & 3); + iVar13 = FUN_00608330(&DAT_00fd67f4,500); + if (iVar13 == 0) { + FUN_005c4e6c(&DAT_00fd67f4,0x33,0x65); + ppuVar22 = &local_494; + puVar18 = &local_45c; + uVar19 = 0x19f; + local_494 = puVar5; + local_490 = puVar5; + local_45c = uVar11; + local_458 = uVar12; + } + else { + iVar13 = FUN_00608330(&DAT_00fd67f4,0xfa); + if (iVar13 == 0) { + FUN_005c4e6c(&DAT_00fd67f4,0x33,0x65); + ppuVar22 = &local_484; + puVar18 = &local_44c; + uVar19 = 0x19e; + local_484 = puVar5; + local_480 = puVar5; + local_44c = uVar11; + local_448 = uVar12; + } + else { + iVar13 = FUN_00608330(&DAT_00fd67f4,0x50); + if (iVar13 == 0) { + FUN_005c4e6c(&DAT_00fd67f4,0x33,0x65); + ppuVar22 = &local_474; + puVar18 = &local_43c; + uVar19 = 0x19d; + local_474 = puVar5; + local_470 = puVar5; + local_43c = uVar11; + local_438 = uVar12; + } + else { + iVar13 = FUN_00608330(&DAT_00fd67f4,10); + if (iVar13 == 0) { + FUN_005c4e6c(&DAT_00fd67f4,0x33,0x65); + ppuVar22 = &local_464; + puVar18 = &local_444; + uVar19 = 0x19c; + local_464 = puVar5; + local_460 = puVar5; + local_444 = uVar11; + local_440 = uVar12; + } + else { + iVar13 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar13 != 0) goto LAB_006e0ba2; + FUN_005c4e6c(&DAT_00fd67f4,0x33,0x65); + ppuVar22 = &local_454; + puVar18 = &local_4a4; + uVar19 = 0x19b; + local_454 = puVar5; + local_450 = puVar5; + local_4a4 = uVar11; + local_4a0 = uVar12; + } + } + } + } + fVar45 = (float)VectorSignedToFloat(SUB84(in_d0,0),(byte)(in_fpscr >> 0x16) & 3); + in_d0 = (double)(fVar45 * fVar44); + iVar13 = FUN_00611b34(SUB84(in_d0,0),puVar18,ppuVar22,uVar19); + if (-1 < iVar13) { + iVar38 = DAT_00fd68c0 + iVar13 * 0x28; + fVar44 = (float)VectorSignedToFloat((int)*(char *)(iVar10 + 0x5cc8) << 1, + (byte)(in_fpscr >> 0x16) & 3); + *(float *)(iVar38 + 8) = *(float *)(iVar38 + 8) + fVar44; + iVar13 = DAT_00fd68c0 + iVar13 * 0x28; + *(float *)(iVar13 + 0xc) = *(float *)(iVar13 + 0xc) * (float)puVar60; + } + } +LAB_006e0ba2: + fVar44 = DAT_006e0be8; + if (!bVar42) { + iVar13 = *(int *)(iVar32 + 0x94c); + puVar61 = (undefined1 *)0x3f000000; + uVar11 = (undefined4)((ulonglong)in_d0 >> 0x20); + if (iVar13 == 0x3dd) { + iVar13 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar13 == 0) { + iVar13 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar13 == 0) { + uVar12 = 0xf; + } + else if (iVar13 == 1) { + uVar12 = 0x39; + } + else { + uVar12 = 0x3a; + } + local_270 = 0; + uVar19 = VectorSignedToFloat((int)*(char *)(iVar10 + 0x5cc8) << 1, + (byte)(in_fpscr >> 0x16) & 3); + iVar13 = FUN_0060d7ac(uVar19,uVar11,puVar6,&DAT_01073158,iVar14,iVar16,iVar25,iVar35, + uVar12,0x96,0); + *(float *)(iVar13 + 0x24) = *(float *)(iVar13 + 0x24) * fVar44; + *(float *)(iVar13 + 0x28) = *(float *)(iVar13 + 0x28) * fVar44; + } + } + else if (((iVar13 == 0x2c) || (iVar13 == 0x2d)) || + ((iVar13 == 0x2e || ((iVar13 == 0x67 || (iVar13 == 0x68)))))) { + iVar13 = FUN_00608330(&DAT_00fd67f4,0x12); + if (iVar13 == 0) { + local_384 = 0; + uVar12 = VectorSignedToFloat((int)*(char *)(iVar10 + 0x5cc8) << 1, + (byte)(in_fpscr >> 0x16) & 3); + FUN_0060d7ac(uVar12,uVar11,puVar6,&DAT_01073158,iVar14,iVar16,iVar25,iVar35,0xe,0x96,0); + } + } + else if ((iVar13 == 0x111) || (iVar13 == 0x2a3)) { + iVar13 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar13 == 0) { + local_394 = 0; + uVar12 = VectorSignedToFloat((int)*(char *)(iVar10 + 0x5cc8) << 1, + (byte)(in_fpscr >> 0x16) & 3); + FUN_0060d7ac(uVar12,uVar11,fVar59,&DAT_01073158,iVar14,iVar16,iVar25,iVar35,0xe,0x96,0); + } + local_38c = 0; + fVar59 = (float)VectorSignedToFloat(*(char *)(iVar10 + 0x5cc8) * 3, + (byte)(in_fpscr >> 0x16) & 3); + iVar13 = FUN_0060d7ac(fVar59 + *(float *)(iVar10 + 0x120) * fVar44,uVar11,fVar51, + &DAT_01073158,iVar14,iVar16,iVar25,iVar35,0x1b,100,0); + *(undefined1 *)(iVar13 + 1) = 1; + *(float *)(iVar13 + 0x24) = *(float *)(iVar13 + 0x24) * 0.5; + *(float *)(iVar13 + 0x28) = *(float *)(iVar13 + 0x28) * 0.5; + } + else if (iVar13 == 0x2d3) { + iVar13 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar13 == 0) { + local_360 = 0; + iVar13 = FUN_0060d7ac(puVar5,uVar11,fVar51,&DAT_01073158,iVar14,iVar16,iVar25,iVar35,0x40, + 0x96,0); + *(undefined1 *)(iVar13 + 1) = 1; + } + } + else if ((iVar13 == 0x41) || (iVar13 == 0x2a2)) { + iVar13 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar13 == 0) { + local_39c = 0; + FUN_0060d7ac(puVar5,uVar11,fVar51,&DAT_01073158,iVar14,iVar16,iVar25,iVar35,0x3a,0x96,0); + } + iVar13 = FUN_00608330(&DAT_00fd67f4,0xc); + if (iVar13 == 0) { + uVar11 = FUN_005c4e6c(&DAT_00fd67f4,0x10,0x12); + local_498 = VectorSignedToFloat(iVar16,(byte)(in_fpscr >> 0x16) & 3); + local_49c = VectorSignedToFloat(iVar14,(byte)(in_fpscr >> 0x16) & 3); + local_48c = puVar5; + local_488 = puVar5; + FUN_00611b34(0,&local_49c,&local_48c,uVar11); + } + } + else if ((iVar13 == 0xbe) || (iVar13 == 0xd5)) { + local_3a8 = 0; + uVar19 = 0; + cVar21 = *(char *)(iVar10 + 0x5cc8); + uVar12 = 0x28; +LAB_006e1312: + in_d0 = (double)CONCAT44(uVar11,cVar21 * 3); + fVar51 = (float)VectorSignedToFloat(cVar21 * 3,(byte)(in_fpscr >> 0x16) & 3); + iVar13 = FUN_0060d7ac(fVar51 + *(float *)(iVar10 + 0x120) * DAT_006e0be8,&DAT_01073158, + iVar14,iVar16,iVar25,iVar35,uVar12,uVar19,0); + *(undefined1 *)(iVar13 + 1) = 1; + } + else if (iVar13 == 0x79) { + local_2e0 = 0; + fVar51 = (float)VectorSignedToFloat(*(char *)(iVar10 + 0x5cc8) * 3, + (byte)(in_fpscr >> 0x16) & 3); + iVar13 = FUN_0060d7ac(fVar51 + *(float *)(iVar10 + 0x120) * DAT_006e0be8,uVar11,0x40200000, + &DAT_01073158,iVar14,iVar16,iVar25,iVar35,6,100,0); + *(undefined1 *)(iVar13 + 1) = 1; + *(float *)(iVar13 + 0x24) = *(float *)(iVar13 + 0x24) * 2.0; + *(float *)(iVar13 + 0x28) = *(float *)(iVar13 + 0x28) * 2.0; + } + else { + if ((iVar13 == 0x7a) || (iVar13 == 0xd9)) { + local_3b0 = 0; + uVar19 = 100; + cVar21 = *(char *)(iVar10 + 0x5cc8); + uVar12 = 6; + goto LAB_006e1312; + } + if (iVar13 == 0x9b) { + local_350 = 0; + fVar51 = (float)VectorSignedToFloat(*(char *)(iVar10 + 0x5cc8) * 3, + (byte)(in_fpscr >> 0x16) & 3); + iVar13 = FUN_0060d7ac(fVar51 + *(float *)(iVar10 + 0x120) * DAT_006e0be8,uVar11,0x40000000 + ,&DAT_01073158,iVar14,iVar16,iVar25,iVar35,0x1d,100,0); + *(undefined1 *)(iVar13 + 1) = 1; + *(float *)(iVar13 + 0x24) = *(float *)(iVar13 + 0x24) * (float)puVar58; + *(float *)(iVar13 + 0x28) = *(float *)(iVar13 + 0x28) * (float)puVar58; + } + else if ((iVar13 == 0x2a4) || (iVar13 == 0x2a1)) { + iVar13 = FUN_00608330(&DAT_00fd67f4,4); + if (iVar13 == 0) { + local_3b4 = 0; + fVar51 = (float)VectorSignedToFloat(*(char *)(iVar10 + 0x5cc8) * 3, + (byte)(in_fpscr >> 0x16) & 3); + iVar13 = FUN_0060d7ac(fVar51 + *(float *)(iVar10 + 0x120) * fVar44,uVar11,0x3fc00000, + &DAT_01073158,iVar14,iVar16,iVar25,iVar35,0x43,0x5a,0); + *(undefined1 *)(iVar13 + 1) = 1; + *(float *)(iVar13 + 0x24) = *(float *)(iVar13 + 0x24) * fVar44; + *(float *)(iVar13 + 0x28) = *(float *)(iVar13 + 0x28) * fVar44; + } + } + else if (iVar13 == 0x2d4) { + iVar13 = FUN_00608330(&DAT_00fd67f4,6); + if (iVar13 == 0) { + local_2a0 = 0; + fVar51 = (float)VectorSignedToFloat(*(char *)(iVar10 + 0x5cc8) * 3, + (byte)(in_fpscr >> 0x16) & 3); + iVar13 = FUN_0060d7ac(fVar51 + *(float *)(iVar10 + 0x120) * fVar44,uVar11,0x3fc00000, + &DAT_01073158,iVar14,iVar16,iVar25,iVar35,0x43,0x5a,0); + *(undefined1 *)(iVar13 + 1) = 1; + *(float *)(iVar13 + 0x24) = *(float *)(iVar13 + 0x24) * fVar44; + *(float *)(iVar13 + 0x28) = *(float *)(iVar13 + 0x28) * fVar44; + } + } + else if ((iVar13 < 0x31b) || (0x322 < iVar13)) { + if ((iVar13 == 0x16f) || (iVar13 == 0x170)) { + iVar13 = FUN_00608330(&DAT_00fd67f4,4); + if (iVar13 == 0) { + local_330 = 0; + fVar51 = (float)VectorSignedToFloat(*(char *)(iVar10 + 0x5cc8) * 3, + (byte)(in_fpscr >> 0x16) & 3); + iVar13 = FUN_0060d7ac(fVar51 + *(float *)(iVar10 + 0x120) * fVar44,uVar11,fVar52, + &DAT_01073158,iVar14,iVar16,iVar25,iVar35,0x39,100,0); + *(undefined1 *)(iVar13 + 1) = 1; + fVar59 = *(float *)(iVar13 + 0x24) * 0.5; + *(float *)(iVar13 + 0x24) = fVar59; + fVar51 = (float)VectorSignedToFloat((int)*(char *)(iVar10 + 0x5cc8) << 1, + (byte)(in_fpscr >> 0x16) & 3); + *(float *)(iVar13 + 0x24) = fVar51 + fVar59; + *(float *)(iVar13 + 0x28) = *(float *)(iVar13 + 0x28) * 0.5; + } + iVar13 = FUN_00608330(&DAT_00fd67f4,5); + if (iVar13 == 0) { + local_280 = 0; + iVar13 = FUN_0060d7ac(puVar5,uVar11,puVar60,&DAT_01073158,iVar14,iVar16,iVar25,iVar35, + 0x2b,0xfe,0); + *(undefined4 *)(iVar13 + 0x24) = DAT_00900110; + *(undefined4 *)(iVar13 + 0x28) = DAT_00900114; + } + } + else if ((iVar13 < 0xc6) || (0xcb < iVar13)) { + if (iVar13 == 0x1392) { + local_2d0 = 0; + uVar12 = FUN_005c4e6c(&DAT_00fd67f4,0x3d,0x3e); + fVar51 = (float)VectorSignedToFloat(*(char *)(iVar10 + 0x5cc8) * 3, + (byte)(in_fpscr >> 0x16) & 3); + iVar13 = FUN_0060d7ac(fVar51 + *(float *)(iVar10 + 0x120) * fVar44,uVar11,0x40200000, + &DAT_01073158,iVar14,iVar16,iVar25,iVar35,6,uVar12,0); + *(undefined1 *)(iVar13 + 1) = 1; + *(float *)(iVar13 + 0x24) = *(float *)(iVar13 + 0x24) * 2.0; + *(float *)(iVar13 + 0x28) = *(float *)(iVar13 + 0x28) * 2.0; + } + } + else { + if (iVar13 == 0xc6) { + local_2bc = puVar55; + local_2b8 = 0x3e800000; + local_1d4 = puVar55; + local_2b4 = DAT_006e1350; + local_1cc = DAT_006e1350; + local_1d0 = (undefined1 *)0x3e800000; + } + else if (iVar13 == 199) { + local_2a4 = puVar55; + local_2ac = puVar61; + local_2a8 = puVar58; + local_1d4 = puVar61; + local_1d0 = puVar58; +LAB_006e106e: + local_1cc = puVar55; + } + else if (iVar13 == 200) { + local_29c = puVar55; + local_1d4 = puVar55; + local_298 = puVar61; + local_294 = puVar58; + local_1d0 = puVar61; + local_1cc = puVar58; + } + else if (iVar13 == 0xc9) { + local_288 = puVar55; + local_1d0 = puVar55; + local_28c = DAT_006e1348; + local_1d4 = DAT_006e1348; + local_284 = puVar61; + local_1cc = puVar61; + } + else { + local_1d0 = DAT_006e134c; + if (iVar13 != 0xca) { + local_26c = DAT_006e134c; + local_268 = DAT_006e134c; + local_1d4 = DAT_006e134c; + local_264 = puVar55; + goto LAB_006e106e; + } + local_278 = DAT_006e134c; + local_1cc = (undefined1 *)0x3f000000; + local_27c = DAT_006e1348; + local_1d4 = DAT_006e1348; + local_274 = puVar61; + } + fVar51 = (float)VectorSignedToFloat(*(int *)(iVar10 + 0x16c) + 6, + (byte)(in_fpscr >> 0x16) & 3); + FUN_0063ae24((int)(*(float *)(iVar10 + 0x120) + fVar51) >> 4, + *(int *)(iVar10 + 0x170) + -0xe >> 4,&local_1d4); + } + } + else { + iVar13 = FUN_00608330(&DAT_00fd67f4,4); + if (iVar13 == 0) { + local_340 = 0; + fVar51 = (float)VectorSignedToFloat(*(char *)(iVar10 + 0x5cc8) * 3, + (byte)(in_fpscr >> 0x16) & 3); + iVar13 = FUN_0060d7ac(fVar51 + *(float *)(iVar10 + 0x120) * fVar44,uVar11,0x3fc00000, + &DAT_01073158,iVar14,iVar16,iVar25,iVar35,0x73,0x8c,0); + *(undefined1 *)(iVar13 + 1) = 1; + *(float *)(iVar13 + 0x24) = *(float *)(iVar13 + 0x24) * 0.25; + *(float *)(iVar13 + 0x28) = *(float *)(iVar13 + 0x28) * 0.25; + } + } + } + if ((((*(char *)(iVar10 + 0x3c) != '\0') && (*(char *)(iVar32 + 0x96a) != '\0')) && + (*(char *)(iVar32 + 0x966) == '\0')) && + ((*(char *)(iVar32 + 0x965) == '\0' && + (iVar13 = FUN_00608330(&DAT_00fd67f4,3), iVar13 == 0)))) { + local_398 = 0; + fVar51 = (float)VectorSignedToFloat(*(char *)(iVar10 + 0x5cc8) * 3, + (byte)(in_fpscr >> 0x16) & 3); + iVar13 = FUN_0060d7ac(fVar51 + *(float *)(iVar10 + 0x120) * fVar44, + (int)((ulonglong)in_d0 >> 0x20),0x40200000,&DAT_01073158,iVar14,iVar16 + ,iVar25,iVar35,0x87,100,0); + *(undefined1 *)(iVar13 + 1) = 1; + *(float *)(iVar13 + 0x24) = *(float *)(iVar13 + 0x24) * (float)puVar7; + fVar51 = *(float *)(iVar13 + 0x28) * (float)puVar7; + *(float *)(iVar13 + 0x28) = fVar51; + *(float *)(iVar13 + 0x28) = fVar51 - 0.5; + } + if (((0 < *(int *)(iVar10 + 0x38)) && (*(char *)(iVar32 + 0x96a) != '\0')) && + ((*(char *)(iVar32 + 0x966) == '\0' && (*(char *)(iVar32 + 0x965) == '\0')))) { + FUN_006c15e4(iVar10,&local_4cc,iVar10 + 0x120); + } + if ((((*(char *)(iVar10 + 0x3e) != '\0') && (*(char *)(iVar32 + 0x96b) == '\0')) && + (*(char *)(iVar32 + 0x96c) == '\0')) && + (iVar13 = FUN_00608330(&DAT_00fd67f4,3), iVar13 != 0)) { + local_478 = VectorSignedToFloat(iVar16,(byte)(in_fpscr >> 0x16) & 3); + local_47c = VectorSignedToFloat(iVar14,(byte)(in_fpscr >> 0x16) & 3); + local_320 = 0; + fVar51 = (float)VectorSignedToFloat(*(char *)(iVar10 + 0x5cc8) * 3, + (byte)(in_fpscr >> 0x16) & 3); + iVar13 = FUN_006051dc(fVar51 + *(float *)(iVar10 + 0x120) * fVar44,&DAT_01073158,&local_47c, + iVar25,iVar35,6,100,0); + *(undefined1 *)(iVar13 + 1) = 1; + *(float *)(iVar13 + 0x24) = *(float *)(iVar13 + 0x24) * 2.0; + *(float *)(iVar13 + 0x28) = *(float *)(iVar13 + 0x28) * 2.0; + } + if ((DAT_0103399c == *(byte *)(iVar10 + 0x5cc9)) && (*(int *)(iVar32 + 0x94c) != 0x5aa)) { + fVar59 = *(float *)(iVar32 + 0x9b0); + fVar51 = (float)VectorSignedToFloat((int)*(short *)(iVar32 + 0x992), + (byte)(in_fpscr >> 0x16) & 3); + iVar13 = (int)(fVar51 * *(float *)(iVar10 + 0x5d44)); + if (*(char *)(iVar10 + 0x5d3a) != '\0') { + fVar59 = fVar59 * 2.0; + } + for (iVar38 = iVar14 >> 4; iVar26 = iVar16 >> 4, iVar38 < (iVar14 + iVar25 >> 4) + 1; + iVar38 = iVar38 + 1) { + for (; iVar26 < (iVar16 + iVar35 >> 4) + 1; iVar26 = iVar26 + 1) { + iVar41 = (iVar38 * DAT_00902934 + iVar26) * 0xe + DAT_00902928; + if (((*(byte *)(iVar41 + 1) & 1) == 0) || + (((&DAT_010262d0)[(uint)*(ushort *)(iVar41 + 6) * 4] & 8) == 0)) { + bVar42 = false; + } + else { + bVar42 = true; + } + if (bVar42) { + if ((*(short *)(iVar41 + 0x14) == 0x4e) && ((*(byte *)(iVar41 + 0xf) & 1) != 0)) { + bVar42 = true; + } + else { + bVar42 = false; + } + if (!bVar42) { + if (*(int *)(iVar32 + 0x94c) == 0x6fa) { + sVar31 = *(short *)(iVar41 + 6); + FUN_00761b80(iVar38,iVar26); + if ((*(byte *)(iVar41 + 1) & 1) == 0) { + iVar41 = 0; + if ((((sVar31 == 3) || (sVar31 == 0x18)) || (sVar31 == 0x3d)) || + ((sVar31 == 0x6e || (sVar31 == 0xc9)))) { + iVar41 = FUN_005c4e6c(&DAT_00fd67f4,1,3); + } + if (((sVar31 == 0x49) || (sVar31 == 0x4a)) || (sVar31 == 0x71)) { + iVar41 = FUN_005c4e6c(&DAT_00fd67f4,2,5); + } + if (0 < iVar41) { + uVar11 = FUN_00631590(iVar38 << 4,iVar26 << 4,0x10,0x10,0x6bf,iVar41,0,0,0); + FUN_0064998c(*(undefined1 *)(iVar10 + 0x5cc9),uVar11,0); + } + } + FUN_00647acc(0,iVar38,iVar26,0,0); + } + else { + FUN_00761b80(iVar38,iVar26); + FUN_00647acc(0,iVar38,iVar26,0,0); + } + } + } + } + } + local_4e8 = 0; + dVar50 = (double)VectorSignedToFloat(iVar13,(byte)(in_fpscr >> 0x16) & 3); + in_d0 = dVar50 * 1.5; + local_4ec = 0; + lVar2 = (longlong)in_d0; + VectorSignedToFloat(iVar16 + iVar35 / 2,(byte)(in_fpscr >> 0x16) & 3); + uVar11 = VectorSignedToFloat(iVar14 + iVar25 / 2,(byte)(in_fpscr >> 0x16) & 3); + do { + iVar38 = DAT_00fe1fa8 + local_4ec; + if (((((*(char *)(iVar38 + 0x100) != '\0') && (*(char *)(iVar38 + uVar23 + 0x16c) == '\0') + ) && (*(short *)(iVar10 + 0x5c7c) == 0)) && + ((*(char *)(iVar38 + 0x114) == '\0' && + (((*(char *)(iVar38 + 0x11a) == '\0' || + ((*(int *)(iVar38 + 0x104) == 0x16 && (*(char *)(iVar10 + 0x8dc3) != '\0')))) || + ((*(int *)(iVar38 + 0x104) == 0x36 && (*(char *)(iVar10 + 0x3d) != '\0')))))))) && + ((iVar26 = FUN_00609150(&local_4cc,iVar38 + 0x148), iVar26 != 0 && + ((*(char *)(iVar38 + 0x10b) != '\0' || + (iVar26 = FUN_0060a948(iVar10 + 0x100,iVar38 + 0x148), iVar26 != 0)))))) { + iVar26 = FUN_005c4e6c(&DAT_00fd67f4,1,0x65); + bVar42 = iVar26 <= *(short *)(iVar10 + 0x5d3e); + iVar26 = FUN_007a81dc(iVar13,0); + FUN_00666ec0(iVar38,*(undefined4 *)(iVar32 + 0x94c),iVar10); + VectorSignedToFloat((uint)(*(ushort *)(iVar38 + 0x16a) >> 1), + (byte)(in_fpscr >> 0x16) & 3); + fVar51 = (float)VectorSignedToFloat((uint)(*(ushort *)(iVar38 + 0x168) >> 1), + (byte)(in_fpscr >> 0x16) & 3); + FUN_006c93dc(fVar51 + *(float *)(iVar38 + 0x138),iVar10); + FUN_006b4dbc(fVar59,iVar38,iVar26,(int)*(char *)(iVar10 + 0x5cc8),bVar42,0); + if (*(int *)(iVar10 + *(char *)(iVar10 + 0x14c) * 0xa0 + 0x94c) == 0x722) { + FUN_006c1fb8(fVar59,iVar10,local_4e8,(int)lVar2); + } + uVar12 = (undefined4)((ulonglong)in_d0 >> 0x20); + if (*(int *)(iVar10 + 0x38) == 7) { + VectorSignedToFloat((uint)(*(ushort *)(iVar38 + 0x16a) >> 1), + (byte)(in_fpscr >> 0x16) & 3); + fVar51 = (float)VectorSignedToFloat((uint)(*(ushort *)(iVar38 + 0x168) >> 1), + (byte)(in_fpscr >> 0x16) & 3); + uVar20 = (undefined4)((ulonglong)in_d1 >> 0x20); + uVar19 = (undefined4)*(undefined8 *)(iVar38 + 0x140); + in_d1 = (double)CONCAT44(uVar20,uVar19); + FUN_006f7004(fVar51 + *(float *)(iVar38 + 0x138),uVar12,uVar19,uVar20,puVar5,in_s5, + puVar5,0x121,0,*(undefined1 *)(iVar10 + 0x5cc9)); + } + if ((*(int *)(iVar10 + *(char *)(iVar10 + 0x14c) * 0xa0 + 0x94c) == 0x463) && + (iVar41 = FUN_005c4e6c(&DAT_00fd67f4,1,4), 0 < iVar41)) { + iVar28 = (int)((ulonglong)((longlong)iVar26 * (longlong)DAT_006e2224) >> 0x20); + do { + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffdd,0x24); + VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + VectorSignedToFloat((int)*(char *)(iVar10 + 0x5cc8) << 1, + (byte)(in_fpscr >> 0x16) & 3); + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffdd,0x24); + VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + FUN_006f7004(uVar11,0xb5,iVar28 - (iVar28 >> 0x1f),uVar23); + iVar41 = iVar41 + -1; + } while (iVar41 != 0); + } + fVar51 = *(float *)(iVar38 + 0x1ec); + uVar17 = in_fpscr & 0xfffffff | (uint)(fVar51 < 0.0) << 0x1f | + (uint)(fVar51 == 0.0) << 0x1e; + in_fpscr = uVar17 | (uint)NAN(fVar51) << 0x1c; + bVar4 = (byte)(uVar17 >> 0x18); + if (((!(bool)(bVar4 >> 6 & 1) && bVar4 >> 7 == ((byte)(in_fpscr >> 0x1c) & 1)) && + (*(char *)(iVar10 + 0x48) != '\0')) && + (iVar41 = FUN_00608330(&DAT_00fd67f4,5), iVar41 == 0)) { + uVar19 = 0x47; + iVar41 = FUN_00608330(&DAT_00fd67f4,10); + if (iVar41 == 0) { + uVar19 = 0x48; + } + iVar41 = FUN_00608330(&DAT_00fd67f4,100); + if (iVar41 == 0) { + uVar19 = 0x49; + } + iVar41 = FUN_00631590((int)*(float *)(iVar38 + 0x138),(int)*(float *)(iVar38 + 0x13c), + *(undefined2 *)(iVar38 + 0x168),*(undefined2 *)(iVar38 + 0x16a), + uVar19,1,0,0,0); + uVar9 = FUN_005c4e6c(&DAT_00fd67f4,1,0xb); + *(undefined2 *)(&DAT_010731e2 + iVar41 * 0xa0) = uVar9; + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffec,1); + fVar51 = (float)VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + (&DAT_01073204)[iVar41 * 0x28] = fVar51 * fVar44; + uVar19 = FUN_005c4e6c(&DAT_00fd67f4,10,0x1f); + fVar45 = (float)VectorSignedToFloat(uVar19,(byte)(in_fpscr >> 0x16) & 3); + fVar51 = (float)VectorSignedToFloat((int)*(char *)(iVar10 + 0x5cc8), + (byte)(in_fpscr >> 0x16) & 3); + (&DAT_01073200)[iVar41 * 0x28] = fVar45 * fVar44 * fVar51; + FUN_0064998c(*(undefined1 *)(iVar10 + 0x5cc9),iVar41,0); + } + in_d0 = (double)CONCAT44(uVar12,SUB84((double)fVar59,0)); + FUN_00647074(SUB84((double)fVar59,0),local_4e8,iVar26,(int)*(char *)(iVar10 + 0x5cc8), + bVar42); + if (*(char *)(iVar38 + 0x100) == '\0') { + uVar12 = FUN_00726f40((int)*(short *)(iVar38 + 0x1f0)); + iVar26 = FUN_0058ef48(); + FUN_00727e04(*(undefined4 *)(iVar26 + 0x3470),uVar12,1); + iVar26 = FUN_0058ef48(); + FUN_00727e04(*(undefined4 *)(iVar26 + 0x3470),0x1b,1); + if (*(int *)(iVar38 + 0x104) == 1) { + iVar26 = FUN_0058ef48(); + *(int *)(iVar26 + 0x347c) = *(int *)(iVar26 + 0x347c) + 1; + } + else if (*(int *)(iVar38 + 0x104) == 0x16) { + uVar12 = FUN_0058ef48(); + FUN_00738154(uVar12,0x25); + } + } + *(char *)(iVar38 + uVar23 + 0x16c) = (char)*(undefined2 *)(iVar10 + 0x154); + lVar3 = (longlong)(int)*(short *)(iVar10 + 0x156) * (longlong)DAT_006e2224; + *(short *)(iVar10 + 0x5c7c) = (short)((ulonglong)lVar3 >> 0x20) - (short)(lVar3 >> 0x3f) + ; + } + uVar12 = (undefined4)((ulonglong)in_d1 >> 0x20); + local_4e8 = local_4e8 + 1; + local_4ec = local_4ec + 0x274; + } while (local_4ec < DAT_006e2228); + uVar11 = (undefined4)((ulonglong)in_d0 >> 0x20); + if (*(char *)(iVar10 + 0x8d79) != '\0') { + VectorSignedToFloat(iVar16 + iVar35 / 2,(byte)(in_fpscr >> 0x16) & 3); + local_4e8 = 0; + uVar19 = VectorSignedToFloat(iVar14 + iVar25 / 2,(byte)(in_fpscr >> 0x16) & 3); + do { + if ((((local_4e8 != uVar23) && (iVar38 = *local_4dc, *(char *)(iVar38 + 0x5cc5) != '\0') + ) && ((*(char *)(iVar38 + 0x8d79) != '\0' && + ((*(char *)(iVar38 + 0x141) == '\0' && (*(char *)(iVar38 + 0x5c18) == '\0'))) + ))) && + (((*(char *)((&DAT_0107034c)[uVar23] + 0x142) == '\0' || + (*(char *)((&DAT_0107034c)[uVar23] + 0x142) != *(char *)(iVar38 + 0x142))) && + ((iVar26 = FUN_00609150(&local_4cc,iVar38 + 0x100), iVar26 != 0 && + (iVar38 = FUN_0060a948(iVar10 + 0x100,iVar38 + 0x100), iVar38 != 0)))))) { + iVar38 = FUN_005c4e6c(&DAT_00fd67f4,1,0x65); + iVar26 = FUN_007a81dc(iVar13,0); + FUN_006c7c48(*local_4dc,*(undefined4 *)(iVar32 + 0x94c)); + FUN_006c93dc(*(float *)(*local_4dc + 0x110) + 10.0,iVar10); + FUN_0063302c((int)*(char *)(iVar10 + 0x5cc9),0,(int)*(short *)(iVar32 + 0x9c8), + 0xffffffff,2); + FUN_006d6464(*local_4dc,iVar26,(int)*(char *)(iVar10 + 0x5cc8),1,0); + if (*(int *)(iVar10 + 0x38) == 7) { + uVar20 = (undefined4)((ulonglong)in_d1 >> 0x20); + uVar12 = (undefined4)*(undefined8 *)(*local_4dc + 0x120); + in_d1 = (double)CONCAT44(uVar20,uVar12); + FUN_006f7004(*(float *)(*local_4dc + 0x110) + 10.0,uVar11,uVar12,uVar20,puVar5,in_s5 + ,puVar5,0x121,0,*(undefined1 *)(iVar10 + 0x5cc9)); + } + if ((*(int *)(iVar10 + *(char *)(iVar10 + 0x14c) * 0xa0 + 0x94c) == 0x463) && + (iVar41 = FUN_005c4e6c(&DAT_00fd67f4,1,4), 0 < iVar41)) { + iVar28 = (int)((ulonglong)((longlong)iVar26 * (longlong)DAT_006e2224) >> 0x20); + do { + uVar12 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffdd,0x24); + VectorSignedToFloat(uVar12,(byte)(in_fpscr >> 0x16) & 3); + VectorSignedToFloat((int)*(char *)(iVar10 + 0x5cc8) << 1, + (byte)(in_fpscr >> 0x16) & 3); + uVar12 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffdd,0x24); + VectorSignedToFloat(uVar12,(byte)(in_fpscr >> 0x16) & 3); + FUN_006f7004(uVar19,0xb5,iVar28 - (iVar28 >> 0x1f),uVar23); + iVar41 = iVar41 + -1; + } while (iVar41 != 0); + } + FUN_0063302c((int)*(char *)(iVar10 + 0x5cc9),0,(int)*(short *)(iVar32 + 0x9c8), + 0xffffffff,2); + FUN_00647588(local_4e8,(int)*(char *)(iVar10 + 0x5cc8),iVar26,1,iVar38 < 0xb); + lVar2 = (longlong)(int)*(short *)(iVar10 + 0x156) * (longlong)DAT_006e2224; + *(short *)(iVar10 + 0x5c7c) = + (short)((ulonglong)lVar2 >> 0x20) - (short)(lVar2 >> 0x3f); + } + uVar12 = (undefined4)((ulonglong)in_d1 >> 0x20); + local_4e8 = local_4e8 + 1; + local_4dc = local_4dc + 1; + } while ((int)local_4e8 < 4); + } + if (*(int *)(iVar10 + *(char *)(iVar10 + 0x14c) * 0xa0 + 0x94c) == 0x313) { + iVar38 = (int)*(short *)(iVar10 + 0x154); + fVar51 = (float)VectorSignedToFloat((int)*(short *)(iVar10 + 0x156), + (byte)(in_fpscr >> 0x16) & 3); + if ((((iVar38 == (int)(fVar51 * (float)puVar58)) || + (iVar38 == (int)(fVar51 * (float)puVar60))) || (iVar38 == (int)(fVar51 * 0.5))) || + ((iVar38 == (int)(fVar51 * (float)puVar7) || (iVar38 == (int)(fVar51 * (float)puVar8))) + )) { + iVar26 = (int)(fVar51 * (float)puVar8); + puVar55 = puVar5; + puVar61 = puVar5; + if (iVar38 != iVar26) { + if (iVar38 == (int)(fVar51 * (float)puVar7)) { + puVar55 = (undefined1 *)0x41d00000; + puVar61 = (undefined1 *)0x40000000; + } + else if (iVar38 == (int)(fVar51 * 0.5)) { + puVar61 = (undefined1 *)0x40800000; + } + else if (iVar38 == (int)(fVar51 * (float)puVar60)) { + puVar55 = local_4bc; + puVar61 = (undefined1 *)0x40c00000; + } + else if (iVar38 == (int)(fVar51 * (float)puVar58)) { + puVar61 = (undefined1 *)0x40e00000; + } + } + if (*(char *)(iVar10 + 0x5cc8) < 0) { + if ((iVar38 != iVar26) && + (local_4d8 = puVar55, iVar38 == (int)(fVar51 * (float)puVar7))) { + local_4d8 = local_4b8; + } + puVar55 = (undefined1 *)-(float)local_4d8; + } + VectorSignedToFloat((int)*(char *)(iVar10 + 0x5d1d),(byte)(in_fpscr >> 0x16) & 3); + fVar51 = (float)VectorSignedToFloat((int)*(char *)(iVar10 + 0x5cc8), + (byte)(in_fpscr >> 0x16) & 3); + fVar59 = (float)VectorSignedToFloat(iVar14 + iVar25 / 2,(byte)(in_fpscr >> 0x16) & 3); + VectorSignedToFloat(iVar16 + iVar35 / 2,(byte)(in_fpscr >> 0x16) & 3); + FUN_006f7004(fVar59 + (float)puVar55,uVar11,fVar51 * (float)puVar61 * 1.5,uVar12,puVar5, + puVar61,puVar5,0x83,iVar13 >> 1,uVar23); + } + } + } + } + } + uVar11 = (undefined4)((ulonglong)in_d0 >> 0x20); + if ((*(short *)(iVar10 + 0x158) == 0) && (0 < *(short *)(iVar10 + 0x154))) { + if (0 < *(short *)(iVar32 + 0x994)) { + if (*(int *)(iVar32 + 0x94c) == 0x13c9) { + dVar54 = (double)VectorSignedToFloat((int)*(short *)(iVar10 + 0x5d00), + (byte)(in_fpscr >> 0x16) & 3); + dVar50 = (double)VectorSignedToFloat((int)*(short *)(iVar10 + 0x5d02), + (byte)(in_fpscr >> 0x16) & 3); + in_d0 = dVar50 + dVar54 * DAT_006e221c; + *(short *)(iVar10 + 0x5d02) = (short)(longlong)in_d0; + } + else { + *(short *)(iVar10 + 0x5d02) = *(short *)(iVar10 + 0x5d02) + *(short *)(iVar32 + 0x994); + } + uVar11 = (undefined4)((ulonglong)in_d0 >> 0x20); + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + if (DAT_0103399c == *(byte *)(iVar10 + 0x5cc9)) { + FUN_006c0368(iVar10,(int)*(short *)(iVar32 + 0x994),0); + } + } + if (0 < *(short *)(iVar32 + 0x996)) { + *(short *)(iVar10 + 0x5d06) = *(short *)(iVar10 + 0x5d06) + *(short *)(iVar32 + 0x996); + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + if (DAT_0103399c == *(byte *)(iVar10 + 0x5cc9)) { + FUN_006c032c(iVar10,(int)*(short *)(iVar32 + 0x996)); + } + } + if (*(char *)(iVar32 + 0x9c6) != '\0') { + if (DAT_0103399c == *(byte *)(iVar10 + 0x5cc9)) { + FUN_006c48cc(iVar10,*(char *)(iVar32 + 0x9c6),*(undefined2 *)(iVar32 + 0x9c4),1); + } + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + } + if (DAT_0103399c == *(byte *)(iVar10 + 0x5cc9)) { + iVar13 = *(int *)(iVar32 + 0x94c); + if (iVar13 == 0x169) { + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + if (DAT_010339a0 == 0) { + FUN_007a8384(0xf,*(undefined4 *)(iVar10 + 0x100),*(undefined4 *)(iVar10 + 0x104),0); + if (DAT_00fe1ec4 == 1) { + FUN_0064937c(*(undefined1 *)(iVar10 + 0x5cc9),0xffffffff); + } + else { + DAT_010339ac = 0; + FUN_007a8f74(1); + } + } + } + else if (iVar13 == 0x25a) { + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + if (DAT_010339a0 == 0) { + FUN_007a8384(0xf,*(undefined4 *)(iVar10 + 0x100),*(undefined4 *)(iVar10 + 0x104),0); + if (DAT_00fe1ec4 == 1) { + FUN_0064937c(*(undefined1 *)(iVar10 + 0x5cc9),0xfffffffe); + } + else { + DAT_010339ac = 0; + FUN_007a8f74(2); + } + } + } + else if (iVar13 == 0x523) { + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + if (DAT_010339a0 == 0) { + FUN_007a8384(0xf,*(undefined4 *)(iVar10 + 0x100),*(undefined4 *)(iVar10 + 0x104),0); + if (DAT_00fe1ec4 == 1) { + FUN_0064937c(*(undefined1 *)(iVar10 + 0x5cc9),0xfffffffd); + } + else { + DAT_010339ac = 0; + FUN_007a8f74(3); + } + } + } + else if (iVar13 == 0x734) { + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + if ((DAT_010703e0 == '\0') && (DAT_010703e3 == '\0')) { + FUN_007a8384(0xf,*(undefined4 *)(iVar10 + 0x100),*(undefined4 *)(iVar10 + 0x104),0); + if (DAT_00fe1ec4 == 1) { + FUN_0064937c(*(undefined1 *)(iVar10 + 0x5cc9),0xfffffffc); + } + else { + FUN_0041c4d8(auStack_25c,"MISC[49]"); + uVar12 = FUN_005f82b0(auStack_21c,auStack_25c); + FUN_006050e4(uVar12,0x32,0xff,0x82,600); + FUN_007aa754(auStack_21c); + FUN_0041b8a0(auStack_25c); + FUN_007350a0(&DAT_010703d8); + } + } + } + else if ((((((iVar13 == 0x2b) || (iVar13 == 0x1398)) || (iVar13 == 0x46)) || + (((iVar13 == 0x220 || (iVar13 == 0x22c)) || + ((iVar13 == 0x22d || ((iVar13 == 0x230 || (iVar13 == 0x46d)))))))) || + (iVar13 == 0x533)) || + (((iVar13 == 0x13c8 || (iVar13 == 0x13c0)) || (iVar13 == 0x50d)))) { + bVar42 = false; + iVar14 = 0; + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + iVar13 = DAT_00fe1fa8; + do { + if (*(char *)(iVar13 + 0x100) != '\0') { + iVar16 = *(int *)(iVar32 + 0x94c); + iVar25 = *(int *)(iVar13 + 0x104); + if (((((iVar16 == 0x2b) && (iVar25 == 4)) || + (((iVar16 == 0x1398 && (iVar25 == 0x3fc)) || ((iVar16 == 0x46 && (iVar25 == 0xd)))) + )) || (((iVar16 == 0x220 && ((iVar25 == 0x7d || (iVar25 == 0x7e)))) || + (((iVar16 == 0x22c && (iVar25 == 0x86)) || + ((iVar16 == 0x22d && (iVar25 == 0x80)))))))) || + (((iVar16 == 0x230 && (iVar25 == 0x32)) || + ((((iVar16 == 0x46d && (iVar25 == 0xde)) || ((iVar16 == 0x533 && (iVar25 == 0x10a))) + ) || ((((iVar16 == 0x13c8 && (iVar25 == 0x402)) || (iVar25 == 0x401)) || + ((iVar16 == 0x50d && (iVar25 == 0xf5)))))))))) { + bVar42 = true; + break; + } + } + iVar14 = iVar14 + 1; + iVar13 = iVar13 + 0x274; + } while (iVar14 < 0xc4); + if (!bVar42) { + iVar13 = *(int *)(iVar32 + 0x94c); + if (iVar13 == 0x230) { + uVar12 = 0x32; + } + else { + if (iVar13 != 0x2b) { + if (iVar13 == 0x13c8) { + if ((*(short *)(&DAT_00879c4c + *(char *)(iVar10 + 0x5d23) * 2) == 0x13c7) && + (iVar13 = FUN_00735468(), iVar13 != 0)) { + iVar13 = iVar10 + 0x948; + iVar14 = 0x30; + do { + if ((*(int *)(iVar13 + 4) == 0x13c8) && + (sVar31 = *(short *)(iVar13 + 0x42) + -1, *(short *)(iVar13 + 0x42) = sVar31, + sVar31 < 1)) { + FUN_00612a6c(iVar13); + } + iVar13 = iVar13 + 0xa0; + iVar14 = iVar14 + -1; + } while (iVar14 != 0); + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + FUN_007a8384(0xf,*(undefined4 *)(iVar10 + 0x100),*(undefined4 *)(iVar10 + 0x104),0 + ); + iVar13 = FUN_006c2668(iVar10); + if (DAT_00fe1ec4 == 1) { + FUN_00648fa0(*(undefined4 *)(iVar13 + 0x44),*(undefined4 *)(iVar13 + 0x48)); + } + else { + FUN_00697cec(); + } + uVar12 = FUN_006be3c0((int)*(char *)(iVar10 + 0x5d23)); + FUN_006c48a8(iVar10,uVar12); + FUN_005b6990(0x13c7); + } + } + else { + if (iVar13 != 0x50d) { + if (iVar13 == 0x1398) { + uVar12 = 0x3fc; + } + else if (iVar13 == 0x46) { + uVar12 = 0xd; + } + else { + if (iVar13 == 0x220) { + FUN_007a8384(0xf,*(undefined4 *)(iVar10 + 0x100), + *(undefined4 *)(iVar10 + 0x104),0); + if (DAT_00fe1ec4 == 1) { + FUN_0064937c(*(undefined1 *)(iVar10 + 0x5cc9),0x7d); + FUN_0064937c(*(undefined1 *)(iVar10 + 0x5cc9),0x7e); + } + else { + FUN_00685904(iVar10,0x7d); + FUN_00685904(iVar10,0x7e); + } + goto LAB_006e27bc; + } + if (iVar13 == 0x22c) { + uVar12 = 0x86; + } + else if (iVar13 == 0x22d) { + uVar12 = 0x7f; + } + else if (iVar13 == 0x46d) { + uVar12 = 0xde; + } + else { + if (iVar13 != 0x533) { + if (iVar13 == 0x13c0) { + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + FUN_007a8384(0xf,*(undefined4 *)(iVar10 + 0x100), + *(undefined4 *)(iVar10 + 0x104),0); + if (DAT_00fe1ec4 == 1) { + FUN_0064937c(*(undefined1 *)(iVar10 + 0x5cc9),0x3fe); + } + else { + FUN_00685904(iVar10); + } + } + goto LAB_006e27bc; + } + uVar12 = 0x10a; + } + } + goto LAB_006e27b2; + } + FUN_006d2744(iVar10); + if (*(char *)(iVar10 + 0x8b4c) == '\x01') { + iVar13 = iVar10 + 0x948; + iVar14 = 0x30; + do { + if ((*(int *)(iVar13 + 4) == 0x50d) && + (sVar31 = *(short *)(iVar13 + 0x42) + -1, *(short *)(iVar13 + 0x42) = sVar31, + sVar31 < 1)) { + FUN_00612a6c(iVar13); + } + iVar13 = iVar13 + 0xa0; + iVar14 = iVar14 + -1; + } while (iVar14 != 0); + FUN_007a8384(0xf,*(undefined4 *)(iVar10 + 0x100),*(undefined4 *)(iVar10 + 0x104),0 + ); + if (DAT_00fe1ec4 == 1) { + FUN_0064937c(*(undefined1 *)(iVar10 + 0x5cc9),0xf5); + } + else { + FUN_00685904(iVar10,0xf5); + } + } + } + goto LAB_006e27bc; + } + uVar12 = 4; + } +LAB_006e27b2: + FUN_006bebb4(iVar10,uVar12); + } + } + } + } +LAB_006e27bc: + iVar13 = *(int *)(iVar32 + 0x94c); + if ((iVar13 == 0x32) && (0 < *(short *)(iVar10 + 0x154))) { + if (*(ushort *)(iVar10 + 0x158) == 0) { + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + } + else if (*(ushort *)(iVar10 + 0x158) == (ushort)(*(byte *)(iVar32 + 0x979) >> 1)) { + iVar13 = 0x10; + do { + local_3ac = 0; + FUN_0060d7ac(*(float *)(iVar10 + 0x120) * 0.5,uVar11,0x3fc00000,&DAT_01073158, + *(undefined4 *)(iVar10 + 0x100),*(undefined4 *)(iVar10 + 0x104), + *(undefined4 *)(iVar10 + 0x108),*(undefined4 *)(iVar10 + 0x10c),0xf,0x96,0); + iVar13 = iVar13 + -1; + } while (iVar13 != 0); + *(undefined2 *)(iVar10 + 0x8d92) = 0xffff; + puVar36 = &DAT_0107af40; + *(undefined1 *)(iVar10 + 0x8dba) = 0; + iVar13 = 0x200; + do { + if (((*(char *)(puVar36 + 2) != '\0') && (*(byte *)(puVar36 + 0x11) == uVar23)) && + (*(char *)(puVar36 + 0xf) == '\a')) { + FUN_006fde70(puVar36); + } + puVar36 = puVar36 + 0x74; + iVar13 = iVar13 + -1; + } while (iVar13 != 0); + FUN_006d8a34(iVar10); + iVar13 = 0x20; + do { + local_2c0 = 0; + FUN_0060d7ac(puVar5,uVar11,0x3fc00000,&DAT_01073158,*(undefined4 *)(iVar10 + 0x100), + *(undefined4 *)(iVar10 + 0x104),*(undefined4 *)(iVar10 + 0x108), + *(undefined4 *)(iVar10 + 0x10c),0xf,0x96,0); + iVar13 = iVar13 + -1; + } while (iVar13 != 0); + } + else { + iVar13 = FUN_00608330(&DAT_00fd67f4,3); + if (iVar13 == 0) { + local_3b8 = 0; + FUN_0060d7ac(puVar5,uVar11,fVar52,&DAT_01073158,*(undefined4 *)(iVar10 + 0x100), + *(undefined4 *)(iVar10 + 0x104),*(undefined4 *)(iVar10 + 0x108), + *(undefined4 *)(iVar10 + 0x10c),0xf,0x96,0); + } + } + } + else if ((0x256 < iVar13) && ((iVar13 < 0x25a && (0 < *(short *)(iVar10 + 0x154))))) { + uVar24 = *(ushort *)(iVar10 + 0x158); + if (uVar24 == 0) { + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + } + else if (uVar24 == 1) { + FUN_006c0c10(iVar10,iVar37); + } + else if (uVar24 == *(byte *)(iVar32 + 0x979) >> 1) { + iVar13 = 8; + do { + local_3a4 = 0; + FUN_0060d7ac(*(float *)(iVar10 + 0x120) * 0.5,uVar11,0x3fc00000,&DAT_01073158, + *(undefined4 *)(iVar10 + 0x100),*(undefined4 *)(iVar10 + 0x104), + *(undefined4 *)(iVar10 + 0x108),*(undefined4 *)(iVar10 + 0x10c),0xf,0x96,0); + iVar13 = iVar13 + -1; + } while (iVar13 != 0); + iVar13 = 0x10; + do { + local_3a0 = 0; + FUN_0060d7ac(puVar5,uVar11,0x3fc00000,&DAT_01073158,*(undefined4 *)(iVar10 + 0x100), + *(undefined4 *)(iVar10 + 0x104),*(undefined4 *)(iVar10 + 0x108), + *(undefined4 *)(iVar10 + 0x10c),0xf,0x96,0); + iVar13 = iVar13 + -1; + } while (iVar13 != 0); + } + else { + iVar13 = FUN_00608330(&DAT_01070468,3); + if (iVar13 == 0) { + local_310 = 0; + FUN_00654488(puVar5,uVar11,fVar52,&DAT_01073158,0xf,iVar10 + 0x100,0x96,0); + } + } + } + if (DAT_0103399c == *(byte *)(iVar10 + 0x5cc9)) { + if (*(ushort *)(iVar10 + 0x158) == (ushort)*(byte *)(iVar32 + 0x979)) { + if (0 < *(short *)(iVar32 + 0x9dc)) { + iVar14 = 0; + iVar13 = iVar10; + do { + if (((int)*(short *)(iVar32 + 0x9dc) == *(int *)(iVar13 + 0x94c)) && + (0 < *(short *)(iVar13 + 0x98a))) { + iVar13 = iVar10 + iVar14 * 0xa0; + sVar31 = *(short *)(iVar13 + 0x98a) + -1; + *(short *)(iVar13 + 0x98a) = sVar31; + if (sVar31 < 1) { + FUN_00612a6c(iVar13 + 0x948); + } + break; + } + iVar14 = iVar14 + 1; + iVar13 = iVar13 + 0xa0; + } while (iVar14 < 0x30); + } + if (*(char *)(iVar32 + 0x961) != '\0') { + bVar42 = true; + if (*(char *)(iVar32 + 0x96c) != '\0') { + uVar23 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar23 = uVar23 ^ (uVar23 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + DAT_00fd67fc = DAT_00fd6800; + fVar51 = (float)VectorSignedToFloat(uVar23 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd6800 = uVar23; + if ((int)(fVar51 * DAT_006e2b74 * DAT_006e2b70) < (int)(uint)*(byte *)(iVar10 + 0x5d1e)) { + bVar42 = false; + } + } + if (bVar42) { + if (0 < *(short *)(iVar32 + 0x98a)) { + *(short *)(iVar32 + 0x98a) = *(short *)(iVar32 + 0x98a) + -1; + } + if (*(short *)(iVar32 + 0x98a) < 1) { + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar10 + 0x154); + } + } + } + } + if ((*(short *)(iVar32 + 0x98a) < 1) && (*(short *)(iVar10 + 0x154) == 0)) { + FUN_00612a6c(iVar37); + } + } +LAB_006e2b46: + FUN_007ffb98(); + return; +LAB_006dbd16: + uVar17 = 0; +LAB_006dbd60: + if ((uVar17 != 0) && (*(char *)(iVar32 + 0x960) != '\0')) { + if (*(short *)(iVar10 + 0x5c7e) == 0) { + *(undefined2 *)(iVar10 + 0x5c7e) = *(undefined2 *)(iVar10 + 0x8dee); + FUN_006c48cc(iVar10,0x15,*(undefined2 *)(iVar10 + 0x8dee),1); + } + else { + uVar17 = 0; + *(ushort *)(iVar10 + 0x158) = (ushort)*(byte *)(iVar32 + 0x979); + } + } +LAB_006dbd92: + uVar27 = (uint)*(byte *)(iVar32 + 0x9d9); + if (uVar27 == 0) { +LAB_006dbe4e: + iVar13 = FUN_006becfc(iVar10); + if ((iVar13 != 0) && (cVar21 = *(char *)(iVar32 + 0x9c6), cVar21 != '\0')) { + iVar13 = FUN_005b66c8(cVar21); + if (iVar13 == 0) { + uVar9 = 0xe10; + goto LAB_006dbe74; + } + FUN_006d0c30(iVar10,*(undefined4 *)(iVar32 + 0x94c)); + } + } + else { + if (*(char *)(iVar10 + 0x5d35) != '\0') { + uVar17 = 0; + } + if (uVar27 == 0) goto LAB_006dbe4e; + if (uVar17 != 0) { + if ((*(int *)(iVar32 + 0x94c) != 0x7f) || (*(char *)(iVar10 + 0x5d1c) == '\0')) { + fVar51 = (float)VectorSignedToFloat(uVar27,(byte)(in_fpscr >> 0x16) & 3); + iVar13 = (int)(fVar51 * *(float *)(iVar10 + 0x5cdc)); + if (*(short *)(iVar10 + 0x5d06) < iVar13) { + if (*(char *)(iVar10 + 0x5d3d) != '\0') { + FUN_006c87a0(iVar10); + fVar51 = (float)VectorSignedToFloat((uint)*(byte *)(iVar32 + 0x9d9), + (byte)(in_fpscr >> 0x16) & 3); + iVar13 = (int)(fVar51 * *(float *)(iVar10 + 0x5cdc)); + if (iVar13 <= *(short *)(iVar10 + 0x5d06)) { + *(short *)(iVar10 + 0x5d06) = *(short *)(iVar10 + 0x5d06) - (short)iVar13; + goto LAB_006dbe38; + } + } + uVar17 = 0; + } + else { + *(short *)(iVar10 + 0x5d06) = *(short *)(iVar10 + 0x5d06) - (short)iVar13; + } + } +LAB_006dbe38: + if (((uVar17 == 0) || (iVar13 = FUN_006becfc(iVar10), iVar13 == 0)) || + (cVar21 = *(char *)(iVar32 + 0x9c6), cVar21 == '\0')) goto LAB_006dbe7c; + uVar9 = *(undefined2 *)(iVar32 + 0x9c4); +LAB_006dbe74: + FUN_006c48cc(iVar10,cVar21,uVar9,1); + } + } +LAB_006dbe7c: + if ((uVar17 != 0) && (DAT_010703e0 != '\0')) { + iVar13 = *(int *)(iVar32 + 0x94c); + if ((iVar13 == 0x2b) || ((iVar13 == 0x220 || (iVar13 == 0x22c)))) { + uVar17 = 0; + } + else if (iVar13 == 0x22d) { + uVar17 = 0; + } + else if (iVar13 == 0x1398) { + uVar17 = 0; + } + } + if (uVar17 != 0) { + iVar13 = *(int *)(iVar32 + 0x94c); + if (((((iVar13 == 0x1398) && (DAT_010338d3 == '\0')) || + ((iVar13 == 0x46 && (*(char *)(iVar10 + 0xe6) == '\0')))) || + (((iVar13 == 0x46d && (*(char *)(iVar10 + 0xe9) == '\0')) || + ((iVar13 == 0x533 && (*(char *)(iVar10 + 0xeb) == '\0')))))) || + ((iVar13 == 0x734 && ((DAT_010703e0 != '\0' || (DAT_010703e3 != '\0')))))) { +LAB_006dbff0: + uVar17 = 0; + } + else if ((*(short *)(iVar32 + 0x9d2) == 0x11) && (iVar13 = FUN_006becfc(iVar10), iVar13 != 0)) { + iVar13 = FUN_0058ef48(); + iVar16 = FUN_00592fc8(); + iVar35 = *(int *)(iVar16 + 0x10c) + (int)*(short *)(iVar13 + 0x27fc) >> 4; + iVar13 = FUN_0058ef48(); + iVar16 = FUN_00592fc8(); + iVar25 = DAT_00902934 * iVar35; + iVar13 = (int)*(short *)(iVar13 + 0x27fe) + *(int *)(iVar16 + 0x110) >> 4; + if ((((*(byte *)((iVar25 + iVar13) * 0xe + DAT_00902928 + 1) & 1) == 0) || + (((*(short *)((iVar25 + iVar13) * 0xe + DAT_00902928 + 6) != 0 && + (*(short *)((iVar25 + iVar13) * 0xe + DAT_00902928 + 6) != 2)) && + (*(short *)((iVar25 + iVar13) * 0xe + DAT_00902928 + 6) != 0x17)))) || + (FUN_007743f8(iVar35,iVar13,0,0,1,0), + (*(byte *)((DAT_00902934 * iVar35 + iVar13) * 0xe + DAT_00902928 + 1) & 1) != 0)) + goto LAB_006dbff0; + FUN_00647acc(4,iVar35,iVar13,0,0); + } + } + iVar13 = FUN_006becfc(iVar10); + if ((iVar13 != 0) && + ((((iVar13 = *(int *)(iVar32 + 0x94c), iVar13 == 0x73 || (iVar13 == 0x1a9)) || + ((iVar13 == 0x485 || ((iVar13 == 0x51d || (iVar13 == 0x70a)))))) || (iVar13 == 0x49f)))) { + FUN_006c48cc(iVar10,*(undefined1 *)(iVar32 + 0x9c6),0xe10,1); + } + if (uVar17 != 0) { + if (0 < *(short *)(iVar32 + 0x9d0)) { + uVar17 = 0; + iVar16 = 0; + iVar13 = iVar10; + do { + if ((*(short *)(iVar13 + 0x9ce) == *(short *)(iVar32 + 0x9d0)) && + (0 < *(short *)(iVar13 + 0x98a))) { + uVar17 = 1; + break; + } + iVar16 = iVar16 + 1; + iVar13 = iVar13 + 0xa0; + } while (iVar16 < 0x30); + } + if (uVar17 != 0) { + uVar1 = *(undefined1 *)(iVar10 + 0x5cc8); + iVar13 = FUN_00613084(iVar37); + if ((iVar13 == 0) || (*(char *)(iVar10 + 0x8df5) == '\0')) { + *(undefined1 *)(iVar10 + 0x8df4) = 0; + } + else { + *(undefined1 *)(iVar10 + 0x8df4) = 1; + iVar13 = FUN_006becfc(iVar10); + if (iVar13 == 0) { + iVar13 = FUN_00592fc8(); + if (*(int *)(iVar10 + 0x100) + 10 < *(int *)(iVar13 + 0x10c)) { + uVar30 = 1; + } + else { + uVar30 = 0xff; + } + } + else { + iVar13 = FUN_0058ef48(); + iVar16 = FUN_00592fc8(); + if (*(int *)(iVar10 + 0x100) + 10 < + (int)*(short *)(iVar13 + 0x27fc) + *(int *)(iVar16 + 0x10c)) { + uVar30 = 1; + } + else { + uVar30 = 0xff; + } + } + *(undefined1 *)(iVar10 + 0x5cc8) = uVar30; + *(undefined2 *)(iVar10 + 0x160) = 1; + } + if (-1 < *(short *)(iVar10 + 0x8d92)) { + *(undefined1 *)(iVar10 + 0x67) = 0; + *(undefined1 *)(iVar10 + 0x66) = 1; + if (*(char *)(iVar10 + 0x5cb2) == '\0') { + if (*(char *)(iVar10 + 0x5cb0) != '\0') { + *(undefined1 *)(iVar10 + 0x5cc8) = 0xff; + } + } + else { + *(undefined1 *)(iVar10 + 0x5cc8) = 1; + } + } + iVar13 = FUN_0058d72c(); + if (*(char *)(iVar13 + 0x13) != '\0') { + iVar13 = FUN_0058d72c(); + FUN_005de3a0(*(undefined4 *)(iVar13 + 0x30),local_1ac); + uVar27 = in_fpscr & 0xfffffff; + in_fpscr = uVar27 | (uint)(0.0 <= local_1ac[0]) << 0x1d; + if ((byte)(in_fpscr >> 0x1d) == 0) { + *(undefined1 *)(iVar10 + 0x5cc8) = 0xff; + } + else { + uVar27 = uVar27 | (uint)(local_1ac[0] < 0.0) << 0x1f | (uint)(local_1ac[0] == 0.0) << 0x1e + ; + in_fpscr = uVar27 | (uint)NAN(local_1ac[0]) << 0x1c; + bVar4 = (byte)(uVar27 >> 0x18); + if ((bool)(bVar4 >> 6 & 1) || bVar4 >> 7 != ((byte)(in_fpscr >> 0x1c) & 1)) { + *(undefined1 *)(iVar10 + 0x5cc8) = uVar1; + } + else { + *(undefined1 *)(iVar10 + 0x5cc8) = 1; + } + } + } + *(undefined1 *)(iVar10 + 0x5cf9) = *(undefined1 *)(iVar32 + 0x95e); + *(undefined2 *)(iVar10 + 0x5c7c) = 0; + if (*(char *)(iVar32 + 0x96a) == '\0') { + *(ushort *)(iVar10 + 0x154) = (ushort)*(byte *)(iVar32 + 0x978); + *(ushort *)(iVar10 + 0x156) = (ushort)*(byte *)(iVar32 + 0x978); + *(undefined1 *)(iVar10 + 0x146) = *(undefined1 *)(iVar32 + 0x9c7); + } + else { + iVar13 = FUN_0058ef48(); + if ((*(char *)(iVar13 + 0x3801) == '\0') || + (iVar13 = FUN_0058ef48(), *(char *)(iVar13 + 0x3800) != '\0')) { + fVar51 = (float)VectorSignedToFloat((uint)*(byte *)(iVar32 + 0x978), + (byte)(in_fpscr >> 0x16) & 3); + *(short *)(iVar10 + 0x154) = (short)(int)(fVar51 * *(float *)(iVar10 + 0x5d50)); + fVar51 = (float)VectorSignedToFloat((uint)*(byte *)(iVar32 + 0x978), + (byte)(in_fpscr >> 0x16) & 3); + *(short *)(iVar10 + 0x156) = (short)(int)(fVar51 * *(float *)(iVar10 + 0x5d50)); + } + } + if (0 < *(int *)(iVar10 + 0x8e84)) { + FUN_006482dc(*(undefined1 *)(iVar10 + 0x5cc9)); + } + if ((*(char *)(iVar32 + 0x988) != '\0') && (0 < *(short *)(iVar10 + 0x154))) { + FUN_007a8384(2,*(undefined4 *)(iVar10 + 0x100),*(undefined4 *)(iVar10 + 0x104), + *(char *)(iVar32 + 0x988)); + } + } + } + if ((uVar17 == 1) && + ((((iVar13 = (int)*(short *)(iVar32 + 0x9d2), iVar13 == 0x12 || (iVar13 == 0x48)) || + (iVar13 == 0x56)) || ((iVar13 == 0x57 || (iVar16 = FUN_006444b0(iVar13), iVar16 != 0)))))) { + if (((iVar13 < 0xbf) || (0xc2 < iVar13)) && ((iVar13 != 0x10a && (iVar13 != 0x13d)))) { + puVar33 = &DAT_0107af40; + iVar13 = 0x200; + do { + if (((char)puVar33[2] != '\0') && ((byte)puVar33[0x11] == uVar23)) { + uVar17 = (uint)*puVar33; + if ((uVar17 == (int)*(short *)(iVar32 + 0x9d2)) || + (((int)*(short *)(iVar32 + 0x9d2) == 0x48 && ((uVar17 == 0x56 || (uVar17 == 0x57)))))) + { + FUN_006fde70(puVar33); + } + } + puVar33 = puVar33 + 0x74; + iVar13 = iVar13 + -1; + } while (iVar13 != 0); + } + else { + puVar36 = &DAT_0107af40; + iVar35 = 0; + iVar16 = -1; + iVar25 = 0; + iVar13 = iVar16; + do { + if ((((*(char *)(puVar36 + 2) != '\0') && (*(byte *)(puVar36 + 0x11) == uVar23)) && + (*(char *)((int)puVar36 + 0x89) != '\0')) && + ((iVar35 = iVar35 + 1, iVar16 == -1 || (*(int *)(puVar36 + 0x3e) < iVar16)))) { + iVar16 = *(int *)(puVar36 + 0x3e); + iVar13 = iVar25; + } + iVar25 = iVar25 + 1; + puVar36 = puVar36 + 0x74; + } while (iVar25 < 0x200); + if ((int)(uint)*(byte *)(iVar10 + 0x54) <= iVar35) { + FUN_006fde70(&DAT_0107af40 + iVar13 * 0x74); + } + } + } + goto LAB_006dc31a; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/0073817c.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/0073817c.c new file mode 100644 index 000000000..17378feaa --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/0073817c.c @@ -0,0 +1,954 @@ + +void FUN_0073817c(int param_1) + +{ + bool bVar1; + undefined4 uVar2; + undefined1 *puVar3; + int iVar4; + int iVar5; + short sVar6; + int iVar7; + int iVar8; + int iVar9; + undefined1 auStack_ae0 [48]; + undefined1 auStack_ab0 [48]; + int local_a80; + int local_a7c; + int local_a78; + int local_a74; + int local_a70; + int local_a6c; + int local_a68; + int local_a64; + uint local_a60; + int local_a5c; + int local_a58; + int local_a54; + int local_a50; + int local_a4c; + int local_a48; + int local_a44; + uint local_a40; + undefined4 local_a38; + undefined4 uStack_a34; + undefined1 auStack_a30 [48]; + undefined1 local_a00; + undefined1 local_9ff; + undefined1 local_9fe; + undefined1 auStack_9f8 [48]; + undefined1 local_9c8; + undefined1 local_9c7; + undefined1 local_9c6; + undefined1 auStack_9c0 [48]; + undefined1 local_990; + undefined1 local_98f; + undefined1 local_98e; + undefined1 auStack_988 [48]; + undefined1 local_958; + undefined1 local_957; + undefined1 local_956; + undefined1 auStack_950 [48]; + undefined1 local_920; + undefined1 local_91f; + undefined1 local_91e; + undefined1 auStack_918 [48]; + undefined1 local_8e8; + undefined1 local_8e7; + undefined1 local_8e6; + undefined1 auStack_8e0 [48]; + undefined1 local_8b0; + undefined1 local_8af; + undefined1 local_8ae; + undefined1 auStack_8a8 [48]; + undefined1 local_878; + undefined1 local_877; + undefined1 local_876; + undefined1 auStack_870 [48]; + undefined1 local_840; + undefined1 local_83f; + undefined1 local_83e; + undefined1 auStack_838 [48]; + undefined1 local_808; + undefined1 local_807; + undefined1 local_806; + undefined1 auStack_800 [48]; + undefined1 local_7d0; + undefined1 local_7cf; + undefined1 local_7ce; + undefined1 auStack_7c8 [48]; + undefined1 local_798; + undefined1 local_797; + undefined1 local_796; + undefined1 auStack_790 [48]; + undefined1 local_760; + undefined1 local_75f; + undefined1 local_75e; + undefined1 auStack_758 [48]; + undefined1 local_728; + undefined1 local_727; + undefined1 local_726; + undefined1 auStack_720 [48]; + undefined1 local_6f0; + undefined1 local_6ef; + undefined1 local_6ee; + undefined1 auStack_6e8 [48]; + undefined1 local_6b8; + undefined1 local_6b7; + undefined1 local_6b6; + undefined1 auStack_6b0 [48]; + undefined1 local_680; + undefined1 local_67f; + undefined1 local_67e; + undefined1 auStack_678 [48]; + undefined1 local_648; + undefined1 local_647; + undefined1 local_646; + undefined1 auStack_640 [48]; + undefined1 local_610; + undefined1 local_60f; + undefined1 local_60e; + undefined1 auStack_608 [48]; + undefined1 local_5d8; + undefined1 local_5d7; + undefined1 local_5d6; + undefined1 auStack_5d0 [48]; + undefined1 local_5a0; + undefined1 local_59f; + undefined1 local_59e; + undefined1 auStack_598 [48]; + undefined1 local_568; + undefined1 local_567; + undefined1 local_566; + undefined1 auStack_560 [48]; + undefined1 local_530; + undefined1 local_52f; + undefined1 local_52e; + undefined1 auStack_528 [48]; + undefined1 local_4f8; + undefined1 local_4f7; + undefined1 local_4f6; + undefined1 auStack_4f0 [48]; + undefined1 local_4c0; + undefined1 local_4bf; + undefined1 local_4be; + undefined1 auStack_4b8 [48]; + undefined1 local_488; + undefined1 local_487; + undefined1 local_486; + undefined1 auStack_480 [48]; + undefined1 local_450; + undefined1 local_44f; + undefined1 local_44e; + undefined1 auStack_448 [48]; + undefined1 local_418; + undefined1 local_417; + undefined1 local_416; + undefined1 auStack_410 [48]; + undefined1 local_3e0; + undefined1 local_3df; + undefined1 local_3de; + undefined1 auStack_3d8 [48]; + undefined1 local_3a8; + undefined1 local_3a7; + undefined1 local_3a6; + undefined1 auStack_3a0 [48]; + undefined1 local_370; + undefined1 local_36f; + undefined1 local_36e; + undefined1 auStack_368 [48]; + undefined1 local_338; + undefined1 local_337; + undefined1 local_336; + undefined1 auStack_330 [48]; + undefined1 local_300; + undefined1 local_2ff; + undefined1 local_2fe; + undefined1 auStack_2f8 [48]; + undefined1 local_2c8; + undefined1 local_2c7; + undefined1 local_2c6; + undefined1 auStack_2c0 [48]; + undefined1 local_290; + undefined1 local_28f; + undefined1 local_28e; + undefined1 auStack_288 [48]; + undefined1 local_258; + undefined1 local_257; + undefined1 local_256; + undefined1 auStack_250 [48]; + undefined1 local_220; + undefined1 local_21f; + undefined1 local_21e; + undefined1 auStack_218 [48]; + undefined1 local_1e8; + undefined1 local_1e7; + undefined1 local_1e6; + undefined1 auStack_1e0 [48]; + undefined1 local_1b0; + undefined1 local_1af; + undefined1 local_1ae; + undefined1 auStack_1a8 [48]; + undefined1 local_178; + undefined1 local_177; + undefined1 local_176; + undefined1 auStack_170 [48]; + undefined1 local_140; + undefined1 local_13f; + undefined1 local_13e; + undefined1 auStack_138 [48]; + undefined1 local_108; + undefined1 local_107; + undefined1 local_106; + undefined1 auStack_100 [48]; + undefined1 local_d0; + undefined1 local_cf; + undefined1 local_ce; + undefined1 auStack_c8 [48]; + undefined1 local_98; + undefined1 local_97; + undefined1 local_96; + undefined1 auStack_90 [48]; + undefined1 local_60; + undefined1 local_5f; + undefined1 local_5e; + undefined1 auStack_58 [48]; + undefined1 local_28; + undefined1 local_27; + undefined1 local_26; + + puVar3 = auStack_ae0; + local_a38 = 0xfffffffe; + uStack_a34 = 0xfffffffe; + iVar5 = *(int *)(param_1 + 0x1c); + local_a60 = (uint)(100 < *(short *)(iVar5 + 0x5d00)); + local_a40 = (uint)(0 < *(short *)(iVar5 + 0x5d08)); + iVar9 = 0; + iVar8 = 0; + bVar1 = true; + local_a44 = 0; + local_a6c = 0; + local_a80 = 0; + local_a64 = 0; + iVar4 = 0x30; + do { + if ((((*(char *)(iVar5 + 0x97c) != '\0') && (*(short *)(iVar5 + 0x9c8) != -0xd)) || + ((*(char *)(iVar5 + 0x97d) != '\0' && (*(short *)(iVar5 + 0x9c8) != -0x10)))) || + (*(char *)(iVar5 + 0x97e) != '\0')) { + bVar1 = false; + } + iVar7 = *(int *)(iVar5 + 0x94c); + if (iVar7 < 0x45) { + if (iVar7 == 0x44) { +LAB_00738250: + local_a80 = 1; + } + else if (iVar7 < 0x17) { + if (iVar7 < 0x13) { + if (iVar7 - 0xbU < 4) { + iVar9 = 1; + } + } + else { + iVar8 = 1; + } + } + else if (iVar7 == 0x26) { + local_a6c = 1; + } + } + else { + if (iVar7 == 0x46) goto LAB_00738250; + if (iVar7 == 0x4b) { + local_a44 = 1; + } + else if (iVar7 == 0x54) { + local_a64 = 1; + } + } + iVar5 = iVar5 + 0xa0; + iVar4 = iVar4 + -1; + } while (iVar4 != 0); + local_a70 = 0; + local_a7c = 0; + local_a4c = 0; + local_a50 = 0; + local_a74 = 0; + local_a58 = 0; + local_a78 = 0; + local_a68 = 0; + local_a48 = 0; + iVar5 = 0xc4; + iVar4 = DAT_00fe1fa8; + do { + if (*(char *)(iVar4 + 0x100) != '\0') { + iVar7 = *(int *)(iVar4 + 0x104); + if (iVar7 < 0x27) { + if (iVar7 == 0x26) { + local_a4c = 1; + } + else { + switch(iVar7) { + case 0x11: + local_a70 = 1; + break; + case 0x12: + local_a7c = 1; + break; + case 0x13: + local_a48 = 1; + break; + case 0x14: + local_a68 = 1; + } + } + } + else if (iVar7 < 0x6d) { + if (iVar7 == 0x6c) { + local_a74 = 1; + } + else if (iVar7 == 0x36) { + local_a78 = 1; + } + else if (iVar7 == 0x6b) { + local_a58 = 1; + } + } + else if (iVar7 == 0x7c) { + local_a50 = 1; + } + } + iVar4 = iVar4 + 0x274; + iVar5 = iVar5 + -1; + } while (iVar5 != 0); + local_a5c = iVar8; + local_a54 = iVar9; + iVar4 = FUN_00736c00(param_1); + while( true ) { + if (iVar4 != 0) { + return; + } + sVar6 = *(short *)(param_1 + 0x3454) + 1; + *(short *)(param_1 + 0x3454) = sVar6; + if (bVar1) { + if (sVar6 == 1) { + if ((DAT_00ec7688 & 1) == 0) { + DAT_00ec7688 = DAT_00ec7688 | 1; + FUN_004c7bec(&DAT_00ec7674); + FUN_007ffd08(&LAB_0080a400_1); + } + iVar4 = FUN_004c7740(&DAT_00ec7674); + if (iVar4 == 5) { + uVar2 = FUN_0063a50c(auStack_ab0,*(undefined4 *)(param_1 + 0x1c),0xb1); + FUN_0074624c(auStack_90,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ae0,auStack_90); + FUN_007aa754(auStack_ae0); + *(undefined1 *)(param_1 + 0x3420) = local_60; + *(undefined1 *)(param_1 + 0x3421) = local_5f; + *(undefined1 *)(param_1 + 0x3422) = local_5e; + thunk_FUN_007aa754(auStack_90); + puVar3 = auStack_ab0; + goto LAB_00739640; + } + sVar6 = *(short *)(param_1 + 0x3454) + 1; + *(short *)(param_1 + 0x3454) = sVar6; + } + if (sVar6 == 2) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xb2); + FUN_0074624c(auStack_410,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_410); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_3e0; + *(undefined1 *)(param_1 + 0x3421) = local_3df; + *(undefined1 *)(param_1 + 0x3422) = local_3de; + thunk_FUN_007aa754(auStack_410); + goto LAB_00739640; + } + if (*(short *)(param_1 + 0x3454) == 3) { + if ((DAT_00ec7688 & 1) == 0) { + DAT_00ec7688 = DAT_00ec7688 | 1; + FUN_004c7bec(&DAT_00ec7674); + FUN_007ffd08(&LAB_0080a400_1); + } + iVar4 = FUN_004c7740(&DAT_00ec7674); + if (iVar4 == 5) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xb3); + FUN_0074624c(auStack_9c0,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_9c0); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_990; + *(undefined1 *)(param_1 + 0x3421) = local_98f; + *(undefined1 *)(param_1 + 0x3422) = local_98e; + thunk_FUN_007aa754(auStack_9c0); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + *(short *)(param_1 + 0x3454) = *(short *)(param_1 + 0x3454) + 1; + } + sVar6 = *(short *)(param_1 + 0x3454); + if (sVar6 == 4) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xb4); + FUN_0074624c(auStack_800,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_800); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_7d0; + *(undefined1 *)(param_1 + 0x3421) = local_7cf; + *(undefined1 *)(param_1 + 0x3422) = local_7ce; + thunk_FUN_007aa754(auStack_800); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + if (sVar6 == 5) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xb5); + FUN_0074624c(auStack_250,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_250); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_220; + *(undefined1 *)(param_1 + 0x3421) = local_21f; + *(undefined1 *)(param_1 + 0x3422) = local_21e; + thunk_FUN_007aa754(auStack_250); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + if (sVar6 == 6) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xb6); + FUN_0074624c(auStack_870,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_870); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_840; + *(undefined1 *)(param_1 + 0x3421) = local_83f; + *(undefined1 *)(param_1 + 0x3422) = local_83e; + thunk_FUN_007aa754(auStack_870); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + if (((iVar9 == 0) && (iVar8 == 0)) && (sVar6 == 0xb)) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xb7); + FUN_0074624c(auStack_4f0,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_4f0); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_4c0; + *(undefined1 *)(param_1 + 0x3421) = local_4bf; + *(undefined1 *)(param_1 + 0x3422) = local_4be; + thunk_FUN_007aa754(auStack_4f0); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + if ((iVar9 == 1) && (iVar8 == 0)) { + if (sVar6 == 0x15) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xb8); + FUN_0074624c(auStack_170,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_170); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_140; + *(undefined1 *)(param_1 + 0x3421) = local_13f; + *(undefined1 *)(param_1 + 0x3422) = local_13e; + thunk_FUN_007aa754(auStack_170); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + if (sVar6 == 0x16) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xb9); + FUN_0074624c(auStack_950,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_950); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_920; + *(undefined1 *)(param_1 + 0x3421) = local_91f; + *(undefined1 *)(param_1 + 0x3422) = local_91e; + thunk_FUN_007aa754(auStack_950); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + } + if (iVar8 == 1) { + if (sVar6 == 0x1f) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xba); + FUN_0074624c(auStack_480,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_480); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_450; + *(undefined1 *)(param_1 + 0x3421) = local_44f; + *(undefined1 *)(param_1 + 0x3422) = local_44e; + thunk_FUN_007aa754(auStack_480); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + if (sVar6 == 0x20) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xbb); + FUN_0074624c(auStack_8e0,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_8e0); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_8b0; + *(undefined1 *)(param_1 + 0x3421) = local_8af; + *(undefined1 *)(param_1 + 0x3422) = local_8ae; + thunk_FUN_007aa754(auStack_8e0); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + } + } + if ((local_a60 == 0) && (*(short *)(param_1 + 0x3454) == 0x29)) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xbc); + FUN_0074624c(auStack_790,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_790); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_760; + *(undefined1 *)(param_1 + 0x3421) = local_75f; + *(undefined1 *)(param_1 + 0x3422) = local_75e; + thunk_FUN_007aa754(auStack_790); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + if (local_a40 == 0) { + if (*(short *)(param_1 + 0x3454) == 0x2a) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xbd); + FUN_0074624c(auStack_a30,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_a30); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_a00; + *(undefined1 *)(param_1 + 0x3421) = local_9ff; + *(undefined1 *)(param_1 + 0x3422) = local_9fe; + thunk_FUN_007aa754(auStack_a30); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + if ((local_a44 == 0) && (*(short *)(param_1 + 0x3454) == 0x2b)) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xbe); + FUN_0074624c(auStack_720,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_720); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_6f0; + *(undefined1 *)(param_1 + 0x3421) = local_6ef; + *(undefined1 *)(param_1 + 0x3422) = local_6ee; + thunk_FUN_007aa754(auStack_720); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + } + if (local_a70 == 0) { + if (local_a7c == 0) { + sVar6 = *(short *)(param_1 + 0x3454); + if (sVar6 == 0x33) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xbf); + FUN_0074624c(auStack_1e0,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_1e0); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_1b0; + *(undefined1 *)(param_1 + 0x3421) = local_1af; + *(undefined1 *)(param_1 + 0x3422) = local_1ae; + thunk_FUN_007aa754(auStack_1e0); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + if (sVar6 == 0x34) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xc0); + FUN_0074624c(auStack_6b0,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_6b0); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_680; + *(undefined1 *)(param_1 + 0x3421) = local_67f; + *(undefined1 *)(param_1 + 0x3422) = local_67e; + thunk_FUN_007aa754(auStack_6b0); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + if (sVar6 == 0x35) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xc1); + FUN_0074624c(auStack_3a0,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_3a0); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_370; + *(undefined1 *)(param_1 + 0x3421) = local_36f; + *(undefined1 *)(param_1 + 0x3422) = local_36e; + thunk_FUN_007aa754(auStack_3a0); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + } + if (*(short *)(param_1 + 0x3454) == 0x3d) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xc3); + FUN_0074624c(auStack_640,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_640); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_610; + *(undefined1 *)(param_1 + 0x3421) = local_60f; + *(undefined1 *)(param_1 + 0x3422) = local_60e; + thunk_FUN_007aa754(auStack_640); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + } + if ((local_a7c == 0) && (*(short *)(param_1 + 0x3454) == 0x3e)) break; + if ((local_a48 == 0) && (*(short *)(param_1 + 0x3454) == 0x3f)) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xc5); + FUN_0074624c(auStack_5d0,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_5d0); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_5a0; + *(undefined1 *)(param_1 + 0x3421) = local_59f; + *(undefined1 *)(param_1 + 0x3422) = local_59e; + thunk_FUN_007aa754(auStack_5d0); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + if ((local_a68 == 0) && (*(short *)(param_1 + 0x3454) == 0x40)) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xc6); + FUN_0074624c(auStack_100,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_100); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_d0; + *(undefined1 *)(param_1 + 0x3421) = local_cf; + *(undefined1 *)(param_1 + 0x3422) = local_ce; + thunk_FUN_007aa754(auStack_100); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + if (((local_a50 == 0) && (*(short *)(param_1 + 0x3454) == 0x41)) && (DAT_00fe1f7b == '\x01')) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),199); + FUN_0074624c(auStack_560,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_560); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_530; + *(undefined1 *)(param_1 + 0x3421) = local_52f; + *(undefined1 *)(param_1 + 0x3422) = local_52e; + thunk_FUN_007aa754(auStack_560); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + if (((local_a78 == 0) && (*(short *)(param_1 + 0x3454) == 0x42)) && (DAT_00fe1f7b == '\x01')) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),200); + FUN_0074624c(auStack_2c0,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_2c0); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_290; + *(undefined1 *)(param_1 + 0x3421) = local_28f; + *(undefined1 *)(param_1 + 0x3422) = local_28e; + thunk_FUN_007aa754(auStack_2c0); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + if ((local_a4c == 0) && (*(short *)(param_1 + 0x3454) == 0x43)) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xc9); + FUN_0074624c(auStack_9f8,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_9f8); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_9c8; + *(undefined1 *)(param_1 + 0x3421) = local_9c7; + *(undefined1 *)(param_1 + 0x3422) = local_9c6; + thunk_FUN_007aa754(auStack_9f8); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + if (((local_a58 == 0) && (DAT_00fe1f7a == '\x01')) && (*(short *)(param_1 + 0x3454) == 0x44)) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xca); + FUN_0074624c(auStack_988,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_988); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_958; + *(undefined1 *)(param_1 + 0x3421) = local_957; + *(undefined1 *)(param_1 + 0x3422) = local_956; + thunk_FUN_007aa754(auStack_988); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + if (((local_a74 == 0) && (DAT_010338d3 == '\x01')) && (*(short *)(param_1 + 0x3454) == 0x45)) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xcb); + FUN_0074624c(auStack_918,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_918); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_8e8; + *(undefined1 *)(param_1 + 0x3421) = local_8e7; + *(undefined1 *)(param_1 + 0x3422) = local_8e6; + thunk_FUN_007aa754(auStack_918); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + if ((local_a6c == 1) && (*(short *)(param_1 + 0x3454) == 0x47)) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xcc); + FUN_0074624c(auStack_8a8,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_8a8); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_878; + *(undefined1 *)(param_1 + 0x3421) = local_877; + *(undefined1 *)(param_1 + 0x3422) = local_876; + thunk_FUN_007aa754(auStack_8a8); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + if ((local_a80 == 1) && (*(short *)(param_1 + 0x3454) == 0x48)) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xcd); + FUN_0074624c(auStack_838,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_838); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_808; + *(undefined1 *)(param_1 + 0x3421) = local_807; + *(undefined1 *)(param_1 + 0x3422) = local_806; + thunk_FUN_007aa754(auStack_838); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + if (((local_a6c == 1) || (local_a80 == 1)) && (*(short *)(param_1 + 0x3454) == 0x50)) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xce); + FUN_0074624c(auStack_58,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_58); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_28; + *(undefined1 *)(param_1 + 0x3421) = local_27; + *(undefined1 *)(param_1 + 0x3422) = local_26; + thunk_FUN_007aa754(auStack_58); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + if (((local_a64 == 0) && (*(short *)(param_1 + 0x3454) == 0xc9)) && + ((DAT_010338d3 == '\0' && ((DAT_00fe1f7b == '\0' && (DAT_00fe1f7a == '\0')))))) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xcf); + FUN_0074624c(auStack_7c8,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_7c8); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_798; + *(undefined1 *)(param_1 + 0x3421) = local_797; + *(undefined1 *)(param_1 + 0x3422) = local_796; + thunk_FUN_007aa754(auStack_7c8); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + sVar6 = *(short *)(param_1 + 0x3454); + if (((sVar6 == 1000) && (DAT_00fe1f73 == '\0')) && (DAT_00fe1f7a == '\0')) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xd0); + FUN_0074624c(auStack_758,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_758); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_728; + *(undefined1 *)(param_1 + 0x3421) = local_727; + *(undefined1 *)(param_1 + 0x3422) = local_726; + thunk_FUN_007aa754(auStack_758); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + if (((sVar6 == 0x3e9) && (DAT_00fe1f73 == '\0')) && (DAT_00fe1f7a == '\0')) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xd1); + FUN_0074624c(auStack_6e8,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_6e8); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_6b8; + *(undefined1 *)(param_1 + 0x3421) = local_6b7; + *(undefined1 *)(param_1 + 0x3422) = local_6b6; + thunk_FUN_007aa754(auStack_6e8); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + if ((sVar6 == 0x3ea) && (DAT_00fe1f7b == '\0')) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xd2); + FUN_0074624c(auStack_678,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_678); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_648; + *(undefined1 *)(param_1 + 0x3421) = local_647; + *(undefined1 *)(param_1 + 0x3422) = local_646; + thunk_FUN_007aa754(auStack_678); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + if ((sVar6 == 0x41a) && (DAT_00fe1f73 == '\0')) { + if (*(short *)(*(int *)(param_1 + 0x1c) + 0x5d00) < 200) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xd3); + FUN_0074624c(auStack_608,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_608); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_5d8; + *(undefined1 *)(param_1 + 0x3421) = local_5d7; + *(undefined1 *)(param_1 + 0x3422) = local_5d6; + thunk_FUN_007aa754(auStack_608); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + } + else if ((sVar6 == 0x41b) && (DAT_00fe1f73 == '\0')) { + if (*(short *)(*(int *)(param_1 + 0x1c) + 0x5cfa) < 0xb) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xd4); + FUN_0074624c(auStack_598,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_598); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_568; + *(undefined1 *)(param_1 + 0x3421) = local_567; + *(undefined1 *)(param_1 + 0x3422) = local_566; + thunk_FUN_007aa754(auStack_598); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + } + else if ((sVar6 == 0x41c) && (DAT_00fe1f73 == '\0')) { + if ((199 < *(short *)(*(int *)(param_1 + 0x1c) + 0x5d00)) && + (10 < *(short *)(*(int *)(param_1 + 0x1c) + 0x5cfa))) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xd5); + FUN_0074624c(auStack_528,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_528); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_4f8; + *(undefined1 *)(param_1 + 0x3421) = local_4f7; + *(undefined1 *)(param_1 + 0x3422) = local_4f6; + thunk_FUN_007aa754(auStack_528); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + } + else if ((sVar6 == 0x41d) && ((DAT_00fe1f73 == '\x01' && (DAT_00fe1f7a == '\0')))) { + if (*(short *)(*(int *)(param_1 + 0x1c) + 0x5d00) < 0x96) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xd6); + FUN_0074624c(auStack_4b8,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_4b8); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_488; + *(undefined1 *)(param_1 + 0x3421) = local_487; + *(undefined1 *)(param_1 + 0x3422) = local_486; + thunk_FUN_007aa754(auStack_4b8); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + } + else if ((sVar6 == 0x41e) && ((DAT_00fe1f73 == '\x01' && (DAT_00fe1f7a == '\0')))) { + if (0x95 < *(short *)(*(int *)(param_1 + 0x1c) + 0x5d00)) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xd7); + FUN_0074624c(auStack_448,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_448); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_418; + *(undefined1 *)(param_1 + 0x3421) = local_417; + *(undefined1 *)(param_1 + 0x3422) = local_416; + thunk_FUN_007aa754(auStack_448); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + } + else if ((sVar6 == 0x41f) && ((DAT_00fe1f73 == '\x01' && (DAT_00fe1f7a == '\0')))) { + if (299 < *(short *)(*(int *)(param_1 + 0x1c) + 0x5d00)) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xd8); + FUN_0074624c(auStack_3d8,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_3d8); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_3a8; + *(undefined1 *)(param_1 + 0x3421) = local_3a7; + *(undefined1 *)(param_1 + 0x3422) = local_3a6; + thunk_FUN_007aa754(auStack_3d8); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + } + else { + if ((sVar6 == 0x420) && + (((DAT_00fe1f73 == '\x01' && (DAT_00fe1f7a == '\x01')) && (DAT_00fe1f7b == '\0')))) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xd9); + FUN_0074624c(auStack_368,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_368); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_338; + *(undefined1 *)(param_1 + 0x3421) = local_337; + *(undefined1 *)(param_1 + 0x3422) = local_336; + thunk_FUN_007aa754(auStack_368); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + if (((((sVar6 == 0x421) && (DAT_00fe1f73 == '\x01')) && (DAT_00fe1f7a == '\x01')) && + ((DAT_00fe1f7b == '\x01' && (DAT_010338d3 == '\0')))) && + (*(short *)(*(int *)(param_1 + 0x1c) + 0x5d00) < 400)) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xda); + FUN_0074624c(auStack_2f8,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_2f8); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_2c8; + *(undefined1 *)(param_1 + 0x3421) = local_2c7; + *(undefined1 *)(param_1 + 0x3422) = local_2c6; + thunk_FUN_007aa754(auStack_2f8); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + if (((((sVar6 == 0x422) && (DAT_00fe1f73 == '\x01')) && (DAT_00fe1f7a == '\x01')) && + ((DAT_00fe1f7b == '\x01' && (DAT_010338d3 == '\0')))) && + (399 < *(short *)(*(int *)(param_1 + 0x1c) + 0x5d00))) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xdb); + FUN_0074624c(auStack_288,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_288); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_258; + *(undefined1 *)(param_1 + 0x3421) = local_257; + *(undefined1 *)(param_1 + 0x3422) = local_256; + thunk_FUN_007aa754(auStack_288); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + if (((sVar6 == 0x423) && (DAT_00fe1f73 == '\x01')) && + ((DAT_00fe1f7a == '\x01' && + (((DAT_00fe1f7b == '\x01' && (DAT_010338d3 == '\0')) && + (399 < *(short *)(*(int *)(param_1 + 0x1c) + 0x5d00))))))) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xdc); + FUN_0074624c(auStack_218,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_218); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_1e8; + *(undefined1 *)(param_1 + 0x3421) = local_1e7; + *(undefined1 *)(param_1 + 0x3422) = local_1e6; + thunk_FUN_007aa754(auStack_218); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + if (((((sVar6 == 0x424) && (DAT_00fe1f73 == '\x01')) && (DAT_00fe1f7a == '\x01')) && + ((DAT_00fe1f7b == '\x01' && (DAT_010338d3 == '\0')))) && + (399 < *(short *)(*(int *)(param_1 + 0x1c) + 0x5d00))) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xdd); + FUN_0074624c(auStack_1a8,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_1a8); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_178; + *(undefined1 *)(param_1 + 0x3421) = local_177; + *(undefined1 *)(param_1 + 0x3422) = local_176; + thunk_FUN_007aa754(auStack_1a8); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + if ((sVar6 == 0x425) && (DAT_010338d3 == '\x01')) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xde); + FUN_0074624c(auStack_138,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_138); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_108; + *(undefined1 *)(param_1 + 0x3421) = local_107; + *(undefined1 *)(param_1 + 0x3422) = local_106; + thunk_FUN_007aa754(auStack_138); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + if ((sVar6 == 0x426) && (DAT_010338d3 == '\x01')) { + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xdf); + FUN_0074624c(auStack_c8,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_c8); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_98; + *(undefined1 *)(param_1 + 0x3421) = local_97; + *(undefined1 *)(param_1 + 0x3422) = local_96; + thunk_FUN_007aa754(auStack_c8); + puVar3 = auStack_ae0; + goto LAB_00739640; + } + if (0x44c < sVar6) { + *(undefined2 *)(param_1 + 0x3454) = 0; + *(undefined2 *)(param_1 + 0x3456) = 0; + } + } + iVar4 = FUN_00736c00(param_1); + iVar8 = local_a5c; + iVar9 = local_a54; + } + uVar2 = FUN_0063a50c(auStack_ae0,*(undefined4 *)(param_1 + 0x1c),0xc4); + FUN_0074624c(auStack_330,uVar2); + FUN_007aa80c(param_1 + 0x33f0,auStack_ab0,auStack_330); + FUN_007aa754(auStack_ab0); + *(undefined1 *)(param_1 + 0x3420) = local_300; + *(undefined1 *)(param_1 + 0x3421) = local_2ff; + *(undefined1 *)(param_1 + 0x3422) = local_2fe; + thunk_FUN_007aa754(auStack_330); + puVar3 = auStack_ae0; +LAB_00739640: + FUN_007aa754(puVar3); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/007820ec.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/007820ec.c new file mode 100644 index 000000000..78c9acfd5 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/007820ec.c @@ -0,0 +1,524 @@ + +void FUN_007820ec(int param_1,int param_2) + +{ + ushort uVar1; + short sVar2; + bool bVar3; + float fVar4; + int iVar5; + int iVar6; + int iVar7; + uint uVar8; + int iVar9; + uint uVar10; + uint uVar11; + undefined2 uVar12; + int iVar13; + int iVar14; + int iVar15; + uint uVar16; + int iVar17; + int iVar18; + int iVar19; + uint in_fpscr; + float fVar20; + int local_e8; + int local_e4; + int local_e0; + uint local_dc; + int local_d8; + undefined4 local_d0; + undefined4 uStack_cc; + undefined1 auStack_c8 [48]; + undefined1 auStack_98 [48]; + undefined1 auStack_68 [68]; + + iVar17 = DAT_00902934; + iVar5 = DAT_00902928; + local_d0 = 0xfffffffe; + uStack_cc = 0xfffffffe; + local_e0 = (DAT_00902934 * param_1 + param_2) * 0xe + DAT_00902928; + if ((*(byte *)(local_e0 + 1) & 2) != 0) { + return; + } + uVar1 = *(ushort *)(local_e0 + 6); + local_e8 = param_1; + local_d8 = param_2; + if (uVar1 < 0xa5) { + if (uVar1 == 0xa4) { +LAB_00782236: + if ((DAT_01033960 < param_2) && (iVar7 = FUN_00608330(&DAT_00fd67f4,0x6e), iVar7 == 0)) { + iVar14 = FUN_00608330(&DAT_00fd67f4,4); + iVar7 = -1; + iVar18 = 0; + if (iVar14 != 0) { + if (iVar14 == 1) { + iVar7 = 1; + } + else { + iVar7 = 0; + iVar18 = -1; + if (iVar14 != 2) { + iVar18 = 1; + } + } + } + iVar18 = iVar18 + param_2; + iVar7 = iVar7 + local_e8; + local_e4 = iVar18; + local_dc = iVar7; + if ((*(byte *)((iVar7 * iVar17 + iVar18) * 0xe + iVar5 + 1) & 1) == 0) { + iVar13 = local_e8 + -6; + iVar14 = 0; + if (iVar13 <= local_e8 + 6) { + iVar15 = iVar17 * iVar13; + iVar19 = param_2 + -6; + iVar13 = ((local_e8 + 6) - iVar13) + 1; + do { + if (iVar19 <= param_2 + 6) { + iVar9 = (iVar15 + iVar19) * 0xe + iVar5; + iVar6 = ((param_2 + 6) - iVar19) + 1; + do { + if ((*(short *)(iVar9 + 6) == 0x81) && ((*(byte *)(iVar9 + 1) & 1) != 0)) { + bVar3 = true; + } + else { + bVar3 = false; + } + if (bVar3) { + iVar14 = iVar14 + 1; + } + iVar9 = iVar9 + 0xe; + iVar6 = iVar6 + -1; + } while (iVar6 != 0); + } + iVar15 = iVar15 + iVar17; + iVar13 = iVar13 + -1; + } while (iVar13 != 0); + if (2 < iVar14) goto LAB_00782402; + } + FUN_007749e4(iVar7,iVar18,0x81,1,0,0xffffffff,0); + FUN_00649a94(iVar7,iVar18,0,0); + iVar17 = DAT_00902934; + iVar5 = DAT_00902928; + } + } + } + else if (uVar1 == 0x3c) { + if ((DAT_01033960 + DAT_00902ebc >> 1 < param_2) && + (iVar7 = FUN_00608330(&DAT_00fd67f4,200), iVar7 == 0)) { + iVar7 = FUN_005c4e6c(&DAT_00fd67f4,0xfffffff6,0xb); + iVar7 = iVar7 + local_e8; + iVar18 = FUN_005c4e6c(&DAT_00fd67f4,0xfffffff6,0xb); + param_2 = param_2 + iVar18; + iVar18 = (iVar17 * iVar7 + param_2) * 0xe + iVar5; + if ((*(short *)(iVar18 + 6) == 0x3b) && ((*(byte *)(iVar18 + 1) & 1) != 0)) { + bVar3 = true; + } + else { + bVar3 = false; + } + if ((bVar3) && + ((((*(byte *)(iVar18 + -0xd) & 1) == 0 || + (((sVar2 = *(short *)(iVar18 + -8), sVar2 != 5 && (sVar2 != 0xec)) && (sVar2 != 0xee))) + ) && (iVar14 = FUN_00752258(iVar7,param_2), iVar14 != 0)))) { + *(undefined2 *)(iVar18 + 6) = 0xd3; + FUN_007729e8(iVar7,param_2,0xffffffff); + FUN_00649a94(iVar7,param_2,0,0); + FUN_007ab078(auStack_98,"Created CHLOROPHYTE_ORE"); + FUN_007a7b00(auStack_98,0x37,200,0x37,600); + iVar5 = 0x50; + goto LAB_007823f0; + } + } + } + else if (uVar1 == 0x75) goto LAB_00782236; + } + else if ((uVar1 == 0xd3) && (DAT_01033960 + DAT_00902ebc >> 1 < param_2)) { + iVar7 = FUN_00608330(&DAT_00fd67f4,4); + if (iVar7 == 0) { + param_1 = local_e8 + 1; + } + else if (iVar7 == 1) { + param_1 = local_e8 + -1; + } + else if (iVar7 == 2) { + param_2 = param_2 + 1; + } + else { + param_2 = param_2 + -1; + } + iVar7 = (iVar17 * param_1 + param_2) * 0xe + iVar5; + if (((*(byte *)(iVar7 + 1) & 1) != 0) && + (((*(short *)(iVar7 + 6) == 0x3b || (*(short *)(iVar7 + 6) == 0x3c)) && + (iVar18 = FUN_00752258(param_1,param_2), iVar18 != 0)))) { + *(undefined2 *)(iVar7 + 6) = 0xd3; + FUN_007729e8(param_1,param_2,0xffffffff); + FUN_00649a94(param_1,param_2,0,0); + FUN_007ab078(auStack_c8,"Grown CHLOROPHYTE_ORE"); + FUN_007a7b00(auStack_c8,0x37,200,0x37,600); + iVar5 = 0x20; +LAB_007823f0: + FUN_007aa754((int)&local_e8 + iVar5); + iVar17 = DAT_00902934; + iVar5 = DAT_00902928; + } + } +LAB_00782402: + fVar4 = DAT_00782460; + uVar10 = DAT_00fd67f8; + uVar16 = DAT_00fd6800; + uVar8 = DAT_00fd67fc; + if (DAT_00fe1f8d != '\0') { + uVar10 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + uVar16 = uVar10 ^ (uVar10 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar20 = (float)VectorSignedToFloat(uVar16 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67f4 = DAT_00fd67f8; + uVar10 = DAT_00fd67fc; + uVar8 = DAT_00fd6800; + if ((int)(fVar20 * DAT_00782460 * 3.0) != 0) { + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = uVar16; + return; + } + } + DAT_00fd67fc = uVar8; + DAT_00fd6800 = uVar16; + DAT_00fd67f8 = uVar10; + uVar10 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + uVar10 = uVar10 ^ (uVar10 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar20 = (float)VectorSignedToFloat(uVar10 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + if ((int)(fVar20 * DAT_00782460 * 4.0) == 0) { +switchD_007824da_caseD_72: + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = uVar10; + return; + } + uVar1 = *(ushort *)(local_e0 + 6); + if (0x99 < uVar1) { + if (uVar1 < 0xcc) { + if (uVar1 != 0xcb) { + if (uVar1 < 0xa5) { + if (uVar1 == 0xa4) goto switchD_007824da_caseD_71; + if (uVar1 != 0xa3) { + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = uVar10; + return; + } + goto switchD_007824da_caseD_70; + } + if (uVar1 < 199) { + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = uVar10; + return; + } + if (0xc9 < uVar1) { + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = uVar10; + return; + } + } + } + else if ((uVar1 != 0xcd) && (uVar1 != 0xea)) { + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = uVar10; + return; + } + do { + uVar16 = DAT_00fd67f8 ^ DAT_00fd67f8 << 0xb; + uVar16 = uVar16 ^ (uVar16 ^ uVar10 >> 0xb) >> 8 ^ uVar10; + uVar8 = DAT_00fd67fc ^ DAT_00fd67fc << 0xb; + fVar20 = (float)VectorSignedToFloat(uVar16 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + iVar18 = (local_e8 - (int)(fVar20 * fVar4 * -7.0)) + -3; + uVar8 = uVar8 ^ (uVar8 ^ uVar16 >> 0xb) >> 8 ^ uVar16; + fVar20 = (float)VectorSignedToFloat(uVar8 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + iVar7 = (local_d8 - (int)(fVar20 * fVar4 * -7.0)) + -3; + iVar5 = (iVar17 * iVar18 + iVar7) * 0xe + iVar5; + if ((*(short *)(iVar5 + -8) == 0x1b) && ((*(byte *)(iVar5 + -0xd) & 1) != 0)) { + bVar3 = true; + } + else { + bVar3 = false; + } + if (bVar3) { + DAT_00fd67f4 = DAT_00fd6800; + DAT_00fd67f8 = uVar10; + DAT_00fd67fc = uVar16; + DAT_00fd6800 = uVar8; + return; + } + uVar11 = (uint)*(ushort *)(iVar5 + 6); + DAT_00fd67f4 = DAT_00fd6800; + DAT_00fd67f8 = uVar10; + DAT_00fd67fc = uVar16; + if (((&DAT_010262d0)[uVar11 * 4] & 0x200000) == 0) { + if (0x3b < uVar11) { + if (uVar11 == 0x3c) { +LAB_00782948: + uVar12 = 199; + } + else { + if (uVar11 == 0x45) { + DAT_00fd6800 = uVar8; + FUN_00761b80(iVar18,iVar7); + goto LAB_0078294c; + } + if (uVar11 != 0xa1) { + DAT_00fd6800 = uVar8; + return; + } + uVar12 = 200; + } + goto LAB_0078294a; + } + if (uVar11 != 0x3b) { + if (uVar11 != 1) { + if (uVar11 != 2) { + if (uVar11 != 0x35) { + DAT_00fd6800 = uVar8; + return; + } + uVar12 = 0xea; + goto LAB_0078294a; + } + goto LAB_00782948; + } + goto LAB_0078290e; + } + DAT_00fd6800 = uVar8; + *(undefined2 *)(iVar5 + 6) = 0; + } + else { +LAB_0078290e: + uVar12 = 0xcb; +LAB_0078294a: + DAT_00fd6800 = uVar8; + *(undefined2 *)(iVar5 + 6) = uVar12; + } +LAB_0078294c: + FUN_007729e8(iVar18,iVar7,0xffffffff); + FUN_00649a94(iVar18,iVar7,0,0); + FUN_007ab078(auStack_68,"Spread Crimson"); + FUN_007a7b00(auStack_68,0x37,200,0x37,600); + FUN_007aa754(auStack_68); + uVar10 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + uVar10 = uVar10 ^ (uVar10 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar20 = (float)VectorSignedToFloat(uVar10 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + iVar17 = DAT_00902934; + iVar5 = DAT_00902928; + if ((int)(fVar20 * fVar4 * 2.0) != 0) { + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = uVar10; + return; + } + } while( true ); + } + if (uVar1 != 0x99) { + if (0x6e < uVar1) { + switch(uVar1) { + case 0x70: + goto switchD_007824da_caseD_70; + case 0x71: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + goto switchD_007824da_caseD_71; + default: + goto switchD_007824da_caseD_72; + } + } + if (0x6c < uVar1) { +switchD_007824da_caseD_71: + uVar16 = DAT_0103089c; + uVar8 = DAT_010308a4; + DAT_010308a4 = DAT_010308a0; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = uVar10; + do { + uVar10 = DAT_01030898 ^ DAT_01030898 << 0xb; + iVar7 = 10; + DAT_0103089c = uVar8; + uVar10 = uVar10 ^ (uVar10 ^ uVar8 >> 0xb) >> 8 ^ uVar8; + DAT_01030898 = DAT_010308a4; + while( true ) { + DAT_010308a0 = uVar10; + uVar16 = uVar16 ^ uVar16 << 0xb; + fVar20 = (float)VectorSignedToFloat(DAT_010308a0 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3 + ); + iVar7 = iVar7 + -1; + local_e0 = (local_e8 - (int)(fVar20 * fVar4 * -7.0)) + -3; + local_dc = uVar16 ^ (uVar16 ^ DAT_010308a0 >> 0xb) >> 8 ^ DAT_010308a0; + fVar20 = (float)VectorSignedToFloat(local_dc & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + iVar14 = (local_d8 - (int)(fVar20 * fVar4 * -7.0)) + -3; + iVar18 = (iVar17 * local_e0 + iVar14) * 0xe + iVar5; + if ((iVar7 < 1) && ((*(byte *)(iVar18 + 1) & 1) != 0)) break; + uVar10 = DAT_01030898 ^ DAT_01030898 << 0xb; + uVar16 = DAT_0103089c; + DAT_0103089c = local_dc; + uVar10 = uVar10 ^ (uVar10 ^ local_dc >> 0xb) >> 8 ^ local_dc; + DAT_01030898 = DAT_010308a0; + } + uVar10 = (uint)*(ushort *)(iVar18 + 6); + DAT_010308a4 = local_dc; + if (((&DAT_010262d0)[uVar10 * 4] & 0x200000) == 0) { + if (0x3b < uVar10) { + if ((uVar10 != 0x7f) && (uVar10 != 0xa1)) { + return; + } + uVar12 = 0xa4; + goto LAB_007827a8; + } + if (uVar10 != 0x3b) { + if (uVar10 == 1) goto LAB_00782776; + if (uVar10 == 2) { + uVar12 = 0x6d; + } + else { + if (uVar10 != 0x35) { + return; + } + uVar12 = 0x74; + } + goto LAB_007827a8; + } + *(undefined2 *)(iVar18 + 6) = 0; + } + else { +LAB_00782776: + uVar12 = 0x75; +LAB_007827a8: + *(undefined2 *)(iVar18 + 6) = uVar12; + } + local_e4 = iVar14; + FUN_007729e8(local_e0,iVar14,0xffffffff); + FUN_00649a94(local_e0,iVar14,0,0); + FUN_007ab078(auStack_98,"Spread Hallow"); + FUN_007a7b00(auStack_98,0x37,200,0x37,600); + FUN_007aa754(auStack_98); + uVar10 = DAT_01030898 ^ DAT_01030898 << 0xb; + uVar8 = uVar10 ^ (uVar10 ^ DAT_010308a4 >> 0xb) >> 8 ^ DAT_010308a4; + fVar20 = (float)VectorSignedToFloat(uVar8 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + uVar16 = DAT_010308a0; + DAT_01030898 = DAT_0103089c; + iVar17 = DAT_00902934; + iVar5 = DAT_00902928; + if ((int)(fVar20 * fVar4 * 2.0) == 0) { + DAT_0103089c = DAT_010308a0; + DAT_010308a0 = DAT_010308a4; + DAT_010308a4 = uVar8; + return; + } + } while( true ); + } + if (((uVar1 != 0x17) && (uVar1 != 0x19)) && (uVar1 != 0x20)) { + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = uVar10; + return; + } + } +switchD_007824da_caseD_70: + do { + uVar16 = DAT_00fd67f8 ^ DAT_00fd67f8 << 0xb; + uVar16 = uVar16 ^ (uVar16 ^ uVar10 >> 0xb) >> 8 ^ uVar10; + fVar20 = (float)VectorSignedToFloat(uVar16 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + iVar7 = (local_e8 - (int)(fVar20 * fVar4 * -7.0)) + -3; + uVar8 = DAT_00fd67fc ^ DAT_00fd67fc << 0xb; + uVar8 = uVar8 ^ (uVar8 ^ uVar16 >> 0xb) >> 8 ^ uVar16; + fVar20 = (float)VectorSignedToFloat(uVar8 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + iVar18 = (local_d8 - (int)(fVar20 * fVar4 * -7.0)) + -3; + iVar5 = (iVar17 * iVar7 + iVar18) * 0xe + iVar5; + if ((*(short *)(iVar5 + -8) == 0x1b) && ((*(byte *)(iVar5 + -0xd) & 1) != 0)) { + bVar3 = true; + } + else { + bVar3 = false; + } + if (bVar3) { + DAT_00fd67f4 = DAT_00fd6800; + DAT_00fd67f8 = uVar10; + DAT_00fd67fc = uVar16; + DAT_00fd6800 = uVar8; + return; + } + uVar11 = (uint)*(ushort *)(iVar5 + 6); + DAT_00fd67f4 = DAT_00fd6800; + DAT_00fd67f8 = uVar10; + DAT_00fd67fc = uVar16; + if (((&DAT_010262d0)[uVar11 * 4] & 0x200000) == 0) { + if (0x3b < uVar11) { + if (uVar11 == 0x3c) { +LAB_007825f8: + uVar12 = 0x17; + } + else if (uVar11 == 0x45) { + uVar12 = 0x20; + } + else { + if (uVar11 != 0xa1) { + DAT_00fd6800 = uVar8; + return; + } + uVar12 = 0xa3; + } + goto LAB_007825fa; + } + if (uVar11 != 0x3b) { + if (uVar11 == 1) goto LAB_007825c0; + if (uVar11 == 2) goto LAB_007825f8; + if (uVar11 != 0x35) { + DAT_00fd6800 = uVar8; + return; + } + uVar12 = 0x70; + goto LAB_007825fa; + } + DAT_00fd6800 = uVar8; + *(undefined2 *)(iVar5 + 6) = 0; + } + else { +LAB_007825c0: + uVar12 = 0x19; +LAB_007825fa: + DAT_00fd6800 = uVar8; + *(undefined2 *)(iVar5 + 6) = uVar12; + } + local_e4 = iVar7; + FUN_007729e8(iVar7,iVar18,0xffffffff); + FUN_00649a94(iVar7,iVar18,0,0); + FUN_007ab078(auStack_c8,"Spread Corruption"); + FUN_007a7b00(auStack_c8,0x37,200,0x37,600); + FUN_007aa754(auStack_c8); + uVar10 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + uVar10 = uVar10 ^ (uVar10 ^ DAT_00fd6800 >> 0xb) >> 8 ^ DAT_00fd6800; + fVar20 = (float)VectorSignedToFloat(uVar10 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + iVar17 = DAT_00902934; + iVar5 = DAT_00902928; + if ((int)(fVar20 * fVar4 * 2.0) != 0) { + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd6800; + DAT_00fd6800 = uVar10; + return; + } + } while( true ); +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/00783400.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/00783400.c new file mode 100644 index 000000000..73ff1fc45 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/00783400.c @@ -0,0 +1,255 @@ + +void FUN_00783400(int param_1,int param_2,int param_3) + +{ + short sVar1; + byte bVar2; + bool bVar3; + uint uVar4; + int iVar5; + int iVar6; + int iVar7; + uint uVar8; + bool bVar9; + uint uVar10; + int iVar11; + int iVar12; + int iVar13; + uint uVar14; + uint uVar15; + uint in_fpscr; + float fVar16; + float fVar17; + + uVar4 = DAT_00fd67fc; + uVar15 = DAT_00fd67f8; + uVar10 = DAT_00fd67f4; + fVar17 = DAT_00783498; + uVar8 = DAT_00fd67f8; + uVar14 = DAT_00fd6800; + if ((DAT_010338d3 != '\0') && (DAT_00fe1f8b != '\0')) { + DAT_00fd67f4 = DAT_00fd67f8; + uVar10 = uVar10 ^ uVar10 << 0xb; + DAT_00fd67f8 = DAT_00fd67fc; + uVar14 = DAT_00fd6800 ^ (uVar10 ^ DAT_00fd6800 >> 0xb) >> 8 ^ uVar10; + DAT_00fd67fc = DAT_00fd6800; + fVar16 = (float)VectorSignedToFloat(uVar14 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + uVar8 = uVar4; + uVar10 = uVar15; + if ((int)(fVar16 * DAT_00783498 * 30.0) == 0) { + DAT_00fd6800 = uVar14; + FUN_007765c4(param_1,param_2); + return; + } + } + DAT_00fd67f4 = uVar8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar15 = uVar14; + if (DAT_010338d3 != '\0') { + uVar10 = uVar10 ^ uVar10 << 0xb; + uVar15 = uVar14 ^ (uVar10 ^ uVar14 >> 0xb) >> 8 ^ uVar10; + fVar16 = (float)VectorSignedToFloat(uVar15 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67f4 = DAT_00fd67fc; + DAT_00fd67f8 = uVar14; + uVar10 = uVar8; + if ((int)(fVar16 * DAT_00783498 * 10.0) == 0) { + iVar5 = param_1 + -0x1e; + bVar9 = true; + if (iVar5 < param_1 + 0x1e) { + iVar11 = DAT_00902934 * iVar5; + iVar6 = param_2 + -0x1e; + do { + for (; iVar6 < param_2 + 0x1e; iVar6 = iVar6 + 2) { + if ((((1 < iVar5) && (iVar5 < DAT_00902ea0 + -2)) && (1 < iVar6)) && + (iVar6 < DAT_00902ea4 + -2)) { + iVar7 = (iVar11 + iVar6) * 0xe + DAT_00902928; + if ((*(short *)(iVar7 + 6) == 0xec) && ((*(byte *)(iVar7 + 1) & 1) != 0)) { + bVar3 = true; + } + else { + bVar3 = false; + } + if (bVar3) { + bVar9 = false; + break; + } + } + } + if (!bVar9) break; + iVar5 = iVar5 + 2; + iVar11 = iVar11 + DAT_00902934 * 2; + iVar6 = param_2 + -0x1e; + } while (iVar5 < param_1 + 0x1e); + } + if (!bVar9) { + DAT_00fd67f4 = uVar8; + DAT_00fd67f8 = DAT_00fd67fc; + DAT_00fd67fc = uVar14; + DAT_00fd6800 = uVar15; + return; + } + uVar8 = uVar8 ^ uVar8 << 0xb; + DAT_00fd6800 = uVar15 ^ (uVar8 ^ uVar15 >> 0xb) >> 8 ^ uVar8; + fVar17 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67fc = uVar15; + if (((param_1 < 5) || (DAT_00902ea0 + -5 < param_1)) || + ((param_3 < 5 || (DAT_00902ea4 + -5 < param_3)))) { +LAB_0078374c: + bVar9 = false; + } + else { + iVar5 = param_1 + -1; + if (iVar5 < param_1 + 1) { + iVar6 = DAT_00902934 * iVar5; + iVar11 = param_3 + -1; + iVar7 = (iVar6 + param_3 + 1) * 0xe + DAT_00902928; + do { + if (iVar11 < param_3 + 1) { + iVar12 = (iVar6 + iVar11) * 0xe + DAT_00902928; + iVar13 = iVar11; + do { + sVar1 = *(short *)(iVar12 + 6); + if ((sVar1 == 0xb9) && (*(short *)(iVar12 + 0xc) == 0)) { + bVar9 = true; + } + else { + bVar9 = false; + } + if ((((((*(byte *)(iVar12 + 1) & 1) != 0) && (sVar1 != 0x3d)) && (sVar1 != 0x3e)) && + (((sVar1 != 0x45 && (sVar1 != 0x4a)) && ((sVar1 != 0xe9 && (!bVar9)))))) || + (sVar1 == 5)) goto LAB_0078374c; + iVar13 = iVar13 + 1; + iVar12 = iVar12 + 0xe; + } while (iVar13 < param_3 + 1); + } + if (*(short *)(iVar7 + 6) != 0x3c) goto LAB_0078374c; + bVar2 = *(byte *)(iVar7 + 1); + if ((((bVar2 & 1) == 0) || ((bVar2 & 2) != 0)) || + (((bVar2 & 0x18) != 0 || (((bVar2 & 4) != 0 || ((DAT_01026690 & 3) != 1)))))) { + bVar9 = false; + } + else { + bVar9 = true; + } + if (!bVar9) goto LAB_0078374c; + iVar5 = iVar5 + 1; + iVar6 = iVar6 + DAT_00902934; + iVar7 = DAT_00902934 * 0xe + iVar7; + } while (iVar5 < param_1 + 1); + } + sVar1 = (short)(int)(fVar17 * DAT_00783498 * 3.0) * 0x24; + iVar5 = (DAT_00902934 * param_1 + param_3) * 0xe + DAT_00902928; + *(undefined2 *)(iVar5 + 6) = 0xec; + *(short *)(iVar5 + 10) = sVar1 + 0x12; + *(byte *)(iVar5 + 1) = *(byte *)(iVar5 + 1) | 1; + *(undefined2 *)(iVar5 + 0xc) = 0x12; + *(short *)(iVar5 + -4) = sVar1 + 0x12; + *(undefined2 *)(iVar5 + -8) = 0xec; + *(byte *)(iVar5 + -0xd) = *(byte *)(iVar5 + -0xd) | 1; + *(undefined2 *)(iVar5 + -2) = 0; + *(undefined2 *)(iVar5 + -0x36b8) = 0xec; + *(short *)(iVar5 + -0x36b4) = sVar1; + *(byte *)(iVar5 + -0x36bd) = *(byte *)(iVar5 + -0x36bd) | 1; + *(undefined2 *)(iVar5 + -0x36b2) = 0; + *(undefined2 *)(iVar5 + -0x36aa) = 0xec; + *(byte *)(iVar5 + -13999) = *(byte *)(iVar5 + -13999) | 1; + bVar9 = true; + *(short *)(iVar5 + -0x36a6) = sVar1; + *(undefined2 *)(iVar5 + -0x36a4) = 0x12; + } + if (!bVar9) { + return; + } + FUN_007729e8(param_1,param_3,0xffffffff); + FUN_007729e8(param_1 + 1,param_3 + 1,0xffffffff); + FUN_006496ec(param_1,param_3,4); + return; + } + } + uVar10 = uVar10 ^ uVar10 << 0xb; + DAT_00fd6800 = uVar15 ^ (uVar10 ^ uVar15 >> 0xb) >> 8 ^ uVar10; + fVar16 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd67fc = uVar15; + iVar5 = FUN_00754a00(param_1,param_3,0xe9,(int)(fVar16 * DAT_00783498 * 8.0),0); + if (iVar5 != 0) { + FUN_006496ec(param_1,param_3,4); + return; + } + uVar10 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar10 = DAT_00fd6800 ^ (uVar10 ^ DAT_00fd6800 >> 0xb) >> 8 ^ uVar10; + DAT_00fd67fc = DAT_00fd6800; + fVar16 = (float)VectorSignedToFloat(uVar10 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd6800 = uVar10; + if ((((param_1 < 5) || (DAT_00902ea0 + -5 < param_1)) || (param_3 < 5)) || + (DAT_00902ea4 + -5 < param_3)) { +LAB_007839d6: + bVar9 = false; + } + else { + iVar5 = param_1 + -1; + if (iVar5 < param_1 + 1) { + iVar6 = iVar5 * DAT_00902934; + iVar11 = param_3 + -1; + iVar7 = (iVar6 + param_3 + 1) * 0xe + DAT_00902928; + do { + if (iVar11 < param_3 + 1) { + iVar12 = (iVar6 + iVar11) * 0xe + DAT_00902928; + iVar13 = iVar11; + do { + sVar1 = *(short *)(iVar12 + 6); + if ((sVar1 == 0xb9) && (*(short *)(iVar12 + 0xc) == 0)) { + bVar9 = true; + } + else { + bVar9 = false; + } + if (((((*(byte *)(iVar12 + 1) & 1) != 0) && (sVar1 != 0x3d)) && + ((sVar1 != 0x3e && (((sVar1 != 0x45 && (sVar1 != 0x4a)) && (!bVar9)))))) || + (sVar1 == 5)) goto LAB_007839d6; + iVar13 = iVar13 + 1; + iVar12 = iVar12 + 0xe; + } while (iVar13 < param_3 + 1); + } + if (*(short *)(iVar7 + 6) != 0x3c) goto LAB_007839d6; + bVar2 = *(byte *)(iVar7 + 1); + if ((((bVar2 & 1) == 0) || ((bVar2 & 2) != 0)) || + (((bVar2 & 0x18) != 0 || (((bVar2 & 4) != 0 || ((DAT_01026690 & 3) != 1)))))) { + bVar9 = false; + } + else { + bVar9 = true; + } + if (!bVar9) goto LAB_007839d6; + iVar5 = iVar5 + 1; + iVar6 = iVar6 + DAT_00902934; + iVar7 = DAT_00902934 * 0xe + iVar7; + } while (iVar5 < param_1 + 1); + } + sVar1 = (short)(int)(fVar16 * fVar17 * 12.0) * 0x24; + iVar5 = (DAT_00902934 * param_1 + param_3) * 0xe + DAT_00902928; + *(undefined2 *)(iVar5 + 6) = 0xe9; + *(short *)(iVar5 + 10) = sVar1 + 0x12; + *(byte *)(iVar5 + 1) = *(byte *)(iVar5 + 1) | 1; + *(undefined2 *)(iVar5 + 0xc) = 0x36; + *(short *)(iVar5 + -4) = sVar1 + 0x12; + *(undefined2 *)(iVar5 + -8) = 0xe9; + *(byte *)(iVar5 + -0xd) = *(byte *)(iVar5 + -0xd) | 1; + *(undefined2 *)(iVar5 + -2) = 0x24; + *(undefined2 *)(iVar5 + -0x36b8) = 0xe9; + *(short *)(iVar5 + -0x36b4) = sVar1; + *(byte *)(iVar5 + -0x36bd) = *(byte *)(iVar5 + -0x36bd) | 1; + *(undefined2 *)(iVar5 + -0x36b2) = 0x24; + *(undefined2 *)(iVar5 + -0x36aa) = 0xe9; + *(byte *)(iVar5 + -13999) = *(byte *)(iVar5 + -13999) | 1; + bVar9 = true; + *(short *)(iVar5 + -0x36a6) = sVar1; + *(undefined2 *)(iVar5 + -0x36a4) = 0x36; + } + if (bVar9) { + FUN_006496ec(param_1,param_3,3); + } + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/00783b20.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/00783b20.c new file mode 100644 index 000000000..32738b6fe --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/00783b20.c @@ -0,0 +1,793 @@ + +void FUN_00783b20(int param_1,int param_2,int param_3) + +{ + bool bVar1; + short *psVar2; + int iVar3; + int iVar4; + int iVar5; + int iVar6; + int iVar7; + short sVar8; + short sVar9; + uint uVar10; + int iVar11; + int iVar12; + uint in_fpscr; + float fVar13; + undefined4 uVar14; + undefined4 uVar15; + float fVar16; + undefined4 uVar17; + short local_50 [8]; + short local_40 [14]; + + iVar5 = 0; + if (0 < DAT_0102a744) { + psVar2 = &DAT_0102e668; + do { + if ((*psVar2 == param_1) && (psVar2[1] == param_2)) { + return; + } + iVar5 = iVar5 + 1; + psVar2 = psVar2 + 2; + } while (iVar5 < DAT_0102a744); + } + sVar9 = *(short *)(param_3 + 6); + if (((*(byte *)(param_3 + 1) & 0x80) != 0) && + (((sVar9 != 0xe2 || (param_2 <= DAT_00902ebc)) || (DAT_00fe1f8d != '\0')))) { + if ((*(byte *)(param_3 + 1) & 2) == 0) { + iVar5 = FUN_0073103c((DAT_00902934 * param_1 + param_2) * 0xe + DAT_00902928); + if ((iVar5 != 0) && (FUN_007729e8(param_1,param_2,0), DAT_00fe1ec4 != 1)) { + FUN_00649a94(param_1,param_2,0,0); + } + } + else { + FUN_007746dc(param_1,param_2); + } + } + if ((*(byte *)(param_3 + 1) & 1) == 0) { + return; + } + if (sVar9 == 0x90) { + FUN_00772d30(param_1,param_2); + } + else { + if ((sVar9 != 0x82) && (sVar9 != 0x83)) { + if (sVar9 == 0xb) { + FUN_00772624(param_1,param_2,1); + FUN_006494f4(param_1,param_2); + return; + } + if (sVar9 == 10) { + iVar5 = FUN_00608330(&DAT_00fd67f4,2); + iVar5 = FUN_00776dc8(param_1,param_2,iVar5 * 2 + -1); + if (iVar5 == 0) { + return; + } + FUN_00648da4(param_1,param_2,iVar5); + return; + } + if (sVar9 == 0xd8) { + FUN_007523e8(param_1,param_2); + FUN_0074a708(param_1,param_2); + return; + } + if (sVar9 == 0xeb) { + iVar5 = (int)((ulonglong)((longlong)(int)*(short *)(param_3 + 10) * (longlong)DAT_00784364) + >> 0x20); + param_1 = param_1 - ((iVar5 >> 2) - (iVar5 >> 0x1f)); + if (((*(char *)(param_3 + 8) == 'W') && (DAT_00902ebc < param_2)) && (DAT_00fe1f8d == '\0')) + { + return; + } + uVar10 = in_fpscr & 0xfffffff; + if (DAT_01033500 < 0.0) { + DAT_01033500 = (float)VectorSignedToFloat(param_1,(byte)(uVar10 >> 0x16) & 3); + DAT_01033504 = (float)VectorSignedToFloat(param_2,(byte)(uVar10 >> 0x16) & 3); + if ((*(byte *)(param_3 + 1) & 4) == 0) { + return; + } + DAT_01033504 = DAT_01033504 + 0.5; + return; + } + fVar16 = (float)VectorSignedToFloat(param_1,(byte)(uVar10 >> 0x16) & 3); + if ((DAT_01033500 == fVar16) && + (fVar13 = (float)VectorSignedToFloat(param_2,(byte)(uVar10 >> 0x16) & 3), + DAT_01033504 == fVar13)) { + return; + } + DAT_01033508 = fVar16; + DAT_0103350c = (float)VectorSignedToFloat(param_2,(byte)(uVar10 >> 0x16) & 3); + if ((*(byte *)(param_3 + 1) & 4) == 0) { + return; + } + DAT_0103350c = DAT_0103350c + 0.5; + return; + } + if (sVar9 == 4) { + sVar9 = *(short *)(param_3 + 10); + if (sVar9 < 0x42) { + *(short *)(param_3 + 10) = sVar9 + 0x42; + } + else { + *(short *)(param_3 + 10) = sVar9 + -0x42; + } + } + else { + if (sVar9 != 0x95) { + if (sVar9 == 0xf4) { + iVar5 = (int)((ulonglong) + ((longlong)(int)*(short *)(param_3 + 10) * (longlong)DAT_00784364) >> 0x20 + ); + iVar5 = (iVar5 >> 2) - (iVar5 >> 0x1f); + iVar6 = (int)((ulonglong)((longlong)iVar5 * (longlong)DAT_00784368) >> 0x20); + param_1 = param_1 + ((iVar6 - (iVar6 >> 0x1f)) * 3 - iVar5); + iVar5 = (int)((ulonglong) + ((longlong)(int)*(short *)(param_3 + 0xc) * (longlong)DAT_00784364) >> + 0x20); + iVar5 = (iVar5 >> 2) - (iVar5 >> 0x1f); + iVar6 = (int)((ulonglong)((longlong)iVar5 * (longlong)DAT_00784368) >> 0x20); + param_2 = param_2 - (iVar5 + (iVar6 - (iVar6 >> 0x1f)) * -3); + sVar9 = 0x36; + if (0x35 < *(short *)(param_3 + 10)) { + sVar9 = -0x36; + } + iVar5 = param_1 + 3; + if (iVar5 <= param_1) { + return; + } + iVar6 = param_2; + do { + for (; iVar6 < param_2 + 2; iVar6 = iVar6 + 1) { + FUN_0074a708(param_1,iVar6); + iVar3 = (DAT_00902934 * param_1 + iVar6) * 0xe + DAT_00902928; + *(short *)(iVar3 + 10) = *(short *)(iVar3 + 10) + sVar9; + } + param_1 = param_1 + 1; + iVar6 = param_2; + } while (param_1 < iVar5); + return; + } + if (sVar9 == 0x2a) { + iVar5 = (DAT_00902934 * param_1 + param_2) * 0xe + DAT_00902928; + iVar6 = (int)((ulonglong) + ((longlong)(int)*(short *)(iVar5 + 0xc) * (longlong)DAT_00784364) >> 0x20) + ; + iVar6 = param_2 - ((iVar6 >> 2) - (iVar6 >> 0x1f) & 1U); + sVar9 = 0x12; + if (0 < *(short *)(iVar5 + 10)) { + sVar9 = -0x12; + } + iVar5 = (DAT_00902934 * param_1 + iVar6) * 0xe + DAT_00902928; + *(short *)(iVar5 + 10) = *(short *)(iVar5 + 10) + sVar9; + iVar5 = (DAT_00902934 * param_1 + iVar6) * 0xe + DAT_00902928; + *(short *)(iVar5 + 0x18) = *(short *)(iVar5 + 0x18) + sVar9; + FUN_0074a708(param_1,iVar6); + FUN_0074a708(param_1,iVar6 + 1); + FUN_006496ec(param_1,param_2,2); + return; + } + if (sVar9 == 0x5d) { + iVar5 = (DAT_00902934 * param_1 + param_2) * 0xe + DAT_00902928; + iVar6 = (int)((ulonglong) + ((longlong)(int)*(short *)(iVar5 + 0xc) * (longlong)DAT_00784364) >> 0x20) + ; + param_2 = param_2 - ((iVar6 >> 2) - (iVar6 >> 0x1f)); + sVar9 = 0x12; + if (0 < *(short *)(iVar5 + 10)) { + sVar9 = -0x12; + } + iVar5 = (DAT_00902934 * param_1 + param_2) * 0xe + DAT_00902928; + *(short *)(iVar5 + 10) = *(short *)(iVar5 + 10) + sVar9; + iVar5 = (DAT_00902934 * param_1 + param_2) * 0xe + DAT_00902928; + *(short *)(iVar5 + 0x18) = *(short *)(iVar5 + 0x18) + sVar9; + iVar5 = (DAT_00902934 * param_1 + param_2) * 0xe + DAT_00902928; + *(short *)(iVar5 + 0x26) = *(short *)(iVar5 + 0x26) + sVar9; + FUN_0074a708(param_1,param_2); + FUN_0074a708(param_1,param_2 + 1); + FUN_0074a708(param_1,param_2 + 2); + FUN_006496ec(param_1,param_2 + 1,3); + return; + } + if (((sVar9 == 0xad) || (sVar9 == 0x7e)) || ((sVar9 == 100 || (sVar9 == 0x5f)))) { + iVar5 = (DAT_00902934 * param_1 + param_2) * 0xe + DAT_00902928; + iVar6 = (int)((ulonglong) + ((longlong)(int)*(short *)(iVar5 + 0xc) * (longlong)DAT_00784c10) >> 0x20) + ; + param_2 = param_2 - ((iVar6 >> 2) - (iVar6 >> 0x1f)); + iVar5 = (int)((ulonglong) + ((longlong)(int)*(short *)(iVar5 + 10) * (longlong)DAT_00784c10) >> 0x20); + param_1 = param_1 - ((iVar5 >> 2) - (iVar5 >> 0x1f) & 1U); + iVar5 = (DAT_00902934 * param_1 + param_2) * 0xe + DAT_00902928; + sVar9 = 0x24; + if (0 < *(short *)(iVar5 + 10)) { + sVar9 = -0x24; + } + iVar6 = param_1 + 1; + *(short *)(iVar5 + 10) = *(short *)(iVar5 + 10) + sVar9; + iVar5 = (DAT_00902934 * param_1 + param_2) * 0xe + DAT_00902928; + *(short *)(iVar5 + 0x18) = *(short *)(iVar5 + 0x18) + sVar9; + iVar5 = (iVar6 * DAT_00902934 + param_2) * 0xe + DAT_00902928; + *(short *)(iVar5 + 10) = *(short *)(iVar5 + 10) + sVar9; + iVar5 = (iVar6 * DAT_00902934 + param_2) * 0xe + DAT_00902928; + *(short *)(iVar5 + 0x18) = *(short *)(iVar5 + 0x18) + sVar9; + FUN_0074a708(param_1,param_2); + FUN_0074a708(param_1,param_2 + 1); + FUN_0074a708(iVar6,param_2); + FUN_0074a708(iVar6,param_2 + 1); + FUN_006496ec(param_1,param_2,3); + return; + } + if (sVar9 == 0x22) { + iVar5 = (DAT_00902934 * param_1 + param_2) * 0xe + DAT_00902928; + iVar6 = (int)((ulonglong) + ((longlong)(int)*(short *)(iVar5 + 0xc) * (longlong)DAT_00784364) >> 0x20) + ; + iVar6 = (iVar6 >> 2) - (iVar6 >> 0x1f); + iVar3 = (int)((ulonglong)((longlong)iVar6 * (longlong)DAT_00784368) >> 0x20); + param_2 = param_2 - (iVar6 + (iVar3 - (iVar3 >> 0x1f)) * -3); + iVar5 = (int)((ulonglong) + ((longlong)(int)*(short *)(iVar5 + 10) * (longlong)DAT_00784364) >> 0x20); + iVar5 = (iVar5 >> 2) - (iVar5 >> 0x1f); + iVar6 = (int)((ulonglong)((longlong)iVar5 * (longlong)DAT_00784368) >> 0x20); + param_1 = param_1 + ((iVar6 - (iVar6 >> 0x1f)) * 3 - iVar5); + sVar9 = 0x36; + if (0 < *(short *)((DAT_00902934 * param_1 + param_2) * 0xe + DAT_00902928 + 10)) { + sVar9 = -0x36; + } + if (param_1 < param_1 + 3) { + iVar5 = param_2; + iVar6 = DAT_00902928; + iVar3 = DAT_00902934; + iVar12 = param_1; + do { + for (; iVar5 < param_2 + 3; iVar5 = iVar5 + 1) { + iVar6 = (iVar3 * iVar12 + iVar5) * 0xe + iVar6; + *(short *)(iVar6 + 10) = *(short *)(iVar6 + 10) + sVar9; + FUN_0074a708(iVar12,iVar5); + iVar6 = DAT_00902928; + iVar3 = DAT_00902934; + } + iVar12 = iVar12 + 1; + iVar5 = param_2; + } while (iVar12 < param_1 + 3); + } + FUN_006496ec(param_1 + 1,param_2 + 1,3); + return; + } + if ((sVar9 == 0x21) || (sVar9 == 0xae)) { + sVar9 = 0x12; + iVar5 = (DAT_00902934 * param_1 + param_2) * 0xe + DAT_00902928; + if (0 < *(short *)(iVar5 + 10)) { + sVar9 = -0x12; + } + *(short *)(iVar5 + 10) = *(short *)(iVar5 + 10) + sVar9; + FUN_006496ec(param_1,param_2,3); + return; + } + if (sVar9 == 0x5c) { + iVar5 = (DAT_00902934 * param_1 + param_2) * 0xe + DAT_00902928; + iVar6 = (int)((ulonglong) + ((longlong)(int)*(short *)(iVar5 + 0xc) * (longlong)DAT_00784364) >> 0x20) + ; + param_2 = param_2 - ((iVar6 >> 2) - (iVar6 >> 0x1f)); + sVar9 = 0x12; + if (0 < *(short *)(iVar5 + 10)) { + sVar9 = -0x12; + } + iVar5 = (DAT_00902934 * param_1 + param_2) * 0xe + DAT_00902928; + *(short *)(iVar5 + 10) = *(short *)(iVar5 + 10) + sVar9; + iVar5 = (DAT_00902934 * param_1 + param_2) * 0xe + DAT_00902928; + *(short *)(iVar5 + 0x18) = *(short *)(iVar5 + 0x18) + sVar9; + iVar5 = (DAT_00902934 * param_1 + param_2) * 0xe + DAT_00902928; + *(short *)(iVar5 + 0x26) = *(short *)(iVar5 + 0x26) + sVar9; + iVar5 = (DAT_00902934 * param_1 + param_2) * 0xe + DAT_00902928; + *(short *)(iVar5 + 0x34) = *(short *)(iVar5 + 0x34) + sVar9; + iVar5 = (DAT_00902934 * param_1 + param_2) * 0xe + DAT_00902928; + *(short *)(iVar5 + 0x42) = *(short *)(iVar5 + 0x42) + sVar9; + iVar5 = (DAT_00902934 * param_1 + param_2) * 0xe + DAT_00902928; + *(short *)(iVar5 + 0x50) = *(short *)(iVar5 + 0x50) + sVar9; + FUN_0074a708(param_1,param_2); + FUN_0074a708(param_1,param_2 + 1); + FUN_0074a708(param_1,param_2 + 2); + FUN_0074a708(param_1,param_2 + 3); + FUN_0074a708(param_1,param_2 + 4); + FUN_0074a708(param_1,param_2 + 5); + FUN_006496ec(param_1,param_2 + 3,7); + return; + } + if (sVar9 == 0x89) { + iVar5 = (int)((ulonglong) + ((longlong)(int)*(short *)(param_3 + 0xc) * (longlong)DAT_00784364) >> + 0x20); + switch((iVar5 >> 2) - (iVar5 >> 0x1f)) { + case 0: + goto switchD_0078416e_caseD_0; + case 1: + iVar5 = FUN_0074a6a8(param_1,param_2,0xb4); + if (iVar5 == 0) { + return; + } + if (*(short *)(param_3 + 10) == 0) { + iVar5 = -1; + } + else { + iVar5 = 1; + } + uVar17 = VectorSignedToFloat(iVar5 * 0xc,(byte)(in_fpscr >> 0x16) & 3); + uVar15 = VectorSignedToFloat(param_2 * 0x10 + 9,(byte)(in_fpscr >> 0x16) & 3); + uVar14 = VectorSignedToFloat(param_1 * 0x10 + iVar5 * 10 + 8, + (byte)(in_fpscr >> 0x16) & 3); + FUN_006f7004(uVar14,uVar15,uVar17,DAT_00784360,0x40000000,DAT_00784360,DAT_00784360, + 0xb8,0x28,4); + return; + case 2: + iVar5 = FUN_0074a6a8(param_1,param_2,0xb4); + if (iVar5 == 0) { + return; + } + if (*(short *)(param_3 + 10) == 0) { + iVar5 = -1; + } + else { + iVar5 = 1; + } + uVar17 = VectorSignedToFloat(iVar5 * 0xc,(byte)(in_fpscr >> 0x16) & 3); + uVar15 = VectorSignedToFloat(param_2 * 0x10 + 9,(byte)(in_fpscr >> 0x16) & 3); + uVar14 = VectorSignedToFloat(param_1 * 0x10 + iVar5 * 10 + 8, + (byte)(in_fpscr >> 0x16) & 3); + FUN_006f7004(uVar14,uVar15,uVar17,DAT_00784360,0x40000000,DAT_00784360,DAT_00784360, + 0xbb,0x28,4); + return; + case 3: + iVar5 = FUN_0074a6a8(param_1,param_2,0xf0); + if (iVar5 == 0) { + return; + } + uVar14 = FUN_005c4e6c(&DAT_00fd67f4,0xffffffec,0x15); + uVar15 = FUN_005c4e6c(&DAT_00fd67f4,0,0x15); + fVar16 = (float)VectorSignedToFloat(uVar14,(byte)(in_fpscr >> 0x16) & 3); + fVar13 = (float)VectorSignedToFloat(uVar15,(byte)(in_fpscr >> 0x16) & 3); + uVar15 = VectorSignedToFloat(param_2 * 0x10 + 0x16,(byte)(in_fpscr >> 0x16) & 3); + uVar14 = VectorSignedToFloat(param_1 * 0x10 + 8,(byte)(in_fpscr >> 0x16) & 3); + FUN_006f7004(uVar14,uVar15,fVar16 * DAT_0078435c,fVar13 * DAT_0078435c + 4.0, + 0x40000000,DAT_00784360,DAT_00784360,0xb9,0x28,4); + return; + default: + iVar5 = FUN_0074a6a8(param_1,param_2,0x5a); + if (iVar5 == 0) { + return; + } + uVar15 = VectorSignedToFloat(param_2 * 0x10 + 0x1a,(byte)(in_fpscr >> 0x16) & 3); + uVar14 = VectorSignedToFloat(param_1 * 0x10 + 8,(byte)(in_fpscr >> 0x16) & 3); + FUN_006f7004(uVar14,uVar15,DAT_007846e8,0x41000000,0x40000000,DAT_007846e8, + DAT_007846e8,0xba,0x3c,4); + return; + } + } + if ((sVar9 == 0x8b) || (sVar9 == 0x23)) { + FUN_0075425c(param_1,param_2); + return; + } + if (sVar9 == 0xcf) { + FUN_00754178(param_1,param_2); + return; + } + if (sVar9 == 0xd2) { + FUN_00777104(param_1,param_2); + return; + } + if (sVar9 == 0x8d) { + FUN_007743f8(param_1,param_2,0,0,1,0); + FUN_00649a94(param_1,param_2,0,0); + uVar15 = VectorSignedToFloat(param_2 * 0x10 + 8,(byte)(in_fpscr >> 0x16) & 3); + uVar14 = VectorSignedToFloat(param_1 * 0x10 + 8,(byte)(in_fpscr >> 0x16) & 3); + FUN_006f7004(uVar14,uVar15,DAT_007846e8,DAT_007846e8,0x41200000,DAT_007846e8, + DAT_007846e8,0x6c,0xfa,4); + return; + } + if ((sVar9 == 0x8e) || (sVar9 == 0x8f)) { + iVar5 = (DAT_00902934 * param_1 + param_2) * 0xe + DAT_00902928; + iVar6 = (int)((ulonglong) + ((longlong)(int)*(short *)(iVar5 + 0xc) * (longlong)DAT_00784c10) >> 0x20) + ; + param_2 = param_2 - ((iVar6 >> 2) - (iVar6 >> 0x1f)); + iVar5 = (int)((ulonglong) + ((longlong)(int)*(short *)(iVar5 + 10) * (longlong)DAT_00784c10) >> 0x20); + iVar5 = (iVar5 >> 2) - (iVar5 >> 0x1f); + if (1 < iVar5) { + iVar5 = iVar5 + -2; + } + param_1 = param_1 - iVar5; + FUN_0074a708(param_1,param_2); + FUN_0074a708(param_1,param_2 + 1); + FUN_0074a708(param_1 + 1,param_2); + FUN_0074a708(param_1 + 1,param_2 + 1); + sVar8 = (short)param_1; + if (sVar9 == 0x8e) { + iVar5 = 0; + psVar2 = &DAT_010305a8 + DAT_0102a748 * 2; + do { + if (0x12 < DAT_0102a748) { + return; + } + sVar9 = sVar8; + if (iVar5 == 0) { + iVar6 = param_2 + 1; + } + else if (iVar5 == 1) { + iVar6 = param_2 + 1; + sVar9 = sVar8 + 1; + } + else { + iVar6 = param_2; + if (iVar5 != 2) { + sVar9 = sVar8 + 1; + } + } + *psVar2 = sVar9; + iVar5 = iVar5 + 1; + DAT_0102a748 = DAT_0102a748 + 1; + psVar2[1] = (short)iVar6; + psVar2 = psVar2 + 2; + } while (iVar5 < 4); + return; + } + iVar5 = 0; + psVar2 = &DAT_010305f8 + DAT_0102a74c * 2; + do { + if (0x12 < DAT_0102a74c) { + return; + } + sVar9 = sVar8; + if (iVar5 == 0) { + iVar6 = param_2 + 1; + } + else if (iVar5 == 1) { + iVar6 = param_2 + 1; + sVar9 = sVar8 + 1; + } + else { + iVar6 = param_2; + if (iVar5 != 2) { + sVar9 = sVar8 + 1; + } + } + *psVar2 = sVar9; + iVar5 = iVar5 + 1; + DAT_0102a74c = DAT_0102a74c + 1; + psVar2[1] = (short)iVar6; + psVar2 = psVar2 + 2; + } while (iVar5 < 4); + return; + } + if (sVar9 != 0x69) { + return; + } + iVar5 = (DAT_00902934 * param_1 + param_2) * 0xe + DAT_00902928; + iVar6 = (int)((ulonglong)((longlong)(int)*(short *)(iVar5 + 0xc) * (longlong)DAT_007846ec) + >> 0x20); + iVar6 = param_2 - ((iVar6 >> 2) - (iVar6 >> 0x1f)); + iVar5 = (int)((ulonglong)((longlong)(int)*(short *)(iVar5 + 10) * (longlong)DAT_007846ec) + >> 0x20); + uVar10 = (iVar5 >> 2) - (iVar5 >> 0x1f); + iVar3 = (int)uVar10 >> 1; + iVar5 = param_1 - (uVar10 & 1); + FUN_0074a708(iVar5,iVar6); + FUN_0074a708(iVar5,iVar6 + 1); + FUN_0074a708(iVar5,iVar6 + 2); + FUN_0074a708(iVar5 + 1,iVar6); + FUN_0074a708(iVar5 + 1,iVar6 + 1); + FUN_0074a708(iVar5 + 1,iVar6 + 2); + iVar5 = (iVar5 + 1) * 0x10; + iVar6 = (iVar6 + 3) * 0x10; + if (iVar3 == 4) { + iVar3 = FUN_0074a6a8(param_1,param_2,0x1e); + if (iVar3 == 0) { + return; + } + iVar3 = FUN_006563e8(iVar5,iVar6,1); + if (iVar3 == 0) { + return; + } + iVar6 = iVar6 + -0xc; + uVar14 = 1; + } + else if (iVar3 == 7) { + iVar3 = FUN_0074a6a8(param_1,param_2,0x1e); + if (iVar3 == 0) { + return; + } + iVar3 = FUN_006563e8(iVar5,iVar6,0x31); + if (iVar3 == 0) { + return; + } + iVar6 = iVar6 + -6; + iVar5 = iVar5 + -4; + uVar14 = 0x31; + } + else if (iVar3 == 8) { + iVar3 = FUN_0074a6a8(param_1,param_2,0x1e); + if (iVar3 == 0) { + return; + } + iVar3 = FUN_006563e8(iVar5,iVar6,0x37); + if (iVar3 == 0) { + return; + } + iVar6 = iVar6 + -0xc; + uVar14 = 0x37; + } + else if (iVar3 == 9) { + iVar3 = FUN_0074a6a8(param_1,param_2,0x1e); + if (iVar3 == 0) { + return; + } + iVar3 = FUN_006563e8(iVar5,iVar6,0x2e); + if (iVar3 == 0) { + return; + } + iVar6 = iVar6 + -0xc; + uVar14 = 0x2e; + } + else if (iVar3 == 10) { + iVar3 = FUN_0074a6a8(param_1,param_2,0x1e); + if (iVar3 == 0) { + return; + } + iVar3 = FUN_006563e8(iVar5,iVar6,0x15); + if (iVar3 == 0) { + return; + } + uVar14 = 0x15; + } + else if (iVar3 == 0x12) { + iVar3 = FUN_0074a6a8(param_1,param_2,0x1e); + if (iVar3 == 0) { + return; + } + iVar3 = FUN_006563e8(iVar5,iVar6,0x43); + if (iVar3 == 0) { + return; + } + iVar6 = iVar6 + -0xc; + uVar14 = 0x43; + } + else if (iVar3 == 0x17) { + iVar3 = FUN_0074a6a8(param_1,param_2,0x1e); + if (iVar3 == 0) { + return; + } + iVar3 = FUN_006563e8(iVar5,iVar6,0x3f); + if (iVar3 == 0) { + return; + } + iVar6 = iVar6 + -0xc; + uVar14 = 0x3f; + } + else if (iVar3 == 0x1b) { + iVar3 = FUN_0074a6a8(param_1,param_2,0x1e); + if (iVar3 == 0) { + return; + } + iVar3 = FUN_006563e8(iVar5,iVar6,0x55); + if (iVar3 == 0) { + return; + } + iVar5 = iVar5 + -9; + uVar14 = 0x55; + } + else if (iVar3 == 0x1c) { + iVar3 = FUN_0074a6a8(param_1,param_2,0x1e); + if (iVar3 == 0) { + return; + } + iVar3 = FUN_006563e8(iVar5,iVar6,0x4a); + if (iVar3 == 0) { + return; + } + iVar6 = iVar6 + -0xc; + uVar14 = 0x4a; + } + else { + if (iVar3 != 0x2a) { + if (iVar3 == 0x25) { + iVar3 = FUN_0074a6a8(param_1,param_2,600); + if (iVar3 == 0) { + return; + } + iVar3 = FUN_006138d0(iVar5,iVar6,0x3a); + if (iVar3 == 0) { + return; + } + iVar3 = FUN_006138d0(iVar5,iVar6,0x6c6); + if (iVar3 == 0) { + return; + } + FUN_00631590(iVar5,iVar6 + -0x10,0,0,0x3a,1,0,0,0); + return; + } + if (iVar3 == 2) { + iVar3 = FUN_0074a6a8(param_1,param_2,600); + if (iVar3 == 0) { + return; + } + iVar3 = FUN_006138d0(iVar5,iVar6,0xb8); + if (iVar3 == 0) { + return; + } + iVar3 = FUN_006138d0(iVar5,iVar6,0x6c7); + if (iVar3 == 0) { + return; + } + FUN_00631590(iVar5,iVar6 + -0x10,0,0,0xb8,1,0,0,0); + return; + } + if (iVar3 == 0x11) { + iVar3 = FUN_0074a6a8(param_1,param_2,600); + if (iVar3 == 0) { + return; + } + iVar3 = FUN_006138d0(iVar5,iVar6,0xa6); + if (iVar3 == 0) { + return; + } + FUN_00631590(iVar5,iVar6 + -0x14,0,0,0xa6,1,0,0,0); + return; + } + if (iVar3 != 0x28) { + if (iVar3 != 0x29) { + return; + } + iVar12 = FUN_0074a6a8(param_1,param_2,300); + iVar3 = DAT_00fe1fa8; + if (iVar12 == 0) { + return; + } + iVar4 = 0; + iVar7 = 0xc3; + psVar2 = local_50; + iVar12 = DAT_00fe1fa8 + DAT_00784c14; + do { + if ((*(char *)(iVar12 + 0x100) != '\0') && + ((((iVar11 = *(int *)(iVar12 + 0x104), iVar11 == 0x12 || (iVar11 == 0x14)) || + (iVar11 == 0x7c)) || ((iVar11 == 0xb2 || (iVar11 == 0xd1)))))) { + *psVar2 = (short)iVar7; + iVar4 = iVar4 + 1; + psVar2 = psVar2 + 1; + if (iVar4 == 6) break; + } + iVar7 = iVar7 + -1; + iVar12 = iVar12 + -0x274; + } while (-1 < iVar7); + if (iVar4 < 1) { + return; + } + iVar12 = FUN_00608330(&DAT_00fd67f4); + iVar12 = (int)local_50[iVar12]; + iVar3 = iVar12 * 0x274 + iVar3; + *(uint *)(iVar3 + 0x148) = iVar5 - (uint)(*(ushort *)(iVar3 + 0x168) >> 1); + iVar5 = iVar12 * 0x274 + DAT_00fe1fa8; + *(uint *)(iVar5 + 0x14c) = (iVar6 - (uint)*(ushort *)(iVar5 + 0x16a)) + -1; + iVar5 = iVar12 * 0x274 + DAT_00fe1fa8; + uVar14 = VectorSignedToFloat(*(undefined4 *)(iVar5 + 0x148), + (byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar5 + 0x138) = uVar14; + iVar5 = iVar12 * 0x274 + DAT_00fe1fa8; + uVar14 = VectorSignedToFloat(*(undefined4 *)(iVar5 + 0x14c), + (byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar5 + 0x13c) = uVar14; + FUN_00649e80(iVar12,0); + return; + } + iVar12 = FUN_0074a6a8(param_1,param_2,300); + iVar3 = DAT_00fe1fa8; + if (iVar12 == 0) { + return; + } + iVar4 = 0; + iVar7 = 0xc3; + psVar2 = local_40; + iVar12 = DAT_00fe1fa8 + DAT_00784c14; + do { + if ((*(char *)(iVar12 + 0x100) != '\0') && + (((((iVar11 = *(int *)(iVar12 + 0x104), iVar11 == 0x11 || (iVar11 == 0x13)) || + ((iVar11 == 0x16 || + (((iVar11 == 0x26 || (iVar11 == 0x36)) || (iVar11 == 0x6b)))))) || + ((iVar11 == 0x6c || (iVar11 == 0x8e)))) || + ((iVar11 == 0xa0 || + (((iVar11 == 0xd0 || (iVar11 == 0xcf)) || + ((iVar11 == 0xe4 || ((iVar11 == 0xe3 || (iVar11 == 0xe5)))))))))))) { + *psVar2 = (short)iVar7; + iVar4 = iVar4 + 1; + psVar2 = psVar2 + 1; + if (iVar4 == 0xe) break; + } + iVar7 = iVar7 + -1; + iVar12 = iVar12 + -0x274; + } while (-1 < iVar7); + if (iVar4 < 1) { + return; + } + iVar12 = FUN_00608330(&DAT_00fd67f4); + iVar12 = (int)local_40[iVar12]; + iVar3 = iVar12 * 0x274 + iVar3; + *(uint *)(iVar3 + 0x148) = iVar5 - (uint)(*(ushort *)(iVar3 + 0x168) >> 1); + iVar5 = iVar12 * 0x274 + DAT_00fe1fa8; + *(uint *)(iVar5 + 0x14c) = (iVar6 - (uint)*(ushort *)(iVar5 + 0x16a)) + -1; + iVar5 = iVar12 * 0x274 + DAT_00fe1fa8; + uVar14 = VectorSignedToFloat(*(undefined4 *)(iVar5 + 0x148), + (byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar5 + 0x138) = uVar14; + iVar5 = iVar12 * 0x274 + DAT_00fe1fa8; + uVar14 = VectorSignedToFloat(*(undefined4 *)(iVar5 + 0x14c), + (byte)(in_fpscr >> 0x16) & 3); + *(undefined4 *)(iVar5 + 0x13c) = uVar14; + FUN_00649e80(iVar12,0); + return; + } + iVar3 = FUN_0074a6a8(param_1,param_2,0x1e); + if (iVar3 == 0) { + return; + } + iVar3 = FUN_006563e8(iVar5,iVar6,0x3a); + if (iVar3 == 0) { + return; + } + iVar6 = iVar6 + -0xc; + uVar14 = 0x3a; + } + iVar5 = FUN_00685550(iVar5,iVar6,uVar14,0); + uVar14 = DAT_007846e8; + if (iVar5 < 0) { + return; + } + *(undefined4 *)(iVar5 * 0x274 + DAT_00fe1fa8 + 0x1ec) = DAT_007846e8; + *(undefined4 *)(iVar5 * 0x274 + DAT_00fe1fa8 + 0x60) = uVar14; + return; + } + sVar9 = *(short *)(param_3 + 10); + if (sVar9 < 0x36) { + *(short *)(param_3 + 10) = sVar9 + 0x36; + } + else { + *(short *)(param_3 + 10) = sVar9 + -0x36; + } + } + goto LAB_00784bfe; + } + if ((*(short *)(param_3 + -8) == 0x15) && ((*(byte *)(param_3 + -0xd) & 1) != 0)) { + bVar1 = true; + } + else { + bVar1 = false; + } + if (bVar1) { + return; + } + *(ushort *)(param_3 + 6) = *(ushort *)(param_3 + 6) ^ 1; + } + FUN_007729e8(param_1,param_2,0xffffffff); +LAB_00784bfe: + FUN_00649a94(param_1,param_2,0,0); + return; +switchD_0078416e_caseD_0: + iVar5 = FUN_0074a6a8(param_1,param_2,0xb4); + if (iVar5 == 0) { + return; + } + if (*(short *)(param_3 + 10) == 0) { + iVar5 = -1; + } + else { + iVar5 = 1; + } + uVar17 = VectorSignedToFloat(iVar5 * 0xc,(byte)(in_fpscr >> 0x16) & 3); + uVar15 = VectorSignedToFloat(param_2 * 0x10 + 9,(byte)(in_fpscr >> 0x16) & 3); + uVar14 = VectorSignedToFloat(param_1 * 0x10 + iVar5 * 10 + 8,(byte)(in_fpscr >> 0x16) & 3); + FUN_006f7004(uVar14,uVar15,uVar17,DAT_00784360,0x40000000,DAT_00784360,DAT_00784360,0x62,0x14,4); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/007a7d88.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/007a7d88.c new file mode 100644 index 000000000..25bd41f4b --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/007a7d88.c @@ -0,0 +1,59 @@ + +void FUN_007a7d88(void) + +{ + undefined1 *puVar1; + uint in_fpscr; + float fVar2; + + if (DAT_010339a0 == 0) { + return; + } + if (DAT_010339a8 < 1) { + if (DAT_010339a0 == 1) { + DAT_00fe1f83 = 1; + FUN_00736ecc(0x11); + FUN_00647dc0(0); + } + else { + if (DAT_010339a0 == 2) { + puVar1 = &DAT_00fe1f84; + } + else { + if (DAT_010339a0 != 3) goto LAB_007a7de4; + puVar1 = &DAT_00fe1f87; + } + *puVar1 = 1; + } +LAB_007a7de4: + FUN_007a7a48(); + DAT_010339a0 = 0; + DAT_010339ac = 7; + } + fVar2 = (float)VectorSignedToFloat((int)DAT_010338cc,(byte)(in_fpscr >> 0x16) & 3); + if (DAT_010339a4 == fVar2) { + return; + } + if (DAT_010339a4 <= fVar2) { + if (fVar2 <= DAT_010339a4) goto LAB_007a7e66; + DAT_010339a4 = DAT_010339a4 + 1.0; + if (DAT_010339a4 < fVar2) goto LAB_007a7e2e; + } + else { + DAT_010339a4 = DAT_010339a4 - 1.0; + if (fVar2 < DAT_010339a4) { +LAB_007a7e2e: + DAT_010339b0 = DAT_010339b0 + -1; + goto LAB_007a7e66; + } + } + DAT_010339a4 = fVar2; + FUN_007a7a48(); +LAB_007a7e66: + if (DAT_010339b0 < 1) { + DAT_010339b0 = 0xe10; + FUN_007a7a48(); + } + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/007a9278.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/007a9278.c new file mode 100644 index 000000000..6e66f4bf3 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/progression-xrefs/callers/007a9278.c @@ -0,0 +1,129 @@ + +void FUN_007a9278(void) + +{ + undefined1 uVar1; + int iVar2; + int *piVar3; + undefined4 uVar4; + + uVar1 = DAT_010703e2; + if (DAT_01033988 + (uint)((ulonglong)DAT_01033988 * (ulonglong)DAT_007a94dc >> 0x26) * -600 == 0) + { + FUN_00647e5c(); + } + iVar2 = FUN_0073517c(&DAT_010703d8); + if (iVar2 == 0) { + if (DAT_010703e0 == '\0') { + if (DAT_010703dc <= DAT_007a94d8) { + if (DAT_007a94d4 < DAT_010703dc) { + FUN_006aa98c(); + } + } + else if (DAT_0102a780 != '\0') { + DAT_0102a780 = 0; + FUN_00783038(); + FUN_00749de0(&DAT_010703d8); + FUN_007491d4(); + return; + } + } + else if (DAT_00fe1ec4 != 1) { + FUN_00697314(); + FUN_00749de0(&DAT_010703d8); + FUN_007491d4(); + return; + } + } + else { + DAT_00fe1f6c = 0; + DAT_00fe1f78 = 0; + if (DAT_010703e0 == '\0') { + if (DAT_00fe1ec4 != 1) { + if ((DAT_0102a76f != '\0') && (iVar2 = FUN_00608330(&DAT_00fd67f4,0x32), iVar2 == 0)) { + DAT_0102a780 = '\x01'; + } + iVar2 = FUN_006597c4(); + if (((iVar2 == 0) && (DAT_010703e4 != '\x04')) && + (iVar2 = FUN_00608330(&DAT_00fd67f4,9), iVar2 == 0)) { + iVar2 = 0; + piVar3 = &DAT_0107034c; + do { + if ((*(char *)(*piVar3 + 0x5cc5) != '\0') && (0x78 < *(short *)(*piVar3 + 0x5d00))) { + FUN_00735020(&DAT_010703d8); + break; + } + iVar2 = iVar2 + 1; + piVar3 = piVar3 + 1; + } while (iVar2 < 4); + } + iVar2 = 4; + piVar3 = &DAT_0107034c; + do { + if (*(char *)(*piVar3 + 0x5cc5) != '\0') { + FUN_006d289c(*piVar3,0); + } + iVar2 = iVar2 + -1; + piVar3 = piVar3 + 1; + } while (iVar2 != 0); + } + } + else { + if (0 < DAT_010339ac) { + DAT_010339ac = DAT_010339ac + -1; + } + if (DAT_00fe1ec4 != 1) { + if (DAT_0102a76f != '\0') { + if (DAT_00fe1f83 == '\0') { + uVar4 = 3; + } + else if (DAT_010338d3 == '\0') { + uVar4 = 0x1e; + } + else { + uVar4 = 0x3c; + } + iVar2 = FUN_00608330(&DAT_00fd67f4,uVar4); + if (iVar2 == 0) { + FUN_007a8f74(1); + } + if ((DAT_010339a0 == 0) && (DAT_010338d3 != '\0')) { + if (DAT_00fe1f87 == '\0') { + uVar4 = 0x28; + } + else { + uVar4 = 0x3c; + } + iVar2 = FUN_00608330(&DAT_00fd67f4,uVar4); + if (iVar2 == 0) { + FUN_007a8f74(3); + } + } + } + if (((DAT_010338d3 != '\0') && (DAT_00fe1f8b != '\0')) && + (iVar2 = FUN_00608330(&DAT_00fd67f4,0x19), iVar2 == 0)) { + FUN_00735048(&DAT_010703d8); + } + iVar2 = 4; + piVar3 = &DAT_0107034c; + do { + if (*(char *)(*piVar3 + 0x5cc5) != '\0') { + FUN_006d289c(*piVar3,uVar1); + } + iVar2 = iVar2 + -1; + piVar3 = piVar3 + 1; + } while (iVar2 != 0); + } + } + if (DAT_00fe1ec4 == 2) { + FUN_00647dc0(0); + FUN_00749de0(&DAT_010703d8); + FUN_007491d4(); + return; + } + } + FUN_00749de0(&DAT_010703d8); + FUN_007491d4(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/00902c30.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/00902c30.xrefs.txt new file mode 100644 index 000000000..eefdd8729 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/00902c30.xrefs.txt @@ -0,0 +1,8 @@ +# References to 00902c30 +007681e0 WRITE FUN_00767f5c +007681e8 WRITE FUN_00767f5c +0076798a READ FUN_0076758c +00782b84 READ FUN_00782ae4 +00782bd8 WRITE FUN_00782ae4 +007622ee WRITE FUN_00762228 +00768a56 PARAM FUN_00768798 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/00902c34.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/00902c34.xrefs.txt new file mode 100644 index 000000000..3ba5dcb84 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/00902c34.xrefs.txt @@ -0,0 +1,8 @@ +# References to 00902c34 +007681e2 WRITE FUN_00767f5c +007681ec WRITE FUN_00767f5c +00767998 READ FUN_0076758c +00782c1c READ FUN_00782ae4 +00782c3a WRITE FUN_00782ae4 +007622f0 WRITE FUN_00762228 +00768a62 PARAM FUN_00768798 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/00902c38.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/00902c38.xrefs.txt new file mode 100644 index 000000000..7a2861a1b --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/00902c38.xrefs.txt @@ -0,0 +1,7 @@ +# References to 00902c38 +007681f0 WRITE FUN_00767f5c +007679ac READ FUN_0076758c +00782c4c READ FUN_00782ae4 +00782c6a WRITE FUN_00782ae4 +007622f2 WRITE FUN_00762228 +00768a6c PARAM FUN_00768798 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/0102a76f.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/0102a76f.xrefs.txt new file mode 100644 index 000000000..9369384b4 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/0102a76f.xrefs.txt @@ -0,0 +1,12 @@ +# References to 0102a76f +0076818c PARAM FUN_00767f5c +0064b6d2 WRITE FUN_0064b17c +00767924 READ FUN_0076758c +007622d8 WRITE FUN_00762228 +00733344 READ FUN_00731c2c +007333f0 WRITE FUN_00731c2c +007a92fa READ FUN_007a9278 +007a93c0 READ FUN_007a9278 +00645684 READ FUN_006452c4 +00768a04 PARAM FUN_00768798 +006abefa READ FUN_006abb14 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/0102a778.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/0102a778.xrefs.txt new file mode 100644 index 000000000..d2066ce9e --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/0102a778.xrefs.txt @@ -0,0 +1,9 @@ +# References to 0102a778 +007681be WRITE FUN_00767f5c +00767950 READ FUN_0076758c +007622d4 WRITE FUN_00762228 +007333f2 READ FUN_00731c2c +007333f6 WRITE FUN_00731c2c +007333fe WRITE FUN_00731c2c +007333ea PARAM FUN_00731c2c +00768a38 WRITE FUN_00768798 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/0102a77c.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/0102a77c.xrefs.txt new file mode 100644 index 000000000..79ed8da5b --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/0102a77c.xrefs.txt @@ -0,0 +1,10 @@ +# References to 0102a77c +007681ba PARAM FUN_00767f5c +007681cc READ FUN_00767f5c +00767966 READ FUN_0076758c +00782b1c READ FUN_00782ae4 +0078301c READ FUN_00782ae4 +00783022 WRITE FUN_00782ae4 +007622d6 WRITE FUN_00762228 +0065581e READ FUN_006557e4 +00768a34 PARAM FUN_00768798 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/0102a780.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/0102a780.xrefs.txt new file mode 100644 index 000000000..3f506352b --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/0102a780.xrefs.txt @@ -0,0 +1,11 @@ +# References to 0102a780 +0076819a PARAM FUN_00767f5c +0076793a READ FUN_0076758c +007622da WRITE FUN_00762228 +00733334 WRITE FUN_00731c2c +007a93de WRITE FUN_007a9278 +007a93d8 PARAM FUN_007a9278 +007a949a READ FUN_007a9278 +007a94a0 WRITE FUN_007a9278 +007a9496 PARAM FUN_007a9278 +00768a14 PARAM FUN_00768798 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/01030860.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/01030860.xrefs.txt new file mode 100644 index 000000000..4c273221c --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/01030860.xrefs.txt @@ -0,0 +1,6 @@ +# References to 01030860 +00768212 PARAM FUN_00767f5c +0076774c WRITE FUN_0076758c +007679dc READ FUN_0076758c +007a9626 READ FUN_007a9558 +00768a94 PARAM FUN_00768798 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/010338d3.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/010338d3.xrefs.txt new file mode 100644 index 000000000..6e1e6c1ba --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/010338d3.xrefs.txt @@ -0,0 +1,92 @@ +# References to 010338d3 +006e4ffe READ FUN_006e3e74 +007681fa PARAM FUN_00767f5c +0064b712 WRITE FUN_0064b17c +00677f00 READ FUN_006771d8 +00678236 READ FUN_006771d8 +00679c18 READ FUN_006771d8 +00697974 READ FUN_00697314 +00697980 READ FUN_00697314 +00697b78 READ FUN_00697314 +00783420 READ FUN_00783400 +00767542 READ FUN_00767524 +007679ce READ FUN_0076758c +006dfabe READ FUN_006db640 +006dbece READ FUN_006db640 +00782b02 READ FUN_00782ae4 +006081b4 READ FUN_00606bc4 +00607eb8 READ FUN_00606bc4 +00607f6c READ FUN_00606bc4 +00607fae READ FUN_00606bc4 +00607e54 READ FUN_00606bc4 +00607b78 READ FUN_00606bc4 +00607b94 READ FUN_00606bc4 +00607aa6 READ FUN_00606bc4 +006079c0 READ FUN_00606bc4 +006074cc READ FUN_00606bc4 +00607234 READ FUN_00606bc4 +0060714e READ FUN_00606bc4 +00606ee2 READ FUN_00606bc4 +00606efe READ FUN_00606bc4 +00606f70 READ FUN_00606bc4 +00606dc8 READ FUN_00606bc4 +00606e36 READ FUN_00606bc4 +00762312 WRITE FUN_00762228 +00763462 READ FUN_00762730 +00763560 READ FUN_00762730 +0076361e READ FUN_00762730 +00705280 READ FUN_006fde70 +007351cc READ FUN_0073517c +007351f4 READ FUN_0073517c +00735194 PARAM FUN_0073517c +007351ac READ FUN_0073517c +007a9332 READ FUN_007a9278 +007a935e READ FUN_007a9278 +007a930e READ FUN_007a9278 +006456c6 READ FUN_006452c4 +00655802 READ FUN_006557e4 +006c0d8a READ FUN_006c0c10 +0073850a READ FUN_0073817c +007a8264 READ FUN_007a81dc +00694462 READ FUN_006943e0 +00798978 READ FUN_0079847c +00798a98 READ FUN_0079847c +006a4834 READ FUN_006a47dc +006a4aee READ FUN_006a47dc +006a4c3a READ FUN_006a47dc +006a5dee READ FUN_006a47dc +00768a82 PARAM FUN_00768798 +006a760a READ FUN_006a47dc +006a5bc6 READ FUN_006a47dc +00694242 READ FUN_00693bec +006931fe READ FUN_00693198 +0069340a READ FUN_00693198 +00695440 READ FUN_00695420 +006955c0 READ FUN_00695420 +00695a72 READ FUN_00695420 +00695a6e PARAM FUN_00695420 +007735d2 WRITE FUN_007734d8 +0065b712 READ FUN_0065b508 +0065b72c READ FUN_0065b508 +00693930 READ FUN_006937c4 +00693a46 READ FUN_006937c4 +006929aa READ FUN_006928f0 +0069313e READ FUN_006928f0 +00692baa READ FUN_006928f0 +00694f02 READ FUN_00694e70 +006b2fa4 READ FUN_006b2ea0 +006b347a READ FUN_006b2ea0 +006b38d0 READ FUN_006b2ea0 +006b38cc PARAM FUN_006b2ea0 +006b349a READ FUN_006b2ea0 +006b34c6 READ FUN_006b2ea0 +00695050 READ FUN_00694ff4 +00695126 READ FUN_00694ff4 +006b6298 READ FUN_006b6018 +006b6372 READ FUN_006b6018 +006b63fa READ FUN_006b6018 +006b72ea READ FUN_006b6018 +00692430 READ FUN_006923e0 +00692728 READ FUN_006923e0 +00692724 PARAM FUN_006923e0 +006945bc READ FUN_00694578 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/010339a0.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/010339a0.xrefs.txt new file mode 100644 index 000000000..29fd8dce9 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/010339a0.xrefs.txt @@ -0,0 +1,19 @@ +# References to 010339a0 +007a7a60 READ FUN_007a7a48 +007a7a84 READ FUN_007a7a48 +007a7d98 READ FUN_007a7d88 +007a7dea WRITE FUN_007a7d88 +0076827e WRITE FUN_00767f5c +0064c9f4 READ FUN_0064b17c +00767a36 READ FUN_0076758c +006e22e6 READ FUN_006db640 +006e2346 READ FUN_006db640 +006e23a6 READ FUN_006db640 +0076233a WRITE FUN_00762228 +007a932e READ FUN_007a9278 +007a8f86 READ FUN_007a8f74 +007a8fc4 WRITE FUN_007a8f74 +007984fe READ FUN_0079847c +00768b00 WRITE FUN_00768798 +006b6206 READ FUN_006b6018 +006b7342 READ FUN_006b6018 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/010339a4.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/010339a4.xrefs.txt new file mode 100644 index 000000000..7a09d8db8 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/010339a4.xrefs.txt @@ -0,0 +1,12 @@ +# References to 010339a4 +007a7a7c READ FUN_007a7a48 +007a7df8 READ FUN_007a7d88 +007a7e24 WRITE FUN_007a7d88 +007a7e5a WRITE FUN_007a7d88 +007a7e50 WRITE FUN_007a7d88 +00768278 PARAM FUN_00767f5c +00767a54 READ FUN_0076758c +00762358 WRITE FUN_00762228 +007a9032 WRITE FUN_007a8f74 +00768afa PARAM FUN_00768798 +006b6248 READ FUN_006b6018 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/010339a8.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/010339a8.xrefs.txt new file mode 100644 index 000000000..ce82d6423 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/010339a8.xrefs.txt @@ -0,0 +1,14 @@ +# References to 010339a8 +007a7a58 READ FUN_007a7a48 +007a7da0 READ FUN_007a7d88 +0076825c WRITE FUN_00767f5c +00767a1a READ FUN_0076758c +00762344 WRITE FUN_00762228 +007a8fce WRITE FUN_007a8f74 +006b14a6 READ FUN_006b0188 +006b14b8 WRITE FUN_006b0188 +006b14a2 PARAM FUN_006b0188 +006b14b4 READ FUN_006b0188 +006b14b0 PARAM FUN_006b0188 +00768ade WRITE FUN_00768798 +006b6220 READ FUN_006b6018 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/010339ac.xrefs.txt b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/010339ac.xrefs.txt new file mode 100644 index 000000000..a52d8d17b --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/010339ac.xrefs.txt @@ -0,0 +1,18 @@ +# References to 010339ac +007a7df0 WRITE FUN_007a7d88 +0076823e WRITE FUN_00767f5c +0064ca08 WRITE FUN_0064b17c +0064ca00 PARAM FUN_0064b17c +007679fe READ FUN_0076758c +006e2318 WRITE FUN_006db640 +006e2310 PARAM FUN_006db640 +006e2378 WRITE FUN_006db640 +006e2370 PARAM FUN_006db640 +006e23d8 WRITE FUN_006db640 +006e23d0 PARAM FUN_006db640 +00762330 WRITE FUN_00762228 +007a92d6 READ FUN_007a9278 +007a92de WRITE FUN_007a9278 +007a8f8c READ FUN_007a8f74 +00768ac0 WRITE FUN_00768798 +006b6214 READ FUN_006b6018 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/callers/00762228.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/callers/00762228.c new file mode 100644 index 000000000..4aa0f784e --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/callers/00762228.c @@ -0,0 +1,137 @@ + +void FUN_00762228(void) + +{ + undefined4 uVar1; + int iVar2; + int iVar3; + undefined *puVar4; + undefined2 *puVar5; + uint local_1b0 [4]; + undefined4 local_1a0; + uint local_19c; + undefined2 *local_198; + undefined2 *local_194; + undefined4 local_190; + undefined4 uStack_18c; + undefined1 auStack_188 [48]; + undefined1 auStack_158 [48]; + undefined4 local_128; + undefined2 auStack_124 [134]; + + local_190 = 0xfffffffe; + uStack_18c = 0xfffffffe; + local_19c = 0xf; + local_1a0 = 0; + local_1b0[0] = local_1b0[0] & 0xffffff00; + FUN_0041bc2c(local_1b0,"GEN[47]",7); + uVar1 = FUN_005f82b0(auStack_158,local_1b0); + iVar2 = FUN_0058ef48(); + FUN_007aa80c(iVar2 + 0x2b10,auStack_188,uVar1); + FUN_007aa754(auStack_188); + FUN_007aa754(auStack_158); + if (0xf < local_19c) { + FUN_00431740(local_1b0[0]); + } + local_19c = 0xf; + local_1a0 = 0; + local_1b0[0] = local_1b0[0] & 0xffffff00; + FUN_007350e8(0x3f800000,&DAT_01030850); + uVar1 = DAT_007624d0; + DAT_0102a764 = 0; + DAT_0102a760 = 0; + DAT_0102a75c = 0; + DAT_0102a758 = 0; + DAT_0102a754 = 0; + DAT_0102a750 = 0; + DAT_0102a768 = 0; + DAT_0102a76c = 0; + DAT_0102a70e = 0; + DAT_0102a70f = 0; + DAT_0102a778 = 0; + DAT_0102a77c = 0; + DAT_0102a76f = 0; + DAT_0102a780 = 0; + DAT_0102a781 = 0; + DAT_00902c30 = 0xffff; + DAT_00902c34 = 0xffff; + DAT_00902c38 = 0xffff; + DAT_01033974 = 0; + DAT_01033970 = 0; + DAT_010338d3 = 0; + DAT_01033968 = 0; + DAT_01033964 = 0; + DAT_010339ac = 0; + DAT_010339a0 = 0; + DAT_010339a8 = 0; + DAT_010339b0 = 0; + DAT_010339a4 = DAT_007624d0; + DAT_00fe1c70 = 0; + DAT_00fe1c98 = 0; + iVar2 = 0x3f; + puVar5 = auStack_124; + do { + iVar2 = iVar2 + -1; + puVar5[1] = 0; + *puVar5 = 0; + puVar5 = puVar5 + 2; + } while (-1 < iVar2); + local_128 = 0; + memcpy(&DAT_01030648,&local_128,0x104); + iVar2 = 0x3f; + puVar5 = auStack_124; + do { + iVar2 = iVar2 + -1; + puVar5[1] = 0; + *puVar5 = 0; + puVar5 = puVar5 + 2; + } while (-1 < iVar2); + local_128 = 0; + memcpy(&DAT_0103074c,&local_128,0x104); + DAT_0102a784 = DAT_00902ea0; + DAT_0102a788 = DAT_00902ea4; + FUN_00667810(); + DAT_010299b4 = uVar1; + DAT_010299a0 = 0; + memset(DAT_00902928,0,DAT_0090292c * 0xe); + FUN_0060cf6c(&DAT_01073158); + iVar2 = 0x13d8; + do { + FUN_006117c0(iVar2 + DAT_00fd68c0); + iVar2 = iVar2 + -0x28; + } while (-1 < iVar2); + puVar4 = &DAT_010731a0; + iVar2 = 200; + do { + FUN_00612a6c(puVar4); + puVar4 = puVar4 + 0xa0; + iVar2 = iVar2 + -1; + } while (iVar2 != 0); + puVar5 = &DAT_0107af40; + iVar2 = 0x200; + do { + FUN_006ef2e0(puVar5); + puVar5 = puVar5 + 0x74; + iVar2 = iVar2 + -1; + iVar3 = DAT_007624cc; + } while (iVar2 != 0); + do { + iVar2 = iVar3 + -0x1908; + *(undefined1 *)(DAT_00fd643c + iVar3 + 0x1904) = 1; + iVar3 = iVar2; + } while (-1 < iVar2); + FUN_0075942c(); + puVar5 = &DAT_01060308; + iVar2 = 0x4000; + do { + if (puVar5 != (undefined2 *)0x0) { + local_198 = puVar5; + local_194 = puVar5; + FUN_00640a40(puVar5); + } + puVar5 = puVar5 + 2; + iVar2 = iVar2 + -1; + } while (iVar2 != 0); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/callers/00782ae4.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/callers/00782ae4.c new file mode 100644 index 000000000..984e58ab4 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/callers/00782ae4.c @@ -0,0 +1,235 @@ + +void FUN_00782ae4(void) + +{ + byte bVar1; + bool bVar2; + float fVar3; + undefined4 uVar4; + uint uVar5; + uint uVar6; + uint uVar7; + uint uVar8; + int iVar9; + int iVar10; + int iVar11; + int iVar12; + uint in_fpscr; + uint uVar13; + float fVar15; + float fVar16; + float fVar17; + float fVar18; + float fVar19; + undefined8 uVar14; + float fVar20; + float fVar21; + float fVar22; + undefined8 uVar23; + int local_54; + int local_44; + int local_40; + undefined4 local_3c; + undefined4 local_38; + + uVar23 = FUN_007ffb80(); + fVar3 = DAT_00782c08; + if (DAT_010338d3 != '\0') { + iVar9 = (int)((ulonglong)((longlong)DAT_0102a77c * (longlong)DAT_00782c0c) >> 0x20); + iVar9 = iVar9 - (iVar9 >> 0x1f); + iVar10 = DAT_0102a77c + iVar9 * -3; + fVar15 = (float)VectorSignedToFloat((int)DAT_00902ea0,(byte)(in_fpscr >> 0x16) & 3); + fVar20 = (float)VectorSignedToFloat(iVar10 * 0x37,(byte)(in_fpscr >> 0x16) & 3); + fVar21 = (float)VectorSignedToFloat(iVar9 + 1,(byte)(in_fpscr >> 0x16) & 3); + fVar21 = (fVar15 * DAT_00782c04 * DAT_00782c00 - fVar20) / fVar21; + if (iVar10 == 0) { + iVar9 = (int)DAT_00902c30; + if (iVar9 < 0) { + uVar6 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar6 = DAT_00fd6800 ^ (uVar6 ^ DAT_00fd6800 >> 0xb) >> 8 ^ uVar6; + DAT_00fd67fc = DAT_00fd6800; + fVar15 = (float)VectorSignedToFloat(uVar6 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + if ((int)(fVar15 * DAT_00782c08 * 2.0) == 0) { + iVar9 = 0xdd; + } + else { + iVar9 = 0x6b; + } + DAT_00902c30 = (short)iVar9; + DAT_00fd6800 = uVar6; + } + if (iVar9 == 0x6b) { + uVar4 = 0xc; + fVar21 = fVar21 * DAT_00782bfc; + } + else { + uVar4 = 0x27; + fVar21 = fVar21 * DAT_00782bfc; + } + } + else if (iVar10 == 1) { + iVar9 = (int)DAT_00902c34; + if (iVar9 < 0) { + iVar9 = FUN_00608330(&DAT_00fd67f4,2); + if (iVar9 == 0) { + iVar9 = 0xde; + } + else { + iVar9 = 0x6c; + } + DAT_00902c34 = (short)iVar9; + } + if (iVar9 == 0x6c) { + uVar4 = 0xd; + } + else { + uVar4 = 0x28; + } + } + else { + iVar9 = (int)DAT_00902c38; + if (iVar9 < 0) { + iVar9 = FUN_00608330(&DAT_00fd67f4,2); + if (iVar9 == 0) { + iVar9 = 0xdf; + } + else { + iVar9 = 0x6f; + } + DAT_00902c38 = (short)iVar9; + } + if (iVar9 == 0x6f) { + uVar4 = 0xe; + } + else { + uVar4 = 0x29; + } + } + FUN_00646f20(uVar4,0x32,0xff,0x82,0xffffffff); + iVar11 = 0; + uVar6 = in_fpscr & 0xfffffff | (uint)(fVar21 < 0.0) << 0x1f | (uint)(fVar21 == 0.0) << 0x1e; + uVar13 = uVar6 | (uint)NAN(fVar21) << 0x1c; + bVar1 = (byte)(uVar6 >> 0x18); + local_54 = 0; + if (!(bool)(bVar1 >> 6 & 1) && bVar1 >> 7 == ((byte)(uVar13 >> 0x1c) & 1)) { + fVar15 = (float)VectorSignedToFloat(-iVar10 + 4,(byte)(uVar13 >> 0x16) & 3); + fVar20 = (float)VectorSignedToFloat(-iVar10 + 2,(byte)(uVar13 >> 0x16) & 3); + do { + uVar6 = DAT_0103089c; + uVar7 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + uVar7 = DAT_00fd6800 ^ (uVar7 ^ DAT_00fd6800 >> 0xb) >> 8 ^ uVar7; + fVar16 = (float)VectorSignedToFloat(uVar7 & 0x7fffffff,(byte)(uVar13 >> 0x16) & 3); + fVar17 = (float)VectorSignedToFloat(DAT_00902ea0 + -200,(byte)(uVar13 >> 0x16) & 3); + iVar10 = DAT_01033960; + if ((iVar9 != 0x6c) && (iVar10 = DAT_00902ebc, iVar9 == 0x6f)) { + iVar10 = (int)((ulonglong) + ((longlong)((int)DAT_00902ea4 + DAT_01033960 * 2) * (longlong)DAT_00783034) + >> 0x20); + iVar10 = iVar10 - (iVar10 >> 0x1f); + } + uVar5 = DAT_00fd67f8 ^ DAT_00fd67f8 << 0xb; + DAT_00fd67f4 = DAT_00fd67fc; + DAT_00fd67f8 = DAT_00fd6800; + DAT_00fd6800 = uVar7 ^ (uVar5 ^ uVar7 >> 0xb) >> 8 ^ uVar5; + uVar5 = DAT_01030898 ^ DAT_01030898 << 0xb; + uVar5 = uVar5 ^ (uVar5 ^ DAT_010308a4 >> 0xb) >> 8 ^ DAT_010308a4; + DAT_01030898 = DAT_010308a0; + DAT_0103089c = DAT_010308a4; + uVar6 = uVar6 ^ uVar6 << 0xb; + DAT_010308a4 = uVar6 ^ (uVar6 ^ uVar5 >> 0xb) >> 8 ^ uVar5; + fVar18 = (float)VectorSignedToFloat(DAT_010308a4 & 0x7fffffff,(byte)(uVar13 >> 0x16) & 3); + fVar19 = (float)VectorSignedToFloat(uVar5 & 0x7fffffff,(byte)(uVar13 >> 0x16) & 3); + fVar22 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(uVar13 >> 0x16) & 3); + uVar14 = VectorSignedToFloat((int)(fVar19 * fVar3 * fVar20) + 5,(byte)(uVar13 >> 0x16) & 3); + fVar19 = (float)VectorSignedToFloat((DAT_00902ea4 - iVar10) + -0x96, + (byte)(uVar13 >> 0x16) & 3); + DAT_00fd67fc = uVar7; + DAT_010308a0 = uVar5; + iVar10 = FUN_0077591c((int)uVar14,(int)(fVar16 * fVar3 * fVar17) + 100, + (int)(fVar19 * fVar22 * fVar3) + iVar10, + (int)(fVar18 * fVar3 * fVar15) + 3,iVar9); + if (local_54 < iVar10) { + local_54 = iVar10; + } + iVar11 = iVar11 + 1; + fVar16 = (float)VectorSignedToFloat(iVar11,(byte)(uVar13 >> 0x16) & 3); + uVar13 = uVar13 & 0xfffffff | (uint)(fVar21 <= fVar16) << 0x1d; + } while ((byte)(uVar13 >> 0x1d) == 0); + } + uVar6 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + uVar6 = DAT_00fd6800 ^ (uVar6 ^ DAT_00fd6800 >> 0xb) >> 8 ^ uVar6; + fVar15 = (float)VectorSignedToFloat(uVar6 & 0x7fffffff,(byte)(uVar13 >> 0x16) & 3); + iVar9 = (int)(fVar15 * fVar3 * 3.0); + uVar7 = DAT_00fd6800; + DAT_00fd67f4 = DAT_00fd67f8; + if (iVar9 != 2) { + fVar15 = (float)VectorSignedToFloat(DAT_00902ea0 + -200,(byte)(uVar13 >> 0x16) & 3); + fVar20 = (float)VectorSignedToFloat(((int)DAT_00902ea4 - (DAT_01033960 + 0x32)) + -300, + (byte)(uVar13 >> 0x16) & 3); + uVar5 = DAT_00fd67f8; + uVar8 = DAT_00fd67fc; + do { + DAT_00fd67f4 = uVar7; + DAT_00fd67f8 = uVar6; + uVar5 = uVar5 ^ uVar5 << 0xb; + DAT_00fd67fc = uVar5 ^ (uVar5 ^ DAT_00fd67f8 >> 0xb) >> 8 ^ DAT_00fd67f8; + uVar8 = uVar8 ^ uVar8 << 0xb; + fVar21 = (float)VectorSignedToFloat(DAT_00fd67fc & 0x7fffffff,(byte)(uVar13 >> 0x16) & 3); + iVar12 = (int)(fVar21 * fVar3 * fVar15) + 100; + DAT_00fd6800 = uVar8 ^ (uVar8 ^ DAT_00fd67fc >> 0xb) >> 8 ^ DAT_00fd67fc; + fVar21 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(uVar13 >> 0x16) & 3); + iVar11 = (int)(fVar21 * fVar3 * fVar20) + DAT_01033960 + 0x32; + iVar10 = (DAT_00902934 * iVar12 + iVar11) * 0xe + DAT_00902928; + if ((*(short *)(iVar10 + 6) == 1) && ((*(byte *)(iVar10 + 1) & 1) != 0)) { + bVar2 = true; + } + else { + bVar2 = false; + } + uVar6 = DAT_00fd6800; + uVar7 = DAT_00fd67fc; + uVar5 = DAT_00fd67f4; + uVar8 = DAT_00fd67f8; + } while (!bVar2); + if (iVar9 == 0) { + if (DAT_0102a787 == '\0') { + *(undefined2 *)(iVar10 + 6) = 0x19; + } + else { + *(undefined2 *)(iVar10 + 6) = 0xcb; + } + } + else { + *(undefined2 *)(iVar10 + 6) = 0x75; + } + FUN_00649a94(iVar12,iVar11,0,0); + uVar6 = DAT_00fd6800; + uVar7 = DAT_00fd67fc; + DAT_00fd67fc = DAT_00fd67f8; + } + uVar5 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd6800 = uVar5 ^ (uVar5 ^ uVar6 >> 0xb) >> 8 ^ uVar6; + fVar15 = (float)VectorSignedToFloat(DAT_00fd6800 & 0x7fffffff,(byte)(uVar13 >> 0x16) & 3); + iVar9 = 1 - (int)(fVar15 * fVar3 * -2.0); + local_44 = (int)uVar23 << 4; + local_40 = (int)((ulonglong)uVar23 >> 0x20) << 4; + local_3c = 0x10; + local_38 = 0x10; + DAT_00fd67f4 = DAT_00fd67fc; + DAT_00fd67f8 = uVar7; + DAT_00fd67fc = uVar6; + if (0 < iVar9) { + do { + uVar4 = FUN_006c314c(&local_44); + FUN_00685904(uVar4,0x52); + iVar9 = iVar9 + -1; + } while (iVar9 != 0); + } + DAT_0102a77c = DAT_0102a77c + 1; + } + FUN_007ffb98(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/callers/007a7a48.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/callers/007a7a48.c new file mode 100644 index 000000000..f95db199c --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/callers/007a7a48.c @@ -0,0 +1,58 @@ + +void FUN_007a7a48(void) + +{ + undefined4 uVar1; + undefined4 in_r3; + uint in_fpscr; + float fVar2; + + if (DAT_010339a8 < 1) { + if (DAT_010339a0 == 2) { + uVar1 = 4; + } + else if (DAT_010339a0 == 3) { + uVar1 = 0x2a; + } + else { + uVar1 = 0; + } + } + else { + fVar2 = (float)VectorSignedToFloat((int)DAT_010338cc,(byte)(in_fpscr >> 0x16) & 3); + if (fVar2 <= DAT_010339a4) { + if (DAT_010339a4 <= fVar2) { + if (DAT_010339a0 == 2) { + uVar1 = 7; + } + else if (DAT_010339a0 == 3) { + uVar1 = 0x2d; + } + else { + uVar1 = 3; + } + } + else if (DAT_010339a0 == 2) { + uVar1 = 6; + } + else if (DAT_010339a0 == 3) { + uVar1 = 0x2c; + } + else { + uVar1 = 2; + } + } + else if (DAT_010339a0 == 2) { + uVar1 = 5; + } + else if (DAT_010339a0 == 3) { + uVar1 = 0x2b; + } + else { + uVar1 = 1; + } + } + FUN_00646f20(uVar1,0xaf,0x4b,0xff,0xffffffff,in_r3); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/callers/007a8f74.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/callers/007a8f74.c new file mode 100644 index 000000000..68bf5c900 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/callers/007a8f74.c @@ -0,0 +1,45 @@ + +void FUN_007a8f74(int param_1) + +{ + uint uVar1; + int iVar2; + uint in_fpscr; + float fVar3; + + if ((DAT_010339a0 == 0) && (DAT_010339ac == 0)) { + uVar1 = (uint)(*(char *)(DAT_0107034c + 0x5cc5) != '\0'); + if (*(char *)(DAT_01070350 + 0x5cc5) != '\0') { + uVar1 = uVar1 + 1; + } + if (*(char *)(DAT_01070354 + 0x5cc5) != '\0') { + uVar1 = uVar1 + 1; + } + if (*(char *)(DAT_01070358 + 0x5cc5) != '\0') { + uVar1 = uVar1 + 1; + } + if (uVar1 != 0) { + DAT_010339a8 = uVar1 * 0x28 + 0x1e; + DAT_010339b0 = 0; + uVar1 = DAT_00fd67f4 ^ DAT_00fd67f4 << 0xb; + DAT_00fd67f4 = DAT_00fd67f8; + DAT_00fd67f8 = DAT_00fd67fc; + uVar1 = DAT_00fd6800 ^ (uVar1 ^ DAT_00fd6800 >> 0xb) >> 8 ^ uVar1; + DAT_00fd67fc = DAT_00fd6800; + fVar3 = (float)VectorSignedToFloat(uVar1 & 0x7fffffff,(byte)(in_fpscr >> 0x16) & 3); + DAT_00fd6800 = uVar1; + DAT_010339a0 = param_1; + DAT_010339a4 = DAT_007a906c; + if ((int)(fVar3 * DAT_007a9070 * 2.0) != 0) { + DAT_010339a4 = VectorSignedToFloat((int)DAT_00902ea0,(byte)(in_fpscr >> 0x16) & 3); + } + } + } + iVar2 = (&DAT_0107034c)[DAT_0103399c]; + if (*(char *)(iVar2 + 0x5d23) == '\x1c') { + FUN_007a8384(0x1f,(int)*(float *)(iVar2 + 0x110),(int)*(float *)(iVar2 + 0x114),5); + return; + } + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/callers/007a9558.c b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/callers/007a9558.c new file mode 100644 index 000000000..568df61f8 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.0.0.0/world-state-xrefs/callers/007a9558.c @@ -0,0 +1,64 @@ + +void FUN_007a9558(void) + +{ + int iVar1; + + iVar1 = FUN_0058ef48(); + FUN_007a7bf4(0xb); + if (*(char *)(iVar1 + 0x20) != '\0') { + *(undefined1 *)(DAT_0107034c + 0x5cc5) = 0; + } + *(undefined1 *)(DAT_0107034c + 0x8e29) = 0; + if (*(char *)(iVar1 + 0x20) != '\x01') { + *(undefined1 *)(DAT_01070350 + 0x5cc5) = 0; + } + *(undefined1 *)(DAT_01070350 + 0x8e29) = 0; + if (*(char *)(iVar1 + 0x20) != '\x02') { + *(undefined1 *)(DAT_01070354 + 0x5cc5) = 0; + } + *(undefined1 *)(DAT_01070354 + 0x8e29) = 0; + if (*(char *)(iVar1 + 0x20) != '\x03') { + *(undefined1 *)(DAT_01070358 + 0x5cc5) = 0; + } + *(undefined1 *)(DAT_01070358 + 0x8e29) = 0; + if (DAT_010980f8 == 0x34) { + if (*(char *)(iVar1 + 0x2b42) == '\x01') { + DAT_00fe1ec4 = 2; + } + FUN_006510f8(); + } + DAT_010703d8 = DAT_01030850; + DAT_010703dc = DAT_01030854; + DAT_010703e0 = DAT_01030858; + DAT_010703e1 = DAT_01030859; + DAT_010703e2 = DAT_0103085a; + DAT_010703e3 = DAT_0103085b; + DAT_010703e4 = DAT_0103085c; + DAT_010703e6 = DAT_0103085e; + DAT_010703e8 = DAT_01030860; + DAT_010703ea = DAT_01030862; + DAT_010703ec = DAT_01030864; + DAT_010703f0 = DAT_01030868; + DAT_010703f4 = DAT_0103086c; + DAT_010703f6 = DAT_0103086e; + DAT_010703f8 = DAT_01030870; + DAT_010703fc = DAT_01030874; + DAT_01070400 = DAT_01030878; + DAT_01070404 = DAT_0103087c; + DAT_01070408 = DAT_01030880; + DAT_0107040c = DAT_01030884; + DAT_01070410 = DAT_01030888; + DAT_01070414 = DAT_0103088c; + DAT_01070418 = DAT_01030890; + DAT_0107041c = DAT_01030894; + FUN_0073ceb0(iVar1); + FUN_006d8a34(*(undefined4 *)(iVar1 + 0x1c)); + *(undefined4 *)(iVar1 + 0x27e0) = 1; + FUN_00592fc8(); + FUN_007a3c20(); + FUN_006415c0(); + DAT_01033984 = 1; + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/005e9ef8.c b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/005e9ef8.c new file mode 100644 index 000000000..017544d1b --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/005e9ef8.c @@ -0,0 +1,29 @@ + +void FUN_005e9ef8(void) + +{ + int iVar1; + int *piVar2; + undefined8 uVar3; + undefined2 local_14; + + uVar3 = FUN_0082a0b8(); + piVar2 = (int *)((ulonglong)uVar3 >> 0x20); + iVar1 = (int)uVar3; + if (*(char *)(iVar1 + 0x1ae4) != '\0') { + local_14 = (ushort)local_14._1_1_ << 8; + (**(code **)(*piVar2 + 0x20))(piVar2,&local_14,1); + FUN_0082a0d0(); + return; + } + local_14 = CONCAT11(local_14._1_1_,1); + (**(code **)(*piVar2 + 0x20))(piVar2,&local_14,1); + local_14 = *(undefined2 *)(iVar1 + 0x1ae0); + (**(code **)(*piVar2 + 0x20))(piVar2,&local_14,2); + local_14 = *(undefined2 *)(iVar1 + 0x1ae2); + (**(code **)(*piVar2 + 0x20))(piVar2,&local_14,2); + FUN_005e8de8(iVar1,piVar2); + FUN_0082a0d0(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/005e9ef8.calls.txt b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/005e9ef8.calls.txt new file mode 100644 index 000000000..7060f4e77 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/005e9ef8.calls.txt @@ -0,0 +1,4 @@ +# Calls from FUN_005e9ef8 @ 005e9ef8 +0082a0d0 FUN_0082a0d0 +005e8de8 FUN_005e8de8 +0082a0b8 FUN_0082a0b8 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/005ec460.c b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/005ec460.c new file mode 100644 index 000000000..048fcef47 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/005ec460.c @@ -0,0 +1,34 @@ + +void FUN_005ec460(void) + +{ + int iVar1; + int *piVar2; + int iVar3; + int iVar4; + undefined8 uVar5; + char local_28 [4]; + + uVar5 = FUN_0082a0b8(); + iVar1 = DAT_005ec4e8; + piVar2 = (int *)uVar5; + iVar3 = 0; + do { + iVar4 = iVar3 + DAT_00955b44; + (**(code **)(*piVar2 + 0x24))(piVar2,local_28,1); + if (local_28[0] == '\0') { + *(undefined1 *)(iVar4 + 0x1ae4) = 1; + } + else { + FUN_005ea37c(iVar4); + *(undefined1 *)(iVar4 + 0x1ae4) = 0; + (**(code **)(*piVar2 + 0x24))(piVar2,iVar4 + 0x1ae0,2); + (**(code **)(*piVar2 + 0x24))(piVar2,iVar4 + 0x1ae2,2); + FUN_005e8cac(iVar4,piVar2,(int)((ulonglong)uVar5 >> 0x20)); + } + iVar3 = iVar3 + 0x1aec; + } while (iVar3 < iVar1); + FUN_0082a0d0(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0074904c.c b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0074904c.c new file mode 100644 index 000000000..bc736a965 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0074904c.c @@ -0,0 +1,30 @@ + +void FUN_0074904c(void) + +{ + short *psVar1; + int iVar2; + int *piVar3; + undefined8 uVar4; + undefined2 local_14; + + uVar4 = FUN_0082a0b8(); + piVar3 = (int *)((ulonglong)uVar4 >> 0x20); + psVar1 = (short *)uVar4; + if ((-1 < *psVar1) && (iVar2 = thunk_FUN_007d2340(psVar1 + 2), iVar2 == 0)) { + local_14 = CONCAT11(local_14._1_1_,1); + (**(code **)(*piVar3 + 0x20))(piVar3,&local_14,1); + local_14 = *psVar1; + (**(code **)(*piVar3 + 0x20))(piVar3,&local_14,2); + local_14 = psVar1[1]; + (**(code **)(*piVar3 + 0x20))(piVar3,&local_14,2); + FUN_00772040(psVar1 + 2,piVar3); + FUN_0082a0d0(); + return; + } + local_14 = (ushort)local_14._1_1_ << 8; + (**(code **)(*piVar3 + 0x20))(piVar3,&local_14,1); + FUN_0082a0d0(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0074904c.calls.txt b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0074904c.calls.txt new file mode 100644 index 000000000..a0f4a3d1f --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0074904c.calls.txt @@ -0,0 +1,5 @@ +# Calls from FUN_0074904c @ 0074904c +00772040 FUN_00772040 +0082a0d0 FUN_0082a0d0 +0082a0b8 FUN_0082a0b8 +00771fa0 thunk_FUN_007d2340 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/00749380.c b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/00749380.c new file mode 100644 index 000000000..1f5cccd42 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/00749380.c @@ -0,0 +1,53 @@ + +void FUN_00749380(void) + +{ + int iVar1; + int iVar2; + int *piVar3; + int extraout_r2; + undefined8 uVar4; + undefined1 auStack_bc [48]; + undefined1 local_8c; + undefined1 local_8b; + undefined1 local_8a; + undefined1 auStack_84 [52]; + char local_50 [4]; + undefined1 auStack_4c [52]; + + uVar4 = FUN_0082a0b8(); + piVar3 = (int *)((ulonglong)uVar4 >> 0x20); + iVar1 = (int)uVar4; + (**(code **)(*piVar3 + 0x24))(piVar3,local_50,1,*(code **)(*piVar3 + 0x24),0xfffffffe,0xfffffffe); + if (local_50[0] == '\x01') { + if (extraout_r2 < 0x31) { + FUN_007d2668(auStack_4c); + FUN_006ea2e0(piVar3,auStack_4c); + FUN_00771da0(auStack_bc,auStack_4c); + FUN_007d24cc(iVar1 + 4,auStack_84,auStack_bc); + FUN_007d2414(auStack_84); + *(undefined1 *)(iVar1 + 0x34) = local_8c; + *(undefined1 *)(iVar1 + 0x35) = local_8b; + *(undefined1 *)(iVar1 + 0x36) = local_8a; + thunk_FUN_007d2414(auStack_bc); + (**(code **)(*piVar3 + 0x24))(piVar3,iVar1,2); + (**(code **)(*piVar3 + 0x24))(piVar3,iVar1 + 2,2); + FUN_007d2414(auStack_4c); + } + else { + (**(code **)(*piVar3 + 0x24))(piVar3,iVar1,2); + (**(code **)(*piVar3 + 0x24))(piVar3,iVar1 + 2,2); + iVar2 = FUN_0077216c(auStack_84,piVar3,extraout_r2); + FUN_007d24cc(iVar1 + 4,auStack_4c,iVar2); + FUN_007d2414(auStack_4c); + *(undefined1 *)(iVar1 + 0x34) = *(undefined1 *)(iVar2 + 0x30); + *(undefined1 *)(iVar1 + 0x35) = *(undefined1 *)(iVar2 + 0x31); + *(undefined1 *)(iVar1 + 0x36) = *(undefined1 *)(iVar2 + 0x32); + thunk_FUN_007d2414(auStack_84); + } + FUN_00749100(iVar1); + } + FUN_0082a0d0(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0075bb00.c b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0075bb00.c new file mode 100644 index 000000000..496816d93 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0075bb00.c @@ -0,0 +1,225 @@ + +void FUN_0075bb00(void) + +{ + float fVar1; + byte bVar2; + int *piVar3; + int iVar4; + int iVar5; + int iVar6; + ushort uVar7; + byte *pbVar8; + byte *pbVar9; + byte *pbVar10; + short sVar11; + byte *pbVar12; + uint uVar13; + uint uVar14; + uint in_fpscr; + float fVar15; + float fVar16; + float fVar17; + longlong lVar18; + uint local_44; + byte local_40; + byte local_3f; + byte local_3e; + byte local_3d; + byte local_3c; + byte local_3b; + byte local_3a; + byte local_39; + byte local_38 [2]; + ushort local_36 [9]; + + lVar18 = FUN_0082a0b8(); + fVar1 = DAT_0075bc38; + iVar6 = (int)((ulonglong)lVar18 >> 0x20); + piVar3 = (int *)lVar18; + local_44 = 0; + if (0 < DAT_00934f08) { + do { + if ((local_44 & 0x1f) == 0) { + iVar4 = FUN_00564548(); + fVar16 = (float)VectorSignedToFloat(local_44,(byte)(in_fpscr >> 0x16) & 3); + fVar15 = (float)VectorSignedToFloat((int)DAT_00934f08,(byte)(in_fpscr >> 0x16) & 3); + fVar15 = (fVar16 / fVar15) * fVar1; + uVar13 = in_fpscr & 0xfffffff | (uint)(fVar15 < 1.0) << 0x1f | (uint)(fVar15 == 1.0) << 0x1e + ; + in_fpscr = uVar13 | (uint)NAN(fVar15) << 0x1c; + *(float *)(iVar4 + 0x2e98) = fVar15; + bVar2 = (byte)(uVar13 >> 0x18); + if (!(bool)(bVar2 >> 6 & 1) && bVar2 >> 7 == ((byte)(in_fpscr >> 0x1c) & 1)) { + *(float *)(iVar4 + 0x2e98) = 1.0; + } + } + iVar4 = 0; + pbVar12 = (byte *)(DAT_009751c0 + DAT_009751cc * local_44 * 0x10); + if (0 < DAT_00934f0c) { + do { + *pbVar12 = 0; + (**(code **)(*piVar3 + 0x24))(piVar3,&local_3e,1); + bVar2 = (pbVar12[1] ^ local_3e) & 1 ^ pbVar12[1]; + pbVar12[1] = bVar2; + bVar2 = bVar2 ^ (bVar2 ^ local_3e) & 2; + pbVar12[1] = bVar2; + bVar2 = bVar2 ^ (bVar2 ^ local_3e) & 4; + pbVar12[1] = bVar2; + *(ushort *)(pbVar12 + 4) = *(ushort *)(pbVar12 + 4) & 0xfff8 | local_3e >> 3 & 7; + bVar2 = (bVar2 ^ local_3e) & 0x7f ^ local_3e; + pbVar12[1] = bVar2; + if ((bVar2 & 1) != 0) { + if (lVar18 < 0x3b00000000) { + (**(code **)(*piVar3 + 0x24))(piVar3,&local_39,1); + uVar7 = *(ushort *)(pbVar12 + 8) ^ (ushort)local_39; + } + else { + (**(code **)(*piVar3 + 0x24))(piVar3,local_36,2); + uVar7 = *(ushort *)(pbVar12 + 8) ^ local_36[0]; + } + uVar7 = uVar7 & 0x1ff ^ *(ushort *)(pbVar12 + 8); + uVar13 = uVar7 & 0x1ff; + *(ushort *)(pbVar12 + 8) = uVar7; + if (uVar13 == 0x7f) { + pbVar12[1] = pbVar12[1] & 0xfe; + } + if (((&DAT_00a0fb80)[uVar13 * 4] & 0x10000) == 0) { + sVar11 = -1; + pbVar12[0xc] = 0xff; + pbVar12[0xd] = 0xff; +LAB_0075bce2: + *(short *)(pbVar12 + 0xe) = sVar11; + } + else { + (**(code **)(*piVar3 + 0x24))(piVar3,pbVar12 + 0xc,2); + (**(code **)(*piVar3 + 0x24))(piVar3,pbVar12 + 0xe,2); + FUN_00751558(pbVar12,iVar6); + uVar7 = *(ushort *)(pbVar12 + 8); + if ((uVar7 & 0x1ff) == 0x13) { + if (-1 < *(short *)(pbVar12 + 0xe)) goto LAB_0075bce4; + sVar11 = 0; + goto LAB_0075bce2; + } + if ((uVar7 & 0x1ff) == 0x90) { + sVar11 = 0; + goto LAB_0075bce2; + } + if (lVar18 < 0x3a00000000) { + if (uVar13 == 0x23) { + sVar11 = *(short *)(pbVar12 + 0xe) + 0x36; + } + else { + if (uVar13 != 0x24) goto LAB_0075bce4; + sVar11 = *(short *)(pbVar12 + 0xe) + 0x6c; + } + goto LAB_0075bce2; + } + } +LAB_0075bce4: + *(ushort *)(pbVar12 + 8) = uVar7 & 0xfe00 | (ushort)uVar13; + (**(code **)(*piVar3 + 0x24))(piVar3,&local_3c,1); + pbVar12[2] = local_3c; + } + (**(code **)(*piVar3 + 0x24))(piVar3,&local_3d,1); + if (local_3d != 0) { + (**(code **)(*piVar3 + 0x24))(piVar3,&local_3a,1); + pbVar12[3] = local_3a; + } + pbVar12[10] = local_3d; + (**(code **)(*piVar3 + 0x24))(piVar3,pbVar12 + 6,1); + if (pbVar12[6] != 0) { + (**(code **)(*piVar3 + 0x24))(piVar3,local_38,1); + *(ushort *)(pbVar12 + 4) = + *(ushort *)(pbVar12 + 4) ^ + (*(ushort *)(pbVar12 + 4) ^ (ushort)local_38[0] << 3) & 0x18; + } + (**(code **)(*piVar3 + 0x24))(piVar3,&local_40,1); + *pbVar12 = local_40 & 0x10 | *pbVar12; + bVar2 = (pbVar12[1] ^ local_40 >> 2) & 8 ^ pbVar12[1]; + pbVar12[1] = bVar2; + pbVar12[1] = bVar2 ^ (bVar2 ^ local_40 >> 2) & 0x10; + if (iVar6 - 0x3cU < 9) { + (**(code **)(*piVar3 + 0x24))(piVar3,&local_3b,1); + *(ushort *)(pbVar12 + 8) = *(ushort *)(pbVar12 + 8) & 0xe1ff | (local_3b & 0xfff0) << 5; + } + iVar5 = FUN_007cf070(); + if (iVar5 != 0) { + *(ushort *)(pbVar12 + 8) = *(ushort *)(pbVar12 + 8) & 0xe1ff; + } + (**(code **)(*piVar3 + 0x24))(piVar3,&local_40,1); + uVar13 = (uint)local_40; + if ((local_40 & 0x80) != 0) { + (**(code **)(*piVar3 + 0x24))(piVar3,&local_40,1); + uVar13 = uVar13 & 0x7f | (uint)local_40 << 7; + } + if (uVar13 != 0) { + if (uVar13 != 0) { + pbVar8 = pbVar12; + pbVar9 = pbVar12 + 0x10; + do { + pbVar10 = pbVar9 + 4; + *(undefined4 *)pbVar9 = *(undefined4 *)pbVar8; + pbVar8 = pbVar8 + 4; + pbVar9 = pbVar10; + } while (pbVar10 != pbVar12 + 0x10 + uVar13 * 0x10); + } + pbVar12 = pbVar12 + uVar13 * 0x10; + } + iVar4 = iVar4 + uVar13 + 1; + pbVar12 = pbVar12 + 0x10; + } while (iVar4 < DAT_00934f0c); + } + local_44 = local_44 + 1; + } while ((int)local_44 < (int)DAT_00934f08); + } + fVar15 = DAT_0075bf94; + if ((0x44ffffffff < lVar18) && (uVar13 = 0, 0 < DAT_00934f08)) { + do { + if ((uVar13 & 0x1f) == 0) { + iVar6 = FUN_00564548(); + fVar17 = (float)VectorSignedToFloat(uVar13,(byte)(in_fpscr >> 0x16) & 3); + fVar16 = (float)VectorSignedToFloat((int)DAT_00934f08,(byte)(in_fpscr >> 0x16) & 3); + fVar16 = fVar1 + (fVar17 / fVar16) * fVar15; + uVar14 = in_fpscr & 0xfffffff | (uint)(fVar16 < 1.0) << 0x1f | (uint)(fVar16 == 1.0) << 0x1e + ; + in_fpscr = uVar14 | (uint)NAN(fVar16) << 0x1c; + *(float *)(iVar6 + 0x2e98) = fVar16; + bVar2 = (byte)(uVar14 >> 0x18); + if (!(bool)(bVar2 >> 6 & 1) && bVar2 >> 7 == ((byte)(in_fpscr >> 0x1c) & 1)) { + *(float *)(iVar6 + 0x2e98) = 1.0; + } + } + iVar4 = 0; + iVar6 = DAT_009751c0 + DAT_009751cc * uVar13 * 0x10; + if (0 < DAT_00934f0c) { + do { + (**(code **)(*piVar3 + 0x24))(piVar3,&local_3f,1); + *(ushort *)(iVar6 + 8) = *(ushort *)(iVar6 + 8) & 0xe1ff | (local_3f & 0xfff0) << 5; + (**(code **)(*piVar3 + 0x24))(piVar3,&local_3f,1); + uVar14 = (uint)local_3f; + if ((local_3f & 0x80) != 0) { + (**(code **)(*piVar3 + 0x24))(piVar3,&local_3f,1); + uVar14 = uVar14 & 0x7f | (uint)local_3f << 7; + } + iVar4 = iVar4 + uVar14; + if (uVar14 != 0) { + do { + uVar14 = uVar14 - 1; + *(ushort *)(iVar6 + 0x18) = + *(ushort *)(iVar6 + 0x18) ^ + (*(ushort *)(iVar6 + 8) ^ *(ushort *)(iVar6 + 0x18)) & 0x1e00; + iVar6 = iVar6 + 0x10; + } while (0 < (int)uVar14); + } + iVar4 = iVar4 + 1; + iVar6 = iVar6 + 0x10; + } while (iVar4 < DAT_00934f0c); + } + uVar13 = uVar13 + 1; + } while ((int)uVar13 < (int)DAT_00934f08); + } + FUN_0082a0d0(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0075c298.c b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0075c298.c new file mode 100644 index 000000000..72da25630 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0075c298.c @@ -0,0 +1,185 @@ + +void FUN_0075c298(void) + +{ + float fVar1; + ushort uVar2; + char cVar3; + int *piVar4; + int iVar5; + uint *puVar6; + int iVar7; + uint uVar8; + uint uVar9; + int iVar10; + byte bVar11; + int iVar12; + int iVar13; + int iVar14; + uint uVar15; + uint in_fpscr; + float fVar16; + float fVar17; + float fVar18; + undefined4 local_4c; + undefined4 local_48; + undefined4 local_44; + undefined4 local_40; + undefined2 local_3c; + + piVar4 = (int *)FUN_0082a0b8(); + fVar1 = DAT_0075c364; + uVar15 = 0; + if (0 < DAT_00934f08) { + do { + if ((uVar15 & 0x1f) == 0) { + iVar5 = FUN_00564548(); + fVar17 = (float)VectorSignedToFloat(uVar15,(byte)(in_fpscr >> 0x16) & 3); + fVar16 = (float)VectorSignedToFloat((int)DAT_00934f08,(byte)(in_fpscr >> 0x16) & 3); + fVar16 = (fVar17 / fVar16) * fVar1; + uVar8 = in_fpscr & 0xfffffff | (uint)(fVar16 < 1.0) << 0x1f | (uint)(fVar16 == 1.0) << 0x1e; + in_fpscr = uVar8 | (uint)NAN(fVar16) << 0x1c; + *(float *)(iVar5 + 0x2e98) = fVar16; + bVar11 = (byte)(uVar8 >> 0x18); + if (!(bool)(bVar11 >> 6 & 1) && bVar11 >> 7 == ((byte)(in_fpscr >> 0x1c) & 1)) { + *(float *)(iVar5 + 0x2e98) = 1.0; + } + } + iVar5 = 0; + if (0 < DAT_00934f0c) { + do { + puVar6 = (uint *)(DAT_009751c0 + (DAT_009751cc * uVar15 + iVar5) * 0x10); + local_44 = puVar6[2]; + uVar9 = *puVar6; + local_48 = puVar6[1]; + local_40 = puVar6[3]; + uVar8 = local_44 & 0x1ff; + local_4c._1_1_ = (byte)(uVar9 >> 8); + bVar11 = local_4c._1_1_; + if (uVar8 == 0x7f) { + bVar11 = local_4c._1_1_ & 0xfe; + local_4c = uVar9 & 0xfffffeff; + uVar9 = local_4c; + } + local_4c = uVar9; + uVar2 = (ushort)local_48; + local_3c = CONCAT11(local_3c._1_1_,bVar11 & 0x87 | (byte)((local_48 & 7) << 3)); + (**(code **)(*piVar4 + 0x20))(piVar4,&local_3c,1); + if ((bVar11 & 1) != 0) { + local_3c = (ushort)uVar8; + (**(code **)(*piVar4 + 0x20))(piVar4,&local_3c,2); + if (((&DAT_00a0fb80)[uVar8 * 4] & 0x10000) != 0) { + local_3c = (undefined2)local_40; + (**(code **)(*piVar4 + 0x20))(piVar4,&local_3c,2); + local_3c = local_40._2_2_; + (**(code **)(*piVar4 + 0x20))(piVar4,&local_3c,2); + } + local_3c = CONCAT11(local_3c._1_1_,local_4c._2_1_); + (**(code **)(*piVar4 + 0x20))(piVar4,&local_3c,1); + } + cVar3 = local_44._2_1_; + local_3c._0_1_ = local_44._2_1_; + (**(code **)(*piVar4 + 0x20))(piVar4,&local_3c,1); + if (cVar3 != '\0') { + local_3c._0_1_ = local_4c._3_1_; + (**(code **)(*piVar4 + 0x20))(piVar4,&local_3c,1); + } + cVar3 = local_48._2_1_; + local_3c._0_1_ = local_48._2_1_; + (**(code **)(*piVar4 + 0x20))(piVar4,&local_3c,1); + if (cVar3 != '\0') { + local_3c._0_1_ = (byte)(uVar2 >> 3) & 3; + (**(code **)(*piVar4 + 0x20))(piVar4,&local_3c,1); + } + local_3c = CONCAT11(local_3c._1_1_,(byte)local_4c & 0x10 | (bVar11 & 0x18) << 2); + (**(code **)(*piVar4 + 0x20))(piVar4,&local_3c,1); + iVar10 = 1; + iVar13 = iVar5 + 1; + iVar14 = (int)DAT_00934f0c; + if (iVar13 < iVar14) { + iVar12 = DAT_009751c0 + (DAT_009751cc * uVar15 + iVar5 + 1) * 0x10; + do { + iVar7 = FUN_00751fd0(&local_4c,iVar12); + if (iVar7 == 0) break; + iVar13 = iVar13 + 1; + iVar10 = iVar10 + 1; + iVar12 = iVar12 + 0x10; + } while (iVar13 < iVar14); + } + iVar10 = iVar10 + -1; + if (iVar10 < 0x80) { + local_3c = CONCAT11(local_3c._1_1_,(char)iVar10); + } + else { + local_3c = CONCAT11(local_3c._1_1_,(char)iVar10) | 0x80; + (**(code **)(*piVar4 + 0x20))(piVar4,&local_3c,1); + local_3c = CONCAT11(local_3c._1_1_,(char)(iVar10 >> 7)); + } + (**(code **)(*piVar4 + 0x20))(piVar4,&local_3c,1); + iVar5 = iVar5 + iVar10 + 1; + } while (iVar5 < DAT_00934f0c); + } + uVar15 = uVar15 + 1; + } while ((int)uVar15 < (int)DAT_00934f08); + } + fVar16 = DAT_0075c67c; + uVar15 = 0; + if (0 < DAT_00934f08) { + do { + if ((uVar15 & 0x1f) == 0) { + iVar5 = FUN_00564548(); + fVar18 = (float)VectorSignedToFloat(uVar15,(byte)(in_fpscr >> 0x16) & 3); + fVar17 = (float)VectorSignedToFloat((int)DAT_00934f08,(byte)(in_fpscr >> 0x16) & 3); + fVar17 = fVar1 + (fVar18 / fVar17) * fVar16; + uVar8 = in_fpscr & 0xfffffff | (uint)(fVar17 < 1.0) << 0x1f | (uint)(fVar17 == 1.0) << 0x1e; + in_fpscr = uVar8 | (uint)NAN(fVar17) << 0x1c; + *(float *)(iVar5 + 0x2e98) = fVar17; + bVar11 = (byte)(uVar8 >> 0x18); + if (!(bool)(bVar11 >> 6 & 1) && bVar11 >> 7 == ((byte)(in_fpscr >> 0x1c) & 1)) { + *(float *)(iVar5 + 0x2e98) = 1.0; + } + iVar5 = FUN_00564548(); + FUN_004528ac("Tile::Save: %f \n",*(undefined4 *)(iVar5 + 0x2e98)); + } + iVar5 = 0; + if (0 < DAT_00934f0c) { + do { + puVar6 = (uint *)(DAT_009751c0 + (DAT_009751cc * uVar15 + iVar5) * 0x10); + uVar8 = puVar6[2]; + local_4c = *puVar6; + local_48 = puVar6[1]; + local_40 = puVar6[3]; + local_44 = uVar8; + local_3c._0_1_ = (char)((uVar8 >> 9 & 0xf) << 4); + (**(code **)(*piVar4 + 0x20))(piVar4,&local_3c,1); + iVar10 = iVar5 + 1; + iVar13 = 1; + if (iVar10 < DAT_00934f0c) { + iVar14 = DAT_009751c0 + (DAT_009751cc * uVar15 + iVar5 + 1) * 0x10; + do { + if ((uVar8 & 0x1fff) >> 9 != (*(ushort *)(iVar14 + 8) & 0x1fff) >> 9) break; + iVar10 = iVar10 + 1; + iVar13 = iVar13 + 1; + iVar14 = iVar14 + 0x10; + } while (iVar10 < DAT_00934f0c); + } + iVar13 = iVar13 + -1; + if (iVar13 < 0x80) { + local_3c = CONCAT11(local_3c._1_1_,(char)iVar13); + } + else { + local_3c = CONCAT11(local_3c._1_1_,(char)iVar13) | 0x80; + (**(code **)(*piVar4 + 0x20))(piVar4,&local_3c,1); + local_3c = CONCAT11(local_3c._1_1_,(char)(iVar13 >> 7)); + } + (**(code **)(*piVar4 + 0x20))(piVar4,&local_3c,1); + iVar5 = iVar5 + iVar13 + 1; + } while (iVar5 < DAT_00934f0c); + } + uVar15 = uVar15 + 1; + } while ((int)uVar15 < (int)DAT_00934f08); + } + FUN_0082a0d0(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0075c298.calls.txt b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0075c298.calls.txt new file mode 100644 index 000000000..1082ecf76 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0075c298.calls.txt @@ -0,0 +1,6 @@ +# Calls from FUN_0075c298 @ 0075c298 +00751fd0 FUN_00751fd0 +0082a0d0 FUN_0082a0d0 +0082a0b8 FUN_0082a0b8 +004528ac FUN_004528ac +00564548 FUN_00564548 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/007783c8.c b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/007783c8.c new file mode 100644 index 000000000..2f9f8cf97 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/007783c8.c @@ -0,0 +1,38 @@ + +int * FUN_007783c8(int *param_1,undefined4 param_2) + +{ + void *pvVar1; + int *piVar2; + undefined4 uVar3; + int *piVar4; + undefined4 uVar5; + + pvVar1 = malloc(0x9c); + if (pvVar1 == (void *)0x0) { + piVar2 = (int *)0x0; + } + else { + *(undefined4 *)((int)pvVar1 + 0x3c) = 0; + *(undefined4 *)((int)pvVar1 + 0x88) = 0; + piVar2 = (int *)FUN_005f544c(pvVar1,param_2,0); + } + uVar3 = (**(code **)(*piVar2 + 4))(piVar2); + (**(code **)(*param_1 + 0x24))(param_1,uVar3,param_2,*(code **)(*param_1 + 0x24),pvVar1); + pvVar1 = malloc(0x9c); + if (pvVar1 == (void *)0x0) { + piVar4 = (int *)0x0; + } + else { + *(undefined4 *)((int)pvVar1 + 0x3c) = 0; + *(undefined4 *)((int)pvVar1 + 0x88) = 0; + piVar4 = (int *)FUN_005f544c(pvVar1,param_2,0); + } + (**(code **)(*piVar4 + 8))(piVar4,param_2); + uVar3 = (**(code **)(*piVar4 + 4))(piVar4); + uVar5 = (**(code **)(*piVar2 + 4))(piVar2); + FUN_004f8d18(&DAT_00a59380,uVar5,uVar3,param_2,pvVar1); + (**(code **)*piVar2)(piVar2,1); + return piVar4; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/00789a48.c b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/00789a48.c new file mode 100644 index 000000000..78dc20306 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/00789a48.c @@ -0,0 +1,38 @@ + +void FUN_00789a48(void) + +{ + int *piVar1; + uint uVar2; + int local_1c; + undefined1 local_18 [4]; + + piVar1 = (int *)FUN_0082a0b8(); + local_1c = 0x46; + (**(code **)(*piVar1 + 0x20))(piVar1,&local_1c,4); + local_1c = 0; + (**(code **)(*piVar1 + 0x20))(piVar1,&local_1c,4); + (**(code **)(*piVar1 + 0x40))(piVar1,&DAT_00a9b4d8); + local_18[0] = DAT_00a592f6; + (**(code **)(*piVar1 + 0x20))(piVar1,local_18,1); + local_1c = FUN_00461c3c(); + FUN_00645dd0(&DAT_00ac34a4,&local_1c); + if (100 < (uint)(DAT_00ac34a8 - (int)DAT_00ac34a4 >> 2)) { + memmove(DAT_00ac34a4,(void *)((int)DAT_00ac34a4 + 4), + (DAT_00ac34a8 - ((int)DAT_00ac34a4 + 4) >> 2) << 2); + DAT_00ac34a8 = DAT_00ac34a8 + -4; + } + local_1c = DAT_00ac34a8 - (int)DAT_00ac34a4 >> 2; + (**(code **)(*piVar1 + 0x20))(piVar1,&local_1c,4); + uVar2 = 0; + if (DAT_00ac34a8 - (int)DAT_00ac34a4 >> 2 != 0) { + do { + local_1c = *(int *)((int)DAT_00ac34a4 + uVar2 * 4); + (**(code **)(*piVar1 + 0x20))(piVar1,&local_1c,4); + uVar2 = uVar2 + 1; + } while (uVar2 < (uint)(DAT_00ac34a8 - (int)DAT_00ac34a4 >> 2)); + } + FUN_0082a0d0(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/00789a48.calls.txt b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/00789a48.calls.txt new file mode 100644 index 000000000..abfa2d351 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/00789a48.calls.txt @@ -0,0 +1,6 @@ +# Calls from FUN_00789a48 @ 00789a48 +00461c3c FUN_00461c3c +0082a0b8 FUN_0082a0b8 +0082a0d0 FUN_0082a0d0 +EXTERNAL:00000159 memmove +00645dd0 FUN_00645dd0 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0078d0d8.c b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0078d0d8.c new file mode 100644 index 000000000..0f3e1e801 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0078d0d8.c @@ -0,0 +1,219 @@ + +void FUN_0078d0d8(void) + +{ + int iVar1; + int iVar2; + int *piVar3; + undefined4 uVar4; + uint uVar5; + undefined2 *puVar6; + longlong lVar7; + byte local_44 [2]; + short local_42; + char local_40; + char local_3f [3]; + undefined1 auStack_3c [4]; + uint local_38; + undefined4 local_34; + undefined4 local_30 [4]; + + lVar7 = FUN_0082a0b8(); + uVar4 = (undefined4)((ulonglong)lVar7 >> 0x20); + piVar3 = (int *)lVar7; + if (0x41ffffffff < lVar7) { + iVar1 = (**(code **)(*piVar3 + 0x30))(); + iVar2 = (**(code **)(*piVar3 + 0x2c))(piVar3); + piVar3 = (int *)FUN_007783c8(piVar3,iVar1 - iVar2); + if (piVar3 == (int *)0x0) goto LAB_0078d7a2; + } + (**(code **)(*piVar3 + 0x24))(piVar3,local_30,4); + local_34 = 0; + (**(code **)(*piVar3 + 0x24))(piVar3,&local_34,4); + (**(code **)(*piVar3 + 0x24))(piVar3,&DAT_00934f00,4); + (**(code **)(*piVar3 + 0x24))(piVar3,&local_42,2); + DAT_00934f04 = (int)local_42; + (**(code **)(*piVar3 + 0x24))(piVar3,&DAT_00934f0c,2); + (**(code **)(*piVar3 + 0x24))(piVar3,&DAT_00934f08,2); + FUN_007874c4(); + FUN_0078bfa8(); + DAT_00a59300 = local_30[0]; + DAT_00a592fc = local_34; + (**(code **)(*piVar3 + 0x24))(piVar3,&DAT_00a59254,2); + (**(code **)(*piVar3 + 0x24))(piVar3,&DAT_00a59250,2); + (**(code **)(*piVar3 + 0x24))(piVar3,&local_42,2); + DAT_00a7b4d4 = (int)local_42; + DAT_00a9b538 = DAT_00a7b4d4 << 4; + (**(code **)(*piVar3 + 0x24))(piVar3,&local_42,2); + DAT_00a592ec = (int)local_42; + DAT_00a592e8 = DAT_00a592ec << 4; + if (lVar7 < 0x4300000000) { + DAT_00a592e4 = DAT_00934f0c + -0xbe; + } + else { + (**(code **)(*piVar3 + 0x24))(piVar3,&local_42,2); + DAT_00a592e4 = (int)local_42; + } + DAT_00a5925c = DAT_00a592e4 << 4; + FUN_00762bc4(&DAT_00a56160,piVar3,uVar4); + (**(code **)(*piVar3 + 0x24))(piVar3,&DAT_00a592f4,2); + (**(code **)(*piVar3 + 0x24))(piVar3,&DAT_00a592f0,2); + (**(code **)(*piVar3 + 0x24))(piVar3,&DAT_00a13e8e,1); + FUN_007754bc(piVar3,uVar4); + FUN_00652af4(piVar3,uVar4); + (**(code **)(*piVar3 + 0x24))(piVar3,&DAT_00a13e84,1); + (**(code **)(*piVar3 + 0x24))(piVar3,&DAT_00a13e85,1); + (**(code **)(*piVar3 + 0x24))(piVar3,local_44,1); + DAT_00a13e7c = (uint)local_44[0]; + (**(code **)(*piVar3 + 0x24))(piVar3,&DAT_00a13e80,4); + (**(code **)(*piVar3 + 0x24))(piVar3,&DAT_00934c38,2); + (**(code **)(*piVar3 + 0x24))(piVar3,&DAT_00934c3c,2); + (**(code **)(*piVar3 + 0x24))(piVar3,&DAT_00934c40,2); + (**(code **)(*piVar3 + 0x24))(piVar3,&DAT_00a59257,1); + (**(code **)(*piVar3 + 0x24))(piVar3,&DAT_00a56170,2); + (**(code **)(*piVar3 + 0x24))(piVar3,local_44,1); + DAT_00a5934c = (uint)local_44[0]; + (**(code **)(*piVar3 + 0x24))(piVar3,&local_42,2); + DAT_00a59348 = (int)local_42; + (**(code **)(*piVar3 + 0x24))(piVar3,local_44,1); + DAT_00a59340 = (uint)local_44[0]; + (**(code **)(*piVar3 + 0x24))(piVar3,&DAT_00a59344,4); + if (lVar7 < 0x4000000000) { + FUN_005fb174(); + } + else { + FUN_005fb2c0(piVar3); + } + if (0x39ffffffff < lVar7) { + iVar1 = 0; + do { + (**(code **)(*piVar3 + 0x24))(piVar3,&DAT_00a13e50 + iVar1,1); + iVar1 = iVar1 + 1; + } while (iVar1 < 4); + puVar6 = &DAT_00a13e54; + iVar1 = 3; + do { + (**(code **)(*piVar3 + 0x24))(piVar3,puVar6,2); + puVar6 = puVar6 + 1; + iVar1 = iVar1 + -1; + } while (iVar1 != 0); + iVar1 = 0; + do { + (**(code **)(*piVar3 + 0x24))(piVar3,&DAT_00a13e44 + iVar1,1); + iVar1 = iVar1 + 1; + } while (iVar1 < 4); + puVar6 = &DAT_00a13e48; + iVar1 = 3; + do { + (**(code **)(*piVar3 + 0x24))(piVar3,puVar6,2); + puVar6 = puVar6 + 1; + iVar1 = iVar1 + -1; + } while (iVar1 != 0); + } + (**(code **)(*piVar3 + 0x24))(piVar3,local_44,1); + uVar5 = (uint)local_44[0]; + DAT_00a13e40 = uVar5 & 3; + DAT_00a13e38 = (uVar5 & 0xf) >> 2; + DAT_00a13e3c = (uVar5 & 0x3f) >> 4; + (**(code **)(*piVar3 + 0x24))(piVar3,local_44,1); + DAT_00a13ee8 = (uint)local_44[0]; + (**(code **)(*piVar3 + 0x24))(piVar3,local_44,1); + DAT_00a13eec = (uint)local_44[0]; + (**(code **)(*piVar3 + 0x24))(piVar3,local_44,1); + DAT_00a13ef0 = (uint)local_44[0]; + (**(code **)(*piVar3 + 0x24))(piVar3,local_44,1); + DAT_00a13ef4 = (uint)local_44[0]; + (**(code **)(*piVar3 + 0x24))(piVar3,local_44,1); + DAT_00a13ef8 = (uint)local_44[0]; + (**(code **)(*piVar3 + 0x24))(piVar3,local_44,1); + DAT_00a13efc = (uint)local_44[0]; + (**(code **)(*piVar3 + 0x24))(piVar3,local_44,1); + DAT_00a13f00 = (uint)local_44[0]; + (**(code **)(*piVar3 + 0x24))(piVar3,local_44,1); + DAT_00a13f04 = (uint)local_44[0]; + if (lVar7 < 0x3e00000000) { + DAT_00934c50 = 7; + DAT_00934c54 = 6; + DAT_00934c58 = 9; + DAT_00934c5c = 8; + } + else { + (**(code **)(*piVar3 + 0x24))(piVar3,&local_42,2); + DAT_00934c50 = (int)local_42; + (**(code **)(*piVar3 + 0x24))(piVar3,&local_42,2); + DAT_00934c54 = (int)local_42; + (**(code **)(*piVar3 + 0x24))(piVar3,&local_42,2); + DAT_00934c58 = (int)local_42; + (**(code **)(*piVar3 + 0x24))(piVar3,&local_42,2); + DAT_00934c5c = (int)local_42; + } + (**(code **)(*piVar3 + 0x24))(piVar3,auStack_3c,4); + FUN_0075bb00(piVar3,uVar4); + (**(code **)(*piVar3 + 0x24))(piVar3,auStack_3c,4); + FUN_005ec460(piVar3,uVar4); + (**(code **)(*piVar3 + 0x24))(piVar3,auStack_3c,4); + iVar1 = 0; + do { + FUN_00749380(iVar1 + DAT_00934724,piVar3,uVar4); + iVar1 = iVar1 + 0x38; + } while (iVar1 < 56000); + (**(code **)(*piVar3 + 0x24))(piVar3,auStack_3c,4); + (**(code **)(*piVar3 + 0x24))(piVar3,local_3f,1); + local_40 = local_3f[0]; + iVar1 = FUN_007cf070(); + uVar4 = DAT_0078d7b0; + if (iVar1 == 0) { + if (local_40 == '\x01') { + iVar1 = 0; + do { + local_38 = 0; + if (lVar7 < 0x3f00000000) { + (**(code **)(*piVar3 + 0x24))(piVar3,local_44,1); + local_38 = (uint)local_44[0]; + } + else { + (**(code **)(*piVar3 + 0x24))(piVar3,&local_38,4); + } + iVar2 = FUN_007cf070(); + if (iVar2 == 0) { + FUN_006af0fc(uVar4,iVar1 + DAT_009656cc,local_38); + (**(code **)(*piVar3 + 0x24))(piVar3,DAT_009656cc + iVar1 + 0x1b0,4); + (**(code **)(*piVar3 + 0x24))(piVar3,DAT_009656cc + iVar1 + 0x1b4,4); + *(int *)(iVar1 + DAT_009656cc + 0x1c0) = (int)*(float *)(iVar1 + DAT_009656cc + 0x1b0); + *(int *)(iVar1 + DAT_009656cc + 0x1c4) = (int)*(float *)(iVar1 + DAT_009656cc + 0x1b4); + (**(code **)(*piVar3 + 0x24))(piVar3,iVar1 + DAT_009656cc + 0x194,1); + (**(code **)(*piVar3 + 0x24))(piVar3,DAT_009656cc + iVar1 + 0x272,2); + (**(code **)(*piVar3 + 0x24))(piVar3,DAT_009656cc + iVar1 + 0x274,2); + } + iVar1 = iVar1 + 0x2f4; + (**(code **)(*piVar3 + 0x24))(piVar3,&local_40,1); + } while (local_40 == '\x01'); + } + (**(code **)(*piVar3 + 0x24))(piVar3,auStack_3c,4); + FUN_006ea2e0(piVar3,&DAT_00965a08); + FUN_006ea2e0(piVar3,&DAT_00965a38); + FUN_006ea2e0(piVar3,&DAT_00965a68); + FUN_006ea2e0(piVar3,&DAT_00965a98); + FUN_006ea2e0(piVar3,&DAT_00965af8); + FUN_006ea2e0(piVar3,&DAT_009660f8); + FUN_006ea2e0(piVar3,&DAT_00965df8); + FUN_006ea2e0(piVar3,&DAT_00966ae8); + FUN_006ea2e0(piVar3,&DAT_00966b18); + FUN_006ea2e0(piVar3,&DAT_00966e18); + FUN_006ea2e0(piVar3,&DAT_009674d8); + FUN_006ea2e0(piVar3,&DAT_00967838); + FUN_006ea2e0(piVar3,&DAT_00967da8); + FUN_006ea2e0(piVar3,&DAT_00967e08); + FUN_006ea2e0(piVar3,&DAT_00967dd8); + FUN_006ea2e0(piVar3,&DAT_00968168); + FUN_006ea2e0(piVar3,&DAT_00968198); + FUN_006ea2e0(piVar3,&DAT_009681c8); + FUN_006ea2e0(piVar3,&DAT_00969c08); + } + iVar1 = FUN_00564548(); + *(undefined4 *)(iVar1 + 0x2e98) = 0x3f800000; +LAB_0078d7a2: + FUN_0082a0d0(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0078d0d8.calls.txt b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0078d0d8.calls.txt new file mode 100644 index 000000000..759432f57 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0078d0d8.calls.txt @@ -0,0 +1,18 @@ +# Calls from FUN_0078d0d8 @ 0078d0d8 +006ea2e0 FUN_006ea2e0 +00652af4 FUN_00652af4 +005fb2c0 FUN_005fb2c0 +007754bc FUN_007754bc +005ec460 FUN_005ec460 +0078bfa8 FUN_0078bfa8 +0082a0d0 FUN_0082a0d0 +007783c8 FUN_007783c8 +007874c4 FUN_007874c4 +005fb174 FUN_005fb174 +0082a0b8 FUN_0082a0b8 +00762bc4 FUN_00762bc4 +007cf070 FUN_007cf070 +0075bb00 FUN_0075bb00 +006af0fc FUN_006af0fc +00564548 FUN_00564548 +00749380 FUN_00749380 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0078d7b4.c b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0078d7b4.c new file mode 100644 index 000000000..0fb3bc6b9 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0078d7b4.c @@ -0,0 +1,76 @@ + +void FUN_0078d7b4(void) + +{ + int *piVar1; + undefined4 uVar2; + int iVar3; + undefined4 local_b4 [2]; + uint local_ac [4]; + undefined4 local_9c; + uint local_98; + undefined4 local_94; + undefined4 uStack_90; + undefined1 auStack_8c [48]; + int local_5c; + int local_58; + undefined1 auStack_54 [4]; + undefined4 local_50; + undefined1 auStack_4c [52]; + + piVar1 = (int *)FUN_0082a0b8(); + local_94 = 0xfffffffe; + uStack_90 = 0xfffffffe; + (**(code **)(*piVar1 + 0x24))(piVar1,&local_5c,4); + if (0x46 < local_5c) goto LAB_0078d904; + local_50 = 0; + (**(code **)(*piVar1 + 0x24))(piVar1,&local_50,4); + FUN_007d2668(auStack_4c); + if (local_5c < 0x32) { + uVar2 = FUN_004ac644(piVar1[0xf],local_ac); + FUN_007d2d64(auStack_4c,uVar2); + if (0xf < local_98) { + FUN_00447c80(local_ac[0]); + } + local_98 = 0xf; + local_9c = 0; + local_ac[0] = local_ac[0] & 0xffffff00; + } + else { + FUN_006ea2e0(piVar1,auStack_4c); + } + FUN_007d24cc(&DAT_00a9b4d8,auStack_8c,auStack_4c); + FUN_007d2414(auStack_8c); + if (local_5c < 0x35) { +LAB_0078d886: + if (0x35 < local_5c) goto LAB_0078d88a; +LAB_0078d8ee: + local_b4[0] = 0; + FUN_00645dd0(&DAT_00ac34a4,local_b4); + } + else { + (**(code **)(*piVar1 + 0x24))(piVar1,&DAT_00a592f6,1); + if (local_5c < 0x36) { + (**(code **)(*piVar1 + 0x24))(piVar1,&DAT_00a5935c,4); + goto LAB_0078d886; + } +LAB_0078d88a: + std::_Container_base0::_Orphan_all((_Container_base0 *)&DAT_00ac34a4); + DAT_00ac34a8 = DAT_00ac34a4; + (**(code **)(*piVar1 + 0x24))(piVar1,&local_58,4); + iVar3 = 0; + if (0 < local_58) { + do { + (**(code **)(*piVar1 + 0x24))(piVar1,auStack_54,4); + FUN_006d69f0(&DAT_00ac34a4,auStack_54); + iVar3 = iVar3 + 1; + } while (iVar3 < local_58); + } + if (DAT_00ac34a4 == DAT_00ac34a8) goto LAB_0078d8ee; + } + FUN_007d2414(auStack_4c); +LAB_0078d904: + FUN_0082a0d0(local_5c); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0078d7b4.calls.txt b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0078d7b4.calls.txt new file mode 100644 index 000000000..9a0ba03b3 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0078d7b4.calls.txt @@ -0,0 +1,13 @@ +# Calls from FUN_0078d7b4 @ 0078d7b4 +006ea2e0 FUN_006ea2e0 +006d69f0 FUN_006d69f0 +00447c80 FUN_00447c80 +007d24cc FUN_007d24cc +007d2414 FUN_007d2414 +007d2668 FUN_007d2668 +0082a0b8 FUN_0082a0b8 +007d2d64 FUN_007d2d64 +EXTERNAL:000000a8 _Orphan_all +004ac644 FUN_004ac644 +0082a0d0 FUN_0082a0d0 +00645dd0 FUN_00645dd0 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0078dc9c.c b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0078dc9c.c new file mode 100644 index 000000000..4908ab613 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0078dc9c.c @@ -0,0 +1,444 @@ + +void FUN_0078dc9c(void) + +{ + int *piVar1; + undefined4 uVar2; + int iVar3; + uint uVar4; + undefined4 *puVar5; + undefined4 uVar6; + int *piVar7; + undefined4 uVar8; + code *pcVar9; + int iVar10; + int iVar11; + int iVar12; + int iVar13; + uint local_8da [4]; + undefined4 local_8ca; + uint local_8c6; + uint local_8c2 [4]; + undefined4 local_8b2; + uint local_8ae; + undefined4 local_8aa; + undefined4 local_8a6; + undefined4 local_8a2; + undefined4 local_89e; + undefined4 local_89a; + undefined4 local_896; + undefined4 local_892; + undefined4 uStack_88e; + undefined1 auStack_88a [48]; + undefined1 auStack_85a [48]; + undefined1 auStack_82a [48]; + undefined1 auStack_7fa [756]; + undefined1 local_506 [4]; + undefined1 local_502 [4]; + undefined1 local_4fe [4]; + undefined1 local_4fa [4]; + undefined1 local_4f6 [4]; + undefined1 local_4f2 [4]; + undefined1 local_4ee [4]; + undefined1 local_4ea [4]; + undefined1 local_4e6 [4]; + undefined1 local_4e2 [4]; + undefined1 local_4de [4]; + undefined1 local_4da [4]; + undefined1 local_4d6 [4]; + byte local_4d2 [4]; + undefined1 local_4ce [4]; + undefined1 local_4ca [4]; + undefined1 local_4c6 [4]; + undefined1 local_4c2 [4]; + undefined1 local_4be [4]; + undefined1 local_4ba [4]; + undefined2 local_4b6 [2]; + undefined2 local_4b2 [2]; + undefined2 local_4ae [2]; + undefined2 local_4aa [2]; + undefined2 local_4a6 [2]; + undefined1 *local_4a2; + undefined2 local_49e [2]; + undefined2 local_49a [2]; + undefined2 local_496 [2]; + undefined2 local_492 [2]; + undefined2 local_48e [2]; + undefined2 local_48a [2]; + undefined2 local_486 [2]; + undefined2 local_482 [2]; + undefined2 local_47e [2]; + undefined2 local_47a [2]; + undefined2 local_476 [2]; + undefined2 local_472 [2]; + undefined2 local_46e [2]; + undefined2 local_46a [2]; + undefined2 local_466 [2]; + undefined2 local_462 [2]; + undefined4 local_45e; + undefined4 local_45a; + undefined4 local_456; + undefined4 local_452; + undefined4 local_44e; + undefined4 local_44a; + undefined4 local_446; + undefined4 local_442; + int local_43e; + undefined4 local_43a; + undefined4 local_436; + undefined4 local_432 [2]; + undefined4 local_42a; + undefined4 local_426; + undefined4 local_422; + undefined4 local_41e; + undefined2 local_41a; + undefined2 local_418; + undefined1 local_416 [16]; + undefined4 local_406; + undefined4 local_402; + undefined2 local_3fe [8]; + undefined4 local_3ee; + undefined4 local_3ea; + undefined1 local_3e6; + undefined1 local_3e5; + undefined1 local_3e4; + undefined1 auStack_3e2 [16]; + undefined1 auStack_3d2 [372]; + char local_25e; + int local_25a; + char local_240; + undefined1 local_23e; + undefined4 local_222; + undefined4 local_21e; + undefined2 local_160; + undefined2 local_15e; + undefined2 local_e6; + undefined1 local_e4; + undefined4 *local_e2; + undefined1 auStack_da [182]; + + FUN_0082a0b8(); + piVar1 = (int *)FUN_0082a790(); + local_892 = 0xfffffffe; + uStack_88e = 0xfffffffe; + if (DAT_00a13e4e == '\x01') { + local_8c6 = 0xf; + local_8ca = 0; + local_8da[0] = local_8da[0] & 0xffffff00; + FUN_004478e8(local_8da,"GEN[48]",7); + uVar2 = FUN_005dac9c(auStack_85a,local_8da); + iVar3 = FUN_00564548(); + FUN_007d24cc(iVar3 + 0x2e60,auStack_82a,uVar2); + FUN_007d2414(auStack_82a); + FUN_007d2414(auStack_85a); + if (0xf < local_8c6) { + FUN_00447c80(local_8da[0]); + } + local_8c6 = 0xf; + local_8ca = 0; + local_8da[0] = local_8da[0] & 0xffffff00; + local_8aa = 0x20; + local_8a6 = 0; + do { + FUN_004f7444(&local_8a2,&local_8aa); + local_42a = local_8a2; + local_426 = local_89e; + local_41e = local_896; + local_422 = local_89a; + uVar4 = Concurrency::details::_CurrentScheduler::_Id(); + if (uVar4 == 0xffffffff) { + puVar5 = &local_42a; + pcVar9 = _Thrd_sleep_exref; + } + else { + xtime_get(auStack_3e2,1); + puVar5 = (undefined4 *)_Xtime_diff_to_millis2(&local_42a,auStack_3e2); + pcVar9 = wait_exref; + } + (*pcVar9)(puVar5); + } while (DAT_00a13e4e != '\0'); + } + local_8ae = 0xf; + local_8b2 = 0; + local_8c2[0] = local_8c2[0] & 0xffffff00; + FUN_004478e8(local_8c2,"GEN[49]",7); + uVar2 = FUN_005dac9c(auStack_88a,local_8c2); + uVar6 = FUN_00564548(); + FUN_00767708(uVar6,1,uVar2); + FUN_007d2414(auStack_88a); + if (0xf < local_8ae) { + FUN_00447c80(local_8c2[0]); + } + local_8ae = 0xf; + local_8b2 = 0; + local_8c2[0] = local_8c2[0] & 0xffffff00; + DAT_00a56160 = DAT_00a9b5c8; + DAT_00a56164 = DAT_00a9b5cc; + DAT_00a56168 = DAT_00a9b5d0; + DAT_00a56169 = DAT_00a9b5d1; + DAT_00a5616a = DAT_00a9b5d2; + DAT_00a5616b = DAT_00a9b5d3; + DAT_00a5616c = DAT_00a9b5d4; + DAT_00a5616d = DAT_00a9b5d5; + DAT_00a5616e = DAT_00a9b5d6; + DAT_00a56170 = DAT_00a9b5d8; + DAT_00a56172 = DAT_00a9b5da; + DAT_00a56174 = DAT_00a9b5dc; + DAT_00a56178 = DAT_00a9b5e0; + DAT_00a5617c = DAT_00a9b5e4; + DAT_00a5617e = DAT_00a9b5e6; + DAT_00a56180 = DAT_00a9b5e8; + DAT_00a56184 = DAT_00a9b5ec; + DAT_00a56188 = DAT_00a9b5f0; + DAT_00a5618c = DAT_00a9b5f4; + DAT_00a56190 = DAT_00a9b5f8; + DAT_00a56194 = DAT_00a9b5fc; + DAT_00a56198 = DAT_00a9b600; + DAT_00a5619c = DAT_00a9b604; + DAT_00a561a0 = DAT_00a9b608; + DAT_00a561a4 = DAT_00a9b60c; + FUN_00789a48(piVar1); + iVar3 = (**(code **)(*piVar1 + 0x2c))(piVar1); + local_44e = DAT_00a59300; + (**(code **)(*piVar1 + 0x20))(piVar1,&local_44e,4); + local_452 = DAT_00a592fc; + (**(code **)(*piVar1 + 0x20))(piVar1,&local_452,4); + local_436 = DAT_00934f00; + (**(code **)(*piVar1 + 0x20))(piVar1,&local_436,4); + local_466[0] = (undefined2)DAT_00934f04; + (**(code **)(*piVar1 + 0x20))(piVar1,local_466,2); + local_4b2[0] = DAT_00934f0c; + (**(code **)(*piVar1 + 0x20))(piVar1,local_4b2,2); + local_49a[0] = DAT_00934f08; + (**(code **)(*piVar1 + 0x20))(piVar1,local_49a,2); + local_492[0] = DAT_00a59254; + (**(code **)(*piVar1 + 0x20))(piVar1,local_492,2); + local_48a[0] = DAT_00a59250; + (**(code **)(*piVar1 + 0x20))(piVar1,local_48a,2); + local_482[0] = (undefined2)DAT_00a7b4d4; + (**(code **)(*piVar1 + 0x20))(piVar1,local_482,2); + local_47a[0] = (undefined2)DAT_00a592ec; + (**(code **)(*piVar1 + 0x20))(piVar1,local_47a,2); + local_472[0] = (undefined2)DAT_00a592e4; + (**(code **)(*piVar1 + 0x20))(piVar1,local_472,2); + FUN_00762b28(&DAT_00a56160,piVar1); + local_46a[0] = DAT_00a592f4; + (**(code **)(*piVar1 + 0x20))(piVar1,local_46a,2); + local_462[0] = DAT_00a592f0; + (**(code **)(*piVar1 + 0x20))(piVar1,local_462,2); + local_502[0] = DAT_00a13e8e; + (**(code **)(*piVar1 + 0x20))(piVar1,local_502,1); + FUN_007752c0(piVar1); + FUN_00652928(piVar1); + local_4d6[0] = DAT_00a13e84; + (**(code **)(*piVar1 + 0x20))(piVar1,local_4d6,1); + local_4fa[0] = DAT_00a13e85; + (**(code **)(*piVar1 + 0x20))(piVar1,local_4fa,1); + local_4f2[0] = (undefined1)DAT_00a13e7c; + (**(code **)(*piVar1 + 0x20))(piVar1,local_4f2,1); + local_44a = DAT_00a13e80; + (**(code **)(*piVar1 + 0x20))(piVar1,&local_44a,4); + local_4ae[0] = DAT_00934c38; + (**(code **)(*piVar1 + 0x20))(piVar1,local_4ae,2); + local_4aa[0] = DAT_00934c3c; + (**(code **)(*piVar1 + 0x20))(piVar1,local_4aa,2); + local_486[0] = DAT_00934c40; + (**(code **)(*piVar1 + 0x20))(piVar1,local_486,2); + local_4ea[0] = DAT_00a59257; + (**(code **)(*piVar1 + 0x20))(piVar1,local_4ea,1); + local_4a6[0] = DAT_00a56170; + (**(code **)(*piVar1 + 0x20))(piVar1,local_4a6,2); + local_4e2[0] = (undefined1)DAT_00a5934c; + (**(code **)(*piVar1 + 0x20))(piVar1,local_4e2,1); + local_4b6[0] = (undefined2)DAT_00a59348; + (**(code **)(*piVar1 + 0x20))(piVar1,local_4b6,2); + local_4da[0] = (undefined1)DAT_00a59340; + (**(code **)(*piVar1 + 0x20))(piVar1,local_4da,1); + local_442 = DAT_00a59344; + (**(code **)(*piVar1 + 0x20))(piVar1,&local_442,4); + FUN_005fa4ac(piVar1); + FUN_00777e78(&DAT_00a13e50,piVar1); + FUN_00777e28(&DAT_00a13e44,piVar1); + local_4d2[0] = (byte)DAT_00a13e40 | (byte)((DAT_00a13e38 | DAT_00a13e3c << 2) << 2); + (**(code **)(*piVar1 + 0x20))(piVar1,local_4d2,1); + local_4ca[0] = (undefined1)DAT_00a13ee8; + (**(code **)(*piVar1 + 0x20))(piVar1,local_4ca,1); + local_4c2[0] = (undefined1)DAT_00a13eec; + (**(code **)(*piVar1 + 0x20))(piVar1,local_4c2,1); + local_4ba[0] = (undefined1)DAT_00a13ef0; + (**(code **)(*piVar1 + 0x20))(piVar1,local_4ba,1); + local_4fe[0] = (undefined1)DAT_00a13ef4; + (**(code **)(*piVar1 + 0x20))(piVar1,local_4fe,1); + local_4be[0] = (undefined1)DAT_00a13ef8; + (**(code **)(*piVar1 + 0x20))(piVar1,local_4be,1); + local_4f6[0] = (undefined1)DAT_00a13efc; + (**(code **)(*piVar1 + 0x20))(piVar1,local_4f6,1); + local_506[0] = (undefined1)DAT_00a13f00; + (**(code **)(*piVar1 + 0x20))(piVar1,local_506,1); + local_4ee[0] = (undefined1)DAT_00a13f04; + (**(code **)(*piVar1 + 0x20))(piVar1,local_4ee,1); + local_49e[0] = (undefined2)DAT_00934c50; + (**(code **)(*piVar1 + 0x20))(piVar1,local_49e,2); + local_47e[0] = (undefined2)DAT_00934c54; + (**(code **)(*piVar1 + 0x20))(piVar1,local_47e,2); + local_496[0] = (undefined2)DAT_00934c58; + (**(code **)(*piVar1 + 0x20))(piVar1,local_496,2); + local_46e[0] = (undefined2)DAT_00934c5c; + (**(code **)(*piVar1 + 0x20))(piVar1,local_46e,2); + local_45a = 0x162e; + (**(code **)(*piVar1 + 0x20))(piVar1,&local_45a,4); + uVar2 = (**(code **)(*piVar1 + 0x2c))(piVar1); + FUN_004528ac("World Save File size 1: %i \n",uVar2); + FUN_0075c298(piVar1); + uVar2 = (**(code **)(*piVar1 + 0x2c))(piVar1); + FUN_004528ac("World Save File size 2: %i \n",uVar2); + local_456 = 0x162e; + (**(code **)(*piVar1 + 0x20))(piVar1,&local_456,4); + iVar13 = 0; + do { + FUN_007784ec(auStack_da,iVar13 + DAT_00955b44); + FUN_005e9ef8(auStack_da,piVar1); + FUN_0082a208(auStack_da,0xac,0x28,0x563481); + iVar13 = iVar13 + 0x1aec; + } while (iVar13 < DAT_0078e91c); + local_45e = 0x162e; + (**(code **)(*piVar1 + 0x20))(piVar1,&local_45e,4); + local_4a2 = local_416; + iVar13 = 0; + do { + iVar11 = iVar13 + DAT_00934724; + local_41a = *(undefined2 *)(iVar13 + DAT_00934724); + local_418 = *(undefined2 *)(iVar11 + 2); + local_402 = 0xf; + local_406 = 0; + local_416[0] = 0; + FUN_0044736c(local_416,iVar11 + 4,0,0xffffffff); + local_3ea = 7; + local_3ee = 0; + local_3fe[0] = 0; + FUN_004462ac(local_3fe,iVar11 + 0x1c,0,0xffffffff); + local_3e6 = *(undefined1 *)(iVar11 + 0x34); + local_3e5 = *(undefined1 *)(iVar11 + 0x35); + local_3e4 = *(undefined1 *)(iVar11 + 0x36); + FUN_0074904c(&local_41a,piVar1); + thunk_FUN_007d2414(local_416); + iVar13 = iVar13 + 0x38; + } while (iVar13 < 56000); + local_446 = 0x162e; + (**(code **)(*piVar1 + 0x20))(piVar1,&local_446,4); + iVar13 = DAT_0078e918; + iVar11 = 0; + do { + local_e2 = (undefined4 *)0x0; + iVar12 = iVar11 + DAT_009656cc; + FUN_00669144(auStack_3d2,iVar12); + local_e6 = *(undefined2 *)(iVar12 + 0x2ec); + local_e4 = *(undefined1 *)(iVar12 + 0x2ee); + local_e2 = *(undefined4 **)(iVar12 + 0x2f0); + if (local_e2 != (undefined4 *)0x0) { + local_e2[1] = local_e2[1] + 1; + } + if (((local_240 == '\x01') && (local_25e != '\0')) && (local_25a != 0x170)) { + iVar12 = FUN_0069f948(auStack_3d2,auStack_7fa); + FUN_0064ca50(auStack_3d2,iVar12); + local_e6 = *(undefined2 *)(iVar12 + 0x2ec); + local_e4 = *(undefined1 *)(iVar12 + 0x2ee); + if (local_e2 != *(undefined4 **)(iVar12 + 0x2f0)) { + if ((local_e2 != (undefined4 *)0x0) && + (iVar10 = local_e2[1], local_e2[1] = iVar10 + -1, iVar10 + -1 == 0)) { + (**(code **)*local_e2)(local_e2,1); + } + local_e2 = *(undefined4 **)(iVar12 + 0x2f0); + if (local_e2 != (undefined4 *)0x0) { + local_e2[1] = local_e2[1] + 1; + } + } + FUN_00655824(auStack_7fa); + local_4c6[0] = 1; + (**(code **)(*piVar1 + 0x20))(piVar1,local_4c6,1); + local_43e = local_25a; + (**(code **)(*piVar1 + 0x20))(piVar1,&local_43e,4); + local_432[0] = local_222; + (**(code **)(*piVar1 + 0x20))(piVar1,local_432,4); + local_43a = local_21e; + (**(code **)(*piVar1 + 0x20))(piVar1,&local_43a,4); + local_4e6[0] = local_23e; + (**(code **)(*piVar1 + 0x20))(piVar1,local_4e6,1); + local_48e[0] = local_160; + (**(code **)(*piVar1 + 0x20))(piVar1,local_48e,2); + local_476[0] = local_15e; + (**(code **)(*piVar1 + 0x20))(piVar1,local_476,2); + } + FUN_00655824(auStack_3d2); + iVar11 = iVar11 + 0x2f4; + } while (iVar11 < iVar13); + local_4ce[0] = 0; + (**(code **)(*piVar1 + 0x20))(piVar1,local_4ce,1); + local_4a2 = (undefined1 *)0x162e; + (**(code **)(*piVar1 + 0x20))(piVar1,&local_4a2,4); + (**(code **)(*piVar1 + 0x40))(piVar1,&DAT_00965a08); + (**(code **)(*piVar1 + 0x40))(piVar1,&DAT_00965a38); + (**(code **)(*piVar1 + 0x40))(piVar1,&DAT_00965a68); + (**(code **)(*piVar1 + 0x40))(piVar1,&DAT_00965a98); + (**(code **)(*piVar1 + 0x40))(piVar1,&DAT_00965af8); + (**(code **)(*piVar1 + 0x40))(piVar1,&DAT_009660f8); + (**(code **)(*piVar1 + 0x40))(piVar1,&DAT_00965df8); + (**(code **)(*piVar1 + 0x40))(piVar1,&DAT_00966ae8); + (**(code **)(*piVar1 + 0x40))(piVar1,&DAT_00966b18); + (**(code **)(*piVar1 + 0x40))(piVar1,&DAT_00966e18); + (**(code **)(*piVar1 + 0x40))(piVar1,&DAT_009674d8); + (**(code **)(*piVar1 + 0x40))(piVar1,&DAT_00967838); + (**(code **)(*piVar1 + 0x40))(piVar1,&DAT_00967da8); + (**(code **)(*piVar1 + 0x40))(piVar1,&DAT_00967e08); + (**(code **)(*piVar1 + 0x40))(piVar1,&DAT_00967dd8); + (**(code **)(*piVar1 + 0x40))(piVar1,&DAT_00968168); + (**(code **)(*piVar1 + 0x40))(piVar1,&DAT_00968198); + (**(code **)(*piVar1 + 0x40))(piVar1,&DAT_009681c8); + (**(code **)(*piVar1 + 0x40))(piVar1,&DAT_00969c08); + iVar13 = (**(code **)(*piVar1 + 0x2c))(piVar1); + uVar2 = (**(code **)(*piVar1 + 0x2c))(piVar1); + iVar13 = iVar13 - iVar3; + iVar11 = FUN_004f8c14(&DAT_00a59380,iVar13); + if (iVar13 < iVar11) { + iVar11 = iVar11 - iVar13; + do { + local_4de[0] = 0x61; + (**(code **)(*piVar1 + 0x20))(piVar1,local_4de,1); + iVar11 = iVar11 + -1; + } while (iVar11 != 0); + } + iVar13 = (**(code **)(*piVar1 + 0x2c))(piVar1); + uVar6 = FUN_004f7cc0(0,0,0); + iVar11 = (**(code **)(*piVar1 + 4))(piVar1); + uVar6 = FUN_004f7cc0(uVar6,iVar11 + 8,iVar13 + -8); + iVar11 = (**(code **)(*piVar1 + 4))(piVar1); + *(undefined4 *)(iVar11 + 4) = uVar6; + FUN_004528ac("[SAVING] Calculating CRC over %u bytes, skipping the first 8 \n",iVar13 + -8); + FUN_004528ac("[SAVING] CalculatedCRC: %u \n",uVar6); + uVar6 = FUN_004f8c14(&DAT_00a59380,iVar13 - iVar3); + local_4a2 = malloc(0x9c); + if (local_4a2 == (undefined1 *)0x0) { + piVar7 = (int *)0x0; + } + else { + *(undefined4 *)(local_4a2 + 0x3c) = 0; + *(undefined4 *)(local_4a2 + 0x88) = 0; + piVar7 = (int *)FUN_005f544c(local_4a2,uVar6,0); + } + uVar6 = (**(code **)(*piVar7 + 4))(piVar7); + iVar11 = (**(code **)(*piVar1 + 4))(piVar1); + FUN_004f8c28(&DAT_00a59380,iVar11 + iVar3,uVar6,iVar13 - iVar3); + (**(code **)(*piVar1 + 0x18))(piVar1,iVar3,0); + uVar6 = (**(code **)(*piVar7 + 0x48))(piVar7); + uVar8 = (**(code **)(*piVar7 + 4))(piVar7); + (**(code **)(*piVar1 + 0x20))(piVar1,uVar8,uVar6); + iVar11 = (**(code **)(*piVar7 + 0x48))(piVar7); + (**(code **)(*piVar1 + 8))(piVar1,iVar11 + iVar3); + uVar6 = (**(code **)(*piVar1 + 0x30))(piVar1); + FUN_004528ac("[SAVING] Saved world: (header)%u / (data+header)%u / (padded data + header)%u / (total)%u \n" + ,iVar3,uVar2,iVar13,uVar6); + (**(code **)*piVar7)(piVar7,1); + FUN_0082a0d0(); + return; +} + diff --git a/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0078dc9c.calls.txt b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0078dc9c.calls.txt new file mode 100644 index 000000000..f06c5bc30 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0078dc9c.calls.txt @@ -0,0 +1,42 @@ +# Calls from FUN_0078dc9c @ 0078dc9c +005dac9c FUN_005dac9c +0082a208 FUN_0082a208 +004f7cc0 FUN_004f7cc0 +EXTERNAL:000000e5 _Xtime_diff_to_millis2 +007d2414 FUN_007d2414 +0075c298 FUN_0075c298 +005e9ef8 FUN_005e9ef8 +00447c60 malloc +EXTERNAL:00000163 wait +EXTERNAL:000000e6 xtime_get +00762b28 FUN_00762b28 +007752c0 FUN_007752c0 +00447c80 FUN_00447c80 +00771ea0 thunk_FUN_007d2414 +004f8c14 FUN_004f8c14 +0074904c FUN_0074904c +004462ac FUN_004462ac +00777e78 FUN_00777e78 +005fa4ac FUN_005fa4ac +EXTERNAL:000000e7 _Thrd_sleep +004528ac FUN_004528ac +007d24cc FUN_007d24cc +00655824 FUN_00655824 +0069f948 FUN_0069f948 +005f544c FUN_005f544c +0044736c FUN_0044736c +0082a790 FUN_0082a790 +004478e8 FUN_004478e8 +00777e28 FUN_00777e28 +0082a0d0 FUN_0082a0d0 +004f7444 FUN_004f7444 +00669144 FUN_00669144 +00789a48 FUN_00789a48 +004f8c28 FUN_004f8c28 +0082a0b8 FUN_0082a0b8 +EXTERNAL:00000162 _Id +00767708 FUN_00767708 +00652928 FUN_00652928 +00564548 FUN_00564548 +007784ec FUN_007784ec +0064ca50 FUN_0064ca50 diff --git a/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0078e920.c b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0078e920.c new file mode 100644 index 000000000..5a24f4671 --- /dev/null +++ b/docs/reverse-engineering/winphone/ghidra/v1.2.4.3/0078e920.c @@ -0,0 +1,82 @@ + +void FUN_0078e920(void) + +{ + undefined4 uVar1; + void *pvVar2; + int *piVar3; + int iVar4; + int *piVar5; + int iVar6; + int iVar7; + int *piVar8; + undefined4 uVar9; + int local_6c; + undefined1 auStack_68 [4]; + undefined1 auStack_64 [68]; + + uVar1 = FUN_0082a0b8(); + pvVar2 = malloc(0x58); + if (pvVar2 == (void *)0x0) { + piVar3 = (int *)0x0; + } + else { + *(undefined4 *)((int)pvVar2 + 0x3c) = 0; + piVar3 = (int *)FUN_0057485c(pvVar2,uVar1,0,1,pvVar2); + } + iVar4 = (**(code **)(*piVar3 + 0x30))(piVar3); + pvVar2 = malloc(0x9c); + if (pvVar2 == (void *)0x0) { + piVar5 = (int *)0x0; + } + else { + *(undefined4 *)((int)pvVar2 + 0x3c) = 0; + *(undefined4 *)((int)pvVar2 + 0x88) = 0; + piVar5 = (int *)FUN_005f544c(pvVar2,iVar4,0); + } + uVar1 = (**(code **)(*piVar5 + 4))(piVar5); + (**(code **)(*piVar3 + 0x24))(piVar3,uVar1,iVar4,*(code **)(*piVar3 + 0x24),pvVar2); + uVar1 = (**(code **)(*piVar5 + 0x48))(piVar5); + (**(code **)(*piVar5 + 8))(piVar5,uVar1); + iVar6 = FUN_0078d7b4(piVar5); + iVar7 = (**(code **)(*piVar5 + 0x2c))(piVar5); + if (0x41 < iVar6) { + piVar8 = (int *)FUN_007783c8(piVar5,iVar4 - iVar7); + (**(code **)(*piVar8 + 0x48))(); + (**(code **)(*piVar8 + 4))(piVar8); + (**(code **)(*piVar8 + 4))(piVar8); + (**(code **)(*piVar8 + 4))(piVar8); + (**(code **)(*piVar8 + 4))(piVar8); + (**(code **)(*piVar8 + 4))(piVar8); + (**(code **)(*piVar8 + 4))(piVar8); + (**(code **)(*piVar8 + 4))(piVar8); + (**(code **)(*piVar8 + 4))(piVar8); + (**(code **)(*piVar5 + 0x18))(piVar5,iVar7,0); + uVar1 = (**(code **)(*piVar8 + 0x48))(piVar8); + uVar9 = (**(code **)(*piVar8 + 4))(piVar8); + (**(code **)(*piVar5 + 0x20))(piVar5,uVar9,uVar1); + uVar1 = (**(code **)(*piVar5 + 0x2c))(piVar5); + (**(code **)(*piVar5 + 8))(piVar5,uVar1); + (**(code **)*piVar8)(piVar8,1); + } + (**(code **)*piVar3)(piVar3,1); + (**(code **)(*piVar5 + 0x18))(piVar5,0,0); + iVar4 = (**(code **)(*piVar5 + 0x30))(piVar5); + iVar6 = FUN_004f7cc0(0,0,0); + (**(code **)(*piVar5 + 0x24))(piVar5,auStack_64,8); + for (iVar4 = iVar4 + -8; 0 < iVar4; iVar4 = iVar4 - iVar7) { + iVar7 = iVar4; + if (0x40 < iVar4) { + iVar7 = 0x40; + } + (**(code **)(*piVar5 + 0x24))(piVar5,auStack_64,iVar7); + iVar6 = FUN_004f7cc0(iVar6,auStack_64,iVar7); + } + (**(code **)(*piVar5 + 0x18))(piVar5,0,0); + (**(code **)(*piVar5 + 0x24))(piVar5,auStack_68,4); + (**(code **)(*piVar5 + 0x24))(piVar5,&local_6c,4); + (**(code **)*piVar5)(piVar5,1); + FUN_0082a0d0(iVar6 == local_6c); + return; +} + diff --git a/src/TEdit.Terraria/TEdit.Terraria.csproj b/src/TEdit.Terraria/TEdit.Terraria.csproj index 6b1fa5141..c41bd129b 100644 --- a/src/TEdit.Terraria/TEdit.Terraria.csproj +++ b/src/TEdit.Terraria/TEdit.Terraria.csproj @@ -7,9 +7,10 @@ - - - + + + + diff --git a/src/TEdit.Terraria/World.FileWinPhone.cs b/src/TEdit.Terraria/World.FileWinPhone.cs new file mode 100644 index 000000000..c251919bc --- /dev/null +++ b/src/TEdit.Terraria/World.FileWinPhone.cs @@ -0,0 +1,1638 @@ +using System; +using System.ComponentModel; +using System.Collections.Generic; +using System.IO; +using System.Text; +using TEdit.Terraria.Objects; +using TEdit.Utility; + +namespace TEdit.Terraria; + +public partial class World +{ + private const int WinPhoneMaxTitleLength = 128; + private static readonly ushort[] WinPhoneFrameImportantIds = + [ + 3, 4, 5, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24, 26, 27, 28, 29, + 31, 33, 34, 35, 36, 42, 50, 55, 61, 71, 72, 73, 74, 77, 78, 79, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 110, 113, 114, 125, 126, 128, 129, 132, 133, 134, 135, + 136, 137, 138, 139, 141, 142, 143, 144, 149, 165, 171, 172, 173, 174, 178, 184, + 185, 186, 187, 201, 207, 209, 210, 212, 215, 216, 217, 218, 219, 220, 227, + 228, 231, 233, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 254, 269, 270, 271, 275, 276, 277, 278, 279, 280, 281, 282, 283, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, + 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 314, 316, 317, 318, 319, + 320, 323, 324, 334, 335, 337, 338, 339, 500, + ]; + + /// + /// Detects and reads the native Windows Phone world container header. + /// Versions through 65 have an uncompressed body; version 66 and newer use + /// the native game's body transform and are not accepted by this reader yet. + /// + internal static bool TryLoadWinPhone( + BinaryReader reader, + World world, + bool headersOnly, + IProgress? progress = null) + { + Stream stream = reader.BaseStream; + long originalPosition = stream.Position; + + try + { + stream.Position = 0; + byte[] source = reader.ReadBytes(checked((int)stream.Length)); + if (!TryReadWinPhoneHeader(source, out WinPhoneHeader header)) + { + stream.Position = originalPosition; + return false; + } + + world.IsWinPhone = true; + world.WinPhoneSupportsWeather = header.Version >= 58; + world.WinPhoneSupportsExtendedProgression = header.Version >= 58; + world.WinPhoneSourceData = source; + world.WinPhoneStoredCrc = header.Crc; + world.WinPhoneCloudFlag = header.CloudFlag; + world.WinPhoneHistory = header.History; + world.Version = header.Version; + world.Title = header.Title; + world.WorldId = header.WorldId; + world.Rand = new Random(world.WorldId); + world.LeftWorld = 0; + world.RightWorld = header.RightWorld; + world.TopWorld = 0; + world.BottomWorld = header.BottomWorld; + world.TilesHigh = header.TilesHigh; + world.TilesWide = header.TilesWide; + world.SpawnX = header.SpawnX; + world.SpawnY = header.SpawnY; + world.DungeonX = header.DungeonX; + world.DungeonY = header.DungeonY; + world.GroundLevel = header.GroundLevel; + world.RockLevel = header.RockLevel; + + progress?.Report(new ProgressChangedEventArgs(0, "Loaded Windows Phone world header.")); + + if (!headersOnly) + { + int position = LoadWinPhoneTiles(source, header, world, progress); + LoadWinPhoneSections(source, header, world, position); + } + + return true; + } + catch + { + stream.Position = originalPosition; + throw; + } + } + + private static int LoadWinPhoneTiles( + ReadOnlySpan source, + WinPhoneHeader header, + World world, + IProgress? progress) + { + int markerOffset = FindSectionMarker(source, header.BodyOffset); + if (markerOffset < 0) + throw new InvalidDataException("Windows Phone tile section marker was not found."); + + int position = markerOffset + 4; + world.WinPhoneMetadataPrimitives = ReadWinPhoneMetadataPrimitives( + source, header.BodyOffset, markerOffset, header.Version); + ApplyWinPhoneMetadataToWorld(world, header.Version); + world.WinPhoneTileSectionOffset = position; + bool[] frameImportant = CreateWinPhoneFrameImportant(header.Version); + world.TileFrameImportant = (bool[])frameImportant.Clone(); + world.Tiles = new Tile[world.TilesWide, world.TilesHigh]; + int tileCount = checked(world.TilesWide * world.TilesHigh); + world.WinPhoneStoredTileTypes = new ushort[tileCount]; + world.WinPhoneTileHeader1 = new byte[tileCount]; + world.WinPhoneTileHeader2 = new byte[tileCount]; + world.WinPhoneTileShape = new byte[tileCount]; + world.WinPhoneLegacyTileFlags = new byte[tileCount]; + world.WinPhoneTileRunLengths = new ushort[tileCount]; + + // The native loader has two independent tile decoders. Versions below + // 58 use FUN_00733bac; versions 58 and newer use FUN_00733858. + if (header.Version < 58) + { + LoadWinPhoneLegacyTiles(source, header, world, frameImportant, ref position, progress); + ValidateWinPhoneTileEndMarker(source, position); + return position + 4; + } + + int encodedHeight = world.TilesHigh; + + for (int x = 0; x < world.TilesWide; x++) + { + Queue trace = new(); + if ((x & 31) == 0) + progress?.Report(new ProgressChangedEventArgs( + x.ProgressPercentage(world.TilesWide), + "Loading Windows Phone tiles...")); + + for (int y = 0; y < encodedHeight;) + { + byte header1 = ReadByte(source, ref position); + int auxiliaryIndex = GetWinPhoneTileIndex(world, x, y); + world.WinPhoneTileHeader1[auxiliaryIndex] = header1; + Tile tile = new() + { + IsActive = (header1 & 0x01) != 0, + WireRed = (header1 & 0x02) != 0, + WireGreen = (header1 & 0x04) != 0, + WireBlue = (header1 & 0x08) != 0, + Actuator = (header1 & 0x10) != 0, + InActive = (header1 & 0x20) != 0, + }; + + if (tile.IsActive) + { + int tileOffset = position; + tile.Type = ReadUInt16(source, ref position); + world.WinPhoneStoredTileTypes[auxiliaryIndex] = tile.Type; + + trace.Enqueue($"y={y}:type={tile.Type}@{tileOffset}"); + while (trace.Count > 20) + trace.Dequeue(); + + // The native tile field is nine bits wide. Windows Phone + // uses framed type 500 as an internal placeholder tile. + if (tile.Type > 0x1FF) + throw new InvalidDataException( + $"Invalid Windows Phone tile type {tile.Type} at x={x}, y={y}, offset={position}. Trace: {string.Join("; ", trace)}"); + + bool isFramed = tile.Type < frameImportant.Length + ? frameImportant[tile.Type] + : true; + if (isFramed) + { + tile.U = ReadInt16(source, ref position); + tile.V = ReadInt16(source, ref position); + } + else + { + tile.U = -1; + tile.V = -1; + } + + tile.TileColor = ReadByte(source, ref position); + } + + tile.Wall = ReadByte(source, ref position); + if (tile.Wall != 0) + tile.WallColor = ReadByte(source, ref position); + + tile.LiquidAmount = ReadByte(source, ref position); + if (tile.LiquidAmount != 0) + { + byte nativeLiquidType = ReadByte(source, ref position); + tile.LiquidType = (LiquidType)(nativeLiquidType + 1); + } + + byte header2 = ReadByte(source, ref position); + world.WinPhoneTileHeader2[auxiliaryIndex] = header2; + tile.WireYellow = (header2 & 0x10) != 0; + + if (header.Version is >= 60 and <= 68) + { + byte shape = ReadByte(source, ref position); + world.WinPhoneTileShape[auxiliaryIndex] = shape; + tile.BrickStyle = (BrickStyle)(shape >> 4); + } + + int rle = ReadByte(source, ref position); + if ((rle & 0x80) != 0) + rle = (rle & 0x7F) | ReadByte(source, ref position) << 7; + world.WinPhoneTileRunLengths[auxiliaryIndex] = (ushort)rle; + + if (y + rle >= encodedHeight) + throw new InvalidDataException( + $"Windows Phone tile run exceeds the world height at x={x}, y={y}, rle={rle}, offset={position}. Trace: {string.Join("; ", trace)}"); + + tile.ResetCache(); + if (y < world.TilesHigh) + world.Tiles[x, y] = tile; + for (int repeat = 1; repeat <= rle && y + repeat < world.TilesHigh; repeat++) + { + world.Tiles[x, y + repeat] = tile; + CopyWinPhoneTileAuxiliary(world, x, y, y + repeat); + } + y += rle + 1; + } + } + + ValidateWinPhoneTileEndMarker(source, position); + return position + 4; + } + + private static void LoadWinPhoneSections( + ReadOnlySpan source, + WinPhoneHeader header, + World world, + int position) + { + world.WinPhoneDataSectionOffset = position; + LoadWinPhoneChests(source, header.Version, world, ref position); + ReadWinPhoneSectionMarker(source, ref position, "chests"); + LoadWinPhoneSigns(source, header.Version, world, ref position); + ReadWinPhoneSectionMarker(source, ref position, "signs"); + LoadWinPhoneNpcs(source, world, ref position); + ReadWinPhoneSectionMarker(source, ref position, "NPCs"); + LoadWinPhoneCharacterNames(source, header.Version, world, ref position); + world.WinPhoneParsedLength = position; + + // The bundled v49 Tutorial.world is a fat resource: the native v49 + // reader stops after ten legacy NPC names at offset 202,363 and ignores + // the remaining bundled data. Later native saves end at the name table. + if (header.Version >= 50 && position != source.Length) + throw new InvalidDataException( + $"Windows Phone world has {source.Length - position} unexpected trailing bytes."); + } + + private static void LoadWinPhoneChests( + ReadOnlySpan source, + uint version, + World world, + ref int position) + { + world.Chests.Clear(); + world.WinPhoneChestSlots = new Chest?[Chest.LegacyLimit]; + int itemCount = version < 58 ? 20 : 40; + byte[] itemMask = new byte[5]; + + for (int chestIndex = 0; chestIndex < Chest.LegacyLimit; chestIndex++) + { + if (ReadByte(source, ref position) == 0) + continue; + + Chest chest = new(ReadInt16(source, ref position), ReadInt16(source, ref position)) + { + MaxItems = itemCount, + }; + + Array.Clear(itemMask); + if (version < 58) + { + itemMask.AsSpan(0, 3).Fill(byte.MaxValue); + } + else + { + int maskLength = ReadByte(source, ref position); + if (maskLength is < 0 or > 5) + throw new InvalidDataException($"Invalid Windows Phone chest item mask length {maskLength}."); + for (int i = 0; i < maskLength; i++) + itemMask[i] = ReadByte(source, ref position); + } + + for (int slot = 0; slot < itemCount; slot++) + { + if ((itemMask[slot >> 3] & 1 << (slot & 7)) == 0) + continue; + + int stack = version < 55 + ? ReadByte(source, ref position) + : ReadInt16(source, ref position); + if (stack <= 0) + continue; + + int netId = ReadInt16(source, ref position); + byte prefix = ReadByte(source, ref position); + chest.Items[slot] = new Item(stack, netId, prefix); + } + + world.Chests.Add(chest); + world.WinPhoneChestSlots[chestIndex] = chest; + } + } + + private static void LoadWinPhoneSigns( + ReadOnlySpan source, + uint version, + World world, + ref int position) + { + world.Signs.Clear(); + world.WinPhoneSignSlots = new Sign?[Sign.LegacyLimit]; + world.WinPhoneSignTextFlags = new byte[Sign.LegacyLimit]; + for (int signIndex = 0; signIndex < Sign.LegacyLimit; signIndex++) + { + if (ReadByte(source, ref position) == 0) + continue; + + short x = ReadInt16(source, ref position); + short y = ReadInt16(source, ref position); + if (version > 57) + world.WinPhoneSignTextFlags[signIndex] = ReadByte(source, ref position); + string text = ReadWinPhoneString(source, version, ref position); + Sign sign = new(x, y, text); + world.Signs.Add(sign); + world.WinPhoneSignSlots[signIndex] = sign; + } + } + + private static void LoadWinPhoneNpcs( + ReadOnlySpan source, + World world, + ref int position) + { + world.NPCs.Clear(); + while (ReadByte(source, ref position) != 0) + { + int spriteId = ReadByte(source, ref position); + NPC npc = new() + { + SpriteId = spriteId, + Position = new Vector2FloatObservable( + ReadSingle(source, ref position), + ReadSingle(source, ref position)), + IsHomeless = ReadByte(source, ref position) != 0, + Home = new Vector2Int32Observable( + ReadInt16(source, ref position), + ReadInt16(source, ref position)), + }; + npc.Name = WorldConfiguration.NpcNames.TryGetValue(spriteId, out string? name) + ? name + : $"NPC {spriteId}"; + world.NPCs.Add(npc); + } + } + + private static readonly int[] WinPhoneCharacterNameIds = + [ + 17, 18, 19, 20, 22, 54, 38, 107, 108, 124, 160, 178, 207, 208, 209, 227, 228, 229, + ]; + + private static void LoadWinPhoneCharacterNames( + ReadOnlySpan source, + uint version, + World world, + ref int position) + { + world.CharacterNames.Clear(); + int nameCount = version < 50 ? 10 : WinPhoneCharacterNameIds.Length; + for (int index = 0; index < nameCount; index++) + world.CharacterNames.Add(new NpcName( + WinPhoneCharacterNameIds[index], + ReadWinPhoneString(source, version, ref position))); + } + + private static string ReadWinPhoneString( + ReadOnlySpan source, + uint version, + ref int position) + { + int length = ReadInt32(source, position); + int lengthOffset = position; + position += 4; + if (length < 0 || length > 1_000_000) + throw new InvalidDataException( + $"Invalid Windows Phone string length {length} at offset {lengthOffset}."); + + int byteLength = checked(length * (version < 50 ? 1 : 2)); + if (position + byteLength > source.Length) + throw new EndOfStreamException(); + string value = version < 50 + ? Encoding.UTF8.GetString(source.Slice(position, byteLength)) + : Encoding.Unicode.GetString(source.Slice(position, byteLength)); + position += byteLength; + return value; + } + + private static void ReadWinPhoneSectionMarker( + ReadOnlySpan source, + ref int position, + string precedingSection) + { + if (position + 4 > source.Length || ReadInt32(source, position) != 0x162E) + throw new InvalidDataException( + $"Windows Phone {precedingSection} section did not end at the expected marker."); + position += 4; + } + + private static void LoadWinPhoneLegacyTiles( + ReadOnlySpan source, + WinPhoneHeader header, + World world, + bool[] frameImportant, + ref int position, + IProgress? progress) + { + for (int x = 0; x < world.TilesWide; x++) + { + if ((x & 31) == 0) + progress?.Report(new ProgressChangedEventArgs( + x.ProgressPercentage(world.TilesWide), + "Loading legacy Windows Phone tiles...")); + + for (int y = 0; y < world.TilesHigh;) + { + int auxiliaryIndex = GetWinPhoneTileIndex(world, x, y); + bool active = ReadByte(source, ref position) != 0; + world.WinPhoneTileHeader1![auxiliaryIndex] = active ? (byte)1 : (byte)0; + Tile tile = new() { IsActive = active }; + + if (active) + { + byte storedType = ReadByte(source, ref position); + world.WinPhoneStoredTileTypes![auxiliaryIndex] = storedType; + ushort type = storedType switch + { + 35 or 36 when header.Version < 58 => 34, + 150 when header.Version < 58 => 500, + _ => storedType, + }; + tile.Type = type; + + bool isFramed = IsWinPhoneLegacyFramed(storedType); + if (isFramed) + { + tile.U = ReadInt16(source, ref position); + tile.V = ReadInt16(source, ref position); + + // The native migration folds old banner variants into + // type 34 while retaining their frame row. + if (header.Version < 58 && storedType == 35) + tile.V += 54; + else if (header.Version < 58 && storedType == 36) + tile.V += 108; + } + else + { + tile.U = -1; + tile.V = -1; + } + + if (tile.Type == 127) + tile.IsActive = false; + } + + tile.Wall = ReadByte(source, ref position); + if (header.Version > 50) + tile.WallColor = ReadByte(source, ref position); + + tile.LiquidAmount = ReadByte(source, ref position); + if (tile.LiquidAmount != 0) + tile.LiquidType = ReadByte(source, ref position) != 0 + ? LiquidType.Lava + : LiquidType.Water; + + byte flags = ReadByte(source, ref position); + world.WinPhoneLegacyTileFlags![auxiliaryIndex] = flags; + tile.WireRed = (flags & 0x10) != 0; + tile.WireGreen = (flags & 0x20) != 0; + tile.WireBlue = (flags & 0x40) != 0; + + int rle = ReadInt16(source, ref position); + if (rle < 0 || y + rle >= world.TilesHigh) + throw new InvalidDataException( + $"Legacy Windows Phone tile run exceeds the world height at x={x}, y={y}, rle={rle}, offset={position}."); + world.WinPhoneTileRunLengths![auxiliaryIndex] = (ushort)rle; + + tile.ResetCache(); + world.Tiles[x, y] = tile; + for (int repeat = 1; repeat <= rle; repeat++) + { + world.Tiles[x, y + repeat] = tile; + CopyWinPhoneTileAuxiliary(world, x, y, y + repeat); + } + y += rle + 1; + } + } + } + + private static int GetWinPhoneTileIndex(World world, int x, int y) => + checked(x * world.TilesHigh + y); + + private static void CopyWinPhoneTileAuxiliary(World world, int x, int sourceY, int targetY) + { + int sourceIndex = GetWinPhoneTileIndex(world, x, sourceY); + int targetIndex = GetWinPhoneTileIndex(world, x, targetY); + world.WinPhoneStoredTileTypes![targetIndex] = world.WinPhoneStoredTileTypes[sourceIndex]; + world.WinPhoneTileHeader1![targetIndex] = world.WinPhoneTileHeader1[sourceIndex]; + world.WinPhoneTileHeader2![targetIndex] = world.WinPhoneTileHeader2[sourceIndex]; + world.WinPhoneTileShape![targetIndex] = world.WinPhoneTileShape[sourceIndex]; + world.WinPhoneLegacyTileFlags![targetIndex] = world.WinPhoneLegacyTileFlags[sourceIndex]; + } + + private static void ValidateWinPhoneTileEndMarker(ReadOnlySpan source, int position) + { + // A second 0x162E marker follows the complete tile stream. + if (position + 4 > source.Length || ReadInt32(source, position) != 0x162E) + throw new InvalidDataException("Windows Phone tile section length did not match the world dimensions."); + } + + private static bool[] CreateWinPhoneFrameImportant(uint version) + { + bool[] result = new bool[Math.Max(WorldConfiguration.SettingsTileFrameImportant.Length, 512)]; + foreach (ushort id in WinPhoneFrameImportantIds) + result[id] = true; + if (version == 49) + { + // The pre-v58 decoder uses this predicate instead of the later + // property table (FUN_0072ad80). + Array.Clear(result); + for (int id = 0; id <= byte.MaxValue; id++) + result[id] = IsWinPhoneLegacyFramed((byte)id); + } + return result; + } + + private static bool IsWinPhoneLegacyFramed(byte type) => type switch + { + 3 or 4 or 5 or 10 or 11 or 12 or 13 or 14 or 15 or 16 or 17 or 18 or + 20 or 21 or 24 or 26 or 27 or 28 or 29 or 31 or 33 or 34 or 35 or 36 or + 42 or 50 or 55 or 61 or + >= 71 and <= 74 or >= 77 and <= 79 or >= 81 and <= 106 or + 110 or 113 or 114 or >= 125 and <= 129 or >= 132 and <= 139 or + >= 141 and <= 144 or 149 or 150 => true, + _ => false, + }; + + private static int FindSectionMarker(ReadOnlySpan source, int start) + { + int limit = Math.Min(source.Length - 4, start + 1024); + for (int position = start; position <= limit; position++) + { + if (ReadInt32(source, position) == 0x162E) + return position; + } + return -1; + } + + private static WinPhonePrimitive[] ReadWinPhoneMetadataPrimitives( + ReadOnlySpan source, + int start, + int markerOffset, + uint version) + { + List values = []; + byte[] metadataSource = source.Slice(start, markerOffset - start).ToArray(); + int position = 0; + + void ReadBytes(int count) + { + for (int i = 0; i < count; i++) + values.Add(new WinPhonePrimitive(WinPhonePrimitiveKind.Byte, ReadByte(metadataSource, ref position))); + } + void ReadInt16Values(int count) + { + for (int i = 0; i < count; i++) + values.Add(new WinPhonePrimitive(WinPhonePrimitiveKind.Int16, ReadInt16(metadataSource, ref position))); + } + void ReadInt32Values(int count) + { + for (int i = 0; i < count; i++) + { + values.Add(new WinPhonePrimitive( + WinPhonePrimitiveKind.Int32, + ReadInt32(metadataSource, position))); + position += 4; + } + } + + ReadInt32Values(version > 47 ? 3 : 2); + ReadInt16Values(7); + ReadInt32Values(1); + ReadBytes(3); + ReadInt16Values(1); + if (version >= 58) + ReadBytes(2); + ReadInt16Values(2); + + if (version >= 58) + { + ReadBytes(1); + ReadBytes(1); + ReadInt32Values(3); + } + + ReadBytes(9); + if (version > 51) + ReadBytes(1); + if (version > 56) + ReadBytes(1); + if (version > 57) + ReadBytes(8); + + ReadBytes(3); + ReadInt32Values(1); + if (version > 57) + ReadInt16Values(3); + ReadBytes(1); + if (version > 55) + ReadInt16Values(1); + ReadBytes(1); + ReadInt16Values(1); + ReadBytes(1); + ReadInt32Values(1); + + if (version > 57) + { + for (int block = 0; block < 2; block++) + { + ReadBytes(4); + ReadInt16Values(3); + } + ReadBytes(9); + } + + if (position != metadataSource.Length) + throw new InvalidDataException( + $"Windows Phone metadata layout consumed {position} bytes, expected {metadataSource.Length}."); + return [.. values]; + } + + private static void ApplyWinPhoneMetadataToWorld(World world, uint version) + { + WinPhonePrimitive[] values = world.WinPhoneMetadataPrimitives!; + world.WorldId = values[0].Value; + world.RightWorld = values[2].Value; + world.BottomWorld = values[3].Value; + world.TilesHigh = values[4].Value; + world.TilesWide = values[5].Value; + world.DungeonX = values[6].Value; + world.DungeonY = values[7].Value; + world.GroundLevel = values[8].Value; + world.RockLevel = values[9].Value; + world.Time = BitConverter.Int32BitsToSingle(values[10].Value); + world.DayTime = values[11].Value != 0; + world.MoonPhase = values[12].Value; + world.BloodMoon = values[13].Value != 0; + + int spawnIndex = version >= 58 ? 17 : 15; + world.SpawnX = values[spawnIndex].Value; + world.SpawnY = values[spawnIndex + 1].Value; + if (version >= 58) + { + world.IsCrimson = values[19].Value != 0; + world.IsRaining = values[20].Value != 0; + world.TempRainTime = values[21].Value; + world.TempMaxRain = BitConverter.Int32BitsToSingle(values[22].Value); + } + + int progressionIndex = version >= 58 ? 24 : 17; + world.DownedBoss1EyeofCthulhu = values[progressionIndex].Value != 0; + world.DownedBoss2EaterofWorlds = values[progressionIndex + 1].Value != 0; + world.DownedBoss3Skeletron = values[progressionIndex + 2].Value != 0; + world.SavedGoblin = values[progressionIndex + 3].Value != 0; + world.SavedWizard = values[progressionIndex + 4].Value != 0; + world.SavedMech = values[progressionIndex + 5].Value != 0; + world.DownedGoblins = values[progressionIndex + 6].Value != 0; + world.DownedClown = values[progressionIndex + 7].Value != 0; + world.DownedFrost = values[progressionIndex + 8].Value != 0; + if (version >= 58) + { + // Slots +9 and +10 are the mobile-only Lepus and Turkor flags. + world.DownedQueenBee = values[progressionIndex + 11].Value != 0; + world.DownedMechBoss1TheDestroyer = values[progressionIndex + 12].Value != 0; + world.DownedMechBoss2TheTwins = values[progressionIndex + 13].Value != 0; + world.DownedMechBoss3SkeletronPrime = values[progressionIndex + 14].Value != 0; + // Slot +15 is the native derived "any mechanical boss" flag. + world.DownedPlantBoss = values[progressionIndex + 16].Value != 0; + world.DownedGolemBoss = values[progressionIndex + 17].Value != 0; + world.DownedPirates = values[progressionIndex + 18].Value != 0; + } + + int worldStateIndex = version >= 58 ? 43 : 26; + world.ShadowOrbCount = values[worldStateIndex + 2].Value; + // ShadowOrbCount updates ShadowOrbSmashed in the editor model, so apply + // the independently stored native flag after the count. + world.ShadowOrbSmashed = values[worldStateIndex].Value != 0; + world.SpawnMeteor = values[worldStateIndex + 1].Value != 0; + world.AltarCount = values[worldStateIndex + 3].Value; + if (version >= 58) + { + world.SavedOreTiersCobalt = values[worldStateIndex + 4].Value; + world.SavedOreTiersMythril = values[worldStateIndex + 5].Value; + world.SavedOreTiersAdamantite = values[worldStateIndex + 6].Value; + } + + int hardModeIndex = worldStateIndex + (version >= 58 ? 7 : 4); + world.HardMode = values[hardModeIndex].Value != 0; + int invasionIndex = hardModeIndex + (version > 55 ? 2 : 1); + world.InvasionDelay = values[invasionIndex].Value; + world.InvasionSize = values[invasionIndex + 1].Value; + world.InvasionType = values[invasionIndex + 2].Value; + world.InvasionX = BitConverter.Int32BitsToSingle(values[invasionIndex + 3].Value); + } + + private static byte ReadByte(ReadOnlySpan source, ref int position) + { + if ((uint)position >= (uint)source.Length) + throw new EndOfStreamException(); + return source[position++]; + } + + private static ushort ReadUInt16(ReadOnlySpan source, ref int position) + { + if (position + 2 > source.Length) + throw new EndOfStreamException(); + ushort value = (ushort)(source[position] | source[position + 1] << 8); + position += 2; + return value; + } + + private static short ReadInt16(ReadOnlySpan source, ref int position) => + unchecked((short)ReadUInt16(source, ref position)); + + private static float ReadSingle(ReadOnlySpan source, ref int position) + { + if (position + 4 > source.Length) + throw new EndOfStreamException(); + float value = BitConverter.Int32BitsToSingle(ReadInt32(source, position)); + position += 4; + return value; + } + + private static byte[] SerializeWinPhoneDataSections(World world, uint version) + { + if (world.WinPhoneChestSlots is null || world.WinPhoneSignSlots is null || + world.WinPhoneSignTextFlags is null) + throw new InvalidOperationException("Windows Phone sparse section slots are unavailable."); + + SynchronizeWinPhoneSparseSlots(world); + + using MemoryStream stream = new(); + using BinaryWriter writer = new(stream, Encoding.UTF8, leaveOpen: true); + WriteWinPhoneChests(writer, world, version); + writer.Write(0x162E); + WriteWinPhoneSigns(writer, world, version); + writer.Write(0x162E); + WriteWinPhoneNpcs(writer, world); + writer.Write(0x162E); + WriteWinPhoneCharacterNames(writer, world, version); + writer.Flush(); + return stream.ToArray(); + } + + private static void SynchronizeWinPhoneSparseSlots(World world) + { + SynchronizeWinPhoneSlots(world.WinPhoneChestSlots!, world.Chests, "chests"); + + Sign?[] signSlots = world.WinPhoneSignSlots!; + HashSet previousSigns = new(ReferenceEqualityComparer.Instance); + foreach (Sign? sign in signSlots) + if (sign is not null) + previousSigns.Add(sign); + SynchronizeWinPhoneSlots(signSlots, world.Signs, "signs"); + for (int index = 0; index < signSlots.Length; index++) + { + Sign? sign = signSlots[index]; + if (sign is null) + { + world.WinPhoneSignTextFlags![index] = 0; + } + else if (!previousSigns.Contains(sign)) + { + world.WinPhoneSignTextFlags![index] = string.IsNullOrEmpty(sign.Text) ? (byte)0 : (byte)1; + } + } + } + + private static void SynchronizeWinPhoneSlots(T?[] slots, IList items, string sectionName) + where T : class + { + if (items.Count > slots.Length) + throw new InvalidDataException( + $"Windows Phone worlds support at most {slots.Length} {sectionName}."); + + HashSet current = new(items, ReferenceEqualityComparer.Instance); + HashSet slotted = new(ReferenceEqualityComparer.Instance); + for (int index = 0; index < slots.Length; index++) + { + T? item = slots[index]; + if (item is not null && current.Contains(item) && slotted.Add(item)) + continue; + slots[index] = null; + } + + foreach (T item in items) + { + if (slotted.Contains(item)) + continue; + int freeIndex = Array.FindIndex(slots, static slot => slot is null); + if (freeIndex < 0) + throw new InvalidDataException($"No free Windows Phone {sectionName} slot is available."); + slots[freeIndex] = item; + slotted.Add(item); + } + } + + private static byte[] SerializeWinPhoneTiles(World world, uint version) + { + if (world.WinPhoneStoredTileTypes is null || world.WinPhoneTileHeader1 is null || + world.WinPhoneTileHeader2 is null || world.WinPhoneTileShape is null || + world.WinPhoneLegacyTileFlags is null || world.WinPhoneTileRunLengths is null) + throw new InvalidOperationException("Windows Phone tile encoding metadata is unavailable."); + + using MemoryStream stream = new(); + using BinaryWriter writer = new(stream, Encoding.UTF8, leaveOpen: true); + bool[] frameImportant = CreateWinPhoneFrameImportant(version); + for (int x = 0; x < world.TilesWide; x++) + { + for (int y = 0; y < world.TilesHigh;) + { + int index = GetWinPhoneTileIndex(world, x, y); + int run = world.WinPhoneTileRunLengths[index]; + if (y + run >= world.TilesHigh) + throw new InvalidDataException($"Stored Windows Phone tile run exceeds column {x}."); + for (int repeat = 1; repeat <= run; repeat++) + { + if (!WinPhoneTilesEncodeEqual(world, x, y, y + repeat)) + throw new InvalidDataException( + $"Stored Windows Phone tile run no longer matches at {x}, {y + repeat}."); + } + + if (version < 58) + WriteWinPhoneLegacyTile(writer, world, frameImportant, x, y, run, version); + else + WriteWinPhoneCompactTile(writer, world, frameImportant, x, y, run, version); + y += run + 1; + } + } + writer.Flush(); + return stream.ToArray(); + } + + private static byte[] SerializeWinPhonePrefix(World world) + { + if (world.WinPhoneMetadataPrimitives is null || world.WinPhoneHistory is null) + throw new InvalidOperationException("Windows Phone metadata is unavailable."); + + byte[] titleBytes = (world.Version < 50 ? Encoding.UTF8 : Encoding.Unicode) + .GetBytes(world.Title); + int titleLength = world.Version < 50 ? titleBytes.Length : world.Title.Length; + if (titleLength > WinPhoneMaxTitleLength) + throw new InvalidDataException( + $"Windows Phone world titles cannot exceed {WinPhoneMaxTitleLength} " + + (world.Version < 50 ? "UTF-8 bytes." : "characters.")); + + WinPhonePrimitive[] metadata = CreateWinPhoneMetadataForSave(world); + + using MemoryStream stream = new(); + using BinaryWriter writer = new(stream, Encoding.UTF8, leaveOpen: true); + writer.Write(world.Version); + writer.Write(world.WinPhoneStoredCrc); + writer.Write(titleLength); + writer.Write(titleBytes); + if (world.Version >= 53) + { + writer.Write(world.WinPhoneCloudFlag); + if (world.Version == 53) + { + writer.Write(world.WinPhoneHistory[0]); + } + else + { + writer.Write(world.WinPhoneHistory.Length); + foreach (uint value in world.WinPhoneHistory) + writer.Write(value); + } + } + + foreach (WinPhonePrimitive value in metadata) + { + switch (value.Kind) + { + case WinPhonePrimitiveKind.Byte: + writer.Write((byte)value.Value); + break; + case WinPhonePrimitiveKind.Int16: + writer.Write((short)value.Value); + break; + case WinPhonePrimitiveKind.Int32: + writer.Write(value.Value); + break; + default: + throw new InvalidDataException($"Unknown Windows Phone primitive kind {value.Kind}."); + } + } + writer.Write(0x162E); + writer.Flush(); + return stream.ToArray(); + } + + private static WinPhonePrimitive[] CreateWinPhoneMetadataForSave(World world) + { + WinPhonePrimitive[] values = (WinPhonePrimitive[])world.WinPhoneMetadataPrimitives!.Clone(); + SetWinPhonePrimitive(values, 0, WinPhonePrimitiveKind.Int32, world.WorldId, nameof(world.WorldId)); + SetWinPhonePrimitive(values, 2, WinPhonePrimitiveKind.Int32, + ToWinPhoneInt32(world.RightWorld, nameof(world.RightWorld)), nameof(world.RightWorld)); + SetWinPhonePrimitive(values, 3, WinPhonePrimitiveKind.Int16, + ToWinPhoneInt16(world.BottomWorld, nameof(world.BottomWorld)), nameof(world.BottomWorld)); + SetWinPhonePrimitive(values, 4, WinPhonePrimitiveKind.Int16, + ToWinPhoneInt16(world.TilesHigh, nameof(world.TilesHigh)), nameof(world.TilesHigh)); + SetWinPhonePrimitive(values, 5, WinPhonePrimitiveKind.Int16, + ToWinPhoneInt16(world.TilesWide, nameof(world.TilesWide)), nameof(world.TilesWide)); + SetWinPhonePrimitive(values, 6, WinPhonePrimitiveKind.Int16, + ToWinPhoneInt16(world.DungeonX, nameof(world.DungeonX)), nameof(world.DungeonX)); + SetWinPhonePrimitive(values, 7, WinPhonePrimitiveKind.Int16, + ToWinPhoneInt16(world.DungeonY, nameof(world.DungeonY)), nameof(world.DungeonY)); + SetWinPhonePrimitive(values, 8, WinPhonePrimitiveKind.Int16, + ToWinPhoneInt16(world.GroundLevel, nameof(world.GroundLevel)), nameof(world.GroundLevel)); + SetWinPhonePrimitive(values, 9, WinPhonePrimitiveKind.Int16, + ToWinPhoneInt16(world.RockLevel, nameof(world.RockLevel)), nameof(world.RockLevel)); + SetWinPhonePrimitive(values, 10, WinPhonePrimitiveKind.Int32, + BitConverter.SingleToInt32Bits(checked((float)world.Time)), nameof(world.Time)); + SetWinPhonePrimitive(values, 11, WinPhonePrimitiveKind.Byte, + world.DayTime ? 1 : 0, nameof(world.DayTime)); + SetWinPhonePrimitive(values, 12, WinPhonePrimitiveKind.Byte, + ToWinPhoneByte(world.MoonPhase, nameof(world.MoonPhase)), nameof(world.MoonPhase)); + SetWinPhonePrimitive(values, 13, WinPhonePrimitiveKind.Byte, + world.BloodMoon ? 1 : 0, nameof(world.BloodMoon)); + + int spawnIndex = world.Version >= 58 ? 17 : 15; + SetWinPhonePrimitive(values, spawnIndex, WinPhonePrimitiveKind.Int16, + ToWinPhoneInt16(world.SpawnX, nameof(world.SpawnX)), nameof(world.SpawnX)); + SetWinPhonePrimitive(values, spawnIndex + 1, WinPhonePrimitiveKind.Int16, + ToWinPhoneInt16(world.SpawnY, nameof(world.SpawnY)), nameof(world.SpawnY)); + if (world.Version >= 58) + { + if (world.TempRainTime < 0) + throw new InvalidDataException("Windows Phone rain time cannot be negative."); + if (!float.IsFinite(world.TempMaxRain) || world.TempMaxRain is < 0 or > 1) + throw new InvalidDataException("Windows Phone maximum rain intensity must be between 0 and 1."); + SetWinPhonePrimitive(values, 19, WinPhonePrimitiveKind.Byte, + world.IsCrimson ? 1 : 0, nameof(world.IsCrimson)); + SetWinPhonePrimitive(values, 20, WinPhonePrimitiveKind.Byte, + world.IsRaining ? 1 : 0, nameof(world.IsRaining)); + SetWinPhonePrimitive(values, 21, WinPhonePrimitiveKind.Int32, + world.TempRainTime, nameof(world.TempRainTime)); + SetWinPhonePrimitive(values, 22, WinPhonePrimitiveKind.Int32, + BitConverter.SingleToInt32Bits(world.TempMaxRain), nameof(world.TempMaxRain)); + } + + int progressionIndex = world.Version >= 58 ? 24 : 17; + SetWinPhoneBoolean(values, progressionIndex, world.DownedBoss1EyeofCthulhu, + nameof(world.DownedBoss1EyeofCthulhu)); + SetWinPhoneBoolean(values, progressionIndex + 1, world.DownedBoss2EaterofWorlds, + nameof(world.DownedBoss2EaterofWorlds)); + SetWinPhoneBoolean(values, progressionIndex + 2, world.DownedBoss3Skeletron, + nameof(world.DownedBoss3Skeletron)); + SetWinPhoneBoolean(values, progressionIndex + 3, world.SavedGoblin, nameof(world.SavedGoblin)); + SetWinPhoneBoolean(values, progressionIndex + 4, world.SavedWizard, nameof(world.SavedWizard)); + SetWinPhoneBoolean(values, progressionIndex + 5, world.SavedMech, nameof(world.SavedMech)); + SetWinPhoneBoolean(values, progressionIndex + 6, world.DownedGoblins, nameof(world.DownedGoblins)); + SetWinPhoneBoolean(values, progressionIndex + 7, world.DownedClown, nameof(world.DownedClown)); + SetWinPhoneBoolean(values, progressionIndex + 8, world.DownedFrost, nameof(world.DownedFrost)); + if (world.Version >= 58) + { + SetWinPhoneBoolean(values, progressionIndex + 11, world.DownedQueenBee, nameof(world.DownedQueenBee)); + SetWinPhoneBoolean(values, progressionIndex + 12, world.DownedMechBoss1TheDestroyer, + nameof(world.DownedMechBoss1TheDestroyer)); + SetWinPhoneBoolean(values, progressionIndex + 13, world.DownedMechBoss2TheTwins, + nameof(world.DownedMechBoss2TheTwins)); + SetWinPhoneBoolean(values, progressionIndex + 14, world.DownedMechBoss3SkeletronPrime, + nameof(world.DownedMechBoss3SkeletronPrime)); + SetWinPhoneBoolean(values, progressionIndex + 15, world.DownedMechBossAny, + nameof(world.DownedMechBossAny)); + SetWinPhoneBoolean(values, progressionIndex + 16, world.DownedPlantBoss, nameof(world.DownedPlantBoss)); + SetWinPhoneBoolean(values, progressionIndex + 17, world.DownedGolemBoss, nameof(world.DownedGolemBoss)); + SetWinPhoneBoolean(values, progressionIndex + 18, world.DownedPirates, nameof(world.DownedPirates)); + } + + int worldStateIndex = world.Version >= 58 ? 43 : 26; + SetWinPhoneBoolean(values, worldStateIndex, world.ShadowOrbSmashed, nameof(world.ShadowOrbSmashed)); + SetWinPhoneBoolean(values, worldStateIndex + 1, world.SpawnMeteor, nameof(world.SpawnMeteor)); + SetWinPhonePrimitive(values, worldStateIndex + 2, WinPhonePrimitiveKind.Byte, + ToWinPhoneByte(world.ShadowOrbCount, nameof(world.ShadowOrbCount)), nameof(world.ShadowOrbCount)); + SetWinPhonePrimitive(values, worldStateIndex + 3, WinPhonePrimitiveKind.Int32, + world.AltarCount, nameof(world.AltarCount)); + if (world.Version >= 58) + { + SetWinPhonePrimitive(values, worldStateIndex + 4, WinPhonePrimitiveKind.Int16, + ToWinPhoneInt16(world.SavedOreTiersCobalt, nameof(world.SavedOreTiersCobalt)), + nameof(world.SavedOreTiersCobalt)); + SetWinPhonePrimitive(values, worldStateIndex + 5, WinPhonePrimitiveKind.Int16, + ToWinPhoneInt16(world.SavedOreTiersMythril, nameof(world.SavedOreTiersMythril)), + nameof(world.SavedOreTiersMythril)); + SetWinPhonePrimitive(values, worldStateIndex + 6, WinPhonePrimitiveKind.Int16, + ToWinPhoneInt16(world.SavedOreTiersAdamantite, nameof(world.SavedOreTiersAdamantite)), + nameof(world.SavedOreTiersAdamantite)); + } + + int hardModeIndex = worldStateIndex + (world.Version >= 58 ? 7 : 4); + SetWinPhoneBoolean(values, hardModeIndex, world.HardMode, nameof(world.HardMode)); + int invasionIndex = hardModeIndex + (world.Version > 55 ? 2 : 1); + SetWinPhonePrimitive(values, invasionIndex, WinPhonePrimitiveKind.Byte, + ToWinPhoneByte(world.InvasionDelay, nameof(world.InvasionDelay)), nameof(world.InvasionDelay)); + SetWinPhonePrimitive(values, invasionIndex + 1, WinPhonePrimitiveKind.Int16, + ToWinPhoneInt16(world.InvasionSize, nameof(world.InvasionSize)), nameof(world.InvasionSize)); + SetWinPhonePrimitive(values, invasionIndex + 2, WinPhonePrimitiveKind.Byte, + ToWinPhoneByte(world.InvasionType, nameof(world.InvasionType)), nameof(world.InvasionType)); + if (!double.IsFinite(world.InvasionX) || world.InvasionX is < -float.MaxValue or > float.MaxValue) + throw new InvalidDataException("Windows Phone invasion position must be a finite 32-bit number."); + SetWinPhonePrimitive(values, invasionIndex + 3, WinPhonePrimitiveKind.Int32, + BitConverter.SingleToInt32Bits((float)world.InvasionX), nameof(world.InvasionX)); + return values; + } + + private static void SetWinPhoneBoolean( + WinPhonePrimitive[] values, + int index, + bool value, + string fieldName) => + SetWinPhonePrimitive(values, index, WinPhonePrimitiveKind.Byte, value ? 1 : 0, fieldName); + + private static void SetWinPhonePrimitive( + WinPhonePrimitive[] values, + int index, + WinPhonePrimitiveKind expectedKind, + int value, + string fieldName) + { + if ((uint)index >= (uint)values.Length || values[index].Kind != expectedKind) + throw new InvalidDataException($"Windows Phone metadata layout does not contain {fieldName}."); + values[index] = new WinPhonePrimitive(expectedKind, value); + } + + private static byte ToWinPhoneByte(int value, string fieldName) + { + if (value is < byte.MinValue or > byte.MaxValue) + throw new InvalidDataException($"{fieldName} value {value} is outside the Windows Phone byte range."); + return (byte)value; + } + + private static short ToWinPhoneInt16(double value, string fieldName) + { + if (!double.IsFinite(value) || value != Math.Truncate(value) || + value is < short.MinValue or > short.MaxValue) + throw new InvalidDataException( + $"{fieldName} value {value} is not a Windows Phone 16-bit integer."); + return (short)value; + } + + private static int ToWinPhoneInt32(double value, string fieldName) + { + if (!double.IsFinite(value) || value != Math.Truncate(value) || + value is < int.MinValue or > int.MaxValue) + throw new InvalidDataException( + $"{fieldName} value {value} is not a Windows Phone 32-bit integer."); + return (int)value; + } + + private static bool WinPhoneTilesEncodeEqual(World world, int x, int firstY, int secondY) + { + if (!world.Tiles[x, firstY].Equals(world.Tiles[x, secondY])) + return false; + int first = GetWinPhoneTileIndex(world, x, firstY); + int second = GetWinPhoneTileIndex(world, x, secondY); + return world.WinPhoneStoredTileTypes![first] == world.WinPhoneStoredTileTypes[second] && + world.WinPhoneTileHeader1![first] == world.WinPhoneTileHeader1[second] && + world.WinPhoneTileHeader2![first] == world.WinPhoneTileHeader2[second] && + world.WinPhoneTileShape![first] == world.WinPhoneTileShape[second] && + world.WinPhoneLegacyTileFlags![first] == world.WinPhoneLegacyTileFlags[second]; + } + + private static bool PrepareWinPhoneTilesForSave(World world, World original, uint version) + { + bool anyChanges = false; + for (int x = 0; x < world.TilesWide; x++) + { + bool changedColumn = false; + for (int y = 0; y < world.TilesHigh && !changedColumn; y++) + changedColumn = !world.Tiles[x, y].Equals(original.Tiles[x, y]); + if (!changedColumn) + continue; + anyChanges = true; + + for (int y = 0; y < world.TilesHigh; y++) + { + int index = GetWinPhoneTileIndex(world, x, y); + world.WinPhoneTileRunLengths![index] = 0; + if (!world.Tiles[x, y].Equals(original.Tiles[x, y])) + UpdateWinPhoneTileEncodingMetadata(world, version, x, y); + } + } + return anyChanges; + } + + private static void UpdateWinPhoneTileEncodingMetadata(World world, uint version, int x, int y) + { + int index = GetWinPhoneTileIndex(world, x, y); + Tile tile = world.Tiles[x, y]; + if (tile.Wall > byte.MaxValue) + throw new InvalidDataException($"Wall type {tile.Wall} at {x}, {y} is outside the Windows Phone range."); + + if (version < 58) + { + if (tile.TileColor != 0 || (version <= 50 && tile.WallColor != 0) || + tile.Actuator || tile.InActive || tile.WireYellow || tile.BrickStyle != BrickStyle.Full) + throw new InvalidDataException( + $"Tile {x}, {y} uses paint, actuator, yellow-wire, or shape data unavailable in Windows Phone version {version}."); + if (tile.LiquidAmount != 0 && tile.LiquidType is not (LiquidType.Water or LiquidType.Lava)) + throw new InvalidDataException( + $"Liquid {tile.LiquidType} at {x}, {y} is unavailable in Windows Phone version {version}."); + + ushort storedType = tile.Type == 500 ? (ushort)150 : tile.Type; + if (storedType > byte.MaxValue) + throw new InvalidDataException( + $"Tile type {tile.Type} at {x}, {y} is outside the legacy Windows Phone range."); + world.WinPhoneStoredTileTypes![index] = storedType; + world.WinPhoneTileHeader1![index] = tile.IsActive ? (byte)1 : (byte)0; + world.WinPhoneLegacyTileFlags![index] = (byte)( + (world.WinPhoneLegacyTileFlags[index] & ~0x70) | + (tile.WireRed ? 0x10 : 0) | + (tile.WireGreen ? 0x20 : 0) | + (tile.WireBlue ? 0x40 : 0)); + return; + } + + if (tile.Type > 0x1FF) + throw new InvalidDataException( + $"Tile type {tile.Type} at {x}, {y} is outside the Windows Phone nine-bit range."); + if (tile.LiquidAmount != 0 && tile.LiquidType is not (LiquidType.Water or LiquidType.Lava or LiquidType.Honey)) + throw new InvalidDataException( + $"Liquid {tile.LiquidType} at {x}, {y} is unavailable in Windows Phone version {version}."); + + byte header1 = (byte)(world.WinPhoneTileHeader1![index] & 0xC0); + if (tile.IsActive) header1 |= 0x01; + if (tile.WireRed) header1 |= 0x02; + if (tile.WireGreen) header1 |= 0x04; + if (tile.WireBlue) header1 |= 0x08; + if (tile.Actuator) header1 |= 0x10; + if (tile.InActive) header1 |= 0x20; + world.WinPhoneTileHeader1[index] = header1; + world.WinPhoneStoredTileTypes![index] = tile.Type; + + byte header2 = (byte)(world.WinPhoneTileHeader2![index] & ~0x10); + if (tile.WireYellow) header2 |= 0x10; + world.WinPhoneTileHeader2[index] = header2; + world.WinPhoneTileShape![index] = (byte)( + (world.WinPhoneTileShape[index] & 0x0F) | ((byte)tile.BrickStyle << 4)); + } + + private static void WriteWinPhoneLegacyTile( + BinaryWriter writer, + World world, + bool[] frameImportant, + int x, + int y, + int run, + uint version) + { + int index = GetWinPhoneTileIndex(world, x, y); + Tile tile = world.Tiles[x, y]; + bool storedActive = world.WinPhoneTileHeader1![index] != 0; + writer.Write(storedActive); + if (storedActive) + { + byte storedType = (byte)world.WinPhoneStoredTileTypes![index]; + writer.Write(storedType); + if (IsWinPhoneLegacyFramed(storedType)) + { + writer.Write(tile.U); + short storedV = tile.V; + if (storedType == 35) + storedV -= 54; + else if (storedType == 36) + storedV -= 108; + writer.Write(storedV); + } + } + writer.Write((byte)tile.Wall); + if (version > 50) + writer.Write(tile.WallColor); + writer.Write(tile.LiquidAmount); + if (tile.LiquidAmount != 0) + writer.Write(tile.LiquidType == LiquidType.Lava); + writer.Write(world.WinPhoneLegacyTileFlags![index]); + writer.Write((short)run); + } + + private static void WriteWinPhoneCompactTile( + BinaryWriter writer, + World world, + bool[] frameImportant, + int x, + int y, + int run, + uint version) + { + int index = GetWinPhoneTileIndex(world, x, y); + Tile tile = world.Tiles[x, y]; + byte header1 = world.WinPhoneTileHeader1![index]; + writer.Write(header1); + if ((header1 & 1) != 0) + { + ushort storedType = world.WinPhoneStoredTileTypes![index]; + writer.Write(storedType); + if (storedType < frameImportant.Length && frameImportant[storedType]) + { + writer.Write(tile.U); + writer.Write(tile.V); + } + writer.Write(tile.TileColor); + } + writer.Write((byte)tile.Wall); + if (tile.Wall != 0) + writer.Write(tile.WallColor); + writer.Write(tile.LiquidAmount); + if (tile.LiquidAmount != 0) + writer.Write((byte)((int)tile.LiquidType - 1)); + writer.Write(world.WinPhoneTileHeader2![index]); + if (version is >= 60 and <= 68) + writer.Write(world.WinPhoneTileShape![index]); + if (run < 0x80) + { + writer.Write((byte)run); + } + else + { + writer.Write((byte)((run & 0x7F) | 0x80)); + writer.Write((byte)(run >> 7)); + } + } + + private static void WriteWinPhoneChests(BinaryWriter writer, World world, uint version) + { + Chest?[] slots = world.WinPhoneChestSlots!; + int itemCount = version < 58 ? 20 : 40; + byte[] itemMask = new byte[5]; + for (int chestIndex = 0; chestIndex < Chest.LegacyLimit; chestIndex++) + { + Chest? chest = slots[chestIndex]; + writer.Write(chest is not null); + if (chest is null) + continue; + + writer.Write(ToWinPhoneInt16(chest.X, "Chest X")); + writer.Write(ToWinPhoneInt16(chest.Y, "Chest Y")); + if (version < 58) + { + for (int slot = itemCount; slot < chest.Items.Count; slot++) + if (chest.Items[slot].StackSize > 0 && chest.Items[slot].NetId != 0) + throw new InvalidDataException( + $"Windows Phone version {version} chests support only {itemCount} item slots."); + for (int slot = 0; slot < itemCount; slot++) + WriteWinPhoneChestItem(writer, chest.Items[slot], version); + continue; + } + + Array.Clear(itemMask); + for (int slot = 0; slot < itemCount; slot++) + { + Item item = chest.Items[slot]; + if (item.StackSize > 0 && item.NetId != 0) + itemMask[slot >> 3] |= (byte)(1 << (slot & 7)); + } + writer.Write((byte)itemMask.Length); + writer.Write(itemMask); + for (int slot = 0; slot < itemCount; slot++) + { + if ((itemMask[slot >> 3] & 1 << (slot & 7)) != 0) + WriteWinPhoneChestItem(writer, chest.Items[slot], version); + } + } + } + + private static void WriteWinPhoneChestItem(BinaryWriter writer, Item item, uint version) + { + int stack = item.NetId == 0 ? 0 : item.StackSize; + int maxStack = version < 55 ? byte.MaxValue : short.MaxValue; + if (stack is < 0 || stack > maxStack) + throw new InvalidDataException( + $"Item stack {stack} is outside the Windows Phone version {version} range."); + if (item.NetId is < short.MinValue or > short.MaxValue) + throw new InvalidDataException($"Item ID {item.NetId} is outside the Windows Phone range."); + if (version < 55) + writer.Write((byte)stack); + else + writer.Write((short)stack); + if (stack <= 0) + return; + writer.Write((short)item.NetId); + writer.Write(item.Prefix); + } + + private static void WriteWinPhoneSigns(BinaryWriter writer, World world, uint version) + { + Sign?[] slots = world.WinPhoneSignSlots!; + for (int signIndex = 0; signIndex < Sign.LegacyLimit; signIndex++) + { + Sign? sign = slots[signIndex]; + writer.Write(sign is not null); + if (sign is null) + continue; + writer.Write(ToWinPhoneInt16(sign.X, "Sign X")); + writer.Write(ToWinPhoneInt16(sign.Y, "Sign Y")); + if (version > 57) + writer.Write(world.WinPhoneSignTextFlags![signIndex]); + WriteWinPhoneString(writer, sign.Text, version); + } + } + + private static void WriteWinPhoneNpcs(BinaryWriter writer, World world) + { + foreach (NPC npc in world.NPCs) + { + if (npc.SpriteId is < byte.MinValue or > byte.MaxValue) + throw new InvalidDataException($"NPC ID {npc.SpriteId} is outside the Windows Phone range."); + if (!float.IsFinite(npc.Position.X) || !float.IsFinite(npc.Position.Y)) + throw new InvalidDataException("NPC positions must be finite Windows Phone float values."); + writer.Write(true); + writer.Write((byte)npc.SpriteId); + writer.Write(npc.Position.X); + writer.Write(npc.Position.Y); + writer.Write(npc.IsHomeless); + writer.Write(ToWinPhoneInt16(npc.Home.X, "NPC home X")); + writer.Write(ToWinPhoneInt16(npc.Home.Y, "NPC home Y")); + } + writer.Write(false); + } + + private static void WriteWinPhoneCharacterNames(BinaryWriter writer, World world, uint version) + { + int nameCount = version < 50 ? 10 : WinPhoneCharacterNameIds.Length; + for (int index = 0; index < nameCount; index++) + { + int id = WinPhoneCharacterNameIds[index]; + string name = string.Empty; + foreach (NpcName candidate in world.CharacterNames) + { + if (candidate.Id != id) + continue; + name = candidate.Name; + break; + } + WriteWinPhoneString(writer, name, version); + } + } + + private static void WriteWinPhoneString(BinaryWriter writer, string value, uint version) + { + value ??= string.Empty; + writer.Write(value.Length); + writer.Write((version < 50 ? Encoding.UTF8 : Encoding.Unicode).GetBytes(value)); + } + + /// + /// Writes the original native container without normalization. This is the + /// lossless path used for an unedited Windows Phone world. + /// + public static void SaveWinPhoneUnchanged(World world, Stream output) + { + ArgumentNullException.ThrowIfNull(world); + ArgumentNullException.ThrowIfNull(output); + + if (!world.IsWinPhone || world.WinPhoneSourceData is null) + throw new InvalidOperationException("The world was not loaded from a Windows Phone world file."); + + output.Write(world.WinPhoneSourceData, 0, world.WinPhoneSourceData.Length); + } + + /// + /// Rebuilds every decoded native section. Only the still-unmapped metadata + /// prefix and the v49 fat-resource suffix are copied as opaque bytes. + /// + internal static void SaveWinPhoneReconstructed(World world, Stream output) + { + ArgumentNullException.ThrowIfNull(world); + ArgumentNullException.ThrowIfNull(output); + if (!world.IsWinPhone || world.WinPhoneSourceData is null) + throw new InvalidOperationException("The world was not loaded from a Windows Phone world file."); + if (world.WinPhoneTileSectionOffset <= 0 || + world.WinPhoneParsedLength < world.WinPhoneDataSectionOffset) + throw new InvalidOperationException("Load the complete Windows Phone world before reconstructing it."); + + byte[] prefix = SerializeWinPhonePrefix(world); + byte[] tiles = SerializeWinPhoneTiles(world, world.Version); + byte[] dataSections = SerializeWinPhoneDataSections(world, world.Version); + using MemoryStream native = new(); + native.Write(prefix); + native.Write(tiles); + using (BinaryWriter writer = new(native, Encoding.UTF8, leaveOpen: true)) + writer.Write(0x162E); + native.Write(dataSections); + native.Write( + world.WinPhoneSourceData, + world.WinPhoneParsedLength, + world.WinPhoneSourceData.Length - world.WinPhoneParsedLength); + + byte[] result = native.ToArray(); + if (world.WinPhoneStoredCrc != 0) + { + uint crc = ComputeWinPhoneCrc32(result.AsSpan(8)); + BitConverter.TryWriteBytes(result.AsSpan(4, 4), crc); + } + output.Write(result); + } + + /// + /// Standard save-path guard. Until edited native serialization is + /// available, only a fully loaded, semantically unchanged world may use + /// the lossless source-container path. + /// + private static void SaveWinPhoneVerifiedUnchanged(World world, Stream output) + { + if (world.WinPhoneSourceData is null || + !TryReadWinPhoneHeader(world.WinPhoneSourceData, out WinPhoneHeader header)) + throw new InvalidOperationException("The original Windows Phone world data is unavailable."); + + if (world.Version != header.Version || world.RightWorld != header.RightWorld || + world.BottomWorld != header.BottomWorld || world.TilesHigh != header.TilesHigh || + world.TilesWide != header.TilesWide) + throw new NotSupportedException( + "Changing Windows Phone world dimensions or native version is not supported yet."); + + if (world.Tiles is null || world.Tiles.Length != world.TilesWide * world.TilesHigh) + throw new InvalidOperationException( + "Load the complete Windows Phone world before saving it through World.Save."); + + World original = new() + { + Version = header.Version, + TilesWide = header.TilesWide, + TilesHigh = header.TilesHigh, + }; + int originalDataOffset = LoadWinPhoneTiles( + world.WinPhoneSourceData, header, original, progress: null); + LoadWinPhoneSections(world.WinPhoneSourceData, header, original, originalDataOffset); + + bool tileEdits = PrepareWinPhoneTilesForSave(world, original, header.Version); + + byte[] serializedTiles = SerializeWinPhoneTiles(world, header.Version); + ReadOnlySpan originalTiles = world.WinPhoneSourceData.AsSpan( + world.WinPhoneTileSectionOffset, + world.WinPhoneDataSectionOffset - world.WinPhoneTileSectionOffset - 4); + if (!tileEdits && !serializedTiles.AsSpan().SequenceEqual(originalTiles)) + { + int commonLength = Math.Min(serializedTiles.Length, originalTiles.Length); + int difference = 0; + while (difference < commonLength && serializedTiles[difference] == originalTiles[difference]) + difference++; + int diagnosticLength = Math.Min(16, commonLength - difference); + throw new InvalidDataException( + $"Windows Phone tile serialization differed at relative offset {difference} " + + $"(serialized length {serializedTiles.Length}, original length {originalTiles.Length}); " + + $"serialized={Convert.ToHexString(serializedTiles.AsSpan(difference, diagnosticLength))}, " + + $"original={Convert.ToHexString(originalTiles.Slice(difference, diagnosticLength))}."); + } + + SaveWinPhoneReconstructed(world, output); + } + + internal static bool TryReadWinPhoneHeader(ReadOnlySpan source, out WinPhoneHeader header) + { + header = default; + if (source.Length < 40) + return false; + + uint version = ReadUInt32(source, 0); + if (version is < 39 or > 65) + return false; + + uint storedCrc = ReadUInt32(source, 4); + int titleLength = ReadInt32(source, 8); + if (titleLength is < 0 or > WinPhoneMaxTitleLength) + return false; + + int titleByteLength = version < 50 ? titleLength : checked(titleLength * 2); + int position = checked(12 + titleByteLength); + if (position > source.Length) + return false; + + string title = version < 50 + ? Encoding.UTF8.GetString(source.Slice(12, titleByteLength)) + : Encoding.Unicode.GetString(source.Slice(12, titleByteLength)); + + byte cloudFlag = 0; + uint[] history = []; + + if (version >= 53) + { + if (position >= source.Length) + return false; + cloudFlag = source[position++]; + if (version == 53) + { + if (position + 4 > source.Length) + return false; + history = [ReadUInt32(source, position)]; + position += 4; + } + else + { + if (position + 4 > source.Length) + return false; + int historyCount = ReadInt32(source, position); + if (historyCount is < 0 or > 100) + return false; + position += 4; + history = new uint[historyCount]; + for (int index = 0; index < historyCount; index++) + { + history[index] = ReadUInt32(source, position); + position += 4; + } + } + } + + // Native body prefix recovered from FUN_0078d0d8. The two pixel bounds + // must exactly match the compact 16-bit tile dimensions; this is the + // discriminator that prevents ordinary desktop V1 files being claimed. + if (position + 26 > source.Length) + return false; + + int worldId = ReadInt32(source, position); + int rightWorld = ReadInt32(source, position + 8); + short bottomWorld = ReadInt16(source, position + 12); + short tilesHigh = ReadInt16(source, position + 14); + short tilesWide = ReadInt16(source, position + 16); + short dungeonX = ReadInt16(source, position + 18); + short dungeonY = ReadInt16(source, position + 20); + short groundLevel = ReadInt16(source, position + 22); + short rockLevel = ReadInt16(source, position + 24); + int spawnOffset = position + 26 + (version >= 58 ? 11 : 9); + if (spawnOffset + 4 > source.Length) + return false; + short spawnX = ReadInt16(source, spawnOffset); + short spawnY = ReadInt16(source, spawnOffset + 2); + + if (tilesWide <= 0 || tilesHigh <= 0 || + rightWorld != tilesWide * 16 || bottomWorld != tilesHigh * 16) + return false; + + // Tutorial v49 intentionally stores zero. Later native saves use the + // standard reflected CRC-32 over every byte after the first eight. + if (storedCrc != 0 && storedCrc != ComputeWinPhoneCrc32(source[8..])) + return false; + + header = new WinPhoneHeader( + version, + storedCrc, + title, + position, + worldId, + rightWorld, + bottomWorld, + tilesHigh, + tilesWide, + dungeonX, + dungeonY, + spawnX, + spawnY, + groundLevel, + rockLevel); + header = header with { CloudFlag = cloudFlag, History = history }; + return true; + } + + private static uint ComputeWinPhoneCrc32(ReadOnlySpan data) + { + uint crc = uint.MaxValue; + foreach (byte value in data) + { + crc ^= value; + for (int bit = 0; bit < 8; bit++) + crc = (crc >> 1) ^ ((crc & 1) != 0 ? 0xEDB88320u : 0u); + } + return ~crc; + } + + private static short ReadInt16(ReadOnlySpan source, int offset) => + (short)(source[offset] | source[offset + 1] << 8); + + private static int ReadInt32(ReadOnlySpan source, int offset) => + source[offset] | + source[offset + 1] << 8 | + source[offset + 2] << 16 | + source[offset + 3] << 24; + + private static uint ReadUInt32(ReadOnlySpan source, int offset) => + unchecked((uint)ReadInt32(source, offset)); + + internal readonly record struct WinPhoneHeader( + uint Version, + uint Crc, + string Title, + int BodyOffset, + int WorldId, + int RightWorld, + short BottomWorld, + short TilesHigh, + short TilesWide, + short DungeonX, + short DungeonY, + short SpawnX, + short SpawnY, + short GroundLevel, + short RockLevel, + byte CloudFlag = 0, + uint[]? History = null); + + internal enum WinPhonePrimitiveKind : byte + { + Byte, + Int16, + Int32, + } + + internal readonly record struct WinPhonePrimitive(WinPhonePrimitiveKind Kind, int Value); +} diff --git a/src/TEdit.Terraria/World.Properties.cs b/src/TEdit.Terraria/World.Properties.cs index 63478a1df..89fbaa858 100644 --- a/src/TEdit.Terraria/World.Properties.cs +++ b/src/TEdit.Terraria/World.Properties.cs @@ -153,8 +153,35 @@ private void UpdateMaxLayerLevels() [property: Category("World")] [Reactive] private bool _isChinese; - [property: Category("World")] - [Reactive] private bool _isConsole; + [property: Category("World")] + [Reactive] private bool _isConsole; + + [property: Category("World")] + [Reactive] private bool _isWinPhone; + + [property: Category("World")] + [Reactive] private bool _winPhoneSupportsWeather; + + [property: Category("World")] + [Reactive] private bool _winPhoneSupportsExtendedProgression; + + internal byte[]? WinPhoneSourceData { get; set; } + internal Chest?[]? WinPhoneChestSlots { get; set; } + internal Sign?[]? WinPhoneSignSlots { get; set; } + internal byte[]? WinPhoneSignTextFlags { get; set; } + internal int WinPhoneDataSectionOffset { get; set; } + internal int WinPhoneParsedLength { get; set; } + internal int WinPhoneTileSectionOffset { get; set; } + internal ushort[]? WinPhoneStoredTileTypes { get; set; } + internal byte[]? WinPhoneTileHeader1 { get; set; } + internal byte[]? WinPhoneTileHeader2 { get; set; } + internal byte[]? WinPhoneTileShape { get; set; } + internal byte[]? WinPhoneLegacyTileFlags { get; set; } + internal ushort[]? WinPhoneTileRunLengths { get; set; } + internal uint WinPhoneStoredCrc { get; set; } + internal byte WinPhoneCloudFlag { get; set; } + internal uint[]? WinPhoneHistory { get; set; } + internal WinPhonePrimitive[]? WinPhoneMetadataPrimitives { get; set; } #endregion diff --git a/src/TEdit.Terraria/World.cs b/src/TEdit.Terraria/World.cs index 10785f215..d7daf8f44 100644 --- a/src/TEdit.Terraria/World.cs +++ b/src/TEdit.Terraria/World.cs @@ -96,9 +96,13 @@ await Task.Run(() => string temp = filename + ".tmp"; using (var fs = new FileStream(temp, FileMode.Create)) { - using (var bw = new BinaryWriter(fs)) - { - if (versionOverride < 0 || world.IsV0 || world.Version == 38) + using (var bw = new BinaryWriter(fs)) + { + if (world.IsWinPhone && versionOverride == 0) + { + SaveWinPhoneVerifiedUnchanged(world, fs); + } + else if (versionOverride < 0 || world.IsV0 || world.Version == 38) { bool addLight = (currentWorldVersion > world.Version); // Check if world is being downgraded. world.Version = (uint)Math.Abs(versionOverride); @@ -195,9 +199,13 @@ public static void Save( string temp = filename + ".tmp"; using (var fs = new FileStream(temp, FileMode.Create)) { - using (var bw = new BinaryWriter(fs)) - { - if (versionOverride < 0 || world.IsV0 || world.Version == 38) + using (var bw = new BinaryWriter(fs)) + { + if (world.IsWinPhone && versionOverride == 0) + { + SaveWinPhoneVerifiedUnchanged(world, fs); + } + else if (versionOverride < 0 || world.IsV0 || world.Version == 38) { bool addLight = (currentWorldVersion > world.Version) ? true : false; // Check if world is being downgraded. world.Version = (uint)Math.Abs(versionOverride); @@ -357,12 +365,19 @@ public static WorldValidationStatus ValidateWorldFile(string filename, IProgress } // reset the stream - b.BaseStream.Position = (long)0; - - progress?.Report(new ProgressChangedEventArgs(0, "Loading File Header...")); - // read section pointers and tile frame data - if (!LoadSectionHeader(b, out _, out _, w)) - throw new TEditFileFormatException("Invalid File Format Section"); + b.BaseStream.Position = (long)0; + + progress?.Report(new ProgressChangedEventArgs(0, "Loading File Header...")); + if (TryLoadWinPhone(b, w, headersOnly: true, progress)) + { + status.LoaderVersion = 3; + } + else + { + // read section pointers and tile frame data + if (!LoadSectionHeader(b, out _, out _, w)) + throw new TEditFileFormatException("Invalid File Format Section"); + } if (w.IsChinese) { @@ -591,9 +606,14 @@ public static (World World, Exception Error) LoadWorld(string filename, bool hea w.IsTModLoader = File.Exists(twldPath); - w.Version = b.ReadUInt32(); - - // only perform this check for v38 and under + w.Version = b.ReadUInt32(); + + bool loadedWinPhone = TryLoadWinPhone(b, w, headersOnly, progress); + + if (!loadedWinPhone) + { + + // only perform this check for v38 and under if (w.Version <= 38) { // save the stream position @@ -617,10 +637,11 @@ public static (World World, Exception Error) LoadWorld(string filename, bool hea { LoadV0(b, filename, w, headersOnly, progress); } - else - { - LoadV1(b, filename, w, headersOnly, progress); - } + else + { + LoadV1(b, filename, w, headersOnly, progress); + } + } } } w.LastSave = File.GetLastWriteTimeUtc(filename); diff --git a/src/TEdit.Tests/Terraria/WinPhoneWorldTests.cs b/src/TEdit.Tests/Terraria/WinPhoneWorldTests.cs new file mode 100644 index 000000000..e2407cf82 --- /dev/null +++ b/src/TEdit.Tests/Terraria/WinPhoneWorldTests.cs @@ -0,0 +1,473 @@ +using System; +using System.IO; +using System.Linq; +using Xunit; + +namespace TEdit.Terraria.Tests; + +public class WinPhoneWorldTests +{ + private const string V60FixturePath = ".\\WorldFiles\\win-phone.world"; + + private static readonly string[] V49FixtureCandidates = + [ + Path.GetFullPath(Path.Combine( + AppContext.BaseDirectory, + "..", "..", "..", "..", "..", "..", + "_reference_sources", "winphone", "Terraria v1.0.0.0", "Tutorial.world")), + Path.GetFullPath(Path.Combine( + AppContext.BaseDirectory, + "..", "..", "..", "..", "..", "..", + "_reference_sources", "winphone", "Terraria v1.2.4.3", "Tutorial.world")), + Path.GetFullPath(Path.Combine( + Environment.CurrentDirectory, + "..", "_reference_sources", "winphone", "Terraria v1.2.4.3", "Tutorial.world")), + ]; + + [Fact] + public void LoadWorld_WinPhoneV60_ReadsNativeHeader() + { + Assert.True(File.Exists(V60FixturePath), $"Missing fixture: {V60FixturePath}"); + + var (world, error) = World.LoadWorld(V60FixturePath); + + Assert.Null(error); + Assert.True(world.IsWinPhone); + Assert.Equal((uint)60, world.Version); + Assert.Equal("ZSRR", world.Title); + Assert.Equal(1750, world.TilesWide); + Assert.Equal(1000, world.TilesHigh); + Assert.Equal(250, world.SpawnX); + Assert.Equal(267, world.SpawnY); + Assert.Equal(876, world.DungeonX); + Assert.Equal(298, world.DungeonY); + Assert.Equal(1_750_000, world.Tiles.Length); + Assert.True(ContainsActiveTile(world)); + } + + [Fact] + public void LoadSave_WinPhoneV60_IsByteIdentical() + { + AssertLosslessRoundTrip(V60FixturePath, expectedVersion: 60, expectedTitle: "ZSRR", fullLoad: true); + } + + [Fact] + public void LoadSave_WinPhoneV49Tutorial_IsByteIdentical() + { + string[] fixtures = Array.FindAll(V49FixtureCandidates, File.Exists); + Assert.Equal(2, fixtures.Length); + foreach (string fixture in fixtures) + AssertLosslessRoundTrip(fixture, expectedVersion: 49, expectedTitle: "Tutorial", fullLoad: true); + } + + [Fact] + public void ValidateWorldFile_WinPhoneV60_IsValidNativeContainer() + { + var status = World.ValidateWorldFile(V60FixturePath); + + Assert.Equal((uint)60, status.Version); + Assert.True(status.IsLegacy); + Assert.True(status.IsValid, status.Message); + Assert.False(status.IsConsole); + Assert.False(status.IsChinese); + Assert.Equal(3, status.LoaderVersion); + } + + [Fact] + public void Save_WinPhoneEditedTile_ReloadsChange() + { + string[] fixtures = [V60FixturePath, Array.Find(V49FixtureCandidates, File.Exists)!]; + Assert.DoesNotContain(fixtures, string.IsNullOrEmpty); + foreach (string fixture in fixtures) + { + var (world, error) = World.LoadWorld(fixture); + Assert.Null(error); + + bool expectedWire = !world.Tiles[0, 0].WireRed; + world.Tiles[0, 0].WireRed = expectedWire; + string savedPath = Path.Combine(Path.GetTempPath(), $"tedit-winphone-edited-{Guid.NewGuid():N}.world"); + try + { + World.Save(world, savedPath); + var (reloaded, reloadError) = World.LoadWorld(savedPath); + + Assert.Null(reloadError); + Assert.Equal(expectedWire, reloaded.Tiles[0, 0].WireRed); + Assert.True(World.ValidateWorldFile(savedPath).IsValid); + } + finally + { + File.Delete(savedPath); + File.Delete(savedPath + ".tmp"); + } + } + } + + [Fact] + public void Save_WinPhoneEditedSections_ReloadChanges() + { + var (world, error) = World.LoadWorld(V60FixturePath); + Assert.Null(error); + Assert.NotEmpty(world.Chests); + Assert.NotEmpty(world.Signs); + Assert.NotEmpty(world.NPCs); + Assert.NotEmpty(world.CharacterNames); + + Chest chest = world.Chests[0]; + int itemIndex = 0; + while (itemIndex < chest.MaxItems && chest.Items[itemIndex].NetId == 0) + itemIndex++; + Assert.True(itemIndex < chest.MaxItems); + + int expectedStack = chest.Items[itemIndex].StackSize + 1; + string expectedSign = world.Signs[0].Text + " edited"; + bool expectedHomeless = !world.NPCs[0].IsHomeless; + string expectedName = world.CharacterNames[0].Name + " Jr."; + chest.Items[itemIndex].StackSize = expectedStack; + world.Signs[0].Text = expectedSign; + world.NPCs[0].IsHomeless = expectedHomeless; + world.CharacterNames[0].Name = expectedName; + + string savedPath = Path.Combine(Path.GetTempPath(), $"tedit-winphone-sign-{Guid.NewGuid():N}.world"); + try + { + World.Save(world, savedPath); + var (reloaded, reloadError) = World.LoadWorld(savedPath); + + Assert.Null(reloadError); + Assert.Equal(expectedStack, reloaded.Chests[0].Items[itemIndex].StackSize); + Assert.Equal(expectedSign, reloaded.Signs[0].Text); + Assert.Equal(expectedHomeless, reloaded.NPCs[0].IsHomeless); + Assert.Equal(expectedName, reloaded.CharacterNames[0].Name); + } + finally + { + File.Delete(savedPath); + File.Delete(savedPath + ".tmp"); + } + } + + [Fact] + public void Save_WinPhoneEditableMetadata_ReloadsChanges() + { + string[] fixtures = [V60FixturePath, Array.Find(V49FixtureCandidates, File.Exists)!]; + Assert.DoesNotContain(fixtures, string.IsNullOrEmpty); + + foreach (string fixture in fixtures) + { + var (world, error) = World.LoadWorld(fixture); + Assert.Null(error); + + string expectedTitle = world.Title + " Edit"; + int expectedWorldId = world.WorldId + 1; + int expectedDungeonX = world.DungeonX - 1; + int expectedDungeonY = world.DungeonY - 1; + int expectedSpawnX = world.SpawnX + 1; + int expectedSpawnY = world.SpawnY + 1; + double expectedGround = world.GroundLevel + 1; + double expectedRock = world.RockLevel + 1; + double expectedTime = world.Time + 1; + bool expectedDayTime = !world.DayTime; + int expectedMoonPhase = (world.MoonPhase + 1) % 8; + bool expectedBloodMoon = !world.BloodMoon; + bool expectedCrimson = !world.IsCrimson; + bool expectedRaining = !world.IsRaining; + int expectedRainTime = world.TempRainTime + 60; + float expectedMaxRain = world.TempMaxRain == 0.5f ? 0.25f : 0.5f; + + world.Title = expectedTitle; + world.WorldId = expectedWorldId; + world.DungeonX = expectedDungeonX; + world.DungeonY = expectedDungeonY; + world.SpawnX = expectedSpawnX; + world.SpawnY = expectedSpawnY; + world.GroundLevel = expectedGround; + world.RockLevel = expectedRock; + world.Time = expectedTime; + world.DayTime = expectedDayTime; + world.MoonPhase = expectedMoonPhase; + world.BloodMoon = expectedBloodMoon; + if (world.Version >= 58) + { + world.IsCrimson = expectedCrimson; + world.IsRaining = expectedRaining; + world.TempRainTime = expectedRainTime; + world.TempMaxRain = expectedMaxRain; + } + + string savedPath = Path.Combine( + Path.GetTempPath(), $"tedit-winphone-metadata-{Guid.NewGuid():N}.world"); + try + { + World.Save(world, savedPath); + var (reloaded, reloadError) = World.LoadWorld(savedPath); + + Assert.Null(reloadError); + Assert.True(reloaded.IsWinPhone); + Assert.Equal(expectedTitle, reloaded.Title); + Assert.Equal(expectedWorldId, reloaded.WorldId); + Assert.Equal(expectedDungeonX, reloaded.DungeonX); + Assert.Equal(expectedDungeonY, reloaded.DungeonY); + Assert.Equal(expectedSpawnX, reloaded.SpawnX); + Assert.Equal(expectedSpawnY, reloaded.SpawnY); + Assert.Equal(expectedGround, reloaded.GroundLevel); + Assert.Equal(expectedRock, reloaded.RockLevel); + Assert.Equal(expectedTime, reloaded.Time); + Assert.Equal(expectedDayTime, reloaded.DayTime); + Assert.Equal(expectedMoonPhase, reloaded.MoonPhase); + Assert.Equal(expectedBloodMoon, reloaded.BloodMoon); + if (world.Version >= 58) + { + Assert.Equal(expectedCrimson, reloaded.IsCrimson); + Assert.Equal(expectedRaining, reloaded.IsRaining); + Assert.Equal(expectedRainTime, reloaded.TempRainTime); + Assert.Equal(expectedMaxRain, reloaded.TempMaxRain); + } + Assert.True(World.ValidateWorldFile(savedPath).IsValid); + } + finally + { + File.Delete(savedPath); + File.Delete(savedPath + ".tmp"); + } + } + } + + [Fact] + public void Save_WinPhoneProgressionAndWorldState_ReloadsChanges() + { + string[] fixtures = [V60FixturePath, Array.Find(V49FixtureCandidates, File.Exists)!]; + Assert.DoesNotContain(fixtures, string.IsNullOrEmpty); + + foreach (string fixture in fixtures) + { + var (world, error) = World.LoadWorld(fixture); + Assert.Null(error); + + world.DownedBoss1EyeofCthulhu = !world.DownedBoss1EyeofCthulhu; + world.DownedBoss2EaterofWorlds = !world.DownedBoss2EaterofWorlds; + world.DownedBoss3Skeletron = !world.DownedBoss3Skeletron; + world.SavedGoblin = !world.SavedGoblin; + world.SavedWizard = !world.SavedWizard; + world.SavedMech = !world.SavedMech; + world.DownedGoblins = !world.DownedGoblins; + world.DownedClown = !world.DownedClown; + world.DownedFrost = !world.DownedFrost; + world.ShadowOrbCount = world.ShadowOrbCount == 2 ? 1 : 2; + world.ShadowOrbSmashed = true; + world.SpawnMeteor = !world.SpawnMeteor; + world.AltarCount += 1; + world.HardMode = !world.HardMode; + world.InvasionDelay = world.InvasionDelay == 6 ? 5 : 6; + world.InvasionSize = world.InvasionSize == 123 ? 122 : 123; + world.InvasionType = world.InvasionType == 3 ? 1 : 3; + world.InvasionX = 321; + + if (world.Version >= 58) + { + world.DownedQueenBee = !world.DownedQueenBee; + world.DownedMechBoss1TheDestroyer = !world.DownedMechBoss1TheDestroyer; + world.DownedMechBoss2TheTwins = !world.DownedMechBoss2TheTwins; + world.DownedMechBoss3SkeletronPrime = !world.DownedMechBoss3SkeletronPrime; + world.DownedPlantBoss = !world.DownedPlantBoss; + world.DownedGolemBoss = !world.DownedGolemBoss; + world.DownedPirates = !world.DownedPirates; + world.SavedOreTiersCobalt = world.SavedOreTiersCobalt == 107 ? 221 : 107; + world.SavedOreTiersMythril = world.SavedOreTiersMythril == 108 ? 222 : 108; + world.SavedOreTiersAdamantite = world.SavedOreTiersAdamantite == 111 ? 223 : 111; + } + + string savedPath = Path.Combine( + Path.GetTempPath(), $"tedit-winphone-state-{Guid.NewGuid():N}.world"); + try + { + World.Save(world, savedPath); + var (reloaded, reloadError) = World.LoadWorld(savedPath); + + Assert.Null(reloadError); + Assert.Equal(world.DownedBoss1EyeofCthulhu, reloaded.DownedBoss1EyeofCthulhu); + Assert.Equal(world.DownedBoss2EaterofWorlds, reloaded.DownedBoss2EaterofWorlds); + Assert.Equal(world.DownedBoss3Skeletron, reloaded.DownedBoss3Skeletron); + Assert.Equal(world.SavedGoblin, reloaded.SavedGoblin); + Assert.Equal(world.SavedWizard, reloaded.SavedWizard); + Assert.Equal(world.SavedMech, reloaded.SavedMech); + Assert.Equal(world.DownedGoblins, reloaded.DownedGoblins); + Assert.Equal(world.DownedClown, reloaded.DownedClown); + Assert.Equal(world.DownedFrost, reloaded.DownedFrost); + Assert.True(reloaded.ShadowOrbSmashed); + Assert.Equal(world.ShadowOrbCount, reloaded.ShadowOrbCount); + Assert.Equal(world.SpawnMeteor, reloaded.SpawnMeteor); + Assert.Equal(world.AltarCount, reloaded.AltarCount); + Assert.Equal(world.HardMode, reloaded.HardMode); + Assert.Equal(world.InvasionDelay, reloaded.InvasionDelay); + Assert.Equal(world.InvasionSize, reloaded.InvasionSize); + Assert.Equal(world.InvasionType, reloaded.InvasionType); + Assert.Equal(world.InvasionX, reloaded.InvasionX); + + if (world.Version >= 58) + { + Assert.Equal(world.DownedQueenBee, reloaded.DownedQueenBee); + Assert.Equal(world.DownedMechBoss1TheDestroyer, reloaded.DownedMechBoss1TheDestroyer); + Assert.Equal(world.DownedMechBoss2TheTwins, reloaded.DownedMechBoss2TheTwins); + Assert.Equal(world.DownedMechBoss3SkeletronPrime, reloaded.DownedMechBoss3SkeletronPrime); + Assert.Equal(world.DownedPlantBoss, reloaded.DownedPlantBoss); + Assert.Equal(world.DownedGolemBoss, reloaded.DownedGolemBoss); + Assert.Equal(world.DownedPirates, reloaded.DownedPirates); + Assert.Equal(world.SavedOreTiersCobalt, reloaded.SavedOreTiersCobalt); + Assert.Equal(world.SavedOreTiersMythril, reloaded.SavedOreTiersMythril); + Assert.Equal(world.SavedOreTiersAdamantite, reloaded.SavedOreTiersAdamantite); + } + Assert.True(World.ValidateWorldFile(savedPath).IsValid); + } + finally + { + File.Delete(savedPath); + File.Delete(savedPath + ".tmp"); + } + } + } + + [Fact] + public void Save_WinPhoneSparseSections_AddAndRemoveEntries() + { + string[] fixtures = [V60FixturePath, Array.Find(V49FixtureCandidates, File.Exists)!]; + Assert.DoesNotContain(fixtures, string.IsNullOrEmpty); + + foreach (string fixture in fixtures) + { + var (world, error) = World.LoadWorld(fixture); + Assert.Null(error); + Assert.NotEmpty(world.Chests); + Assert.NotEmpty(world.NPCs); + + Chest removedChest = world.Chests[0]; + world.Chests.RemoveAt(0); + int addedChestX = 12; + int addedChestY = 34; + while ((removedChest.X == addedChestX && removedChest.Y == addedChestY) || + world.Chests.Any(chest => chest.X == addedChestX && chest.Y == addedChestY)) + addedChestX++; + Chest addedChest = new(addedChestX, addedChestY) { MaxItems = world.Version < 58 ? 20 : 40 }; + addedChest.Items[0] = new Item(2, 1, 0); + world.Chests.Add(addedChest); + + if (world.Signs.Count > 0) + world.Signs.RemoveAt(0); + world.Signs.Add(new Sign(14, 36, "Windows Phone sign")); + + world.NPCs.RemoveAt(0); + world.NPCs.Add(new NPC + { + SpriteId = 17, + Position = new Vector2FloatObservable(160, 320), + IsHomeless = false, + Home = new Vector2Int32Observable(10, 20), + }); + + string savedPath = Path.Combine( + Path.GetTempPath(), $"tedit-winphone-sections-{Guid.NewGuid():N}.world"); + try + { + World.Save(world, savedPath); + var (reloaded, reloadError) = World.LoadWorld(savedPath); + + Assert.Null(reloadError); + Assert.DoesNotContain(reloaded.Chests, chest => + chest.X == removedChest.X && chest.Y == removedChest.Y); + Chest reloadedChest = Assert.Single(reloaded.Chests, chest => + chest.X == addedChest.X && chest.Y == addedChest.Y); + Assert.Equal(2, reloadedChest.Items[0].StackSize); + Assert.Contains(reloaded.Signs, sign => + sign.X == 14 && sign.Y == 36 && sign.Text == "Windows Phone sign"); + Assert.Contains(reloaded.NPCs, npc => + npc.SpriteId == 17 && npc.Home.X == 10 && npc.Home.Y == 20); + } + finally + { + File.Delete(savedPath); + File.Delete(savedPath + ".tmp"); + } + } + } + + [Fact] + public void Reconstruct_WinPhoneDecodedSections_DoesNotCopyCachedSectionBytes() + { + string[] fixtures = [V60FixturePath, .. Array.FindAll(V49FixtureCandidates, File.Exists)]; + Assert.Equal(3, fixtures.Length); + + foreach (string fixture in fixtures) + { + byte[] expected = File.ReadAllBytes(fixture); + var (world, error) = World.LoadWorld(fixture); + Assert.Null(error); + + Array.Fill( + world.WinPhoneSourceData!, + (byte)0xA5, + 0, + world.WinPhoneParsedLength); + + using MemoryStream output = new(expected.Length); + World.SaveWinPhoneReconstructed(world, output); + Assert.Equal(expected, output.ToArray()); + } + } + + private static void AssertLosslessRoundTrip( + string fixture, + uint expectedVersion, + string expectedTitle, + bool fullLoad) + { + byte[] expected = File.ReadAllBytes(fixture); + var (world, error) = World.LoadWorld(fixture, headersOnly: !fullLoad); + + Assert.Null(error); + Assert.True(world.IsWinPhone); + Assert.Equal(expectedVersion, world.Version); + Assert.Equal(expectedTitle, world.Title); + + if (fullLoad) + { + Assert.NotEmpty(world.Chests); + if (expectedVersion < 50) + Assert.Empty(world.Signs); + else + Assert.NotEmpty(world.Signs); + Assert.Equal(expectedVersion < 50 ? 2 : 1, world.NPCs.Count); + Assert.Equal(expectedVersion < 50 ? 10 : 18, world.CharacterNames.Count); + Assert.Equal(expectedVersion < 50 ? 35 : 79, world.WinPhoneMetadataPrimitives!.Length); + Assert.Equal(expectedVersion < 50 ? 201_842 : expected.Length, world.WinPhoneParsedLength); + } + + using var output = new MemoryStream(expected.Length); + World.SaveWinPhoneUnchanged(world, output); + + Assert.Equal(expected, output.ToArray()); + + if (fullLoad) + { + string savedPath = Path.Combine(Path.GetTempPath(), $"tedit-winphone-{Guid.NewGuid():N}.world"); + try + { + World.Save(world, savedPath); + Assert.Equal(expected, File.ReadAllBytes(savedPath)); + } + finally + { + File.Delete(savedPath); + File.Delete(savedPath + ".tmp"); + } + } + } + + private static bool ContainsActiveTile(World world) + { + for (int x = 0; x < world.TilesWide; x++) + for (int y = 0; y < world.TilesHigh; y++) + if (world.Tiles[x, y].IsActive) + return true; + return false; + } +} diff --git a/src/TEdit.Tests/WorldFiles/win-phone.world b/src/TEdit.Tests/WorldFiles/win-phone.world new file mode 100644 index 000000000..1aa48ae5d Binary files /dev/null and b/src/TEdit.Tests/WorldFiles/win-phone.world differ diff --git a/src/TEdit/View/Sidebar/WorldPropertiesView.xaml b/src/TEdit/View/Sidebar/WorldPropertiesView.xaml index ec08795f1..827469615 100644 --- a/src/TEdit/View/Sidebar/WorldPropertiesView.xaml +++ b/src/TEdit/View/Sidebar/WorldPropertiesView.xaml @@ -367,11 +367,174 @@ - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +