A tool for deriving PKG packet encryption keys for ps4 written in c++
| 1 | #include "AST.h" |
| 2 | #include "../analysis/TypeSystem.h" |
| 3 | |
| 4 | namespace ShadPKG::Decompiler::AST { |
| 5 | |
| 6 | std::string LocalVariable::getTypeName() const { |
| 7 | if (complexType) { |
| 8 | return complexType->toString(); |
| 9 | } |
| 10 | |
| 11 | // Fallback to legacy enum |
| 12 | switch (type) { |
| 13 | case Expression::Type::Int8: |
| 14 | return "int8_t"; |
| 15 | case Expression::Type::Int16: |
| 16 | return "int16_t"; |
| 17 | case Expression::Type::Int32: |
| 18 | return "int32_t"; |
| 19 | case Expression::Type::Int64: |
| 20 | return "int64_t"; |
| 21 | case Expression::Type::UInt8: |
| 22 | return "uint8_t"; |
| 23 | case Expression::Type::UInt16: |
| 24 | return "uint16_t"; |
| 25 | case Expression::Type::UInt32: |
| 26 | return "uint32_t"; |
| 27 | case Expression::Type::UInt64: |
| 28 | return "uint64_t"; |
| 29 | case Expression::Type::Float: |
| 30 | return "float"; |
| 31 | case Expression::Type::Double: |
| 32 | return "double"; |
| 33 | case Expression::Type::Pointer: |
| 34 | return "void*"; |
| 35 | case Expression::Type::Boolean: |
| 36 | return "bool"; |
| 37 | default: |
| 38 | return "int32_t"; |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | } // namespace ShadPKG::Decompiler::AST |
| 43 |