diff --git a/.gitignore b/.gitignore index ba44868..581082f 100755 --- a/.gitignore +++ b/.gitignore @@ -23,4 +23,6 @@ etc/sldl-macos.yaml __pycache__/ *.py[cod] -.venv/ \ No newline at end of file +.venv/ +maple-py/captures +maple-py/node_modules diff --git a/.mcp.json b/.mcp.json new file mode 100644 index 0000000..583bf40 --- /dev/null +++ b/.mcp.json @@ -0,0 +1,14 @@ +{ + "mcpServers": { + "ghidra": { + "command": "uv", + "args": [ + "run", + "--script", + "/mnt/c/Users/ntr/Downloads/GhidraMCP-release-1-4/GhidraMCP-release-1-4/bridge_mcp_ghidra.py", + "--ghidra-server", + "http://127.0.0.1:8080/" + ] + } + } +} diff --git a/justfile b/justfile index b83e1ac..634c200 100644 --- a/justfile +++ b/justfile @@ -46,6 +46,14 @@ usb-reset dst="/Volumes/MAPLE": COPYFILE_DISABLE=1 rsync -rtvh --no-perms --no-owner --no-group --modify-window=2 maple-py/data/MAPLE/Contents/ {{dst}}/Contents/ COPYFILE_DISABLE=1 rsync -rtvh --no-perms --no-owner --no-group --modify-window=2 maple-py/data/MAPLE/PIONEER/ {{dst}}/PIONEER/ +# Build the maple AceMo export.pdb and sync it onto the Windows USB (drive F: by +# default) over rekordbox's export.pdb, so it can be tested on the player against +# the audio/USBANLZ already on the stick. Runs from WSL via powershell.exe. +usb-win dst="/mnt/f": + cd maple-py && uv run python tools/build_acemo.py + @test -d {{dst}}/PIONEER/rekordbox || (echo "no {{dst}}/PIONEER/rekordbox - is the USB mounted at {{dst}}?"; exit 1) + rsync -tvh --no-perms --no-owner --no-group maple-py/captures/maple_acemo.pdb {{dst}}/PIONEER/rekordbox/export.pdb + maple-setup: bash ./etc/maple_setup.sh diff --git a/maple-py/README.md b/maple-py/README.md index e69de29..0ff7d75 100644 --- a/maple-py/README.md +++ b/maple-py/README.md @@ -0,0 +1,112 @@ +# maple-py — rekordbox `export.pdb` writer + reverse-engineering notes + +Python tooling to generate a rekordbox USB export (`PIONEER/rekordbox/export.pdb` ++ `exportExt.pdb` + `USBANLZ` analysis files) so a CDJ/XDJ can read a +self-assembled music library. The writer lives in `src/maple/pdb/`. + +This README also documents what we learned reverse-engineering rekordbox's own +exporter, because the on-disk format has real unknowns / magic numbers that the +public kaitai schema (`src/kaitai/rekordbox_pdb.py`) only partially decodes. + +## The format, briefly + +`export.pdb` is a **DeviceSQL** database: a flat file of 4096-byte **pages**, +grouped into 20 **tables** (tracks, artists, albums, playlists, artwork, +colors, columns, history, and several still-unknown ones). Page 0 is the file +header + table directory; each table is a linked list of pages. See +`src/maple/pdb/{writer,pager,rows,strings}.py`. + +## Reverse-engineering findings (rekordbox 7.0.5, Windows) + +### Where the export code lives +- The exporter is in **`rekordbox.exe`** (the 89 MB main binary), **not** + `rekordboxAgent.exe`. Confirmed by string scan: only `rekordbox.exe` contains + `USBANLZ`, `PIONEER`, `djmd…` table names, `.pdb`. It's a JUCE C++ app. +- `export.pdb` is written by rekordbox's **bundled DeviceSQL "Page Manager"** + engine — functions prefixed `dsql*` / `edb_dyn_*` (error strings: + `dsqlOpenDeviceDB`, `edb_dyn_CriticalSectionOn ERROR`, + `Page Manager (Close/)Open returns ERROR`). +- **Key consequence:** the page-level "magic numbers" maple guesses + (page flags `0x64`/`0x44`, `0x1fff` markers, `0x3ec`, free/used sizes) are + **DeviceSQL internals**, not rekordbox-specific. They are NOT immediate + constants in the code — they're produced by the page-manager logic, so they + must be read out of the `dsql*`/`edb_dyn_*` functions, not grep'd. + +### A rekordbox USB export writes three databases +| file | format | writer | +|------|--------|--------| +| `export.pdb` | DeviceSQL (CDJ reads this) | DeviceSQL Page Manager | +| `exportExt.pdb` | DeviceSQL extended | same | +| `exportLibrary.db` | **SQLite** (rekordbox's own) | bundled `sqlite3_*` | +| `USBANLZ/**/ANLZ*.DAT/.EXT/.2EX` | per-track waveform/beatgrid | main app | + +### `export.pdb` serializer call stack (live `WriteFile` backtrace → Ghidra) +Ghidra static address = `0x140000000 + module_offset` (Ghidra image base is +`0x140000000`; the ASLR runtime base varies per launch — never hardcode it, +read `module+offset` from Frida). + +``` +0x1420e8804 calls WriteFile ─┐ +0x1420d7358 │ DeviceSQL write plumbing +0x1420d6e74 │ (transactions, page I/O) +0x1420d62a4 │ +0x1420eac94 │ +0x1420e07d8 │ +0x1420de140 ─┘ +FUN_141d75c20 ← dsqlOpenDeviceDB / Page Manager (export.pdb-specific) +0x141cad100 +0x141cac390 +0x141b8b4c0 +0x141aca850 +0x1423c9ab0 ← outer export driver +``` +Other anchors found by string xref: `FUN_14119d2d0` (export orchestrator, +builds `/PIONEER/rekordbox/export.pdb`, walks "Contents"), `FUN_140f37e50` +(builds `PIONEER`/`USBANLZ` paths). + +### Gotchas +- **Incremental writes:** rekordbox rewrites only the *changed* pages (seeked + `WriteFile`s), so a Frida capture is partial. The complete file is on the USB + (`F:\PIONEER\rekordbox\export.pdb`) — copy it from there for a full diff. +- **CIG / injection:** `rekordboxAgent.exe` refuses live Frida injection + (Code Integrity Guard). The pdb writer (main `rekordbox.exe`) is hookable, but + only via **child-gating at spawn** — Windows has **no spawn-gating**. + +## Tooling + +### Static analysis (Ghidra, headless, in WSL) +- JDK 21 (`~/jdk/jdk-21.0.11+10`), Ghidra 12.1.2. Ghidra rejects JDK 25 — use 21. +- Analyzed project: `~/ghidra_proj` (project `rbx`, program `rekordbox.exe`). + Full analysis ≈ 1 h with `GHIDRA_HEADLESS_MAXMEM=10G -max-cpu 8`. +- Re-run a script without re-analyzing: + ```bash + "$GHIDRA/support/analyzeHeadless" ~/ghidra_proj rbx -process rekordbox.exe \ + -noanalysis -scriptPath ~/ghidra_scripts -postScript FindPdb.java + ``` + Scripts: `~/ghidra_scripts/FindPdb.java` (string+constant xref search), + `DecPdb.java` (decompile an address list), `CallTree.java` (call-tree drill). + +### Dynamic capture (Frida, on Windows) +- `tools/rbx_pdb_capture.js` — Frida agent. Hooks `NtCreateFile`/`NtWriteFile`/ + `NtClose` + `NtCreateSection`/`NtMapViewOfSection` (memory-mapped writes). + Reconstructs files under `PIONEER`/`*.pdb` to `captures/`, prints each write's + backtrace as `rekordbox.exe+0xOFFSET` (→ Ghidra `0x140000000 + offset`). +- `tools/capture.mjs` — Node host (`npm i frida`). Attaches to all rekordbox + processes, streams `[pid]`-tagged output live, stays alive, **child-gates** so + the spawn writer is hooked at birth. Clears `captures/` on start. + ```powershell + npm i frida # once + node tools\capture.mjs --spawn # launch rekordbox under the gate, then Export to USB + ``` + +## Diffing maple's output vs rekordbox +`compare_pdb.py` parses two pdbs with the kaitai schema and summarises tables/ +rows. Reference real exports: `data/PIONEER/rekordbox/export.pdb`, +`data/acemo/PIONEER/rekordbox/export.pdb`. + +## Status / next steps +- Writer fully located; capture + diff pipeline works. +- To decode a specific page magic number: search the `dsql*`/`edb_dyn_*` + functions (image region `0x142000000+`) for the page-header builder. +- To fix a rejected export: diff a complete USB `export.pdb` against maple's + output field-by-field; resolve any wrong value via the matching `dsql` function. diff --git a/maple-py/package-lock.json b/maple-py/package-lock.json new file mode 100755 index 0000000..fbcd22d --- /dev/null +++ b/maple-py/package-lock.json @@ -0,0 +1,501 @@ +{ + "name": "maple-py", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "frida": "^17.11.0" + } + }, + "node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "license": "MIT", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/brace-expansion": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz", + "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==", + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "license": "ISC" + }, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "license": "MIT", + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", + "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "license": "(MIT OR WTFPL)", + "engines": { + "node": ">=6" + } + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "license": "MIT" + }, + "node_modules/frida": { + "version": "17.11.0", + "resolved": "https://registry.npmjs.org/frida/-/frida-17.11.0.tgz", + "integrity": "sha512-ZymNV1mr8lWMP2vo1Ed4D7w1/8VQRVeoZ439sCZN/vKjj/E0UhfQP4BYsRAUrCQZ4nBzfRNN4BouA+WvOZ1z5w==", + "hasInstallScript": true, + "license": "LGPL-2.0 WITH WxWindows-exception-3.1", + "dependencies": { + "bindings": "^1.5.0", + "minimatch": "^10.0.1", + "prebuild-install": "^7.1.3" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "license": "MIT" + }, + "node_modules/github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", + "license": "MIT" + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "license": "ISC" + }, + "node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimatch": { + "version": "10.2.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", + "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.5" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "license": "MIT" + }, + "node_modules/napi-build-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-2.0.0.tgz", + "integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==", + "license": "MIT" + }, + "node_modules/node-abi": { + "version": "3.92.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.92.0.tgz", + "integrity": "sha512-KdHvFWZjEKDf0cakgFjebl371GPsISX2oZHcuyKqM7DtogIsHrqKeLTo8wBHxaXRAQlY2PsPlZmfo+9ZCxEREQ==", + "license": "MIT", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/prebuild-install": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz", + "integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==", + "deprecated": "No longer maintained. Please contact the author of the relevant native addon; alternatives are available.", + "license": "MIT", + "dependencies": { + "detect-libc": "^2.0.0", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^2.0.0", + "node-abi": "^3.3.0", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^4.0.0", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0" + }, + "bin": { + "prebuild-install": "bin.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/pump": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.4.tgz", + "integrity": "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==", + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.2.tgz", + "integrity": "sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/simple-get": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tar-fs": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.4.tgz", + "integrity": "sha512-mDAjwmZdh7LTT6pNleZ05Yt65HC3E+NiQzl672vQG38jIrehtJk/J3mNwIg+vShQPcLF/LV7CMnDW6vjj6sfYQ==", + "license": "MIT", + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "license": "MIT", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "license": "Apache-2.0", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "license": "ISC" + } + } +} diff --git a/maple-py/package.json b/maple-py/package.json new file mode 100755 index 0000000..db05033 --- /dev/null +++ b/maple-py/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "frida": "^17.11.0" + } +} diff --git a/maple-py/re/README.md b/maple-py/re/README.md new file mode 100644 index 0000000..381d092 --- /dev/null +++ b/maple-py/re/README.md @@ -0,0 +1,54 @@ +# re/ — rekordbox `export.pdb` reverse-engineering + +Shared record of the Ghidra/Frida work behind maple's pdb writer. See the +top-level `README.md` for the high-level findings; this dir holds the raw +artifacts so others can reproduce and extend the analysis. + +## What's here + +`scripts/` — Ghidra headless scripts (run against an analyzed `rekordbox.exe`): +- `FindPdb.java` — locate the writer via string + magic-constant xrefs +- `DecPdb.java` — decompile an explicit list of addresses +- `CallTree.java` — walk a call tree, flag file-I/O / 4096-using functions +- `FindHash.java` — hunt the per-track hash: decompile `formatForSearch` + callers + content-string xrefs + +`findings/` — script output (decompiled C + xref maps): +- `findpdb.txt` — string xrefs → the export functions; magic-constant hit counts +- `decpdb.txt` — decompiled `export.pdb` serializer call stack (DeviceSQL Page Manager) +- `calltree.txt` — call tree under the export orchestrator `FUN_14119d2d0` +- `hash.txt` — `formatForSearch` + callers + `djmdContent`/`ContentID` xrefs + +## Reproduce (not committed: the binary + Ghidra project) + +`rekordbox.exe` and the analyzed Ghidra project are **not** in the repo +(copyright + size). To rebuild from your own rekordbox install (Windows path +visible from WSL): + +```bash +export JAVA_HOME=~/jdk/jdk-21.0.11+10 # Ghidra needs JDK 21 +GH=/path/to/ghidra_12.1.2_PUBLIC +# one-time: import + analyze (~1h, 10G heap, 8 cores) +GHIDRA_HEADLESS_MAXMEM=10G "$GH/support/analyzeHeadless" ~/ghidra_proj rbx \ + -import "/mnt/c/Program Files/rekordbox/rekordbox 7.0.5/rekordbox.exe" \ + -overwrite -max-cpu 8 -analysisTimeoutPerFile 7200 +# then run any script without re-analyzing: +"$GH/support/analyzeHeadless" ~/ghidra_proj rbx -process rekordbox.exe -noanalysis \ + -scriptPath re/scripts -postScript FindPdb.java +``` + +Runtime→Ghidra address map: `static = 0x140000000 + module_offset` (Ghidra image +base `0x140000000`; ASLR runtime base varies — read `rekordbox.exe+0xOFFSET` from +the Frida agent, never hardcode it). + +## Live capture (Frida, Windows) + +`../tools/capture.mjs` (Node, `npm i frida`) + `../tools/rbx_pdb_capture.js` +(agent). Child-gates so the CIG-protected writer is hooked at spawn: +`node tools/capture.mjs --spawn`. + +## Open questions + +- per-track `0x14` (28-bit) — varies per track, not a plain crc32; likely a + stored `djmdContent` value. `0x18`/`0x1a` are a per-export constant. +- `index_shift` (row `0x02`) — positional (`~0x20`/row, resets per page) but the + exact formula isn't pinned. maple writes `0`; rekordbox doesn't. diff --git a/maple-py/re/findings/calltree.txt b/maple-py/re/findings/calltree.txt new file mode 100644 index 0000000..af77812 --- /dev/null +++ b/maple-py/re/findings/calltree.txt @@ -0,0 +1,1130 @@ +call tree from FUN_14119d2d0 depth<=4: 559 funcs + +d0 14119d2d0 size=3105 FUN_14119d2d0 +d1 1410784c0 size=4 FUN_1410784c0 +d1 141010690 size=223 FUN_141010690 +d1 141185c80 size=148 FUN_141185c80 +d1 1419757b0 size=223 FUN_1419757b0 +d1 14169e940 size=175 FUN_14169e940 +d1 1423d5b30 size=165 FUN_1423d5b30 +d1 1419a2070 size=123 FUN_1419a2070 +d1 1410784d0 size=4 FUN_1410784d0 +d1 1419ab640 size=223 FUN_1419ab640 +d1 141078fa0 size=24 FUN_141078fa0 +d1 14117fea0 size=382 FUN_14117fea0 +d1 1423d4ab0 size=75 FUN_1423d4ab0 +d1 14217c514 size=5 thunk_FUN_14217cc5c +d1 1423d3360 size=105 FUN_1423d3360 +d1 141078be0 size=8 FUN_141078be0 +d1 141078550 size=30 FUN_141078550 +d1 1410791a0 size=8 FUN_1410791a0 +d1 1423aa4d0 size=7 EnterCriticalSection +d1 1423d59e0 size=14 FUN_1423d59e0 +d1 1411863e0 size=58 FUN_1411863e0 +d1 141078b80 size=8 FUN_141078b80 +d1 1423eb810 size=29 FUN_1423eb810 +d1 1410786b0 size=4 FUN_1410786b0 +d1 141078ba0 size=8 FUN_141078ba0 +d1 14217c610 size=30 __security_check_cookie +d1 141078500 size=4 FUN_141078500 +d1 1411a4a50 size=122 FUN_1411a4a50 +d1 14119b160 size=264 FUN_14119b160 +d1 141078520 size=4 FUN_141078520 +d1 1412282b0 size=4 FUN_1412282b0 +d1 1419a4650 size=198 FUN_1419a4650 +d1 14117fd30 size=355 _Sort_unchecked_> +d1 1411a5760 size=40 FUN_1411a5760 +d1 141079400 size=24 FUN_141079400 +d1 1419718d0 size=57 FUN_1419718d0 +d1 141078bc0 size=8 FUN_141078bc0 +d1 1410784e0 size=4 FUN_1410784e0 +d1 14217c644 size=58 FUN_14217c644 +d1 141078bf0 size=22 FUN_141078bf0 +d1 1416b60f0 size=232 FUN_1416b60f0 +d1 141079220 size=18 FUN_141079220 +d1 141184c40 size=544 FUN_141184c40 +d1 1423aa4a0 size=7 LeaveCriticalSection +d1 1423eb730 size=20 FUN_1423eb730 +d1 141078bd0 size=8 FUN_141078bd0 +d1 141078c80 size=8 FUN_141078c80 +d1 141078cd0 size=8 FUN_141078cd0 +d1 1423eb8a0 size=23 FUN_1423eb8a0 +d1 1423afbf0 size=54 FUN_1423afbf0 +d1 1423d59b0 size=40 FUN_1423d59b0 +d1 141077c10 size=840 FUN_141077c10 +d1 1411bc4c0 size=2139 FUN_1411bc4c0 +d1 141078b90 size=8 FUN_141078b90 +d1 1423d58d0 size=76 FUN_1423d58d0 +d1 1419a2100 size=139 FUN_1419a2100 +d1 1411a1080 size=1694 FUN_1411a1080 +d1 1410786c0 size=31 FUN_1410786c0 +d1 1423e9960 size=55 FUN_1423e9960 +d1 141078350 size=102 FUN_141078350 +d1 1416b5d90 size=849 FUN_1416b5d90 +d1 1423d42d0 size=22 FUN_1423d42d0 +d1 1423d5980 size=29 FUN_1423d5980 +d1 14230889c size=17 FUN_14230889c +d1 1423c5f80 size=7 FUN_1423c5f80 +d1 1423d5720 size=23 FUN_1423d5720 +d1 1419a5260 size=198 FUN_1419a5260 +d1 140c6d670 size=176 FUN_140c6d670 +d1 141078430 size=19 FUN_141078430 +d1 141078bb0 size=8 FUN_141078bb0 +d1 140fec210 size=221 FUN_140fec210 +d1 14118ec90 size=79 FUN_14118ec90 +d1 1423c3f40 size=245 FUN_1423c3f40 +d1 1423d5890 size=16 FUN_1423d5890 +d2 141078690 size=4 FUN_141078690 +d2 1423ecc90 size=88 FUN_1423ecc90 +d2 1423ed370 size=161 FUN_1423ed370 +d2 1423ed100 size=438 FUN_1423ed100 +d2 141a1a9e0 size=55 FUN_141a1a9e0 +d2 1423c3ab0 size=20 FUN_1423c3ab0 +d2 1423ce820 size=10 FUN_1423ce820 +d2 1423c3a20 size=17 FUN_1423c3a20 +d2 140feaa70 size=200 FUN_140feaa70 +d2 14169f550 size=381 FUN_14169f550 +d2 141ab8fb0 size=8 FUN_141ab8fb0 +d2 1423d6650 size=137 FUN_1423d6650 +d2 EXTERNAL:000000d5 size=0 Sleep +d2 142258100 size=120 FUN_142258100 +d2 142257cc0 size=1076 FUN_142257cc0 +d2 142188340 size=264 FUN_142188340 +d2 1422581d0 size=159 FUN_1422581d0 +d2 1423ceae0 size=4 FUN_1423ceae0 +d2 142258270 size=494 FUN_142258270 +d2 1423d4e10 size=131 FUN_1423d4e10 +d2 140c64d60 size=111 FUN_140c64d60 +d2 1423d3690 size=244 FUN_1423d3690 +d2 141184240 size=36 FUN_141184240 +d2 141228340 size=307 FUN_141228340 +d2 141078670 size=4 FUN_141078670 +d2 14217ce08 size=210 FUN_14217ce08 +d2 14104dcd0 size=92 FUN_14104dcd0 +d2 1410ca3d0 size=8 FUN_1410ca3d0 +d2 1410ca3b0 size=4 FUN_1410ca3b0 +d2 1410784f0 size=4 FUN_1410784f0 +d2 141184760 size=288 FUN_141184760 +d2 14117eca0 size=3180 FUN_14117eca0 +d2 14117e9b0 size=607 FUN_14117e9b0 +d2 14117e660 size=842 FUN_14117e660 +d2 14117f910 size=549 FUN_14117f910 +d2 14118a960 size=74 FUN_14118a960 +d2 1411a4ad0 size=297 FUN_1411a4ad0 +d2 141971960 size=1112 FUN_141971960 +d2 1423088b0 size=5 _malloc_base +d2 142178480 size=31 FUN_142178480 +d2 140c612c0 size=31 FUN_140c612c0 +d2 142324b2c size=62 FUN_142324b2c +d2 1416b52e0 size=273 FUN_1416b52e0 +d2 1416b8f60 size=211 FUN_1416b8f60 +d2 1416bc970 size=217 FUN_1416bc970 +d2 1416b4db0 size=178 FUN_1416b4db0 +d2 1423bc320 size=130 FUN_1423bc320 +d2 1423bb180 size=86 FUN_1423bb180 +d2 141184f80 size=240 FUN_141184f80 +d2 141218310 size=171 FUN_141218310 +d2 1423ce840 size=7 FUN_1423ce840 +d2 1423baf40 size=173 FUN_1423baf40 +d2 141218460 size=464 FUN_141218460 +d2 1423bb570 size=23 FUN_1423bb570 +d2 1423ea690 size=1377 FUN_1423ea690 +d2 140c6d9f0 size=357 FUN_140c6d9f0 +d2 EXTERNAL:00000137 size=0 GetFileAttributesW +d2 140ff8960 size=156 FUN_140ff8960 +d2 141a1add0 size=148 FUN_141a1add0 +d2 140ffa540 size=117 FUN_140ffa540 +d2 140ff9d80 size=187 FUN_140ff9d80 +d2 140ff8870 size=238 FUN_140ff8870 +d2 141023300 size=99 FUN_141023300 +d2 1410103a0 size=520 FUN_1410103a0 +d2 141079420 size=29 FUN_141079420 +d2 141228660 size=7 FUN_141228660 +d2 140fe93e0 size=353 FUN_140fe93e0 +d2 140fe9000 size=10 FUN_140fe9000 +d2 1422fe378 size=321 FUN_1422fe378 +d2 1411cad30 size=256 FUN_1411cad30 +d2 1419ab020 size=229 FUN_1419ab020 +d2 1412282c0 size=20 FUN_1412282c0 +d2 1412284f0 size=116 FUN_1412284f0 +d2 1423c5e40 size=64 FUN_1423c5e40 +d2 140c62d80 size=67 FUN_140c62d80 +d2 1411a2580 size=91 FUN_1411a2580 +d2 1423d5ad0 size=89 FUN_1423d5ad0 +d2 1424a9ea0 size=254 FUN_1424a9ea0 +d2 1424aa2a0 size=833 FUN_1424aa2a0 +d2 1423ebb70 size=638 FUN_1423ebb70 +d2 140c62dd0 size=87 FUN_140c62dd0 +d2 1423eb8c0 size=377 FUN_1423eb8c0 +d2 140c71330 size=259 FUN_140c71330 +d2 141a19030 size=402 FUN_141a19030 +d2 1423d0d70 size=135 FUN_1423d0d70 +d2 1423d2c90 size=167 FUN_1423d2c90 +d2 140cb0160 size=161 FUN_140cb0160 +d2 141abbfb0 size=57 FUN_141abbfb0 +d2 1416b5070 size=604 FUN_1416b5070 +d2 140d2dda0 size=85 FUN_140d2dda0 +d2 142540cb0 size=70 FUN_142540cb0 +d2 1423d4600 size=45 FUN_1423d4600 +d2 142316228 size=5 _realloc_base +d2 1416b9e10 size=2886 FUN_1416b9e10 +d2 142541080 size=72 FUN_142541080 +d2 142540d00 size=63 FUN_142540d00 +d2 141ab7e30 size=8 FUN_141ab7e30 +d2 14197b220 size=466 FUN_14197b220 +d2 1423e8f70 size=1433 FUN_1423e8f70 +d2 1416b9040 size=211 FUN_1416b9040 +d2 140c77400 size=227 FUN_140c77400 +d2 142329634 size=60 FUN_142329634 +d2 140c73e90 size=408 FUN_140c73e90 +d2 1422fd540 size=1353 FUN_1422fd540 +d2 14169e760 size=143 FUN_14169e760 +d2 14231bc5c size=5 thunk_FUN_14231b914 +d3 1423cc9f0 size=173 FUN_1423cc9f0 +d3 EXTERNAL:00000127 size=0 EnterCriticalSection +d3 EXTERNAL:0000012d size=0 LeaveCriticalSection +d3 14231a9d8 size=176 FUN_14231a9d8 +d3 1423ccd30 size=121 FUN_1423ccd30 +d3 1423ccc80 size=93 FUN_1423ccc80 +d3 1423ccad0 size=97 FUN_1423ccad0 +d3 140c743e0 size=152 FUN_140c743e0 +d3 141a1ab70 size=605 FUN_141a1ab70 +d3 141ab7c10 size=50 FUN_141ab7c10 +d3 14169ea00 size=164 FUN_14169ea00 +d3 1411caa00 size=46 FUN_1411caa00 +d3 141aba410 size=8 FUN_141aba410 +d3 141b5fcb0 size=15 FUN_141b5fcb0 +d3 1423cb5f0 size=146 FUN_1423cb5f0 +d3 1422595f0 size=2085 FUN_1422595f0 +d3 142187e10 size=26 FUN_142187e10 +d3 142327ca0 size=168 strlen +d3 1422fe590 size=125 FUN_1422fe590 +d3 14219e5b0 size=34 FUN_14219e5b0 +d3 142257a30 size=49 FUN_142257a30 +d3 14219e930 size=24 FUN_14219e930 +d3 142188650 size=14 FUN_142188650 +d3 142327d60 size=354 strncpy +d3 1421a0ba0 size=190 FUN_1421a0ba0 +d3 1423223f0 size=183 FUN_1423223f0 +d3 1421888d0 size=14 FUN_1421888d0 +d3 142187a40 size=34 FUN_142187a40 +d3 1421887a0 size=42 FUN_1421887a0 +d3 1421888e0 size=227 FUN_1421888e0 +d3 14226e6c0 size=65 FUN_14226e6c0 +d3 142188690 size=15 FUN_142188690 +d3 142254220 size=21 FUN_142254220 +d3 142268750 size=68 FUN_142268750 +d3 14225a1f0 size=227 FUN_14225a1f0 +d3 1422687a0 size=78 FUN_1422687a0 +d3 14217c50c size=5 thunk_FUN_14217c644 +d3 140c777a0 size=313 FUN_140c777a0 +d3 1423d38f0 size=115 FUN_1423d38f0 +d3 1411846f0 size=99 FUN_1411846f0 +d3 141229310 size=86 FUN_141229310 +d3 141228850 size=90 FUN_141228850 +d3 140caffa0 size=153 FUN_140caffa0 +d3 14217cffc size=113 capture_previous_context +d3 EXTERNAL:000000b8 size=0 IsProcessorFeaturePresent +d3 14217cdd4 size=52 __raise_securityfailure +d3 141228210 size=101 FUN_141228210 +d3 1410c69f0 size=147 FUN_1410c69f0 +d3 1410783c0 size=96 FUN_1410783c0 +d3 142471b60 size=29 FUN_142471b60 +d3 1423aa4f0 size=24 FUN_1423aa4f0 +d3 1410b7b30 size=73 FUN_1410b7b30 +d3 14117ec10 size=138 _Med3_unchecked_> +d3 142256700 size=131 FUN_142256700 +d3 1422579d0 size=81 FUN_1422579d0 +d3 142254b90 size=60 FUN_142254b90 +d3 14117fb40 size=492 FUN_14117fb40 +d3 1411a7de0 size=258 FUN_1411a7de0 +d3 14246ecb0 size=78 FUN_14246ecb0 +d3 142598990 size=22 FUN_142598990 +d3 1419a24c0 size=783 FUN_1419a24c0 +d3 141451ab0 size=189 FUN_141451ab0 +d3 1423cd280 size=13 FUN_1423cd280 +d3 140d85640 size=116 FUN_140d85640 +d3 14246ebc0 size=135 FUN_14246ebc0 +d3 1419f5a30 size=145 FUN_1419f5a30 +d3 142404330 size=336 FUN_142404330 +d3 1419a3ad0 size=839 FUN_1419a3ad0 +d3 14246e8b0 size=27 FUN_14246e8b0 +d3 142598980 size=8 FUN_142598980 +d3 142563400 size=118 FUN_142563400 +d3 141502490 size=194 FUN_141502490 +d3 14199c3e0 size=637 FUN_14199c3e0 +d3 14246f450 size=61 FUN_14246f450 +d3 1419a27e0 size=4830 FUN_1419a27e0 +d3 140c61260 size=33 FUN_140c61260 +d3 1422fc7a4 size=167 FUN_1422fc7a4 +d3 140c61290 size=33 FUN_140c61290 +d3 142324b6c size=55 FUN_142324b6c +d3 142888350 size=6 _guard_dispatch_icall +d3 141a0e000 size=76 FUN_141a0e000 +d3 141a0de20 size=368 FUN_141a0de20 +d3 1423afbb0 size=53 FUN_1423afbb0 +d3 1416a7db0 size=1148 FUN_1416a7db0 +d3 141aba130 size=8 FUN_141aba130 +d3 1423ae3b0 size=488 FUN_1423ae3b0 +d3 140c6e860 size=144 FUN_140c6e860 +d3 1423bb320 size=101 FUN_1423bb320 +d3 1423d37d0 size=281 FUN_1423d37d0 +d3 1423eccf0 size=721 FUN_1423eccf0 +d3 1423ed2c0 size=156 FUN_1423ed2c0 +d3 140c623f0 size=183 FUN_140c623f0 +d3 140c62070 size=104 FUN_140c62070 +d3 142565210 size=58 FUN_142565210 +d3 1424718c0 size=166 FUN_1424718c0 +d3 1423ea060 size=215 FUN_1423ea060 +d3 1423e8f00 size=103 FUN_1423e8f00 +d3 142564ce0 size=270 FUN_142564ce0 +d3 142564f30 size=721 FUN_142564f30 +d3 140c72ed0 size=298 FUN_140c72ed0 +d3 1423d19a0 size=474 FUN_1423d19a0 +d3 1423d0e00 size=249 FUN_1423d0e00 +d3 1423ae300 size=158 FUN_1423ae300 +d3 1423eac90 size=1888 FUN_1423eac90 +d3 140c73000 size=145 FUN_140c73000 +d3 1423d5520 size=337 FUN_1423d5520 +d3 140c77ad0 size=260 FUN_140c77ad0 +d3 140c62220 size=233 FUN_140c62220 +d3 1423eb400 size=776 FUN_1423eb400 +d3 1423d5750 size=234 FUN_1423d5750 +d3 140c75c50 size=145 FUN_140c75c50 +d3 1425abd80 size=16 FUN_1425abd80 +d3 141a1afc0 size=1435 FUN_141a1afc0 [4096] +d3 1422fde60 size=386 FUN_1422fde60 +d3 1422fdfe4 size=312 FUN_1422fdfe4 +d3 1422fe348 size=23 FUN_1422fe348 +d3 1422fe11c size=530 FUN_1422fe11c +d3 EXTERNAL:000000b9 size=0 RtlPcToFileHeader +d3 140c788f0 size=603 FUN_140c788f0 +d3 141078300 size=60 FUN_141078300 +d3 140c62030 size=16 FUN_140c62030 +d3 14122a0c0 size=165 FUN_14122a0c0 +d3 14231f704 size=410 FUN_14231f704 +d3 140c62cb0 size=109 FUN_140c62cb0 +d3 1424aa1e0 size=171 FUN_1424aa1e0 +d3 142470a50 size=185 FUN_142470a50 +d3 140cb6f10 size=500 FUN_140cb6f10 +d3 1424aa160 size=116 FUN_1424aa160 +d3 EXTERNAL:000000da size=0 WaitForSingleObject +d3 1423c9ea0 size=236 FUN_1423c9ea0 +d3 1424b5bd0 size=462 FUN_1424b5bd0 +d3 EXTERNAL:0000012f size=0 InitializeCriticalSection +d3 142518ed0 size=611 FUN_142518ed0 +d3 140c76b30 size=47 FUN_140c76b30 +d3 140c62780 size=1010 FUN_140c62780 +d3 1423ec050 size=2091 FUN_1423ec050 +d3 140c76b10 size=18 FUN_140c76b10 +d3 1423ebe00 size=39 FUN_1423ebe00 +d3 140c62d20 size=91 FUN_140c62d20 +d3 1422fc2c9 size=6 WNetCancelConnection2W +d3 1423d56e0 size=23 FUN_1423d56e0 +d3 142563080 size=336 FUN_142563080 +d3 1423ceac0 size=25 FUN_1423ceac0 +d3 1422fc2cf size=6 WNetGetConnectionW +d3 1422fc2c3 size=6 WNetAddConnection2W +d3 1423d0950 size=221 FUN_1423d0950 +d3 141b4afb0 size=125 FUN_141b4afb0 +d3 1416a88c0 size=570 FUN_1416a88c0 +d3 1416bc590 size=210 FUN_1416bc590 +d3 1416bc4c0 size=204 FUN_1416bc4c0 +d3 141ab8230 size=10 FUN_141ab8230 +d3 1416b9430 size=710 FUN_1416b9430 +d3 1416b8df0 size=358 FUN_1416b8df0 +d3 1416bb970 size=171 FUN_1416bb970 +d3 1423aa4e0 size=7 DeleteCriticalSection +d3 141ab7dd0 size=26 FUN_141ab7dd0 +d3 1416b7d40 size=118 FUN_1416b7d40 +d3 1416aaee0 size=196 FUN_1416aaee0 +d3 1416bb650 size=800 FUN_1416bb650 +d3 1416a9850 size=344 FUN_1416a9850 +d3 141abc030 size=15 FUN_141abc030 +d3 1416b4e70 size=498 FUN_1416b4e70 +d3 1416b9ae0 size=246 FUN_1416b9ae0 +d3 1416b5400 size=100 FUN_1416b5400 +d3 1416bcd70 size=337 FUN_1416bcd70 +d3 140c708a0 size=119 FUN_140c708a0 +d3 141abad70 size=3 FUN_141abad70 +d3 1416b7dc0 size=1525 FUN_1416b7dc0 +d3 14246efe0 size=142 FUN_14246efe0 +d3 141b805b0 size=160 FUN_141b805b0 +d3 141954a20 size=23 FUN_141954a20 +d3 1423c3960 size=40 FUN_1423c3960 +d3 1423ed560 size=271 FUN_1423ed560 +d3 1423d5340 size=145 FUN_1423d5340 +d3 1423ea510 size=374 FUN_1423ea510 +d3 1423e9510 size=532 FUN_1423e9510 +d3 1423116ec size=69 __acrt_errno_from_os_error +d3 EXTERNAL:00000196 size=0 HeapFree +d3 EXTERNAL:000000dc size=0 GetLastError +d3 1423117c0 size=32 __doserrno +d3 14169eee0 size=186 FUN_14169eee0 +d3 14169f320 size=542 FUN_14169f320 +d3 1423e8960 size=542 FUN_1423e8960 +d4 142315084 size=749 FUN_142315084 +d4 142304cd0 size=102 FUN_142304cd0 +d4 14217cc44 size=23 atexit +d4 14217cd0c size=120 FUN_14217cd0c +d4 14217cca0 size=105 _Init_thread_footer +d4 140c712a0 size=99 FUN_140c712a0 +d4 140c748b0 size=172 FUN_140c748b0 +d4 1423e9fb0 size=158 FUN_1423e9fb0 +d4 1423e7080 size=573 FUN_1423e7080 +d4 1423e99a0 size=224 FUN_1423e99a0 +d4 1423afb70 size=50 FUN_1423afb70 +d4 141947550 size=232 FUN_141947550 +d4 141ac7580 size=9118 FUN_141ac7580 +d4 141ad47c0 size=239 FUN_141ad47c0 +d4 142276740 size=65 FUN_142276740 +d4 1422589f0 size=95 FUN_1422589f0 +d4 1421f9740 size=32 FUN_1421f9740 +d4 142276f50 size=62 FUN_142276f50 +d4 1421a0b70 size=40 FUN_1421a0b70 +d4 142254240 size=24 FUN_142254240 +d4 1421b9460 size=257 FUN_1421b9460 +d4 14226e4c0 size=502 FUN_14226e4c0 +d4 141217df0 size=217 FUN_141217df0 +d4 140ffc460 size=221 FUN_140ffc460 +d4 1423cf4b0 size=8 FUN_1423cf4b0 +d4 14105ae20 size=53 FUN_14105ae20 +d4 141048ab0 size=8 FUN_141048ab0 +d4 14246ef50 size=55 FUN_14246ef50 +d4 142548890 size=54 FUN_142548890 +d4 EXTERNAL:00000190 size=0 RtlLookupFunctionEntry +d4 EXTERNAL:0000018f size=0 RtlCaptureContext +d4 EXTERNAL:00000191 size=0 RtlVirtualUnwind +d4 EXTERNAL:00000192 size=0 UnhandledExceptionFilter +d4 EXTERNAL:00000154 size=0 SetUnhandledExceptionFilter +d4 EXTERNAL:000000ea size=0 GetCurrentProcess +d4 14217c6ac size=112 `eh_vector_constructor_iterator' +d4 1410ca2e0 size=36 FUN_1410ca2e0 +d4 14117e4d0 size=393 FUN_14117e4d0 +d4 142187e30 size=62 FUN_142187e30 +d4 142257420 size=227 FUN_142257420 +d4 1422542d0 size=96 FUN_1422542d0 +d4 142254b60 size=39 FUN_142254b60 +d4 142256f20 size=65 FUN_142256f20 +d4 141228570 size=39 FUN_141228570 +d4 1423c3a60 size=17 FUN_1423c3a60 +d4 1423ed4c0 size=153 FUN_1423ed4c0 +d4 142403bc0 size=185 FUN_142403bc0 +d4 1423ca240 size=274 FUN_1423ca240 +d4 140c7df20 size=270 FUN_140c7df20 +d4 140c62e60 size=319 FUN_140c62e60 +d4 1423ccbc0 size=97 FUN_1423ccbc0 +d4 142470860 size=336 FUN_142470860 +d4 14199c8d0 size=122 FUN_14199c8d0 +d4 141678e30 size=50 FUN_141678e30 +d4 14199ca30 size=122 FUN_14199ca30 +d4 14199c760 size=125 FUN_14199c760 +d4 1423cf4c0 size=8 FUN_1423cf4c0 +d4 140c8ae10 size=119 FUN_140c8ae10 +d4 1423cbeb0 size=48 FUN_1423cbeb0 +d4 1423ccf60 size=177 FUN_1423ccf60 +d4 EXTERNAL:000000f9 size=0 RaiseException +d4 142888330 size=2 _guard_dispatch_icall +d4 142323d38 size=25 __acrt_lock +d4 142323d8c size=25 __acrt_unlock +d4 141a13e10 size=426 FUN_141a13e10 +d4 1423cc150 size=477 FUN_1423cc150 +d4 1423d0880 size=202 FUN_1423d0880 +d4 1423d58b0 size=20 FUN_1423d58b0 +d4 1423cee60 size=174 FUN_1423cee60 +d4 1423c1530 size=170 FUN_1423c1530 +d4 1423ea4b0 size=42 FUN_1423ea4b0 +d4 140c72d30 size=127 FUN_140c72d30 +d4 1423eb710 size=16 FUN_1423eb710 +d4 1423bb080 size=98 FUN_1423bb080 +d4 1423bb0f0 size=128 FUN_1423bb0f0 +d4 141ad2960 size=299 FUN_141ad2960 +d4 1423aa0d0 size=75 FUN_1423aa0d0 +d4 140c741e0 size=506 FUN_140c741e0 +d4 EXTERNAL:00000133 size=0 GetTempPathW +d4 1423aff50 size=165 FUN_1423aff50 +d4 EXTERNAL:00000274 size=0 SHGetSpecialFolderPathW +d4 14217c5b0 size=78 __chkstk +d4 EXTERNAL:00000139 size=0 GetSystemDirectoryW +d4 140c778e0 size=272 FUN_140c778e0 +d4 140c66720 size=88 FUN_140c66720 +d4 140c64cb0 size=3 _guard_check_icall +d4 1423bba20 size=501 FUN_1423bba20 +d4 1423c12f0 size=271 FUN_1423c12f0 +d4 14231ddf4 size=10 FUN_14231ddf4 +d4 142471060 size=91 FUN_142471060 +d4 EXTERNAL:00000151 size=0 MoveFileW +d4 1423af8d0 size=161 FUN_1423af8d0 +d4 142564c50 size=138 FUN_142564c50 +d4 140d3a150 size=130 FUN_140d3a150 +d4 142321890 size=7 FUN_142321890 +d4 140c62360 size=135 FUN_140c62360 +d4 EXTERNAL:00000148 size=0 GetCurrentDirectoryW +d4 140c74960 size=262 FUN_140c74960 +d4 1423d1780 size=99 FUN_1423d1780 +d4 1423d1e20 size=496 FUN_1423d1e20 +d4 140c710f0 size=202 FUN_140c710f0 +d4 1423cc370 size=402 FUN_1423cc370 +d4 140c70810 size=138 FUN_140c70810 +d4 142254520 size=247 FUN_142254520 +d4 142198880 size=37 FUN_142198880 +d4 142254a00 size=114 FUN_142254a00 +d4 14225b1c0 size=32 FUN_14225b1c0 +d4 1423d56a0 size=23 FUN_1423d56a0 +d4 14225bce0 size=498 FUN_14225bce0 +d4 142256590 size=363 FUN_142256590 +d4 141a1b560 size=211 FUN_141a1b560 +d4 1423ceb20 size=29 FUN_1423ceb20 +d4 1421784e4 size=34 FUN_1421784e4 +d4 14231c4bc size=47 FUN_14231c4bc +d4 14230b3bc size=30 FUN_14230b3bc +d4 EXTERNAL:000000c9 size=0 GetTimeZoneInformation +d4 142329cd0 size=85 FUN_142329cd0 +d4 14231d418 size=66 __tzset +d4 14230b40c size=71 _invoke_watson +d4 142471970 size=160 FUN_142471970 +d4 1423c9db0 size=223 FUN_1423c9db0 +d4 1423c94a0 size=262 FUN_1423c94a0 +d4 EXTERNAL:0000014c size=0 DeleteCriticalSection +d4 14217a588 size=27 FUN_14217a588 +d4 14246bf60 size=288 FUN_14246bf60 +d4 EXTERNAL:00000138 size=0 GetCurrentThreadId +d4 EXTERNAL:000001c7 size=0 DispatchMessageW +d4 EXTERNAL:000001d8 size=0 GetWindowLongPtrW +d4 140cb4930 size=166 FUN_140cb4930 +d4 EXTERNAL:000001c2 size=0 SetFocus +d4 EXTERNAL:000001cb size=0 GetMessageW +d4 140cb7440 size=246 FUN_140cb7440 +d4 EXTERNAL:000001bd size=0 TranslateMessage +d4 EXTERNAL:000001c6 size=0 PeekMessageW +d4 EXTERNAL:000001c8 size=0 GetFocus +d4 1423c98e0 size=96 FUN_1423c98e0 +d4 142471a20 size=273 FUN_142471a20 +d4 1424b6ab0 size=525 FUN_1424b6ab0 +d4 142549010 size=408 FUN_142549010 +d4 14217a72c size=21 FUN_14217a72c +d4 14254d0c0 size=173 FUN_14254d0c0 +d4 142549b30 size=379 FUN_142549b30 +d4 14254c8c0 size=366 FUN_14254c8c0 +d4 1424b47e0 size=3561 FUN_1424b47e0 +d4 1425402b0 size=937 FUN_1425402b0 +d4 1424fbaa0 size=849 FUN_1424fbaa0 +d4 140d23b30 size=190 FUN_140d23b30 +d4 1424ea3b0 size=2761 FUN_1424ea3b0 +d4 140d2ce30 size=358 FUN_140d2ce30 +d4 140c62b80 size=252 FUN_140c62b80 +d4 140c78740 size=148 FUN_140c78740 +d4 1423ec930 size=83 FUN_1423ec930 +d4 140c6db60 size=377 FUN_140c6db60 +d4 1423c9820 size=144 FUN_1423c9820 +d4 1423ad750 size=1497 FUN_1423ad750 [io:CreateFileW] +d4 EXTERNAL:00000124 size=0 FindFirstFileW +d4 EXTERNAL:00000128 size=0 FindNextFileW +d4 1424ada70 size=1271 FUN_1424ada70 +d4 140cd5760 size=183 FUN_140cd5760 +d4 14255b070 size=409 FUN_14255b070 +d4 1424b7c20 size=32 FUN_1424b7c20 +d4 1424b7b90 size=67 FUN_1424b7b90 +d4 140cd9010 size=305 FUN_140cd9010 +d4 140c74a70 size=262 FUN_140c74a70 +d4 141aebb20 size=248 FUN_141aebb20 +d4 140db1b20 size=128 FUN_140db1b20 +d4 1411c9c00 size=455 FUN_1411c9c00 +d4 14254ca40 size=59 FUN_14254ca40 +d4 1424b66f0 size=7 FUN_1424b66f0 +d4 141219610 size=97 FUN_141219610 +d4 1423c9140 size=109 FUN_1423c9140 +d4 141b802b0 size=193 FUN_141b802b0 +d4 1419a6c50 size=8 FUN_1419a6c50 +d4 1419a6c60 size=8 FUN_1419a6c60 +d4 1416a9a40 size=1653 FUN_1416a9a40 +d4 1416a96a0 size=422 FUN_1416a96a0 +d4 1416bc670 size=273 FUN_1416bc670 +d4 1425491b0 size=141 FUN_1425491b0 +d4 1416bd230 size=429 FUN_1416bd230 +d4 1423c89b0 size=195 FUN_1423c89b0 +d4 1416bc7b0 size=439 FUN_1416bc7b0 +d4 1419f6820 size=42 FUN_1419f6820 +d4 1423d3520 size=185 FUN_1423d3520 +d4 14232c090 size=200 FUN_14232c090 +d4 1423c3550 size=8 FUN_1423c3550 +d4 1423c2ab0 size=250 FUN_1423c2ab0 +d4 1423c27b0 size=42 FUN_1423c27b0 +d4 1423c2300 size=93 FUN_1423c2300 +d4 1423c2810 size=36 FUN_1423c2810 +d4 1423c3450 size=31 FUN_1423c3450 +d4 1423c3500 size=23 FUN_1423c3500 +d4 1423c3a80 size=35 FUN_1423c3a80 +d4 1423ded40 size=215 FUN_1423ded40 +d4 EXTERNAL:00000120 size=0 CreateDirectoryW +d4 1423afe70 size=206 FUN_1423afe70 +d4 1423cfec0 size=352 FUN_1423cfec0 + +===== CANDIDATE DECOMPILES (2) ===== + +//===== FUN_141a1afc0 @ 141a1afc0 ===== + +/* WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie */ + +void FUN_141a1afc0(longlong param_1,undefined8 *param_2) + +{ + int iVar1; + undefined8 uVar2; + undefined8 *puVar3; + ushort *puVar4; + ulonglong uVar5; + ushort uVar6; + ulonglong uVar7; + undefined1 auStack_148 [32]; + int *local_128; + int local_120; + undefined1 *local_118; + undefined4 local_110; + int local_108; + undefined4 local_f8 [2]; + int local_f0 [2]; + undefined1 local_e8 [20]; + int local_d4; + char local_c2; + undefined1 local_c0 [20]; + int local_ac; + char local_9a; + undefined **local_98 [2]; + int local_84; + undefined2 local_72; + undefined1 local_70 [40]; + ulonglong local_48; + + local_48 = DAT_14519c398 ^ (ulonglong)auStack_148; + if (*(char *)*param_2 == '\0') { + if (**(char **)(param_1 + 0x10) != '\0') { + uVar2 = FUN_1423d59e0(local_f8); + FUN_1423d5890(param_1 + 0x10,uVar2); + FUN_1423d59b0(local_f8); + *(undefined8 *)(param_1 + 0x18) = 0; + } + } + else { + puVar3 = (undefined8 *)FUN_1423ceb20(param_2,local_f8); + uVar2 = *puVar3; + FUN_142254a00(local_70,uVar2); + local_98[0] = icu_51::UnicodeString::vftable; + local_72 = 0x200; + uVar7 = 0; + local_f0[0] = 0; + local_128 = local_f0; + FUN_14225bce0(local_70,3,0,local_98); + if (local_f0[0] < 1) { + FUN_142254520(local_e8,0x44); + FUN_142254520(local_c0,0xd0); + local_108 = (int)local_c2; + if (local_c2 < '\0') { + local_108 = local_d4; + } + local_120 = (int)local_9a; + if (local_9a < '\0') { + local_120 = local_ac; + } + iVar1 = (int)(char)local_72; + if ((char)local_72 < '\0') { + iVar1 = local_84; + } + local_110 = 0; + local_118 = local_e8; + local_128 = (int *)((ulonglong)local_128 & 0xffffffff00000000); + FUN_142256590(local_98,0,iVar1,local_c0); + FUN_142254b90(local_c0); + FUN_142254b90(local_e8); + FUN_142254520(local_c0,0x44); + FUN_142254520(local_e8,0xf0); + local_108 = (int)local_9a; + if (local_9a < '\0') { + local_108 = local_ac; + } + local_120 = (int)local_c2; + if (local_c2 < '\0') { + local_120 = local_d4; + } + iVar1 = (int)(char)local_72; + if ((char)local_72 < '\0') { + iVar1 = local_84; + } + local_110 = 0; + local_118 = local_c0; + local_128 = (int *)((ulonglong)local_128 & 0xffffffff00000000); + FUN_142256590(local_98,0,iVar1,local_e8); + FUN_142254b90(local_e8); + FUN_142254b90(local_c0); + FUN_142254520(local_c0,0x46); + FUN_142254520(local_e8,0x192); + local_108 = (int)local_9a; + if (local_9a < '\0') { + local_108 = local_ac; + } + local_120 = (int)local_c2; + if (local_c2 < '\0') { + local_120 = local_d4; + } + iVar1 = (int)(char)local_72; + if ((char)local_72 < '\0') { + iVar1 = local_84; + } + local_110 = 0; + local_118 = local_c0; + local_128 = (int *)((ulonglong)local_128 & 0xffffffff00000000); + FUN_142256590(local_98,0,iVar1,local_e8); + FUN_142254b90(local_e8); + FUN_142254b90(local_c0); + FUN_142254520(local_c0,0x49); + FUN_142254520(local_e8,0x131); + local_108 = (int)local_9a; + if (local_9a < '\0') { + local_108 = local_ac; + } + local_120 = (int)local_c2; + if (local_c2 < '\0') { + local_120 = local_d4; + } + iVar1 = (int)(char)local_72; + if ((char)local_72 < '\0') { + iVar1 = local_84; + } + local_110 = 0; + local_118 = local_c0; + local_128 = (int *)((ulonglong)local_128 & 0xffffffff00000000); + FUN_142256590(local_98,0,iVar1,local_e8); + FUN_142254b90(local_e8); + FUN_142254b90(local_c0); + FUN_142254520(local_c0,0x4f); + FUN_142254520(local_e8,0xd8); + local_108 = (int)local_9a; + if (local_9a < '\0') { + local_108 = local_ac; + } + local_120 = (int)local_c2; + if (local_c2 < '\0') { + local_120 = local_d4; + } + iVar1 = (int)(char)local_72; + if ((char)local_72 < '\0') { + iVar1 = local_84; + } + local_110 = 0; + local_118 = local_c0; + local_128 = (int *)((ulonglong)local_128 & 0xffffffff00000000); + FUN_142256590(local_98,0,iVar1,local_e8); + FUN_142254b90(local_e8); + FUN_142254b90(local_c0); + FUN_142254520(local_c0,0x4f); + FUN_142254520(local_e8,0xf8); + local_108 = (int)local_9a; + if (local_9a < '\0') { + local_108 = local_ac; + } + local_120 = (int)local_c2; + if (local_c2 < '\0') { + local_120 = local_d4; + } + iVar1 = (int)(char)local_72; + if ((char)local_72 < '\0') { + iVar1 = local_84; + } + local_110 = 0; + local_118 = local_c0; + local_128 = (int *)((ulonglong)local_128 & 0xffffffff00000000); + FUN_142256590(local_98,0,iVar1,local_e8); + FUN_142254b90(local_e8); + FUN_142254b90(local_c0); + FUN_14225b1c0(local_98); + } + else { + FUN_1425abd80("%s - %d","MultipurposeString::formatForSearch",1); + uVar2 = FUN_142254a00(local_e8,uVar2); + FUN_142198880(local_98,uVar2); + FUN_142254b90(local_e8); + } + puVar4 = (ushort *)FUN_141a1b560(local_98); + if ((puVar4 != (ushort *)0x0) && (uVar6 = *puVar4, uVar6 != 0)) { + local_f8[0] = 0x7ff; + do { + if (uVar6 < 0x1000) { + if (uVar6 < 0x80) { + if ((ushort)(uVar6 - 0x30) < 10) { + uVar5 = (ulonglong)uVar6 - 0x30; + } + else { + if (0x19 < (ushort)(uVar6 - 0x41)) { + uVar7 = uVar7 | 0x1000000000; + goto LAB_141a1b4e4; + } + uVar5 = (ulonglong)uVar6 - 0x37; + } +LAB_141a1b4e0: + uVar7 = uVar7 | 1L << (uVar5 & 0x3f); + } + else if (uVar6 < 0x100) { + uVar7 = uVar7 | 0x2000000000; + } + else if (uVar6 < 0x300) { + uVar7 = uVar7 | 0x4000000000; + } + else { + uVar7 = uVar7 | 0x8000000000; + } + } + else { + if (0x7ff < (ushort)(uVar6 + 0x2800)) { + uVar5 = (ulonglong)(((int)(uVar6 - 0x1000) >> 0xc) + 0x28); + goto LAB_141a1b4e0; + } + uVar7 = uVar7 | 0x80000000000000; + } +LAB_141a1b4e4: + puVar4 = puVar4 + 1; + uVar6 = *puVar4; + } while (uVar6 != 0); + } + *(ulonglong *)(param_1 + 0x18) = uVar7; + uVar2 = FUN_141a1b560(local_98); + uVar2 = FUN_1423d56a0(local_f8,uVar2); + FUN_1423d5890(param_1 + 0x10,uVar2); + FUN_1423d59b0(local_f8); + FUN_142254b90(local_98); + FUN_142254b90(local_70); + } + return; +} + + + +//===== FUN_1423ad750 @ 1423ad750 ===== + +/* WARNING: Removing unreachable block (ram,0x0001423adc37) */ +/* WARNING: Removing unreachable block (ram,0x0001423adc43) */ +/* WARNING: Removing unreachable block (ram,0x0001423adc48) */ + +undefined8 * FUN_1423ad750(undefined8 *param_1,longlong *param_2,char param_3) + +{ + byte bVar1; + byte bVar2; + byte bVar3; + BOOL BVar4; + int iVar5; + undefined8 *puVar6; + HANDLE pvVar7; + int *lpOutBuffer; + ulonglong uVar8; + INT_PTR IVar9; + HMODULE hModule; + byte *pbVar10; + byte *pbVar11; + longlong lVar12; + byte **ppbVar13; + byte *pbVar14; + FARPROC pFVar15; + FARPROC pFVar16; + undefined8 uVar17; + FARPROC pFVar18; + DWORD local_res18 [2]; + byte *local_res20; + byte *local_70; + byte *local_68; + byte *local_60; + byte *local_58; + undefined1 *local_50; + FARPROC local_48; + int *local_40; + + pFVar18 = (FARPROC)0x0; + if (param_3 != '\0') { + if ((*(int *)(*(longlong *)ThreadLocalStoragePointer + 8) < DAT_14549a5d4) && + (FUN_14217cd0c(&DAT_14549a5d4), DAT_14549a5d4 == -1)) { + hModule = GetModuleHandleA("user32.dll"); + pFVar15 = pFVar18; + if (hModule != (HMODULE)0x0) { + pFVar15 = GetProcAddress(hModule,"GetFinalPathNameByHandle"); + } + DAT_14549a670 = pFVar15; + _Init_thread_footer(&DAT_14549a5d4); + } + if (DAT_14549a670 != (FARPROC)0x0) { + puVar6 = (undefined8 *)FUN_140c6d9f0(&local_40,param_2); + pvVar7 = CreateFileW((LPCWSTR)*puVar6,0x80000000,1,(LPSECURITY_ATTRIBUTES)0x0,3,0x2000000, + (HANDLE)0x0); + if (pvVar7 != (HANDLE)0xffffffffffffffff) { + uVar8 = (*DAT_14549a670)(pvVar7,0,0,0); + if ((int)uVar8 != 0) { + iVar5 = (int)uVar8 + 2; + pFVar15 = pFVar18; + if (iVar5 != 0) { + pFVar15 = (FARPROC)_calloc_base(iVar5,2); + } + local_48 = pFVar15; + IVar9 = (*DAT_14549a670)(pvVar7,pFVar15,uVar8 & 0xffffffff,0); + if ((int)IVar9 != 0) { + CloseHandle(pvVar7); + FUN_140c741e0(&local_70,pFVar15); + pbVar11 = local_70; + pbVar14 = &DAT_1449b19f4; + pbVar10 = &DAT_1449b19f4; + pFVar16 = pFVar18; +LAB_1423adaf3: + do { + bVar1 = *pbVar10; + pbVar10 = pbVar10 + 1; + if ((char)bVar1 < '\0') { + if ((*pbVar10 & 0xc0) == 0x80) { + do { + pbVar10 = pbVar10 + 1; + } while ((*pbVar10 & 0xc0) == 0x80); + pFVar16 = pFVar16 + 1; + goto LAB_1423adaf3; + } + } + else if (bVar1 == 0) goto LAB_1423adb2a; + pFVar16 = pFVar16 + 1; + } while( true ); + } + FUN_14230889c(pFVar15); + } + CloseHandle(pvVar7); + } + } + local_70 = (byte *)*param_2; + pbVar11 = local_70 + -0x10; + if (pbVar11 != (byte *)&DAT_14519d8d8) { + LOCK(); + *(int *)pbVar11 = *(int *)pbVar11 + 1; + UNLOCK(); + } + uVar17 = 1; + ppbVar13 = &local_70; + goto LAB_1423adca9; + } + puVar6 = (undefined8 *)FUN_140c6d9f0(&local_48); + pvVar7 = CreateFileW((LPCWSTR)*puVar6,0x80000000,1,(LPSECURITY_ATTRIBUTES)0x0,3,0x2200000, + (HANDLE)0x0); + if (pvVar7 != (HANDLE)0xffffffffffffffff) { + FUN_14230889c(0); + lpOutBuffer = (int *)_calloc_base(1,0x4000); + local_res18[0] = 0; + local_40 = lpOutBuffer; + BVar4 = DeviceIoControl(pvVar7,0x900a8,(LPVOID)0x0,0,lpOutBuffer,0x4000,local_res18, + (LPOVERLAPPED)0x0); + CloseHandle(pvVar7); + if ((BVar4 != 0) && (iVar5 = *lpOutBuffer, iVar5 < 0)) { + local_res20 = &DAT_14519d8e8; + if (iVar5 == -0x5ffffffd) { + lVar12 = (ulonglong)(*(ushort *)(lpOutBuffer + 2) >> 1) * 2 + 0x10; +LAB_1423ad877: + FUN_140c74610(&local_70,lVar12 + (longlong)lpOutBuffer, + *(ushort *)((longlong)lpOutBuffer + 10) >> 1); + local_res20 = local_70; + } + else if (iVar5 == -0x5ffffff4) { + lVar12 = (ulonglong)(*(ushort *)(lpOutBuffer + 2) >> 1) * 2 + 0x14; + goto LAB_1423ad877; + } + pbVar11 = local_res20; + if (*local_res20 != 0) { + pbVar14 = &DAT_1449b19cc; + pbVar10 = &DAT_1449b19cc; + pFVar15 = pFVar18; +LAB_1423ad8b0: + do { + bVar1 = *pbVar10; + pbVar10 = pbVar10 + 1; + if ((char)bVar1 < '\0') { + if ((*pbVar10 & 0xc0) == 0x80) { + do { + pbVar10 = pbVar10 + 1; + } while ((*pbVar10 & 0xc0) == 0x80); + pFVar15 = pFVar15 + 1; + goto LAB_1423ad8b0; + } + } + else if (bVar1 == 0) goto LAB_1423ad8dd; + pFVar15 = pFVar15 + 1; + } while( true ); + } + pbVar11 = local_res20 + -0x10; + if (pbVar11 != (byte *)&DAT_14519d8d8) { + LOCK(); + iVar5 = *(int *)pbVar11; + *(int *)pbVar11 = *(int *)pbVar11 + -1; + UNLOCK(); + if (iVar5 == 0) { + thunk_FUN_14217cc5c(); + } + } + } + FUN_14230889c(lpOutBuffer); + } + local_60 = (byte *)*param_2; + pbVar11 = local_60 + -0x10; + if (pbVar11 != (byte *)&DAT_14519d8d8) { + LOCK(); + *(int *)pbVar11 = *(int *)pbVar11 + 1; + UNLOCK(); + } + uVar17 = 0; + ppbVar13 = &local_60; +LAB_1423adca9: + FUN_1423add30(param_1,ppbVar13,uVar17); + return param_1; +LAB_1423adb2a: + iVar5 = FUN_140c77ad0(local_70,&DAT_1449b19f4,pFVar16); + if (iVar5 == 0) { +LAB_1423adb46: + do { + bVar1 = *pbVar14; + pbVar14 = pbVar14 + 1; + if ((char)bVar1 < '\0') { + if ((*pbVar14 & 0xc0) == 0x80) { + do { + pbVar14 = pbVar14 + 1; + } while ((*pbVar14 & 0xc0) == 0x80); + pFVar18 = pFVar18 + 1; + goto LAB_1423adb46; + } + } + else if (bVar1 == 0) goto LAB_1423adb7a; + pFVar18 = pFVar18 + 1; + } while( true ); + } + pbVar10 = pbVar11 + -0x10; + if (pbVar10 != (byte *)&DAT_14519d8d8) { + LOCK(); + *(int *)pbVar10 = *(int *)pbVar10 + 1; + UNLOCK(); + pbVar11 = local_70; + } + *param_1 = pbVar11; + local_50 = &DAT_14519d8e8; + goto LAB_1423adc2e; +LAB_1423ad8dd: + iVar5 = FUN_140c77ad0(local_res20,&DAT_1449b19cc,pFVar15); + if (iVar5 == 0) { +LAB_1423ad8f0: + do { + bVar1 = *pbVar14; + pbVar14 = pbVar14 + 1; + if ((char)bVar1 < '\0') { + if ((*pbVar14 & 0xc0) == 0x80) { + do { + pbVar14 = pbVar14 + 1; + } while ((*pbVar14 & 0xc0) == 0x80); + pFVar18 = pFVar18 + 1; + goto LAB_1423ad8f0; + } + } + else if (bVar1 == 0) goto LAB_1423ad91d; + pFVar18 = pFVar18 + 1; + } while( true ); + } + goto LAB_1423ad9ac; +LAB_1423adb7a: + iVar5 = (int)pFVar18; + pbVar10 = pbVar11; + if (iVar5 < 1) { + local_68 = pbVar11; + pbVar10 = pbVar11 + -0x10; + if (pbVar10 != (byte *)&DAT_14519d8d8) { + LOCK(); + *(int *)pbVar10 = *(int *)pbVar10 + 1; + UNLOCK(); + pbVar11 = local_70; + } + } + else { + while (iVar5 = iVar5 + -1, -1 < iVar5) { + bVar1 = *pbVar10; + if (bVar1 == 0) { + local_68 = &DAT_14519d8e8; + goto LAB_1423adbe0; + } + pbVar10 = pbVar10 + 1; + if ((char)bVar1 < '\0') { + bVar3 = 0x40; + bVar2 = bVar1 & 0x40; + while ((bVar2 != 0 && (8 < bVar3))) { + pbVar10 = pbVar10 + 1; + bVar3 = bVar3 >> 1; + bVar2 = bVar3 & bVar1; + } + } + } + FUN_140c743e0(&local_68); + } +LAB_1423adbe0: + *param_1 = local_68; + local_68 = &DAT_14519d8e8; +LAB_1423adc2e: + pbVar11 = pbVar11 + -0x10; + if (pbVar11 != (byte *)&DAT_14519d8d8) { + LOCK(); + iVar5 = *(int *)pbVar11; + *(int *)pbVar11 = *(int *)pbVar11 + -1; + UNLOCK(); + if (iVar5 == 0) { + thunk_FUN_14217cc5c(); + } + } + FUN_14230889c(pFVar15); + return param_1; +LAB_1423ad91d: + iVar5 = (int)pFVar18; + pbVar10 = pbVar11; + if (iVar5 < 1) { + pbVar10 = pbVar11 + -0x10; + pbVar14 = pbVar11; + if (pbVar10 != (byte *)&DAT_14519d8d8) { + LOCK(); + *(int *)pbVar10 = *(int *)pbVar10 + 1; + UNLOCK(); + pbVar11 = local_res20; + pbVar14 = local_res20; + } + } + else { + while (iVar5 = iVar5 + -1, -1 < iVar5) { + bVar1 = *pbVar10; + pbVar14 = &DAT_14519d8e8; + if (bVar1 == 0) goto LAB_1423ad980; + pbVar10 = pbVar10 + 1; + if ((char)bVar1 < '\0') { + bVar3 = 0x40; + bVar2 = bVar1 & 0x40; + while ((bVar2 != 0 && (8 < bVar3))) { + pbVar10 = pbVar10 + 1; + bVar3 = bVar3 >> 1; + bVar2 = bVar3 & bVar1; + } + } + } + FUN_140c743e0(&local_58); + pbVar14 = local_58; + } +LAB_1423ad980: + pbVar10 = pbVar11 + -0x10; + pbVar11 = pbVar14; + local_res20 = pbVar14; + if (pbVar10 != (byte *)&DAT_14519d8d8) { + LOCK(); + iVar5 = *(int *)pbVar10; + *(int *)pbVar10 = *(int *)pbVar10 + -1; + UNLOCK(); + if (iVar5 == 0) { + thunk_FUN_14217cc5c(); + pbVar11 = local_res20; + } + } +LAB_1423ad9ac: + *param_1 = pbVar11; + FUN_14230889c(lpOutBuffer); + return param_1; +} + + diff --git a/maple-py/re/findings/decpdb.txt b/maple-py/re/findings/decpdb.txt new file mode 100644 index 0000000..f1009a8 --- /dev/null +++ b/maple-py/re/findings/decpdb.txt @@ -0,0 +1,1626 @@ + +//================ FUN_1420e8804 @ 1420e8804 ================ + +DWORD FUN_1420e8804(undefined8 *param_1,LPCVOID param_2,DWORD param_3) + +{ + HANDLE hFile; + DWORD DVar1; + DWORD nNumberOfBytesToWrite; + uint local_res18 [4]; + + hFile = (HANDLE)*param_1; + DVar1 = 0; + nNumberOfBytesToWrite = param_3; + while( true ) { + WriteFile(hFile,param_2,nNumberOfBytesToWrite,local_res18,(LPOVERLAPPED)0x0); + if (local_res18[0] == 0xffffffff) { + return 0xffffffff; + } + if (local_res18[0] == 0) break; + DVar1 = DVar1 + local_res18[0]; + nNumberOfBytesToWrite = nNumberOfBytesToWrite - local_res18[0]; + if (DVar1 == param_3) { + return DVar1; + } + param_2 = (LPCVOID)((longlong)param_2 + (ulonglong)local_res18[0]); + } + return DVar1; +} + + + +//================ FUN_1420d7358 @ 1420d7358 ================ + +undefined4 FUN_1420d7358(longlong *param_1,undefined8 param_2,int param_3) + +{ + char cVar1; + int iVar2; + int iVar3; + longlong lVar4; + + iVar3 = (int)param_1[2]; + iVar2 = iVar3 * param_3; + if (param_3 == 0) { + lVar4 = param_1[1]; + if (*(int *)((longlong)param_1 + 0x14) != 0) { + iVar3 = *(int *)((longlong)param_1 + 0x14); + } + if (lVar4 != 0) goto LAB_1420d738c; + } + lVar4 = *param_1; +LAB_1420d738c: + cVar1 = FUN_1420e8878(lVar4,iVar2); + if ((cVar1 != '\0') && (iVar2 = FUN_1420e8804(lVar4,param_2,iVar3), iVar2 == iVar3)) { + return 1; + } + return 0; +} + + + +//================ FUN_1420d6e74 @ 1420d6e74 ================ + +undefined1 FUN_1420d6e74(undefined8 *param_1) + +{ + char cVar1; + + if ((*(char *)((longlong)param_1 + 0x21) == '\0') && + (cVar1 = FUN_1420e8a44(param_1[0xd],*param_1,0), cVar1 == '\0')) { + FUN_1420e8204(param_1[0xe],0xffffe697,0,0); + return 0; + } + return 1; +} + + + +//================ FUN_1420d62a4 @ 1420d62a4 ================ + +ulonglong FUN_1420d62a4(longlong param_1) + +{ + longlong *plVar1; + char cVar2; + int iVar3; + ulonglong uVar4; + longlong lVar5; + undefined1 local_res8 [8]; + + plVar1 = *(longlong **)(param_1 + 0x138); + local_res8[0] = 0; + if (*(char *)((longlong)plVar1 + 0x1e) == '\0') { +LAB_1420d62e1: + if (*(char *)((longlong)plVar1 + 0x21) == '\0') { + if ((*(char *)((longlong)plVar1 + 0x1d) == '\0') && (*(longlong *)(param_1 + 0x148) == 0)) { + uVar4 = FUN_1420d6e74(plVar1); + if ((char)uVar4 == '\0') goto LAB_1420d6381; + } + } + else { + *(undefined1 *)((longlong)plVar1 + 0x21) = 0; + *(undefined1 *)((longlong)plVar1 + 0x1c) = 0; + cVar2 = FUN_1420d66b4(plVar1,1); + if (cVar2 == '\0') { + do { + iVar3 = FUN_1420e8f5c(plVar1[9],local_res8); + } while (iVar3 != 0); + } + uVar4 = FUN_1420d6e74(plVar1); + if ((char)uVar4 == '\0') goto LAB_1420d6381; + FUN_1420e91c4(plVar1[9],0); + plVar1[9] = 0; + while( true ) { + lVar5 = FUN_1420e8f30(plVar1[10]); + if (lVar5 == 0) break; + if (*(code **)(lVar5 + 0x30) != (code *)0x0) { + (**(code **)(lVar5 + 0x30))(*(undefined8 *)(lVar5 + 0x18)); + } + } + plVar1[10] = 0; + } + if (*(longlong *)(param_1 + 0x148) != 0) { + uVar4 = FUN_1420e8d00(); + if ((char)uVar4 == '\0') goto LAB_1420d6381; + } + lVar5 = *plVar1; + if (*(int *)(lVar5 + 8) * 0x10 + 0x1cU < *(uint *)(lVar5 + 4)) { + uVar4 = FUN_1420e8a8c(plVar1[0xd]); + } + else { + uVar4 = CONCAT71((int7)((ulonglong)lVar5 >> 8),1); + } + } + else { + *(undefined4 *)(*plVar1 + 0x10) = 1; + *(undefined1 *)((longlong)plVar1 + 0x1e) = 0; + uVar4 = FUN_1420d6e74(plVar1); + if ((char)uVar4 != '\0') goto LAB_1420d62e1; +LAB_1420d6381: + uVar4 = uVar4 & 0xffffffffffffff00; + } + return uVar4; +} + + + +//================ FUN_1420eac94 @ 1420eac94 ================ + +undefined8 FUN_1420eac94(longlong param_1,longlong param_2,undefined8 param_3) + +{ + longlong *plVar1; + char cVar2; + int iVar3; + undefined8 uVar4; + longlong lVar5; + ulonglong uVar6; + uint uVar7; + char *pcVar8; + undefined1 local_res10 [8]; + + local_res10[0] = 0; + iVar3 = FUN_1420e44ec(*(undefined8 *)(param_2 + 0x130)); + uVar4 = FUN_1420e2c30(iVar3 + 1); + cVar2 = FUN_1420e4688(*(undefined8 *)(param_2 + 0x130),&DAT_1433e7e00,uVar4,local_res10); + if (cVar2 == '\0') { + FUN_1420e2c94(uVar4); + } + else { + lVar5 = FUN_1420e73c4(param_1,uVar4); + FUN_1420e2c94(uVar4); + if (lVar5 != 0) { + cVar2 = FUN_1420e6b0c(param_2,lVar5,param_3); + if (cVar2 == '\0') { + return 0; + } + uVar6 = 0; + if (*(int *)(param_1 + 0x1c0) != 0) { + do { + plVar1 = *(longlong **)(*(longlong *)(param_1 + 0x1c8) + uVar6 * 8); + if ((int)plVar1[1] == 0) { + if (*(longlong *)((undefined1 *)*plVar1 + 0x50) == param_2) { + *(undefined1 *)*plVar1 = 1; + FUN_1420ea748(); + } + } + else if (((((int)plVar1[1] == 1) && (lVar5 = *plVar1, *(char *)(lVar5 + 0x2e) == '\0')) && + (*(longlong *)(lVar5 + 0xc0) == param_2)) && + (cVar2 = FUN_1420eafb0(lVar5,param_1,4), cVar2 == '\0')) { + return 0; + } + uVar7 = (int)uVar6 + 1; + uVar6 = (ulonglong)uVar7; + } while (uVar7 < *(uint *)(param_1 + 0x1c0)); + } + cVar2 = FUN_1420e6b40(param_2); + if (cVar2 == '\0') { + FUN_1420e82e8(param_1,0xffffe693,0); + FUN_1420e6b50(param_2); + return 0; + } + uVar6 = 0; + if (*(int *)(param_1 + 0xa0) != 0) { + do { + lVar5 = *(longlong *)(*(longlong *)(param_1 + 0x98) + uVar6 * 8); + if ((lVar5 != 0) && (*(longlong *)(*(longlong *)(lVar5 + 0x60) + 0xc0) == param_2)) { + for (pcVar8 = *(char **)(lVar5 + 0x20); pcVar8 != (char *)0x0; + pcVar8 = *(char **)(pcVar8 + 0x58)) { + if (*pcVar8 == '\0') { + *pcVar8 = '\x01'; + FUN_1420ea748(pcVar8); + } + } + } + uVar7 = (int)uVar6 + 1; + uVar6 = (ulonglong)uVar7; + } while (uVar7 < *(uint *)(param_1 + 0xa0)); + } + cVar2 = FUN_1420e6ba0(param_2); + if (cVar2 == '\0') { + return 0; + } + *(undefined1 *)(param_2 + 0x151) = 1; + return 1; + } + } + FUN_1420e82e8(param_1,0xffffe696,0); + return 0; +} + + + +//================ FUN_1420e07d8 @ 1420e07d8 ================ + +byte FUN_1420e07d8(undefined8 param_1,undefined8 param_2,undefined8 param_3) + +{ + longlong lVar1; + char cVar2; + longlong lVar3; + undefined8 uVar4; + + lVar3 = FUN_1420e35a8(param_2); + if (lVar3 != 0) { + lVar1 = FUN_1420e7374(param_1,lVar3); + FUN_1420e2c94(lVar3); + if (lVar1 != 0) { + if (*(char *)(lVar1 + 0x151) == '\0') { + lVar3 = FUN_1420e35a8(param_3); + if (lVar3 != 0) { + cVar2 = FUN_1420eac94(param_1,lVar1,lVar3); + FUN_1420e2c94(lVar3); + return -(cVar2 != '\0') & 1; + } + uVar4 = 0xffffe69c; + } + else { + uVar4 = 0xffffe69b; + } + goto LAB_1420e086d; + } + } + uVar4 = 0xffffe692; +LAB_1420e086d: + FUN_1420e82e8(param_1,uVar4,0); + return 0; +} + + + +//================ FUN_1420de140 @ 1420de140 ================ + +undefined4 FUN_1420de140(undefined8 param_1,undefined8 param_2) + +{ + char cVar1; + undefined4 uVar2; + longlong lVar3; + undefined8 uVar4; + undefined8 uVar5; + undefined8 uVar6; + undefined8 local_28 [2]; + undefined4 local_18; + + lVar3 = FUN_1420cf56c(); + uVar2 = 0; + uVar4 = FUN_1420df9ec(lVar3); + local_28[0] = 0; + local_18 = 0; + FUN_1420df9dc(lVar3,local_28); + if (lVar3 == 0) { + FUN_1420df9dc(0,uVar4); + uVar2 = 0xffffd8ef; + } + else { + uVar5 = FUN_1420e3570(param_1); + uVar6 = FUN_1420e3570(param_2); + cVar1 = FUN_1420e07d8(lVar3,uVar5,uVar6); + if (cVar1 == '\0') { + uVar2 = FUN_1420deb38(); + } + FUN_1420e2c94(uVar5); + FUN_1420e2c94(uVar6); + FUN_1420df9dc(lVar3,uVar4); + } + return uVar2; +} + + + +//================ FUN_141d75c20 @ 141d75c20 ================ + +int FUN_141d75c20(undefined8 param_1,undefined8 *param_2) + +{ + bool bVar1; + char cVar2; + undefined8 uVar3; + undefined8 uVar4; + int local_res18 [2]; + undefined1 local_res20 [8]; + undefined1 local_28 [8]; + undefined1 local_20 [24]; + + local_res18[0] = thunk_FUN_1420de9e0(0); + if (local_res18[0] != 0) { + uVar3 = FUN_1423d5720(local_20,"edb_dyn_CriticalSectionOn ERROR"); + uVar4 = FUN_1423d5720(local_res20,"dsqlOpenDeviceDB"); + uVar3 = FUN_1423d3360(local_28,uVar4,uVar3); + FUN_1423ac220(uVar3); + FUN_1423d59b0(local_28); + FUN_1423d59b0(local_20); + return 0; + } + bVar1 = false; + cVar2 = thunk_FUN_1420de2bc(&DAT_1432ef45c,local_res18); + if (cVar2 != '\0') { + cVar2 = FUN_1423d4600(param_1,&DAT_1454551e0); + if (cVar2 == '\0') { + local_res18[0] = thunk_FUN_1420de210(&DAT_1432ef464); + thunk_FUN_1420de210(&DAT_1432ef46c); + } + else { + bVar1 = true; + } + } + if ((local_res18[0] != 0) || (bVar1)) goto LAB_141d75d93; + uVar3 = FUN_1423ceae0(param_1); + local_res18[0] = thunk_FUN_1420de140(&DAT_1432ef474,uVar3); + if (local_res18[0] == 0) { + if (*(char *)*param_2 != '\0') { + uVar3 = FUN_1423ceae0(param_2); + local_res18[0] = thunk_FUN_1420de140(&DAT_1432ef47c,uVar3); + if (local_res18[0] != 0) { + thunk_FUN_1420de210(&DAT_1432ef484); + thunk_FUN_1420de210(&DAT_1432ef48c); + goto LAB_141d75d70; + } + } + FUN_1423d58d0(&DAT_1454551e0,param_1); + } + else { +LAB_141d75d70: + uVar3 = FUN_1423d59e0(local_res20); + FUN_1423d5890(&DAT_1454551e0,uVar3); + FUN_1423d59b0(local_res20); + } +LAB_141d75d93: + thunk_FUN_1420dea50(0); + if (local_res18[0] != 0) { + uVar3 = FUN_1423d5720(local_res20,"Page Manager (Close/)Open returns ERROR"); + FUN_1423ac220(uVar3); + FUN_1423d59b0(local_res20); + } + return local_res18[0]; +} + + + +//================ FUN_141cad100 @ 141cad100 ================ + +void FUN_141cad100(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4) + +{ + bool bVar1; + int iVar2; + char local_res8 [8]; + char local_res10 [8]; + undefined1 uVar3; + longlong lVar4; + + if (*(int *)(param_1 + 0xc4) != 0) { + return; + } + lVar4 = param_1; + if (*(int *)(param_1 + 0x34) - 1U < 2) { + bVar1 = true; + uVar3 = 1; + if (*(char *)(param_1 + 0x150) == '\0') { + FUN_141d75ad0(); + FUN_141d75c20(param_1 + 0x48,param_1 + 400,param_3,param_4,uVar3); + } + else { + EnterCriticalSection((LPCRITICAL_SECTION)(param_1 + 0x158)); + } + } + else if (*(int *)(param_1 + 0x34) == 3) { + bVar1 = true; + uVar3 = 1; + EnterCriticalSection((LPCRITICAL_SECTION)(param_1 + 0x120)); + } + else { + bVar1 = false; + uVar3 = 0; + } + if (*(int *)(param_1 + 0x34) == 1) { + if (*(int *)(param_1 + 0x38) != 1) { +LAB_141cad20b: + local_res8[0] = '\0'; + iVar2 = (**(code **)(*(longlong *)(param_1 + 0x10) + 0x830)) + (param_1 + 0x10,local_res8,param_3,param_4,uVar3,lVar4); + if (iVar2 != 0) goto LAB_141cad1d4; + if (local_res8[0] == '\0') { + local_res10[0] = '\0'; + (**(code **)(*(longlong *)(param_1 + 0x10) + 0x838))(param_1 + 0x10,local_res10); + if (local_res10[0] == '\0') { + (**(code **)(*(longlong *)(param_1 + 0x10) + 0x920))(param_1 + 0x10); + iVar2 = (**(code **)(*(longlong *)(param_1 + 0x10) + 0x100))(param_1 + 0x10); + if (iVar2 != 0) goto LAB_141cad1d4; + (**(code **)(*(longlong *)(param_1 + 0x10) + 0x910))(param_1 + 0x10); + } + else { + (**(code **)(*(longlong *)(param_1 + 0x10) + 0x918))(); + } + } + } + } + else if (*(int *)(param_1 + 0x34) != 3) goto LAB_141cad20b; + if (*(int *)(param_1 + 0x34) != 3) { + (**(code **)(*(longlong *)(param_1 + 0x10) + 0xb18))(param_1 + 0x10); + } + (**(code **)(*(longlong *)(param_1 + 0x10) + 0xb8))(param_1 + 0x10,param_1 + 0xb8); + if (*(int *)(param_1 + 0x34) == 1) { + (**(code **)(*(longlong *)(param_1 + 0x10) + 0xb20))(param_1 + 0x10); + } +LAB_141cad1d4: + if (bVar1) { + if (*(int *)(param_1 + 0x34) - 1U < 2) { + if (*(char *)(param_1 + 0x150) == '\0') { + FUN_141d75b90(); + } + else { + LeaveCriticalSection((LPCRITICAL_SECTION)(param_1 + 0x158)); + } + } + else if (*(int *)(param_1 + 0x34) == 3) { + LeaveCriticalSection((LPCRITICAL_SECTION)(param_1 + 0x120)); + } + } + return; +} + + + +//================ FUN_141cac390 @ 141cac390 ================ + +undefined8 FUN_141cac390(longlong *param_1) + +{ + char cVar1; + int iVar2; + undefined8 uVar3; + undefined1 local_res8 [8]; + undefined1 local_res10 [8]; + undefined1 local_res18 [8]; + char local_38 [8]; + longlong local_30; + + uVar3 = FUN_1423d5980(local_res8,param_1 + 8); + uVar3 = FUN_1423d32c0(local_res10,uVar3,"/export.pdb"); + FUN_1423d5890(param_1 + 9,uVar3); + FUN_1423d59b0(local_res10); + uVar3 = FUN_1423d5980(local_res8,param_1 + 8); + uVar3 = FUN_1423d32c0(local_res10,uVar3,"/exportExt.pdb"); + FUN_1423d5890(param_1 + 0x32,uVar3); + FUN_1423d59b0(local_res10); + uVar3 = FUN_1423eb8a0(local_res18,param_1 + 0xb); + uVar3 = FUN_1423e99a0(uVar3,local_res10); + uVar3 = FUN_1419f6820(local_res8,uVar3); + FUN_1423d5890(param_1 + 10,uVar3); + FUN_1423d59b0(local_res8); + FUN_1423d59b0(local_res10); + FUN_1423d59b0(local_res18); + uVar3 = FUN_1423eb8a0(local_res8,param_1 + 9); + cVar1 = FUN_1423afbf0(uVar3); + FUN_1423d59b0(local_res8); + if (cVar1 == '\0') { + uVar3 = FUN_1423eb8a0(local_res10,param_1 + 8); + FUN_1423e8960(uVar3,local_res8); + FUN_1423d59b0(local_res8); + FUN_1423d59b0(local_res10); + if (*(char *)param_1[0x32] != '\0') { + uVar3 = FUN_1423eb8a0(local_res8,param_1 + 0x32); + FUN_1423af8d0(uVar3); + FUN_1423d59b0(local_res8); + } + (**(code **)(*param_1 + 0x4d0))(param_1); + *(undefined1 *)((longlong)param_1 + 0x31) = 1; + } + else { + FUN_141d75ad0(); + uVar3 = FUN_1423eb8a0(local_res10,param_1 + 9); + FUN_1423e99a0(uVar3,local_res8); + FUN_1423d59b0(local_res10); + cVar1 = FUN_141bc53d0(local_res8); + if (cVar1 == '\0') { + iVar2 = FUN_141bc54d0(param_1 + 9,param_1 + 0x32,local_res8); + if (iVar2 == 0) { + iVar2 = FUN_141be4370(); + } + } + else { + iVar2 = -1; + } + FUN_141d75e00(param_1 + 9); + FUN_141d75b90(); + FUN_1423d59b0(local_res8); + if (iVar2 == 0) { + *(undefined1 *)((longlong)param_1 + 0x31) = 1; + FUN_141cad100(param_1); + FUN_141c84cf0(local_38,param_1); + iVar2 = (**(code **)(param_1[2] + 0x30))(); + *(bool *)((longlong)param_1 + 0x6d) = iVar2 != 0; + if (local_38[0] != '\0') { + if (*(int *)(local_30 + 0x34) - 1U < 2) { + if (*(char *)(local_30 + 0x150) == '\0') { + FUN_141d75b90(); + } + else { + LeaveCriticalSection((LPCRITICAL_SECTION)(local_30 + 0x158)); + } + } + else if (*(int *)(local_30 + 0x34) == 3) { + LeaveCriticalSection((LPCRITICAL_SECTION)(local_30 + 0x120)); + } + } + } + else { + *(undefined1 *)((longlong)param_1 + 0x31) = 0; + } + } + return 0; +} + + + +//================ FUN_141b8b4c0 @ 141b8b4c0 ================ + +void FUN_141b8b4c0(longlong param_1,longlong *param_2) + +{ + undefined4 uVar1; + char cVar2; + char cVar3; + int iVar4; + int iVar5; + undefined8 *puVar6; + undefined8 uVar7; + longlong *plVar8; + undefined8 uVar9; + longlong lVar10; + longlong *plVar11; + int iVar12; + uint uVar13; + uint uVar14; + uint uVar15; + longlong lVar16; + longlong lVar17; + uint uVar18; + uint uVar19; + longlong *plVar20; + uint uVar21; + undefined4 uVar22; + uint *puVar23; + longlong lVar24; + bool bVar25; + uint local_res18 [2]; + undefined8 local_res20; + ulonglong in_stack_fffffffffffffec0; + ulonglong in_stack_fffffffffffffec8; + ulonglong in_stack_fffffffffffffed0; + undefined8 *in_stack_fffffffffffffee0; + int local_108; + int local_104; + longlong local_100; + int local_f4; + longlong *local_f0; + undefined8 local_e8; + longlong local_e0; + undefined8 local_d8; + longlong *local_d0; + undefined1 local_c8 [8]; + undefined1 local_c0 [8]; + LPCRITICAL_SECTION local_b8; + undefined8 local_b0; + undefined8 local_a8; + undefined8 local_a0; + undefined8 local_98; + undefined1 local_90 [8]; + undefined1 local_88 [8]; + undefined1 local_80 [8]; + undefined1 local_78 [8]; + undefined1 local_70 [8]; + undefined1 local_68 [8]; + undefined1 local_60 [8]; + longlong local_58; + undefined1 local_50 [16]; + + uVar18 = 0; + local_res20 = local_res20 & 0xffffffff00000000; + if (*(longlong *)(param_1 + 0x9a0) == 0) { + return; + } + cVar2 = FUN_1423cce60(param_1 + 0x498); + if (cVar2 != '\0') { + return; + } + FUN_1423cd250(&local_100,param_1 + 0x498); + FUN_1423cd020(param_1 + 0x498,param_2); + bVar25 = false; + lVar16 = *param_2; + lVar10 = lVar16 + (longlong)*(int *)((longlong)param_2 + 0xc) * 8; + iVar4 = local_f4; + if (lVar16 != lVar10) { + do { + FUN_1423d5980(local_res18,lVar16); + puVar6 = (undefined8 *)FUN_1423ce820(&local_b8,local_res18); + cVar2 = FUN_1423ccab0(&local_100,*puVar6); + if (cVar2 == '\0') { + bVar25 = true; + } + FUN_1423d59b0(local_res18); + lVar16 = lVar16 + 8; + } while (lVar16 != lVar10); + iVar4 = local_f4; + if (bVar25) { + local_104 = 0; + if (0 < *(int *)((longlong)param_2 + 0xc)) { + do { + plVar11 = (longlong *)0x0; + uVar7 = FUN_1423ccd30(param_2,local_104); + puVar6 = (undefined8 *)FUN_1423ce820(local_50,uVar7); + iVar4 = FUN_1423cc9f0(&local_100,*puVar6,0,0); + uVar22 = (undefined4)(in_stack_fffffffffffffec0 >> 0x20); + if (iVar4 == -1) { + local_108 = 0; + local_d0 = (longlong *)0x0; + local_res18[0] = local_res18[0] & 0xffffff00; + plVar8 = (longlong *)FUN_14217c644(0x40); + plVar20 = plVar11; + local_f0 = plVar8; + if (plVar8 != (longlong *)0x0) { + *plVar8 = 0; + plVar8[1] = 0; + FUN_1423d59e0(plVar8 + 2); + *(undefined1 *)(plVar8 + 3) = 0; + FUN_1423d59e0(plVar8 + 4); + FUN_1423d59e0(plVar8 + 5); + FUN_1423d59e0(plVar8 + 6); + *(undefined4 *)(plVar8 + 7) = 0; + *(undefined1 *)((longlong)plVar8 + 0x3c) = 0; + plVar20 = plVar8; + } + uVar7 = FUN_1423ccd30(param_2,local_104); + iVar4 = FUN_141b8c1e0(param_1,uVar7,plVar20); + if (iVar4 == 0) { + EnterCriticalSection((LPCRITICAL_SECTION)(param_1 + 0x740)); + cVar2 = FUN_1423d45a0(plVar20 + 5,"rekordbox cloud"); + cVar3 = FUN_1423d45a0(plVar20 + 2,"CLOUD"); + if ((cVar3 == '\0') && (0x17 < *(int *)(param_1 + 0x65c))) { + iVar4 = 4; + } + else { + if ((char)plVar20[3] == '\0') { + uVar7 = FUN_1423d5720(local_88,"/PIONEER"); + uVar18 = uVar18 | 2; + } + else { + uVar7 = FUN_1423d5720(local_80,"/.PIONEER"); + uVar18 = uVar18 | 1; + } + local_res20 = CONCAT44(local_res20._4_4_,uVar18); + uVar9 = FUN_1423d5980(local_90,plVar20 + 4); + FUN_1423d3360(local_c0,uVar9,uVar7); + uVar19 = uVar18; + if ((uVar18 & 2) != 0) { + uVar19 = uVar18 & 0xfffffffd; + local_res20 = CONCAT44(local_res20._4_4_,uVar18) & 0xfffffffffffffffd; + FUN_1423d59b0(local_88); + } + uVar18 = uVar19; + if ((uVar19 & 1) != 0) { + uVar18 = uVar19 & 0xfffffffe; + local_res20 = CONCAT44(local_res20._4_4_,uVar19) & 0xfffffffffffffffe; + FUN_1423d59b0(local_80); + } + uVar7 = FUN_1423d5720(local_70,"/rekordbox"); + uVar9 = FUN_1423d5980(local_78,local_c0); + FUN_1423d3360(local_c8,uVar9,uVar7); + FUN_1423d59b0(local_70); + cVar3 = FUN_141a18ec0(plVar20 + 2); + if (cVar3 == '\0') { + if (cVar2 == '\0') { + iVar4 = FUN_141b8c4d0(param_1,plVar20 + 4,(char)plVar20[3]); + plVar11 = local_d0; + if (iVar4 == 0) { + uVar1 = *(undefined4 *)(param_1 + 0x660); + lVar10 = FUN_14217c644(); + local_58 = lVar10; + if (lVar10 == 0) { + plVar11 = (longlong *)0x0; + } + else { + local_98 = 0; + FUN_1423d59e0(&local_98); + local_a0 = 0; + FUN_1423d59e0(&local_a0); + local_res20 = CONCAT44(local_res20._4_4_,uVar18) | 0x30; + in_stack_fffffffffffffee0 = &local_a0; + plVar11 = (longlong *) + FUN_141c8f1e0(lVar10,1,local_c8,local_c0,(char)plVar20[3], + CONCAT44(uVar22,*(undefined4 *)(param_1 + 0x660)), + in_stack_fffffffffffffec8 & 0xffffffffffffff00,1,0, + in_stack_fffffffffffffee0,&local_98); + uVar18 = uVar18 | 0x30; + } + *plVar20 = (longlong)plVar11; + uVar19 = uVar18; + if ((uVar18 & 0x20) != 0) { + uVar19 = uVar18 & 0xffffffdf; + local_res20 = CONCAT44(local_res20._4_4_,uVar18) & 0xffffffffffffffdf; + FUN_1423d59b0(&local_a0); + plVar11 = (longlong *)*plVar20; + } + uVar18 = uVar19; + if ((uVar19 & 0x10) != 0) { + uVar18 = uVar19 & 0xffffffef; + local_res20 = CONCAT44(local_res20._4_4_,uVar19) & 0xffffffffffffffef; + FUN_1423d59b0(&local_98); + plVar11 = (longlong *)*plVar20; + } + (**(code **)(*plVar11 + 0x4e0))(plVar11,0); + puVar6 = (undefined8 *)*plVar20; + if (*(char *)((longlong)puVar6 + 0x31) == '\0') { + if (puVar6 != (undefined8 *)0x0) { + (**(code **)*puVar6)(puVar6,1); + } + lVar10 = FUN_14217c644(); + if (lVar10 == 0) { + plVar11 = (longlong *)0x0; + } + else { + plVar11 = (longlong *)FUN_1423d59e0(lVar10); + } + goto LAB_141b8baad; + } + FUN_1423d58d0(plVar20 + 6,puVar6 + 9); + *(undefined4 *)(plVar20 + 1) = *(undefined4 *)(param_1 + 0x660); + *(int *)(param_1 + 0x660) = *(int *)(param_1 + 0x660) + 1; + *(undefined4 *)((longlong)plVar20 + 0xc) = 1; + *(undefined4 *)(plVar20 + 7) = 0xffffffff; + iVar12 = *(int *)(param_1 + 0x65c); + iVar5 = iVar12 + 1; + if (*(int *)(param_1 + 0x658) < iVar5) { + if (iVar5 < 0) { + iVar5 = iVar12 + 2; + } + FUN_140c708a0((longlong *)(param_1 + 0x650), + iVar12 + 9 + (iVar5 >> 1) & 0xfffffff8); + } + iVar5 = *(int *)(param_1 + 0x65c); + *(int *)(param_1 + 0x65c) = iVar5 + 1; + *(longlong **)(*(longlong *)(param_1 + 0x650) + (longlong)iVar5 * 8) = plVar20 + ; + local_108 = (int)plVar20[1]; + local_res18[0] = + CONCAT31(local_res18[0]._1_3_,*(undefined1 *)(*plVar20 + 0x6d)); + FUN_141b81990(param_1,local_60,local_108); + FUN_1423d59b0(local_60); + cVar2 = FUN_141b4b2f0(param_1,1); + if ((cVar2 != '\0') || + (cVar2 = FUN_141cc0fe0(local_c8), plVar11 = local_d0, cVar2 != '\0')) { + FUN_141b4a770(param_1,uVar1); + plVar11 = local_d0; + } + } + } + else { + plVar11 = (longlong *)0x0; + iVar4 = 0; + lVar10 = FUN_14217c644(0x490); + uVar22 = (undefined4)(in_stack_fffffffffffffec8 >> 0x20); + plVar8 = plVar11; + local_e0 = lVar10; + if (lVar10 != 0) { + local_a8 = 0; + FUN_1423d59e0(&local_a8); + local_b0 = 0; + FUN_1423d59e0(&local_b0); + local_res20 = CONCAT44(local_res20._4_4_,uVar18) | 0xc; + in_stack_fffffffffffffee0 = + (undefined8 *)((ulonglong)in_stack_fffffffffffffee0 & 0xffffffffffffff00) + ; + plVar8 = (longlong *) + FUN_141c413b0(lVar10,param_1,1,local_c8,local_c0,(char)plVar20[3], + CONCAT44(uVar22,*(undefined4 *)(param_1 + 0x660)), + in_stack_fffffffffffffed0 & 0xffffffffffffff00,1, + in_stack_fffffffffffffee0,&local_b0,&local_a8); + uVar18 = uVar18 | 0xc; + } + *plVar20 = (longlong)plVar8; + uVar19 = uVar18; + if ((uVar18 & 8) != 0) { + uVar19 = uVar18 & 0xfffffff7; + local_res20 = CONCAT44(local_res20._4_4_,uVar18) & 0xfffffffffffffff7; + FUN_1423d59b0(&local_b0); + } + uVar18 = uVar19; + if ((uVar19 & 4) != 0) { + uVar18 = uVar19 & 0xfffffffb; + local_res20 = CONCAT44(local_res20._4_4_,uVar19) & 0xfffffffffffffffb; + FUN_1423d59b0(&local_a8); + } + puVar6 = (undefined8 *)*plVar20; + if (*(char *)((longlong)puVar6 + 0x31) == '\0') { + if (puVar6 != (undefined8 *)0x0) { + (**(code **)*puVar6)(puVar6,1); + } + lVar10 = FUN_14217c644(); + if (lVar10 != 0) { + plVar11 = (longlong *)FUN_1423d59e0(lVar10); + } +LAB_141b8baad: + iVar4 = 5; + uVar7 = FUN_1423ccd30(param_2,local_104); + FUN_1423d58d0(plVar11,uVar7); + } + else { + FUN_1423d58d0(plVar20 + 6,puVar6 + 9); + *(undefined4 *)(plVar20 + 1) = *(undefined4 *)(param_1 + 0x660); + *(int *)(param_1 + 0x660) = *(int *)(param_1 + 0x660) + 1; + *(undefined4 *)((longlong)plVar20 + 0xc) = 1; + *(undefined4 *)(plVar20 + 7) = 0xffffffff; + iVar5 = *(int *)(param_1 + 0x65c) + 1; + if (*(int *)(param_1 + 0x658) < iVar5) { + iVar12 = iVar5; + if (iVar5 < 0) { + iVar12 = *(int *)(param_1 + 0x65c) + 2; + } + FUN_140c708a0((longlong *)(param_1 + 0x650), + (iVar12 >> 1) + 8 + iVar5 & 0xfffffff8); + } + iVar5 = *(int *)(param_1 + 0x65c); + *(int *)(param_1 + 0x65c) = iVar5 + 1; + *(longlong **)(*(longlong *)(param_1 + 0x650) + (longlong)iVar5 * 8) = plVar20 + ; + local_108 = (int)plVar20[1]; + local_res18[0] = + CONCAT31(local_res18[0]._1_3_,*(undefined1 *)(*plVar20 + 0x6d)); + FUN_141b81990(param_1,local_68,local_108); + FUN_1423d59b0(local_68); + plVar11 = local_d0; + } + } + } + else { + *plVar20 = 0; + uVar7 = FUN_1423d59e0(&local_b8); + FUN_1423d5890(plVar20 + 6,uVar7); + FUN_1423d59b0(&local_b8); + *(undefined4 *)(plVar20 + 1) = *(undefined4 *)(param_1 + 0x660); + *(int *)(param_1 + 0x660) = *(int *)(param_1 + 0x660) + 1; + *(undefined4 *)((longlong)plVar20 + 0xc) = 1; + *(undefined4 *)(plVar20 + 7) = 0xffffffff; + iVar12 = *(int *)(param_1 + 0x65c); + iVar5 = iVar12 + 1; + if (*(int *)(param_1 + 0x658) < iVar5) { + if (iVar5 < 0) { + iVar5 = iVar12 + 2; + } + FUN_140c708a0((longlong *)(param_1 + 0x650), + iVar12 + 9 + (iVar5 >> 1) & 0xfffffff8); + } + iVar5 = *(int *)(param_1 + 0x65c); + *(int *)(param_1 + 0x65c) = iVar5 + 1; + *(longlong **)(*(longlong *)(param_1 + 0x650) + (longlong)iVar5 * 8) = plVar20; + local_108 = (int)plVar20[1]; + local_res18[0] = local_res18[0] & 0xffffff00; + plVar11 = local_d0; + } + FUN_1423d59b0(local_c8); + FUN_1423d59b0(local_c0); + } + LeaveCriticalSection((LPCRITICAL_SECTION)(param_1 + 0x740)); + } + if ((iVar4 != 0) && (plVar20 != (longlong *)0x0)) { + FUN_141b8e650(plVar20,1); + } + in_stack_fffffffffffffec0 = (ulonglong)(byte)local_res18[0]; + in_stack_fffffffffffffed0 = 0; + in_stack_fffffffffffffec8 = 0; + FUN_141ad57a0(param_1,2,(longlong)local_108,(longlong)iVar4,plVar11, + in_stack_fffffffffffffec0,0,0); + } + local_104 = local_104 + 1; + } while (local_104 < *(int *)((longlong)param_2 + 0xc)); + } + goto LAB_141b8c184; + } + } + while (iVar4 = iVar4 + -1, -1 < iVar4) { + uVar7 = FUN_1423ccd30(&local_100,iVar4); + puVar6 = (undefined8 *)FUN_1423ce820(local_res18,uVar7); + cVar2 = FUN_1423ccab0(param_2,*puVar6); + if (cVar2 != '\0') { + FUN_1423cc8c0(&local_100,iVar4); + } + } + local_f0 = (longlong *)0x0; + local_e8 = 0; + lVar10 = 0; + local_e0 = 0; + iVar5 = 0; + local_d8 = 0; + uVar18 = 0; + local_b8 = (LPCRITICAL_SECTION)(param_1 + 0x740); + EnterCriticalSection(local_b8); + local_res18[0] = 0; + iVar4 = local_f4; + uVar19 = 0; + if (0 < local_f4) { + do { + uVar18 = uVar19; + uVar15 = 0; + uVar19 = local_res18[0]; + if (0 < *(int *)(param_1 + 0x65c)) { + local_res20 = 0; +LAB_141b8bdb3: + if (uVar15 < *(uint *)(param_1 + 0x65c)) { + lVar16 = *(longlong *)(local_res20 + *(longlong *)(param_1 + 0x650)); + } + else { + lVar16 = 0; + } + cVar2 = FUN_1423d45a0(lVar16 + 0x10,"CLOUD"); + if (cVar2 != '\0') { + uVar7 = FUN_1423ccd30(&local_100,uVar19); + puVar6 = (undefined8 *)FUN_1423ce840(&local_58,"rbcloud://"); + cVar2 = FUN_1423d1780(uVar7,*puVar6); + uVar19 = local_res18[0]; + if (cVar2 == '\0') goto LAB_141b8bf70; + uVar19 = 0; + uVar21 = uVar18; + uVar13 = 0; + if (0 < (int)uVar18) { + do { + uVar19 = uVar13; + iVar4 = *(int *)(lVar10 + (longlong)(int)uVar19 * 4); + if ((iVar4 <= (int)uVar15) && ((int)uVar15 <= iVar4)) goto LAB_141b8bef8; + uVar13 = (int)(uVar19 + uVar21) >> 1; + iVar4 = *(int *)(lVar10 + (longlong)(int)uVar13 * 4); + if (uVar13 == uVar19) goto LAB_141b8bef3; + if ((int)uVar15 < iVar4) { + uVar14 = 0xffffffff; + } + else { + uVar14 = (uint)(iVar4 < (int)uVar15); + } + if ((int)uVar14 < 0) { + uVar21 = uVar13; + uVar13 = uVar19; + } + uVar19 = uVar13; + uVar13 = uVar19; + } while ((int)uVar19 < (int)uVar21); + } + goto LAB_141b8befa; + } + uVar7 = FUN_1423ccd30(&local_100,uVar19); + if (uVar15 < *(uint *)(param_1 + 0x65c)) { + lVar16 = *(longlong *)(local_res20 + *(longlong *)(param_1 + 0x650)); + } + else { + lVar16 = 0; + } + cVar2 = FUN_1423d4600(lVar16 + 0x20,uVar7); + if (cVar2 != '\0') { + uVar19 = 0; + uVar21 = uVar18; + uVar13 = 0; + if (0 < (int)uVar18) { + do { + uVar19 = uVar13; + iVar4 = *(int *)(lVar10 + (longlong)(int)uVar19 * 4); + if ((iVar4 <= (int)uVar15) && ((int)uVar15 <= iVar4)) goto LAB_141b8bef8; + uVar13 = (int)(uVar19 + uVar21) >> 1; + iVar4 = *(int *)(lVar10 + (longlong)(int)uVar13 * 4); + if (uVar13 == uVar19) goto LAB_141b8bef3; + if ((int)uVar15 < iVar4) { + uVar14 = 0xffffffff; + } + else { + uVar14 = (uint)(iVar4 < (int)uVar15); + } + if ((int)uVar14 < 0) { + uVar21 = uVar13; + uVar13 = uVar19; + } + uVar19 = uVar13; + uVar13 = uVar19; + } while ((int)uVar19 < (int)uVar21); + } + goto LAB_141b8befa; + } + goto LAB_141b8bf70; + } +LAB_141b8bfa1: + local_res18[0] = uVar19 + 1; + uVar19 = uVar18; + } while ((int)local_res18[0] < iVar4); + } + plVar11 = (longlong *)(param_1 + 0x650); + uVar19 = uVar18 - 1; + lVar16 = (longlong)(int)uVar19; + if (-1 < (int)uVar19) { + do { + lVar17 = lVar16 * 4; + if (uVar19 < uVar18) { + uVar15 = *(uint *)(lVar10 + lVar17); + } + else { + uVar15 = 0; + } + if (uVar15 < *(uint *)(param_1 + 0x65c)) { + plVar20 = *(longlong **)(*plVar11 + (longlong)(int)uVar15 * 8); + } + else { + plVar20 = (longlong *)0x0; + } + puVar6 = (undefined8 *)*plVar20; + if (puVar6 != (undefined8 *)0x0) { + (**(code **)*puVar6)(puVar6,1); + } + if (uVar19 < uVar18) { + uVar15 = *(uint *)(lVar10 + lVar17); + } + else { + uVar15 = 0; + } + if (uVar15 < *(uint *)(param_1 + 0x65c)) { + lVar24 = *(longlong *)(*plVar11 + (longlong)(int)uVar15 * 8); + } + else { + lVar24 = 0; + } + iVar4 = local_e8._4_4_ + 1; + iVar5 = local_e8._4_4_; + if ((int)local_e8 < iVar4) { + if (iVar4 < 0) { + iVar4 = local_e8._4_4_ + 2; + } + FUN_140c8ae10(&local_f0,local_e8._4_4_ + 9 + (iVar4 >> 1) & 0xfffffff8); + iVar5 = local_e8._4_4_; + } + local_e8 = CONCAT44(iVar5 + 1,(int)local_e8); + *(undefined4 *)((longlong)local_f0 + (longlong)iVar5 * 4) = *(undefined4 *)(lVar24 + 8); + if (uVar19 < uVar18) { + uVar15 = *(uint *)(lVar10 + lVar17); + } + else { + uVar15 = 0; + } + lVar17 = 0; + uVar21 = *(uint *)(param_1 + 0x65c); + if (uVar15 < uVar21) { + plVar20 = (longlong *)(*plVar11 + (longlong)(int)uVar15 * 8); + lVar17 = *plVar20; + FUN_1422fd540(plVar20,plVar20 + 1); + *(int *)(param_1 + 0x65c) = *(int *)(param_1 + 0x65c) + -1; + uVar21 = *(uint *)(param_1 + 0x65c); + } + if (((int)(uVar21 * 2) < *(int *)(param_1 + 0x658)) && + ((int)uVar21 < *(int *)(param_1 + 0x658))) { + FUN_140c708a0(plVar11); + } + if (lVar17 != 0) { + FUN_141b8e650(lVar17,1); + } + uVar19 = uVar19 - 1; + lVar16 = lVar16 + -1; + } while (-1 < lVar16); + } + LeaveCriticalSection(local_b8); + FUN_14230889c(lVar10); + plVar11 = local_f0; + uVar19 = 0; + uVar18 = local_e8._4_4_; + if (0 < (int)local_e8._4_4_) { + bVar25 = local_e8._4_4_ != 0; + plVar20 = local_f0; + do { + iVar4 = 0; + uVar22 = 0; + if (bVar25) { + uVar22 = (int)*plVar20; + } + FUN_141ad7ec0(param_1,1,uVar22); + if (bVar25) { + iVar4 = (int)*plVar20; + } + FUN_141ad57a0(param_1,3,(longlong)iVar4,0,0,0,0,0); + uVar19 = uVar19 + 1; + plVar20 = (longlong *)((longlong)plVar20 + 4); + bVar25 = uVar19 < uVar18; + } while ((int)uVar19 < (int)uVar18); + } + if ((uVar18 == 0) && (local_f4 != 0)) { + FUN_141ad57a0(param_1,3,0,0,0,0,0,0); + } + FUN_14230889c(plVar11); +LAB_141b8c184: + iVar4 = 0; + if (0 < local_f4) { + do { + FUN_1423d59b0(local_100 + (longlong)iVar4 * 8); + iVar4 = iVar4 + 1; + } while (iVar4 < local_f4); + } + local_f4 = 0; + FUN_14230889c(local_100); + return; +LAB_141b8bef3: + if (iVar4 <= (int)uVar15) { +LAB_141b8bef8: + uVar19 = uVar19 + 1; + } +LAB_141b8befa: + iVar4 = uVar18 + 1; + if (iVar5 < iVar4) { + iVar5 = iVar4; + if (iVar4 < 0) { + iVar5 = uVar18 + 2; + } + FUN_140c8ae10(&local_e0,(iVar5 >> 1) + 8 + iVar4 & 0xfffffff8); + lVar10 = local_e0; + uVar18 = local_d8._4_4_; + iVar5 = (int)local_d8; + } + if (uVar19 < uVar18) { + puVar23 = (uint *)(lVar10 + (longlong)(int)uVar19 * 4); + FUN_1422fd540(puVar23 + 1,puVar23); + } + else { + puVar23 = (uint *)(lVar10 + (longlong)(int)uVar18 * 4); + } + uVar18 = uVar18 + 1; + local_d8 = CONCAT44(uVar18,(int)local_d8); + *puVar23 = uVar15; + uVar19 = local_res18[0]; +LAB_141b8bf70: + uVar15 = uVar15 + 1; + local_res20 = local_res20 + 8; + iVar4 = local_f4; + if (*(int *)(param_1 + 0x65c) <= (int)uVar15) goto LAB_141b8bfa1; + goto LAB_141b8bdb3; +} + + + +//================ FUN_141aca850 @ 141aca850 ================ + +/* WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie */ +/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ + +void FUN_141aca850(longlong param_1) + +{ + undefined4 uVar1; + longlong lVar2; + char cVar3; + char cVar4; + undefined8 *puVar5; + undefined8 uVar6; + longlong lVar7; + longlong *plVar8; + undefined8 uVar9; + undefined8 *puVar10; + undefined8 *puVar11; + int iVar12; + uint uVar13; + longlong lVar14; + undefined1 auStack_5f8 [32]; + undefined8 local_5d8; + uint local_5c8; + undefined8 *local_5c0; + undefined8 *local_5b8; + int local_5ac; + char *local_5a8; + longlong local_5a0; + int local_594; + longlong local_590; + undefined8 uStack_588; + undefined4 local_580; + undefined1 local_578 [8]; + longlong local_570; + int local_564; + undefined **local_560; + longlong local_558; + undefined ***local_528; + undefined1 local_518 [1232]; + ulonglong local_48; + + local_48 = DAT_14519c398 ^ (ulonglong)auStack_5f8; + puVar11 = (undefined8 *)0x0; + local_5c8 = 0; + local_5c0 = (undefined8 *)((ulonglong)local_5c0 & 0xffffffff00000000); + lVar7 = *(longlong *)(param_1 + 0x4a8); + uVar9 = DAT_144c87478; + while (lVar7 == 0) { + cVar3 = FUN_1423c96e0(param_1); + if (cVar3 != '\0') { + return; + } + FUN_1423c9430(param_1,uVar9); + lVar7 = *(longlong *)(param_1 + 0x4a8); + } + *(undefined1 *)(param_1 + 0x4fc) = 1; + puVar5 = (undefined8 *)FUN_14217c644(0x78); + puVar10 = puVar11; + local_5b8 = puVar5; + if (puVar5 != (undefined8 *)0x0) { + local_5d8 = 0; + FUN_141a08b30(puVar5,0x1234,0,0); + *(undefined4 *)(puVar5 + 7) = 5; + puVar5[8] = 1; + puVar5[9] = 0xf; + puVar5[10] = 1; + *puVar5 = db::DBCommonMessage::vftable; + puVar5[0xb] = 0; + puVar5[0xc] = 0; + puVar5[0xd] = 0; + puVar5[0xe] = 0; + puVar10 = puVar5; + } + thunk_FUN_141a08cc0(*(undefined8 *)(param_1 + 0x4a8),puVar10); + if (*(longlong *)(param_1 + 0x4e8) != 0) { + puVar5 = (undefined8 *)FUN_14217c644(0x78); + puVar10 = puVar11; + local_5b8 = puVar5; + if (puVar5 != (undefined8 *)0x0) { + local_5d8 = 0; + FUN_141a08b30(puVar5,0x1234,0,0); + *(undefined4 *)(puVar5 + 7) = 5; + puVar5[8] = 1; + puVar5[9] = 0xf; + puVar5[10] = 1; + *puVar5 = db::DBCommonMessage::vftable; + puVar5[0xb] = 0; + puVar5[0xc] = 0; + puVar5[0xd] = 0; + puVar5[0xe] = 0; + puVar10 = puVar5; + } + thunk_FUN_141a08cc0(*(undefined8 *)(param_1 + 0x4e8),puVar10); + } + uVar6 = FUN_140ff8e40(local_518); + FUN_141ad87e0(param_1,0xf,uVar6); + FUN_140ff9950(local_518); + lVar7 = FUN_141b988e0(param_1); + if ((*(longlong *)(param_1 + 0x9a0) != 0) && (lVar7 != 0)) { + uVar6 = FUN_1419718d0(); + cVar3 = FUN_14197c3b0(uVar6); + if ((cVar3 != '\0') && + ((plVar8 = (longlong *)FUN_141c9e670(lVar7), plVar8 != (longlong *)0x0 && + (uVar13 = *(int *)((longlong)plVar8 + 0xc) - 1, -1 < (int)uVar13)))) { + lVar14 = (longlong)(int)uVar13; + do { + if ((uVar13 < *(uint *)((longlong)plVar8 + 0xc)) && + (lVar2 = *(longlong *)(*plVar8 + lVar14 * 8), lVar2 != 0)) { + local_5c0 = (undefined8 *)((ulonglong)local_5c0 & 0xffffffff00000000); + FUN_141ca0db0(lVar7,*(undefined4 *)(lVar2 + 8),&local_5c0,lVar2); + if ((((((ulonglong)local_5c0 & 1) == 0) || + (((((ulonglong)local_5c0 & 0x1000) != 0 || (((ulonglong)local_5c0 & 0x4000) != 0)) || + (((ulonglong)local_5c0 & 0x2000) != 0)))) && + ((*(char *)(lVar2 + 0x3a8) != '\0' && (((ulonglong)local_5c0 & 2) == 0)))) && + (((*(uint *)(lVar2 + 1000) >> 0x18 & 1) == 0 || + ((*(uint *)(lVar2 + 1000) >> 0x1b & 1) != 0)))) { + uVar6 = FUN_1423eb8a0(&local_5b8,lVar2 + 0x88); + cVar3 = FUN_1423afbb0(uVar6); + FUN_1423d59b0(&local_5b8); + if (cVar3 != '\0') { + if (*(longlong *)(param_1 + 0x4a8) != 0) { + puVar10 = (undefined8 *)FUN_14217c644(0x78); + local_5b8 = puVar10; + if (puVar10 == (undefined8 *)0x0) { + thunk_FUN_141a08cc0(*(undefined8 *)(param_1 + 0x4a8),0); + } + else { + local_5d8 = 0; + FUN_141a08b30(puVar10,0x1234,0,0); + *(undefined4 *)(puVar10 + 7) = 5; + puVar10[8] = 0xd; + puVar10[9] = 0; + puVar10[10] = 0; + *puVar10 = db::DBCommonMessage::vftable; + puVar10[0xb] = 0; + puVar10[0xc] = 0; + puVar10[0xd] = 0; + puVar10[0xe] = 0; + thunk_FUN_141a08cc0(*(undefined8 *)(param_1 + 0x4a8),puVar10); + } + } + break; + } + } + } + uVar13 = uVar13 - 1; + lVar14 = lVar14 + -1; + } while (-1 < lVar14); + } + } + FUN_1423d59e0(&local_5a8); + puVar10 = puVar11; + do { + cVar3 = FUN_1423c96e0(param_1); + if (cVar3 != '\0') goto LAB_141acb13b; + uVar6 = FUN_141a02330(&local_5b8); + FUN_1423d5890(&local_5a8,uVar6); + FUN_1423d59b0(&local_5b8); + if (*local_5a8 != '\0') break; + FUN_1423c9430(param_1,uVar9); + uVar13 = (int)puVar10 + 1; + puVar10 = (undefined8 *)(ulonglong)uVar13; + } while ((int)uVar13 < 100); + iVar12 = *(int *)(param_1 + 0x500); + if ((iVar12 != 0) && (*(longlong *)(param_1 + 0x4a8) != 0)) { + puVar5 = (undefined8 *)FUN_14217c644(0x78); + puVar10 = puVar11; + local_5b8 = puVar5; + if (puVar5 != (undefined8 *)0x0) { + local_5d8 = 0; + FUN_141a08b30(puVar5,0x1234,0,0); + *(undefined4 *)(puVar5 + 7) = 5; + puVar5[8] = 0xe; + puVar5[9] = 0; + puVar5[10] = (longlong)iVar12; + *puVar5 = db::DBCommonMessage::vftable; + puVar5[0xb] = 0; + puVar5[0xc] = 0; + puVar5[0xd] = 0; + puVar5[0xe] = 0; + puVar10 = puVar5; + } + thunk_FUN_141a08cc0(*(undefined8 *)(param_1 + 0x4a8),puVar10); + } + FUN_1423cd250(&local_5a0,param_1 + 0x498); + if (*(longlong *)(param_1 + 0x490) != 0) { + uVar9 = FUN_141a18d30(*(longlong *)(param_1 + 0x490),&local_5b8); + FUN_1423ccb40(&local_5a0,uVar9,0,0xffffffff); + puVar10 = puVar11; + if (0 < local_5ac) { + do { + FUN_1423d59b0(local_5b8 + (int)puVar10); + uVar13 = (int)puVar10 + 1; + puVar10 = (undefined8 *)(ulonglong)uVar13; + } while ((int)uVar13 < local_5ac); + } + local_5ac = 0; + FUN_14230889c(local_5b8); + } + FUN_141b8b4c0(param_1,&local_5a0); + local_560 = std::_Func_impl_no_alloc<,void>::vftable; + local_528 = &local_560; + local_558 = param_1; + FUN_1424704f0(&local_560); + local_560 = std::_Func_impl_no_alloc<,void>::vftable; + local_528 = &local_560; + local_558 = param_1; + FUN_1424704f0(&local_560); + if (*(longlong *)(param_1 + 0x9a0) != 0) { + local_590 = _DAT_143135940; + uStack_588 = _UNK_143135948; + local_580 = 0; + cVar3 = FUN_141c79800(&local_5c0,&local_590); + if (((cVar3 != '\0') && ((int)local_5c0 == 2)) && (*(longlong *)(param_1 + 0x4a8) != 0)) { + puVar10 = (undefined8 *)FUN_14217c644(0x78); + local_5b8 = puVar10; + if (puVar10 != (undefined8 *)0x0) { + local_5d8 = 0; + FUN_141a08b30(puVar10,0x1234,0,0); + *(undefined4 *)(puVar10 + 7) = 5; + puVar10[8] = 0x15; + puVar10[9] = 0; + puVar10[10] = 0; + *puVar10 = db::DBCommonMessage::vftable; + puVar10[0xb] = 0; + puVar10[0xc] = 0; + puVar10[0xd] = 0; + puVar10[0xe] = 0; + puVar11 = puVar10; + } + thunk_FUN_141a08cc0(*(undefined8 *)(param_1 + 0x4a8),puVar11); + } + } + cVar3 = FUN_1423c96e0(param_1); + uVar9 = DAT_144c874b8; + do { + if (cVar3 != '\0') { +LAB_141acb108: + iVar12 = 0; + if (0 < local_594) { + do { + FUN_1423d59b0(local_5a0 + (longlong)iVar12 * 8); + iVar12 = iVar12 + 1; + } while (iVar12 < local_594); + } + local_594 = 0; + FUN_14230889c(local_5a0); +LAB_141acb13b: + FUN_1423d59b0(&local_5a8); + return; + } + puVar11 = (undefined8 *)FUN_141a09090(param_1 + 0x250,0xffffffff); + if (puVar11 == (undefined8 *)0x0) { + FUN_1423d5720(local_578,"common message parameter error"); + FUN_1423ac220(local_578); + FUN_1423d59b0(local_578); + } + else { + if (*(int *)(puVar11 + 7) == 1) { + (**(code **)*puVar11)(puVar11,1); + goto LAB_141acb108; + } + puVar10 = (undefined8 *)puVar11[8]; + if ((*(int *)(puVar11 + 7) != 100) || (puVar10 == (undefined8 *)0x0)) { + FUN_1423d5720(&local_5b8,"message parameter error"); + FUN_1423ac220(&local_5b8); + FUN_1423d59b0(&local_5b8); + (**(code **)*puVar11)(puVar11,1); + goto LAB_141acb0e6; + } + *(undefined4 *)(param_1 + 0x73c) = *(undefined4 *)((longlong)puVar10 + 0xc); + uVar1 = *(undefined4 *)(puVar10 + 1); + cVar3 = '\0'; + cVar4 = FUN_1423c96e0(param_1); + while ((cVar4 == '\0' && (cVar3 = FUN_1423aa4b0(param_1 + 0x610), cVar3 == '\0'))) { + FUN_1423c9430(param_1,uVar9); + cVar4 = FUN_1423c96e0(param_1); + } + switch(uVar1) { + case 1: + cVar4 = FUN_1423c96e0(param_1); + if (cVar4 == '\0') { + if (*(longlong *)(param_1 + 0x490) == 0) { + uVar6 = FUN_1423cd280(&local_570); + uVar13 = local_5c8 | 2; + } + else { + uVar6 = FUN_141a18d30(*(longlong *)(param_1 + 0x490),&local_590); + uVar13 = local_5c8 | 1; + } + local_5c0 = (undefined8 *)CONCAT44(local_5c0._4_4_,uVar13); + local_5c8 = uVar13; + FUN_141b8b4c0(param_1,uVar6); + if ((uVar13 & 2) != 0) { + uVar13 = uVar13 & 0xfffffffd; + iVar12 = 0; + local_5c8 = uVar13; + if (0 < local_564) { + do { + FUN_1423d59b0(local_570 + (longlong)iVar12 * 8); + iVar12 = iVar12 + 1; + } while (iVar12 < local_564); + } + local_564 = 0; + FUN_14230889c(local_570); + } + if ((uVar13 & 1) != 0) { + local_5c8 = uVar13 & 0xfffffffe; + iVar12 = 0; + if (0 < uStack_588._4_4_) { + do { + FUN_1423d59b0(local_590 + (longlong)iVar12 * 8); + iVar12 = iVar12 + 1; + } while (iVar12 < uStack_588._4_4_); + } + uStack_588 = uStack_588 & 0xffffffff; + FUN_14230889c(local_590); + } + } + break; + case 2: + local_5c0 = puVar10; + cVar4 = FUN_1423c96e0(param_1); + if (cVar4 == '\0') { + FUN_141b0a540(param_1,puVar10); + } + (**(code **)*puVar10)(puVar10,1); + FUN_1423aa1e0(); + goto LAB_141acb08b; + case 4: + cVar4 = FUN_1423c96e0(param_1); + if (cVar4 == '\0') { + FUN_141b395e0(param_1,puVar10); + } + break; + case 5: + cVar4 = FUN_1423c96e0(param_1); + if (cVar4 == '\0') { + FUN_141ad8260(param_1); + } + break; + case 6: + cVar4 = FUN_1423c96e0(param_1); + if (cVar4 == '\0') { + FUN_141ad8520(param_1); + } + break; + case 7: + cVar4 = FUN_1423c96e0(param_1); + if (cVar4 == '\0') { + FUN_141b95950(param_1,0,0); + } + } + (**(code **)*puVar10)(puVar10,1); +LAB_141acb08b: + if (cVar3 != '\0') { + LeaveCriticalSection((LPCRITICAL_SECTION)(param_1 + 0x610)); + } + (**(code **)*puVar11)(puVar11,1); + } +LAB_141acb0e6: + cVar3 = FUN_1423c96e0(param_1); + } while( true ); +} + + + +//================ FUN_1423c9ab0 @ 1423c9ab0 ================ + +void FUN_1423c9ab0(longlong *param_1) + +{ + int *piVar1; + int iVar2; + ulonglong uVar3; + uint uVar4; + ulonglong *puVar5; + longlong lVar6; + longlong lVar7; + char cVar8; + DWORD DVar9; + undefined8 *puVar10; + HANDLE hThread; + undefined8 *local_res18 [2]; + + FUN_1423c9c20(local_res18); + puVar10 = (undefined8 *)FUN_140c6d7f0(local_res18[0] + 2); + *puVar10 = param_1; + cVar8 = FUN_1423a8dc0(param_1 + 0x12,DAT_144c87620); + if (cVar8 != '\0') { + if ((int)param_1[0x3d] != 0) { + uVar4 = *(uint *)(param_1 + 0x3d); + hThread = GetCurrentThread(); + SetThreadAffinityMask(hThread,(ulonglong)uVar4); + } + MXCSR = MXCSR | 0x8000; + (**(code **)(*param_1 + 8))(param_1); + } + puVar10 = local_res18[0]; + DVar9 = GetCurrentThreadId(); + for (puVar5 = (ulonglong *)puVar10[2]; puVar5 != (ulonglong *)0x0; puVar5 = (ulonglong *)puVar5[1] + ) { + LOCK(); + uVar3 = *puVar5; + if (DVar9 == uVar3) { + *puVar5 = 0; + } + UNLOCK(); + if (DVar9 == uVar3) break; + } + cVar8 = *(char *)((longlong)param_1 + 0x1ec); + CloseHandle((HANDLE)param_1[2]); + LOCK(); + param_1[3] = 0; + UNLOCK(); + LOCK(); + param_1[2] = 0; + UNLOCK(); + if (cVar8 != '\0') { + (**(code **)*param_1)(param_1,1); + } + if (local_res18[0] != (undefined8 *)0x0) { + LOCK(); + piVar1 = (int *)(local_res18[0] + 1); + iVar2 = *piVar1; + *piVar1 = *piVar1 + -1; + UNLOCK(); + if (iVar2 == 1) { + lVar7 = local_res18[0][2]; + while (lVar7 != 0) { + lVar6 = *(longlong *)(lVar7 + 8); + thunk_FUN_14217cc5c(lVar7,0x18); + lVar7 = lVar6; + } + *local_res18[0] = juce::ReferenceCountedObject::vftable; + thunk_FUN_14217cc5c(local_res18[0],0x18); + return; + } + } + return; +} + + diff --git a/maple-py/re/findings/findpdb.txt b/maple-py/re/findings/findpdb.txt new file mode 100644 index 0000000..a52ca42 --- /dev/null +++ b/maple-py/re/findings/findpdb.txt @@ -0,0 +1,1106 @@ +===== STRING XREFS ===== + +STRING @ 142ec5914 : /ANLZ + xref from 140ea2cb3 in FUN_140ea2580 @ 140ea2580 + +STRING @ 142ec6dc8 : ANLZ0000.DAT + xref from 140ec149c in FUN_140ec1320 @ 140ec1320 + +STRING @ 142ec6dd8 : ANLZ0000.EXT + xref from 140ec1444 in FUN_140ec1320 @ 140ec1320 + +STRING @ 142ec6df8 : ANLZ%04X.DAT + xref from 140ec1b14 in FUN_140ec1b00 @ 140ec1b00 + xref from 140ec1890 in FUN_140ec1730 @ 140ec1730 + +STRING @ 142ec76a0 : ----:com.apple.iTunes:ORIGINAL ARTIST + xref from 140ecbe53 in FUN_140ecbd50 @ 140ecbd50 + +STRING @ 142ece220 : PIONEER + xref from 140f37eb0 in FUN_140f37e50 @ 140f37e50 + +STRING @ 142ece230 : .PIONEER + +STRING @ 142ece248 : USBANLZ + xref from 140f37ed0 in FUN_140f37e50 @ 140f37e50 + +STRING @ 142f35958 : songs cannot be registered to HOT CUE BANK LIST. + xref from 1410e5e29 in FUN_1410e5c00 @ 1410e5c00 + +STRING @ 142f35990 : HOT CUE BANK LIST Error + xref from 1410e5e4e in FUN_1410e5c00 @ 1410e5c00 + +STRING @ 142f528d8 : PIONEER + xref from 1411796d9 in FUN_141179690 @ 141179690 + +STRING @ 142f528e8 : rekordbox/export.pdb + xref from 14117c011 in FUN_14117be20 @ 14117be20 + +STRING @ 142f5e970 : /.PIONEER/rekordbox/export.pdb + xref from 14119d909 in FUN_14119d2d0 @ 14119d2d0 + +STRING @ 142f5e990 : /PIONEER/rekordbox/export.pdb + xref from 14119d96b in FUN_14119d2d0 @ 14119d2d0 + +STRING @ 142f62298 : /PIONEER + xref from 1411b4212 in FUN_1411b3c10 @ 1411b3c10 + +STRING @ 1430162d0 : PIONEER XDJ-RX + xref from 141430082 in FUN_14142fed0 @ 14142fed0 + +STRING @ 143023248 : PIONEER DDJ-SX2 + xref from 1414690d6 in FUN_1414690c0 @ 1414690c0 + +STRING @ 143023258 : PIONEER DDJ-SX + xref from 1414690f7 in FUN_1414690c0 @ 1414690c0 + +STRING @ 143023268 : PIONEER DDJ-SX2 + xref from 141468fb6 in FUN_141468f70 @ 141468f70 + +STRING @ 143023278 : PIONEER DDJ-SX + xref from 141468fde in FUN_141468f70 @ 141468f70 + +STRING @ 14303cee0 : PIONEER XDJ-RX + xref from 1414b3121 in FUN_1414b3030 @ 1414b3030 + +STRING @ 14303cf70 : PIONEER XDJ-RX + xref from 1414b33c2 in FUN_1414b32f0 @ 1414b32f0 + +STRING @ 1430c2550 : PIONEER + +STRING @ 1430c8ab8 : PIONEER DDJ-SX2 + xref from 1416824d2 in FUN_1416822a0 @ 1416822a0 + +STRING @ 1430c8ac8 : PIONEER DDJ-SX2 2IN2OUT + xref from 1416824f5 in FUN_1416822a0 @ 1416822a0 + +STRING @ 1430c8ae0 : PIONEER DDJ-SX + xref from 141682518 in FUN_1416822a0 @ 1416822a0 + +STRING @ 1430c8af0 : PIONEER DDJ-SR + xref from 14168253f in FUN_1416822a0 @ 1416822a0 + +STRING @ 1430c8b20 : PIONEER DDJ-WeGO3 + xref from 1416825db in FUN_1416822a0 @ 1416822a0 + +STRING @ 1430c8b38 : PIONEER DDJ-WeGO2 + xref from 141682602 in FUN_1416822a0 @ 1416822a0 + +STRING @ 1430c8b50 : PIONEER DDJ-WeGO + xref from 141682629 in FUN_1416822a0 @ 1416822a0 + +STRING @ 1430c8bb8 : PIONEER CDJ-2000 + xref from 141682705 in FUN_1416822a0 @ 1416822a0 + +STRING @ 1430c8bd0 : PIONEER CDJ-900nexus + xref from 141682724 in FUN_1416822a0 @ 1416822a0 + +STRING @ 1430c8be8 : PIONEER CDJ-900 + xref from 141682747 in FUN_1416822a0 @ 1416822a0 + +STRING @ 1430c8bf8 : PIONEER CDJ-850 + xref from 14168276a in FUN_1416822a0 @ 1416822a0 + +STRING @ 1430c8c08 : PIONEER CDJ-350 + xref from 14168278d in FUN_1416822a0 @ 1416822a0 + +STRING @ 1430c8c18 : PIONEER CDJ-400 + xref from 1416827b0 in FUN_1416822a0 @ 1416822a0 + +STRING @ 1430c8c38 : PIONEER XDJ-1000 + xref from 1416827f6 in FUN_1416822a0 @ 1416822a0 + +STRING @ 1430c8cb0 : PIONEER XDJ-RX + xref from 1416828ff in FUN_1416822a0 @ 1416822a0 + +STRING @ 1430c8cc0 : PIONEER XDJ-AERO + xref from 141682926 in FUN_1416822a0 @ 1416822a0 + +STRING @ 1430c8cd8 : PIONEER XDJ-R1 + xref from 14168294d in FUN_1416822a0 @ 1416822a0 + +STRING @ 1430c8db8 : PIONEER DJM-T1 + xref from 141682bde in FUN_1416822a0 @ 1416822a0 + +STRING @ 1430ca700 : PIONEER DDJ-SX2 + xref from 141686ef0 in FUN_141686c40 @ 141686c40 + +STRING @ 1430ca710 : PIONEER DDJ-SX2 2IN2OUT + xref from 141686f0b in FUN_141686c40 @ 141686c40 + +STRING @ 1430ca728 : PIONEER DDJ-SX + xref from 141686f26 in FUN_141686c40 @ 141686c40 + +STRING @ 1430ca738 : PIONEER DDJ-SR + xref from 141686f41 in FUN_141686c40 @ 141686c40 + +STRING @ 1430ca768 : PIONEER DDJ-WeGO3 + xref from 141686fad in FUN_141686c40 @ 141686c40 + +STRING @ 1430ca780 : PIONEER DDJ-WeGO2 + xref from 141686fc8 in FUN_141686c40 @ 141686c40 + +STRING @ 1430ca798 : PIONEER DDJ-WeGO + xref from 141686fe3 in FUN_141686c40 @ 141686c40 + +STRING @ 1430ca7f0 : PIONEER CDJ-2000 + xref from 14168706a in FUN_141686c40 @ 141686c40 + +STRING @ 1430ca808 : PIONEER CDJ-900nexus + xref from 141687085 in FUN_141686c40 @ 141686c40 + +STRING @ 1430ca820 : PIONEER CDJ-900 + xref from 1416870a0 in FUN_141686c40 @ 141686c40 + +STRING @ 1430ca830 : PIONEER CDJ-850 + xref from 1416870bb in FUN_141686c40 @ 141686c40 + +STRING @ 1430ca840 : PIONEER CDJ-350 + xref from 1416870d6 in FUN_141686c40 @ 141686c40 + +STRING @ 1430ca850 : PIONEER CDJ-400 + xref from 1416870f1 in FUN_141686c40 @ 141686c40 + +STRING @ 1430ca870 : PIONEER XDJ-1000 + xref from 141687127 in FUN_141686c40 @ 141686c40 + +STRING @ 1430ca8d0 : PIONEER XDJ-RX + xref from 1416871c9 in FUN_141686c40 @ 141686c40 + +STRING @ 1430ca8e0 : PIONEER XDJ-R1 + xref from 1416871e4 in FUN_141686c40 @ 141686c40 + +STRING @ 1430caa08 : PIONEER CDJ-2000 + xref from 141689f87 in FUN_141689f50 @ 141689f50 + +STRING @ 1430caa20 : PIONEER CDJ-900nexus + xref from 141689f9e in FUN_141689f50 @ 141689f50 + +STRING @ 1430caa38 : PIONEER CDJ-900 + xref from 141689fb5 in FUN_141689f50 @ 141689f50 + +STRING @ 1430caa48 : PIONEER CDJ-850 + xref from 141689fcc in FUN_141689f50 @ 141689f50 + +STRING @ 1430caa58 : PIONEER CDJ-350 + xref from 141689fdf in FUN_141689f50 @ 141689f50 + +STRING @ 1430caa68 : PIONEER CDJ-400 + xref from 141689ff2 in FUN_141689f50 @ 141689f50 + +STRING @ 1430caa88 : PIONEER XDJ-1000 + xref from 14168a018 in FUN_141689f50 @ 141689f50 + +STRING @ 1430cac60 : PIONEER XDJ-RX + xref from 141688407 in FUN_141687a00 @ 141687a00 + +STRING @ 1430cac80 : PIONEER XDJ-R1 + xref from 1416884ee in FUN_141687a00 @ 141687a00 + +STRING @ 1430cad48 : PIONEER DDJ-SX2 + xref from 141688a4a in FUN_141687a00 @ 141687a00 + +STRING @ 1430cad78 : PIONEER DDJ-SX + xref from 141688b0e in FUN_141687a00 @ 141687a00 + +STRING @ 1430cada8 : PIONEER DDJ-SR + xref from 141688bd2 in FUN_141687a00 @ 141687a00 + +STRING @ 1430cae50 : PIONEER DDJ-WeGO3 + xref from 141688ee2 in FUN_141687a00 @ 141687a00 + +STRING @ 1430cae88 : PIONEER DDJ-WeGO2 + xref from 141688fa6 in FUN_141687a00 @ 141687a00 + +STRING @ 1430caec0 : PIONEER DDJ-WeGO + xref from 14168906a in FUN_141687a00 @ 141687a00 + +STRING @ 1430d4c10 : /PIONEER + xref from 14169b73b in FUN_14169b5a0 @ 14169b5a0 + +STRING @ 1430dabf8 : PIONEER/rekordbox + xref from 1416b4ee5 in FUN_1416b4e70 @ 1416b4e70 + +STRING @ 1430dac10 : PIONEER/rekordbox + xref from 1416b4f36 in FUN_1416b4e70 @ 1416b4e70 + +STRING @ 1430dac28 : .PIONEER/rekordbox + xref from 1416b4f96 in FUN_1416b4e70 @ 1416b4e70 + +STRING @ 1430dac40 : .PIONEER/rekordbox + xref from 1416b4fe7 in FUN_1416b4e70 @ 1416b4e70 + +STRING @ 1430e1070 : /rekordbox_cloud/PIONEER/rekordbox + xref from 1416ef9e7 in FUN_1416ef7e0 @ 1416ef7e0 + +STRING @ 1430e10c8 : rekordbox_cloud/PIONEER/rekordbox + xref from 1416f1866 in FUN_1416f1430 @ 1416f1430 + xref from 1416efb56 in FUN_1416ef7e0 @ 1416ef7e0 + +STRING @ 1430e19e0 : rekordbox_cloud/PIONEER/rekordbox/export.pdb + xref from 1416f4c0f in FUN_1416f4b30 @ 1416f4b30 + +STRING @ 1430e1a18 : rekordbox_cloud/PIONEER/rekordbox/exportExt.pdb + xref from 1416f4ce1 in FUN_1416f4b30 @ 1416f4b30 + +STRING @ 1430e1a50 : /rekordbox_cloud/PIONEER/rekordbox/export.pdb.upload + xref from 1416f4ebb in FUN_1416f4b30 @ 1416f4b30 + +STRING @ 1430e1aa0 : /rekordbox_cloud/PIONEER/rekordbox/exportExt.pdb.upload + xref from 1416f4f98 in FUN_1416f4b30 @ 1416f4b30 + +STRING @ 1430e1b78 : rekordbox_cloud/PIONEER/rekordbox/export.pdb + xref from 1416f53fa in FUN_1416f5320 @ 1416f5320 + +STRING @ 1430e1bb0 : rekordbox_cloud/PIONEER/rekordbox/exportExt.pdb + xref from 1416f54cd in FUN_1416f5320 @ 1416f5320 + +STRING @ 1430e1f68 : rekordbox_cloud/PIONEER/rekordbox/export.pdb + xref from 1416f1c08 in FUN_1416f1430 @ 1416f1430 + +STRING @ 1430e1f98 : rekordbox_cloud/PIONEER/rekordbox/exportExt.pdb + xref from 1416f1c5a in FUN_1416f1430 @ 1416f1430 + +STRING @ 1430e1fc8 : rekordbox_cloud/PIONEER/rekordbox/export.pdb + xref from 1416f1f62 in FUN_1416f1430 @ 1416f1430 + +STRING @ 1430e1ff8 : rekordbox_cloud/PIONEER/rekordbox/exportExt.pdb + xref from 1416f1faf in FUN_1416f1430 @ 1416f1430 + +STRING @ 1430e64d8 : rekordbox_cloud/PIONEER/rekordbox/export.pdb.upload + xref from 14173022b in FUN_141730190 @ 141730190 + +STRING @ 1430e6510 : rekordbox_cloud/PIONEER/rekordbox/exportExt.pdb.upload + xref from 141730336 in FUN_141730190 @ 141730190 + +STRING @ 1430e6b60 : export.pdb + xref from 14171b1dd in FUN_14171b110 @ 14171b110 + xref from 14171939a in FUN_1417192e0 @ 1417192e0 + +STRING @ 1430e6b70 : PIONEER/rekordbox/export.pdb + xref from 141719410 in FUN_1417192e0 @ 1417192e0 + +STRING @ 1430e6b90 : /rekordbox_cloud/PIONEER/rekordbox/export.pdb.upload + xref from 141719478 in FUN_1417192e0 @ 1417192e0 + +STRING @ 1430e6bc8 : exportExt.pdb + xref from 14171b299 in FUN_14171b110 @ 14171b110 + xref from 1417194a8 in FUN_1417192e0 @ 1417192e0 + +STRING @ 1430e6bd8 : PIONEER/rekordbox/exportExt.pdb + xref from 14171951e in FUN_1417192e0 @ 1417192e0 + +STRING @ 1430e6bf8 : /rekordbox_cloud/PIONEER/rekordbox/exportExt.pdb.upload + xref from 141719586 in FUN_1417192e0 @ 1417192e0 + +STRING @ 1430e6c70 : rekordbox_cloud/PIONEER/rekordbox/export.pdb + xref from 14171b191 in FUN_14171b110 @ 14171b110 + +STRING @ 1430e6ca0 : rekordbox_cloud/PIONEER/rekordbox/exportExt.pdb + xref from 14171b24d in FUN_14171b110 @ 14171b110 + +STRING @ 1430ec618 : PIONEER + xref from 14175050e in FUN_1417503e0 @ 1417503e0 + +STRING @ 143115e28 : PIONEER XDJ-RX + xref from 1417a9f35 in FUN_1417a9e20 @ 1417a9e20 + +STRING @ 1431417a0 : PIONEER DJ + xref from 141822dea in FUN_141822db0 @ 141822db0 + xref from 14182432d in FUN_1418242f0 @ 1418242f0 + xref from 141822d1c in FUN_141822cf0 @ 141822cf0 + +STRING @ 1431417e0 : PIONEER + xref from 1418234c4 in FUN_1418233d0 @ 1418233d0 + +STRING @ 1431417e8 : PIONEER + xref from 1418235f0 in FUN_1418233d0 @ 1418233d0 + +STRING @ 1431417f0 : PIONEER + xref from 14182362e in FUN_1418233d0 @ 1418233d0 + +STRING @ 14314d378 : PIONEER DDJ-SX2 + xref from 14184183c in FUN_1418412a0 @ 1418412a0 + +STRING @ 14314d3a0 : PIONEER DDJ-SX2 + xref from 141841932 in FUN_1418412a0 @ 1418412a0 + +STRING @ 14314d3d8 : PIONEER DDJ-SX + xref from 141841a3b in FUN_1418412a0 @ 1418412a0 + +STRING @ 14314d3e8 : PIONEER DDJ-SR + xref from 141841a70 in FUN_1418412a0 @ 1418412a0 + +STRING @ 14314d418 : PIONEER DDJ-WeGO3 + xref from 141841b38 in FUN_1418412a0 @ 1418412a0 + +STRING @ 14314d430 : PIONEER DDJ-WeGO2 + xref from 141841b67 in FUN_1418412a0 @ 1418412a0 + +STRING @ 14314d448 : PIONEER DDJ-WeGO + xref from 141841b92 in FUN_1418412a0 @ 1418412a0 + +STRING @ 143151f70 : PIONEER DJM-T1 + xref from 14184ea33 in FUN_14184dfd0 @ 14184dfd0 + +STRING @ 143152078 : PIONEER DJM-T1 + xref from 14184f042 in FUN_14184dfd0 @ 14184dfd0 + +STRING @ 143177250 : PIONEER XDJ-RX + xref from 1418a1c9d in FUN_1418a1c50 @ 1418a1c50 + +STRING @ 1431807e0 : /PIONEER + xref from 1418b8634 in FUN_1418b8350 @ 1418b8350 + +STRING @ 143180808 : /share/PIONEER + xref from 1418b8659 in FUN_1418b8350 @ 1418b8350 + +STRING @ 143180860 : /PIONEER + xref from 1418b88de in FUN_1418b8740 @ 1418b8740 + +STRING @ 1431bdd40 : PIONEER + xref from 14194ab34 in FUN_14194ab00 @ 14194ab00 + xref from 14194c6ef in FUN_14194c6b0 @ 14194c6b0 + xref from 14194aab4 in FUN_14194aab0 @ 14194aab0 + xref from 14194c948 in FUN_14194c8b0 @ 14194c8b0 + xref from 14194cb8c in FUN_14194c8b0 @ 14194c8b0 + xref from 14194df5f in FUN_14194df20 @ 14194df20 + xref from 14194d0ca in FUN_14194d060 @ 14194d060 + +STRING @ 1431bdd90 : PIONEER + xref from 14194e574 in FUN_14194e480 @ 14194e480 + +STRING @ 1431bdd98 : PIONEER + xref from 14194e6a0 in FUN_14194e480 @ 14194e480 + +STRING @ 1431bdda0 : PIONEER + xref from 14194e6de in FUN_14194e480 @ 14194e480 + +STRING @ 1431c6f20 : PIONEER DDJ-SX2 + xref from 1419691d4 in FUN_1419690d0 @ 1419690d0 + +STRING @ 1431c6f30 : PIONEER DDJ-SX2 2IN2OUT + xref from 141969220 in FUN_1419690d0 @ 1419690d0 + +STRING @ 1431cb170 : PIONEER XDJ-RX + xref from 14198467e in FUN_141984600 @ 141984600 + +STRING @ 1431cb180 : PIONEER XDJ-AERO + xref from 1419846ab in FUN_141984600 @ 141984600 + +STRING @ 1431cb210 : PIONEER DJM-T1 + xref from 14198492e in FUN_141984600 @ 141984600 + +STRING @ 1431cb3c0 : PIONEER DDJ-SX2 + xref from 141996b0d in FUN_141996af0 @ 141996af0 + +STRING @ 1431cb3d0 : PIONEER DDJ-SX2 2IN2OUT + xref from 141996b77 in FUN_141996af0 @ 141996af0 + +STRING @ 1431cb958 : PIONEER DDJ-SX2 + xref from 14199f427 in FUN_14199f030 @ 14199f030 + +STRING @ 1431cb968 : PIONEER DDJ-SX2 2IN2OUT + xref from 14199f489 in FUN_14199f030 @ 14199f030 + +STRING @ 1431d17d0 : PIONEER DJM-T1 + xref from 1419b8a46 in FUN_1419b87e0 @ 1419b87e0 + +STRING @ 1431d1f38 : PIONEER DJM-T1 + xref from 1419ba5e2 in FUN_1419ba460 @ 1419ba460 + +STRING @ 14326ed00 : /PIONEER + xref from 141ac00d8 in FUN_141abffb0 @ 141abffb0 + +STRING @ 14326ed70 : PIONEER/rekordbox + xref from 141abf09f in FUN_141abee30 @ 141abee30 + +STRING @ 14326ed88 : PIONEER + xref from 141abf111 in FUN_141abee30 @ 141abee30 + +STRING @ 14326ed90 : PIONEER/USBANLZ + xref from 141abf183 in FUN_141abee30 @ 141abee30 + +STRING @ 14326eda0 : PIONEER/Artwork + xref from 141abf1f5 in FUN_141abee30 @ 141abee30 + +STRING @ 14326ee10 : export.pdb + xref from 141abf400 in FUN_141abee30 @ 141abee30 + +STRING @ 14326ee20 : exportExt.pdb + xref from 141abf44c in FUN_141abee30 @ 141abee30 + +STRING @ 14326ef68 : /PIONEER + xref from 141ac18da in FUN_141ac18c0 @ 141ac18c0 + +STRING @ 14326ef80 : /PIONEER + xref from 141ac198a in FUN_141ac1970 @ 141ac1970 + +STRING @ 14326ef98 : /PIONEER + xref from 141ac1a49 in FUN_141ac1a20 @ 141ac1a20 + +STRING @ 14326efa8 : /PIONEER + xref from 141ac1aea in FUN_141ac1aa0 @ 141ac1aa0 + +STRING @ 14326efd0 : /PIONEER + xref from 141ac1c61 in FUN_141ac1c20 @ 141ac1c20 + +STRING @ 14326eff8 : /PIONEER + xref from 141ac1de1 in FUN_141ac1da0 @ 141ac1da0 + +STRING @ 143271530 : PIONEER + xref from 141ac770f in FUN_141ac7580 @ 141ac7580 + +STRING @ 143271570 : USBANLZ + xref from 141ac778d in FUN_141ac7580 @ 141ac7580 + +STRING @ 143271700 : /PIONEER + xref from 141ac8424 in FUN_141ac7580 @ 141ac7580 + +STRING @ 143271988 : /share/PIONEER + xref from 141ad68cf in FUN_141ad67b0 @ 141ad67b0 + +STRING @ 1432719a8 : /PIONEER + xref from 141ad6918 in FUN_141ad67b0 @ 141ad67b0 + +STRING @ 143271e58 : /export.pdb + xref from 141acc17b in FUN_141acc0b0 @ 141acc0b0 + +STRING @ 143271e68 : /PIONEER + xref from 141acc19c in FUN_141acc0b0 @ 141acc0b0 + +STRING @ 143271e88 : /export.pdb + xref from 141acc633 in FUN_141acc5e0 @ 141acc5e0 + +STRING @ 143271e98 : /PIONEER/rekordbox/export.pdb + xref from 141acc647 in FUN_141acc5e0 @ 141acc5e0 + +STRING @ 143271eb8 : /exportExt.pdb + xref from 141acc67f in FUN_141acc5e0 @ 141acc5e0 + +STRING @ 143271ec8 : /PIONEER/rekordbox/exportExt.pdb + xref from 141acc693 in FUN_141acc5e0 @ 141acc5e0 + +STRING @ 143271ef8 : /PIONEER + xref from 141acc753 in FUN_141acc700 @ 141acc700 + +STRING @ 143271f18 : /PIONEER/MYSETTING2.DAT + xref from 141acc788 in FUN_141acc700 @ 141acc700 + +STRING @ 143271f40 : /PIONEER/MYSETTING.DAT + xref from 141acc7d4 in FUN_141acc700 @ 141acc700 + +STRING @ 143271f58 : /PIONEER/MYSETTING2.DAT + xref from 141acc863 in FUN_141acc850 @ 141acc850 + +STRING @ 143271f70 : /PIONEER/MYSETTING.DAT + xref from 141acc88d in FUN_141acc850 @ 141acc850 + +STRING @ 143271f88 : /PIONEER/MYSETTING2.DAT + xref from 141acc8e3 in FUN_141acc8d0 @ 141acc8d0 + +STRING @ 143271fa0 : /PIONEER/MYSETTING.DAT + xref from 141acc90d in FUN_141acc8d0 @ 141acc8d0 + +STRING @ 143271fc0 : /PIONEER + xref from 141acc9a5 in FUN_141acc950 @ 141acc950 + +STRING @ 143271fe0 : /PIONEER/DEVSETTING.DAT + xref from 141acc9de in FUN_141acc950 @ 141acc950 + +STRING @ 143271ff8 : /PIONEER/DEVSETTING.DAT + xref from 141acca73 in FUN_141acca60 @ 141acca60 + +STRING @ 143272010 : /PIONEER + xref from 141accc5f in FUN_141accbd0 @ 141accbd0 + +STRING @ 1432720b0 : /PIONEER + xref from 141acd06d in FUN_141accee0 @ 141accee0 + +STRING @ 143272108 : /PIONEER + xref from 141acd3f6 in FUN_141acd3b0 @ 141acd3b0 + +STRING @ 143272138 : /exportExt.pdb + xref from 141ad832c in FUN_141ad8260 @ 141ad8260 + +STRING @ 143272148 : /PIONEER + xref from 141ad834d in FUN_141ad8260 @ 141ad8260 + +STRING @ 143272158 : /PIONEER/rekordbox/exportExt.pdb + xref from 141ad8361 in FUN_141ad8260 @ 141ad8260 + +STRING @ 143279c90 : PIONEER/USBANLZ + xref from 141b24f72 in FUN_141b24e50 @ 141b24e50 + xref from 141b15cab in FUN_141b15c50 @ 141b15c50 + +STRING @ 143279ca0 : PIONEER/Artwork + xref from 141b24f86 in FUN_141b24e50 @ 141b24e50 + xref from 141b15cbb in FUN_141b15c50 @ 141b15c50 + +STRING @ 14327a470 : /PIONEER + xref from 141b1dab0 in FUN_141b1d840 @ 141b1d840 + +STRING @ 14327a7a0 : /PIONEER/ + xref from 141b187a1 in FUN_141b18680 @ 141b18680 + +STRING @ 14327a7b8 : /PIONEER/ + xref from 141b18901 in FUN_141b18680 @ 141b18680 + +STRING @ 14327a7d0 : /PIONEER/ + xref from 141b18a61 in FUN_141b18680 @ 141b18680 + +STRING @ 14327a7e8 : /PIONEER/ + xref from 141b18bc1 in FUN_141b18680 @ 141b18680 + +STRING @ 14327a7f8 : /PIONEER/ + xref from 141b18d90 in FUN_141b18680 @ 141b18680 + +STRING @ 14327b6d0 : export.pdb + xref from 141b2e4a0 in FUN_141b2e270 @ 141b2e270 + +STRING @ 14327b6e0 : exportExt.pdb + xref from 141b2e4e3 in FUN_141b2e270 @ 141b2e270 + +STRING @ 14327df30 : /ANLZ + xref from 141b3dd3f in FUN_141b3d8a0 @ 141b3d8a0 + +STRING @ 14327e5c0 : /.PIONEER + xref from 141b48509 in FUN_141b484c0 @ 141b484c0 + +STRING @ 14327e5d0 : /PIONEER + xref from 141b48521 in FUN_141b484c0 @ 141b484c0 + +STRING @ 143280a48 : /PIONEER + xref from 141b6b118 in FUN_141b6b0a0 @ 141b6b0a0 + +STRING @ 143283260 : .PIONEER/Master/ + xref from 141b77d1b in FUN_141b77c70 @ 141b77c70 + +STRING @ 143283278 : PIONEER/Master/ + xref from 141b77d78 in FUN_141b77c70 @ 141b77c70 + +STRING @ 143283598 : share/PIONEER + xref from 141b7a208 in FUN_141b7a040 @ 141b7a040 + +STRING @ 143283768 : PIONEER + xref from 141b7b793 in FUN_141b7b740 @ 141b7b740 + +STRING @ 143283770 : share/PIONEER + xref from 141b7b7d5 in FUN_141b7b740 @ 141b7b740 + +STRING @ 1432837f0 : PIONEER + xref from 141b7c40f in FUN_141b7c0d0 @ 141b7c0d0 + +STRING @ 1432837f8 : /PIONEER + xref from 141b7c4a5 in FUN_141b7c0d0 @ 141b7c0d0 + +STRING @ 143283888 : /PIONEER/ + xref from 141b7e57d in FUN_141b7e450 @ 141b7e450 + +STRING @ 143283c98 : /.PIONEER + xref from 141b8092c in FUN_141b80720 @ 141b80720 + +STRING @ 143283ca8 : /PIONEER + xref from 141b80947 in FUN_141b80720 @ 141b80720 + +STRING @ 143283e68 : /.PIONEER + xref from 141b8b6d9 in FUN_141b8b4c0 @ 141b8b4c0 + +STRING @ 143283e78 : /PIONEER + xref from 141b8b6f1 in FUN_141b8b4c0 @ 141b8b4c0 + +STRING @ 143283f18 : \.PIONEER + xref from 141b8c509 in FUN_141b8c4d0 @ 141b8c4d0 + +STRING @ 143283f28 : \PIONEER + xref from 141b8c521 in FUN_141b8c4d0 @ 141b8c4d0 + +STRING @ 143283f38 : \export.pdb + xref from 141b8c5c6 in FUN_141b8c4d0 @ 141b8c4d0 + +STRING @ 143283f60 : /.PIONEER + xref from 141b804a0 in FUN_141b80470 @ 141b80470 + +STRING @ 143283f70 : /PIONEER + xref from 141b804bc in FUN_141b80470 @ 141b80470 + +STRING @ 143283f80 : /rekordbox/export.pdb + xref from 141b804df in FUN_141b80470 @ 141b80470 + +STRING @ 143283f98 : exportExt.pdb + xref from 141b80522 in FUN_141b80470 @ 141b80470 + +STRING @ 143286070 : /ANLZ%04X.DAT + xref from 141b91920 in FUN_141b917e0 @ 141b917e0 + +STRING @ 1432868e8 : /PIONEER/rekordbox/ImportedHistory.xml + xref from 141b9bc74 in FUN_141b9bc40 @ 141b9bc40 + +STRING @ 14329a220 : /.PIONEER + xref from 141c131f8 in FUN_141c131c0 @ 141c131c0 + +STRING @ 14329a230 : /PIONEER + xref from 141c13201 in FUN_141c131c0 @ 141c131c0 + +STRING @ 14329aa60 : USBANLZ/ + xref from 141bfe514 in FUN_141bfe280 @ 141bfe280 + +STRING @ 1432a1c10 : /PIONEER + xref from 141c4525c in FUN_141c43f50 @ 141c43f50 + +STRING @ 1432a5598 : ORIGINAL ARTIST + xref from 141c6b94b in FUN_141c6b6c0 @ 141c6b6c0 + +STRING @ 1432a5618 : HOT CUE BANK + xref from 141c6bac3 in FUN_141c6b6c0 @ 141c6b6c0 + +STRING @ 1432ac978 : /PIONEER + xref from 141c732a6 in FUN_141c73030 @ 141c73030 + +STRING @ 1432acce8 : /.PIONEER + xref from 141c4c364 in FUN_141c4c330 @ 141c4c330 + xref from 141c4c375 in FUN_141c4c330 @ 141c4c330 + +STRING @ 1432accf8 : /PIONEER + xref from 141c4c36b in FUN_141c4c330 @ 141c4c330 + +STRING @ 1432ae218 : /.PIONEER + xref from 141c89d81 in FUN_141c89d50 @ 141c89d50 + xref from 141c89d92 in FUN_141c89d50 @ 141c89d50 + +STRING @ 1432ae228 : /PIONEER + xref from 141c89d88 in FUN_141c89d50 @ 141c89d50 + +STRING @ 1432b1dc0 : /rekordbox_cloud/PIONEER/rekordbox + xref from 141c8f51e in FUN_141c8f1e0 @ 141c8f1e0 + +STRING @ 1432b1df8 : /export.pdb + xref from 141c8f7b3 in FUN_141c8f1e0 @ 141c8f1e0 + +STRING @ 1432b1e08 : /exportExt.pdb + xref from 141c8f7e8 in FUN_141c8f1e0 @ 141c8f1e0 + +STRING @ 1432b1e48 : /export.pdb + xref from 141cac3b3 in FUN_141cac390 @ 141cac390 + +STRING @ 1432b1e58 : /exportExt.pdb + xref from 141cac3e8 in FUN_141cac390 @ 141cac390 + +STRING @ 1432b1e68 : /PIONEER + xref from 141c9a65f in FUN_141c9a550 @ 141c9a550 + +STRING @ 1432b4d50 : /.PIONEER + xref from 141cd1219 in FUN_141cd11e0 @ 141cd11e0 + +STRING @ 1432b4d60 : /PIONEER + xref from 141cd1222 in FUN_141cd11e0 @ 141cd11e0 + +STRING @ 1432ba480 : ORIGINAL ARTIST + xref from 141cdba7b in FUN_141cdb880 @ 141cdb880 + +STRING @ 1432ba4d0 : HOT CUE BANK + xref from 141cdbc11 in FUN_141cdb880 @ 141cdb880 + +STRING @ 1432f1448 : PIONEER DJ Co. + xref from 141d973bf in FUN_141d97300 @ 141d97300 + xref from 141d97649 in FUN_141d97640 @ 141d97640 + xref from 141d960ca in FUN_141d95be0 @ 141d95be0 + +STRING @ 1432fc228 : /PIONEER + xref from 141ea376e in FUN_141ea36f0 @ 141ea36f0 + +STRING @ 1432fc660 : Users/user/Library/Pioneer/rekordbox/PIONEER/P001/00000001 + xref from 141ea8fba in FUN_141ea8df0 @ 141ea8df0 + +STRING @ 1432fc9b0 : /rekordbox_cloud/PIONEER/USBANLZ/P001/0000001A/ANLZ0000.DAT + xref from 141ea985b in FUN_141ea8df0 @ 141ea8df0 + +STRING @ 1432fca20 : /PIONEER/USBANLZ/P001/0000001A/ANLZ0000.DAT + xref from 141ea9a6a in FUN_141ea8df0 @ 141ea8df0 + +STRING @ 1432fca60 : /PIONEER + xref from 141ea9c72 in FUN_141ea8df0 @ 141ea8df0 + +STRING @ 1432fe058 : PIONEER DJM-T1 + xref from 141eba0e4 in FUN_141eb9ca0 @ 141eb9ca0 + +STRING @ 1432fe1f0 : PIONEER DDJ-SX2 2IN2OUT + xref from 141ebaf90 in FUN_141eba6a0 @ 141eba6a0 + +STRING @ 1432fe218 : PIONEER DJM-T1 + xref from 141ebafe8 in FUN_141eba6a0 @ 141eba6a0 + +STRING @ 1432fe3c8 : PIONEER DJM-T1 + xref from 141ebbb6d in FUN_141ebb5f0 @ 141ebb5f0 + +STRING @ 1432fe450 : PIONEER DJM-T1 + xref from 141ebbe1d in FUN_141ebbca0 @ 141ebbca0 + +STRING @ 1432fe668 : PIONEER + xref from 141ebd3c9 in FUN_141ebd280 @ 141ebd280 + +STRING @ 1432fe678 : PIONEER + xref from 141ebd406 in FUN_141ebd280 @ 141ebd280 + +STRING @ 1432fe688 : PIONEER_ + xref from 141ebd419 in FUN_141ebd280 @ 141ebd280 + +STRING @ 1432fe698 : PIONEER + xref from 141ebd443 in FUN_141ebd280 @ 141ebd280 + +STRING @ 1432fe6a8 : PIONEER DJ + xref from 141ebd456 in FUN_141ebd280 @ 141ebd280 + +STRING @ 1432fe6b8 : PIONEER + xref from 141ebd491 in FUN_141ebd280 @ 141ebd280 + +STRING @ 1432fe6d0 : PIONEER + xref from 141ebd63b in FUN_141ebd280 @ 141ebd280 + +STRING @ 1432fe7c8 : PIONEER + xref from 141ebda01 in FUN_141ebd8b0 @ 141ebd8b0 + +STRING @ 1432fe7d8 : PIONEER + xref from 141ebda40 in FUN_141ebd8b0 @ 141ebd8b0 + +STRING @ 1432fe7e8 : PIONEER_ + xref from 141ebda53 in FUN_141ebd8b0 @ 141ebd8b0 + +STRING @ 1432fe7f8 : PIONEER + xref from 141ebda7e in FUN_141ebd8b0 @ 141ebd8b0 + +STRING @ 1432fe808 : PIONEER DJ + xref from 141ebda91 in FUN_141ebd8b0 @ 141ebd8b0 + +STRING @ 1432fe818 : PIONEER + xref from 141ebdad1 in FUN_141ebd8b0 @ 141ebd8b0 + +STRING @ 1432fec80 : PIONEER + xref from 141ebf130 in FUN_141ebd8b0 @ 141ebd8b0 + +STRING @ 1432fef28 : PIONEER DDJ-SR + xref from 141ec035a in FUN_141ec0340 @ 141ec0340 + +STRING @ 1432fef68 : PIONEER DDJ-WeGO3 + xref from 141ec043b in FUN_141ec0340 @ 141ec0340 + +STRING @ 1432fef80 : PIONEER DDJ-WeGO2 + xref from 141ec0468 in FUN_141ec0340 @ 141ec0340 + +STRING @ 1432fef98 : PIONEER DDJ-WeGO + xref from 141ec0495 in FUN_141ec0340 @ 141ec0340 + +STRING @ 1432fefb0 : PIONEER XDJ-RX + xref from 141ec04c2 in FUN_141ec0340 @ 141ec0340 + +STRING @ 1432fefc0 : PIONEER XDJ-AERO + xref from 141ec04ef in FUN_141ec0340 @ 141ec0340 + +STRING @ 1432fefd8 : PIONEER XDJ-R1 + xref from 141ec051c in FUN_141ec0340 @ 141ec0340 + +STRING @ 1432ff0c8 : PIONEER DDJ-WeGO3 + xref from 141ec0a5c in FUN_141ec09c0 @ 141ec09c0 + +STRING @ 1432ff0e0 : PIONEER DDJ-WeGO2 + xref from 141ec0a89 in FUN_141ec09c0 @ 141ec09c0 + +STRING @ 1432ff0f8 : PIONEER DDJ-WeGO + xref from 141ec0ab6 in FUN_141ec09c0 @ 141ec09c0 + +STRING @ 1432ff110 : PIONEER XDJ-AERO + xref from 141ec0ae3 in FUN_141ec09c0 @ 141ec09c0 + +STRING @ 1432ff128 : PIONEER XDJ-R1 + xref from 141ec0b10 in FUN_141ec09c0 @ 141ec09c0 + +STRING @ 1432ff178 : PIONEER DDJ-WeGO3 + xref from 141ec0d89 in FUN_141ec0ce0 @ 141ec0ce0 + +STRING @ 1432ff1d0 : PIONEER DDJ-SR + xref from 141ec0fdb in FUN_141ec0f90 @ 141ec0f90 + +STRING @ 1432ff1e0 : PIONEER DDJ-SX + xref from 141ec1008 in FUN_141ec0f90 @ 141ec0f90 + +STRING @ 1432ff1f0 : PIONEER DDJ-SX2 + xref from 141ec1035 in FUN_141ec0f90 @ 141ec0f90 + +STRING @ 1432ff200 : PIONEER DDJ-SX2 2IN2OUT + xref from 141ec1062 in FUN_141ec0f90 @ 141ec0f90 + +STRING @ 1432ff3c8 : PIONEER DDJ-SX2 2IN2OUT + xref from 141ec1a2d in FUN_141ec19f0 @ 141ec19f0 + +STRING @ 1432ff3f8 : PIONEER DDJ-SX2 + xref from 141ec1af1 in FUN_141ec1a80 @ 141ec1a80 + +STRING @ 1432ff408 : PIONEER DDJ-SX2 2IN2OUT + xref from 141ec1b21 in FUN_141ec1a80 @ 141ec1a80 + +STRING @ 1432ff460 : PIONEER DDJ-SX + xref from 145199910 (no func) + +STRING @ 1432ff470 : PIONEER DDJ-SX2 + xref from 145199918 (no func) + +STRING @ 1432ff498 : PIONEER DDJ-SX2 2IN2OUT + xref from 145199938 (no func) + +STRING @ 1432ff4d0 : PIONEER XDJ-RX + xref from 145199958 (no func) + +STRING @ 1432ff4e0 : PIONEER DDJ-SR + xref from 145199960 (no func) + +STRING @ 1432ff500 : PIONEER DDJ-WeGO3 + xref from 145199970 (no func) + +STRING @ 1432ff518 : PIONEER DDJ-WeGO2 + xref from 145199978 (no func) + +STRING @ 1432ff530 : PIONEER DDJ-WeGO + xref from 145199980 (no func) + +STRING @ 1432ff548 : PIONEER XDJ-R1 + xref from 145199988 (no func) + +STRING @ 1432ff650 : PIONEER CDJ-2000nexus + xref from 141ec2040 in FUN_141ec1f90 @ 141ec1f90 + +STRING @ 1432ff668 : PIONEER CDJ-2000 + xref from 141ec2076 in FUN_141ec1f90 @ 141ec1f90 + +STRING @ 1432ff680 : PIONEER CDJ-900nexus + xref from 141ec20ac in FUN_141ec1f90 @ 141ec1f90 + +STRING @ 1432ff698 : PIONEER CDJ-900 + xref from 141ec20e2 in FUN_141ec1f90 @ 141ec1f90 + +STRING @ 1432ff6a8 : PIONEER CDJ-850 + xref from 141ec2118 in FUN_141ec1f90 @ 141ec1f90 + +STRING @ 1432ff6b8 : PIONEER CDJ-350 + xref from 141ec214e in FUN_141ec1f90 @ 141ec1f90 + +STRING @ 1432ff6c8 : PIONEER CDJ-400 + xref from 141ec2184 in FUN_141ec1f90 @ 141ec1f90 + +STRING @ 1432ff6e8 : PIONEER XDJ-1000 + xref from 141ec21f0 in FUN_141ec1f90 @ 141ec1f90 + +STRING @ 1432ff740 : PIONEER XDJ-RX + xref from 141ec22fe in FUN_141ec1f90 @ 141ec1f90 + +STRING @ 1432ff750 : PIONEER XDJ-AERO + xref from 141ec2334 in FUN_141ec1f90 @ 141ec1f90 + +STRING @ 1432ff768 : PIONEER XDJ-R1 + xref from 141ec236a in FUN_141ec1f90 @ 141ec1f90 + +STRING @ 1432ff828 : PIONEER DJM-T1 + xref from 141ec2628 in FUN_141ec1f90 @ 141ec1f90 + +STRING @ 1432ff900 : PIONEER DDJ-SX2 + xref from 141ec29be in FUN_141ec1f90 @ 141ec1f90 + +STRING @ 1432ff910 : PIONEER DDJ-SX2 2IN2OUT + xref from 141ec29ee in FUN_141ec1f90 @ 141ec1f90 + +STRING @ 1432ff928 : PIONEER DDJ-SX + xref from 141ec2a1e in FUN_141ec1f90 @ 141ec1f90 + +STRING @ 1432ff938 : PIONEER DDJ-SR + xref from 141ec2a4e in FUN_141ec1f90 @ 141ec1f90 + +STRING @ 1432ff978 : PIONEER DDJ-WeGO3 + xref from 141ec2b3e in FUN_141ec1f90 @ 141ec1f90 + +STRING @ 1432ff990 : PIONEER DDJ-WeGO2 + xref from 141ec2b6e in FUN_141ec1f90 @ 141ec1f90 + +STRING @ 1432ff9a8 : PIONEER DDJ-WeGO + xref from 141ec2b9e in FUN_141ec1f90 @ 141ec1f90 + +STRING @ 1432ffb30 : PIONEER DJM-T1 + xref from 140b60f95 in FUN_140b5fc20 @ 140b5fc20 + +STRING @ 1432ffb78 : PIONEER XDJ-AERO + xref from 141ec3974 in FUN_141ec3950 @ 141ec3950 + xref from 1451999f8 (no func) + +STRING @ 1432ffc68 : PIONEER XDJ-RX + xref from 141ec41b0 in FUN_141ec4130 @ 141ec4130 + +STRING @ 1432ffef0 : PIONEER XDJ-RX + xref from 141ec4b63 in FUN_141ec4970 @ 141ec4970 + +STRING @ 1432fff00 : PIONEER XDJ-R1 + xref from 141ec4b9a in FUN_141ec4970 @ 141ec4970 + +STRING @ 1432fff38 : PIONEER DDJ-SX + xref from 141ec4c76 in FUN_141ec4970 @ 141ec4970 + +STRING @ 1432fff48 : PIONEER DDJ-SX2 + xref from 141ec4ca1 in FUN_141ec4970 @ 141ec4970 + +STRING @ 1432fff58 : PIONEER DDJ-SX2 2IN2OUT + xref from 141ec4ccc in FUN_141ec4970 @ 141ec4970 + +STRING @ 1432fff70 : PIONEER DDJ-SR + xref from 141ec4cf7 in FUN_141ec4970 @ 141ec4970 + +STRING @ 1432fffa0 : PIONEER XDJ-AERO + xref from 141ec4da5 in FUN_141ec4970 @ 141ec4970 + +STRING @ 1432fffc8 : PIONEER DDJ-WeGO2 + xref from 141ec4dfd in FUN_141ec4970 @ 141ec4970 + +STRING @ 1432fffe0 : PIONEER DDJ-WeGO + xref from 141ec4e29 in FUN_141ec4970 @ 141ec4970 + +STRING @ 143300088 : PIONEER DDJ-SR + xref from 141ebd1e1 in FUN_141ebd130 @ 141ebd130 + xref from 141ec5390 in FUN_141ec5280 @ 141ec5280 + xref from 145197440 (no func) + +STRING @ 1433000a8 : PIONEER DDJ-SX + +STRING @ 1433000b8 : PIONEER DDJ-SX2 + +STRING @ 1433000c8 : PIONEER DDJ-SX2 2IN2OUT + +STRING @ 143300100 : PIONEER DDJ-WeGO3 + +STRING @ 143300118 : PIONEER DDJ-WeGO2 + +STRING @ 143300130 : PIONEER DDJ-WeGO + +STRING @ 143300280 : PIONEER XDJ-RX + xref from 140b627ec in FUN_140b622e0 @ 140b622e0 + +STRING @ 143300290 : PIONEER XDJ-AERO + xref from 140b627fa in FUN_140b622e0 @ 140b622e0 + +STRING @ 1433002a8 : PIONEER XDJ-R1 + xref from 140b62a60 in FUN_140b622e0 @ 140b622e0 + +STRING @ 143300390 : PIONEER DJM-T1 + xref from 140b637b7 in FUN_140b622e0 @ 140b622e0 + +STRING @ 1433003b0 : PIONEER XDJ-1000 + xref from 140b638e0 in FUN_140b622e0 @ 140b622e0 + +STRING @ 1433003d8 : PIONEER CDJ-400 + xref from 140b63b60 in FUN_140b622e0 @ 140b622e0 + +STRING @ 1433003e8 : PIONEER CDJ-350 + xref from 140b63b6e in FUN_140b622e0 @ 140b622e0 + +STRING @ 1433003f8 : PIONEER CDJ-850 + xref from 140b63b7c in FUN_140b622e0 @ 140b622e0 + +STRING @ 143300408 : PIONEER CDJ-900 + xref from 140b63df6 in FUN_140b622e0 @ 140b622e0 + +STRING @ 143300418 : PIONEER CDJ-900nexus + xref from 140b63e0b in FUN_140b622e0 @ 140b622e0 + +STRING @ 143300430 : PIONEER CDJ-2000 + xref from 140b63e19 in FUN_140b622e0 @ 140b622e0 + +STRING @ 143300448 : PIONEER CDJ-2000nexus + xref from 140b63e27 in FUN_140b622e0 @ 140b622e0 + +STRING @ 143300b78 : PIONEER DDJ-SX2 + xref from 141eca705 in FUN_141eca660 @ 141eca660 + +STRING @ 143301090 : PIONEER DDJ-SX2 + xref from 141ecaf34 in FUN_141ecaeb0 @ 141ecaeb0 + +STRING @ 143302398 : PIONEER CDJ-2000 + xref from 141eea907 in FUN_141eea610 @ 141eea610 + +STRING @ 1433023b0 : PIONEER CDJ-900nexus + xref from 141eea96c in FUN_141eea610 @ 141eea610 + +STRING @ 1433023c8 : PIONEER CDJ-900 + xref from 141eea9d1 in FUN_141eea610 @ 141eea610 + +STRING @ 1433023d8 : PIONEER CDJ-850 + xref from 141eeaa36 in FUN_141eea610 @ 141eea610 + +STRING @ 1433023e8 : PIONEER CDJ-350 + xref from 141eeab86 in FUN_141eea610 @ 141eea610 + +STRING @ 1433023f8 : PIONEER CDJ-400 + xref from 141eeacb5 in FUN_141eea610 @ 141eea610 + +STRING @ 143302408 : PIONEER XDJ-1000 + xref from 141eeadde in FUN_141eea610 @ 141eea610 + +STRING @ 1433024f0 : PIONEER XDJ-RX + xref from 141eeb49f in FUN_141eea610 @ 141eea610 + +STRING @ 143302740 : PIONEER XDJ-RX + xref from 141ef82b0 in FUN_141ef82a0 @ 141ef82a0 + +STRING @ 143303870 : PIONEER CDJ-2000nexus + xref from 141f09d59 in FUN_141f09c20 @ 141f09c20 + +STRING @ 14330e5b0 : PIONEER DDJ-SX2 + xref from 141f92628 in FUN_141f92600 @ 141f92600 + +STRING @ 14330e5c0 : PIONEER DDJ-SX2 2IN2OUT + xref from 141f92653 in FUN_141f92600 @ 141f92600 + +STRING @ 14330e5d8 : PIONEER DDJ-SX + xref from 141f926e6 in FUN_141f92600 @ 141f92600 + +STRING @ 14330e5e8 : PIONEER DDJ-SR + xref from 141f9274a in FUN_141f92600 @ 141f92600 + +STRING @ 14330e628 : PIONEER DDJ-WeGO3 + xref from 141f92a6e in FUN_141f92600 @ 141f92600 + +STRING @ 14330e640 : PIONEER DDJ-WeGO2 + xref from 141f92ad2 in FUN_141f92600 @ 141f92600 + +STRING @ 14330e658 : PIONEER DDJ-WeGO + xref from 141f92b36 in FUN_141f92600 @ 141f92600 + +STRING @ 14330e828 : PIONEER XDJ-RX + xref from 141f9354c in FUN_141f92600 @ 141f92600 + +STRING @ 14330e838 : PIONEER XDJ-AERO + xref from 141f935b0 in FUN_141f92600 @ 141f92600 + +STRING @ 14330e850 : PIONEER XDJ-R1 + xref from 141f93614 in FUN_141f92600 @ 141f92600 + +STRING @ 14330e8e8 : PIONEER DJM-T1 + xref from 141f93aa6 in FUN_141f92600 @ 141f92600 + +STRING @ 14330ead0 : PIONEER DDJ-SX2 + xref from 141f94d3d in FUN_141f94c80 @ 141f94c80 + +STRING @ 14330eae0 : PIONEER DDJ-SX2 2IN2OUT + xref from 141f94d6a in FUN_141f94c80 @ 141f94c80 + +STRING @ 14330ecf0 : PIONEER DDJ-SX2 + xref from 141f953ab in FUN_141f94c80 @ 141f94c80 + +STRING @ 14330ed00 : PIONEER DDJ-SX2 2IN2OUT + xref from 141f953dc in FUN_141f94c80 @ 141f94c80 + +STRING @ 1433138f8 : PIONEER XDJ-R1 + xref from 141fea05d in FUN_141fea030 @ 141fea030 + +STRING @ 1451cf200 : .?AV?$_Ref_count_obj2@V?$Array@UANLZBlock@analyzer@@VDummyCriticalSection@juce@@$0A@@juce@@@std@@ + +===== CONSTANT HIT COUNTS ===== +0x24 (36): 11432 hits +0x44 (68): 10305 hits +0x64 (100): 8600 hits +0x3EC (1004): 238 hits +0x4A68 (19048): 6 hits diff --git a/maple-py/re/findings/hash.txt b/maple-py/re/findings/hash.txt new file mode 100644 index 0000000..232909e --- /dev/null +++ b/maple-py/re/findings/hash.txt @@ -0,0 +1,2437 @@ + +//===== FUN_141a1afc0 @ 141a1afc0 [formatForSearch] ===== + +/* WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie */ + +void FUN_141a1afc0(longlong param_1,undefined8 *param_2) + +{ + int iVar1; + undefined8 uVar2; + undefined8 *puVar3; + ushort *puVar4; + ulonglong uVar5; + ushort uVar6; + ulonglong uVar7; + undefined1 auStack_148 [32]; + int *local_128; + int local_120; + undefined1 *local_118; + undefined4 local_110; + int local_108; + undefined4 local_f8 [2]; + int local_f0 [2]; + undefined1 local_e8 [20]; + int local_d4; + char local_c2; + undefined1 local_c0 [20]; + int local_ac; + char local_9a; + undefined **local_98 [2]; + int local_84; + undefined2 local_72; + undefined1 local_70 [40]; + ulonglong local_48; + + local_48 = DAT_14519c398 ^ (ulonglong)auStack_148; + if (*(char *)*param_2 == '\0') { + if (**(char **)(param_1 + 0x10) != '\0') { + uVar2 = FUN_1423d59e0(local_f8); + FUN_1423d5890(param_1 + 0x10,uVar2); + FUN_1423d59b0(local_f8); + *(undefined8 *)(param_1 + 0x18) = 0; + } + } + else { + puVar3 = (undefined8 *)FUN_1423ceb20(param_2,local_f8); + uVar2 = *puVar3; + FUN_142254a00(local_70,uVar2); + local_98[0] = icu_51::UnicodeString::vftable; + local_72 = 0x200; + uVar7 = 0; + local_f0[0] = 0; + local_128 = local_f0; + FUN_14225bce0(local_70,3,0,local_98); + if (local_f0[0] < 1) { + FUN_142254520(local_e8,0x44); + FUN_142254520(local_c0,0xd0); + local_108 = (int)local_c2; + if (local_c2 < '\0') { + local_108 = local_d4; + } + local_120 = (int)local_9a; + if (local_9a < '\0') { + local_120 = local_ac; + } + iVar1 = (int)(char)local_72; + if ((char)local_72 < '\0') { + iVar1 = local_84; + } + local_110 = 0; + local_118 = local_e8; + local_128 = (int *)((ulonglong)local_128 & 0xffffffff00000000); + FUN_142256590(local_98,0,iVar1,local_c0); + FUN_142254b90(local_c0); + FUN_142254b90(local_e8); + FUN_142254520(local_c0,0x44); + FUN_142254520(local_e8,0xf0); + local_108 = (int)local_9a; + if (local_9a < '\0') { + local_108 = local_ac; + } + local_120 = (int)local_c2; + if (local_c2 < '\0') { + local_120 = local_d4; + } + iVar1 = (int)(char)local_72; + if ((char)local_72 < '\0') { + iVar1 = local_84; + } + local_110 = 0; + local_118 = local_c0; + local_128 = (int *)((ulonglong)local_128 & 0xffffffff00000000); + FUN_142256590(local_98,0,iVar1,local_e8); + FUN_142254b90(local_e8); + FUN_142254b90(local_c0); + FUN_142254520(local_c0,0x46); + FUN_142254520(local_e8,0x192); + local_108 = (int)local_9a; + if (local_9a < '\0') { + local_108 = local_ac; + } + local_120 = (int)local_c2; + if (local_c2 < '\0') { + local_120 = local_d4; + } + iVar1 = (int)(char)local_72; + if ((char)local_72 < '\0') { + iVar1 = local_84; + } + local_110 = 0; + local_118 = local_c0; + local_128 = (int *)((ulonglong)local_128 & 0xffffffff00000000); + FUN_142256590(local_98,0,iVar1,local_e8); + FUN_142254b90(local_e8); + FUN_142254b90(local_c0); + FUN_142254520(local_c0,0x49); + FUN_142254520(local_e8,0x131); + local_108 = (int)local_9a; + if (local_9a < '\0') { + local_108 = local_ac; + } + local_120 = (int)local_c2; + if (local_c2 < '\0') { + local_120 = local_d4; + } + iVar1 = (int)(char)local_72; + if ((char)local_72 < '\0') { + iVar1 = local_84; + } + local_110 = 0; + local_118 = local_c0; + local_128 = (int *)((ulonglong)local_128 & 0xffffffff00000000); + FUN_142256590(local_98,0,iVar1,local_e8); + FUN_142254b90(local_e8); + FUN_142254b90(local_c0); + FUN_142254520(local_c0,0x4f); + FUN_142254520(local_e8,0xd8); + local_108 = (int)local_9a; + if (local_9a < '\0') { + local_108 = local_ac; + } + local_120 = (int)local_c2; + if (local_c2 < '\0') { + local_120 = local_d4; + } + iVar1 = (int)(char)local_72; + if ((char)local_72 < '\0') { + iVar1 = local_84; + } + local_110 = 0; + local_118 = local_c0; + local_128 = (int *)((ulonglong)local_128 & 0xffffffff00000000); + FUN_142256590(local_98,0,iVar1,local_e8); + FUN_142254b90(local_e8); + FUN_142254b90(local_c0); + FUN_142254520(local_c0,0x4f); + FUN_142254520(local_e8,0xf8); + local_108 = (int)local_9a; + if (local_9a < '\0') { + local_108 = local_ac; + } + local_120 = (int)local_c2; + if (local_c2 < '\0') { + local_120 = local_d4; + } + iVar1 = (int)(char)local_72; + if ((char)local_72 < '\0') { + iVar1 = local_84; + } + local_110 = 0; + local_118 = local_c0; + local_128 = (int *)((ulonglong)local_128 & 0xffffffff00000000); + FUN_142256590(local_98,0,iVar1,local_e8); + FUN_142254b90(local_e8); + FUN_142254b90(local_c0); + FUN_14225b1c0(local_98); + } + else { + FUN_1425abd80("%s - %d","MultipurposeString::formatForSearch",1); + uVar2 = FUN_142254a00(local_e8,uVar2); + FUN_142198880(local_98,uVar2); + FUN_142254b90(local_e8); + } + puVar4 = (ushort *)FUN_141a1b560(local_98); + if ((puVar4 != (ushort *)0x0) && (uVar6 = *puVar4, uVar6 != 0)) { + local_f8[0] = 0x7ff; + do { + if (uVar6 < 0x1000) { + if (uVar6 < 0x80) { + if ((ushort)(uVar6 - 0x30) < 10) { + uVar5 = (ulonglong)uVar6 - 0x30; + } + else { + if (0x19 < (ushort)(uVar6 - 0x41)) { + uVar7 = uVar7 | 0x1000000000; + goto LAB_141a1b4e4; + } + uVar5 = (ulonglong)uVar6 - 0x37; + } +LAB_141a1b4e0: + uVar7 = uVar7 | 1L << (uVar5 & 0x3f); + } + else if (uVar6 < 0x100) { + uVar7 = uVar7 | 0x2000000000; + } + else if (uVar6 < 0x300) { + uVar7 = uVar7 | 0x4000000000; + } + else { + uVar7 = uVar7 | 0x8000000000; + } + } + else { + if (0x7ff < (ushort)(uVar6 + 0x2800)) { + uVar5 = (ulonglong)(((int)(uVar6 - 0x1000) >> 0xc) + 0x28); + goto LAB_141a1b4e0; + } + uVar7 = uVar7 | 0x80000000000000; + } +LAB_141a1b4e4: + puVar4 = puVar4 + 1; + uVar6 = *puVar4; + } while (uVar6 != 0); + } + *(ulonglong *)(param_1 + 0x18) = uVar7; + uVar2 = FUN_141a1b560(local_98); + uVar2 = FUN_1423d56a0(local_f8,uVar2); + FUN_1423d5890(param_1 + 0x10,uVar2); + FUN_1423d59b0(local_f8); + FUN_142254b90(local_98); + FUN_142254b90(local_70); + } + return; +} + + + +//===== FUN_141c4ecc0 @ 141c4ecc0 [caller of formatForSearch] ===== + +/* WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie */ + +ulonglong FUN_141c4ecc0(undefined8 param_1,longlong *param_2) + +{ + int iVar1; + char cVar2; + undefined1 uVar3; + int iVar4; + undefined4 uVar5; + undefined8 uVar6; + ulonglong uVar7; + uint uVar8; + ulonglong uVar10; + undefined1 auStack_98 [32]; + undefined1 local_78 [8]; + undefined1 local_70 [8]; + undefined1 local_68 [8]; + undefined1 local_60 [8]; + undefined1 local_58 [8]; + undefined1 local_50 [8]; + undefined1 local_48 [8]; + longlong local_40; + undefined1 local_38 [16]; + ulonglong local_28; + ulonglong uVar9; + + local_28 = DAT_14519c398 ^ (ulonglong)auStack_98; + FUN_1423c3af0(local_38); + FUN_1423d5720(local_70, + "select ID, UUID, Seq, Name, ImagePath, Attribute, ParentID, SmartList, rb_local_deleted from djmdPlaylist where rb_local_deleted = 0" + ); + FUN_1423d3790(local_70," and Attribute & 0x80"); + iVar4 = FUN_141a0a040(&PTR_vftable_14518c9d0,local_70,local_38); + if (iVar4 == 0) { + uVar10 = 0; + iVar4 = FUN_1423c2810(local_38); + uVar9 = uVar10; + if (0 < iVar4) { + do { + uVar6 = FUN_1423c27b0(local_38,uVar9); + uVar6 = FUN_1423c2ab0(uVar6,"rb_local_deleted"); + cVar2 = FUN_1423c34c0(uVar6); + if (cVar2 == '\0') { + local_40 = FUN_14217c644(0x140); + uVar7 = uVar10; + if (local_40 != 0) { + uVar7 = FUN_1410103a0(local_40); + } + uVar6 = FUN_1423c27b0(local_38,uVar9); + uVar6 = FUN_1423c2ab0(uVar6,&DAT_1432a0dc4); + uVar6 = FUN_1423c3450(uVar6,local_68); + uVar5 = FUN_1423cf4b0(uVar6); + *(undefined4 *)(uVar7 + 8) = uVar5; + FUN_1423d59b0(local_68); + uVar6 = FUN_1423c27b0(local_38,uVar9); + uVar6 = FUN_1423c2ab0(uVar6,&DAT_1432a0dc8); + uVar6 = FUN_1423c3420(uVar6,local_60); + FUN_1423d5890(uVar7 + 0x10,uVar6); + FUN_1423d59b0(local_60); + uVar6 = FUN_1423c27b0(local_38,uVar9); + uVar6 = FUN_1423c2ab0(uVar6,&DAT_1432a0dd0); + uVar5 = FUN_1423c3500(uVar6); + *(undefined4 *)(uVar7 + 0x80) = uVar5; + uVar6 = FUN_1423c27b0(local_38,uVar9); + uVar6 = FUN_1423c2ab0(uVar6,&DAT_1432a0dd4); + FUN_1423c3420(uVar6,local_78); + FUN_1423d58d0(uVar7 + 0x20,local_78); + if ((*(byte *)(uVar7 + 0x18) & 1) != 0) { + FUN_141a1afc0(uVar7 + 0x18,local_78); + } + FUN_1423d59b0(local_78); + uVar6 = FUN_1423c27b0(local_38,uVar9); + uVar6 = FUN_1423c2ab0(uVar6,"ImagePath"); + uVar6 = FUN_1423c3420(uVar6,local_58); + FUN_1423d5890(uVar7 + 0x90,uVar6); + FUN_1423d59b0(local_58); + uVar6 = FUN_1423c27b0(local_38,uVar9); + uVar6 = FUN_1423c2ab0(uVar6,"Attribute"); + uVar3 = FUN_1423c3500(uVar6); + *(undefined1 *)(uVar7 + 0x84) = uVar3; + uVar6 = FUN_1423c27b0(local_38,uVar9); + uVar6 = FUN_1423c2ab0(uVar6,"ParentID"); + uVar6 = FUN_1423c3450(uVar6,local_50); + uVar5 = FUN_1423cf4b0(uVar6); + *(undefined4 *)(uVar7 + 0x88) = uVar5; + FUN_1423d59b0(local_50); + uVar6 = FUN_1423c27b0(local_38,uVar9); + uVar6 = FUN_1423c2ab0(uVar6,"SmartList"); + uVar6 = FUN_1423c3420(uVar6,local_48); + FUN_1423d5890(uVar7 + 0xb0,uVar6); + FUN_1423d59b0(local_48); + iVar1 = *(int *)((longlong)param_2 + 0xc); + iVar4 = iVar1 + 1; + if ((int)param_2[1] < iVar4) { + if (iVar4 < 0) { + iVar4 = iVar1 + 2; + } + FUN_140c708a0(param_2,iVar1 + 9 + (iVar4 >> 1) & 0xfffffff8); + } + iVar4 = *(int *)((longlong)param_2 + 0xc); + *(int *)((longlong)param_2 + 0xc) = iVar4 + 1; + *(ulonglong *)(*param_2 + (longlong)iVar4 * 8) = uVar7; + } + uVar8 = (int)uVar9 + 1; + uVar9 = (ulonglong)uVar8; + iVar4 = FUN_1423c2810(local_38); + } while ((int)uVar8 < iVar4); + } + } + else { + uVar10 = 0xffffffff; + } + FUN_1423d59b0(local_70); + FUN_1423c3ab0(local_38); + return uVar10; +} + + + +//===== FUN_140ffa540 @ 140ffa540 [caller of formatForSearch] ===== + +void FUN_140ffa540(longlong param_1) + +{ + undefined8 uVar1; + undefined1 local_res8 [8]; + + *(undefined4 *)(param_1 + 8) = 0; + uVar1 = FUN_1423d59e0(local_res8); + FUN_1423d5890(param_1 + 0x10,uVar1); + FUN_1423d59b0(local_res8); + uVar1 = FUN_1423d59e0(local_res8); + FUN_1423d58d0(param_1 + 0x20,uVar1); + if ((*(byte *)(param_1 + 0x18) & 1) != 0) { + FUN_141a1afc0(param_1 + 0x18,uVar1); + } + FUN_1423d59b0(local_res8); + return; +} + + + +//===== FUN_140ffa600 @ 140ffa600 [caller of formatForSearch] ===== + +/* WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie */ + +void FUN_140ffa600(longlong param_1) + +{ + undefined8 uVar1; + undefined1 auStack_58 [32]; + undefined1 local_38 [16]; + ulonglong local_28; + + local_28 = DAT_14519c398 ^ (ulonglong)auStack_58; + FUN_140ffa540(); + *(undefined8 *)(param_1 + 0x80) = 0; + uVar1 = FUN_1423d59e0(local_38); + FUN_1423d5890(param_1 + 0x88,uVar1); + FUN_1423d59b0(local_38); + *(undefined4 *)(param_1 + 0x90) = 0; + uVar1 = FUN_1423d59e0(local_38); + FUN_1423d5890(param_1 + 0x98,uVar1); + FUN_1423d59b0(local_38); + (**(code **)(*(longlong *)(param_1 + 0xa0) + 0x88))(); + (**(code **)(*(longlong *)(param_1 + 0xd8) + 0x88))(); + (**(code **)(*(longlong *)(param_1 + 0x150) + 0x88))(); + (**(code **)(*(longlong *)(param_1 + 0x188) + 0x88))(); + uVar1 = FUN_1423d59e0(local_38); + FUN_1423d58d0(param_1 + 0x1c8,uVar1); + if ((*(byte *)(param_1 + 0x1c0) & 1) != 0) { + FUN_141a1afc0(param_1 + 0x1c0,uVar1); + } + FUN_1423d59b0(local_38); + (**(code **)(*(longlong *)(param_1 + 0x1e0) + 0x88))(); + (**(code **)(*(longlong *)(param_1 + 0x228) + 0x88))(); + (**(code **)(*(longlong *)(param_1 + 0x260) + 0x88))(); + (**(code **)(*(longlong *)(param_1 + 0x298) + 0x88))(); + (**(code **)(*(longlong *)(param_1 + 0x308) + 0x88))(); + (**(code **)(*(longlong *)(param_1 + 0x2d0) + 0x88))(); + *(undefined4 *)(param_1 + 0x340) = 0; + *(undefined2 *)(param_1 + 0x344) = 0; + uVar1 = FUN_1423d59e0(local_38); + FUN_1423d58d0(param_1 + 0x350,uVar1); + if ((*(byte *)(param_1 + 0x348) & 1) != 0) { + FUN_141a1afc0(param_1 + 0x348,uVar1); + } + FUN_1423d59b0(local_38); + *(undefined1 *)(param_1 + 0x368) = 0; + *(undefined2 *)(param_1 + 0x36a) = 0; + uVar1 = FUN_1423d59e0(local_38); + FUN_1423d5890(param_1 + 0x370,uVar1); + FUN_1423d59b0(local_38); + uVar1 = FUN_1423d59e0(local_38); + FUN_1423d58d0(param_1 + 0x380,uVar1); + if ((*(byte *)(param_1 + 0x378) & 1) != 0) { + FUN_141a1afc0(param_1 + 0x378,uVar1); + } + FUN_1423d59b0(local_38); + *(undefined8 *)(param_1 + 0x398) = 0; + uVar1 = FUN_1423d59e0(local_38); + FUN_1423d5890(param_1 + 0x3a0,uVar1); + FUN_1423d59b0(local_38); + *(undefined1 *)(param_1 + 0x3a8) = 0; + *(undefined4 *)(param_1 + 0x3ac) = 0; + uVar1 = FUN_1423d59e0(local_38); + FUN_1423d5890(param_1 + 0x3b0,uVar1); + FUN_1423d59b0(local_38); + uVar1 = FUN_1423d59e0(local_38); + FUN_1423d5890(param_1 + 0x3b8,uVar1); + FUN_1423d59b0(local_38); + *(undefined8 *)(param_1 + 0x3c0) = 0; + *(undefined2 *)(param_1 + 0x3c8) = 0; + *(undefined4 *)(param_1 + 0x3cc) = 0; + *(undefined2 *)(param_1 + 0x3d0) = 0; + *(undefined4 *)(param_1 + 0x3d4) = 0; + uVar1 = FUN_1423d59e0(local_38); + FUN_1423d5890(param_1 + 0x3d8,uVar1); + FUN_1423d59b0(local_38); + uVar1 = FUN_1423d59e0(local_38); + FUN_1423d5890(param_1 + 0x3e0,uVar1); + FUN_1423d59b0(local_38); + *(undefined4 *)(param_1 + 1000) = 0; + *(undefined1 *)(param_1 + 0x3ec) = 0; + *(undefined8 *)(param_1 + 0x3f0) = 0; + *(undefined8 *)(param_1 + 0x3f8) = 0; + *(undefined1 *)(param_1 + 0x400) = 0; + uVar1 = FUN_1423d59e0(local_38); + FUN_1423d5890(param_1 + 0x408,uVar1); + FUN_1423d59b0(local_38); + uVar1 = FUN_1423d59e0(local_38); + FUN_1423d5890(param_1 + 0x410,uVar1); + FUN_1423d59b0(local_38); + uVar1 = FUN_1423d59e0(local_38); + FUN_1423d5890(param_1 + 0x418,uVar1); + FUN_1423d59b0(local_38); + *(undefined4 *)(param_1 + 0x420) = 0; + uVar1 = FUN_1423d59e0(local_38); + FUN_1423d5890(param_1 + 0x428,uVar1); + FUN_1423d59b0(local_38); + *(undefined4 *)(param_1 + 0x43c) = 0; + if (*(int *)(param_1 + 0x438) != 0) { + FUN_14230889c(*(undefined8 *)(param_1 + 0x430)); + *(undefined8 *)(param_1 + 0x430) = 0; + } + *(undefined4 *)(param_1 + 0x438) = 0; + *(undefined2 *)(param_1 + 0x440) = 0; + uVar1 = FUN_1423d59e0(local_38); + FUN_1423d5890(param_1 + 0x448,uVar1); + FUN_1423d59b0(local_38); + uVar1 = FUN_1423d59e0(local_38); + FUN_1423d5890(param_1 + 0x450,uVar1); + FUN_1423d59b0(local_38); + uVar1 = FUN_1423d59e0(local_38); + FUN_1423d5890(param_1 + 0x458,uVar1); + FUN_1423d59b0(local_38); + uVar1 = FUN_1423d59e0(local_38); + FUN_1423d5890(param_1 + 0x478,uVar1); + FUN_1423d59b0(local_38); + *(undefined8 *)(param_1 + 0x468) = 0; + *(undefined8 *)(param_1 + 0x470) = 0; + *(undefined4 *)(param_1 + 0x480) = 0; + uVar1 = FUN_1423c3af0(local_38); + FUN_1423c2f90(param_1 + 0x488,uVar1); + FUN_1423c3ab0(local_38); + *(undefined8 *)(param_1 + 0x498) = 0; + *(undefined8 *)(param_1 + 0x4a0) = 0; + *(undefined4 *)(param_1 + 0x4a8) = 0; + uVar1 = FUN_1423d59e0(local_38); + FUN_1423d5890(param_1 + 0x4b0,uVar1); + FUN_1423d59b0(local_38); + uVar1 = FUN_1423d59e0(local_38); + FUN_1423d5890(param_1 + 0x4b8,uVar1); + FUN_1423d59b0(local_38); + uVar1 = FUN_1423d59e0(local_38); + FUN_1423d5890(param_1 + 0x4c0,uVar1); + FUN_1423d59b0(local_38); + return; +} + + + +//===== FUN_141b67f30 @ 141b67f30 [caller of formatForSearch] ===== + +/* WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie */ + +void FUN_141b67f30(undefined8 param_1,longlong param_2) + +{ + int iVar1; + longlong *plVar2; + undefined8 uVar3; + ulonglong uVar4; + uint uVar5; + ulonglong uVar6; + ulonglong uVar7; + undefined1 auStack_208 [32]; + longlong local_1e8; + undefined8 local_1e0; + undefined1 local_1d8 [8]; + undefined1 local_1d0 [8]; + undefined1 local_1c8 [8]; + undefined1 local_1c0 [8]; + undefined1 local_1b8 [8]; + undefined1 local_1b0 [8]; + undefined1 local_1a8 [8]; + undefined ***local_1a0; + undefined ***local_198; + undefined **local_188; + int local_180; + undefined1 local_178 [8]; + byte local_170 [8]; + undefined1 local_168 [8]; + undefined1 local_160 [16]; + undefined **local_150; + undefined ***local_148; + undefined1 local_120 [24]; + undefined4 local_108; + undefined1 local_104; + ulonglong local_100; + undefined1 local_f8 [8]; + undefined8 local_f0; + undefined1 local_e8 [16]; + undefined1 local_d8 [8]; + undefined8 local_d0; + undefined8 local_c8; + undefined **local_c0 [2]; + undefined1 local_b0 [8]; + undefined1 local_a8 [8]; + undefined1 local_a0 [8]; + undefined1 local_98 [16]; + undefined **local_88 [2]; + undefined1 local_78 [8]; + undefined1 local_70 [8]; + undefined1 local_68 [8]; + undefined1 local_60 [16]; + undefined1 local_50 [8]; + ulonglong local_48; + + local_48 = DAT_14519c398 ^ (ulonglong)auStack_208; + if (*(int *)(param_2 + 0xc) != 0) { + uVar7 = 0; + local_1e8 = 0; + local_1e0 = 0; + plVar2 = (longlong *)FUN_141b988e0(); + iVar1 = (**(code **)(*plVar2 + 0x2a0))(plVar2,param_2,&local_1e8); + if ((iVar1 == 0) && (0 < (int)local_1e0._4_4_)) { + local_1a0 = local_c0; + local_198 = local_88; + uVar4 = uVar7; + uVar6 = uVar7; + do { + local_188 = db::ListDataCommon::vftable; + FUN_1423d59e0(local_178); + FUN_141a1add0(local_170,0,0xf); + local_180 = 0; + uVar3 = FUN_1423d59e0(local_1d8); + FUN_1423d5890(local_178,uVar3); + FUN_1423d59b0(local_1d8); + uVar3 = FUN_1423d59e0(local_1d0); + FUN_1423d58d0(local_168,uVar3); + if ((local_170[0] & 1) != 0) { + FUN_141a1afc0(local_170,uVar3); + } + FUN_1423d59b0(local_1d0); + FUN_140ff8960(&local_150,0); + local_188 = db::ListDataPlaylist::vftable; + local_150 = db::ListDataPlaylist::vftable; + FUN_1423d59e0(local_f8); + FUN_1423d59e0(local_d8); + local_c0[0] = db::ListDataCommon::vftable; + FUN_1423d59e0(local_b0); + FUN_141a1add0(local_a8,1,0xf); + FUN_140ffa540(local_c0); + local_88[0] = db::ListDataCommon::vftable; + FUN_1423d59e0(local_78); + FUN_141a1add0(local_70,1,0xf); + FUN_140ffa540(local_88); + FUN_1423d59e0(local_50); + local_108 = 0; + local_104 = 0; + local_100 = 0; + uVar3 = FUN_1423d59e0(local_1c8); + FUN_1423d5890(local_f8,uVar3); + FUN_1423d59b0(local_1c8); + local_f0 = 0; + local_e8 = (undefined1 [16])0x0; + uVar3 = FUN_1423d59e0(local_1c0); + FUN_1423d5890(local_d8,uVar3); + FUN_1423d59b0(local_1c0); + local_d0 = 0xffffffffffffffff; + local_c8 = 0xffffffffffffffff; + if ((code *)local_c0[0][0x11] == FUN_140ffa540) { + FUN_140ffa540(); + } + else { + (*(code *)local_c0[0][0x11])(local_c0); + } + if ((code *)local_88[0][0x11] == FUN_140ffa540) { + FUN_140ffa540(); + } + else { + (*(code *)local_88[0][0x11])(local_88); + } + uVar3 = FUN_1423d59e0(local_1b8); + FUN_1423d5890(local_50,uVar3); + FUN_1423d59b0(local_1b8); + local_180 = 0; + uVar3 = FUN_1423d59e0(local_1b0); + FUN_1423d5890(local_178,uVar3); + FUN_1423d59b0(local_1b0); + uVar3 = FUN_1423d59e0(local_1a8); + FUN_1423d58d0(local_168,uVar3); + if ((local_170[0] & 1) != 0) { + FUN_141a1afc0(local_170,uVar3); + } + FUN_1423d59b0(local_1a8); + local_148 = &local_188; + plVar2 = (longlong *)FUN_141b988e0(param_1); + uVar5 = (uint)uVar4; + uVar4 = uVar7; + if (uVar5 < local_1e0._4_4_) { + uVar4 = (ulonglong)*(uint *)(uVar6 + local_1e8); + } + iVar1 = (**(code **)(*plVar2 + 0x340))(plVar2,uVar4,&local_188); + if (iVar1 == 0) { + iVar1 = 0; + if (uVar5 < local_1e0._4_4_) { + iVar1 = *(int *)(uVar6 + local_1e8); + } + if (local_180 == iVar1) { + FUN_1416b6240(local_180,local_104,local_100 & 0xffffffff,local_168); + } + } + local_188 = db::ListDataPlaylist::vftable; + local_150 = db::ListDataPlaylist::vftable; + FUN_1423d59b0(local_50); + local_88[0] = db::ListDataCommon::vftable; + FUN_1423d59b0(local_60); + FUN_1423d59b0(local_68); + FUN_1423d59b0(local_78); + local_c0[0] = db::ListDataCommon::vftable; + FUN_1423d59b0(local_98); + FUN_1423d59b0(local_a0); + FUN_1423d59b0(local_b0); + FUN_1423d59b0(local_d8); + FUN_1423d59b0(local_f8); + local_150 = db::MovableItemData::vftable; + FUN_1423d59b0(local_120); + local_188 = db::ListDataCommon::vftable; + FUN_1423d59b0(local_160); + FUN_1423d59b0(local_168); + FUN_1423d59b0(local_178); + uVar4 = (ulonglong)(uVar5 + 1); + uVar6 = uVar6 + 4; + } while ((int)(uVar5 + 1) < (int)local_1e0._4_4_); + } + local_1e0 = local_1e0 & 0xffffffff; + FUN_14230889c(local_1e8); + } + return; +} + + + +//===== FUN_1412a7320 @ 1412a7320 [caller of formatForSearch] ===== + +undefined * FUN_1412a7320(longlong param_1) + +{ + undefined *puVar1; + undefined1 local_res8 [32]; + + puVar1 = *(undefined **)(param_1 + 8); + if (puVar1 == (undefined *)0x0) { + if (*(int *)(*(longlong *)((longlong)ThreadLocalStoragePointer + (ulonglong)_tls_index * 8) + 8) + < DAT_1452eb7b8) { + FUN_14217cd0c(&DAT_1452eb7b8); + if (DAT_1452eb7b8 == -1) { + FUN_140ff8e40(&DAT_1452eb2f0); + atexit((_func_5014 *)&LAB_142bc4360); + _Init_thread_footer(&DAT_1452eb7b8); + } + } + FUN_1423d5720(local_res8,"PlayerTrackData Error!"); + FUN_1423d58d0(&DAT_1452eb310,local_res8); + if ((DAT_1452eb308 & 1) != 0) { + FUN_141a1afc0(&DAT_1452eb308,local_res8); + } + FUN_1423d59b0(local_res8); + puVar1 = &DAT_1452eb2f0; + } + return puVar1; +} + + + +//===== FUN_1410fde60 @ 1410fde60 [caller of formatForSearch] ===== + +/* WARNING: Function: __chkstk replaced with injection: alloca_probe */ +/* WARNING: Function: __security_check_cookie replaced with injection: security_check_cookie */ +/* WARNING: Removing unreachable block (ram,0x0001410fe092) */ +/* WARNING: Removing unreachable block (ram,0x0001410fe0c4) */ +/* WARNING: Removing unreachable block (ram,0x0001410ff82f) */ +/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ + +longlong * +FUN_1410fde60(longlong param_1,longlong *param_2,undefined8 param_3,int param_4,char param_5, + longlong *param_6) + +{ + bool bVar1; + longlong *plVar2; + char cVar3; + char cVar4; + undefined4 uVar5; + uint uVar6; + undefined4 uVar7; + int iVar8; + int iVar9; + undefined8 uVar10; + undefined8 *puVar11; + longlong lVar12; + undefined8 *puVar13; + undefined8 *puVar14; + int *piVar15; + undefined8 *puVar16; + undefined8 *puVar17; + ulonglong uVar18; + undefined8 uVar19; + undefined8 uVar20; + ulonglong *puVar21; + undefined ***pppuVar22; + longlong *plVar23; + undefined **ppuVar24; + undefined ***pppuVar25; + undefined4 uVar26; + int iVar27; + int *piVar28; + undefined **ppuVar29; + int iVar30; + int *piVar31; + undefined *puVar32; + ulonglong uVar33; + longlong lVar34; + uint uVar35; + uint uVar36; + uint uVar37; + longlong *plVar38; + ulonglong *puVar39; + undefined **ppuVar40; + int *piVar41; + ulonglong *puVar42; + longlong lVar43; + ulonglong *puVar44; + bool bVar45; + undefined1 auStack_1468 [32]; + ulonglong local_1448; + undefined8 local_1440; + undefined8 local_1438; + undefined8 local_1430; + uint local_1428; + char local_1424; + char local_1423; + longlong *local_1420; + int local_1418 [2]; + undefined ***local_1410; + int local_1408 [2]; + undefined8 local_1400; + ulonglong *local_13f8; + undefined8 local_13f0; + longlong *local_13e8; + undefined8 *local_13e0; + longlong local_13d8; + undefined ***local_13d0; + undefined8 local_13c8; + undefined8 local_13c0; + longlong *local_13b8; + longlong local_13b0; + undefined ***local_13a8; + longlong local_13a0; + undefined8 local_1398; + int *local_1390; + undefined8 local_1388; + char *local_1380; + int *local_1378; + undefined8 local_1370; + int local_1368 [2]; + longlong local_1360; + undefined1 local_1358 [8]; + int *local_1350; + undefined8 local_1348; + undefined8 *local_1340; + uint uStack_1338; + undefined4 uStack_1334; + undefined8 local_1328; + uint uStack_1320; + undefined4 uStack_131c; + longlong *local_1308; + longlong local_1300; + undefined4 local_12f8; + int local_12f4; + longlong local_12f0; + undefined1 *local_12e8; + longlong lStack_12e0; + undefined4 local_12d8; + int local_12d4; + char local_12d0; + undefined1 local_12c8 [8]; + undefined4 local_12c0 [2]; + undefined1 local_12b8 [8]; + undefined1 local_12b0 [8]; + longlong local_12a8; + undefined4 local_12a0; + undefined1 local_129c; + undefined1 local_129b; + undefined1 local_129a; + undefined1 local_1299; + longlong local_1298; + longlong lStack_1290; + undefined1 local_1288 [8]; + undefined1 local_1280 [8]; + undefined **local_1278; + undefined1 local_1270 [8]; + undefined1 local_1268 [8]; + undefined1 local_1260 [8]; + undefined1 local_1258 [8]; + undefined1 local_1250 [8]; + undefined1 local_1248 [8]; + undefined1 local_1240 [8]; + undefined1 local_1238 [8]; + undefined1 local_1230 [8]; + undefined1 local_1228 [8]; + undefined1 local_1220 [8]; + undefined1 local_1218 [8]; + undefined1 local_1210 [8]; + undefined1 local_1208 [8]; + int *local_1200; + int *local_11f8; + undefined1 local_11f0 [8]; + undefined8 **local_11e8; + undefined8 local_11e0; + undefined8 **local_11d8; + undefined8 local_11d0; + undefined ***local_11c8; + longlong *local_11b8; + undefined1 local_11b0 [8]; + undefined1 *local_11a8; + undefined1 local_11a0; + undefined8 *local_1198; + undefined8 uStack_1190; + undefined8 *local_1188; + undefined8 uStack_1180; + undefined *local_1170; + undefined1 local_1168 [8]; + undefined *local_1160; + longlong local_1158 [7]; + longlong *local_1120; + undefined4 local_1118; + undefined1 local_1110 [8]; + undefined1 local_1108 [8]; + undefined1 local_1100 [56]; + undefined1 local_10c8 [8]; + undefined1 local_10c0 [8]; + undefined1 local_10b8 [48]; + undefined **local_1088 [28]; + undefined **local_fa8 [3]; + undefined **local_f90; + undefined4 local_f88; + undefined1 local_f78 [128]; + undefined **local_ef8; + int local_ef0; + undefined1 local_ee8 [8]; + byte local_ee0 [8]; + undefined1 local_ed8 [8]; + undefined1 local_ed0 [16]; + undefined **local_ec0 [6]; + undefined1 local_e90 [40]; + undefined1 local_e68 [32]; + undefined1 local_e48 [24]; + undefined **local_e30 [2]; + undefined1 local_e20 [8]; + undefined1 local_e18 [8]; + undefined1 local_e10 [8]; + undefined1 local_e08 [16]; + undefined **local_df8 [2]; + undefined1 local_de8 [8]; + undefined1 local_de0 [8]; + undefined1 local_dd8 [8]; + undefined1 local_dd0 [16]; + undefined1 local_dc0 [8]; + undefined **local_db8; + int local_db0; + undefined1 local_da8 [16]; + undefined1 local_d98 [8]; + undefined1 local_d90 [16]; + undefined **local_d80; + undefined1 local_d50 [40]; + undefined1 local_d28 [32]; + undefined1 local_d08 [24]; + undefined **local_cf0; + undefined1 local_ce0 [16]; + undefined1 local_cd0 [8]; + undefined1 local_cc8 [16]; + undefined **local_cb8; + undefined1 local_ca8 [16]; + undefined1 local_c98 [8]; + undefined1 local_c90 [16]; + undefined1 local_c80 [8]; + undefined1 local_c78 [320]; + undefined1 local_b38 [320]; + undefined1 local_9f8 [136]; + undefined1 local_970 [1096]; + undefined1 local_528 [1232]; + ulonglong local_58; + undefined8 uStack_48; + + uStack_48 = 0x1410fde7f; + local_58 = DAT_14519c398 ^ (ulonglong)auStack_1468; + piVar31 = (int *)0x0; + *param_2 = 0; + param_2[1] = 0; + local_1400 = (undefined ***)CONCAT44(local_1400._4_4_,1); + local_1428 = 1; + iVar30 = 0; + local_1378 = (int *)0x0; + local_1370 = 0; + local_1390 = (int *)0x0; + local_1388 = 0; + iVar9 = 0; + local_13d0 = (undefined ***)0x0; + local_13c8 = 0; + local_1408[0] = param_4; + local_13e8 = param_2; + local_13c0 = param_1; + local_11b8 = param_2; + FUN_1410b8a50(&local_13d0,param_3,0,0xffffffff); + local_1420 = (longlong *)CONCAT44(local_1420._4_4_,local_13c8._4_4_); + if (local_13c8._4_4_ == 0) { + FUN_140cb0160(&local_13d0); + FUN_14230889c(local_13d0); + FUN_14230889c(0); + FUN_14230889c(0); + return param_2; + } + param_1 = param_1 + 0xe0; + uVar5 = FUN_1410784e0(param_1); + uVar6 = FUN_1410784d0(param_1); + uVar7 = FUN_141078520(param_1); + iVar8 = FUN_1410784c0(); + uVar26 = 0; + if (iVar8 == 2) { + uVar26 = uVar7; + } + local_1328 = (undefined1 *)CONCAT44(uVar26,iVar8); + if (uVar6 == 0) { + uStack_1320 = 1; + uStack_131c = 0; + } + else { + uStack_1320 = uVar6; + uStack_131c = uVar5; + if (uVar6 == 1) { + uStack_131c = 0; + } + } + uVar6 = 0; + uVar10 = FUN_14176c700(local_1288,local_1408[0]); + puVar11 = (undefined8 *)FUN_1423ce840(local_11b0,"/rekordbox"); + local_1448 = local_1448 & 0xffffffffffffff00; + FUN_1423d0880(uVar10,&local_1380,*puVar11,0); + FUN_1423d59b0(local_1288); + local_1418[0] = -1; + local_13b8 = (longlong *)0x0; + local_13b0 = 0; + local_13b8 = (longlong *)FUN_14217c644(0x60); + *local_13b8 = (longlong)local_13b8; + local_13b8[1] = (longlong)local_13b8; + local_13b8[2] = (longlong)local_13b8; + *(undefined2 *)(local_13b8 + 3) = 0x101; + cVar3 = FUN_141678020(); + if (cVar3 == '\0') { + FUN_14111dc40(); + cVar3 = FUN_14169cc20(); + if (cVar3 == '\0') goto LAB_1410fe035; + local_1424 = '\x01'; + } + else { +LAB_1410fe035: + local_1424 = '\0'; + } + local_1350 = (int *)0x0; + local_1348 = 0; + if ((int)(uint)local_1420 < 1) { + local_1410 = local_13d0; + } + else { + lVar43 = 0; + local_1410 = local_13d0; + pppuVar22 = local_13d0; + do { + if (((local_1424 == '\0') || ((uint)local_1420 <= uVar6)) || + (pppuVar22[lVar43] == (undefined **)0x0)) { +LAB_1410fe0dd: + if (local_1408[0] == 0) { +LAB_1410fe138: + bVar45 = (uint)local_1420 <= uVar6; + if (bVar45) { + ppuVar24 = (undefined **)0x0; + } + else { + ppuVar24 = pppuVar22[lVar43]; + } + cVar3 = FUN_141ac1540(ppuVar24); + if (cVar3 == '\0') { + if (bVar45) goto LAB_1410fe11e; + FUN_140d86370(&local_1390); + } + else { +LAB_1410fe16c: + bVar45 = (uint)local_1420 <= uVar6; + if (((bVar45) || (pppuVar22[lVar43] == (undefined **)0x0)) || + (cVar3 = FUN_141ac04d0(pppuVar22[lVar43]), cVar3 == '\0')) { + if (*local_1380 == '\0') { + uVar36 = (uint)local_1400; +LAB_1410fe213: + bVar1 = false; + } + else { + if (bVar45) { + ppuVar24 = (undefined **)0x0; + } + else { + ppuVar24 = pppuVar22[lVar43]; + } + uVar10 = FUN_1419f6820(local_1280,ppuVar24 + 0x11); + uVar36 = (uint)local_1400 | 2; + local_1400 = (undefined ***)((ulonglong)local_1400 | 2); + local_1428 = uVar36; + FUN_1423ce820(local_1168,&local_1380); + cVar3 = FUN_1423d1780(uVar10); + if (cVar3 == '\0') goto LAB_1410fe213; + bVar1 = true; + } + if ((uVar36 & 2) != 0) { + local_1428 = uVar36 & 0xfffffffd; + local_1400 = (undefined ***)(CONCAT44(local_1400._4_4_,uVar36) & 0xfffffffffffffffd) + ; + FUN_1423d59b0(local_1280); + } + if ((local_1408[0] == 3) || (pppuVar22 = local_1410, !bVar1)) { + if ((!bVar45) && (local_1410[lVar43] != (undefined **)0x0)) { + uVar36 = *(uint *)(local_1410[lVar43] + 1); + iVar9 = FUN_1410784c0(local_13c0 + 0xe0); + local_1200 = local_1418; + local_11f8 = local_1408; + uVar18 = 0; + uVar37 = 0; + uVar33 = uVar18; +LAB_1410fe293: + lVar34 = FUN_14124a1f0(uVar33); + if (((lVar34 == 0) || (lVar12 = FUN_14202c080(lVar34), lVar12 == 0)) || + (lVar12 = FUN_14202c080(lVar34), *(uint *)(lVar12 + 8) != uVar36)) + goto LAB_1410fe2e7; + if (local_1418[0] == -1) { + FUN_14111b6c0(&local_1200); + } + if (local_1418[0] == 1) { + FUN_14205a010(lVar34,1,0,0); + goto LAB_1410fe2e7; + } + if (param_6[1] != 0) { + puVar11 = (undefined8 *)*param_6; + puVar16 = (undefined8 *)puVar11[1]; + cVar4 = *(char *)((longlong)puVar16 + 0x19); + puVar17 = puVar11; + puVar13 = puVar16; + cVar3 = cVar4; + while (cVar3 == '\0') { + if (*(uint *)(puVar13 + 4) < uVar36) { + puVar14 = (undefined8 *)puVar13[2]; + puVar13 = puVar17; + } + else { + puVar14 = (undefined8 *)*puVar13; + } + puVar17 = puVar13; + puVar13 = puVar14; + cVar3 = *(char *)((longlong)puVar14 + 0x19); + } + if ((*(char *)((longlong)puVar17 + 0x19) == '\0') && + (*(uint *)(puVar17 + 4) <= uVar36)) { + while (cVar4 == '\0') { + if (*(uint *)(puVar16 + 4) < uVar36) { + puVar17 = (undefined8 *)puVar16[2]; + puVar16 = puVar11; + } + else { + puVar17 = (undefined8 *)*puVar16; + } + puVar11 = puVar16; + puVar16 = puVar17; + cVar4 = *(char *)((longlong)puVar17 + 0x19); + } + if ((*(char *)((longlong)puVar11 + 0x19) != '\0') || + (uVar36 < *(uint *)(puVar11 + 4))) goto LAB_14110007a; + lVar12 = puVar11[5]; + lVar34 = lVar12 + (longlong)*(int *)((longlong)puVar11 + 0x34) * 4; + for (; lVar12 != lVar34; lVar12 = lVar12 + 4) { + FUN_140d86370(&local_1378); + } + } + } + goto LAB_1410fe3ab; + } +LAB_1410fe77e: + pppuVar22 = local_1410; + if (local_1418[0] == 0) { +LAB_1410fe785: + pppuVar22 = local_1410; + if (param_6[1] == 0) { + uVar10 = FUN_1419718d0(); + cVar3 = FUN_1419a50d0(uVar10); + if (cVar3 != '\0') { + uVar10 = FUN_1419718d0(); + FUN_1419a51a0(uVar10,0); + uVar10 = FUN_1419718d0(); + FUN_1419a4100(uVar10,1); + } + pppuVar22 = local_1410 + (int)(uint)local_1420; + plVar23 = local_13e8; + for (pppuVar25 = local_1410; pppuVar25 != pppuVar22; pppuVar25 = pppuVar25 + 1) + { + uVar18 = (ulonglong)local_13c0 >> 0x20; + local_13c0 = CONCAT44((int)uVar18,*(int *)(*pppuVar25 + 1)); + piVar28 = (int *)*plVar23; + piVar31 = piVar28 + *(int *)((longlong)plVar23 + 0xc); + for (; piVar28 != piVar31; piVar28 = piVar28 + 1) { + if (*(int *)(*pppuVar25 + 1) == *piVar28) goto LAB_1410fe83d; + } + FUN_140c832b0(plVar23,&local_13c0); + plVar23 = local_13e8; +LAB_1410fe83d: + } + FUN_14230889c(local_1350); + FUN_1411196a0(&local_13b8,&local_13b8,local_13b8[1]); + goto LAB_141100011; + } + } + } + } + else { + FUN_140d86370(&local_1390); + } + } + } + else { + bVar45 = (uint)local_1420 <= uVar6; + if (bVar45) { + ppuVar24 = (undefined **)0x0; + } + else { + ppuVar24 = pppuVar22[lVar43]; + } + cVar3 = FUN_141ac14b0(ppuVar24); + if (cVar3 != '\0') { + if (local_1408[0] == 0) goto LAB_1410fe138; + goto LAB_1410fe16c; + } + if (!bVar45) { + FUN_140d86370(&local_1390); + goto LAB_1410fe791; + } +LAB_1410fe11e: + FUN_140d86370(&local_1390); + } + } + else { + uVar10 = FUN_14111dc40(); + cVar3 = FUN_14169cc00(uVar10,*(undefined4 *)(pppuVar22[lVar43] + 1),uVar6 == 0); + if (cVar3 != '\0') { + goto LAB_1410fe0dd; + } + FUN_140c832b0(&local_1350); + } +LAB_1410fe791: + uVar6 = uVar6 + 1; + lVar43 = lVar43 + 1; + } while ((int)uVar6 < (int)(uint)local_1420); + piVar31 = local_1378; + iVar9 = local_1388._4_4_; + iVar30 = local_1370._4_4_; + } + puVar39 = (ulonglong *)0x0; + local_13f8 = (ulonglong *)0x0; + local_13f0 = 0; + puVar42 = puVar39; + puVar44 = puVar39; + if (param_6[1] == 0) { + ppuVar24 = (undefined **)0x0; + if (0 < (int)(uint)local_1420) { + piVar31 = local_1390 + iVar9; + bVar45 = (uint)local_1420 != 0; + pppuVar22 = local_1410; + ppuVar40 = ppuVar24; +LAB_1410fea91: + ppuVar29 = ppuVar24; + if (bVar45) { + ppuVar29 = *pppuVar22; + } + for (piVar28 = local_1390; piVar28 != piVar31; piVar28 = piVar28 + 1) { + if (*(int *)(ppuVar29 + 1) == *piVar28) { + ppuVar29 = ppuVar24; + if (bVar45) { + ppuVar29 = *pppuVar22; + } + local_1368[0] = *(int *)(ppuVar29 + 1); + piVar41 = (int *)*local_13e8; + piVar28 = piVar41 + *(int *)((longlong)local_13e8 + 0xc); + goto joined_r0x0001410feaea; + } + } + local_1278 = ppuVar24; + if (bVar45) { + local_1278 = *pppuVar22; + } + for (puVar42 = puVar39; puVar42 != puVar39 + (int)puVar44; puVar42 = puVar42 + 1) { + if (local_1278 == (undefined **)*puVar42) goto LAB_1410feb4d; + } + FUN_140e13720(&local_13f8,&local_1278); + puVar44 = (ulonglong *)(local_13f0 >> 0x20); + puVar39 = local_13f8; + goto LAB_1410feb4d; + } + } + else { + pppuVar22 = local_1410 + (int)(uint)local_1420; + pppuVar25 = local_1410; + if (local_1410 != pppuVar22) { +LAB_1410fe8c2: + iVar9 = (int)puVar44; + ppuVar24 = *pppuVar25; + puVar11 = (undefined8 *)*param_6; + puVar16 = (undefined8 *)puVar11[1]; + puVar17 = puVar11; + if (*(char *)((longlong)puVar16 + 0x19) == '\0') { + puVar13 = puVar16; + do { + if (*(uint *)(puVar13 + 4) < *(uint *)(ppuVar24 + 1)) { + puVar14 = (undefined8 *)puVar13[2]; + } + else { + puVar14 = (undefined8 *)*puVar13; + puVar17 = puVar13; + } + puVar13 = puVar14; + } while (*(char *)((longlong)puVar14 + 0x19) == '\0'); + } + if ((*(char *)((longlong)puVar17 + 0x19) == '\0') && + (*(uint *)(puVar17 + 4) <= *(uint *)(ppuVar24 + 1))) { + if (*(char *)((longlong)puVar16 + 0x19) == '\0') { + do { + if (*(uint *)(puVar16 + 4) < *(uint *)(ppuVar24 + 1)) { + puVar17 = (undefined8 *)puVar16[2]; + } + else { + puVar17 = (undefined8 *)*puVar16; + puVar11 = puVar16; + } + puVar16 = puVar17; + } while (*(char *)((longlong)puVar17 + 0x19) == '\0'); + } + if ((*(char *)((longlong)puVar11 + 0x19) != '\0') || + (*(uint *)(ppuVar24 + 1) < *(uint *)(puVar11 + 4))) { + /* WARNING: Subroutine does not return */ + FUN_142178508("invalid map key"); + } + piVar41 = (int *)puVar11[5]; + piVar28 = piVar41 + *(int *)((longlong)puVar11 + 0x34); + if (piVar41 != piVar28) { + do { + if (piVar31 != piVar31 + iVar30) { + piVar15 = piVar31; + do { + if (*piVar41 == *piVar15) { + iVar9 = *(int *)(ppuVar24 + 1); + piVar41 = (int *)*local_13e8; + iVar8 = *(int *)((longlong)local_13e8 + 0xc); + piVar28 = piVar41 + iVar8; + goto joined_r0x0001410fea21; + } + piVar15 = piVar15 + 1; + } while (piVar15 != piVar31 + iVar30); + } + piVar41 = piVar41 + 1; + } while (piVar41 != piVar28); + } + for (puVar21 = puVar39; puVar21 != puVar39 + iVar9; puVar21 = puVar21 + 1) { + if (ppuVar24 == (undefined **)*puVar21) goto LAB_1410fe9f3; + } + iVar8 = iVar9 + 1; + if ((int)puVar42 < iVar8) { + iVar27 = iVar8; + if (iVar8 < 0) { + iVar27 = iVar9 + 2; + } + FUN_140c708a0(&local_13f8,(iVar27 >> 1) + 8 + iVar8 & 0xfffffff8); + puVar42 = (ulonglong *)(local_13f0 & 0xffffffff); + puVar39 = local_13f8; + iVar9 = local_13f0._4_4_; + } + puVar44 = (ulonglong *)(ulonglong)(iVar9 + 1U); + local_13f0 = CONCAT44(iVar9 + 1U,(undefined4)local_13f0); + puVar39[iVar9] = (ulonglong)ppuVar24; + } + goto LAB_1410fe9f3; + } + } +LAB_1410feb6d: + uVar6 = 0; + puVar39 = local_13f8; + if (local_1408[0] == 0) { + uVar10 = FUN_140feaa70(); + FUN_1410784e0(local_13c0 + 0xe0); + cVar3 = FUN_141ab8fa0(uVar10); + local_13e0 = (undefined8 *)0x0; + local_13d8 = 0; + local_1423 = cVar3; + local_13e0 = (undefined8 *)FUN_14217c644(0x38); + *local_13e0 = local_13e0; + local_13e0[1] = local_13e0; + local_13e0[2] = local_13e0; + *(undefined2 *)(local_13e0 + 3) = 0x101; + pppuVar22 = local_1410; + if ((int)(uint)local_1420 < 1) { + uVar6 = (uint)local_1400; + } + else { + do { + lVar34 = 0; + local_13a0 = 0; + local_1398 = 0; + lVar43 = DAT_1454330b0; + if (DAT_1454330b0 == 0) { + local_1170 = &DAT_145433080; + EnterCriticalSection((LPCRITICAL_SECTION)&DAT_145433080); + if (DAT_1454330b0 == 0) { + if (DAT_145280b50 != '\0') { + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_145433080); + lVar43 = lVar34; + goto LAB_1410feca2; + } + local_11a8 = &DAT_145280b50; + local_11a0 = 0; + DAT_145280b50 = 1; + local_13a8 = (undefined ***)FUN_14217c644(8); + if (local_13a8 != (undefined ***)0x0) { + lVar34 = FUN_141ab7c10(local_13a8); + } + LOCK(); + UNLOCK(); + DAT_145280b50 = '\0'; + DAT_1454330b0 = lVar34; + } + lVar43 = DAT_1454330b0; + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_145433080); + } +LAB_1410feca2: + uVar36 = local_13c8._4_4_; + local_1420 = (longlong *)CONCAT44(local_1420._4_4_,local_13c8._4_4_); + bVar45 = local_13c8._4_4_ <= uVar6; + if (bVar45) { + ppuVar24 = (undefined **)0x0; + } + else { + ppuVar24 = *pppuVar22; + } + cVar4 = FUN_141ab8ff0(lVar43,*(undefined4 *)(ppuVar24 + 1),&local_13a0); + puVar11 = local_13e0; + if (cVar4 != '\0') { + if (cVar3 == '\0') { + if (bVar45) { + ppuVar24 = (undefined **)0x0; + } + else { + ppuVar24 = *pppuVar22; + } + puVar16 = (undefined8 *)local_13e0[1]; + uStack_1338 = 0; + cVar3 = *(char *)((longlong)puVar16 + 0x19); + local_1340 = puVar16; + puVar17 = local_13e0; + while (puVar13 = puVar16, cVar3 == '\0') { + if (ppuVar24 <= (undefined **)puVar13[4]) { + puVar16 = (undefined8 *)*puVar13; + puVar17 = puVar13; + } + else { + puVar16 = (undefined8 *)puVar13[2]; + } + uStack_1338 = (uint)(ppuVar24 <= (undefined **)puVar13[4]); + cVar3 = *(char *)((longlong)puVar16 + 0x19); + local_1340 = puVar13; + } + if ((*(char *)((longlong)puVar17 + 0x19) != '\0') || + (ppuVar24 < (undefined **)puVar17[4])) { + if (local_13d8 == 0x492492492492492) { + /* WARNING: Subroutine does not return */ + FUN_140c62030(); + } + local_11e8 = &local_13e0; + local_11e0 = 0; + puVar16 = (undefined8 *)FUN_14217c644(0x38); + puVar16[4] = ppuVar24; + puVar16[5] = 0; + puVar16[6] = 0; + *puVar16 = puVar11; + puVar16[1] = puVar11; + puVar16[2] = puVar11; + *(undefined2 *)(puVar16 + 3) = 0; + local_11e0 = 0; + uStack_1180 = CONCAT44(uStack_1334,uStack_1338); + local_1188 = local_1340; + puVar17 = (undefined8 *)FUN_140c788f0(&local_13e0,&local_1188,puVar16); + } + FUN_14111db20(puVar17 + 5); + lVar34 = (longlong)local_1398._4_4_ * 0x140 + local_13a0; + for (lVar43 = local_13a0; lVar43 != lVar34; lVar43 = lVar43 + 0x140) { + iVar9 = *(int *)((longlong)puVar17 + 0x34); + *(int *)((longlong)puVar17 + 0x34) = iVar9 + 1; + FUN_14101f530((longlong)iVar9 * 0x140 + puVar17[5]); + } + uVar36 = (uint)local_1420; + } + else { + lVar43 = (longlong)local_1398._4_4_ * 0x140 + local_13a0; + if (local_13a0 != lVar43) { + local_1410 = local_e30; + local_1400 = local_df8; + lVar34 = local_13a0; + do { + local_ef8 = db::ListDataCommon::vftable; + FUN_1423d59e0(local_ee8); + FUN_141a1add0(local_ee0,1,0xf); + local_ef0 = 0; + uVar10 = FUN_1423d59e0(local_1270); + FUN_1423d5890(local_ee8,uVar10); + FUN_1423d59b0(local_1270); + uVar10 = FUN_1423d59e0(local_1268); + FUN_1423d58d0(local_ed8,uVar10); + if ((local_ee0[0] & 1) != 0) { + FUN_141a1afc0(local_ee0,uVar10); + } + FUN_1423d59b0(local_1268); + FUN_140ff8960(local_ec0,0); + local_ef8 = db::ListDataPlaylist::vftable; + local_ec0[0] = db::ListDataPlaylist::vftable; + FUN_1423d59e0(local_e68); + FUN_1423d59e0(local_e48); + local_e30[0] = db::ListDataCommon::vftable; + FUN_1423d59e0(local_e20); + FUN_141a1add0(local_e18,1,0xf); + FUN_140ffa540(local_e30); + local_df8[0] = db::ListDataCommon::vftable; + FUN_1423d59e0(local_de8); + FUN_141a1add0(local_de0,1,0xf); + FUN_140ffa540(local_df8); + FUN_1423d59e0(local_dc0); + FUN_14111b390(&local_ef8); + iVar9 = FUN_1410784e0(local_13c0 + 0xe0); + puVar11 = local_13e0; + if (local_ef0 != iVar9) { + ppuVar24 = (undefined **)0x0; + if (!bVar45) { + ppuVar24 = *pppuVar22; + } + puVar16 = (undefined8 *)local_13e0[1]; + uStack_1338 = 0; + cVar3 = *(char *)((longlong)puVar16 + 0x19); + local_1340 = puVar16; + puVar17 = local_13e0; + while (puVar13 = puVar16, cVar3 == '\0') { + if (ppuVar24 <= (undefined **)puVar13[4]) { + puVar16 = (undefined8 *)*puVar13; + puVar17 = puVar13; + } + else { + puVar16 = (undefined8 *)puVar13[2]; + } + uStack_1338 = (uint)(ppuVar24 <= (undefined **)puVar13[4]); + cVar3 = *(char *)((longlong)puVar16 + 0x19); + local_1340 = puVar13; + } + if ((*(char *)((longlong)puVar17 + 0x19) != '\0') || + (ppuVar24 < (undefined **)puVar17[4])) { + if (local_13d8 == 0x492492492492492) { + /* WARNING: Subroutine does not return */ + FUN_140c62030(); + } + local_11d8 = &local_13e0; + local_11d0 = 0; + puVar16 = (undefined8 *)FUN_14217c644(); + puVar16[4] = ppuVar24; + puVar16[5] = 0; + puVar16[6] = 0; + *puVar16 = puVar11; + puVar16[1] = puVar11; + puVar16[2] = puVar11; + *(undefined2 *)(puVar16 + 3) = 0; + local_11d0 = 0; + uStack_1190 = CONCAT44(uStack_1334,uStack_1338); + local_1198 = local_1340; + puVar17 = (undefined8 *)FUN_140c788f0(&local_13e0,&local_1198,puVar16); + } + plVar23 = puVar17 + 5; + iVar9 = *(int *)((longlong)puVar17 + 0x34) + 1; + if ((int)*(uint *)(puVar17 + 6) < iVar9) { + iVar30 = iVar9; + if (iVar9 < 0) { + iVar30 = *(int *)((longlong)puVar17 + 0x34) + 2; + } + uVar36 = (iVar30 >> 1) + 8 + iVar9 & 0xfffffff8; + if (*(uint *)(puVar17 + 6) != uVar36) { + if ((int)uVar36 < 1) { + FUN_14230889c(*plVar23); + *plVar23 = 0; + } + else { + FUN_14111e630(plVar23,uVar36); + } + } + *(uint *)(puVar17 + 6) = uVar36; + } + iVar9 = *(int *)((longlong)puVar17 + 0x34); + *(int *)((longlong)puVar17 + 0x34) = iVar9 + 1; + FUN_14101f530((longlong)iVar9 * 0x140 + *plVar23); + } + local_ef8 = db::ListDataPlaylist::vftable; + local_ec0[0] = db::ListDataPlaylist::vftable; + FUN_1423d59b0(local_dc0); + local_df8[0] = db::ListDataCommon::vftable; + FUN_1423d59b0(local_dd0); + FUN_1423d59b0(local_dd8); + FUN_1423d59b0(local_de8); + local_e30[0] = db::ListDataCommon::vftable; + FUN_1423d59b0(local_e08); + FUN_1423d59b0(local_e10); + FUN_1423d59b0(local_e20); + FUN_1423d59b0(local_e48); + FUN_1423d59b0(local_e68); + local_ec0[0] = db::MovableItemData::vftable; + FUN_1423d59b0(local_e90); + local_ef8 = db::ListDataCommon::vftable; + FUN_1423d59b0(local_ed0); + FUN_1423d59b0(local_ed8); + FUN_1423d59b0(local_ee8); + lVar34 = lVar34 + 0x140; + } while (lVar34 != lVar43); + } + uVar36 = (uint)local_1420; + } + } + uVar33 = 0; + uVar18 = uVar33; + if (0 < local_1398._4_4_) { + do { + (*(code *)**(undefined8 **)(local_13a0 + uVar33))(); + uVar37 = (int)uVar18 + 1; + uVar33 = uVar33 + 0x140; + uVar18 = (ulonglong)uVar37; + } while ((int)uVar37 < local_1398._4_4_); + } + local_1398 = local_1398 & 0xffffffff; + FUN_14230889c(local_13a0); + uVar6 = uVar6 + 1; + pppuVar22 = pppuVar22 + 1; + cVar3 = local_1423; + } while ((int)uVar6 < (int)uVar36); + local_1410 = local_13d0; + puVar44 = (ulonglong *)(local_13f0 >> 0x20); + puVar42 = (ulonglong *)(local_13f0 & 0xffffffff); + local_1400 = (undefined ***)CONCAT44(local_1400._4_4_,local_1428); + uVar6 = local_1428; + } + puVar39 = local_13f8; + if (local_13d8 != 0) { + uVar18 = FUN_1423d5ad0(local_1240,&DAT_142f3a404); + uVar10 = FUN_1423d5ad0(local_1248,&DAT_142f3a408); + if (local_1423 == '\0') { + uVar19 = FUN_1423d5b30(local_1258,&DAT_1452d0d18); + uVar6 = uVar6 | 8; + } + else { + uVar19 = FUN_1423d5b30(local_1250,&DAT_1452d1970); + uVar6 = uVar6 | 4; + } + local_1400 = (undefined ***)CONCAT44(local_1400._4_4_,uVar6); + local_1428 = uVar6; + uVar20 = FUN_1423d5ad0(local_1260,"Move to local storage"); + local_1438 = 0; + local_1440 = 0; + local_1448 = uVar18; + cVar3 = FUN_1424b3600(0,uVar20,uVar19,uVar10); + FUN_1423d59b0(local_1260); + uVar36 = uVar6; + if ((uVar6 & 8) != 0) { + uVar36 = uVar6 & 0xfffffff7; + local_1400 = (undefined ***)(CONCAT44(local_1400._4_4_,uVar6) & 0xfffffffffffffff7); + local_1428 = uVar36; + FUN_1423d59b0(local_1258); + } + uVar6 = uVar36; + if ((uVar36 & 4) != 0) { + uVar6 = uVar36 & 0xfffffffb; + local_1400 = (undefined ***)(CONCAT44(local_1400._4_4_,uVar36) & 0xfffffffffffffffb); + local_1428 = uVar6; + FUN_1423d59b0(local_1250); + } + FUN_1423d59b0(local_1248); + FUN_1423d59b0(local_1240); + puVar39 = local_13f8; + if ((cVar3 == '\0') && (puVar11 = (undefined8 *)*local_13e0, puVar11 != local_13e0)) { + do { + uVar18 = puVar11[4]; + if (*(int *)((longlong)puVar11 + 0x34) < 2) { + if (*(int *)((longlong)puVar11 + 0x34) == 0) { + uVar6 = uVar6 | 0x800; + local_1428 = uVar6; + FUN_1410103a0(local_c78); + } + else { + uVar6 = uVar6 | 0x400; + local_1428 = uVar6; + FUN_14101f530(local_b38,puVar11[5]); + } + FUN_14101f530(&local_db8); + if ((uVar6 >> 0xb & 1) != 0) { + uVar6 = uVar6 & 0xfffff7ff; + FUN_141010690(local_c78); + } + if ((uVar6 >> 10 & 1) != 0) { + uVar6 = uVar6 & 0xfffffbff; + FUN_141010690(local_b38); + } + uVar6 = uVar6 | 0x210; + local_1428 = uVar6; + iVar9 = FUN_1410784e0(local_13c0 + 0xe0); + if (local_db0 != iVar9) goto LAB_1410ff491; + bVar45 = false; + } + else { +LAB_1410ff491: + bVar45 = true; + } + if ((uVar6 & 0x10) != 0) { + uVar6 = uVar6 & 0xffffffef; + local_db8 = db::ListDataPlaylist::vftable; + local_d80 = db::ListDataPlaylist::vftable; + local_1428 = uVar6; + FUN_1423d59b0(local_c80); + local_cb8 = db::ListDataCommon::vftable; + FUN_1423d59b0(local_c90); + FUN_1423d59b0(local_c98); + FUN_1423d59b0(local_ca8); + local_cf0 = db::ListDataCommon::vftable; + FUN_1423d59b0(local_cc8); + FUN_1423d59b0(local_cd0); + FUN_1423d59b0(local_ce0); + FUN_1423d59b0(local_d08); + FUN_1423d59b0(local_d28); + local_d80 = db::MovableItemData::vftable; + FUN_1423d59b0(local_d50); + local_db8 = db::ListDataCommon::vftable; + FUN_1423d59b0(local_d90); + FUN_1423d59b0(local_d98); + FUN_1423d59b0(local_da8); + } + if (bVar45) { + iVar9 = 0; + iVar30 = (int)puVar44; + puVar21 = puVar39; + if (0 < iVar30) { + do { + if (uVar18 == *puVar21) { + FUN_1422fd540(puVar39 + iVar9,puVar39 + iVar9 + 1, + (longlong)((iVar30 - iVar9) + -1) << 3); + uVar36 = iVar30 - 1; + puVar44 = (ulonglong *)(ulonglong)uVar36; + local_13f0 = CONCAT44(uVar36,(undefined4)local_13f0); + iVar9 = 0; + if (0 < (int)(uVar36 * 2)) { + iVar9 = uVar36 * 2; + } + if (iVar9 < (int)puVar42) { + if ((int)uVar36 < 8) { + uVar36 = 8; + } + if ((int)uVar36 < (int)puVar42) { + FUN_140c708a0(&local_13f8); + puVar44 = (ulonglong *)(local_13f0 >> 0x20); + puVar42 = (ulonglong *)(local_13f0 & 0xffffffff); + puVar39 = local_13f8; + } + } + break; + } + iVar9 = iVar9 + 1; + puVar21 = puVar21 + 1; + } while (iVar9 < iVar30); + } + plVar23 = local_13e8; + iVar9 = *(int *)(uVar18 + 8); + piVar28 = (int *)*local_13e8; + piVar31 = piVar28 + *(int *)((longlong)local_13e8 + 0xc); + for (; piVar28 != piVar31; piVar28 = piVar28 + 1) { + if (iVar9 == *piVar28) goto LAB_1410ff684; + } + if ((int)local_13e8[1] < *(int *)((longlong)local_13e8 + 0xc) + 1) { + FUN_140c8ae10(local_13e8); + } + iVar30 = *(int *)((longlong)plVar23 + 0xc); + *(int *)((longlong)plVar23 + 0xc) = iVar30 + 1; + *(int *)(*plVar23 + (longlong)iVar30 * 4) = iVar9; + } +LAB_1410ff684: + puVar16 = (undefined8 *)puVar11[2]; + if (*(char *)((longlong)puVar16 + 0x19) == '\0') { + cVar3 = *(char *)((longlong)*puVar16 + 0x19); + puVar11 = puVar16; + puVar16 = (undefined8 *)*puVar16; + while (cVar3 == '\0') { + cVar3 = *(char *)((longlong)*puVar16 + 0x19); + puVar11 = puVar16; + puVar16 = (undefined8 *)*puVar16; + } + } + else { + cVar3 = *(char *)((longlong)puVar11[1] + 0x19); + puVar17 = (undefined8 *)puVar11[1]; + puVar16 = puVar11; + while ((puVar11 = puVar17, cVar3 == '\0' && (puVar16 == (undefined8 *)puVar11[2]))) { + cVar3 = *(char *)((longlong)puVar11[1] + 0x19); + puVar17 = (undefined8 *)puVar11[1]; + puVar16 = puVar11; + } + } + } while (puVar11 != local_13e0); + local_1400 = (undefined ***)CONCAT44(local_1400._4_4_,uVar6); + } + } + FUN_141119950(&local_13e0,&local_13e0,local_13e0[1]); + thunk_FUN_14217cc5c(local_13e0,0x38); + } + piVar31 = local_1350; + iVar9 = (int)puVar44; + if (local_1424 != '\0') { + uVar6 = 0; + if (0 < (int)(uint)local_1420) { + lVar43 = (longlong)local_1348._4_4_; + bVar45 = (uint)local_1420 != 0; + uVar36 = (uint)local_1420; +LAB_1410ff73a: + if ((bVar45) && (ppuVar24 = *local_1410, ppuVar24 != (undefined **)0x0)) { + for (piVar28 = piVar31; piVar28 != piVar31 + lVar43; piVar28 = piVar28 + 1) { + if (*(int *)(ppuVar24 + 1) == *piVar28) { + iVar9 = 0; + iVar30 = (int)puVar44; + puVar21 = puVar39; + if (0 < iVar30) goto LAB_1410ff7a0; + goto LAB_1410ff826; + } + } + } + goto LAB_1410ff899; + } + } +LAB_1410ff8ad: + local_1308 = local_13e8; + local_1300 = 0; + local_12f8 = 0; + local_12f4 = 0; + iVar30 = 0; + if (0 < iVar9) { + FUN_140c708a0(&local_1300,iVar9 / 2 + 8 + iVar9 & 0xfffffff8); + FUN_1422fd540(local_1300 + (longlong)local_12f4 * 8,puVar39,(longlong)iVar9 << 3); + iVar30 = local_12f4; + } + local_12f4 = iVar30 + iVar9; + local_12f0 = local_13c0; + lStack_12e0 = CONCAT44(uStack_131c,uStack_1320); + local_12e8 = local_1328; + local_12d8 = 0; + local_12d4 = local_1408[0]; + local_12d0 = param_5; + FUN_1423d59e0(local_1358); + puVar32 = &DAT_1452d1450; + if (local_1408[0] < 1) { + puVar32 = &DAT_1452d1288; + } + FUN_1423d58d0(local_1358,puVar32); + if (iVar9 < 0x32) { + uVar10 = FUN_1419718d0(); + iVar9 = FUN_1419a75e0(uVar10); + if (iVar9 != 0) { + FUN_14111c9d0(&local_1308,0); + goto LAB_1410ffd16; + } + } + pppuVar22 = (undefined ***)FUN_14217c644(0x2e0); + local_13a8 = pppuVar22; + if (pppuVar22 == (undefined ***)0x0) { + pppuVar22 = (undefined ***)0x0; + uVar6 = (uint)local_1400; + } + else { + local_1410 = (undefined ***)local_1158; + local_1120 = (longlong *)0x0; + plVar23 = (longlong *)FUN_14217c644(0x48); + iVar9 = local_12f4; + lVar43 = local_1300; + *plVar23 = (longlong) + std:: + _Func_impl_no_alloc<,void,juce::ThreadWithProgressWindow*___ptr64> + ::vftable; + plVar23[1] = (longlong)local_1308; + plVar23[2] = 0; + plVar23[3] = 0; + lVar34 = (longlong)local_12f4; + if (0 < local_12f4) { + FUN_140c708a0(plVar23 + 2,local_12f4 + 8 + local_12f4 / 2 & 0xfffffff8); + FUN_1422fd540(plVar23[2] + (longlong)*(int *)((longlong)plVar23 + 0x1c) * 8,lVar43,lVar34 << 3 + ); + } + *(int *)((longlong)plVar23 + 0x1c) = *(int *)((longlong)plVar23 + 0x1c) + iVar9; + plVar23[4] = local_12f0; + plVar23[5] = (longlong)local_12e8; + plVar23[6] = lStack_12e0; + *(undefined4 *)(plVar23 + 7) = local_12d8; + *(int *)((longlong)plVar23 + 0x3c) = local_12d4; + *(char *)(plVar23 + 8) = local_12d0; + local_1420 = local_1158; + local_1120 = plVar23; + uVar10 = FUN_1423d5b30(local_1230,local_1358); + uVar6 = (uint)local_1400 | 0x20; + local_1428 = uVar6; + local_1440 = FUN_1423d5ad0(local_1238,"Cancel"); + local_1438 = 0; + local_1448 = CONCAT44(local_1448._4_4_,10000); + FUN_1424aa2a0(pppuVar22,uVar10,1); + FUN_1423d59b0(local_1238); + *pppuVar22 = `public:_class_juce::Array___cdecl_browse::ListViewer::shareOnCloud(juce::Array_const&___ptr64,int,bool,std::map,std::less,std::allocator_>_>_>_const&___ptr64)___ptr64' + ::__l2::CloudSharingThread::vftable; + pppuVar22[0x47] = + `public:_class_juce::Array___cdecl_browse::ListViewer::shareOnCloud(juce::Array_const&___ptr64,int,bool,std::map,std::less,std::allocator_>_>_>_const&___ptr64)___ptr64' + ::__l2::CloudSharingThread::vftable; + local_1410 = pppuVar22 + 0x54; + pppuVar22[0x5b] = (undefined **)0x0; + if (local_1120 != (longlong *)0x0) { + ppuVar24 = (undefined **)(**(code **)*local_1120)(local_1120,local_1410); + pppuVar22[0x5b] = ppuVar24; + } + if (local_1120 != (longlong *)0x0) { + (**(code **)(*local_1120 + 0x20)) + (local_1120,CONCAT71((int7)((ulonglong)local_1158 >> 8),local_1120 != local_1158)); + local_1120 = (longlong *)0x0; + } + } + local_11c8 = pppuVar22; + if ((uVar6 & 0x20) != 0) { + uVar6 = uVar6 & 0xffffffdf; + local_1428 = uVar6; + FUN_1423d59b0(local_1230); + } + cVar3 = FUN_1424a9ea0(pppuVar22,0); + if (cVar3 == '\0') { + uVar10 = FUN_1419718d0(); + cVar3 = FUN_1419a50d0(uVar10); + if (cVar3 != '\0') { + uVar10 = FUN_1419718d0(); + FUN_1419a51a0(uVar10,0); + uVar10 = FUN_1419718d0(); + FUN_1419a4100(uVar10,1); + uVar10 = FUN_1423d5ad0(local_1208,&DAT_142f3a428); + uVar19 = FUN_1423d5b30(local_1210,&DAT_1452d1fc0); + pppuVar25 = (undefined ***)FUN_1423d5b30(local_11f0,&DAT_1452d0de8); + local_13a8 = pppuVar25; + uVar20 = FUN_1423d3790(pppuVar25,&DAT_1449b072c); + FUN_1423d5980(local_12c8,uVar20); + local_1428 = uVar6 | 0x100; + FUN_1423d59b0(pppuVar25); + uVar19 = FUN_1423d3360(local_1218,local_12c8,uVar19); + if (param_5 == '\0') { + uVar20 = FUN_1423d5b30(local_1228,&DAT_1452d13e8); + uVar6 = uVar6 | 0x180; + } + else { + uVar20 = FUN_1423d5b30(local_1220,&DAT_1452d15c0); + uVar6 = uVar6 | 0x140; + } + local_1440 = 0; + local_1448 = 0; + local_1428 = uVar6; + FUN_1424b3bc0(0,uVar20,uVar19,uVar10); + if ((char)uVar6 < '\0') { + uVar6 = uVar6 & 0xffffff7f; + local_1428 = uVar6; + FUN_1423d59b0(local_1228); + } + if ((uVar6 & 0x40) != 0) { + local_1428 = uVar6 & 0xffffffbf; + FUN_1423d59b0(local_1220); + } + FUN_1423d59b0(local_1218); + FUN_1423d59b0(local_1210); + FUN_1423d59b0(local_1208); + } + FUN_140ff8e40(local_528); + FUN_140ff9950(local_528); + } + if (pppuVar22 != (undefined ***)0x0) { + (*(code *)**pppuVar22)(pppuVar22,1); + } +LAB_1410ffd16: + uVar10 = 0; + if (local_13b0 != 0) { + lVar43 = FUN_141425a30(); + if (*(longlong *)(lVar43 + 0x578) != 0) { + lVar43 = *(longlong *)(*(longlong *)(lVar43 + 0x578) + 0x1e0); + if (lVar43 != 0) { + uVar10 = *(undefined8 *)(lVar43 + 0x10); + } + local_1448 = local_1448 & 0xffffffff00000000; + lVar43 = FUN_1422fe378(uVar10,0,&juce::Component::RTTI_Type_Descriptor, + &SamplerControlPanel::RTTI_Type_Descriptor); + if (lVar43 != 0) { + plVar23 = (longlong *)*local_13b8; + if (plVar23 != local_13b8) { + do { + lVar34 = plVar23[4]; + local_12c0[0] = (undefined4)plVar23[5]; + FUN_1423d5980(local_12b8,plVar23 + 6); + FUN_1423d5980(local_12b0,plVar23 + 7); + uVar26 = local_12c0[0]; + local_12a8 = plVar23[8]; + local_12a0 = (undefined4)plVar23[9]; + local_129c = *(undefined1 *)((longlong)plVar23 + 0x4c); + local_129b = *(undefined1 *)((longlong)plVar23 + 0x4d); + local_129a = *(undefined1 *)((longlong)plVar23 + 0x4e); + local_1299 = *(undefined1 *)((longlong)plVar23 + 0x4f); + local_1298 = plVar23[10]; + lStack_1290 = plVar23[0xb]; + FUN_140ff8e40(local_9f8); + lVar12 = DAT_1454330b0; + if (DAT_1454330b0 == 0) { + local_1160 = &DAT_145433080; + EnterCriticalSection((LPCRITICAL_SECTION)&DAT_145433080); + lVar12 = DAT_1454330b0; + if (DAT_1454330b0 == 0) { + if (DAT_145280b50 != '\0') { + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_145433080); + goto LAB_1410ffeb6; + } + local_1328 = &DAT_145280b50; + uStack_1320 = uStack_1320 & 0xffffff00; + DAT_145280b50 = 1; + local_13a8 = (undefined ***)FUN_14217c644(8); + if (local_13a8 == (undefined ***)0x0) { + DAT_1454330b0 = 0; + } + else { + DAT_1454330b0 = FUN_141ab7c10(local_13a8); + } + LOCK(); + UNLOCK(); + DAT_145280b50 = '\0'; + } + lVar12 = DAT_1454330b0; + LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_145433080); + } +LAB_1410ffeb6: + local_1448 = local_1448 & 0xffffffff00000000; + cVar3 = FUN_141ab9250(lVar12,uVar26,local_9f8,1); + if (cVar3 != '\0') { + FUN_1423d58d0(local_12b0,local_970); + if (*(longlong *)(lVar43 + 0x2e8) != 0) { + FUN_1415c52d0(*(longlong *)(lVar43 + 0x2e8),(int)lVar34,local_12c0,1); + } + } + FUN_140ff9950(local_9f8); + FUN_1423d59b0(local_12b0); + FUN_1423d59b0(local_12b8); + plVar38 = (longlong *)plVar23[2]; + if (*(char *)((longlong)plVar38 + 0x19) == '\0') { + cVar3 = *(char *)(*plVar38 + 0x19); + plVar23 = plVar38; + plVar38 = (longlong *)*plVar38; + while (cVar3 == '\0') { + cVar3 = *(char *)(*plVar38 + 0x19); + plVar23 = plVar38; + plVar38 = (longlong *)*plVar38; + } + } + else { + cVar3 = *(char *)(plVar23[1] + 0x19); + plVar2 = (longlong *)plVar23[1]; + plVar38 = plVar23; + while ((plVar23 = plVar2, cVar3 == '\0' && (plVar38 == (longlong *)plVar23[2]))) { + cVar3 = *(char *)(plVar23[1] + 0x19); + plVar2 = (longlong *)plVar23[1]; + plVar38 = plVar23; + } + } + puVar39 = local_13f8; + } while (plVar23 != local_13b8); + } + FUN_1415bd900(lVar43); + } + } + } + FUN_1423d59b0(local_1358); + local_12f4 = 0; + FUN_14230889c(local_1300); + FUN_14230889c(puVar39); + FUN_14230889c(local_1350); + cVar3 = *(char *)(local_13b8[1] + 0x19); + plVar23 = (longlong *)local_13b8[1]; + while (cVar3 == '\0') { + FUN_1411196a0(&local_13b8,&local_13b8,plVar23[2]); + plVar38 = (longlong *)*plVar23; + FUN_1423d59b0(plVar23 + 7); + FUN_1423d59b0(plVar23 + 6); + thunk_FUN_14217cc5c(plVar23,0x60); + plVar23 = plVar38; + cVar3 = *(char *)((longlong)plVar38 + 0x19); + } +LAB_141100011: + thunk_FUN_14217cc5c(local_13b8,0x60); + FUN_1423d59b0(&local_1380); + FUN_140cb0160(&local_13d0); + FUN_14230889c(local_13d0); + FUN_14230889c(local_1390); + FUN_14230889c(local_1378); + return local_13e8; +LAB_1410fe2e7: + uVar35 = (int)uVar33 + 1; + uVar33 = (ulonglong)uVar35; + if (3 < (int)uVar35) { +LAB_1410fe3ab: + if (local_1418[0] != 0) { + uVar10 = FUN_14106dce0(); + plVar23 = (longlong *)FUN_141256c30(uVar10); + cVar3 = (**(code **)(*plVar23 + 0x18))(plVar23); + if (cVar3 == '\0') { +LAB_1410fe5a7: + if (local_1418[0] == 0) goto LAB_1410fe785; + } + else { + uVar10 = FUN_14106dce0(); + plVar23 = (longlong *)FUN_141256c30(uVar10); + lVar34 = (**(code **)(*plVar23 + 0x28))(plVar23); + if (lVar34 != 0) { + lVar34 = FUN_1412a7320(lVar34); + uVar37 = *(uint *)(lVar34 + 8); + } + if (uVar37 != uVar36) goto LAB_1410fe5a7; + if ((local_1418[0] == 1) || (cVar3 = FUN_14111b6c0(&local_1200), cVar3 != '\0')) { + local_13a8 = local_1088; + FUN_14254d0c0(local_1088); + FUN_142471b60(local_fa8); + local_1088[0] = + `public:_class_juce::Array___cdecl_browse::ListViewer::shareOnCloud(juce::Array_const&___ptr64,int,bool,std::map,std::less,std::allocator_>_>_>_const&___ptr64)___ptr64' + ::__l74::EditPlayerControllerCallbacker::vftable; + local_fa8[0] = `public:_class_juce::Array___cdecl_browse::ListViewer::shareOnCloud(juce::Array_const&___ptr64,int,bool,std::map,std::less,std::allocator_>_>_>_const&___ptr64)___ptr64' + ::__l74::EditPlayerControllerCallbacker::vftable; + local_f90 = `public:_class_juce::Array___cdecl_browse::ListViewer::shareOnCloud(juce::Array_const&___ptr64,int,bool,std::map,std::less,std::allocator_>_>_>_const&___ptr64)___ptr64' + ::__l74::EditPlayerControllerCallbacker::vftable; + local_f88 = 300; + uVar10 = FUN_14106dce0(); + plVar23 = (longlong *)FUN_141256c30(uVar10); + (**(code **)(*plVar23 + 0xd0))(plVar23,&local_f90); + uVar10 = FUN_14106dce0(); + plVar23 = (longlong *)FUN_141256c20(uVar10); + cVar3 = (**(code **)(*plVar23 + 0x38))(plVar23); + if (cVar3 == '\0') { + local_1418[0] = 0; + } + else { + FUN_142471a20(local_fa8); + FUN_1425491b0(local_1088); + } + FUN_14111b250(local_1088); + } + if (local_1418[0] == 0) { + if (param_6[1] != 0) { + puVar11 = (undefined8 *)*param_6; + puVar16 = (undefined8 *)puVar11[1]; + cVar4 = *(char *)((longlong)puVar16 + 0x19); + puVar17 = puVar11; + puVar13 = puVar16; + cVar3 = cVar4; + while (cVar3 == '\0') { + if (*(uint *)(puVar13 + 4) < uVar36) { + puVar14 = (undefined8 *)puVar13[2]; + puVar13 = puVar17; + } + else { + puVar14 = (undefined8 *)*puVar13; + } + puVar17 = puVar13; + puVar13 = puVar14; + cVar3 = *(char *)((longlong)puVar14 + 0x19); + } + if ((*(char *)((longlong)puVar17 + 0x19) == '\0') && (*(uint *)(puVar17 + 4) <= uVar36)) + { + while (cVar4 == '\0') { + if (*(uint *)(puVar16 + 4) < uVar36) { + puVar17 = (undefined8 *)puVar16[2]; + puVar16 = puVar11; + } + else { + puVar17 = (undefined8 *)*puVar16; + } + puVar11 = puVar16; + puVar16 = puVar17; + cVar4 = *(char *)((longlong)puVar17 + 0x19); + } + if ((*(char *)((longlong)puVar11 + 0x19) != '\0') || (uVar36 < *(uint *)(puVar11 + 4)) + ) { +LAB_14110007a: + /* WARNING: Subroutine does not return */ + FUN_142178508("invalid map key"); + } + lVar12 = puVar11[5]; + lVar34 = lVar12 + (longlong)*(int *)((longlong)puVar11 + 0x34) * 4; + if (lVar12 != lVar34) { + do { + FUN_140d86370(&local_1378); + lVar12 = lVar12 + 4; + } while (lVar12 != lVar34); + goto LAB_1410fe5a7; + } + } + } + goto LAB_1410fe785; + } + } + if (iVar9 == 1) { + lVar34 = FUN_141425a30(); + if (*(longlong *)(lVar34 + 0x578) != 0) { + lVar34 = *(longlong *)(*(longlong *)(lVar34 + 0x578) + 0x1e0); + if (lVar34 != 0) { + uVar18 = *(ulonglong *)(lVar34 + 0x10); + } + local_1448 = local_1448 & 0xffffffff00000000; + lVar34 = FUN_1422fe378(uVar18); + if (lVar34 != 0) { + local_1430 = 0; + local_1438 = 0; + local_1440 = 0; + local_1448 = 0; + FUN_14111a4d0(local_f78); + (**(code **)(*(longlong *)(lVar34 + 0x240) + 0x18))(); + plVar38 = *(longlong **)(lVar34 + 0x2a0); + plVar23 = plVar38 + *(int *)(lVar34 + 0x2ac); + if (plVar38 != plVar23) { + do { + lVar12 = *plVar38; + cVar3 = FUN_1415a9bc0(lVar12); + if (cVar3 != '\0') { + FUN_1415ac4a0(lVar12); + if ((local_1360 != 0) && (*(ulonglong *)(local_1360 + 0x40) == (ulonglong)uVar36)) + { + if (*(longlong *)(lVar34 + 0x2e8) != 0) { + uVar10 = FUN_1415c57e0(*(longlong *)(lVar34 + 0x2e8),local_10c8, + *(undefined4 *)(lVar12 + 0x178)); + local_1118 = *(undefined4 *)(lVar12 + 0x178); + FUN_14111ad30(local_1110,uVar10); + FUN_14111a260(&local_13b8); + FUN_1423d59b0(local_1100); + FUN_1423d59b0(local_1108); + FUN_1423d59b0(local_10b8); + FUN_1423d59b0(local_10c0); + } + FUN_1415a9850(lVar12); + } + FUN_140da1c40(&local_1360); + } + plVar38 = plVar38 + 1; + } while (plVar38 != plVar23); + local_1420 = (longlong *)CONCAT44(local_1420._4_4_,local_13c8._4_4_); + local_1410 = local_13d0; + local_1400 = (undefined ***)CONCAT44(local_1400._4_4_,local_1428); + } + FUN_141069d50(local_f78); + } + } + } + goto LAB_1410fe77e; + } + goto LAB_1410fe785; + } + goto LAB_1410fe293; +joined_r0x0001410feaea: + if (piVar41 == piVar28) goto LAB_1410feafd; + if (local_1368[0] == *piVar41) goto LAB_1410feb4d; + piVar41 = piVar41 + 1; + goto joined_r0x0001410feaea; +LAB_1410feafd: + FUN_140c832b0(local_13e8,local_1368); + puVar39 = local_13f8; +LAB_1410feb4d: + uVar6 = (int)ppuVar40 + 1; + ppuVar40 = (undefined **)(ulonglong)uVar6; + pppuVar22 = pppuVar22 + 1; + bVar45 = uVar6 < (uint)local_1420; + if ((int)(uint)local_1420 <= (int)uVar6) goto code_r0x0001410feb63; + goto LAB_1410fea91; +code_r0x0001410feb63: + puVar42 = (ulonglong *)(local_13f0 & 0xffffffff); + goto LAB_1410feb6d; +joined_r0x0001410fea21: + if (piVar41 == piVar28) goto LAB_1410fea30; + if (iVar9 == *piVar41) goto LAB_1410fe9f3; + piVar41 = piVar41 + 1; + goto joined_r0x0001410fea21; +LAB_1410fea30: + iVar27 = iVar8 + 1; + if ((int)local_13e8[1] < iVar27) { + if (iVar27 < 0) { + iVar27 = iVar8 + 2; + } + FUN_140c8ae10(local_13e8,iVar8 + 9 + (iVar27 >> 1) & 0xfffffff8); + puVar39 = local_13f8; + } + iVar8 = *(int *)((longlong)local_13e8 + 0xc); + *(int *)((longlong)local_13e8 + 0xc) = iVar8 + 1; + *(int *)(*local_13e8 + (longlong)iVar8 * 4) = iVar9; +LAB_1410fe9f3: + pppuVar25 = pppuVar25 + 1; + if (pppuVar25 == pppuVar22) goto LAB_1410feb6d; + goto LAB_1410fe8c2; + while( true ) { + iVar9 = iVar9 + 1; + puVar21 = puVar21 + 1; + if (iVar30 <= iVar9) break; +LAB_1410ff7a0: + if (ppuVar24 == (undefined **)*puVar21) { + FUN_1422fd540(puVar39 + iVar9,puVar39 + iVar9 + 1,(longlong)((iVar30 - iVar9) + -1) << 3); + uVar36 = iVar30 - 1; + puVar44 = (ulonglong *)(ulonglong)uVar36; + local_13f0 = CONCAT44(uVar36,(undefined4)local_13f0); + iVar9 = 0; + if (0 < (int)(uVar36 * 2)) { + iVar9 = uVar36 * 2; + } + if (iVar9 < (int)puVar42) { + if ((int)uVar36 < 8) { + uVar36 = 8; + } + if ((int)uVar36 < (int)puVar42) { + FUN_140c708a0(&local_13f8); + puVar44 = (ulonglong *)(local_13f0 >> 0x20); + puVar42 = (ulonglong *)(local_13f0 & 0xffffffff); + puVar39 = local_13f8; + } + } + uVar36 = (uint)local_1420; + break; + } + } +LAB_1410ff826: + iVar9 = *(int *)(*local_1410 + 1); + piVar41 = (int *)*local_13e8; + iVar30 = *(int *)((longlong)local_13e8 + 0xc); + piVar28 = piVar41 + iVar30; + for (; piVar41 != piVar28; piVar41 = piVar41 + 1) { + if (iVar9 == *piVar41) goto LAB_1410ff899; + } + iVar8 = iVar30 + 1; + if ((int)local_13e8[1] < iVar8) { + if (iVar8 < 0) { + iVar8 = iVar30 + 2; + } + FUN_140c8ae10(local_13e8,iVar30 + 9 + (iVar8 >> 1) & 0xfffffff8); + } + iVar30 = *(int *)((longlong)local_13e8 + 0xc); + *(int *)((longlong)local_13e8 + 0xc) = iVar30 + 1; + *(int *)(*local_13e8 + (longlong)iVar30 * 4) = iVar9; + uVar36 = (uint)local_1420; +LAB_1410ff899: + iVar9 = (int)puVar44; + uVar6 = uVar6 + 1; + local_1410 = local_1410 + 1; + bVar45 = uVar6 < uVar36; + if ((int)uVar36 <= (int)uVar6) goto LAB_1410ff8ad; + goto LAB_1410ff73a; +} + + + +// STRING @142f57b70 : djmdContent +// xref in FUN_140b3fca0 @140b3fca0 +// xref in FUN_140a39ed0 @140a39ed0 +// xref in FUN_1409368b0 @1409368b0 +// xref in FUN_140a36010 @140a36010 +// xref in FUN_1401eabf0 @1401eabf0 + +// STRING @142f57b80 : djmdContents +// xref in FUN_140b3fca0 @140b3fca0 +// xref in FUN_140a39ed0 @140a39ed0 +// xref in FUN_1409368b0 @1409368b0 +// xref in FUN_140a36010 @140a36010 +// xref in FUN_1401eabf0 @1401eabf0 + +// STRING @14325e0d0 : MultipurposeString::formatForSearch +// xref in FUN_141a1afc0 @141a1afc0 + +// STRING @1432634f8 : ContentID +// xref in FUN_141a66c60 @141a66c60 + +// STRING @143263528 : PlaylistID = %lld and ContentID = %lld +// xref in FUN_141a66e00 @141a66e00 + +// STRING @143263560 : PlaylistID = %lld and ContentID = %lld and TrackNo = %lld +// xref in FUN_141a66f50 @141a66f50 + +// STRING @1432635b0 : where PlaylistID = %lld and ContentID = %lld and TrackNo = %lld +// xref in FUN_141a67030 @141a67030 + +// STRING @1432636a8 : select ContentID from SongPlaylist where PlaylistID = %lld +// xref in FUN_141a62470 @141a62470 + +// STRING @1432636e8 : ContentID +// xref in FUN_141a62470 @141a62470 + +// STRING @1432637e0 : select ContentID from SongPlaylist where PlaylistID = %lu +// xref in FUN_141a62e10 @141a62e10 + +// STRING @143263820 : ContentID +// xref in FUN_141a62e10 @141a62e10 + +// STRING @143263830 : select count(ContentID) as trackNum from SongPlaylist where PlaylistID = %lld +// xref in FUN_141a62f80 @141a62f80 + +// STRING @143263f10 : ContentID +// xref in 14518c670 + +// STRING @143263fc0 : FOREIGN KEY(`ContentID`) REFERENCES `Content`(`ID`) ON DELETE CASCADE +// xref in FUN_141a647e0 @141a647e0 + +// STRING @143271a40 : djmdContent +// xref in FUN_141ae4860 @141ae4860 + +// STRING @143271af0 : djmdContent +// xref in FUN_141ae4860 @141ae4860 + +// STRING @143271b10 : ContentID +// xref in FUN_141ae4860 @141ae4860 + +// STRING @143271b48 : djmdContent +// xref in FUN_141ae4860 @141ae4860 + +// STRING @143271ba0 : ContentID +// xref in FUN_141ae4860 @141ae4860 + +// STRING @143271d78 : ContentID +// xref in FUN_141ae4860 @141ae4860 + +// STRING @14327b130 : select ID, MasterSongID from djmdContent where rb_local_deleted = 0 +// xref in FUN_141b2b4c0 @141b2b4c0 + +// STRING @143293ff8 : MasterContentID +// xref in FUN_141c04be0 @141c04be0 + +// STRING @143294008 : AnalysisDataPath +// xref in FUN_141c04be0 @141c04be0 + +// STRING @143294048 : SearchStr +// xref in FUN_141c04be0 @141c04be0 + +// STRING @143294480 : SearchStr +// xref in FUN_141c07230 @141c07230 + +// STRING @143294590 : SearchStr +// xref in FUN_141c076d0 @141c076d0 + +// STRING @143294b50 : db::extAddTracksRelation +// xref in FUN_141bf5450 @141bf5450 + +// STRING @143294bb0 : db::extAddTracksRelation +// xref in FUN_141bf5450 @141bf5450 + +// STRING @143294bf0 : db::extAddTracksRelation +// xref in FUN_141bf5450 @141bf5450 + +// STRING @143294c38 : db::extAddTracksRelation +// xref in FUN_141bf5450 @141bf5450 diff --git a/maple-py/re/scripts/CallTree.java b/maple-py/re/scripts/CallTree.java new file mode 100644 index 0000000..66a7030 --- /dev/null +++ b/maple-py/re/scripts/CallTree.java @@ -0,0 +1,85 @@ +// Walk the call tree down from the export orchestrator and surface the page +// serializer: flag functions that call file-I/O APIs or use the 4096 page size, +// then decompile those candidates. Output -> ~/ghidra_proj/calltree.txt +import java.io.PrintWriter; +import java.util.*; +import ghidra.app.script.GhidraScript; +import ghidra.app.decompiler.*; +import ghidra.program.model.listing.*; +import ghidra.program.model.scalar.Scalar; + +public class CallTree extends GhidraScript { + static final String ROOT = "0x14119d2d0"; + static final int MAX_DEPTH = 4; + + boolean hasPageConst(Function f) { + InstructionIterator it = currentProgram.getListing().getInstructions(f.getBody(), true); + while (it.hasNext()) { + Instruction insn = it.next(); + for (int op = 0; op < insn.getNumOperands(); op++) + for (Object o : insn.getOpObjects(op)) + if (o instanceof Scalar) { + long v = ((Scalar) o).getUnsignedValue(); + if (v == 0x1000L || v == 4096L) return true; + } + } + return false; + } + + String ioCalls(Function f) { + StringBuilder sb = new StringBuilder(); + for (Function c : f.getCalledFunctions(monitor)) { + String n = c.getName().toLowerCase(); + if (n.contains("write") || n.contains("createfile") || n.contains("fopen") + || n.contains("fwrite") || n.contains("mapviewof") || n.contains("setfilepointer") + || n.contains("flushview") || n.contains("fclose")) + sb.append(c.getName()).append(" "); + } + return sb.toString(); + } + + @Override + public void run() throws Exception { + PrintWriter out = new PrintWriter("/home/ntr/ghidra_proj/calltree.txt"); + FunctionManager fm = currentProgram.getFunctionManager(); + Function root = fm.getFunctionContaining(currentProgram.getAddressFactory().getAddress(ROOT)); + + Map depth = new LinkedHashMap<>(); + Deque q = new ArrayDeque<>(); + depth.put(root, 0); q.add(root); + while (!q.isEmpty() && !monitor.isCancelled()) { + Function f = q.poll(); + int d = depth.get(f); + if (d >= MAX_DEPTH) continue; + for (Function c : f.getCalledFunctions(monitor)) + if (!depth.containsKey(c)) { depth.put(c, d + 1); q.add(c); } + } + out.println("call tree from " + root.getName() + " depth<=" + MAX_DEPTH + ": " + depth.size() + " funcs\n"); + + List candidates = new ArrayList<>(); + for (Map.Entry e : depth.entrySet()) { + Function f = e.getKey(); + boolean page = hasPageConst(f); + String io = ioCalls(f); + String flags = (page ? "[4096]" : "") + (io.isEmpty() ? "" : "[io:" + io.trim() + "]"); + out.println(String.format("d%d %-12s size=%-6d %s %s", + e.getValue(), f.getEntryPoint(), f.getBody().getNumAddresses(), f.getName(), flags)); + if (page || !io.isEmpty()) candidates.add(f); + } + + DecompInterface di = new DecompInterface(); + di.openProgram(currentProgram); + out.println("\n===== CANDIDATE DECOMPILES (" + candidates.size() + ") ====="); + for (Function f : candidates) { + if (monitor.isCancelled()) break; + out.println("\n//===== " + f.getName() + " @ " + f.getEntryPoint() + " ====="); + DecompileResults r = di.decompileFunction(f, 60, monitor); + if (r != null && r.decompileCompleted()) + out.println(r.getDecompiledFunction().getC()); + else + out.println("// decompile failed"); + } + out.flush(); out.close(); + println("wrote calltree.txt: " + depth.size() + " funcs, " + candidates.size() + " candidates"); + } +} diff --git a/maple-py/re/scripts/DecPdb.java b/maple-py/re/scripts/DecPdb.java new file mode 100644 index 0000000..acff3c8 --- /dev/null +++ b/maple-py/re/scripts/DecPdb.java @@ -0,0 +1,44 @@ +// Decompile the pdb export functions found via string xrefs. +import java.io.PrintWriter; +import ghidra.app.script.GhidraScript; +import ghidra.app.decompiler.*; +import ghidra.program.model.address.Address; +import ghidra.program.model.listing.Function; + +public class DecPdb extends GhidraScript { + // export.pdb serializer call stack from a live Frida WriteFile backtrace. + // module+offset -> Ghidra static = 0x140000000 + offset (base confirmed). + static final String[] ADDRS = { + "0x1420e883e", // calls WriteFile + "0x1420d73a6", + "0x1420d6e92", + "0x1420d6368", + "0x1420eae07", + "0x1420e0852", + "0x1420de1c4", + "0x141d75d21", // export.pdb-specific frame + "0x141cad188", + "0x141cac585", + "0x141b8ba75", + "0x141acaf8c", + "0x1423c9b3b", + }; + @Override public void run() throws Exception { + PrintWriter out = new PrintWriter("/home/ntr/ghidra_proj/decpdb.txt"); + DecompInterface di = new DecompInterface(); + di.openProgram(currentProgram); + for (String a : ADDRS) { + Address addr = currentProgram.getAddressFactory().getAddress(a); + Function f = currentProgram.getFunctionManager().getFunctionContaining(addr); + if (f == null) { out.println("// no function at " + a); continue; } + out.println("\n//================ " + f.getName() + " @ " + f.getEntryPoint() + " ================"); + DecompileResults r = di.decompileFunction(f, 90, monitor); + if (r != null && r.decompileCompleted()) + out.println(r.getDecompiledFunction().getC()); + else + out.println("// decompile failed: " + (r != null ? r.getErrorMessage() : "null")); + } + out.flush(); out.close(); + println("wrote decpdb.txt"); + } +} diff --git a/maple-py/re/scripts/FindHash.java b/maple-py/re/scripts/FindHash.java new file mode 100644 index 0000000..6e2b46f --- /dev/null +++ b/maple-py/re/scripts/FindHash.java @@ -0,0 +1,78 @@ +// Hunt for the track-row builder / the per-track 8-byte hash (row offsets +// 0x14 u4, 0x18 u2, 0x1a u2) and index_shift (0x02). Decompiles the string-hash +// function formatForSearch + its callers, and dumps xrefs of track/content/ +// search-related strings. Output -> ~/ghidra_proj/hash.txt +import java.io.PrintWriter; +import java.util.*; +import ghidra.app.script.GhidraScript; +import ghidra.app.decompiler.*; +import ghidra.program.model.listing.*; +import ghidra.program.model.symbol.*; + +public class FindHash extends GhidraScript { + PrintWriter out; + DecompInterface di; + Set done = new HashSet<>(); + FunctionManager fm; + ReferenceManager rm; + + void dec(Function f, String why) { + if (f == null) return; + if (!done.add(f.getEntryPoint().toString())) return; + out.println("\n//===== " + f.getName() + " @ " + f.getEntryPoint() + " [" + why + "] ====="); + DecompileResults r = di.decompileFunction(f, 60, monitor); + out.println(r != null && r.decompileCompleted() ? r.getDecompiledFunction().getC() : "// decompile failed"); + } + + Function fn(String a) { + return fm.getFunctionContaining(currentProgram.getAddressFactory().getAddress(a)); + } + + @Override + public void run() throws Exception { + out = new PrintWriter("/home/ntr/ghidra_proj/hash.txt"); + di = new DecompInterface(); di.openProgram(currentProgram); + fm = currentProgram.getFunctionManager(); + rm = currentProgram.getReferenceManager(); + + // 1. formatForSearch (string hash) + its callers + Function fmt = fn("0x141a1afc0"); + dec(fmt, "formatForSearch"); + if (fmt != null) { + int n = 0; + for (Reference ref : rm.getReferencesTo(fmt.getEntryPoint())) { + if (n++ >= 10) break; + dec(fm.getFunctionContaining(ref.getFromAddress()), "caller of formatForSearch"); + } + } + + // 2. strings that hint at the track/content row builder -> xref functions + String[] kw = {"djmdContent", "SearchStr", "formatForSearch", "AnalysisDataPath", + "ContentID", "rb_data_status", "rb_local", "dsqlInsert", "AddTrack"}; + DataIterator dit = currentProgram.getListing().getDefinedData(true); + int shown = 0; + while (dit.hasNext() && !monitor.isCancelled()) { + Data d = dit.next(); + if (d == null || !d.hasStringValue()) continue; + Object v = d.getValue(); + if (!(v instanceof String)) continue; + String s = (String) v; + for (String k : kw) { + if (s.contains(k)) { + out.println("\n// STRING @" + d.getAddress() + " : " + s); + int n = 0; + for (Reference ref : rm.getReferencesTo(d.getAddress())) { + if (n++ >= 5) break; + Function c = fm.getFunctionContaining(ref.getFromAddress()); + out.println("// xref in " + (c != null ? c.getName() + " @" + c.getEntryPoint() : ref.getFromAddress())); + } + shown++; + break; + } + } + if (shown >= 30) break; + } + out.flush(); out.close(); + println("wrote hash.txt"); + } +} diff --git a/maple-py/re/scripts/FindPdb.java b/maple-py/re/scripts/FindPdb.java new file mode 100644 index 0000000..d46a6c8 --- /dev/null +++ b/maple-py/re/scripts/FindPdb.java @@ -0,0 +1,96 @@ +// Locate the rekordbox .pdb serializer via known strings + magic-number constants. +// Run headless: analyzeHeadless rbx -process rekordbox.exe -noanalysis \ +// -scriptPath ~/ghidra_scripts -postScript FindPdb.java +// Output goes to ~/ghidra_proj/findpdb.txt (and the log). +import java.io.PrintWriter; +import java.util.*; +import ghidra.app.script.GhidraScript; +import ghidra.program.model.address.Address; +import ghidra.program.model.listing.*; +import ghidra.program.model.scalar.Scalar; +import ghidra.program.model.symbol.*; + +public class FindPdb extends GhidraScript { + + // Strings that mark the export code paths. + static final String[] KEYWORDS = { + "export.pdb", "exportExt.pdb", "USBANLZ", "PIONEER", + "ANLZ", "HOT CUE BANK", "ORIGINAL ARTIST", "rekordbox/export" + }; + + // Magic numbers maple currently guesses (various widths/combinations). + static final long[] MAGICS = { + 42343L, 54995L, // 0xA567 / 0xD6D3 per-track markers + 0xD6D3A567L, 0xA567D6D3L, // combined 32-bit forms + 788224L, // 0x000C0700 track bitmask + 1004L, // 0x03EC "strange page" marker + 0x64L, 0x44L, 0x24L, // page-flag bytes + 19048L, 30967L // the schema author's original guesses + }; + + PrintWriter out; + + void emit(String s) { println(s); if (out != null) out.println(s); } + + @Override + public void run() throws Exception { + out = new PrintWriter("/home/ntr/ghidra_proj/findpdb.txt"); + Listing listing = currentProgram.getListing(); + ReferenceManager rm = currentProgram.getReferenceManager(); + FunctionManager fm = currentProgram.getFunctionManager(); + + emit("===== STRING XREFS ====="); + DataIterator di = listing.getDefinedData(true); + while (di.hasNext() && !monitor.isCancelled()) { + Data d = di.next(); + if (d == null || !d.hasStringValue()) continue; + Object val = d.getValue(); + if (!(val instanceof String)) continue; + String s = (String) val; + for (String kw : KEYWORDS) { + if (s.contains(kw)) { + emit("\nSTRING @ " + d.getAddress() + " : " + s.replace("\n", "\\n")); + ReferenceIterator ri = rm.getReferencesTo(d.getAddress()); + int n = 0; + while (ri.hasNext() && n++ < 25) { + Reference r = ri.next(); + Function f = fm.getFunctionContaining(r.getFromAddress()); + emit(" xref from " + r.getFromAddress() + + (f != null ? " in " + f.getName() + " @ " + f.getEntryPoint() : " (no func)")); + } + break; + } + } + } + + emit("\n===== CONSTANT XREFS ====="); + Set targets = new HashSet<>(); + for (long m : MAGICS) targets.add(m); + Map counts = new TreeMap<>(); + InstructionIterator ii = listing.getInstructions(true); + while (ii.hasNext() && !monitor.isCancelled()) { + Instruction insn = ii.next(); + for (int op = 0; op < insn.getNumOperands(); op++) { + for (Object o : insn.getOpObjects(op)) { + if (o instanceof Scalar) { + long v = ((Scalar) o).getUnsignedValue(); + if (targets.contains(v)) { + Function f = fm.getFunctionContaining(insn.getAddress()); + emit(String.format("CONST 0x%X (%d) @ %s %s in %s", v, v, + insn.getAddress(), insn.toString(), + f != null ? f.getName() + " @ " + f.getEntryPoint() : "(no func)")); + counts.merge(v, 1, Integer::sum); + } + } + } + } + } + emit("\n===== CONSTANT HIT COUNTS ====="); + for (Map.Entry e : counts.entrySet()) + emit(String.format("0x%X (%d): %d hits", e.getKey(), e.getKey(), e.getValue())); + + out.flush(); + out.close(); + emit("\nwrote /home/ntr/ghidra_proj/findpdb.txt"); + } +} diff --git a/maple-py/src/maple/model.py b/maple-py/src/maple/model.py index 5b81289..32cbaf7 100644 --- a/maple-py/src/maple/model.py +++ b/maple-py/src/maple/model.py @@ -28,6 +28,13 @@ class Color: name: str +@dataclass +class Key: + id: int + name: str + id2: int | None = None # mirrors id in real exports + + @dataclass class Track: id: int @@ -164,3 +171,4 @@ class Database: artwork: list[Artwork] = field(default_factory=list) genres: list[Genre] = field(default_factory=list) colors: list[Color] = field(default_factory=list) + keys: list[Key] = field(default_factory=list) diff --git a/maple-py/src/maple/pdb/pager.py b/maple-py/src/maple/pdb/pager.py index 2fa5dec..dfb0b1d 100644 --- a/maple-py/src/maple/pdb/pager.py +++ b/maple-py/src/maple/pdb/pager.py @@ -41,11 +41,12 @@ def build_strange_page(page_index: int, page_type: int, next_page: int) -> bytes class PageBuilder: - def __init__(self, page_index: int, page_type: int, max_rows: int = 0): + def __init__(self, page_index: int, page_type: int, max_rows: int = 0, data_flag: int = 0x24): self.page_index = page_index self.page_type = page_type self.next_page = page_index # caller patches before finalize self.max_rows = max_rows + self.data_flag = data_flag # page_flags for a populated data page self.row_bytes: list[bytes] = [] self.row_offsets: list[int] = [] # relative to heap_pos self.heap_cursor = 0 # position relative to heap_pos @@ -76,11 +77,11 @@ class PageBuilder: if free_size < 0: raise ValueError("page overflow") - # 0x00 for data pages with rows, 0x44 for empty ones. The maple-rs - # writer uses this pair and produces pdbs that load on the player; - # rekordbox-exported references use 0x24 which also works, so both - # are valid -- pick the simpler form. - page_flags = 0x00 if n > 0 else 0x44 + # Data pages with rows: rekordbox uses 0x24 (and 0x34 for some tables -- + # see writer's PAGE_FLAG_34). maple previously wrote 0x00, which is + # missing the 0x20|0x04 bits every real rekordbox data page sets, and + # the players reject it. Empty data pages stay 0x44. + page_flags = self.data_flag if n > 0 else 0x44 header = b"" header += pack(" bytes: return _pad2(row) +def serialize_key(key_id: int, name: str, id2: int | None = None) -> bytes: + """key_row: u4 id, u4 id2 (mirrors id in the reference), devicesql name.""" + if id2 is None: + id2 = key_id + return _pad2(pack(" bytes: """history_playlist_row: u4 id, devicesql name.""" return _pad2(pack(" tuple[list[bytes], int, int]: - """Return (page_bytes_list, first_page, last_page). +# Page types whose populated data pages rekordbox tags 0x34 (vs the 0x24 the +# rest get). Matched byte-for-byte against a real rekordbox export. +PAGE_FLAG_34 = frozenset({0, 2, 3, 13, 17, 19}) # tracks, artists, albums, artwork, browse_filter_index, history - Every chain begins with a "strange" placeholder page (flags=0x64) - mirroring the reference; data pages with rows follow. Tables with no - rows emit only the strange page. - """ - rows = list(row_iter) - out: list[bytes] = [] - - if not rows: - out.append(build_strange_page(start_index, page_type, next_page=start_index)) - return out, start_index, start_index - - data_pages: list[PageBuilder] = [] - page_idx = start_index + 1 - current = PageBuilder(page_idx, page_type) - for row in rows: - if not current.try_add(row): - data_pages.append(current) - page_idx += 1 - current = PageBuilder(page_idx, page_type) - if not current.try_add(row): - raise ValueError(f"row of size {len(row)} too large for an empty page") - data_pages.append(current) - - out.append(build_strange_page(start_index, page_type, next_page=start_index + 1)) - for i, p in enumerate(data_pages): - if i == len(data_pages) - 1: - p.next_page = p.page_index - else: - p.next_page = p.page_index + 1 - out.append(p.finalize()) - - return out, start_index, page_idx +# "Core" tables always get a real data page (even when empty). The rest stay +# strange-only when empty. Matched against a real rekordbox export. +CORE_TABLES = frozenset({0, 1, 2, 3, 5, 6, 13, 16, 17, 18, 19}) def write_pdb(db: Database, path: str | Path) -> None: - # Layout: page 0 is the file header page. Data pages begin at page_index 1. - chains: list[tuple[int, list[bytes], int, int]] = [] # (page_type, pages, first, last) - next_page_idx = 1 - + # Layout (matching rekordbox): page 0 is the file header. Pages 1..2*N are + # reserved 2-per-table -- strange page at the odd index 1+2k, first data page + # at the even index 2+2k. Overflow data pages come from the pool at 2*N+1. serialized_tracks = [serialize_track(t) for t in db.tracks] serialized_artists = [serialize_artist(a) for a in db.artists] serialized_albums = [serialize_album(a) for a in db.albums] @@ -106,18 +76,19 @@ def write_pdb(db: Database, path: str | Path) -> None: # so the player's Color filter has a non-empty value set. colors = db.colors if db.colors else STANDARD_COLORS serialized_colors = [serialize_color(c) for c in colors] + serialized_keys = [serialize_key(k.id, k.name, k.id2) for k in db.keys] # unknown_17/unknown_18 row format isn't decoded by the kaitai schema; # we emit the reference's byte-for-byte rows (four little-endian u2s). serialized_unknown_17 = [pack(" None: PAGE_TYPE_GENRES: serialized_genres, PAGE_TYPE_ARTISTS: serialized_artists, PAGE_TYPE_ALBUMS: serialized_albums, + PAGE_TYPE_KEYS: serialized_keys, PAGE_TYPE_COLORS: serialized_colors, PAGE_TYPE_PLAYLIST_TREE: serialized_pl_tree, PAGE_TYPE_PLAYLIST_ENTRIES: serialized_pl_entries, @@ -136,15 +108,40 @@ def write_pdb(db: Database, path: str | Path) -> None: PAGE_TYPE_HISTORY_ENTRIES: serialized_history_entries, PAGE_TYPE_HISTORY: serialized_history, } - # Emit all 20 page-type chains; tables we don't populate get a single empty page. - for ptype in ALL_PAGE_TYPES: - rows = rows_by_type.get(ptype, []) - pages, first, last = _build_chain(ptype, rows, next_page_idx) - chains.append((ptype, pages, first, last)) - next_page_idx = last + 1 + num_tables = len(ALL_PAGE_TYPES) # 20 + overflow_next = 1 + 2 * num_tables # first overflow page (41) + pages_by_index: dict[int, bytes] = {} # page_index -> 4096-byte page + table_dir: list[tuple[int, int, int]] = [] # (page_type, first_page, last_page) - num_tables = len(chains) - next_unused_page = next_page_idx + for k, ptype in enumerate(ALL_PAGE_TYPES): + strange_idx = 1 + 2 * k + data_idx = 2 + 2 * k + rows = rows_by_type.get(ptype, []) + data_flag = 0x34 if ptype in PAGE_FLAG_34 else 0x24 + + # Optional table with no rows: strange page only (its even page stays blank). + if not rows and ptype not in CORE_TABLES: + pages_by_index[strange_idx] = build_strange_page(strange_idx, ptype, next_page=strange_idx) + table_dir.append((ptype, strange_idx, strange_idx)) + continue + + # First data page at the reserved even index; overflow pages from the pool. + builders: list[PageBuilder] = [PageBuilder(data_idx, ptype, data_flag=data_flag)] + for row in rows: + if not builders[-1].try_add(row): + nb = PageBuilder(overflow_next, ptype, data_flag=data_flag) + overflow_next += 1 + if not nb.try_add(row): + raise ValueError(f"row of size {len(row)} too large for an empty page") + builders.append(nb) + + pages_by_index[strange_idx] = build_strange_page(strange_idx, ptype, next_page=data_idx) + for i, b in enumerate(builders): + b.next_page = b.page_index if i == len(builders) - 1 else builders[i + 1].page_index + pages_by_index[b.page_index] = b.finalize() + table_dir.append((ptype, strange_idx, builders[-1].page_index)) + + next_unused_page = max(overflow_next, 1 + 2 * num_tables) file_header = b"" file_header += pack(" None: assert len(file_header) == FILE_HEADER_SIZE tables_block = b"" - for ptype, _pages, first, last in chains: + for ptype, first, last in table_dir: tables_block += pack(" None: raise ValueError("too many tables for one page") page0 = header_full + b"\x00" * pad_to_page + blank = b"\x00" * PAGE_SIZE out_path = Path(path) out_path.parent.mkdir(parents=True, exist_ok=True) with out_path.open("wb") as f: f.write(page0) - for _ptype, pages, _first, _last in chains: - for p in pages: - assert len(p) == PAGE_SIZE - f.write(p) + for idx in range(1, next_unused_page): # reserved-but-unused pages written blank + page = pages_by_index.get(idx, blank) + assert len(page) == PAGE_SIZE + f.write(page) diff --git a/maple-py/tests/test_writer_smoke.py b/maple-py/tests/test_writer_smoke.py index d3deac9..f9f8df7 100644 --- a/maple-py/tests/test_writer_smoke.py +++ b/maple-py/tests/test_writer_smoke.py @@ -25,5 +25,5 @@ def test_smoke(tmp_path: Path): assert data[:4] == b"\x00\x00\x00\x00" # page_size at offset 4 assert int.from_bytes(data[4:8], "little") == 4096 - # num_tables at offset 8 - assert int.from_bytes(data[8:12], "little") == 5 + # num_tables at offset 8 -- rekordbox always emits all 20 page-type tables + assert int.from_bytes(data[8:12], "little") == 20 diff --git a/maple-py/tools/build_acemo.py b/maple-py/tools/build_acemo.py new file mode 100644 index 0000000..73f149d --- /dev/null +++ b/maple-py/tools/build_acemo.py @@ -0,0 +1,80 @@ +"""Build a maple export.pdb from the SAME tracks as the real rekordbox AceMo +export, so the two can be diffed and the maple pdb tested on a player against +the audio/USBANLZ already on the USB. + +Reads metadata out of data/acemo/PIONEER/rekordbox/export.pdb (the real export) +and reconstructs an identical-content maple Database, then writes +captures/maple_acemo.pdb. +""" +import sys +from io import BytesIO +from pathlib import Path + +ROOT = Path(__file__).resolve().parents[1] +sys.path.insert(0, str(ROOT / "src")) + +from kaitaistruct import KaitaiStream +from kaitai.rekordbox_pdb import RekordboxPdb +from maple.model import Album, Artist, Artwork, Database, Key, Track +from maple.pdb.writer import write_pdb + +REAL = ROOT / "data/acemo/PIONEER/rekordbox/export.pdb" +OUT = ROOT / "captures/maple_acemo.pdb" +PT = {t.value: t.name for t in RekordboxPdb.PageType} + + +def _rows(tbl): + out, ref = [], tbl.first_page + while True: + pg = ref.body + if pg.is_data_page: + for rg in pg.row_groups: + for r in rg.rows: + if r.present: + out.append(r.body) + if ref.index == tbl.last_page.index: + break + ref = pg.next_page + return out + + +def _txt(v): + try: + return v.body.text + except Exception: + return "" + + +def main(): + pdb = RekordboxPdb(is_ext=False, _io=KaitaiStream(BytesIO(REAL.read_bytes()))) + by = {PT.get(t.type.value): _rows(t) for t in pdb.tables} + + db = Database() + for a in by.get("artists", []): + db.artists.append(Artist(id=a.id, name=_txt(a.name))) + for a in by.get("albums", []): + db.albums.append(Album(id=a.id, name=_txt(a.name), artist_id=a.artist_id)) + for k in by.get("keys", []): + db.keys.append(Key(id=k.id, name=_txt(k.name), id2=k.id2)) + for a in by.get("artwork", []): + db.artwork.append(Artwork(id=a.id, path=_txt(a.path))) + for t in by.get("tracks", []): + db.tracks.append(Track( + id=t.id, title=_txt(t.title), artist_id=t.artist_id, album_id=t.album_id, + filename=_txt(t.filename), file_path=_txt(t.file_path), file_size=t.file_size, + sample_rate=t.sample_rate, sample_depth=t.sample_depth, bitrate=t.bitrate, + duration=t.duration, track_number=t.track_number, year=t.year, + disc_number=t.disc_number, tempo=t.tempo, comment=_txt(t.comment), + date_added=_txt(t.date_added), release_date=_txt(t.release_date), + mix_name=_txt(t.mix_name), analyze_path=_txt(t.analyze_path), + analyze_date=_txt(t.analyze_date), artwork_id=t.artwork_id, genre_id=t.genre_id)) + + write_pdb(db, OUT) + sz = OUT.stat().st_size + print(f"wrote {OUT} ({sz} bytes, page-mult={sz % 4096 == 0}) " + f"tracks={len(db.tracks)} artists={len(db.artists)} albums={len(db.albums)} " + f"keys={len(db.keys)} artwork={len(db.artwork)}") + + +if __name__ == "__main__": + main() diff --git a/maple-py/tools/capture.mjs b/maple-py/tools/capture.mjs new file mode 100644 index 0000000..cada4dc --- /dev/null +++ b/maple-py/tools/capture.mjs @@ -0,0 +1,104 @@ +// Frida host (Node ESM) for the pdb-capture agent. +// - Attaches the agent (rbx_pdb_capture.js) to rekordbox processes. +// - Streams ALL their output to THIS console (agent lines are [pid]-tagged). +// - STAYS ALIVE via the Node event loop -- no frida-CLI REPL/EOF problem. +// - Uses CHILD-GATING (Windows-supported; spawn-gating is not) so children of a +// gated process are instrumented AT BIRTH. This is how we reach the +// rekordboxAgent that writes export.pdb: it's CIG-protected and refuses +// post-hoc injection, but as a freshly-spawned child it can be hooked. +// - Clears the captures/ folder on start. +// +// Setup (Windows, repo root, once): npm i frida +// Run: +// node tools\capture.mjs --spawn (RECOMMENDED: launch rekordbox under the +// gate so every child incl. the DB agent is +// hooked at birth. Close rekordbox first.) +// node tools\capture.mjs (attach to running procs + gate their +// future children; restart rekordbox to +// respawn the agent as a gated child.) + +import * as fridaNs from "frida"; +import fs from "node:fs"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; + +const frida = fridaNs.default ?? fridaNs; +const __dirname = path.dirname(fileURLToPath(import.meta.url)); + +const REKORDBOX = "C:\\Program Files\\rekordbox\\rekordbox 7.0.5\\rekordbox.exe"; +const AGENT = fs.readFileSync(path.join(__dirname, "rbx_pdb_capture.js"), "utf8"); +const CAP = path.join(__dirname, "..", "captures"); +const SPAWN = process.argv.includes("--spawn"); + +function clearCaptures() { + fs.mkdirSync(CAP, { recursive: true }); + let n = 0; + for (const f of fs.readdirSync(CAP)) { + try { fs.rmSync(path.join(CAP, f), { force: true, recursive: true }); n++; } catch (e) {} + } + console.log(`[host] cleared ${n} file(s) from ${CAP}`); +} + +function isRbx(name) { return /rekordbox/i.test(name || ""); } + +// Attach, load the agent, and gate this process's future children too. +async function instrument(device, pid, label) { + try { + const session = await device.attach(pid); + session.detached.connect(reason => console.log(`[host] detached ${label} (${pid}): ${reason}`)); + const script = await session.createScript(AGENT); + script.logHandler = (level, text) => console.log(text); + script.message.connect(msg => { + if (msg.type === "error") + console.error(`[host] ${label} (${pid}) script error:`, msg.stack || msg.description || msg); + }); + await script.load(); + try { await session.enableChildGating(); } catch (e) { /* not always available */ } + console.log(`[host] instrumented ${label} (${pid})`); + return session; + } catch (e) { + console.error(`[host] FAILED to instrument ${label} (${pid}): ${e.message}`); + return null; + } +} + +async function main() { + clearCaptures(); + const device = await frida.getLocalDevice(); + + // Children of any gated process are suspended at birth -> instrument, resume. + device.childAdded.connect(async child => { + const name = child.identifier || child.path || String(child.pid); + try { + console.log(`[host] child spawned: ${name} (${child.pid})`); + if (isRbx(name)) await instrument(device, child.pid, "child:" + name); + } catch (e) { + console.error(`[host] child handler error (${child.pid}): ${e.message}`); + } finally { + try { await device.resume(child.pid); } catch (_) {} + } + }); + + if (SPAWN) { + console.log(`[host] spawning ${REKORDBOX}`); + const pid = await device.spawn([REKORDBOX]); + await instrument(device, pid, "main"); // enables child gating on main + await device.resume(pid); + console.log(`[host] resumed main rekordbox (${pid}); children caught at birth`); + } else { + for (const p of await device.enumerateProcesses()) { + if (isRbx(p.name)) await instrument(device, p.pid, p.name); + } + console.log("[host] attached to running rekordbox processes (+child gating)."); + console.log("[host] >>> the export.pdb writer (rekordboxAgent) refuses live injection."); + console.log("[host] >>> RESTART rekordbox -- the new agent spawns as a GATED CHILD and"); + console.log("[host] >>> gets hooked at birth. Then Export and watch for [SAVED] ...export.pdb"); + console.log("[host] >>> (or re-run with --spawn to launch rekordbox under the gate.)"); + } + + console.log("[host] ready. Ctrl-C to stop."); + process.stdin.resume(); + process.on("SIGINT", () => { console.log("\n[host] stopping."); process.exit(0); }); +} + +main().catch(e => { console.error("[host] fatal:", e); process.exit(1); }); diff --git a/maple-py/tools/rbx_pdb_capture.js b/maple-py/tools/rbx_pdb_capture.js new file mode 100644 index 0000000..1124bf1 --- /dev/null +++ b/maple-py/tools/rbx_pdb_capture.js @@ -0,0 +1,209 @@ +// Capture rekordbox's .pdb writes with Frida (run on the WINDOWS host). +// +// Hooks at the ntdll layer (NtCreateFile / NtWriteFile / NtClose) so it catches +// file IO no matter whether the app calls kernel32, kernelbase, or the CRT. +// Logs EVERY file opened for writing (so you can see temp names / the real +// filenames even if the .pdb filter is wrong), reconstructs files whose path +// matches SAVE_RE byte-for-byte, and saves them to OUT_DIR via Frida's File API. +// Prints a backtrace the first time each saved file is written -> the +// module+offset of the serializer to open in Ghidra. +// +// Usage (Windows PowerShell, rekordbox running): +// mkdir C:\Users\ntr\code\maple\maple-py\captures # OUT_DIR must exist +// frida-ps | Select-String rekordbox # find all PIDs +// frida -n rekordbox.exe -l tools\rbx_pdb_capture.js # or -p +// then trigger "Export to USB". If you see [w-open] lines but the export file +// isn't among them, widen SAVE_RE. If you see NOTHING, attach to another PID. +// +// Set VERBOSE = true to log every write-open path; false logs only SAVE_RE hits. + +var OUT_DIR = "C:\\Users\\ntr\\code\\maple\\maple-py\\captures\\"; // must exist; Frida won't mkdir +var SAVE_RE = /export.*\.pdb|\.pdb$|PIONEER/i; // which opened files to reconstruct + save +var VERBOSE = true; // log ALL write-opens, not just SAVE_RE + +var PID = Process.id; +var TAG = "[" + PID + "] "; +var DEBUG = true; // log every interesting open + all mapping activity +var DEBUG_RE = /export|\.pdb|PIONEER|rekordbox|Contents|USBANLZ/i; // what DEBUG opens to print +var ntdll = Process.getModuleByName("ntdll.dll"); +function nt(name) { return ntdll.getExportByName(name); } + +// Resolve + confirm a hook target so we can see in the console what attached. +function resolve(name) { + var a = ntdll.findExportByName(name); + console.log(TAG + "hook " + name + (a ? " -> " + a : " MISSING")); + return a; +} + + +// handle (string) -> { path, pos, end, chunks:[{pos,ab}], save, traced } +var files = {}; +var counters = {}; + +function baseName(path) { + var parts = path.replace(/\\/g, "/").replace(/\/+$/, "").split("/"); + return (parts[parts.length - 1] || "capture.bin").replace(/[^A-Za-z0-9._-]/g, ""); +} + +// Read the wide path out of an OBJECT_ATTRIBUTES* (x64 layout). +function readObjName(pObjAttr) { + if (pObjAttr.isNull()) return null; + var pUni = pObjAttr.add(16).readPointer(); // OBJECT_ATTRIBUTES.ObjectName + if (pUni.isNull()) return null; + var len = pUni.readU16(); // UNICODE_STRING.Length (bytes) + if (!len) return null; + var buf = pUni.add(8).readPointer(); // UNICODE_STRING.Buffer + if (buf.isNull()) return null; + return buf.readUtf16String(len / 2); +} + +// NtCreateFile / NtOpenFile: args[0]=PHANDLE out, [1]=ACCESS_MASK, [2]=OBJECT_ATTRIBUTES* +function hookOpen(name) { + var addr = resolve(name); + if (!addr) return; + Interceptor.attach(addr, { + onEnter: function (args) { + this.pHandle = args[0]; + this.access = args[1].toUInt32(); + this.path = readObjName(args[2]); + }, + onLeave: function (retval) { + if (!this.path) return; + var WRITE = 0x40000000 /*GENERIC_WRITE*/ | 0x10000000 /*GENERIC_ALL*/ | + 0x2 /*FILE_WRITE_DATA*/ | 0x4 /*FILE_APPEND_DATA*/; + var isWrite = (this.access & WRITE) !== 0; + var save = SAVE_RE.test(this.path); + // DEBUG: show every interesting open (incl. read-only) + its access mask, + // so we can see if/how export.pdb is opened even when our filters miss it. + if (DEBUG && DEBUG_RE.test(this.path)) + console.log(TAG + "[open] access=0x" + this.access.toString(16) + + (isWrite ? " W" : " r") + (save ? " *SAVE" : "") + " " + this.path); + if (!isWrite && !save) return; + var handleStr = this.pHandle.readPointer().toString(); + files[handleStr] = { path: this.path, pos: 0, end: 0, chunks: [], save: save, traced: false }; + if (!DEBUG && (save || VERBOSE)) console.log(TAG + "[w-open] " + this.path); + }, + }); +} +hookOpen("NtCreateFile"); +hookOpen("NtOpenFile"); + +// NtWriteFile: [0]=handle [5]=buffer [6]=length [7]=PLARGE_INTEGER ByteOffset +Interceptor.attach(resolve("NtWriteFile"), { + onEnter: function (args) { + var f = files[args[0].toString()]; + if (!f) return; + var n = args[6].toUInt32(); + if (n <= 0) return; + + var pos = f.pos; + var pOff = args[7]; + if (!pOff.isNull()) { + var hi = pOff.add(4).readU32(); + if (hi !== 0xffffffff) pos = hi * 0x100000000 + pOff.readU32(); // skip sentinels + } + + if (f.save) { + f.chunks.push({ pos: pos, ab: args[5].readByteArray(n) }); + if (!f.traced) { + f.traced = true; + console.log(TAG + "[trace] writer for " + f.path + ":"); + Thread.backtrace(this.context, Backtracer.ACCURATE) + .slice(0, 14) + .forEach(function (a) { + // module+offset maps straight to Ghidra: static = 0x140000000 + offset + var m = Process.findModuleByAddress(a); + var loc = m ? (m.name + "+0x" + a.sub(m.base).toString(16)) : a.toString(); + console.log(" " + loc + " " + DebugSymbol.fromAddress(a)); + }); + } + } + f.pos = pos + n; + if (f.pos > f.end) f.end = f.pos; + }, +}); + +// Shared: write a captured buffer to OUT_DIR with a PID-tagged, de-duped name. +function saveBuffer(path, arrayBuffer, size) { + var name = baseName(path); + var c = counters[name] || 0; + counters[name] = c + 1; + var dest = OUT_DIR + "p" + PID + "_" + name + (c === 0 ? "" : "." + c); + var fh = new File(dest, "wb"); + fh.write(arrayBuffer); + fh.close(); + console.log(TAG + "[SAVED] " + dest + " (" + size + " bytes)"); +} + +// NtClose: reconstruct + flush saved files written via NtWriteFile +function flush(handleStr) { + var f = files[handleStr]; + if (!f) return; + delete files[handleStr]; + if (!f.save || f.end === 0) return; + var out = new Uint8Array(f.end); + for (var i = 0; i < f.chunks.length; i++) out.set(new Uint8Array(f.chunks[i].ab), f.chunks[i].pos); + saveBuffer(f.path, out.buffer, f.end); +} +Interceptor.attach(resolve("NtClose"), { onEnter: function (args) { flush(args[0].toString()); } }); + +// ---- memory-mapped writes (the .pdb is likely built via a file mapping) ---- +// CreateFileMapping/MapViewOfFile funnel through these ntdll calls. We link +// section -> backing file (NtCreateSection takes the file handle we already +// track), record the mapped view, and snapshot its memory when it's unmapped. +var sections = {}; // sectionHandle -> { path, save, maxSize } +var views = {}; // baseAddr string -> { base, size, path, save, maxSize } + +function hookSections() { + var cs = resolve("NtCreateSection"); + if (cs) Interceptor.attach(cs, { + onEnter: function (args) { + this.pSection = args[0]; + this.pMax = args[3]; // PLARGE_INTEGER MaximumSize (may be null) + this.fileHandle = args[6].toString();// HANDLE FileHandle + }, + onLeave: function (ret) { + if (ret.toInt32() !== 0) return; // not STATUS_SUCCESS + var f = files[this.fileHandle]; + if (!f) return; // only file-backed sections we track + var maxSize = (this.pMax && !this.pMax.isNull()) ? this.pMax.readU32() : 0; + sections[this.pSection.readPointer().toString()] = { path: f.path, save: f.save, maxSize: maxSize }; + }, + }); + + var mv = resolve("NtMapViewOfSection"); + if (mv) Interceptor.attach(mv, { + onEnter: function (args) { + this.section = args[0].toString(); + this.pBase = args[2]; // PVOID* BaseAddress + this.pViewSize = args[6]; // PSIZE_T ViewSize + }, + onLeave: function (ret) { + if (ret.toInt32() < 0) return; // negative NTSTATUS = error + var s = sections[this.section]; + if (!s) return; + var base = this.pBase.readPointer(); + var size = (this.pViewSize && !this.pViewSize.isNull()) ? this.pViewSize.readU32() : 0; + views[base.toString()] = { base: base, size: size, path: s.path, save: s.save, maxSize: s.maxSize }; + if (s.save || VERBOSE) console.log(TAG + "[mmap] " + s.path + " @ " + base + " view=" + size + " max=" + s.maxSize); + }, + }); + + function captureView(base) { + var v = views[base.toString()]; + if (!v) return; + delete views[base.toString()]; + if (!v.save) return; + var size = v.maxSize || v.size; + if (!size) { var r = Process.findRangeByAddress(base); size = r ? r.size : 0; } + if (!size) return; + try { saveBuffer(v.path, Memory.readByteArray(base, size), size); } + catch (e) { console.log(TAG + "[mmap] read failed @ " + base + ": " + e); } + } + + var um = ntdll.findExportByName("NtUnmapViewOfSection"); + if (um) Interceptor.attach(um, { onEnter: function (args) { captureView(args[1]); } }); +} +hookSections(); + +console.log(TAG + "ntdll + mmap hooks installed -- trigger 'Export to USB' in rekordbox now");