1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 04:02:42 +01:00

merge branch 'master' of https://github.com/DHrpcs3/rpcs3 into crypto

This commit is contained in:
Aishou 2014-03-03 14:42:21 +01:00
commit bd45704c83
52 changed files with 3984 additions and 10290 deletions

634
rpcs3.sln
View File

@ -1,333 +1,301 @@
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012 # Visual Studio 2012
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rpcs3", "rpcs3\rpcs3.vcxproj", "{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rpcs3", "rpcs3\rpcs3.vcxproj", "{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{CD478F02-7550-58A5-E085-CE4BC0C0AD23} = {CD478F02-7550-58A5-E085-CE4BC0C0AD23} {CD478F02-7550-58A5-E085-CE4BC0C0AD23} = {CD478F02-7550-58A5-E085-CE4BC0C0AD23}
{067D9406-2A93-DACA-9449-93A2D356357D} = {067D9406-2A93-DACA-9449-93A2D356357D} {067D9406-2A93-DACA-9449-93A2D356357D} = {067D9406-2A93-DACA-9449-93A2D356357D}
{5C363C34-4741-7036-861C-2E2279CF552E} = {5C363C34-4741-7036-861C-2E2279CF552E} {5C363C34-4741-7036-861C-2E2279CF552E} = {5C363C34-4741-7036-861C-2E2279CF552E}
{23E1C437-A951-5943-8639-A17F3CF2E606} = {23E1C437-A951-5943-8639-A17F3CF2E606} {23E1C437-A951-5943-8639-A17F3CF2E606} = {23E1C437-A951-5943-8639-A17F3CF2E606}
{22B14659-C5B6-B775-868D-A49198FEAD4A} = {22B14659-C5B6-B775-868D-A49198FEAD4A} {22B14659-C5B6-B775-868D-A49198FEAD4A} = {22B14659-C5B6-B775-868D-A49198FEAD4A}
{9ED1866B-D4AE-3440-24E4-7A9475B163B2} = {9ED1866B-D4AE-3440-24E4-7A9475B163B2} {9ED1866B-D4AE-3440-24E4-7A9475B163B2} = {9ED1866B-D4AE-3440-24E4-7A9475B163B2}
{6EDC3B79-D217-F11A-406F-F11D856493F9} = {6EDC3B79-D217-F11A-406F-F11D856493F9} {6EDC3B79-D217-F11A-406F-F11D856493F9} = {6EDC3B79-D217-F11A-406F-F11D856493F9}
{3111D679-7796-23C4-BA0C-271F1145DA24} = {3111D679-7796-23C4-BA0C-271F1145DA24} {3111D679-7796-23C4-BA0C-271F1145DA24} = {3111D679-7796-23C4-BA0C-271F1145DA24}
{AFF2C68B-B867-DD50-6AC5-74B09D41F8EA} = {AFF2C68B-B867-DD50-6AC5-74B09D41F8EA} {AFF2C68B-B867-DD50-6AC5-74B09D41F8EA} = {AFF2C68B-B867-DD50-6AC5-74B09D41F8EA}
{FAF0CB93-F7CE-A6B8-8342-19CE99BAF774} = {FAF0CB93-F7CE-A6B8-8342-19CE99BAF774} {FAF0CB93-F7CE-A6B8-8342-19CE99BAF774} = {FAF0CB93-F7CE-A6B8-8342-19CE99BAF774}
{8BECCA95-C7D7-CFF8-FDB1-4950E9F8E8E6} = {8BECCA95-C7D7-CFF8-FDB1-4950E9F8E8E6} {8BECCA95-C7D7-CFF8-FDB1-4950E9F8E8E6} = {8BECCA95-C7D7-CFF8-FDB1-4950E9F8E8E6}
{99C9EB95-DB4C-1996-490E-5212EFBF07C3} = {99C9EB95-DB4C-1996-490E-5212EFBF07C3} {99C9EB95-DB4C-1996-490E-5212EFBF07C3} = {99C9EB95-DB4C-1996-490E-5212EFBF07C3}
{7047EE97-7F80-A70D-6147-BC11102DB6F4} = {7047EE97-7F80-A70D-6147-BC11102DB6F4} {7047EE97-7F80-A70D-6147-BC11102DB6F4} = {7047EE97-7F80-A70D-6147-BC11102DB6F4}
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D} = {87B42A9C-3F5C-53D7-9017-2B1CAE39457D} {87B42A9C-3F5C-53D7-9017-2B1CAE39457D} = {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}
{6FCB55A5-563F-4039-1D79-1EB6ED8AAB82} = {6FCB55A5-563F-4039-1D79-1EB6ED8AAB82} {6FCB55A5-563F-4039-1D79-1EB6ED8AAB82} = {6FCB55A5-563F-4039-1D79-1EB6ED8AAB82}
{949C6DB8-E638-6EC6-AB31-BCCFD1379E01} = {949C6DB8-E638-6EC6-AB31-BCCFD1379E01} {949C6DB8-E638-6EC6-AB31-BCCFD1379E01} = {949C6DB8-E638-6EC6-AB31-BCCFD1379E01}
{74827EBD-93DC-5110-BA95-3F2AB029B6B0} = {74827EBD-93DC-5110-BA95-3F2AB029B6B0} {74827EBD-93DC-5110-BA95-3F2AB029B6B0} = {74827EBD-93DC-5110-BA95-3F2AB029B6B0}
{46333DC3-B4A5-3DCC-E8BF-A3F20ADC56D2} = {46333DC3-B4A5-3DCC-E8BF-A3F20ADC56D2} {46333DC3-B4A5-3DCC-E8BF-A3F20ADC56D2} = {46333DC3-B4A5-3DCC-E8BF-A3F20ADC56D2}
{B87216CD-6C64-1DB0-D900-BC6E745C1DF9} = {B87216CD-6C64-1DB0-D900-BC6E745C1DF9} {B87216CD-6C64-1DB0-D900-BC6E745C1DF9} = {B87216CD-6C64-1DB0-D900-BC6E745C1DF9}
{6FDC76D5-CB44-B9F8-5EF6-C59B020719DF} = {6FDC76D5-CB44-B9F8-5EF6-C59B020719DF} {6FDC76D5-CB44-B9F8-5EF6-C59B020719DF} = {6FDC76D5-CB44-B9F8-5EF6-C59B020719DF}
{76169FE8-0814-4F36-6409-699EF1A23001} = {76169FE8-0814-4F36-6409-699EF1A23001} {76169FE8-0814-4F36-6409-699EF1A23001} = {76169FE8-0814-4F36-6409-699EF1A23001}
{A9AC9CF5-8E6C-0BA2-0769-6E42EDB88E25} = {A9AC9CF5-8E6C-0BA2-0769-6E42EDB88E25} {A9AC9CF5-8E6C-0BA2-0769-6E42EDB88E25} = {A9AC9CF5-8E6C-0BA2-0769-6E42EDB88E25}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "wxWidgets", "wxWidgets", "{5812E712-6213-4372-B095-9EB9BAA1F2DF}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "wxWidgets", "wxWidgets", "{5812E712-6213-4372-B095-9EB9BAA1F2DF}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "adv", "wxWidgets\build\msw\wx_vc10_adv.vcxproj", "{6FCB55A5-563F-4039-1D79-1EB6ED8AAB82}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "adv", "wxWidgets\build\msw\wx_vc10_adv.vcxproj", "{6FCB55A5-563F-4039-1D79-1EB6ED8AAB82}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aui", "wxWidgets\build\msw\wx_vc10_aui.vcxproj", "{7047EE97-7F80-A70D-6147-BC11102DB6F4}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aui", "wxWidgets\build\msw\wx_vc10_aui.vcxproj", "{7047EE97-7F80-A70D-6147-BC11102DB6F4}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "base", "wxWidgets\build\msw\wx_vc10_base.vcxproj", "{3111D679-7796-23C4-BA0C-271F1145DA24}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "base", "wxWidgets\build\msw\wx_vc10_base.vcxproj", "{3111D679-7796-23C4-BA0C-271F1145DA24}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core", "wxWidgets\build\msw\wx_vc10_core.vcxproj", "{067D9406-2A93-DACA-9449-93A2D356357D}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core", "wxWidgets\build\msw\wx_vc10_core.vcxproj", "{067D9406-2A93-DACA-9449-93A2D356357D}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "propgrid", "wxWidgets\build\msw\wx_vc10_propgrid.vcxproj", "{9ED1866B-D4AE-3440-24E4-7A9475B163B2}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "propgrid", "wxWidgets\build\msw\wx_vc10_propgrid.vcxproj", "{9ED1866B-D4AE-3440-24E4-7A9475B163B2}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gl", "wxWidgets\build\msw\wx_vc10_gl.vcxproj", "{99C9EB95-DB4C-1996-490E-5212EFBF07C3}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gl", "wxWidgets\build\msw\wx_vc10_gl.vcxproj", "{99C9EB95-DB4C-1996-490E-5212EFBF07C3}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "html", "wxWidgets\build\msw\wx_vc10_html.vcxproj", "{6EDC3B79-D217-F11A-406F-F11D856493F9}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "html", "wxWidgets\build\msw\wx_vc10_html.vcxproj", "{6EDC3B79-D217-F11A-406F-F11D856493F9}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "media", "wxWidgets\build\msw\wx_vc10_media.vcxproj", "{A9AC9CF5-8E6C-0BA2-0769-6E42EDB88E25}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "media", "wxWidgets\build\msw\wx_vc10_media.vcxproj", "{A9AC9CF5-8E6C-0BA2-0769-6E42EDB88E25}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "net", "wxWidgets\build\msw\wx_vc10_net.vcxproj", "{CD478F02-7550-58A5-E085-CE4BC0C0AD23}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "net", "wxWidgets\build\msw\wx_vc10_net.vcxproj", "{CD478F02-7550-58A5-E085-CE4BC0C0AD23}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qa", "wxWidgets\build\msw\wx_vc10_qa.vcxproj", "{22B14659-C5B6-B775-868D-A49198FEAD4A}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qa", "wxWidgets\build\msw\wx_vc10_qa.vcxproj", "{22B14659-C5B6-B775-868D-A49198FEAD4A}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "richtext", "wxWidgets\build\msw\wx_vc10_richtext.vcxproj", "{FAF0CB93-F7CE-A6B8-8342-19CE99BAF774}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "richtext", "wxWidgets\build\msw\wx_vc10_richtext.vcxproj", "{FAF0CB93-F7CE-A6B8-8342-19CE99BAF774}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxexpat", "wxWidgets\build\msw\wx_vc10_wxexpat.vcxproj", "{46333DC3-B4A5-3DCC-E8BF-A3F20ADC56D2}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxexpat", "wxWidgets\build\msw\wx_vc10_wxexpat.vcxproj", "{46333DC3-B4A5-3DCC-E8BF-A3F20ADC56D2}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxjpeg", "wxWidgets\build\msw\wx_vc10_wxjpeg.vcxproj", "{5C363C34-4741-7036-861C-2E2279CF552E}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxjpeg", "wxWidgets\build\msw\wx_vc10_wxjpeg.vcxproj", "{5C363C34-4741-7036-861C-2E2279CF552E}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxpng", "wxWidgets\build\msw\wx_vc10_wxpng.vcxproj", "{76169FE8-0814-4F36-6409-699EF1A23001}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxpng", "wxWidgets\build\msw\wx_vc10_wxpng.vcxproj", "{76169FE8-0814-4F36-6409-699EF1A23001}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxregex", "wxWidgets\build\msw\wx_vc10_wxregex.vcxproj", "{949C6DB8-E638-6EC6-AB31-BCCFD1379E01}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxregex", "wxWidgets\build\msw\wx_vc10_wxregex.vcxproj", "{949C6DB8-E638-6EC6-AB31-BCCFD1379E01}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxtiff", "wxWidgets\build\msw\wx_vc10_wxtiff.vcxproj", "{B87216CD-6C64-1DB0-D900-BC6E745C1DF9}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxtiff", "wxWidgets\build\msw\wx_vc10_wxtiff.vcxproj", "{B87216CD-6C64-1DB0-D900-BC6E745C1DF9}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxzlib", "wxWidgets\build\msw\wx_vc10_wxzlib.vcxproj", "{AFF2C68B-B867-DD50-6AC5-74B09D41F8EA}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxzlib", "wxWidgets\build\msw\wx_vc10_wxzlib.vcxproj", "{AFF2C68B-B867-DD50-6AC5-74B09D41F8EA}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xml", "wxWidgets\build\msw\wx_vc10_xml.vcxproj", "{6FDC76D5-CB44-B9F8-5EF6-C59B020719DF}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xml", "wxWidgets\build\msw\wx_vc10_xml.vcxproj", "{6FDC76D5-CB44-B9F8-5EF6-C59B020719DF}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xrc", "wxWidgets\build\msw\wx_vc10_xrc.vcxproj", "{8BECCA95-C7D7-CFF8-FDB1-4950E9F8E8E6}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xrc", "wxWidgets\build\msw\wx_vc10_xrc.vcxproj", "{8BECCA95-C7D7-CFF8-FDB1-4950E9F8E8E6}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "stblib", "stblib", "{9D839DFB-76E6-4F10-8EED-BA2AC7CC3FB6}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "stblib", "stblib", "{9D839DFB-76E6-4F10-8EED-BA2AC7CC3FB6}"
ProjectSection(SolutionItems) = preProject ProjectSection(SolutionItems) = preProject
stblib\stb_image.c = stblib\stb_image.c stblib\stb_image.c = stblib\stb_image.c
stblib\stb_image.h = stblib\stb_image.h stblib\stb_image.h = stblib\stb_image.h
EndProjectSection EndProjectSection
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scetool", "scetool", "{AB33A31B-6D15-45E8-B292-D512DEF0A5B1}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ribbon", "wxWidgets\build\msw\wx_vc10_ribbon.vcxproj", "{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}"
ProjectSection(SolutionItems) = preProject EndProject
scetool\aes.c = scetool\aes.c Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stc", "wxWidgets\build\msw\wx_vc10_stc.vcxproj", "{23E1C437-A951-5943-8639-A17F3CF2E606}"
scetool\aes.h = scetool\aes.h EndProject
scetool\aes_omac.h = scetool\aes_omac.h Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxscintilla", "wxWidgets\build\msw\wx_vc10_wxscintilla.vcxproj", "{74827EBD-93DC-5110-BA95-3F2AB029B6B0}"
scetool\bn.cpp = scetool\bn.cpp EndProject
scetool\config.h = scetool\config.h Global
scetool\ecdsa.h = scetool\ecdsa.h GlobalSection(SolutionConfigurationPlatforms) = preSolution
scetool\elf.h = scetool\elf.h Debug|Win32 = Debug|Win32
scetool\elf_inlines.h = scetool\elf_inlines.h Debug|x64 = Debug|x64
scetool\frontend.h = scetool\frontend.h Release|Win32 = Release|Win32
scetool\getopt.c = scetool\getopt.c Release|x64 = Release|x64
scetool\getopt.h = scetool\getopt.h EndGlobalSection
scetool\keys.h = scetool\keys.h GlobalSection(ProjectConfigurationPlatforms) = postSolution
scetool\list.h = scetool\list.h {70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug|Win32.ActiveCfg = Debug|Win32
scetool\mt19937.h = scetool\mt19937.h {70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug|Win32.Build.0 = Debug|Win32
scetool\np.h = scetool\np.h {70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug|x64.ActiveCfg = Debug|x64
scetool\rvk.h = scetool\rvk.h {70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug|x64.Build.0 = Debug|x64
scetool\sce.h = scetool\sce.h {70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Release|Win32.ActiveCfg = Release|Win32
scetool\sce_inlines.h = scetool\sce_inlines.h {70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Release|Win32.Build.0 = Release|Win32
scetool\scetool.cpp = scetool\scetool.cpp {70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Release|x64.ActiveCfg = Release|x64
scetool\self.h = scetool\self.h {70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Release|x64.Build.0 = Release|x64
scetool\sha1.c = scetool\sha1.c {6FCB55A5-563F-4039-1D79-1EB6ED8AAB82}.Debug|Win32.ActiveCfg = Debug|Win32
scetool\sha1.h = scetool\sha1.h {6FCB55A5-563F-4039-1D79-1EB6ED8AAB82}.Debug|Win32.Build.0 = Debug|Win32
scetool\spp.h = scetool\spp.h {6FCB55A5-563F-4039-1D79-1EB6ED8AAB82}.Debug|x64.ActiveCfg = Debug|x64
scetool\tables.h = scetool\tables.h {6FCB55A5-563F-4039-1D79-1EB6ED8AAB82}.Debug|x64.Build.0 = Debug|x64
scetool\types.h = scetool\types.h {6FCB55A5-563F-4039-1D79-1EB6ED8AAB82}.Release|Win32.ActiveCfg = Release|Win32
scetool\util.h = scetool\util.h {6FCB55A5-563F-4039-1D79-1EB6ED8AAB82}.Release|Win32.Build.0 = Release|Win32
scetool\zconf.h = scetool\zconf.h {6FCB55A5-563F-4039-1D79-1EB6ED8AAB82}.Release|x64.ActiveCfg = Release|x64
scetool\zlib.h = scetool\zlib.h {6FCB55A5-563F-4039-1D79-1EB6ED8AAB82}.Release|x64.Build.0 = Release|x64
EndProjectSection {7047EE97-7F80-A70D-6147-BC11102DB6F4}.Debug|Win32.ActiveCfg = Debug|Win32
EndProject {7047EE97-7F80-A70D-6147-BC11102DB6F4}.Debug|Win32.Build.0 = Debug|Win32
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ribbon", "wxWidgets\build\msw\wx_vc10_ribbon.vcxproj", "{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}" {7047EE97-7F80-A70D-6147-BC11102DB6F4}.Debug|x64.ActiveCfg = Debug|x64
EndProject {7047EE97-7F80-A70D-6147-BC11102DB6F4}.Debug|x64.Build.0 = Debug|x64
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stc", "wxWidgets\build\msw\wx_vc10_stc.vcxproj", "{23E1C437-A951-5943-8639-A17F3CF2E606}" {7047EE97-7F80-A70D-6147-BC11102DB6F4}.Release|Win32.ActiveCfg = Release|Win32
EndProject {7047EE97-7F80-A70D-6147-BC11102DB6F4}.Release|Win32.Build.0 = Release|Win32
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxscintilla", "wxWidgets\build\msw\wx_vc10_wxscintilla.vcxproj", "{74827EBD-93DC-5110-BA95-3F2AB029B6B0}" {7047EE97-7F80-A70D-6147-BC11102DB6F4}.Release|x64.ActiveCfg = Release|x64
EndProject {7047EE97-7F80-A70D-6147-BC11102DB6F4}.Release|x64.Build.0 = Release|x64
Global {3111D679-7796-23C4-BA0C-271F1145DA24}.Debug|Win32.ActiveCfg = Debug|Win32
GlobalSection(SolutionConfigurationPlatforms) = preSolution {3111D679-7796-23C4-BA0C-271F1145DA24}.Debug|Win32.Build.0 = Debug|Win32
Debug|Win32 = Debug|Win32 {3111D679-7796-23C4-BA0C-271F1145DA24}.Debug|x64.ActiveCfg = Debug|x64
Debug|x64 = Debug|x64 {3111D679-7796-23C4-BA0C-271F1145DA24}.Debug|x64.Build.0 = Debug|x64
Release|Win32 = Release|Win32 {3111D679-7796-23C4-BA0C-271F1145DA24}.Release|Win32.ActiveCfg = Release|Win32
Release|x64 = Release|x64 {3111D679-7796-23C4-BA0C-271F1145DA24}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection {3111D679-7796-23C4-BA0C-271F1145DA24}.Release|x64.ActiveCfg = Release|x64
GlobalSection(ProjectConfigurationPlatforms) = postSolution {3111D679-7796-23C4-BA0C-271F1145DA24}.Release|x64.Build.0 = Release|x64
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug|Win32.ActiveCfg = Debug|Win32 {067D9406-2A93-DACA-9449-93A2D356357D}.Debug|Win32.ActiveCfg = Debug|Win32
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug|Win32.Build.0 = Debug|Win32 {067D9406-2A93-DACA-9449-93A2D356357D}.Debug|Win32.Build.0 = Debug|Win32
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug|x64.ActiveCfg = Debug|x64 {067D9406-2A93-DACA-9449-93A2D356357D}.Debug|x64.ActiveCfg = Debug|x64
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug|x64.Build.0 = Debug|x64 {067D9406-2A93-DACA-9449-93A2D356357D}.Debug|x64.Build.0 = Debug|x64
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Release|Win32.ActiveCfg = Release|Win32 {067D9406-2A93-DACA-9449-93A2D356357D}.Release|Win32.ActiveCfg = Release|Win32
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Release|Win32.Build.0 = Release|Win32 {067D9406-2A93-DACA-9449-93A2D356357D}.Release|Win32.Build.0 = Release|Win32
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Release|x64.ActiveCfg = Release|x64 {067D9406-2A93-DACA-9449-93A2D356357D}.Release|x64.ActiveCfg = Release|x64
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Release|x64.Build.0 = Release|x64 {067D9406-2A93-DACA-9449-93A2D356357D}.Release|x64.Build.0 = Release|x64
{6FCB55A5-563F-4039-1D79-1EB6ED8AAB82}.Debug|Win32.ActiveCfg = Debug|Win32 {9ED1866B-D4AE-3440-24E4-7A9475B163B2}.Debug|Win32.ActiveCfg = Debug|Win32
{6FCB55A5-563F-4039-1D79-1EB6ED8AAB82}.Debug|Win32.Build.0 = Debug|Win32 {9ED1866B-D4AE-3440-24E4-7A9475B163B2}.Debug|Win32.Build.0 = Debug|Win32
{6FCB55A5-563F-4039-1D79-1EB6ED8AAB82}.Debug|x64.ActiveCfg = Debug|x64 {9ED1866B-D4AE-3440-24E4-7A9475B163B2}.Debug|x64.ActiveCfg = Debug|x64
{6FCB55A5-563F-4039-1D79-1EB6ED8AAB82}.Debug|x64.Build.0 = Debug|x64 {9ED1866B-D4AE-3440-24E4-7A9475B163B2}.Debug|x64.Build.0 = Debug|x64
{6FCB55A5-563F-4039-1D79-1EB6ED8AAB82}.Release|Win32.ActiveCfg = Release|Win32 {9ED1866B-D4AE-3440-24E4-7A9475B163B2}.Release|Win32.ActiveCfg = Release|Win32
{6FCB55A5-563F-4039-1D79-1EB6ED8AAB82}.Release|Win32.Build.0 = Release|Win32 {9ED1866B-D4AE-3440-24E4-7A9475B163B2}.Release|Win32.Build.0 = Release|Win32
{6FCB55A5-563F-4039-1D79-1EB6ED8AAB82}.Release|x64.ActiveCfg = Release|x64 {9ED1866B-D4AE-3440-24E4-7A9475B163B2}.Release|x64.ActiveCfg = Release|x64
{6FCB55A5-563F-4039-1D79-1EB6ED8AAB82}.Release|x64.Build.0 = Release|x64 {9ED1866B-D4AE-3440-24E4-7A9475B163B2}.Release|x64.Build.0 = Release|x64
{7047EE97-7F80-A70D-6147-BC11102DB6F4}.Debug|Win32.ActiveCfg = Debug|Win32 {99C9EB95-DB4C-1996-490E-5212EFBF07C3}.Debug|Win32.ActiveCfg = Debug|Win32
{7047EE97-7F80-A70D-6147-BC11102DB6F4}.Debug|Win32.Build.0 = Debug|Win32 {99C9EB95-DB4C-1996-490E-5212EFBF07C3}.Debug|Win32.Build.0 = Debug|Win32
{7047EE97-7F80-A70D-6147-BC11102DB6F4}.Debug|x64.ActiveCfg = Debug|x64 {99C9EB95-DB4C-1996-490E-5212EFBF07C3}.Debug|x64.ActiveCfg = Debug|x64
{7047EE97-7F80-A70D-6147-BC11102DB6F4}.Debug|x64.Build.0 = Debug|x64 {99C9EB95-DB4C-1996-490E-5212EFBF07C3}.Debug|x64.Build.0 = Debug|x64
{7047EE97-7F80-A70D-6147-BC11102DB6F4}.Release|Win32.ActiveCfg = Release|Win32 {99C9EB95-DB4C-1996-490E-5212EFBF07C3}.Release|Win32.ActiveCfg = Release|Win32
{7047EE97-7F80-A70D-6147-BC11102DB6F4}.Release|Win32.Build.0 = Release|Win32 {99C9EB95-DB4C-1996-490E-5212EFBF07C3}.Release|Win32.Build.0 = Release|Win32
{7047EE97-7F80-A70D-6147-BC11102DB6F4}.Release|x64.ActiveCfg = Release|x64 {99C9EB95-DB4C-1996-490E-5212EFBF07C3}.Release|x64.ActiveCfg = Release|x64
{7047EE97-7F80-A70D-6147-BC11102DB6F4}.Release|x64.Build.0 = Release|x64 {99C9EB95-DB4C-1996-490E-5212EFBF07C3}.Release|x64.Build.0 = Release|x64
{3111D679-7796-23C4-BA0C-271F1145DA24}.Debug|Win32.ActiveCfg = Debug|Win32 {6EDC3B79-D217-F11A-406F-F11D856493F9}.Debug|Win32.ActiveCfg = Debug|Win32
{3111D679-7796-23C4-BA0C-271F1145DA24}.Debug|Win32.Build.0 = Debug|Win32 {6EDC3B79-D217-F11A-406F-F11D856493F9}.Debug|Win32.Build.0 = Debug|Win32
{3111D679-7796-23C4-BA0C-271F1145DA24}.Debug|x64.ActiveCfg = Debug|x64 {6EDC3B79-D217-F11A-406F-F11D856493F9}.Debug|x64.ActiveCfg = Debug|x64
{3111D679-7796-23C4-BA0C-271F1145DA24}.Debug|x64.Build.0 = Debug|x64 {6EDC3B79-D217-F11A-406F-F11D856493F9}.Debug|x64.Build.0 = Debug|x64
{3111D679-7796-23C4-BA0C-271F1145DA24}.Release|Win32.ActiveCfg = Release|Win32 {6EDC3B79-D217-F11A-406F-F11D856493F9}.Release|Win32.ActiveCfg = Release|Win32
{3111D679-7796-23C4-BA0C-271F1145DA24}.Release|Win32.Build.0 = Release|Win32 {6EDC3B79-D217-F11A-406F-F11D856493F9}.Release|Win32.Build.0 = Release|Win32
{3111D679-7796-23C4-BA0C-271F1145DA24}.Release|x64.ActiveCfg = Release|x64 {6EDC3B79-D217-F11A-406F-F11D856493F9}.Release|x64.ActiveCfg = Release|x64
{3111D679-7796-23C4-BA0C-271F1145DA24}.Release|x64.Build.0 = Release|x64 {6EDC3B79-D217-F11A-406F-F11D856493F9}.Release|x64.Build.0 = Release|x64
{067D9406-2A93-DACA-9449-93A2D356357D}.Debug|Win32.ActiveCfg = Debug|Win32 {A9AC9CF5-8E6C-0BA2-0769-6E42EDB88E25}.Debug|Win32.ActiveCfg = Debug|Win32
{067D9406-2A93-DACA-9449-93A2D356357D}.Debug|Win32.Build.0 = Debug|Win32 {A9AC9CF5-8E6C-0BA2-0769-6E42EDB88E25}.Debug|Win32.Build.0 = Debug|Win32
{067D9406-2A93-DACA-9449-93A2D356357D}.Debug|x64.ActiveCfg = Debug|x64 {A9AC9CF5-8E6C-0BA2-0769-6E42EDB88E25}.Debug|x64.ActiveCfg = Debug|x64
{067D9406-2A93-DACA-9449-93A2D356357D}.Debug|x64.Build.0 = Debug|x64 {A9AC9CF5-8E6C-0BA2-0769-6E42EDB88E25}.Debug|x64.Build.0 = Debug|x64
{067D9406-2A93-DACA-9449-93A2D356357D}.Release|Win32.ActiveCfg = Release|Win32 {A9AC9CF5-8E6C-0BA2-0769-6E42EDB88E25}.Release|Win32.ActiveCfg = Release|Win32
{067D9406-2A93-DACA-9449-93A2D356357D}.Release|Win32.Build.0 = Release|Win32 {A9AC9CF5-8E6C-0BA2-0769-6E42EDB88E25}.Release|Win32.Build.0 = Release|Win32
{067D9406-2A93-DACA-9449-93A2D356357D}.Release|x64.ActiveCfg = Release|x64 {A9AC9CF5-8E6C-0BA2-0769-6E42EDB88E25}.Release|x64.ActiveCfg = Release|x64
{067D9406-2A93-DACA-9449-93A2D356357D}.Release|x64.Build.0 = Release|x64 {A9AC9CF5-8E6C-0BA2-0769-6E42EDB88E25}.Release|x64.Build.0 = Release|x64
{9ED1866B-D4AE-3440-24E4-7A9475B163B2}.Debug|Win32.ActiveCfg = Debug|Win32 {CD478F02-7550-58A5-E085-CE4BC0C0AD23}.Debug|Win32.ActiveCfg = Debug|Win32
{9ED1866B-D4AE-3440-24E4-7A9475B163B2}.Debug|Win32.Build.0 = Debug|Win32 {CD478F02-7550-58A5-E085-CE4BC0C0AD23}.Debug|Win32.Build.0 = Debug|Win32
{9ED1866B-D4AE-3440-24E4-7A9475B163B2}.Debug|x64.ActiveCfg = Debug|x64 {CD478F02-7550-58A5-E085-CE4BC0C0AD23}.Debug|x64.ActiveCfg = Debug|x64
{9ED1866B-D4AE-3440-24E4-7A9475B163B2}.Debug|x64.Build.0 = Debug|x64 {CD478F02-7550-58A5-E085-CE4BC0C0AD23}.Debug|x64.Build.0 = Debug|x64
{9ED1866B-D4AE-3440-24E4-7A9475B163B2}.Release|Win32.ActiveCfg = Release|Win32 {CD478F02-7550-58A5-E085-CE4BC0C0AD23}.Release|Win32.ActiveCfg = Release|Win32
{9ED1866B-D4AE-3440-24E4-7A9475B163B2}.Release|Win32.Build.0 = Release|Win32 {CD478F02-7550-58A5-E085-CE4BC0C0AD23}.Release|Win32.Build.0 = Release|Win32
{9ED1866B-D4AE-3440-24E4-7A9475B163B2}.Release|x64.ActiveCfg = Release|x64 {CD478F02-7550-58A5-E085-CE4BC0C0AD23}.Release|x64.ActiveCfg = Release|x64
{9ED1866B-D4AE-3440-24E4-7A9475B163B2}.Release|x64.Build.0 = Release|x64 {CD478F02-7550-58A5-E085-CE4BC0C0AD23}.Release|x64.Build.0 = Release|x64
{99C9EB95-DB4C-1996-490E-5212EFBF07C3}.Debug|Win32.ActiveCfg = Debug|Win32 {22B14659-C5B6-B775-868D-A49198FEAD4A}.Debug|Win32.ActiveCfg = Debug|Win32
{99C9EB95-DB4C-1996-490E-5212EFBF07C3}.Debug|Win32.Build.0 = Debug|Win32 {22B14659-C5B6-B775-868D-A49198FEAD4A}.Debug|Win32.Build.0 = Debug|Win32
{99C9EB95-DB4C-1996-490E-5212EFBF07C3}.Debug|x64.ActiveCfg = Debug|x64 {22B14659-C5B6-B775-868D-A49198FEAD4A}.Debug|x64.ActiveCfg = Debug|x64
{99C9EB95-DB4C-1996-490E-5212EFBF07C3}.Debug|x64.Build.0 = Debug|x64 {22B14659-C5B6-B775-868D-A49198FEAD4A}.Debug|x64.Build.0 = Debug|x64
{99C9EB95-DB4C-1996-490E-5212EFBF07C3}.Release|Win32.ActiveCfg = Release|Win32 {22B14659-C5B6-B775-868D-A49198FEAD4A}.Release|Win32.ActiveCfg = Release|Win32
{99C9EB95-DB4C-1996-490E-5212EFBF07C3}.Release|Win32.Build.0 = Release|Win32 {22B14659-C5B6-B775-868D-A49198FEAD4A}.Release|Win32.Build.0 = Release|Win32
{99C9EB95-DB4C-1996-490E-5212EFBF07C3}.Release|x64.ActiveCfg = Release|x64 {22B14659-C5B6-B775-868D-A49198FEAD4A}.Release|x64.ActiveCfg = Release|x64
{99C9EB95-DB4C-1996-490E-5212EFBF07C3}.Release|x64.Build.0 = Release|x64 {22B14659-C5B6-B775-868D-A49198FEAD4A}.Release|x64.Build.0 = Release|x64
{6EDC3B79-D217-F11A-406F-F11D856493F9}.Debug|Win32.ActiveCfg = Debug|Win32 {FAF0CB93-F7CE-A6B8-8342-19CE99BAF774}.Debug|Win32.ActiveCfg = Debug|Win32
{6EDC3B79-D217-F11A-406F-F11D856493F9}.Debug|Win32.Build.0 = Debug|Win32 {FAF0CB93-F7CE-A6B8-8342-19CE99BAF774}.Debug|Win32.Build.0 = Debug|Win32
{6EDC3B79-D217-F11A-406F-F11D856493F9}.Debug|x64.ActiveCfg = Debug|x64 {FAF0CB93-F7CE-A6B8-8342-19CE99BAF774}.Debug|x64.ActiveCfg = Debug|x64
{6EDC3B79-D217-F11A-406F-F11D856493F9}.Debug|x64.Build.0 = Debug|x64 {FAF0CB93-F7CE-A6B8-8342-19CE99BAF774}.Debug|x64.Build.0 = Debug|x64
{6EDC3B79-D217-F11A-406F-F11D856493F9}.Release|Win32.ActiveCfg = Release|Win32 {FAF0CB93-F7CE-A6B8-8342-19CE99BAF774}.Release|Win32.ActiveCfg = Release|Win32
{6EDC3B79-D217-F11A-406F-F11D856493F9}.Release|Win32.Build.0 = Release|Win32 {FAF0CB93-F7CE-A6B8-8342-19CE99BAF774}.Release|Win32.Build.0 = Release|Win32
{6EDC3B79-D217-F11A-406F-F11D856493F9}.Release|x64.ActiveCfg = Release|x64 {FAF0CB93-F7CE-A6B8-8342-19CE99BAF774}.Release|x64.ActiveCfg = Release|x64
{6EDC3B79-D217-F11A-406F-F11D856493F9}.Release|x64.Build.0 = Release|x64 {FAF0CB93-F7CE-A6B8-8342-19CE99BAF774}.Release|x64.Build.0 = Release|x64
{A9AC9CF5-8E6C-0BA2-0769-6E42EDB88E25}.Debug|Win32.ActiveCfg = Debug|Win32 {46333DC3-B4A5-3DCC-E8BF-A3F20ADC56D2}.Debug|Win32.ActiveCfg = Debug|Win32
{A9AC9CF5-8E6C-0BA2-0769-6E42EDB88E25}.Debug|Win32.Build.0 = Debug|Win32 {46333DC3-B4A5-3DCC-E8BF-A3F20ADC56D2}.Debug|Win32.Build.0 = Debug|Win32
{A9AC9CF5-8E6C-0BA2-0769-6E42EDB88E25}.Debug|x64.ActiveCfg = Debug|x64 {46333DC3-B4A5-3DCC-E8BF-A3F20ADC56D2}.Debug|x64.ActiveCfg = Debug|x64
{A9AC9CF5-8E6C-0BA2-0769-6E42EDB88E25}.Debug|x64.Build.0 = Debug|x64 {46333DC3-B4A5-3DCC-E8BF-A3F20ADC56D2}.Debug|x64.Build.0 = Debug|x64
{A9AC9CF5-8E6C-0BA2-0769-6E42EDB88E25}.Release|Win32.ActiveCfg = Release|Win32 {46333DC3-B4A5-3DCC-E8BF-A3F20ADC56D2}.Release|Win32.ActiveCfg = Release|Win32
{A9AC9CF5-8E6C-0BA2-0769-6E42EDB88E25}.Release|Win32.Build.0 = Release|Win32 {46333DC3-B4A5-3DCC-E8BF-A3F20ADC56D2}.Release|Win32.Build.0 = Release|Win32
{A9AC9CF5-8E6C-0BA2-0769-6E42EDB88E25}.Release|x64.ActiveCfg = Release|x64 {46333DC3-B4A5-3DCC-E8BF-A3F20ADC56D2}.Release|x64.ActiveCfg = Release|x64
{A9AC9CF5-8E6C-0BA2-0769-6E42EDB88E25}.Release|x64.Build.0 = Release|x64 {46333DC3-B4A5-3DCC-E8BF-A3F20ADC56D2}.Release|x64.Build.0 = Release|x64
{CD478F02-7550-58A5-E085-CE4BC0C0AD23}.Debug|Win32.ActiveCfg = Debug|Win32 {5C363C34-4741-7036-861C-2E2279CF552E}.Debug|Win32.ActiveCfg = Debug|Win32
{CD478F02-7550-58A5-E085-CE4BC0C0AD23}.Debug|Win32.Build.0 = Debug|Win32 {5C363C34-4741-7036-861C-2E2279CF552E}.Debug|Win32.Build.0 = Debug|Win32
{CD478F02-7550-58A5-E085-CE4BC0C0AD23}.Debug|x64.ActiveCfg = Debug|x64 {5C363C34-4741-7036-861C-2E2279CF552E}.Debug|x64.ActiveCfg = Debug|x64
{CD478F02-7550-58A5-E085-CE4BC0C0AD23}.Debug|x64.Build.0 = Debug|x64 {5C363C34-4741-7036-861C-2E2279CF552E}.Debug|x64.Build.0 = Debug|x64
{CD478F02-7550-58A5-E085-CE4BC0C0AD23}.Release|Win32.ActiveCfg = Release|Win32 {5C363C34-4741-7036-861C-2E2279CF552E}.Release|Win32.ActiveCfg = Release|Win32
{CD478F02-7550-58A5-E085-CE4BC0C0AD23}.Release|Win32.Build.0 = Release|Win32 {5C363C34-4741-7036-861C-2E2279CF552E}.Release|Win32.Build.0 = Release|Win32
{CD478F02-7550-58A5-E085-CE4BC0C0AD23}.Release|x64.ActiveCfg = Release|x64 {5C363C34-4741-7036-861C-2E2279CF552E}.Release|x64.ActiveCfg = Release|x64
{CD478F02-7550-58A5-E085-CE4BC0C0AD23}.Release|x64.Build.0 = Release|x64 {5C363C34-4741-7036-861C-2E2279CF552E}.Release|x64.Build.0 = Release|x64
{22B14659-C5B6-B775-868D-A49198FEAD4A}.Debug|Win32.ActiveCfg = Debug|Win32 {76169FE8-0814-4F36-6409-699EF1A23001}.Debug|Win32.ActiveCfg = Debug|Win32
{22B14659-C5B6-B775-868D-A49198FEAD4A}.Debug|Win32.Build.0 = Debug|Win32 {76169FE8-0814-4F36-6409-699EF1A23001}.Debug|Win32.Build.0 = Debug|Win32
{22B14659-C5B6-B775-868D-A49198FEAD4A}.Debug|x64.ActiveCfg = Debug|x64 {76169FE8-0814-4F36-6409-699EF1A23001}.Debug|x64.ActiveCfg = Debug|x64
{22B14659-C5B6-B775-868D-A49198FEAD4A}.Debug|x64.Build.0 = Debug|x64 {76169FE8-0814-4F36-6409-699EF1A23001}.Debug|x64.Build.0 = Debug|x64
{22B14659-C5B6-B775-868D-A49198FEAD4A}.Release|Win32.ActiveCfg = Release|Win32 {76169FE8-0814-4F36-6409-699EF1A23001}.Release|Win32.ActiveCfg = Release|Win32
{22B14659-C5B6-B775-868D-A49198FEAD4A}.Release|Win32.Build.0 = Release|Win32 {76169FE8-0814-4F36-6409-699EF1A23001}.Release|Win32.Build.0 = Release|Win32
{22B14659-C5B6-B775-868D-A49198FEAD4A}.Release|x64.ActiveCfg = Release|x64 {76169FE8-0814-4F36-6409-699EF1A23001}.Release|x64.ActiveCfg = Release|x64
{22B14659-C5B6-B775-868D-A49198FEAD4A}.Release|x64.Build.0 = Release|x64 {76169FE8-0814-4F36-6409-699EF1A23001}.Release|x64.Build.0 = Release|x64
{FAF0CB93-F7CE-A6B8-8342-19CE99BAF774}.Debug|Win32.ActiveCfg = Debug|Win32 {949C6DB8-E638-6EC6-AB31-BCCFD1379E01}.Debug|Win32.ActiveCfg = Debug|Win32
{FAF0CB93-F7CE-A6B8-8342-19CE99BAF774}.Debug|Win32.Build.0 = Debug|Win32 {949C6DB8-E638-6EC6-AB31-BCCFD1379E01}.Debug|Win32.Build.0 = Debug|Win32
{FAF0CB93-F7CE-A6B8-8342-19CE99BAF774}.Debug|x64.ActiveCfg = Debug|x64 {949C6DB8-E638-6EC6-AB31-BCCFD1379E01}.Debug|x64.ActiveCfg = Debug|x64
{FAF0CB93-F7CE-A6B8-8342-19CE99BAF774}.Debug|x64.Build.0 = Debug|x64 {949C6DB8-E638-6EC6-AB31-BCCFD1379E01}.Debug|x64.Build.0 = Debug|x64
{FAF0CB93-F7CE-A6B8-8342-19CE99BAF774}.Release|Win32.ActiveCfg = Release|Win32 {949C6DB8-E638-6EC6-AB31-BCCFD1379E01}.Release|Win32.ActiveCfg = Release|Win32
{FAF0CB93-F7CE-A6B8-8342-19CE99BAF774}.Release|Win32.Build.0 = Release|Win32 {949C6DB8-E638-6EC6-AB31-BCCFD1379E01}.Release|Win32.Build.0 = Release|Win32
{FAF0CB93-F7CE-A6B8-8342-19CE99BAF774}.Release|x64.ActiveCfg = Release|x64 {949C6DB8-E638-6EC6-AB31-BCCFD1379E01}.Release|x64.ActiveCfg = Release|x64
{FAF0CB93-F7CE-A6B8-8342-19CE99BAF774}.Release|x64.Build.0 = Release|x64 {949C6DB8-E638-6EC6-AB31-BCCFD1379E01}.Release|x64.Build.0 = Release|x64
{46333DC3-B4A5-3DCC-E8BF-A3F20ADC56D2}.Debug|Win32.ActiveCfg = Debug|Win32 {B87216CD-6C64-1DB0-D900-BC6E745C1DF9}.Debug|Win32.ActiveCfg = Debug|Win32
{46333DC3-B4A5-3DCC-E8BF-A3F20ADC56D2}.Debug|Win32.Build.0 = Debug|Win32 {B87216CD-6C64-1DB0-D900-BC6E745C1DF9}.Debug|Win32.Build.0 = Debug|Win32
{46333DC3-B4A5-3DCC-E8BF-A3F20ADC56D2}.Debug|x64.ActiveCfg = Debug|x64 {B87216CD-6C64-1DB0-D900-BC6E745C1DF9}.Debug|x64.ActiveCfg = Debug|x64
{46333DC3-B4A5-3DCC-E8BF-A3F20ADC56D2}.Debug|x64.Build.0 = Debug|x64 {B87216CD-6C64-1DB0-D900-BC6E745C1DF9}.Debug|x64.Build.0 = Debug|x64
{46333DC3-B4A5-3DCC-E8BF-A3F20ADC56D2}.Release|Win32.ActiveCfg = Release|Win32 {B87216CD-6C64-1DB0-D900-BC6E745C1DF9}.Release|Win32.ActiveCfg = Release|Win32
{46333DC3-B4A5-3DCC-E8BF-A3F20ADC56D2}.Release|Win32.Build.0 = Release|Win32 {B87216CD-6C64-1DB0-D900-BC6E745C1DF9}.Release|Win32.Build.0 = Release|Win32
{46333DC3-B4A5-3DCC-E8BF-A3F20ADC56D2}.Release|x64.ActiveCfg = Release|x64 {B87216CD-6C64-1DB0-D900-BC6E745C1DF9}.Release|x64.ActiveCfg = Release|x64
{46333DC3-B4A5-3DCC-E8BF-A3F20ADC56D2}.Release|x64.Build.0 = Release|x64 {B87216CD-6C64-1DB0-D900-BC6E745C1DF9}.Release|x64.Build.0 = Release|x64
{5C363C34-4741-7036-861C-2E2279CF552E}.Debug|Win32.ActiveCfg = Debug|Win32 {AFF2C68B-B867-DD50-6AC5-74B09D41F8EA}.Debug|Win32.ActiveCfg = Debug|Win32
{5C363C34-4741-7036-861C-2E2279CF552E}.Debug|Win32.Build.0 = Debug|Win32 {AFF2C68B-B867-DD50-6AC5-74B09D41F8EA}.Debug|Win32.Build.0 = Debug|Win32
{5C363C34-4741-7036-861C-2E2279CF552E}.Debug|x64.ActiveCfg = Debug|x64 {AFF2C68B-B867-DD50-6AC5-74B09D41F8EA}.Debug|x64.ActiveCfg = Debug|x64
{5C363C34-4741-7036-861C-2E2279CF552E}.Debug|x64.Build.0 = Debug|x64 {AFF2C68B-B867-DD50-6AC5-74B09D41F8EA}.Debug|x64.Build.0 = Debug|x64
{5C363C34-4741-7036-861C-2E2279CF552E}.Release|Win32.ActiveCfg = Release|Win32 {AFF2C68B-B867-DD50-6AC5-74B09D41F8EA}.Release|Win32.ActiveCfg = Release|Win32
{5C363C34-4741-7036-861C-2E2279CF552E}.Release|Win32.Build.0 = Release|Win32 {AFF2C68B-B867-DD50-6AC5-74B09D41F8EA}.Release|Win32.Build.0 = Release|Win32
{5C363C34-4741-7036-861C-2E2279CF552E}.Release|x64.ActiveCfg = Release|x64 {AFF2C68B-B867-DD50-6AC5-74B09D41F8EA}.Release|x64.ActiveCfg = Release|x64
{5C363C34-4741-7036-861C-2E2279CF552E}.Release|x64.Build.0 = Release|x64 {AFF2C68B-B867-DD50-6AC5-74B09D41F8EA}.Release|x64.Build.0 = Release|x64
{76169FE8-0814-4F36-6409-699EF1A23001}.Debug|Win32.ActiveCfg = Debug|Win32 {6FDC76D5-CB44-B9F8-5EF6-C59B020719DF}.Debug|Win32.ActiveCfg = Debug|Win32
{76169FE8-0814-4F36-6409-699EF1A23001}.Debug|Win32.Build.0 = Debug|Win32 {6FDC76D5-CB44-B9F8-5EF6-C59B020719DF}.Debug|Win32.Build.0 = Debug|Win32
{76169FE8-0814-4F36-6409-699EF1A23001}.Debug|x64.ActiveCfg = Debug|x64 {6FDC76D5-CB44-B9F8-5EF6-C59B020719DF}.Debug|x64.ActiveCfg = Debug|x64
{76169FE8-0814-4F36-6409-699EF1A23001}.Debug|x64.Build.0 = Debug|x64 {6FDC76D5-CB44-B9F8-5EF6-C59B020719DF}.Debug|x64.Build.0 = Debug|x64
{76169FE8-0814-4F36-6409-699EF1A23001}.Release|Win32.ActiveCfg = Release|Win32 {6FDC76D5-CB44-B9F8-5EF6-C59B020719DF}.Release|Win32.ActiveCfg = Release|Win32
{76169FE8-0814-4F36-6409-699EF1A23001}.Release|Win32.Build.0 = Release|Win32 {6FDC76D5-CB44-B9F8-5EF6-C59B020719DF}.Release|Win32.Build.0 = Release|Win32
{76169FE8-0814-4F36-6409-699EF1A23001}.Release|x64.ActiveCfg = Release|x64 {6FDC76D5-CB44-B9F8-5EF6-C59B020719DF}.Release|x64.ActiveCfg = Release|x64
{76169FE8-0814-4F36-6409-699EF1A23001}.Release|x64.Build.0 = Release|x64 {6FDC76D5-CB44-B9F8-5EF6-C59B020719DF}.Release|x64.Build.0 = Release|x64
{949C6DB8-E638-6EC6-AB31-BCCFD1379E01}.Debug|Win32.ActiveCfg = Debug|Win32 {8BECCA95-C7D7-CFF8-FDB1-4950E9F8E8E6}.Debug|Win32.ActiveCfg = Debug|Win32
{949C6DB8-E638-6EC6-AB31-BCCFD1379E01}.Debug|Win32.Build.0 = Debug|Win32 {8BECCA95-C7D7-CFF8-FDB1-4950E9F8E8E6}.Debug|Win32.Build.0 = Debug|Win32
{949C6DB8-E638-6EC6-AB31-BCCFD1379E01}.Debug|x64.ActiveCfg = Debug|x64 {8BECCA95-C7D7-CFF8-FDB1-4950E9F8E8E6}.Debug|x64.ActiveCfg = Debug|x64
{949C6DB8-E638-6EC6-AB31-BCCFD1379E01}.Debug|x64.Build.0 = Debug|x64 {8BECCA95-C7D7-CFF8-FDB1-4950E9F8E8E6}.Debug|x64.Build.0 = Debug|x64
{949C6DB8-E638-6EC6-AB31-BCCFD1379E01}.Release|Win32.ActiveCfg = Release|Win32 {8BECCA95-C7D7-CFF8-FDB1-4950E9F8E8E6}.Release|Win32.ActiveCfg = Release|Win32
{949C6DB8-E638-6EC6-AB31-BCCFD1379E01}.Release|Win32.Build.0 = Release|Win32 {8BECCA95-C7D7-CFF8-FDB1-4950E9F8E8E6}.Release|Win32.Build.0 = Release|Win32
{949C6DB8-E638-6EC6-AB31-BCCFD1379E01}.Release|x64.ActiveCfg = Release|x64 {8BECCA95-C7D7-CFF8-FDB1-4950E9F8E8E6}.Release|x64.ActiveCfg = Release|x64
{949C6DB8-E638-6EC6-AB31-BCCFD1379E01}.Release|x64.Build.0 = Release|x64 {8BECCA95-C7D7-CFF8-FDB1-4950E9F8E8E6}.Release|x64.Build.0 = Release|x64
{B87216CD-6C64-1DB0-D900-BC6E745C1DF9}.Debug|Win32.ActiveCfg = Debug|Win32 {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug|Win32.ActiveCfg = Debug|Win32
{B87216CD-6C64-1DB0-D900-BC6E745C1DF9}.Debug|Win32.Build.0 = Debug|Win32 {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug|Win32.Build.0 = Debug|Win32
{B87216CD-6C64-1DB0-D900-BC6E745C1DF9}.Debug|x64.ActiveCfg = Debug|x64 {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug|x64.ActiveCfg = Debug|x64
{B87216CD-6C64-1DB0-D900-BC6E745C1DF9}.Debug|x64.Build.0 = Debug|x64 {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug|x64.Build.0 = Debug|x64
{B87216CD-6C64-1DB0-D900-BC6E745C1DF9}.Release|Win32.ActiveCfg = Release|Win32 {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release|Win32.ActiveCfg = Release|Win32
{B87216CD-6C64-1DB0-D900-BC6E745C1DF9}.Release|Win32.Build.0 = Release|Win32 {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release|Win32.Build.0 = Release|Win32
{B87216CD-6C64-1DB0-D900-BC6E745C1DF9}.Release|x64.ActiveCfg = Release|x64 {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release|x64.ActiveCfg = Release|x64
{B87216CD-6C64-1DB0-D900-BC6E745C1DF9}.Release|x64.Build.0 = Release|x64 {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release|x64.Build.0 = Release|x64
{AFF2C68B-B867-DD50-6AC5-74B09D41F8EA}.Debug|Win32.ActiveCfg = Debug|Win32 {23E1C437-A951-5943-8639-A17F3CF2E606}.Debug|Win32.ActiveCfg = Debug|Win32
{AFF2C68B-B867-DD50-6AC5-74B09D41F8EA}.Debug|Win32.Build.0 = Debug|Win32 {23E1C437-A951-5943-8639-A17F3CF2E606}.Debug|Win32.Build.0 = Debug|Win32
{AFF2C68B-B867-DD50-6AC5-74B09D41F8EA}.Debug|x64.ActiveCfg = Debug|x64 {23E1C437-A951-5943-8639-A17F3CF2E606}.Debug|x64.ActiveCfg = Debug|x64
{AFF2C68B-B867-DD50-6AC5-74B09D41F8EA}.Debug|x64.Build.0 = Debug|x64 {23E1C437-A951-5943-8639-A17F3CF2E606}.Debug|x64.Build.0 = Debug|x64
{AFF2C68B-B867-DD50-6AC5-74B09D41F8EA}.Release|Win32.ActiveCfg = Release|Win32 {23E1C437-A951-5943-8639-A17F3CF2E606}.Release|Win32.ActiveCfg = Release|Win32
{AFF2C68B-B867-DD50-6AC5-74B09D41F8EA}.Release|Win32.Build.0 = Release|Win32 {23E1C437-A951-5943-8639-A17F3CF2E606}.Release|Win32.Build.0 = Release|Win32
{AFF2C68B-B867-DD50-6AC5-74B09D41F8EA}.Release|x64.ActiveCfg = Release|x64 {23E1C437-A951-5943-8639-A17F3CF2E606}.Release|x64.ActiveCfg = Release|x64
{AFF2C68B-B867-DD50-6AC5-74B09D41F8EA}.Release|x64.Build.0 = Release|x64 {23E1C437-A951-5943-8639-A17F3CF2E606}.Release|x64.Build.0 = Release|x64
{6FDC76D5-CB44-B9F8-5EF6-C59B020719DF}.Debug|Win32.ActiveCfg = Debug|Win32 {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug|Win32.ActiveCfg = Debug|Win32
{6FDC76D5-CB44-B9F8-5EF6-C59B020719DF}.Debug|Win32.Build.0 = Debug|Win32 {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug|Win32.Build.0 = Debug|Win32
{6FDC76D5-CB44-B9F8-5EF6-C59B020719DF}.Debug|x64.ActiveCfg = Debug|x64 {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug|x64.ActiveCfg = Debug|x64
{6FDC76D5-CB44-B9F8-5EF6-C59B020719DF}.Debug|x64.Build.0 = Debug|x64 {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug|x64.Build.0 = Debug|x64
{6FDC76D5-CB44-B9F8-5EF6-C59B020719DF}.Release|Win32.ActiveCfg = Release|Win32 {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release|Win32.ActiveCfg = Release|Win32
{6FDC76D5-CB44-B9F8-5EF6-C59B020719DF}.Release|Win32.Build.0 = Release|Win32 {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release|Win32.Build.0 = Release|Win32
{6FDC76D5-CB44-B9F8-5EF6-C59B020719DF}.Release|x64.ActiveCfg = Release|x64 {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release|x64.ActiveCfg = Release|x64
{6FDC76D5-CB44-B9F8-5EF6-C59B020719DF}.Release|x64.Build.0 = Release|x64 {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release|x64.Build.0 = Release|x64
{8BECCA95-C7D7-CFF8-FDB1-4950E9F8E8E6}.Debug|Win32.ActiveCfg = Debug|Win32 EndGlobalSection
{8BECCA95-C7D7-CFF8-FDB1-4950E9F8E8E6}.Debug|Win32.Build.0 = Debug|Win32 GlobalSection(SolutionProperties) = preSolution
{8BECCA95-C7D7-CFF8-FDB1-4950E9F8E8E6}.Debug|x64.ActiveCfg = Debug|x64 HideSolutionNode = FALSE
{8BECCA95-C7D7-CFF8-FDB1-4950E9F8E8E6}.Debug|x64.Build.0 = Debug|x64 EndGlobalSection
{8BECCA95-C7D7-CFF8-FDB1-4950E9F8E8E6}.Release|Win32.ActiveCfg = Release|Win32 GlobalSection(NestedProjects) = preSolution
{8BECCA95-C7D7-CFF8-FDB1-4950E9F8E8E6}.Release|Win32.Build.0 = Release|Win32 {6FCB55A5-563F-4039-1D79-1EB6ED8AAB82} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{8BECCA95-C7D7-CFF8-FDB1-4950E9F8E8E6}.Release|x64.ActiveCfg = Release|x64 {7047EE97-7F80-A70D-6147-BC11102DB6F4} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{8BECCA95-C7D7-CFF8-FDB1-4950E9F8E8E6}.Release|x64.Build.0 = Release|x64 {3111D679-7796-23C4-BA0C-271F1145DA24} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug|Win32.ActiveCfg = Debug|Win32 {067D9406-2A93-DACA-9449-93A2D356357D} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug|Win32.Build.0 = Debug|Win32 {9ED1866B-D4AE-3440-24E4-7A9475B163B2} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug|x64.ActiveCfg = Debug|x64 {99C9EB95-DB4C-1996-490E-5212EFBF07C3} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug|x64.Build.0 = Debug|x64 {6EDC3B79-D217-F11A-406F-F11D856493F9} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release|Win32.ActiveCfg = Release|Win32 {A9AC9CF5-8E6C-0BA2-0769-6E42EDB88E25} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release|Win32.Build.0 = Release|Win32 {CD478F02-7550-58A5-E085-CE4BC0C0AD23} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release|x64.ActiveCfg = Release|x64 {22B14659-C5B6-B775-868D-A49198FEAD4A} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release|x64.Build.0 = Release|x64 {FAF0CB93-F7CE-A6B8-8342-19CE99BAF774} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{23E1C437-A951-5943-8639-A17F3CF2E606}.Debug|Win32.ActiveCfg = Debug|Win32 {46333DC3-B4A5-3DCC-E8BF-A3F20ADC56D2} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{23E1C437-A951-5943-8639-A17F3CF2E606}.Debug|Win32.Build.0 = Debug|Win32 {5C363C34-4741-7036-861C-2E2279CF552E} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{23E1C437-A951-5943-8639-A17F3CF2E606}.Debug|x64.ActiveCfg = Debug|x64 {76169FE8-0814-4F36-6409-699EF1A23001} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{23E1C437-A951-5943-8639-A17F3CF2E606}.Debug|x64.Build.0 = Debug|x64 {949C6DB8-E638-6EC6-AB31-BCCFD1379E01} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{23E1C437-A951-5943-8639-A17F3CF2E606}.Release|Win32.ActiveCfg = Release|Win32 {B87216CD-6C64-1DB0-D900-BC6E745C1DF9} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{23E1C437-A951-5943-8639-A17F3CF2E606}.Release|Win32.Build.0 = Release|Win32 {AFF2C68B-B867-DD50-6AC5-74B09D41F8EA} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{23E1C437-A951-5943-8639-A17F3CF2E606}.Release|x64.ActiveCfg = Release|x64 {6FDC76D5-CB44-B9F8-5EF6-C59B020719DF} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{23E1C437-A951-5943-8639-A17F3CF2E606}.Release|x64.Build.0 = Release|x64 {8BECCA95-C7D7-CFF8-FDB1-4950E9F8E8E6} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug|Win32.ActiveCfg = Debug|Win32 {87B42A9C-3F5C-53D7-9017-2B1CAE39457D} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug|Win32.Build.0 = Debug|Win32 {23E1C437-A951-5943-8639-A17F3CF2E606} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug|x64.ActiveCfg = Debug|x64 {74827EBD-93DC-5110-BA95-3F2AB029B6B0} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug|x64.Build.0 = Debug|x64 EndGlobalSection
{74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release|Win32.ActiveCfg = Release|Win32 EndGlobal
{74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release|Win32.Build.0 = Release|Win32
{74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release|x64.ActiveCfg = Release|x64
{74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{6FCB55A5-563F-4039-1D79-1EB6ED8AAB82} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{7047EE97-7F80-A70D-6147-BC11102DB6F4} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{3111D679-7796-23C4-BA0C-271F1145DA24} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{067D9406-2A93-DACA-9449-93A2D356357D} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{9ED1866B-D4AE-3440-24E4-7A9475B163B2} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{99C9EB95-DB4C-1996-490E-5212EFBF07C3} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{6EDC3B79-D217-F11A-406F-F11D856493F9} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{A9AC9CF5-8E6C-0BA2-0769-6E42EDB88E25} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{CD478F02-7550-58A5-E085-CE4BC0C0AD23} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{22B14659-C5B6-B775-868D-A49198FEAD4A} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{FAF0CB93-F7CE-A6B8-8342-19CE99BAF774} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{46333DC3-B4A5-3DCC-E8BF-A3F20ADC56D2} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{5C363C34-4741-7036-861C-2E2279CF552E} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{76169FE8-0814-4F36-6409-699EF1A23001} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{949C6DB8-E638-6EC6-AB31-BCCFD1379E01} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{B87216CD-6C64-1DB0-D900-BC6E745C1DF9} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{AFF2C68B-B867-DD50-6AC5-74B09D41F8EA} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{6FDC76D5-CB44-B9F8-5EF6-C59B020719DF} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{8BECCA95-C7D7-CFF8-FDB1-4950E9F8E8E6} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{23E1C437-A951-5943-8639-A17F3CF2E606} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
{74827EBD-93DC-5110-BA95-3F2AB029B6B0} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
EndGlobalSection
EndGlobal

View File

@ -1,5 +1,4 @@
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8)
project(rpcs3) project(rpcs3)
if (CMAKE_COMPILER_IS_GNUCXX) if (CMAKE_COMPILER_IS_GNUCXX)
@ -30,6 +29,7 @@ ${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/Emu ${CMAKE_SOURCE_DIR}/Emu
${CMAKE_SOURCE_DIR}/Gui ${CMAKE_SOURCE_DIR}/Gui
${CMAKE_SOURCE_DIR}/Loader ${CMAKE_SOURCE_DIR}/Loader
${CMAKE_SOURCE_DIR}/Crypto
${CMAKE_SOURCE_DIR}/.. ${CMAKE_SOURCE_DIR}/..
) )
@ -42,9 +42,11 @@ ${CMAKE_SOURCE_DIR}/Ini.cpp
${CMAKE_SOURCE_DIR}/Emu/* ${CMAKE_SOURCE_DIR}/Emu/*
${CMAKE_SOURCE_DIR}/Gui/* ${CMAKE_SOURCE_DIR}/Gui/*
${CMAKE_SOURCE_DIR}/Loader/* ${CMAKE_SOURCE_DIR}/Loader/*
${CMAKE_SOURCE_DIR}/Crypto/*
${CMAKE_SOURCE_DIR}/../Utilities/* ${CMAKE_SOURCE_DIR}/../Utilities/*
${CMAKE_SOURCE_DIR}/../scetool/scetool.cpp
) )
add_executable(rpcs3 ${RPCS3_SRC}) add_executable(rpcs3 ${RPCS3_SRC})
target_link_libraries(rpcs3 ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES} ${ZLIB_LIBRARIES} ${FFMPEG_LIBRARIES}) target_link_libraries(rpcs3 ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES} ${ZLIB_LIBRARIES} ${FFMPEG_LIBRARIES})

View File

@ -29,6 +29,7 @@
* http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf * http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf
*/ */
#include "stdafx.h"
#include "aes.h" #include "aes.h"
/* /*

878
rpcs3/Crypto/key_vault.cpp Normal file
View File

@ -0,0 +1,878 @@
#include "stdafx.h"
#include "key_vault.h"
KeyVault::KeyVault()
{
}
void KeyVault::LoadSelfLV0Keys()
{
sk_LV0_arr.Clear();
sk_LV0_arr.Move(
new SELF_KEY(0x0000000000000000, 0x0000, KEY_LV0,
"CA7A24EC38BDB45B98CCD7D363EA2AF0C326E65081E0630CB9AB2D215865878A",
"F9205F46F6021697E670F13DFA726212",
"A8FD6DB24532D094EFA08CB41C9A72287D905C6B27B42BE4AB925AAF4AFFF34D41EEB54DD128700D",
"001AD976FCDE86F5B8FF3E63EF3A7F94E861975BA3",
0x33));
}
void KeyVault::LoadSelfLDRKeys()
{
sk_LDR_arr.Clear();
sk_LDR_arr.Move(
new SELF_KEY(0x0000000000000000, 0x0000, KEY_LDR,
"C0CEFE84C227F75BD07A7EB846509F93B238E770DACB9FF4A388F812482BE21B",
"47EE7454E4774CC9B8960C7B59F4C14D",
"C2D4AAF319355019AF99D44E2B58CA29252C89123D11D6218F40B138CAB29B7101F3AEB72A975019",
"00C5B2BFA1A413DD16F26D31C0F2ED4720DCFB0670",
0x20));
}
void KeyVault::LoadSelfLV1Keys()
{
sk_LV1_arr.Clear();
sk_LV1_arr.Move(
new SELF_KEY(0x0003003000000000, 0x0000, KEY_LV1,
"B9F3F9E6107CFF2680A91E118C2403CF4A6F18F3C7EFD7D13D1AC4DB760BD222",
"B43661B9A79BAD9D8E2B046469CDA1E7",
"4C870BE86DDD996A92A3F7F404F33604244A1D02AB5B78BC9DAF030B78BE8867CF586171B7D45D20",
"002CC736C7AD06D264E9AB663EB1F35F5DC159248C",
0x33));
sk_LV1_arr.Move(
new SELF_KEY(0x0003004200000000, 0x0000, KEY_LV1,
"B880593856C8C6D2037585626A12977F50DCFCF3F132D2C89AA6E670EAFC1646",
"A79B05D4E37B8117A95E6E7C14FB640E",
"7454C7CCBFC2F66C142D78A730A3A6F973CC0FB75A46FCBB390790138910A0CAC78E5E21F4DA3375",
"00033A699FDD2DA6CDD6CCC03B2C6145F998706F74",
0x34));
sk_LV1_arr.Move(
new SELF_KEY(0x0003005000000000, 0x0000, KEY_LV1,
"1E8EEEA9E80A729F3FA52CF523B25941EA44B4155D94E5DADC5C5A77847620C7",
"E034D31A80316960024D1B3D3164FDC3",
"7E3A196f4A5879F3A7B091A2263F7C24E1716129B580566D308D9C2254B36AEE53DEF30EC85F8398",
"005815D17125D04C33790321DE29EB6241365100B5",
0x35));
sk_LV1_arr.Move(
new SELF_KEY(0x0003005500000000, 0x0000, KEY_LV1,
"53ABDF84BE08B0351B734F2B97D2BE1621BC6C889E4362E5C70F39D6C3ED9F23",
"44E652661AC7584DBE08ECB810FB5FC0",
"733198A7759BC07326755BC9773A8A17C8A7043C7BDAB83D88E230512E2EA3852D7DA4263A7E97F9",
"004312C65347ACBE95CC306442FEFD0AF4C2935EB3",
0x05));
sk_LV1_arr.Move(
new SELF_KEY(0x0003005600000000, 0x0000, KEY_LV1,
"48793EBDDA1AF65D737DA2FDA2DD104447A698F8A82CAAEE992831711BA94E83",
"15DCF3C67147A45D09DE7521EECA07A1",
"85A8868C320127F10B6598964C69221C086702021D31803520E21FDE4DBE827766BE41825CB7328C",
"",
0x07));
sk_LV1_arr.Move(
new SELF_KEY(0x0003006100000000, 0x0000, KEY_LV1,
"5FF17D836E2C4AD69476E2614F64BDD05B9115389A9A6D055B5B544B1C34E3D5",
"DF0F50EC3C4743C5B17839D7B49F24A4",
"1CDABE30833823F461CA534104115FFF60010B710631E435A7D915E82AE88EDE667264656CB7062E",
"",
0x05));
sk_LV1_arr.Move(
new SELF_KEY(0x0003006600000000, 0x0000, KEY_LV1,
"BD0621FA19383C3C72ECBC3B008F1CD55FFD7C3BB7510BF11AD0CF0FC2B70951",
"569AF3745E1E02E3E288273CDE244CD8",
"21E26F11C2D69478609DD1BD278CDFC940D90386455BA52FCD1FA7E27AC2AFA826C79A10193B625C",
"",
0x07));
sk_LV1_arr.Move(
new SELF_KEY(0x0003007400000000, 0x0000, KEY_LV1,
"41A6E0039041E9D8AAF4EF2F2A2971248EDBD96A3985611ED7B4CE73EE4804FE",
"C8C98D5A5CE23AF5607A352AECACB0DC",
"4389664390265F96C1A882374C0F856364E33DB09BE124A4666F9A12F0DD9C811EDD55BA21ED0667",
"",
0x12));
sk_LV1_arr.Move(
new SELF_KEY(0x0004001100000000, 0x0000, KEY_LV1,
"557EDF6C063F3272B0D44EEC12F418DA774815B5415597CC5F75C21E048BAD74",
"7144D7574937818517826227EF4AC0B4",
"085D38DBF9B757329EB862107929909D32FA1DAE60641BF4AC25319D7650597EE977F8E810FEEA96",
"",
0x13));
sk_LV1_arr.Move(
new SELF_KEY(0x0004005000000000, 0x0000, KEY_LV1,
"10CEA04973FCCC12EC19924510822D8D4C41F657FD3D7E73F415A8D687421BCD",
"ED8699562C6AC65204FA166257E7FCF4",
"9AF86FC869C159FBB62F7D9674EE257ABF12E5A96D5875B4AA73C13C2BC13E2A4079F98B9B935EE2",
"",
0x14));
}
void KeyVault::LoadSelfLV2Keys()
{
sk_LV2_arr.Clear();
sk_LV2_arr.Move(
new SELF_KEY(0x0003003000000000, 0x0000, KEY_LV2,
"94303F69513572AB5AE17C8C2A1839D2C24C28F65389D3BBB11894CE23E0798F",
"9769BFD187B90990AE5FEA4E110B9CF5",
"AFAF5E96AF396CBB69071082C46A8F34A030E8EDB799E0A7BE00AA264DFF3AEBF7923920D559404D",
"0070ABF9361B02291829D479F56AB248203CD3EB46",
0x20));
sk_LV2_arr.Move(
new SELF_KEY(0x0003004200000000, 0x0000, KEY_LV2,
"575B0A6C4B4F2760A03FE4189EBAF4D947279FD982B14070349098B08FF92C10",
"411CB18F460CE50CAF2C426D8F0D93C8",
"3FEE313954CB3039C321A7E33B97FFDEC8988A8B55759161B04DBF4731284E4A8191E3F17D32B0EA",
"0073076441A08CD179E5FACE349B86DA58B5B7BA78",
0x21));
sk_LV2_arr.Move(
new SELF_KEY(0x0003005000000000, 0x0000, KEY_LV2,
"6DBD48D787C58803A8D724DA5ACF04FF8FCE91D7545D2322F2B7ABF57014AF68",
"603A36213708520ED5D745DEC1325BA5",
"5888CB83AC3CCA9610BC173C53141C0CA58B93719E744660CA8823D5EAEE8F9BF736997054E4B7E3",
"0009EBC3DE442FA5FBF6C4F3D4F9EAB07778A142BD",
0x22));
sk_LV2_arr.Move(
new SELF_KEY(0x0003005500000000, 0x0000, KEY_LV2,
"84015E90FA23139628A3C75CC09714E6427B527A82D18ABC3E91CD8D7DDAFF17",
"5B240444D645F2038118F97FD5A145D5",
"B266318245266B2D33641CD8A864066D077FAC60B7E27399099A70A683454B70F9888E7CC0C2BF72",
"009D4CBA2BFB1A8330D3E20E59D281D476D231C73A",
0x32));
sk_LV2_arr.Move(
new SELF_KEY(0x0003005600000000, 0x0000, KEY_LV2,
"EAE15444048EFDE7A831BFA9F5D96F047C9FCFF50723E292CF50F5417D81E359",
"9CA9282DC7FA9F315EF3156D970B7CD4",
"0D58938CB47598A6A672874F1768068F8B80D8D17014D2ABEBAC85E5B0993D9FB6F307DDC3DDA699",
"",
0x33));
sk_LV2_arr.Move(
new SELF_KEY(0x0003006100000000, 0x0000, KEY_LV2,
"88AD367EDEC2FEED3E2F99B1C685075C41BDEC90C84F526CAF588F89BBD1CBCC",
"8D18E8E525230E63DE10291C9DD615BF",
"86EED1D65E58890ABDA9ACA486A2BDDB9C0A529C2053FAE301F0F698EAF443DA0F60595A597A7027",
"",
0x32));
sk_LV2_arr.Move(
new SELF_KEY(0x0003006600000000, 0x0000, KEY_LV2,
"688D5FCAC6F4EA35AC6AC79B10506007286131EE038116DB8AA2C0B0340D9FB0",
"75E0239D18B0B669EAE650972F99726B",
"008E1C820AC567D1BFB8FE3CC6AD2E1845A1D1B19ED2E18B18CA34A8D28A83EC60C63859CDB3DACA",
"",
0x33));
sk_LV2_arr.Move(
new SELF_KEY(0x0003007400000000, 0x0000, KEY_LV2,
"E81C5B04C29FB079A4A2687A39D4EA97BFB49D80EF546CEB292979A5F77A6254",
"15058FA7F2CAD7C528B5F605F6444EB0",
"438D0E5C1E7AFB18234DB6867472FF5F52B750F30C379C7DD1EE0FD23E417B3EA819CC01BAC480ED",
"",
0x11));
sk_LV2_arr.Move(
new SELF_KEY(0x0004001100000000, 0x0000, KEY_LV2,
"A1E4B86ED02BF7F1372A2C73FE02BC738907EB37CE3BA605FE783C999FAFDB97",
"BBE7799B9A37CB272E386618FDFD4AEC",
"5B31A8E2A663EBD673196E2E1022E0D64988C4E1BBFE5E474415883A3BA0D9C562A2BE9C30E9B4A8",
"",
0x07));
sk_LV2_arr.Move(
new SELF_KEY(0x0004005000000000, 0x0000, KEY_LV2,
"0CAF212B6FA53C0DA7E2C575ADF61DBE68F34A33433B1B891ABF5C4251406A03",
"9B79374722AD888EB6A35A2DF25A8B3E",
"1034A6F98AF6625CC3E3604B59B971CA617DF337538D2179EBB22F3BDC9D0C6DA56BA7DDFD205A50",
"",
0x14));
}
void KeyVault::LoadSelfISOKeys()
{
sk_ISO_arr.Clear();
sk_ISO_arr.Move(
new SELF_KEY(0x0003003000000000, 0x0001, KEY_ISO,
"8860D0CFF4D0DC688D3223321B96B59A777E6914961488E07048DAECB020ECA4",
"C82D015D46CF152F1DD0C16F18B5B1E5",
"733918D7C888130509346E6B4A8B6CAA357AB557E814E8122BF102C14A314BF9475B9D70EAF9EC29",
"009BE892E122A5C943C1BB7403A67318AA9E1B286F",
0x36));
sk_ISO_arr.Move(
new SELF_KEY(0x0003004200000000, 0x0001, KEY_ISO,
"101E27F3FA2FB53ACA924F783AD553162D56B975D05B81351A1111799F20254D",
"8D2E9C6297B8AD252998458296AC773C",
"138446EE0BDDA5638F97328C8956E6489CBBFE57C5961D40DD5C43BB4138F1C400A8B27204A5D625",
"00849DBC57D3B92F01864E6E82EB4EF0EF6311E122",
0x32));
sk_ISO_arr.Move(
new SELF_KEY(0x0003005000000000, 0x0001, KEY_ISO,
"3F2604FA27AEADFBE1AC69EB00BB16EF196C2193CBD62900FFD8C25041680843",
"A414AC1DB7987E43777651B330B899E1",
"1F4633AFDE18614D6CEF38A2FD6C4CCAC7B6EB8109D72CD066ECEBA0193EA3F43C37AE83179A4E5F",
"0085B4B05DEBA7E6AD831653C974D95149803BB272",
0x33));
sk_ISO_arr.Move(
new SELF_KEY(0x0003005500000000, 0x0001, KEY_ISO,
"BDB74AA6E3BA2DC10B1BD7F17198399A158DBE1FA0BEA68C90FCACBE4D04BE37",
"0207A479B1574F8E7F697528F05D5435",
"917E1F1DC48A54EB5F10B38E7569BB5383628A7C906F0DCA62FDA33805C15FAB270016940A09DB58",
"00294411363290975BA551336D3965D88AF029A17B",
0x03));
sk_ISO_arr.Move(
new SELF_KEY(0x0003005600000000, 0x0001, KEY_ISO,
"311C015F169F2A1E0757F7064B14C7C9F3A3FFEE015BD4E3A22401A2667857CE",
"7BB8B3F5AC8E0890E3148AE5688C7350",
"3F040EFA2335FED5670BA4D5C3AB2D9D0B4BA69D154A0062EA995A7D21DBAF0DC5A0DAD333D1C1DD",
"",
0x08));
sk_ISO_arr.Move(
new SELF_KEY(0x0003006100000000, 0x0001, KEY_ISO,
"8474ADCA3B3244931EECEB9357841442442A1C4A4BCF4E498E6738950F4E4093",
"FFF9CACCC4129125CAFB240F419E5F39",
"098E1A53E59A95316B00D5A29C05FFEBAE41D1A8A386F9DA96F98858FD25E07BB7A3BC96A5D5B556",
"",
0x03));
sk_ISO_arr.Move(
new SELF_KEY(0x0003006600000000, 0x0001, KEY_ISO,
"E6A21C599B75696C169EC02582BDA74A776134A6E05108EA701EC0CA2AC03592",
"D292A7BD57C0BB2EABBCA1252FA9EDEF",
"2ED078A13DC4617EB550AD06E228C83C142A2D588EB5E729402D18038A14842FD65B277DCAD225A5",
"",
0x08));
sk_ISO_arr.Move(
new SELF_KEY(0x0003007400000000, 0x0001, KEY_ISO,
"072D3A5C3BDB0D674DE209381432B20414BC9BDA0F583ECB94BD9A134176DD51",
"8516A81F02CF938740498A406C880871",
"5A778DEB5C4F12E8D48E06A2BBBBE3C90FA8C6C47DF9BDB5697FD4A8EB7941CE3F59A557E81C787D",
"",
0x21));
sk_ISO_arr.Move(
new SELF_KEY(0x0003007400000000, 0x0100, KEY_ISO,
"786FAB8A0B89474A2CB80B3EA104CCCB9E13F66B45EC499BB31865D07C661EA8",
"94662F13D99A9F5D211C979FFDF65FE3",
"912C94C252B7799CEB45DFBB73EF7CAD9BCC0793A3331BBB79E3C47C0F5C782F698065A8D4DB0D8B",
"",
0x0E));
sk_ISO_arr.Move(
new SELF_KEY(0x0004001100000000, 0x0001, KEY_ISO,
"4262657A3185D9480F82C8BD2F81766FCC2C8FD7DD5EBE8657B00B939E0C75BD",
"4F1E3EF07D893A4714B1B3D5A4E50479",
"4DBFCFA68B52F1D66E09AFA6C18EC65479EDBD027B6B8C6A5D85FE5C84D43EA40CEF1672078A0702",
"",
0x11));
sk_ISO_arr.Move(
new SELF_KEY(0x0004001100000000, 0x0100, KEY_ISO,
"16AA7D7C35399E2B1BFAF68CD19D7512A7855029C08BECC4CC3F035DF7F9C70B",
"0E50DB6D937D262CB0499136852FCB80",
"AEE2795BF295662A50DFAFE70D1B0B6F0A2EBB211E1323A275FC6E2D13BE4F2F10CA34784F4CF1EC",
"",
0x0F));
sk_ISO_arr.Move(
new SELF_KEY(0x0004005000000000, 0x0001, KEY_ISO,
"63565DBE98C3B1A52AADC907C47130FE57A10734E84F22592670F86ED2B0A086",
"953F6A99891B4739358F5363A00C08B9",
"26BE7B02E7D65C6C21BF4063CDB8C0092FE1679D62FA1A8CCC284A1D21885473A959992537A06612",
"",
0x15));
sk_ISO_arr.Move(
new SELF_KEY(0x0004005000000000, 0x0100, KEY_ISO,
"B96EA32CB96EA32DB96EA32CB96EA32CB96EA32CB96EA32DB96EA32CB96EA32C",
"B96EA32CB96EA32DB96EA32DB96EA32C",
"2D7066E68C6AC3373B1346FD76FE7D18A207C811500E65D85DB57BC4A27AD78F59FD53F38F50E151",
"0044AA25B4276D79B494A29CB8DE104642424F8EEF",
0x02));
}
void KeyVault::LoadSelfAPPKeys()
{
sk_APP_arr.Clear();
sk_APP_arr.Move(
new SELF_KEY(0x0000009200000000, 0x0000, KEY_APP,
"95F50019E7A68E341FA72EFDF4D60ED376E25CF46BB48DFDD1F080259DC93F04",
"4A0955D946DB70D691A640BB7FAECC4C",
"6F8DF8EBD0A1D1DB08B30DD3A951E3F1F27E34030B42C729C55555232D61B834B8BDFFB07E54B343",
"006C3E4CCB2C69A5AD7C6F60448E50C7F9184EEAF4",
0x21));
sk_APP_arr.Move(
new SELF_KEY(0x0003003000000000, 0x0001, KEY_APP,
"79481839C406A632BDB4AC093D73D99AE1587F24CE7E69192C1CD0010274A8AB",
"6F0F25E1C8C4B7AE70DF968B04521DDA",
"94D1B7378BAFF5DFED269240A7A364ED68446741622E50BC6079B6E606A2F8E0A4C56E5CFF836526",
"003DE80167D2F0E9D30F2145144A558D1174F5410C",
0x11));
sk_APP_arr.Move(
new SELF_KEY(0x0003003000000000, 0x0002, KEY_APP,
"4F89BE98DDD43CAD343F5BA6B1A133B0A971566F770484AAC20B5DD1DC9FA06A",
"90C127A9B43BA9D8E89FE6529E25206F",
"8CA6905F46148D7D8D84D2AFCEAE61B41E6750FC22EA435DFA61FCE6F4F860EE4F54D9196CA5290E",
"",
0x13));
sk_APP_arr.Move(
new SELF_KEY(0x0003003000000000, 0x0003, KEY_APP,
"C1E6A351FCED6A0636BFCB6801A0942DB7C28BDFC5E0A053A3F52F52FCE9754E",
"E0908163F457576440466ACAA443AE7C",
"50022D5D37C97905F898E78E7AA14A0B5CAAD5CE8190AE5629A10D6F0CF4173597B37A95A7545C92",
"",
0x0B));
sk_APP_arr.Move(
new SELF_KEY(0x0003004200000000, 0x0004, KEY_APP,
"838F5860CF97CDAD75B399CA44F4C214CDF951AC795298D71DF3C3B7E93AAEDA",
"7FDBB2E924D182BB0D69844ADC4ECA5B",
"1F140E8EF887DAB52F079A06E6915A6460B75CD256834A43FA7AF90C23067AF412EDAFE2C1778D69",
"0074E922FDEE5DC4CDF22FC8D7986477F813400860",
0x14));
sk_APP_arr.Move(
new SELF_KEY(0x0003004200000000, 0x0005, KEY_APP,
"C109AB56593DE5BE8BA190578E7D8109346E86A11088B42C727E2B793FD64BDC",
"15D3F191295C94B09B71EBDE088A187A",
"B6BB0A84C649A90D97EBA55B555366F52381BB38A84C8BB71DA5A5A0949043C6DB249029A43156F7",
"",
0x15));
sk_APP_arr.Move(
new SELF_KEY(0x0003004200000000, 0x0006, KEY_APP,
"6DFD7AFB470D2B2C955AB22264B1FF3C67F180983B26C01615DE9F2ECCBE7F41",
"24BD1C19D2A8286B8ACE39E4A37801C2",
"71F46AC33FF89DF589A100A7FB64CEAC244C9A0CBBC1FDCE80FB4BF8A0D2E66293309CB8EE8CFA95",
"",
0x2C));
sk_APP_arr.Move(
new SELF_KEY(0x0003005000000000, 0x0007, KEY_APP,
"945B99C0E69CAF0558C588B95FF41B232660ECB017741F3218C12F9DFDEEDE55",
"1D5EFBE7C5D34AD60F9FBC46A5977FCE",
"AB284CA549B2DE9AA5C903B75652F78D192F8F4A8F3CD99209415C0A84C5C9FD6BF3095C1C18FFCD",
"002CF896D35DB871D0E6A252E799876A70D043C23E",
0x15));
sk_APP_arr.Move(
new SELF_KEY(0x0003005000000000, 0x0008, KEY_APP,
"2C9E8969EC44DFB6A8771DC7F7FDFBCCAF329EC3EC070900CABB23742A9A6E13",
"5A4CEFD5A9C3C093D0B9352376D19405",
"6E82F6B54A0E9DEBE4A8B3043EE3B24CD9BBB62B4416B0482582E419A2552E29AB4BEA0A4D7FA2D5",
"",
0x16));
sk_APP_arr.Move(
new SELF_KEY(0x0003005000000000, 0x0009, KEY_APP,
"F69E4A2934F114D89F386CE766388366CDD210F1D8913E3B973257F1201D632B",
"F4D535069301EE888CC2A852DB654461",
"1D7B974D10E61C2ED087A0981535904677EC07E96260F89565FF7EBDA4EE035C2AA9BCBDD5893F99",
"",
0x2D));
sk_APP_arr.Move(
new SELF_KEY(0x0003005500000000, 0x000A, KEY_APP,
"29805302E7C92F204009161CA93F776A072141A8C46A108E571C46D473A176A3",
"5D1FAB844107676ABCDFC25EAEBCB633",
"09301B6436C85B53CB1585300A3F1AF9FB14DB7C30088C4642AD66D5C148B8995BB1A698A8C71827",
"0010818ED8A666051C6198662C3D6DDE2CA4901DDC",
0x25));
sk_APP_arr.Move(
new SELF_KEY(0x0003005500000000, 0x000B, KEY_APP,
"A4C97402CC8A71BC7748661FE9CE7DF44DCE95D0D58938A59F47B9E9DBA7BFC3",
"E4792F2B9DB30CB8D1596077A13FB3B5",
"2733C889D289550FE00EAA5A47A34CEF0C1AF187610EB07BA35D2C09BB73C80B244EB4147700D1BF",
"",
0x26));
sk_APP_arr.Move(
new SELF_KEY(0x0003005500000000, 0x000C, KEY_APP,
"9814EFFF67B7074D1B263BF85BDC8576CE9DEC914123971B169472A1BC2387FA",
"D43B1FA8BE15714B3078C23908BB2BCA",
"7D1986C6BEE6CE1E0C5893BD2DF203881F40D5056761CC3F1F2E9D9A378617A2DE40BA5F09844CEB",
"",
0x3D));
sk_APP_arr.Move(
new SELF_KEY(0x0003005600000000, 0x000D, KEY_APP,
"03B4C421E0C0DE708C0F0B71C24E3EE04306AE7383D8C5621394CCB99FF7A194",
"5ADB9EAFE897B54CB1060D6885BE22CF",
"71502ADB5783583AB88B2D5F23F419AF01C8B1E72FCA1E694AD49FE3266F1F9C61EFC6F29B351142",
"",
0x12));
sk_APP_arr.Move(
new SELF_KEY(0x0003005600000000, 0x000E, KEY_APP,
"39A870173C226EB8A3EEE9CA6FB675E82039B2D0CCB22653BFCE4DB013BAEA03",
"90266C98CBAA06C1BF145FF760EA1B45",
"84DE5692809848E5ACBE25BE548F6981E3DB14735A5DDE1A0FD1F475866532B862B1AB6A004B7255",
"",
0x27));
sk_APP_arr.Move(
new SELF_KEY(0x0003005600000000, 0x000F, KEY_APP,
"FD52DFA7C6EEF5679628D12E267AA863B9365E6DB95470949CFD235B3FCA0F3B",
"64F50296CF8CF49CD7C643572887DA0B",
"0696D6CCBD7CF585EF5E00D547503C185D7421581BAD196E081723CD0A97FA40B2C0CD2492B0B5A1",
"",
0x3A));
sk_APP_arr.Move(
new SELF_KEY(0x0003006100000000, 0x0010, KEY_APP,
"A5E51AD8F32FFBDE808972ACEE46397F2D3FE6BC823C8218EF875EE3A9B0584F",
"7A203D5112F799979DF0E1B8B5B52AA4",
"50597B7F680DD89F6594D9BDC0CBEE03666AB53647D0487F7F452FE2DD02694631EA755548C9E934",
"",
0x25));
sk_APP_arr.Move(
new SELF_KEY(0x0003006100000000, 0x0011, KEY_APP,
"0F8EAB8884A51D092D7250597388E3B8B75444AC138B9D36E5C7C5B8C3DF18FD",
"97AF39C383E7EF1C98FA447C597EA8FE",
"2FDA7A56AAEA65921C0284FF1942C6DE137370093D106034B59191951A5201B422D462F8726F852D",
"",
0x26));
sk_APP_arr.Move(
new SELF_KEY(0x0003006600000000, 0x0013, KEY_APP,
"DBF62D76FC81C8AC92372A9D631DDC9219F152C59C4B20BFF8F96B64AB065E94",
"CB5DD4BE8CF115FFB25801BC6086E729",
"B26FE6D3E3A1E766FAE79A8E6A7F48998E7FC1E4B0AD8745FF54C018C2A6CC7A0DD7525FAFEA4917",
"",
0x12));
sk_APP_arr.Move(
new SELF_KEY(0x0003006600000000, 0x0014, KEY_APP,
"491B0D72BB21ED115950379F4564CE784A4BFAABB00E8CB71294B192B7B9F88E",
"F98843588FED8B0E62D7DDCB6F0CECF4",
"04275E8838EF95BD013B223C3DF674540932F21B534C7ED2944B9104D938FEB03B824DDB866AB26E",
"",
0x27));
sk_APP_arr.Move(
new SELF_KEY(0x0003007400000000, 0x0016, KEY_APP,
"A106692224F1E91E1C4EBAD4A25FBFF66B4B13E88D878E8CD072F23CD1C5BF7C",
"62773C70BD749269C0AFD1F12E73909E",
"566635D3E1DCEC47243AAD1628AE6B2CEB33463FC155E4635846CE33899C5E353DDFA47FEF5694AF",
"",
0x30));
sk_APP_arr.Move(
new SELF_KEY(0x0003007400000000, 0x0017, KEY_APP,
"4E104DCE09BA878C75DA98D0B1636F0E5F058328D81419E2A3D22AB0256FDF46",
"954A86C4629E116532304A740862EF85",
"3B7B04C71CAE2B1199D57453C038BB1B541A05AD1B94167B0AB47A9B24CAECB9000CB21407009666",
"",
0x08));
sk_APP_arr.Move(
new SELF_KEY(0x0003007400000000, 0x0018, KEY_APP,
"1F876AB252DDBCB70E74DC4A20CD8ED51E330E62490E652F862877E8D8D0F997",
"BF8D6B1887FA88E6D85C2EDB2FBEC147",
"64A04126D77BF6B4D686F6E8F87DD150A5B014BA922D2B694FFF4453E11239A6E0B58F1703C51494",
"",
0x11));
sk_APP_arr.Move(
new SELF_KEY(0x0004001100000000, 0x0019, KEY_APP,
"3236B9937174DF1DC12EC2DD8A318A0EA4D3ECDEA5DFB4AC1B8278447000C297",
"6153DEE781B8ADDC6A439498B816DC46",
"148DCA961E2738BAF84B2D1B6E2DA2ABD6A95F2C9571E54C6922F9ED9674F062B7F1BE5BD6FA5268",
"",
0x31));
sk_APP_arr.Move(
new SELF_KEY(0x0004001100000000, 0x001A, KEY_APP,
"5EFD1E9961462794E3B9EF2A4D0C1F46F642AAE053B5025504130590E66F19C9",
"1AC8FA3B3C90F8FDE639515F91B58327",
"BE4B1B513536960618BFEF12A713F6673881B02F9DC616191E823FC8337CCF99ADAA6172019C0C23",
"",
0x17));
sk_APP_arr.Move(
new SELF_KEY(0x0004001100000000, 0x001B, KEY_APP,
"66637570D1DEC098467DB207BAEA786861964D0964D4DBAF89E76F46955D181B",
"9F7B5713A5ED59F6B35CD8F8A165D4B8",
"4AB6FB1F6F0C3D9219923C1AC683137AB05DF667833CC6A5E8F590E4E28FE2EB180C7D5861117CFB",
"",
0x12));
sk_APP_arr.Move(
new SELF_KEY(0x0004004600000000, 0x001C, KEY_APP,
"CFF025375BA0079226BE01F4A31F346D79F62CFB643CA910E16CF60BD9092752",
"FD40664E2EBBA01BF359B0DCDF543DA4",
"36C1ACE6DD5CCC0006FDF3424750FAC515FC5CFA2C93EC53C6EC2BC421708D154E91F2E7EA54A893",
"",
0x09));
sk_APP_arr.Move(
new SELF_KEY(0x0004004600000000, 0x001D, KEY_APP,
"D202174EB65A62048F3674B59EF6FE72E1872962F3E1CD658DE8D7AF71DA1F3E",
"ACB9945914EBB7B9A31ECE320AE09F2D",
"430322887503CF52928FAAA410FD623C7321281C8825D95F5B47EF078EFCFC44454C3AB4F00BB879",
"",
0x1A));
}
void KeyVault::LoadSelfNPDRMKeys()
{
sk_NPDRM_arr.Clear();
sk_NPDRM_arr.Move(
new SELF_KEY(0x0001000000000000, 0x0001, KEY_NPDRM,
"F9EDD0301F770FABBA8863D9897F0FEA6551B09431F61312654E28F43533EA6B",
"A551CCB4A42C37A734A2B4F9657D5540",
"B05F9DA5F9121EE4031467E74C505C29A8E29D1022379EDFF0500B9AE480B5DAB4578A4C61C5D6BF",
"00040AB47509BED04BD96521AD1B365B86BF620A98",
0x11));
sk_NPDRM_arr.Move(
new SELF_KEY(0x0001000000000000, 0x0002, KEY_NPDRM,
"8E737230C80E66AD0162EDDD32F1F774EE5E4E187449F19079437A508FCF9C86",
"7AAECC60AD12AED90C348D8C11D2BED5",
"05BF09CB6FD78050C78DE69CC316FF27C9F1ED66A45BFCE0A1E5A6749B19BD546BBB4602CF373440",
"",
0x0A));
sk_NPDRM_arr.Move(
new SELF_KEY(0x0003003000000000, 0x0003, KEY_NPDRM,
"1B715B0C3E8DC4C1A5772EBA9C5D34F7CCFE5B82025D453F3167566497239664",
"E31E206FBB8AEA27FAB0D9A2FFB6B62F",
"3F51E59FC74D6618D34431FA67987FA11ABBFACC7111811473CD9988FE91C43FC74605E7B8CB732D",
"",
0x08));
sk_NPDRM_arr.Move(
new SELF_KEY(0x0003004200000000, 0x0004, KEY_NPDRM,
"BB4DBF66B744A33934172D9F8379A7A5EA74CB0F559BB95D0E7AECE91702B706",
"ADF7B207A15AC601110E61DDFC210AF6",
"9C327471BAFF1F877AE4FE29F4501AF5AD6A2C459F8622697F583EFCA2CA30ABB5CD45D1131CAB30",
"00B61A91DF4AB6A9F142C326BA9592B5265DA88856",
0x16));
sk_NPDRM_arr.Move(
new SELF_KEY(0x0003004200000000, 0x0006, KEY_NPDRM,
"8B4C52849765D2B5FA3D5628AFB17644D52B9FFEE235B4C0DB72A62867EAA020",
"05719DF1B1D0306C03910ADDCE4AF887",
"2A5D6C6908CA98FC4740D834C6400E6D6AD74CF0A712CF1E7DAE806E98605CC308F6A03658F2970E",
"",
0x29));
sk_NPDRM_arr.Move(
new SELF_KEY(0x0003005000000000, 0x0007, KEY_NPDRM,
"3946DFAA141718C7BE339A0D6C26301C76B568AEBC5CD52652F2E2E0297437C3",
"E4897BE553AE025CDCBF2B15D1C9234E",
"A13AFE8B63F897DA2D3DC3987B39389DC10BAD99DFB703838C4A0BC4E8BB44659C726CFD0CE60D0E",
"009EF86907782A318D4CC3617EBACE2480E73A46F6",
0x17));
sk_NPDRM_arr.Move(
new SELF_KEY(0x0003005000000000, 0x0009, KEY_NPDRM,
"0786F4B0CA5937F515BDCE188F569B2EF3109A4DA0780A7AA07BD89C3350810A",
"04AD3C2F122A3B35E804850CAD142C6D",
"A1FE61035DBBEA5A94D120D03C000D3B2F084B9F4AFA99A2D4A588DF92B8F36327CE9E47889A45D0",
"",
0x2A));
sk_NPDRM_arr.Move(
new SELF_KEY(0x0003005500000000, 0x000A, KEY_NPDRM,
"03C21AD78FBB6A3D425E9AAB1298F9FD70E29FD4E6E3A3C151205DA50C413DE4",
"0A99D4D4F8301A88052D714AD2FB565E",
"3995C390C9F7FBBAB124A1C14E70F9741A5E6BDF17A605D88239652C8EA7D5FC9F24B30546C1E44B",
"009AC6B22A056BA9E0B6D1520F28A57A3135483F9F",
0x27));
sk_NPDRM_arr.Move(
new SELF_KEY(0x0003005500000000, 0x000C, KEY_NPDRM,
"357EBBEA265FAEC271182D571C6CD2F62CFA04D325588F213DB6B2E0ED166D92",
"D26E6DD2B74CD78E866E742E5571B84F",
"00DCF5391618604AB42C8CFF3DC304DF45341EBA4551293E9E2B68FFE2DF527FFA3BE8329E015E57",
"",
0x3A));
sk_NPDRM_arr.Move(
new SELF_KEY(0x0003005600000000, 0x000D, KEY_NPDRM,
"337A51416105B56E40D7CAF1B954CDAF4E7645F28379904F35F27E81CA7B6957",
"8405C88E042280DBD794EC7E22B74002",
"9BFF1CC7118D2393DE50D5CF44909860683411A532767BFDAC78622DB9E5456753FE422CBAFA1DA1",
"",
0x18));
sk_NPDRM_arr.Move(
new SELF_KEY(0x0003005600000000, 0x000F, KEY_NPDRM,
"135C098CBE6A3E037EBE9F2BB9B30218DDE8D68217346F9AD33203352FBB3291",
"4070C898C2EAAD1634A288AA547A35A8",
"BBD7CCCB556C2EF0F908DC7810FAFC37F2E56B3DAA5F7FAF53A4944AA9B841F76AB091E16B231433",
"",
0x3B));
sk_NPDRM_arr.Move(
new SELF_KEY(0x0003006100000000, 0x0010, KEY_NPDRM,
"4B3CD10F6A6AA7D99F9B3A660C35ADE08EF01C2C336B9E46D1BB5678B4261A61",
"C0F2AB86E6E0457552DB50D7219371C5",
"64A5C60BC2AD18B8A237E4AA690647E12BF7A081523FAD4F29BE89ACAC72F7AB43C74EC9AFFDA213",
"",
0x27));
sk_NPDRM_arr.Move(
new SELF_KEY(0x0003006600000000, 0x0013, KEY_NPDRM,
"265C93CF48562EC5D18773BEB7689B8AD10C5EB6D21421455DEBC4FB128CBF46",
"8DEA5FF959682A9B98B688CEA1EF4A1D",
"9D8DB5A880608DC69717991AFC3AD5C0215A5EE413328C2ABC8F35589E04432373DB2E2339EEF7C8",
"",
0x18));
sk_NPDRM_arr.Move(
new SELF_KEY(0x0003007400000000, 0x0016, KEY_NPDRM,
"7910340483E419E55F0D33E4EA5410EEEC3AF47814667ECA2AA9D75602B14D4B",
"4AD981431B98DFD39B6388EDAD742A8E",
"62DFE488E410B1B6B2F559E4CB932BCB78845AB623CC59FDF65168400FD76FA82ED1DC60E091D1D1",
"",
0x25));
sk_NPDRM_arr.Move(
new SELF_KEY(0x0004001100000000, 0x0019, KEY_NPDRM,
"FBDA75963FE690CFF35B7AA7B408CF631744EDEF5F7931A04D58FD6A921FFDB3",
"F72C1D80FFDA2E3BF085F4133E6D2805",
"637EAD34E7B85C723C627E68ABDD0419914EBED4008311731DD87FDDA2DAF71F856A70E14DA17B42",
"",
0x24));
sk_NPDRM_arr.Move(
new SELF_KEY(0x0004004600000000, 0x001C, KEY_NPDRM,
"8103EA9DB790578219C4CEDF0592B43064A7D98B601B6C7BC45108C4047AA80F",
"246F4B8328BE6A2D394EDE20479247C5",
"503172C9551308A87621ECEE90362D14889BFED2CF32B0B3E32A4F9FE527A41464B735E1ADBC6762",
"",
0x30));
}
void KeyVault::LoadSelfUNK7Keys()
{
sk_UNK7_arr.Clear();
sk_UNK7_arr.Move(
new SELF_KEY(0x0003003000000000, 0x0000, KEY_UNK7,
"D91166973979EA8694476B011AC62C7E9F37DA26DE1E5C2EE3D66E42B8517085",
"DC01280A6E46BC674B81A7E8801EBE6E",
"A0FC44108236141BF3517A662B027AFC1AC513A05690496C754DEB7D43BDC41B80FD75C212624EE4",
"",
0x11));
sk_UNK7_arr.Move(
new SELF_KEY(0x0003004200000000, 0x0000, KEY_UNK7,
"B73111B0B00117E48DE5E2EE5E534C0F0EFFA4890BBB8CAD01EE0F848F91583E",
"86F56F9E5DE513894874B8BA253334B1",
"B0BA1A1AB9723BB4E87CED9637BE056066BC56E16572D43D0210A06411DBF8FEB8885CD912384AE5",
"",
0x12));
sk_UNK7_arr.Move(
new SELF_KEY(0x0003005000000000, 0x0000, KEY_UNK7,
"8E944267C02E69A4FE474B7F5FCD7974A4F936FF4355AEC4F80EFA123858D8F6",
"908A75754E521EAC2F5A4889C6D7B72D",
"91201DA7D79E8EE2563142ECBD646DA026C963AC09E760E5390FFE24DAE6864310ABE147F8204D0B",
"",
0x13));
sk_UNK7_arr.Move(
new SELF_KEY(0x0003005500000000, 0x0000, KEY_UNK7,
"BB31DF9A6F62C0DF853075FAA65134D9CE2240306C1731D1F7DA9B5329BD699F",
"263057225873F83940A65C8C926AC3E4",
"BC3A82A4F44C43A197070CD236FDC94FCC542D69A3E803E0AFF78D1F3DA19A79D2F61FAB5B94B437",
"",
0x23));
sk_UNK7_arr.Move(
new SELF_KEY(0x0003005600000000, 0x0000, KEY_UNK7,
"71AA75C70A255580E4AE9BDAA0B08828C53EAA713CD0713797F143B284C1589B",
"9DED878CB6BA07121C0F50E7B172A8BF",
"387FCDAEAFF1B59CFAF79CE6215A065ACEAFFAF4048A4F217E1FF5CE67C66EC3F089DB235E52F9D3",
"",
0x29));
sk_UNK7_arr.Move(
new SELF_KEY(0x0003006100000000, 0x0000, KEY_UNK7,
"F5D1DBC182F5083CD4EA37C431C7DAC73882C07F232D2699B1DD9FDDF1BF4195",
"D3A7C3C91CBA014FCBCA6D5570DE13FF",
"97CA8A9781F45E557E98F176EF794FCDA6B151EB3DFD1ABA12151E00AE59957C3B15628FC8875D28",
"",
0x23));
sk_UNK7_arr.Move(
new SELF_KEY(0x0003006600000000, 0x0000, KEY_UNK7,
"BF10F09590C0152F7EF749FF4B990122A4E8E5491DA49A2D931E72EEB990F860",
"22C19C5522F7A782AFC547C2640F5BDE",
"3233BA2B284189FB1687DF653002257A0925D8EB0C64EBBE8CC7DE87F548D107DE1FD3D1D285DB4F",
"",
0x29));
sk_UNK7_arr.Move(
new SELF_KEY(0x0003007400000000, 0x0000, KEY_UNK7,
"F11DBD2C97B32AD37E55F8E743BC821D3E67630A6784D9A058DDD26313482F0F",
"FC5FA12CA3D2D336C4B8B425D679DA55",
"19E27EE90E33EDAB16B22E688B5F704E5C6EC1062070EBF43554CD03DFDAE16D684BB8B5574DBECA",
"",
0x15));
sk_UNK7_arr.Move(
new SELF_KEY(0x0004001100000000, 0x0000, KEY_UNK7,
"751EE949CD3ADF50A469197494A1EC358409CCBE6E85217EBDE7A87D3FF1ABD8",
"23AE4ADA4D3F798DC5ED98000337FF77",
"1BABA87CD1AD705C462D4E7427B6DAF59A50383A348A15088F0EDFCF1ADF2B5C2B2D507B2A357D36",
"",
0x1A));
sk_UNK7_arr.Move(
new SELF_KEY(0x0004004600000000, 0x0000, KEY_UNK7,
"46BD0891224E0CE13E2162921D4BB76193AEEE4416A729FCDD111C5536BF87C9",
"BF036387CDB613C0AC88A6D9D2CC5316",
"A14F6D5F9AD7EBB3B7A39A7C32F13E5DC3B0BA16BDC33D39FDDF88F4AEEA6CFEEB0C0796C917A952",
"",
0x0F));
}
SELF_KEY KeyVault::GetSelfLV0Key()
{
return sk_LV0_arr[0];
}
SELF_KEY KeyVault::GetSelfLDRKey()
{
return sk_LDR_arr[0];
}
SELF_KEY KeyVault::GetSelfLV1Key(u64 version)
{
SELF_KEY key(0, 0, 0, "", "", "", "", 0);
for(int i = 0; i < sk_LV1_arr.GetCount(); i++)
{
if (sk_LV1_arr[i].version == version)
{
key = sk_LV1_arr[i];
break;
}
}
return key;
}
SELF_KEY KeyVault::GetSelfLV2Key(u64 version)
{
SELF_KEY key(0, 0, 0, "", "", "", "", 0);
for(int i = 0; i < sk_LV2_arr.GetCount(); i++)
{
if (sk_LV2_arr[i].version == version)
{
key = sk_LV2_arr[i];
break;
}
}
return key;
}
SELF_KEY KeyVault::GetSelfISOKey(u16 revision, u64 version)
{
SELF_KEY key(0, 0, 0, "", "", "", "", 0);
for(int i = 0; i < sk_ISO_arr.GetCount(); i++)
{
if ((sk_ISO_arr[i].version == version) &&
(sk_ISO_arr[i].revision == revision))
{
key = sk_ISO_arr[i];
break;
}
}
return key;
}
SELF_KEY KeyVault::GetSelfAPPKey(u16 revision)
{
SELF_KEY key(0, 0, 0, "", "", "", "", 0);
for(int i = 0; i < sk_APP_arr.GetCount(); i++)
{
if (sk_APP_arr[i].revision == revision)
{
key = sk_APP_arr[i];
break;
}
}
return key;
}
SELF_KEY KeyVault::GetSelfUNK7Key(u64 version)
{
SELF_KEY key(0, 0, 0, "", "", "", "", 0);
for(int i = 0; i < sk_UNK7_arr.GetCount(); i++)
{
if (sk_UNK7_arr[i].version == version)
{
key = sk_UNK7_arr[i];
break;
}
}
return key;
}
SELF_KEY KeyVault::GetSelfNPDRMKey(u16 revision)
{
SELF_KEY key(0, 0, 0, "", "", "", "", 0);
for(int i = 0; i < sk_NPDRM_arr.GetCount(); i++)
{
if (sk_NPDRM_arr[i].revision == revision)
{
key = sk_NPDRM_arr[i];
break;
}
}
return key;
}
SELF_KEY KeyVault::FindSelfKey(u32 type, u16 revision, u64 version)
{
// Empty key.
SELF_KEY key(0, 0, 0, "", "", "", "", 0);
// Check SELF type.
switch (type)
{
case KEY_LV0:
LoadSelfLV0Keys();
key = GetSelfLV0Key();
break;
case KEY_LV1:
LoadSelfLV1Keys();
key = GetSelfLV1Key(version);
break;
case KEY_LV2:
LoadSelfLV2Keys();
key = GetSelfLV2Key(version);
break;
case KEY_APP:
LoadSelfAPPKeys();
key = GetSelfAPPKey(revision);
break;
case KEY_ISO:
LoadSelfISOKeys();
key = GetSelfISOKey(revision, version);
break;
case KEY_LDR:
LoadSelfLDRKeys();
key = GetSelfLDRKey();
break;
case KEY_UNK7:
LoadSelfUNK7Keys();
key = GetSelfUNK7Key(version);
break;
case KEY_NPDRM:
LoadSelfNPDRMKeys();
key = GetSelfNPDRMKey(revision);
break;
default:
break;
}
return key;
}
void KeyVault::SetKlicenseeKey(u8 *key)
{
memcpy(klicensee_key, key, 0x10);
}
u8 *KeyVault::GetKlicenseeKey()
{
return klicensee_key;
}
void KeyVault::RapToRif(unsigned char* rap, unsigned char* rif)
{
int i;
int round;
aes_context aes;
unsigned char key[0x10];
unsigned char iv[0x10];
memset(key, 0, 0x10);
memset(iv, 0, 0x10);
// Initial decrypt.
aes_setkey_dec(&aes, RAP_KEY, 128);
aes_crypt_cbc(&aes, AES_DECRYPT, 0x10, iv, rap, key);
// rap2rifkey round.
for (round = 0; round < 5; ++round) {
for (i = 0; i < 16; ++i) {
int p = RAP_PBOX[i];
key[p] ^= RAP_E1[p];
}
for (i = 15; i >= 1; --i) {
int p = RAP_PBOX[i];
int pp = RAP_PBOX[i - 1];
key[p] ^= key[pp];
}
int o = 0;
for (i = 0; i < 16; ++i) {
int p = RAP_PBOX[i];
unsigned char kc = key[p] - o;
unsigned char ec2 = RAP_E2[p];
if (o != 1 || kc != 0xFF) {
o = kc < ec2 ? 1 : 0;
key[p] = kc - ec2;
} else if (kc == 0xFF) {
key[p] = kc - ec2;
} else {
key[p] = kc;
}
}
}
memcpy(rif, key, 0x10);
}

111
rpcs3/Crypto/key_vault.h Normal file
View File

@ -0,0 +1,111 @@
#pragma once
#include "aes.h"
#include "utils.h"
enum SELF_KEY_TYPE {
KEY_LV0 = 1,
KEY_LV1,
KEY_LV2,
KEY_APP,
KEY_ISO,
KEY_LDR,
KEY_UNK7,
KEY_NPDRM
};
struct SELF_KEY {
u64 version;
u16 revision;
u32 self_type;
u8 erk[0x20];
u8 riv[0x10];
u8 pub[0x28];
u8 priv[0x15];
u32 curve_type;
SELF_KEY(u64 ver, u16 rev, u32 type, wxString e, wxString r, wxString pb, wxString pr, u32 ct)
{
version = ver;
revision = rev;
self_type = type;
hex_to_bytes(erk, e.c_str());
hex_to_bytes(riv, r.c_str());
hex_to_bytes(pub, pb.c_str());
hex_to_bytes(priv, pr.c_str());
curve_type = ct;
}
};
static const u8 PKG_AES_KEY[0x10] = {
0x2e, 0x7b, 0x71, 0xd7, 0xc9, 0xc9, 0xa1, 0x4e, 0xa3, 0x22, 0x1f, 0x18, 0x88, 0x28, 0xb8, 0xf8
};
static const u8 NP_IDPS[0x10] = {
0x5E, 0x06, 0xE0, 0x4F, 0xD9, 0x4A, 0x71, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01
};
static const u8 NP_KLIC_FREE[0x10] = {
0x72, 0xF9, 0x90, 0x78, 0x8F, 0x9C, 0xFF, 0x74, 0x57, 0x25, 0xF0, 0x8E, 0x4C, 0x12, 0x83, 0x87
};
static const u8 NP_KLIC_KEY[0x10] = {
0xF2, 0xFB, 0xCA, 0x7A, 0x75, 0xB0, 0x4E, 0xDC, 0x13, 0x90, 0x63, 0x8C, 0xCD, 0xFD, 0xD1, 0xEE
};
static const u8 NP_RIF_KEY[0x10] = {
0xDA, 0x7D, 0x4B, 0x5E, 0x49, 0x9A, 0x4F, 0x53, 0xB1, 0xC1, 0xA1, 0x4A, 0x74, 0x84, 0x44, 0x3B
};
static const u8 RAP_KEY[0x10] = {
0x86, 0x9F, 0x77, 0x45, 0xC1, 0x3F, 0xD8, 0x90, 0xCC, 0xF2, 0x91, 0x88, 0xE3, 0xCC, 0x3E, 0xDF
};
static const u8 RAP_PBOX[0x10] = {
0x0C, 0x03, 0x06, 0x04, 0x01, 0x0B, 0x0F, 0x08, 0x02, 0x07, 0x00, 0x05, 0x0A, 0x0E, 0x0D, 0x09
};
static const u8 RAP_E1[0x10] = {
0xA9, 0x3E, 0x1F, 0xD6, 0x7C, 0x55, 0xA3, 0x29, 0xB7, 0x5F, 0xDD, 0xA6, 0x2A, 0x95, 0xC7, 0xA5
};
static const u8 RAP_E2[0x10] = {
0x67, 0xD4, 0x5D, 0xA3, 0x29, 0x6D, 0x00, 0x6A, 0x4E, 0x7C, 0x53, 0x7B, 0xF5, 0x53, 0x8C, 0x74
};
class KeyVault
{
Array<SELF_KEY> sk_LV0_arr;
Array<SELF_KEY> sk_LV1_arr;
Array<SELF_KEY> sk_LV2_arr;
Array<SELF_KEY> sk_APP_arr;
Array<SELF_KEY> sk_ISO_arr;
Array<SELF_KEY> sk_LDR_arr;
Array<SELF_KEY> sk_UNK7_arr;
Array<SELF_KEY> sk_NPDRM_arr;
u8 klicensee_key[0x10];
public:
KeyVault();
SELF_KEY FindSelfKey(u32 type, u16 revision, u64 version);
void SetKlicenseeKey(u8 *key);
u8 *GetKlicenseeKey();
void RapToRif(unsigned char* rap, unsigned char* rif);
private:
void LoadSelfLV0Keys();
void LoadSelfLDRKeys();
void LoadSelfLV1Keys();
void LoadSelfLV2Keys();
void LoadSelfISOKeys();
void LoadSelfAPPKeys();
void LoadSelfUNK7Keys();
void LoadSelfNPDRMKeys();
SELF_KEY GetSelfLV0Key();
SELF_KEY GetSelfLDRKey();
SELF_KEY GetSelfLV1Key(u64 version);
SELF_KEY GetSelfLV2Key(u64 version);
SELF_KEY GetSelfISOKey(u16 revision, u64 version);
SELF_KEY GetSelfAPPKey(u16 revision);
SELF_KEY GetSelfUNK7Key(u64 version);
SELF_KEY GetSelfNPDRMKey(u16 revision);
};

View File

@ -28,6 +28,7 @@
* http://www.itl.nist.gov/fipspubs/fip180-1.htm * http://www.itl.nist.gov/fipspubs/fip180-1.htm
*/ */
#include "stdafx.h"
#include "sha1.h" #include "sha1.h"
/* /*

222
rpcs3/Crypto/unpkg.cpp Normal file
View File

@ -0,0 +1,222 @@
#include "stdafx.h"
#include "unpkg.h"
#include <wx/progdlg.h>
// Decryption.
bool CheckHeader(wxFile& pkg_f, PKGHeader* m_header)
{
if (m_header->pkg_magic != 0x7F504B47) {
ConLog.Error("PKG: Not a package file!");
return false;
}
switch (m_header->pkg_type)
{
case PKG_RELEASE_TYPE_DEBUG: break;
case PKG_RELEASE_TYPE_RELEASE: break;
default:
ConLog.Error("PKG: Unknown PKG type!");
return false;
}
switch (m_header->pkg_platform)
{
case PKG_PLATFORM_TYPE_PS3: break;
case PKG_PLATFORM_TYPE_PSP: break;
default:
ConLog.Error("PKG: Unknown PKG type!");
return false;
}
if (m_header->header_size != PKG_HEADER_SIZE) {
ConLog.Error("PKG: Wrong header size!");
return false;
}
if (m_header->pkg_size != pkg_f.Length()) {
ConLog.Error("PKG: File size mismatch.");
return false;
}
if (m_header->data_size + m_header->data_offset + 0x60 != pkg_f.Length()) {
ConLog.Error("PKG: Data size mismatch.");
return false;
}
return true;
}
bool LoadHeader(wxFile& pkg_f, PKGHeader* m_header)
{
pkg_f.Seek(0);
if (pkg_f.Read(m_header, sizeof(PKGHeader)) != sizeof(PKGHeader)) {
ConLog.Error("PKG: Package file is too short!");
return false;
}
if (!CheckHeader(pkg_f, m_header))
return false;
return true;
}
int Decrypt(wxFile& pkg_f, wxFile& dec_pkg_f, PKGHeader* m_header)
{
if (!LoadHeader(pkg_f, m_header))
return -1;
aes_context c;
u8 iv[HASH_LEN];
u8 buf[BUF_SIZE];
u8 ctr[BUF_SIZE];
// Debug key
u8 key[0x40];
memset(key, 0, 0x40);
memcpy(key+0x00, &m_header->qa_digest[0], 8); // &data[0x60]
memcpy(key+0x08, &m_header->qa_digest[0], 8); // &data[0x60]
memcpy(key+0x10, &m_header->qa_digest[8], 8); // &data[0x68]
memcpy(key+0x18, &m_header->qa_digest[8], 8); // &data[0x68]
pkg_f.Seek(m_header->data_offset);
u32 parts = (m_header->data_size + BUF_SIZE - 1) / BUF_SIZE;
wxProgressDialog pdlg("PKG Decrypter / Installer", "Please wait, decrypting...", parts, 0, wxPD_AUTO_HIDE | wxPD_APP_MODAL);
memcpy(iv, m_header->klicensee, sizeof(iv));
aes_setkey_enc(&c, PKG_AES_KEY, 128);
for (u32 i=0; i<parts; i++)
{
memset(buf, 0, sizeof(buf));
u32 length = pkg_f.Read(buf, BUF_SIZE);
u32 bits = (length + HASH_LEN - 1) / HASH_LEN;
if (m_header->pkg_type == PKG_RELEASE_TYPE_DEBUG)
{
for (u32 j=0; j<bits; j++)
{
u8 hash[0x14];
sha1(key, 0x40, hash);
*(u64*)&buf[j*HASH_LEN + 0] ^= *(u64*)&hash[0];
*(u64*)&buf[j*HASH_LEN + 8] ^= *(u64*)&hash[8];
*(be_t<u64>*)&key[0x38] += 1;
}
}
if (m_header->pkg_type == PKG_RELEASE_TYPE_RELEASE)
{
for (u32 j=0; j<bits; j++)
{
aes_crypt_ecb(&c, AES_ENCRYPT, iv, ctr+j*HASH_LEN);
be_t<u64> hi = *(be_t<u64>*)&iv[0];
be_t<u64> lo = *(be_t<u64>*)&iv[8] + 1;
if (lo == 0)
hi += 1;
*(be_t<u64>*)&iv[0] = hi;
*(be_t<u64>*)&iv[8] = lo;
}
for (u32 j=0; j<length; j++) {
buf[j] ^= ctr[j];
}
}
dec_pkg_f.Write(buf, length);
pdlg.Update(i);
}
pdlg.Update(parts);
return 0;
}
// Unpacking.
bool LoadEntries(wxFile& dec_pkg_f, PKGHeader* m_header, PKGEntry *m_entries)
{
dec_pkg_f.Seek(0);
dec_pkg_f.Read(m_entries, sizeof(PKGEntry) * m_header->file_count);
if (m_entries->name_offset / sizeof(PKGEntry) != m_header->file_count) {
ConLog.Error("PKG: Entries are damaged!");
return false;
}
return true;
}
bool UnpackEntry(wxFile& dec_pkg_f, const PKGEntry& entry, std::string dir)
{
u8 buf[BUF_SIZE];
dec_pkg_f.Seek(entry.name_offset);
dec_pkg_f.Read(buf, entry.name_size);
buf[entry.name_size] = 0;
switch (entry.type & (0xff))
{
case PKG_FILE_ENTRY_NPDRM:
case PKG_FILE_ENTRY_NPDRMEDAT:
case PKG_FILE_ENTRY_SDAT:
case PKG_FILE_ENTRY_REGULAR:
{
wxFile out;
out.Create(dir + buf);
dec_pkg_f.Seek(entry.file_offset);
for (u64 size = 0; size < entry.file_size; ) {
size += dec_pkg_f.Read(buf, BUF_SIZE);
if (size > entry.file_size)
out.Write(buf, BUF_SIZE - (size - entry.file_size));
else
out.Write(buf, BUF_SIZE);
}
out.Close();
}
break;
case PKG_FILE_ENTRY_FOLDER:
wxMkdir(dir + buf);
break;
}
return true;
}
int Unpack(wxFile& pkg_f, std::string src, std::string dst)
{
PKGHeader* m_header = (PKGHeader*) malloc (sizeof(PKGHeader));
wxFile dec_pkg_f;
std::string decryptedFile = wxGetCwd() + "/dev_hdd1/" + src + ".dec";
dec_pkg_f.Create(decryptedFile, true);
if (Decrypt(pkg_f, dec_pkg_f, m_header) < 0)
return -1;
dec_pkg_f.Close();
wxFile n_dec_pkg_f(decryptedFile, wxFile::read);
std::vector<PKGEntry> m_entries;
m_entries.resize(m_header->file_count);
PKGEntry *m_entries_ptr = &m_entries[0];
if (!LoadEntries(n_dec_pkg_f, m_header, m_entries_ptr))
return -1;
wxProgressDialog pdlg("PKG Decrypter / Installer", "Please wait, unpacking...", m_entries.size(), 0, wxPD_AUTO_HIDE | wxPD_APP_MODAL);
for (const PKGEntry& entry : m_entries)
{
UnpackEntry(n_dec_pkg_f, entry, dst + src + "/");
pdlg.Update(pdlg.GetValue() + 1);
}
pdlg.Update(m_entries.size());
n_dec_pkg_f.Close();
wxRemoveFile(decryptedFile);
return 0;
}

51
rpcs3/Crypto/unpkg.h Normal file
View File

@ -0,0 +1,51 @@
#pragma once
#include "aes.h"
#include "sha1.h"
#include "key_vault.h"
// Constants
#define PKG_HEADER_SIZE 0xC0 //sizeof(pkg_header) + sizeof(pkg_unk_checksum)
#define PKG_RELEASE_TYPE_RELEASE 0x8000
#define PKG_RELEASE_TYPE_DEBUG 0x0000
#define PKG_PLATFORM_TYPE_PS3 0x0001
#define PKG_PLATFORM_TYPE_PSP 0x0002
#define PKG_FILE_ENTRY_NPDRM 0x0001
#define PKG_FILE_ENTRY_NPDRMEDAT 0x0002
#define PKG_FILE_ENTRY_REGULAR 0x0003
#define PKG_FILE_ENTRY_FOLDER 0x0004
#define PKG_FILE_ENTRY_SDAT 0x0009
#define PKG_FILE_ENTRY_OVERWRITE 0x80000000
#define HASH_LEN 16
#define BUF_SIZE 4096
// Structs
struct PKGHeader
{
be_t<u32> pkg_magic; // Magic (0x7f504b47)
be_t<u16> pkg_type; // Release type (Retail:0x8000, Debug:0x0000)
be_t<u16> pkg_platform; // Platform type (PS3:0x0001, PSP:0x0002)
be_t<u32> header_size; // Header size (0xc0)
be_t<u32> unk1; // Some PKG version maybe?
be_t<u32> meta_size; // Size of metadata (block after header & hashes)
be_t<u32> file_count; // Number of files
be_t<u64> pkg_size; // PKG size in bytes
be_t<u64> data_offset; // Encrypted data offset
be_t<u64> data_size; // Encrypted data size in bytes
char title_id[48]; // Title ID
u8 qa_digest[16]; // This should be the hash of "files + attribs"
u8 klicensee[16]; // Nonce
};
struct PKGEntry
{
be_t<u32> name_offset; // File name offset
be_t<u32> name_size; // File name size
be_t<u64> file_offset; // File offset
be_t<u64> file_size; // File size
be_t<u32> type; // File type
be_t<u32> pad; // Padding (zeros)
};
extern int Unpack(wxFile& dec_pkg_f, std::string src, std::string dst);

674
rpcs3/Crypto/unself.cpp Normal file
View File

@ -0,0 +1,674 @@
#include "stdafx.h"
#include "unself.h"
SELFDecrypter::SELFDecrypter(vfsStream& s)
: self_f(s), key_v()
{
}
bool SELFDecrypter::LoadHeaders(bool isElf32)
{
// Read SCE header.
self_f.Seek(0);
sce_hdr.Load(self_f);
// Check SCE magic.
if (!sce_hdr.CheckMagic())
{
ConLog.Error("SELF: Not a SELF file!");
return false;
}
// Read SELF header.
self_hdr.Load(self_f);
// Read the APP INFO.
self_f.Seek(self_hdr.se_appinfooff);
app_info.Load(self_f);
// Read ELF header.
self_f.Seek(self_hdr.se_elfoff);
if (isElf32)
elf32_hdr.Load(self_f);
else
elf64_hdr.Load(self_f);
// Read ELF program headers.
if (isElf32)
{
phdr32_arr.Clear();
if(elf32_hdr.e_phoff == 0 && elf32_hdr.e_phnum)
{
ConLog.Error("SELF: ELF program header offset is null!");
return false;
}
self_f.Seek(self_hdr.se_phdroff);
for(u32 i = 0; i < elf32_hdr.e_phnum; ++i)
{
Elf32_Phdr* phdr = new Elf32_Phdr();
phdr->Load(self_f);
phdr32_arr.Move(phdr);
}
}
else
{
phdr64_arr.Clear();
if(elf64_hdr.e_phoff == 0 && elf64_hdr.e_phnum)
{
ConLog.Error("SELF: ELF program header offset is null!");
return false;
}
self_f.Seek(self_hdr.se_phdroff);
for(u32 i = 0; i < elf64_hdr.e_phnum; ++i)
{
Elf64_Phdr* phdr = new Elf64_Phdr();
phdr->Load(self_f);
phdr64_arr.Move(phdr);
}
}
// Read section info.
secinfo_arr.Clear();
self_f.Seek(self_hdr.se_secinfoff);
for(u32 i = 0; i < ((isElf32) ? elf32_hdr.e_phnum : elf64_hdr.e_phnum); ++i)
{
SectionInfo* sinfo = new SectionInfo();
sinfo->Load(self_f);
secinfo_arr.Move(sinfo);
}
// Read SCE version info.
self_f.Seek(self_hdr.se_sceveroff);
scev_info.Load(self_f);
// Read control info.
ctrlinfo_arr.Clear();
self_f.Seek(self_hdr.se_controloff);
u32 i = 0;
while(i < self_hdr.se_controlsize)
{
ControlInfo* cinfo = new ControlInfo();
cinfo->Load(self_f);
ctrlinfo_arr.Move(cinfo);
i += cinfo->size;
}
// Read ELF section headers.
if (isElf32)
{
shdr32_arr.Clear();
if(elf32_hdr.e_shoff == 0 && elf32_hdr.e_shnum)
{
ConLog.Warning("SELF: ELF section header offset is null!");
return true;
}
self_f.Seek(self_hdr.se_shdroff);
for(u32 i = 0; i < elf32_hdr.e_shnum; ++i)
{
Elf32_Shdr* shdr = new Elf32_Shdr();
shdr->Load(self_f);
shdr32_arr.Move(shdr);
}
}
else
{
shdr64_arr.Clear();
if(elf64_hdr.e_shoff == 0 && elf64_hdr.e_shnum)
{
ConLog.Warning("SELF: ELF section header offset is null!");
return true;
}
self_f.Seek(self_hdr.se_shdroff);
for(u32 i = 0; i < elf64_hdr.e_shnum; ++i)
{
Elf64_Shdr* shdr = new Elf64_Shdr();
shdr->Load(self_f);
shdr64_arr.Move(shdr);
}
}
return true;
}
void SELFDecrypter::ShowHeaders(bool isElf32)
{
ConLog.Write("SCE header");
ConLog.Write("----------------------------------------------------");
sce_hdr.Show();
ConLog.Write("----------------------------------------------------");
ConLog.Write("SELF header");
ConLog.Write("----------------------------------------------------");
self_hdr.Show();
ConLog.Write("----------------------------------------------------");
ConLog.Write("APP INFO");
ConLog.Write("----------------------------------------------------");
app_info.Show();
ConLog.Write("----------------------------------------------------");
ConLog.Write("ELF header");
ConLog.Write("----------------------------------------------------");
isElf32 ? elf32_hdr.Show() : elf64_hdr.Show();
ConLog.Write("----------------------------------------------------");
ConLog.Write("ELF program headers");
ConLog.Write("----------------------------------------------------");
for(int i = 0; i < ((isElf32) ? phdr32_arr.GetCount() : phdr64_arr.GetCount()); i++)
isElf32 ? phdr32_arr[i].Show() : phdr64_arr[i].Show();
ConLog.Write("----------------------------------------------------");
ConLog.Write("Section info");
ConLog.Write("----------------------------------------------------");
for(int i = 0; i < secinfo_arr.GetCount(); i++)
secinfo_arr[i].Show();
ConLog.Write("----------------------------------------------------");
ConLog.Write("SCE version info");
ConLog.Write("----------------------------------------------------");
scev_info.Show();
ConLog.Write("----------------------------------------------------");
ConLog.Write("Control info");
ConLog.Write("----------------------------------------------------");
for(int i = 0; i < ctrlinfo_arr.GetCount(); i++)
ctrlinfo_arr[i].Show();
ConLog.Write("----------------------------------------------------");
ConLog.Write("ELF section headers");
ConLog.Write("----------------------------------------------------");
for(int i = 0; i < ((isElf32) ? shdr32_arr.GetCount() : shdr64_arr.GetCount()); i++)
isElf32 ? shdr32_arr[i].Show() : shdr64_arr[i].Show();
ConLog.Write("----------------------------------------------------");
}
bool SELFDecrypter::DecryptNPDRM(u8 *metadata, u32 metadata_size)
{
aes_context aes;
ControlInfo *ctrl = NULL;
u8 npdrm_key[0x10];
u8 npdrm_iv[0x10];
// Parse the control info structures to find the NPDRM control info.
for(int i = 0; i < ctrlinfo_arr.GetCount(); i++)
{
if (ctrlinfo_arr[i].type == 3)
{
ctrl = &ctrlinfo_arr[i];
break;
}
}
// Check if we have a valid NPDRM control info structure.
// If not, the data has no NPDRM layer.
if (!ctrl)
{
ConLog.Warning("SELF: No NPDRM control info found!");
return true;
}
u8 klicensee_key[0x10];
memcpy(klicensee_key, key_v.GetKlicenseeKey(), 0x10);
// Use klicensee if available.
if (klicensee_key != NULL)
memcpy(npdrm_key, klicensee_key, 0x10);
if (ctrl->npdrm.license == 1) // Network license.
{
ConLog.Error("SELF: Can't decrypt network NPDRM!");
return false;
}
else if (ctrl->npdrm.license == 2) // Local license.
{
// Try to find a RAP file to get the key.
if (!GetKeyFromRap(ctrl->npdrm.content_id, npdrm_key))
{
ConLog.Error("SELF: Can't find RAP file for NPDRM decryption!");
return false;
}
}
else if (ctrl->npdrm.license == 3) // Free license.
{
// Use the NP_KLIC_FREE.
memcpy(npdrm_key, NP_KLIC_FREE, 0x10);
}
else
{
ConLog.Error("SELF: Invalid NPDRM license type!");
return false;
}
// Decrypt our key with NP_KLIC_KEY.
aes_setkey_dec(&aes, NP_KLIC_KEY, 128);
aes_crypt_ecb(&aes, AES_DECRYPT, npdrm_key, npdrm_key);
// IV is empty.
memset(npdrm_iv, 0, 0x10);
// Use our final key to decrypt the NPDRM layer.
aes_setkey_dec(&aes, npdrm_key, 128);
aes_crypt_cbc(&aes, AES_DECRYPT, metadata_size, npdrm_iv, metadata, metadata);
return true;
}
bool SELFDecrypter::LoadMetadata()
{
aes_context aes;
u32 metadata_info_size = sizeof(meta_info);
u8 *metadata_info = (u8 *)malloc(metadata_info_size);
u32 metadata_headers_size = sce_hdr.se_hsize - (sizeof(sce_hdr) + sce_hdr.se_meta + sizeof(meta_info));
u8 *metadata_headers = (u8 *)malloc(metadata_headers_size);
// Locate and read the encrypted metadata info.
self_f.Seek(sce_hdr.se_meta + sizeof(sce_hdr));
self_f.Read(metadata_info, metadata_info_size);
// Locate and read the encrypted metadata header and section header.
self_f.Seek(sce_hdr.se_meta + sizeof(sce_hdr) + metadata_info_size);
self_f.Read(metadata_headers, metadata_headers_size);
// Find the right keyset from the key vault.
SELF_KEY keyset = key_v.FindSelfKey(app_info.self_type, sce_hdr.se_flags, app_info.version);
// Copy the necessary parameters.
u8 metadata_key[0x20];
u8 metadata_iv[0x10];
memcpy(metadata_key, keyset.erk, 0x20);
memcpy(metadata_iv, keyset.riv, 0x10);
// Check DEBUG flag.
if ((sce_hdr.se_flags & 0x8000) != 0x8000)
{
// Decrypt the NPDRM layer.
if (!DecryptNPDRM(metadata_info, metadata_info_size))
return false;
// Decrypt the metadata info.
aes_setkey_dec(&aes, metadata_key, 256); // AES-256
aes_crypt_cbc(&aes, AES_DECRYPT, metadata_info_size, metadata_iv, metadata_info, metadata_info);
}
// Load the metadata info.
meta_info.Load(metadata_info);
// If the padding is not NULL for the key or iv fields, the metadata info
// is not properly decrypted.
if ((meta_info.key_pad[0] != 0x00) ||
(meta_info.iv_pad[0] != 0x00))
{
ConLog.Error("SELF: Failed to decrypt metadata info!");
return false;
}
// Perform AES-CTR encryption on the metadata headers.
size_t ctr_nc_off = 0;
u8 ctr_stream_block[0x10];
aes_setkey_enc(&aes, meta_info.key, 128);
aes_crypt_ctr(&aes, metadata_headers_size, &ctr_nc_off, meta_info.iv, ctr_stream_block, metadata_headers, metadata_headers);
// Load the metadata header.
meta_hdr.Load(metadata_headers);
// Load the metadata section headers.
meta_shdr.Clear();
for (int i = 0; i < meta_hdr.section_count; i++)
{
MetadataSectionHeader* m_shdr = new MetadataSectionHeader();
m_shdr->Load(metadata_headers + sizeof(meta_hdr) + sizeof(MetadataSectionHeader) * i);
meta_shdr.Move(m_shdr);
}
// Copy the decrypted data keys.
data_keys_length = meta_hdr.key_count * 0x10;
data_keys = (u8 *) malloc (data_keys_length);
memcpy(data_keys, metadata_headers + sizeof(meta_hdr) + meta_hdr.section_count * sizeof(MetadataSectionHeader), data_keys_length);
return true;
}
bool SELFDecrypter::DecryptData()
{
aes_context aes;
// Calculate the total data size.
for (int i = 0; i < meta_hdr.section_count; i++)
{
if (meta_shdr[i].encrypted == 3)
{
if ((meta_shdr[i].key_idx <= meta_hdr.key_count - 1) && (meta_shdr[i].iv_idx <= meta_hdr.key_count))
data_buf_length += meta_shdr[i].data_size;
}
}
// Allocate a buffer to store decrypted data.
data_buf = (u8*)malloc(data_buf_length);
// Set initial offset.
u32 data_buf_offset = 0;
// Parse the metadata section headers to find the offsets of encrypted data.
for (int i = 0; i < meta_hdr.section_count; i++)
{
size_t ctr_nc_off = 0;
u8 ctr_stream_block[0x10];
u8 data_key[0x10];
u8 data_iv[0x10];
// Check if this is an encrypted section.
if (meta_shdr[i].encrypted == 3)
{
// Make sure the key and iv are not out of boundaries.
if((meta_shdr[i].key_idx <= meta_hdr.key_count - 1) && (meta_shdr[i].iv_idx <= meta_hdr.key_count))
{
// Get the key and iv from the previously stored key buffer.
memcpy(data_key, data_keys + meta_shdr[i].key_idx * 0x10, 0x10);
memcpy(data_iv, data_keys + meta_shdr[i].iv_idx * 0x10, 0x10);
// Allocate a buffer to hold the data.
u8 *buf = (u8 *)malloc(meta_shdr[i].data_size);
// Seek to the section data offset and read the encrypted data.
self_f.Seek(meta_shdr[i].data_offset);
self_f.Read(buf, meta_shdr[i].data_size);
// Perform AES-CTR encryption on the data blocks.
aes_setkey_enc(&aes, data_key, 128);
aes_crypt_ctr(&aes, meta_shdr[i].data_size, &ctr_nc_off, data_iv, ctr_stream_block, buf, buf);
// Copy the decrypted data.
memcpy(data_buf + data_buf_offset, buf, meta_shdr[i].data_size);
// Advance the buffer's offset.
data_buf_offset += meta_shdr[i].data_size;
// Release the temporary buffer.
free(buf);
}
}
}
return true;
}
bool SELFDecrypter::MakeElf(const std::string& elf, bool isElf32)
{
// Create a new ELF file.
wxFile e(elf.c_str(), wxFile::write);
if(!e.IsOpened())
{
ConLog.Error("Could not create ELF file! (%s)", wxString(elf).wx_str());
return false;
}
// Set initial offset.
u32 data_buf_offset = 0;
if (isElf32)
{
// Write ELF header.
WriteEhdr(e, elf32_hdr);
// Write program headers.
for(u32 i = 0; i < elf32_hdr.e_phnum; ++i)
WritePhdr(e, phdr32_arr[i]);
for (int i = 0; i < meta_hdr.section_count; i++)
{
// PHDR type.
if (meta_shdr[i].type == 2)
{
// Seek to the program header data offset and write the data.
e.Seek(phdr32_arr[meta_shdr[i].program_idx].p_offset);
e.Write(data_buf + data_buf_offset, meta_shdr[i].data_size);
// Advance the data buffer offset by data size.
data_buf_offset += meta_shdr[i].data_size;
}
}
// Write section headers.
if(self_hdr.se_shdroff != NULL)
{
e.Seek(elf32_hdr.e_shoff);
for(u32 i = 0; i < elf32_hdr.e_shnum; ++i)
WriteShdr(e, shdr32_arr[i]);
}
}
else
{
// Write ELF header.
WriteEhdr(e, elf64_hdr);
// Write program headers.
for(u32 i = 0; i < elf64_hdr.e_phnum; ++i)
WritePhdr(e, phdr64_arr[i]);
// Write data.
for (int i = 0; i < meta_hdr.section_count; i++)
{
// PHDR type.
if (meta_shdr[i].type == 2)
{
// Decompress if necessary.
if (meta_shdr[i].compressed == 2)
{
// Allocate a buffer for decompression.
u8 *decomp_buf = (u8 *)malloc(phdr64_arr[meta_shdr[i].program_idx].p_filesz);
// Set up memory streams for input/output.
wxMemoryInputStream decomp_stream_in(data_buf + data_buf_offset, meta_shdr[i].data_size);
wxMemoryOutputStream decomp_stream_out;
// Create a Zlib stream, read the data and flush the stream.
wxZlibInputStream* z_stream = new wxZlibInputStream(decomp_stream_in);
z_stream->Read(decomp_stream_out);
delete z_stream;
// Copy the decompressed result from the stream.
decomp_stream_out.CopyTo(decomp_buf, phdr64_arr[meta_shdr[i].program_idx].p_filesz);
// Seek to the program header data offset and write the data.
e.Seek(phdr64_arr[meta_shdr[i].program_idx].p_offset);
e.Write(decomp_buf, phdr64_arr[meta_shdr[i].program_idx].p_filesz);
// Release the decompression buffer.
free(decomp_buf);
}
else
{
// Seek to the program header data offset and write the data.
e.Seek(phdr64_arr[meta_shdr[i].program_idx].p_offset);
e.Write(data_buf + data_buf_offset, meta_shdr[i].data_size);
}
// Advance the data buffer offset by data size.
data_buf_offset += meta_shdr[i].data_size;
}
}
// Write section headers.
if(self_hdr.se_shdroff != NULL)
{
e.Seek(elf64_hdr.e_shoff);
for(u32 i = 0; i < elf64_hdr.e_shnum; ++i)
WriteShdr(e, shdr64_arr[i]);
}
}
e.Close();
return true;
}
bool SELFDecrypter::GetKeyFromRap(u8 *content_id, u8 *npdrm_key)
{
// Set empty RAP key.
u8 rap_key[0x10];
memset(rap_key, 0, 0x10);
// Try to find a matching RAP file under dev_usb000.
wxString ci_str(content_id);
wxString rap_path(wxGetCwd() + "/dev_usb000/" + ci_str + ".rap");
// Check if we have a valid RAP file.
if (!wxFile::Exists(rap_path))
{
ConLog.Error("This application requires a valid RAP file for decryption!");
return false;
}
// Open the RAP file and read the key.
wxFile rap_file(rap_path, wxFile::read);
if (!rap_file.IsOpened())
{
ConLog.Error("Failed to load RAP file!");
return false;
}
ConLog.Write("Loading RAP file %s", ci_str + ".rap");
rap_file.Read(rap_key, 0x10);
rap_file.Close();
// Call the key vault to convert the RAP key.
key_v.RapToRif(rap_key, npdrm_key);
return true;
}
bool IsSelf(const std::string& path)
{
vfsLocalFile f(nullptr);
if(!f.Open(path))
return false;
SceHeader hdr;
hdr.Load(f);
return hdr.CheckMagic();
}
bool IsSelfElf32(const std::string& path)
{
vfsLocalFile f(nullptr);
if(!f.Open(path))
return false;
SceHeader hdr;
SelfHeader sh;
hdr.Load(f);
sh.Load(f);
// Locate the class byte and check it.
u8 elf_class[0x8];
f.Seek(sh.se_elfoff);
f.Read(elf_class, 0x8);
return (elf_class[4] == 1);
}
bool CheckDebugSelf(const std::string& self, const std::string& elf)
{
// Open the SELF file.
wxFile s(self.c_str());
if(!s.IsOpened())
{
ConLog.Error("Could not open SELF file! (%s)", wxString(self).wx_str());
return false;
}
// Get the key version.
s.Seek(0x08);
u16 key_version;
s.Read(&key_version, sizeof(key_version));
// Check for DEBUG version.
if(swap16(key_version) == 0x8000)
{
ConLog.Warning("Debug SELF detected! Removing fake header...");
// Get the real elf offset.
s.Seek(0x10);
u64 elf_offset;
s.Read(&elf_offset, sizeof(elf_offset));
// Start at the real elf offset.
elf_offset = swap64(elf_offset);
s.Seek(elf_offset);
// Write the real ELF file back.
wxFile e(elf.c_str(), wxFile::write);
if(!e.IsOpened())
{
ConLog.Error("Could not create ELF file! (%s)", wxString(elf).wx_str());
return false;
}
// Copy the data.
char buf[2048];
while (ssize_t size = s.Read(buf, 2048))
e.Write(buf, size);
e.Close();
return true;
}
else
{
// Leave the file untouched.
s.Seek(0);
return false;
}
s.Close();
}
bool DecryptSelf(const std::string& elf, const std::string& self)
{
// Check for a debug SELF first.
if (!CheckDebugSelf(self, elf))
{
// Set a virtual pointer to the SELF file.
vfsLocalFile self_vf(nullptr);
if (!self_vf.Open(self))
return false;
// Check the ELF file class (32 or 64 bit).
bool isElf32 = IsSelfElf32(self);
// Start the decrypter on this SELF file.
SELFDecrypter self_dec(self_vf);
// Load the SELF file headers.
if (!self_dec.LoadHeaders(isElf32))
{
ConLog.Error("SELF: Failed to load SELF file headers!");
return false;
}
// Load and decrypt the SELF file metadata.
if (!self_dec.LoadMetadata())
{
ConLog.Error("SELF: Failed to load SELF file metadata!");
return false;
}
// Decrypt the SELF file data.
if (!self_dec.DecryptData())
{
ConLog.Error("SELF: Failed to decrypt SELF file data!");
return false;
}
// Make a new ELF file from this SELF.
if (!self_dec.MakeElf(elf, isElf32))
{
ConLog.Error("SELF: Failed to make ELF file from SELF!");
return false;
}
}
return true;
}

508
rpcs3/Crypto/unself.h Normal file
View File

@ -0,0 +1,508 @@
#pragma once
#include "aes.h"
#include "sha1.h"
#include "key_vault.h"
#include "Loader/ELF.h"
#include "Loader/SELF.h"
#include <wx/mstream.h>
#include <wx/zstream.h>
struct AppInfo
{
u64 authid;
u32 vendor_id;
u32 self_type;
u64 version;
u64 padding;
void Load(vfsStream& f)
{
authid = Read64(f);
vendor_id = Read32(f);
self_type = Read32(f);
version = Read64(f);
padding = Read64(f);
}
void Show()
{
ConLog.Write("AuthID: 0x%llx", authid);
ConLog.Write("VendorID: 0x%08x", vendor_id);
ConLog.Write("SELF type: 0x%08x", self_type);
ConLog.Write("Version: 0x%llx", version);
}
};
struct SectionInfo
{
u64 offset;
u64 size;
u32 compressed;
u32 unknown1;
u32 unknown2;
u32 encrypted;
void Load(vfsStream& f)
{
offset = Read64(f);
size = Read64(f);
compressed = Read32(f);
unknown1 = Read32(f);
unknown2 = Read32(f);
encrypted = Read32(f);
}
void Show()
{
ConLog.Write("Offset: 0x%llx", offset);
ConLog.Write("Size: 0x%llx", size);
ConLog.Write("Compressed: 0x%08x", compressed);
ConLog.Write("Unknown1: 0x%08x", unknown1);
ConLog.Write("Unknown2: 0x%08x", unknown2);
ConLog.Write("Encrypted: 0x%08x", encrypted);
}
};
struct SCEVersionInfo
{
u32 subheader_type;
u32 present;
u32 size;
u32 unknown;
void Load(vfsStream& f)
{
subheader_type = Read32(f);
present = Read32(f);
size = Read32(f);
unknown = Read32(f);
}
void Show()
{
ConLog.Write("Sub-header type: 0x%08x", subheader_type);
ConLog.Write("Present: 0x%08x", present);
ConLog.Write("Size: 0x%08x", size);
ConLog.Write("Unknown: 0x%08x", unknown);
}
};
struct ControlInfo
{
u32 type;
u32 size;
u64 next;
union {
// type 1 0x30 bytes
struct {
u32 ctrl_flag1;
u32 unknown1;
u32 unknown2;
u32 unknown3;
u32 unknown4;
u32 unknown5;
u32 unknown6;
u32 unknown7;
} control_flags;
// type 2 0x30 bytes
struct {
u8 digest[20];
u64 unknown;
} file_digest_30;
// type 2 0x40 bytes
struct {
u8 digest1[20];
u8 digest2[20];
u64 unknown;
} file_digest_40;
// type 3 0x90 bytes
struct {
u32 magic;
u32 unknown1;
u32 license;
u32 type;
u8 content_id[48];
u8 digest[16];
u8 invdigest[16];
u8 xordigest[16];
u64 unknown2;
u64 unknown3;
} npdrm;
};
void Load(vfsStream& f)
{
type = Read32(f);
size = Read32(f);
next = Read64(f);
if (type == 1)
{
control_flags.ctrl_flag1 = Read32(f);
control_flags.unknown1 = Read32(f);
control_flags.unknown2 = Read32(f);
control_flags.unknown3 = Read32(f);
control_flags.unknown4 = Read32(f);
control_flags.unknown5 = Read32(f);
control_flags.unknown6 = Read32(f);
control_flags.unknown7 = Read32(f);
}
else if (type == 2)
{
if (size == 0x30)
{
f.Read(file_digest_30.digest, 20);
file_digest_30.unknown = Read64(f);
}
else if (size == 0x40)
{
f.Read(file_digest_40.digest1, 20);
f.Read(file_digest_40.digest2, 20);
file_digest_40.unknown = Read64(f);
}
}
else if (type == 3)
{
npdrm.magic = Read32(f);
npdrm.unknown1 = Read32(f);
npdrm.license = Read32(f);
npdrm.type = Read32(f);
f.Read(npdrm.content_id, 48);
f.Read(npdrm.digest, 16);
f.Read(npdrm.invdigest, 16);
f.Read(npdrm.xordigest, 16);
npdrm.unknown2 = Read64(f);
npdrm.unknown3 = Read64(f);
}
}
void Show()
{
ConLog.Write("Type: 0x%08x", type);
ConLog.Write("Size: 0x%08x", size);
ConLog.Write("Next: 0x%llx", next);
if (type == 1)
{
ConLog.Write("Control flag 1: 0x%08x", control_flags.ctrl_flag1);
ConLog.Write("Unknown1: 0x%08x", control_flags.unknown1);
ConLog.Write("Unknown2: 0x%08x", control_flags.unknown2);
ConLog.Write("Unknown3: 0x%08x", control_flags.unknown3);
ConLog.Write("Unknown4: 0x%08x", control_flags.unknown4);
ConLog.Write("Unknown5: 0x%08x", control_flags.unknown5);
ConLog.Write("Unknown6: 0x%08x", control_flags.unknown6);
ConLog.Write("Unknown7: 0x%08x", control_flags.unknown7);
}
else if (type == 2)
{
if (size == 0x30)
{
wxString digest_str;
for (int i = 0; i < 20; i++)
digest_str += wxString::Format("%02x", file_digest_30.digest[i]);
ConLog.Write("Digest: %s", digest_str);
ConLog.Write("Unknown: 0x%llx", file_digest_30.unknown);
}
else if (size == 0x40)
{
wxString digest_str1;
wxString digest_str2;
for (int i = 0; i < 20; i++)
{
digest_str1 += wxString::Format("%02x", file_digest_40.digest1[i]);
digest_str2 += wxString::Format("%02x", file_digest_40.digest2[i]);
}
ConLog.Write("Digest1: %s", digest_str1);
ConLog.Write("Digest2: %s", digest_str2);
ConLog.Write("Unknown: 0x%llx", file_digest_40.unknown);
}
}
else if (type == 3)
{
wxString contentid_str;
wxString digest_str;
wxString invdigest_str;
wxString xordigest_str;
for (int i = 0; i < 48; i++)
contentid_str += wxString::Format("%02x", npdrm.content_id[i]);
for (int i = 0; i < 16; i++)
{
digest_str += wxString::Format("%02x", npdrm.digest[i]);
invdigest_str += wxString::Format("%02x", npdrm.invdigest[i]);
xordigest_str += wxString::Format("%02x", npdrm.xordigest[i]);
}
ConLog.Write("Magic: 0x%08x", npdrm.magic);
ConLog.Write("Unknown1: 0x%08x", npdrm.unknown1);
ConLog.Write("License: 0x%08x", npdrm.license);
ConLog.Write("Type: 0x%08x", npdrm.type);
ConLog.Write("ContentID: %s", contentid_str);
ConLog.Write("Digest: %s", digest_str);
ConLog.Write("Inverse digest: %s", invdigest_str);
ConLog.Write("XOR digest: %s", xordigest_str);
ConLog.Write("Unknown2: 0x%llx", npdrm.unknown2);
ConLog.Write("Unknown3: 0x%llx", npdrm.unknown3);
}
}
};
struct MetadataInfo
{
u8 key[0x10];
u8 key_pad[0x10];
u8 iv[0x10];
u8 iv_pad[0x10];
void Load(u8* in)
{
memcpy(key, in, 0x10);
memcpy(key_pad, in + 0x10, 0x10);
memcpy(iv, in + 0x20, 0x10);
memcpy(iv_pad, in + 0x30, 0x10);
}
void Show()
{
wxString key_str;
wxString key_pad_str;
wxString iv_str;
wxString iv_pad_str;
for (int i = 0; i < 0x10; i++)
{
key_str += wxString::Format("%02x", key[i]);
key_pad_str += wxString::Format("%02x", key_pad[i]);
iv_str += wxString::Format("%02x", iv[i]);
iv_pad_str += wxString::Format("%02x", iv_pad[i]);
}
ConLog.Write("Key: %s", key_str);
ConLog.Write("Key pad: %s", key_pad_str);
ConLog.Write("IV: %s", iv_str);
ConLog.Write("IV pad: %s", iv_pad_str);
}
};
struct MetadataHeader
{
u64 signature_input_length;
u32 unknown1;
u32 section_count;
u32 key_count;
u32 opt_header_size;
u32 unknown2;
u32 unknown3;
void Load(u8* in)
{
memcpy(&signature_input_length, in, 8);
memcpy(&unknown1, in + 8, 4);
memcpy(&section_count, in + 12, 4);
memcpy(&key_count, in + 16, 4);
memcpy(&opt_header_size, in + 20, 4);
memcpy(&unknown2, in + 24, 4);
memcpy(&unknown3, in + 28, 4);
// Endian swap.
signature_input_length = swap64(signature_input_length);
unknown1 = swap32(unknown1);
section_count = swap32(section_count);
key_count = swap32(key_count);
opt_header_size = swap32(opt_header_size);
unknown2 = swap32(unknown2);
unknown3 = swap32(unknown3);
}
void Show()
{
ConLog.Write("Signature input length: 0x%llx", signature_input_length);
ConLog.Write("Unknown1: 0x%08x", unknown1);
ConLog.Write("Section count: 0x%08x", section_count);
ConLog.Write("Key count: 0x%08x", key_count);
ConLog.Write("Optional header size: 0x%08x", opt_header_size);
ConLog.Write("Unknown2: 0x%08x", unknown2);
ConLog.Write("Unknown3: 0x%08x", unknown3);
}
};
struct MetadataSectionHeader
{
u64 data_offset;
u64 data_size;
u32 type;
u32 program_idx;
u32 hashed;
u32 sha1_idx;
u32 encrypted;
u32 key_idx;
u32 iv_idx;
u32 compressed;
void Load(u8* in)
{
memcpy(&data_offset, in, 8);
memcpy(&data_size, in + 8, 8);
memcpy(&type, in + 16, 4);
memcpy(&program_idx, in + 20, 4);
memcpy(&hashed, in + 24, 4);
memcpy(&sha1_idx, in + 28, 4);
memcpy(&encrypted, in + 32, 4);
memcpy(&key_idx, in + 36, 4);
memcpy(&iv_idx, in + 40, 4);
memcpy(&compressed, in + 44, 4);
// Endian swap.
data_offset = swap64(data_offset);
data_size = swap64(data_size);
type = swap32(type);
program_idx = swap32(program_idx);
hashed = swap32(hashed);
sha1_idx = swap32(sha1_idx);
encrypted = swap32(encrypted);
key_idx = swap32(key_idx);
iv_idx = swap32(iv_idx);
compressed = swap32(compressed);
}
void Show()
{
ConLog.Write("Data offset: 0x%llx", data_offset);
ConLog.Write("Data size: 0x%llx", data_size);
ConLog.Write("Type: 0x%08x", type);
ConLog.Write("Program index: 0x%08x", program_idx);
ConLog.Write("Hashed: 0x%08x", hashed);
ConLog.Write("SHA1 index: 0x%08x", sha1_idx);
ConLog.Write("Encrypted: 0x%08x", encrypted);
ConLog.Write("Key index: 0x%08x", key_idx);
ConLog.Write("IV index: 0x%08x", iv_idx);
ConLog.Write("Compressed: 0x%08x", compressed);
}
};
struct SectionHash {
u8 sha1[20];
u8 padding[12];
u8 hmac_key[64];
void Load(vfsStream& f)
{
f.Read(sha1, 20);
f.Read(padding, 12);
f.Read(hmac_key, 64);
}
};
struct CapabilitiesInfo
{
u32 type;
u32 capabilities_size;
u32 next;
u32 unknown1;
u64 unknown2;
u64 unknown3;
u64 flags;
u32 unknown4;
u32 unknown5;
void Load(vfsStream& f)
{
type = Read32(f);
capabilities_size = Read32(f);
next = Read32(f);
unknown1 = Read32(f);
unknown2 = Read64(f);
unknown3 = Read64(f);
flags = Read64(f);
unknown4 = Read32(f);
unknown5 = Read32(f);
}
};
struct Signature
{
u8 r[21];
u8 s[21];
u8 padding[6];
void Load(vfsStream& f)
{
f.Read(r, 21);
f.Read(s, 21);
f.Read(padding, 6);
}
};
struct SelfSection
{
u8 *data;
u64 size;
u64 offset;
void Load(vfsStream& f)
{
*data = Read32(f);
size = Read64(f);
offset = Read64(f);
}
};
class SELFDecrypter
{
// Main SELF file stream.
vfsStream& self_f;
// SCE, SELF and APP headers.
SceHeader sce_hdr;
SelfHeader self_hdr;
AppInfo app_info;
// ELF64 header and program header/section header arrays.
Elf64_Ehdr elf64_hdr;
Array<Elf64_Shdr> shdr64_arr;
Array<Elf64_Phdr> phdr64_arr;
// ELF32 header and program header/section header arrays.
Elf32_Ehdr elf32_hdr;
Array<Elf32_Shdr> shdr32_arr;
Array<Elf32_Phdr> phdr32_arr;
// Decryption info structs.
Array<SectionInfo> secinfo_arr;
SCEVersionInfo scev_info;
Array<ControlInfo> ctrlinfo_arr;
// Metadata structs.
MetadataInfo meta_info;
MetadataHeader meta_hdr;
Array<MetadataSectionHeader> meta_shdr;
// Internal data buffers.
u8 *data_keys;
u32 data_keys_length;
u8 *data_buf;
u32 data_buf_length;
// Main key vault instance.
KeyVault key_v;
public:
SELFDecrypter(vfsStream& s);
bool MakeElf(const std::string& elf, bool isElf32);
bool LoadHeaders(bool isElf32);
void ShowHeaders(bool isElf32);
bool LoadMetadata();
bool DecryptData();
bool DecryptNPDRM(u8 *metadata, u32 metadata_size);
bool GetKeyFromRap(u8 *content_id, u8 *npdrm_key);
};
extern bool IsSelf(const std::string& path);
extern bool IsSelfElf32(const std::string& path);
extern bool CheckDebugSelf(const std::string& self, const std::string& elf);
extern bool DecryptSelf(const std::string& elf, const std::string& self);

71
rpcs3/Crypto/utils.cpp Normal file
View File

@ -0,0 +1,71 @@
#include "stdafx.h"
#include "utils.h"
// Endian swap auxiliary functions.
u16 swap16(u16 i)
{
return ((i & 0xFF00) >> 8) | ((i & 0xFF) << 8);
}
u32 swap32(u32 i)
{
return ((i & 0xFF000000) >> 24) | ((i & 0xFF0000) >> 8) | ((i & 0xFF00) << 8) | ((i & 0xFF) << 24);
}
u64 swap64(u64 i)
{
return ((i & 0x00000000000000ff) << 56) | ((i & 0x000000000000ff00) << 40) |
((i & 0x0000000000ff0000) << 24) | ((i & 0x00000000ff000000) << 8) |
((i & 0x000000ff00000000) >> 8) | ((i & 0x0000ff0000000000) >> 24) |
((i & 0x00ff000000000000) >> 40) | ((i & 0xff00000000000000) >> 56);
}
// Hex string conversion auxiliary functions.
u64 hex_to_u64(const char* hex_str)
{
u32 length = strlen(hex_str);
u64 tmp = 0;
u64 result = 0;
char c;
while (length--)
{
c = *hex_str++;
if((c >= '0') && (c <= '9'))
tmp = c - '0';
else if((c >= 'a') && (c <= 'f'))
tmp = c - 'a' + 10;
else if((c >= 'A') && (c <= 'F'))
tmp = c - 'A' + 10;
else
tmp = 0;
result |= (tmp << (length * 4));
}
return result;
}
void hex_to_bytes(unsigned char *data, const char *hex_str)
{
u32 str_length = strlen(hex_str);
u32 data_length = str_length / 2;
char tmp_buf[3] = {0, 0, 0};
// Don't convert if the string length is odd.
if (!(str_length % 2))
{
u8 *out = (u8 *) malloc (str_length * sizeof(u8));
u8 *pos = out;
while (str_length--)
{
tmp_buf[0] = *hex_str++;
tmp_buf[1] = *hex_str++;
*pos++ = (u8)(hex_to_u64(tmp_buf) & 0xFF);
}
// Copy back to our array.
memcpy(data, out, data_length);
}
}

7
rpcs3/Crypto/utils.h Normal file
View File

@ -0,0 +1,7 @@
#pragma once
u16 swap16(u16 i);
u32 swap32(u32 i);
u64 swap64(u64 i);
u64 hex_to_u64(const char* hex_str);
void hex_to_bytes(unsigned char *data, const char *hex_str);

View File

@ -294,5 +294,6 @@ void sys_fs_init()
sys_fs.AddFunc(0xdb869f20, cellFsAioInit); sys_fs.AddFunc(0xdb869f20, cellFsAioInit);
sys_fs.AddFunc(0x9f951810, cellFsAioFinish); sys_fs.AddFunc(0x9f951810, cellFsAioFinish);
sys_fs.AddFunc(0x1a108ab7, cellFsGetBlockSize); sys_fs.AddFunc(0x1a108ab7, cellFsGetBlockSize);
sys_fs.AddFunc(0xaa3b4bcd, cellFsGetFreeSize);
aio_init = false; aio_init = false;
} }

View File

@ -261,6 +261,7 @@ extern int cellFsFtruncate(u32 fd, u64 size);
extern int cellFsTruncate(u32 path_addr, u64 size); extern int cellFsTruncate(u32 path_addr, u64 size);
extern int cellFsFGetBlockSize(u32 fd, mem64_t sector_size, mem64_t block_size); extern int cellFsFGetBlockSize(u32 fd, mem64_t sector_size, mem64_t block_size);
extern int cellFsGetBlockSize(u32 path_addr, mem64_t sector_size, mem64_t block_size); extern int cellFsGetBlockSize(u32 path_addr, mem64_t sector_size, mem64_t block_size);
extern int cellFsGetFreeSize(u32 path_addr, mem32_t block_size, mem64_t block_count);
//cellVideo //cellVideo
extern int cellVideoOutGetState(u32 videoOut, u32 deviceIndex, u32 state_addr); extern int cellVideoOutGetState(u32 videoOut, u32 deviceIndex, u32 state_addr);

View File

@ -465,3 +465,22 @@ int cellFsGetBlockSize(u32 path_addr, mem64_t sector_size, mem64_t block_size)
return CELL_OK; return CELL_OK;
} }
int cellFsGetFreeSize(u32 path_addr, mem32_t block_size, mem64_t block_count)
{
const wxString& ps3_path = Memory.ReadString(path_addr);
sys_fs.Warning("cellFsGetFreeSize(path=\"%s\", block_size_addr=0x%x, block_count_addr=0x%x)",
ps3_path.wx_str(), block_size.GetAddr(), block_count.GetAddr());
if (Memory.IsGoodAddr(path_addr) || !block_size.IsGood() || !block_count.IsGood())
return CELL_EFAULT;
if (ps3_path.empty())
return CELL_EINVAL;
// TODO: Get real values. Currently, it always returns 40 GB of free space divided in 4 KB blocks
block_size = 4096; // ?
block_count = 10485760; // ?
return CELL_OK;
}

View File

@ -7,9 +7,7 @@
#include "Emu/Cell/SPUThread.h" #include "Emu/Cell/SPUThread.h"
#include "Emu/Cell/PPUInstrTable.h" #include "Emu/Cell/PPUInstrTable.h"
#include "scetool/scetool.h" #include "../Crypto/unself.h"
#include "Loader/SELF.h"
#include <cstdlib> #include <cstdlib>
#include <fstream> #include <fstream>
using namespace PPU_instr; using namespace PPU_instr;
@ -91,72 +89,6 @@ void Emulator::CheckStatus()
} }
} }
bool Emulator::IsSelf(const std::string& path)
{
vfsLocalFile f(nullptr);
if(!f.Open(path))
return false;
SceHeader hdr;
hdr.Load(f);
return hdr.CheckMagic();
}
bool Emulator::DecryptSelf(const std::string& elf, const std::string& self)
{
// Check if the data really needs to be decrypted.
wxFile f(self.c_str());
if(!f.IsOpened())
{
ConLog.Error("Could not open SELF file! (%s)", wxString(self).wx_str());
return false;
}
// Get the key version.
f.Seek(0x08);
be_t<u16> key_version;
f.Read(&key_version, sizeof(key_version));
if(key_version.ToBE() == const_se_t<u16, 0x8000>::value)
{
ConLog.Warning("Debug SELF detected! Removing fake header...");
// Get the real elf offset.
f.Seek(0x10);
be_t<u64> elf_offset;
f.Read(&elf_offset, sizeof(elf_offset));
// Start at the real elf offset.
f.Seek(elf_offset);
wxFile out(elf.c_str(), wxFile::write);
if(!out.IsOpened())
{
ConLog.Error("Could not create ELF file! (%s)", wxString(elf).wx_str());
return false;
}
// Copy the data.
char buf[2048];
while (ssize_t size = f.Read(buf, 2048))
out.Write(buf, size);
}
else
{
if (!scetool_decrypt((scetool::s8 *)self.c_str(), (scetool::s8 *)elf.c_str()))
{
ConLog.Write("SELF: Could not decrypt file");
return false;
}
}
return true;
}
bool Emulator::BootGame(const std::string& path) bool Emulator::BootGame(const std::string& path)
{ {
static const char* elf_path[6] = static const char* elf_path[6] =

View File

@ -145,9 +145,6 @@ public:
u32 GetPPUThreadExit() const { return m_ppu_thr_exit; } u32 GetPPUThreadExit() const { return m_ppu_thr_exit; }
void CheckStatus(); void CheckStatus();
bool IsSelf(const std::string& path);
bool DecryptSelf(const std::string& elf, const std::string& self);
bool BootGame(const std::string& path); bool BootGame(const std::string& path);
void Load(); void Load();
@ -165,4 +162,4 @@ public:
__forceinline bool IsReady() const { return m_status == Ready; } __forceinline bool IsReady() const { return m_status == Ready; }
}; };
extern Emulator Emu; extern Emulator Emu;

View File

@ -47,14 +47,12 @@ AboutDialog::AboutDialog(wxWindow *parent)
wxBoxSizer* s_panel_credits(new wxBoxSizer(wxHORIZONTAL)); wxBoxSizer* s_panel_credits(new wxBoxSizer(wxHORIZONTAL));
wxStaticText* t_section1 = new wxStaticText(this, wxID_ANY, "\nDevelopers:\n\nDH\nAlexAltea\nHykem\nOil", wxDefaultPosition, wxSize(156,160)); wxStaticText* t_section1 = new wxStaticText(this, wxID_ANY, "\nDevelopers:\n\nDH\nAlexAltea\nHykem\nOil", wxDefaultPosition, wxSize(156,160));
wxStaticText* t_section2 = new wxStaticText(this, wxID_ANY, "\nThanks:\n\nBlackDaemon", wxDefaultPosition, wxSize(156,160)); wxStaticText* t_section2 = new wxStaticText(this, wxID_ANY, "\nThanks:\n\nBlackDaemon", wxDefaultPosition, wxSize(156,160));
wxStaticText* t_section3 = new wxStaticText(this, wxID_ANY, "\nExternal code:\n\n - SELF Decrypter based on scetool (C) 2011-2013 by naehrwert", wxDefaultPosition, wxSize(156,160));
s_panel_credits->AddSpacer(12); s_panel_credits->AddSpacer(12);
s_panel_credits->Add(t_section1); s_panel_credits->Add(t_section1);
s_panel_credits->AddSpacer(8); s_panel_credits->AddSpacer(8);
s_panel_credits->Add(t_section2); s_panel_credits->Add(t_section2);
s_panel_credits->AddSpacer(8); s_panel_credits->AddSpacer(8);
s_panel_credits->Add(t_section3);
s_panel_credits->AddSpacer(12); s_panel_credits->AddSpacer(12);
//Buttons //Buttons

View File

@ -1,6 +1,55 @@
#include "stdafx.h" #include "stdafx.h"
#include "ELF32.h" #include "ELF32.h"
void WriteEhdr(wxFile& f, Elf32_Ehdr& ehdr)
{
Write32(f, ehdr.e_magic);
Write8(f, ehdr.e_class);
Write8(f, ehdr.e_data);
Write8(f, ehdr.e_curver);
Write8(f, ehdr.e_os_abi);
Write64(f, ehdr.e_abi_ver);
Write16(f, ehdr.e_type);
Write16(f, ehdr.e_machine);
Write32(f, ehdr.e_version);
Write32(f, ehdr.e_entry);
Write32(f, ehdr.e_phoff);
Write32(f, ehdr.e_shoff);
Write32(f, ehdr.e_flags);
Write16(f, ehdr.e_ehsize);
Write16(f, ehdr.e_phentsize);
Write16(f, ehdr.e_phnum);
Write16(f, ehdr.e_shentsize);
Write16(f, ehdr.e_shnum);
Write16(f, ehdr.e_shstrndx);
}
void WritePhdr(wxFile& f, Elf32_Phdr& phdr)
{
Write32(f, phdr.p_type);
Write32(f, phdr.p_offset);
Write32(f, phdr.p_vaddr);
Write32(f, phdr.p_paddr);
Write32(f, phdr.p_filesz);
Write32(f, phdr.p_memsz);
Write32(f, phdr.p_flags);
Write32(f, phdr.p_align);
}
void WriteShdr(wxFile& f, Elf32_Shdr& shdr)
{
Write32(f, shdr.sh_name);
Write32(f, shdr.sh_type);
Write32(f, shdr.sh_flags);
Write32(f, shdr.sh_addr);
Write32(f, shdr.sh_offset);
Write32(f, shdr.sh_size);
Write32(f, shdr.sh_link);
Write32(f, shdr.sh_info);
Write32(f, shdr.sh_addralign);
Write32(f, shdr.sh_entsize);
}
ELF32Loader::ELF32Loader(vfsStream& f) ELF32Loader::ELF32Loader(vfsStream& f)
: elf32_f(f) : elf32_f(f)
, LoaderBase() , LoaderBase()

View File

@ -305,4 +305,8 @@ private:
bool LoadEhdrData(u64 offset); bool LoadEhdrData(u64 offset);
bool LoadPhdrData(u64 offset); bool LoadPhdrData(u64 offset);
bool LoadShdrData(u64 offset); bool LoadShdrData(u64 offset);
}; };
void WriteEhdr(wxFile& f, Elf32_Ehdr& ehdr);
void WritePhdr(wxFile& f, Elf32_Phdr& phdr);
void WriteShdr(wxFile& f, Elf32_Shdr& shdr);

View File

@ -1,15 +1,12 @@
#include "stdafx.h" #include "stdafx.h"
#include "PKG.h" #include "PKG.h"
#include "scetool/aes.h" #include "../Crypto/unpkg.h"
#include "scetool/sha1.h"
#include <wx/progdlg.h>
PKGLoader::PKGLoader(wxFile& f) : pkg_f(f) PKGLoader::PKGLoader(wxFile& f) : pkg_f(f)
{ {
} }
bool PKGLoader::Install(std::string dest, bool show) bool PKGLoader::Install(std::string dest)
{ {
// Initial checks // Initial checks
if (!pkg_f.IsOpened()) if (!pkg_f.IsOpened())
@ -19,11 +16,12 @@ bool PKGLoader::Install(std::string dest, bool show)
if (!dest.empty() && dest.back() != '/') if (!dest.empty() && dest.back() != '/')
dest += '/'; dest += '/';
if(!LoadHeader(show)) // Fetch title ID from the header.
return false; char title_id[48];
pkg_f.Seek(48);
std::string titleID = std::string(m_header.title_id).substr(7, 9); pkg_f.Read(title_id, 48);
std::string decryptedFile = wxGetCwd().ToStdString() + "/dev_hdd1/" + titleID + ".dec";
std::string titleID = std::string(title_id).substr(7, 9);
if (wxDirExists(dest+titleID)) { if (wxDirExists(dest+titleID)) {
wxMessageDialog d_overwrite(NULL, "Another installation was found. Do you want to overwrite it?", "PKG Decrypter / Installer", wxYES_NO|wxCENTRE); wxMessageDialog d_overwrite(NULL, "Another installation was found. Do you want to overwrite it?", "PKG Decrypter / Installer", wxYES_NO|wxCENTRE);
@ -40,209 +38,20 @@ bool PKGLoader::Install(std::string dest, bool show)
return false; return false;
} }
// Decrypt the PKG file // Decrypt and unpack the PKG file.
wxFile out; if (Unpack(pkg_f, titleID, dest) < 0)
out.Create(decryptedFile, true);
Decrypt(out);
out.Close();
// Unpack the decrypted file
wxFile dec(decryptedFile, wxFile::read);
LoadEntries(dec);
wxProgressDialog pdlg("PKG Decrypter / Installer", "Please wait, unpacking...", m_entries.size(), 0, wxPD_AUTO_HIDE | wxPD_APP_MODAL);
for (const PKGEntry& entry : m_entries)
{ {
UnpackEntry(dec, entry, dest+titleID+'/'); ConLog.Error("PKG Loader: Failed to install package!");
pdlg.Update(pdlg.GetValue() + 1); return false;
}
else
{
ConLog.Write("PKG Loader: Package successfully installed in: /dev_hdd0/game/%s", wxString(titleID.c_str()).wx_str());
return true;
} }
pdlg.Update(m_entries.size());
// Delete decrypted file
dec.Close();
wxRemoveFile(decryptedFile);
ConLog.Write("PKG Loader: Package successfully installed in: /dev_hdd0/game/%s", wxString(titleID.c_str()).wx_str());
return true;
} }
bool PKGLoader::Close() bool PKGLoader::Close()
{ {
return pkg_f.Close(); return pkg_f.Close();
} }
bool PKGLoader::LoadHeader(bool show)
{
pkg_f.Seek(0);
if (pkg_f.Read(&m_header, sizeof(PKGHeader)) != sizeof(PKGHeader)) {
ConLog.Error("PKG Loader: Package file is too short!");
return false;
}
if (!CheckHeader())
return false;
return true;
}
bool PKGLoader::CheckHeader()
{
if (m_header.pkg_magic != 0x7F504B47) {
ConLog.Error("PKG Loader: Not a package file!");
return false;
}
switch (m_header.pkg_type)
{
case PKG_RELEASE_TYPE_DEBUG: break;
case PKG_RELEASE_TYPE_RELEASE: break;
default:
ConLog.Error("PKG Loader: Unknown PKG type!");
return false;
}
switch (m_header.pkg_platform)
{
case PKG_PLATFORM_TYPE_PS3: break;
case PKG_PLATFORM_TYPE_PSP: break;
default:
ConLog.Error("PKG Loader: Unknown PKG type!");
return false;
}
if (m_header.header_size != PKG_HEADER_SIZE) {
ConLog.Error("PKG Loader: Wrong header size!");
return false;
}
if (m_header.pkg_size != pkg_f.Length()) {
ConLog.Error("PKG Loader: File size mismatch.");
return false;
}
if (m_header.data_size + m_header.data_offset + 0x60 != pkg_f.Length()) {
ConLog.Error("PKG Loader: Data size mismatch.");
return false;
}
return true;
}
bool PKGLoader::LoadEntries(wxFile& dec)
{
m_entries.resize(m_header.file_count);
dec.Seek(0);
dec.Read(&m_entries[0], sizeof(PKGEntry) * m_header.file_count);
if (m_entries[0].name_offset / sizeof(PKGEntry) != m_header.file_count) {
ConLog.Error("PKG Loader: Entries are damaged!");
return false;
}
return true;
}
bool PKGLoader::UnpackEntry(wxFile& dec, const PKGEntry& entry, std::string dir)
{
u8 buf[BUF_SIZE];
dec.Seek(entry.name_offset);
dec.Read(buf, entry.name_size);
buf[entry.name_size] = 0;
switch (entry.type & (0xff))
{
case PKG_FILE_ENTRY_NPDRM:
case PKG_FILE_ENTRY_NPDRMEDAT:
case PKG_FILE_ENTRY_SDAT:
case PKG_FILE_ENTRY_REGULAR:
{
wxFile out;
out.Create(dir + buf);
dec.Seek(entry.file_offset);
for (u64 size = 0; size < entry.file_size; ) {
size += dec.Read(buf, BUF_SIZE);
if (size > entry.file_size)
out.Write(buf, BUF_SIZE - (size - entry.file_size));
else
out.Write(buf, BUF_SIZE);
}
out.Close();
}
break;
case PKG_FILE_ENTRY_FOLDER:
wxMkdir(dir + buf);
break;
}
return true;
}
void PKGLoader::Decrypt(wxFile& out)
{
aes_context c;
u8 iv[HASH_LEN];
u8 buf[BUF_SIZE];
u8 ctr[BUF_SIZE];
// Debug key
u8 key[0x40];
memset(key, 0, 0x40);
memcpy(key+0x00, &m_header.qa_digest[0], 8); // &data[0x60]
memcpy(key+0x08, &m_header.qa_digest[0], 8); // &data[0x60]
memcpy(key+0x10, &m_header.qa_digest[8], 8); // &data[0x68]
memcpy(key+0x18, &m_header.qa_digest[8], 8); // &data[0x68]
pkg_f.Seek(m_header.data_offset);
u32 parts = (m_header.data_size + BUF_SIZE - 1) / BUF_SIZE;
wxProgressDialog pdlg("PKG Decrypter / Installer", "Please wait, decrypting...", parts, 0, wxPD_AUTO_HIDE | wxPD_APP_MODAL);
memcpy(iv, m_header.klicensee, sizeof(iv));
aes_setkey_enc(&c, PKG_AES_KEY, 128);
for (u32 i=0; i<parts; i++)
{
memset(buf, 0, sizeof(buf));
u32 length = pkg_f.Read(buf, BUF_SIZE);
u32 bits = (length + HASH_LEN - 1) / HASH_LEN;
if (m_header.pkg_type == PKG_RELEASE_TYPE_DEBUG)
{
for (u32 j=0; j<bits; j++)
{
u8 hash[0x14];
sha1(key, 0x40, hash);
*(u64*)&buf[j*HASH_LEN + 0] ^= *(u64*)&hash[0];
*(u64*)&buf[j*HASH_LEN + 8] ^= *(u64*)&hash[8];
*(be_t<u64>*)&key[0x38] += 1;
}
}
if (m_header.pkg_type == PKG_RELEASE_TYPE_RELEASE)
{
for (u32 j=0; j<bits; j++)
{
aes_crypt_ecb(&c, AES_ENCRYPT, iv, ctr+j*HASH_LEN);
be_t<u64> hi = *(be_t<u64>*)&iv[0];
be_t<u64> lo = *(be_t<u64>*)&iv[8] + 1;
if (lo == 0)
hi += 1;
*(be_t<u64>*)&iv[0] = hi;
*(be_t<u64>*)&iv[8] = lo;
}
for (u32 j=0; j<length; j++) {
buf[j] ^= ctr[j];
}
}
out.Write(buf, length);
pdlg.Update(i);
}
pdlg.Update(parts);
}

View File

@ -1,76 +1,12 @@
#pragma once #pragma once
#include "Loader.h" #include "Loader.h"
// Constants
#define PKG_HEADER_SIZE 0xC0 //sizeof(pkg_header) + sizeof(pkg_unk_checksum)
#define PKG_RELEASE_TYPE_RELEASE 0x8000
#define PKG_RELEASE_TYPE_DEBUG 0x0000
#define PKG_PLATFORM_TYPE_PS3 0x0001
#define PKG_PLATFORM_TYPE_PSP 0x0002
#define PKG_FILE_ENTRY_NPDRM 0x0001
#define PKG_FILE_ENTRY_NPDRMEDAT 0x0002
#define PKG_FILE_ENTRY_REGULAR 0x0003
#define PKG_FILE_ENTRY_FOLDER 0x0004
#define PKG_FILE_ENTRY_SDAT 0x0009
#define PKG_FILE_ENTRY_OVERWRITE 0x80000000
#define HASH_LEN 16
#define BUF_SIZE 4096
// Key
static const u8 PKG_AES_KEY[16] = {
0x2e, 0x7b, 0x71, 0xd7,
0xc9, 0xc9, 0xa1, 0x4e,
0xa3, 0x22, 0x1f, 0x18,
0x88, 0x28, 0xb8, 0xf8
};
// Structs
struct PKGHeader
{
be_t<u32> pkg_magic; // Magic (0x7f504b47)
be_t<u16> pkg_type; // Release type (Retail:0x8000, Debug:0x0000)
be_t<u16> pkg_platform; // Platform type (PS3:0x0001, PSP:0x0002)
be_t<u32> header_size; // Header size (0xc0)
be_t<u32> unk1; // Some PKG version maybe?
be_t<u32> meta_size; // Size of metadata (block after header & hashes)
be_t<u32> file_count; // Number of files
be_t<u64> pkg_size; // PKG size in bytes
be_t<u64> data_offset; // Encrypted data offset
be_t<u64> data_size; // Encrypted data size in bytes
char title_id[48]; // Title ID
u8 qa_digest[16]; // This should be the hash of "files + attribs"
u8 klicensee[16]; // Nonce
};
struct PKGEntry
{
be_t<u32> name_offset; // File name offset
be_t<u32> name_size; // File name size
be_t<u64> file_offset; // File offset
be_t<u64> file_size; // File size
be_t<u32> type; // File type
be_t<u32> pad; // Padding (zeros)
};
class PKGLoader class PKGLoader
{ {
wxFile& pkg_f; wxFile& pkg_f;
PKGHeader m_header;
std::vector<PKGEntry> m_entries;
virtual void Decrypt(wxFile& out);
public: public:
PKGLoader(wxFile& f); PKGLoader(wxFile& f);
virtual bool Install(std::string dest, bool show = false); virtual bool Install(std::string dest);
virtual bool LoadHeader(bool show = false);
virtual bool CheckHeader();
virtual bool LoadEntries(wxFile& dec);
virtual bool UnpackEntry(wxFile& dec, const PKGEntry& entry, std::string dir);
virtual bool Close(); virtual bool Close();
}; };

View File

@ -1,409 +1,415 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32"> <ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64"> <ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>x64</Platform> <Platform>x64</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32"> <ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release|x64"> <ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>x64</Platform> <Platform>x64</Platform>
</ProjectConfiguration> </ProjectConfiguration>
</ItemGroup> </ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}</ProjectGuid> <ProjectGuid>{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>rpcs3</RootNamespace> <RootNamespace>rpcs3</RootNamespace>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset> <PlatformToolset>v110</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset> <PlatformToolset>v110</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset> <PlatformToolset>v110</PlatformToolset>
<CLRSupport>false</CLRSupport> <CLRSupport>false</CLRSupport>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset> <PlatformToolset>v110</PlatformToolset>
<CLRSupport>false</CLRSupport> <CLRSupport>false</CLRSupport>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<IncludePath>.\;..\wxWidgets\include;..\SDL-1.3.0-5538\include;..\SDL_image-1.2.10;..\pthreads-2.8.0;..\;..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\x86\Include;$(IncludePath)</IncludePath> <IncludePath>.\;..\wxWidgets\include;..\SDL-1.3.0-5538\include;..\SDL_image-1.2.10;..\pthreads-2.8.0;..\;..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\x86\Include;$(IncludePath)</IncludePath>
<OutDir>$(SolutionDir)bin\</OutDir> <OutDir>$(SolutionDir)bin\</OutDir>
<LibraryPath>..\libs\$(Configuration)\;$(LibraryPath)</LibraryPath> <LibraryPath>..\libs\$(Configuration)\;$(LibraryPath)</LibraryPath>
<TargetName>$(ProjectName)-$(PlatformShortName)-dbg</TargetName> <TargetName>$(ProjectName)-$(PlatformShortName)-dbg</TargetName>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<IncludePath>.\;..\wxWidgets\include;..\SDL-1.3.0-5538\include;..\SDL_image-1.2.10;..\pthreads-2.8.0;..\;..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\x86_64\Include;$(IncludePath)</IncludePath> <IncludePath>.\;..\wxWidgets\include;..\SDL-1.3.0-5538\include;..\SDL_image-1.2.10;..\pthreads-2.8.0;..\;..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\x86_64\Include;$(IncludePath)</IncludePath>
<OutDir>$(SolutionDir)bin\</OutDir> <OutDir>$(SolutionDir)bin\</OutDir>
<LibraryPath>..\libs\$(Configuration)\;$(LibraryPath)</LibraryPath> <LibraryPath>..\libs\$(Configuration)\;$(LibraryPath)</LibraryPath>
<TargetName>$(ProjectName)-$(PlatformShortName)-dbg</TargetName> <TargetName>$(ProjectName)-$(PlatformShortName)-dbg</TargetName>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<IncludePath>.\;..\wxWidgets\include;..\SDL-1.3.0-5538\include;..\SDL_image-1.2.10;..\pthreads-2.8.0;..\;..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\x86\Include;$(IncludePath)</IncludePath> <IncludePath>.\;..\wxWidgets\include;..\SDL-1.3.0-5538\include;..\SDL_image-1.2.10;..\pthreads-2.8.0;..\;..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\x86\Include;$(IncludePath)</IncludePath>
<OutDir>$(SolutionDir)bin\</OutDir> <OutDir>$(SolutionDir)bin\</OutDir>
<LibraryPath>..\libs\$(Configuration)\;$(LibraryPath)</LibraryPath> <LibraryPath>..\libs\$(Configuration)\;$(LibraryPath)</LibraryPath>
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<RunCodeAnalysis>false</RunCodeAnalysis> <RunCodeAnalysis>false</RunCodeAnalysis>
<TargetName>$(ProjectName)-$(PlatformShortName)</TargetName> <TargetName>$(ProjectName)-$(PlatformShortName)</TargetName>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<IncludePath>.\;..\wxWidgets\include;..\SDL-1.3.0-5538\include;..\SDL_image-1.2.10;..\pthreads-2.8.0;..\;..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\x86_64\Include;$(IncludePath)</IncludePath> <IncludePath>.\;..\wxWidgets\include;..\SDL-1.3.0-5538\include;..\SDL_image-1.2.10;..\pthreads-2.8.0;..\;..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\x86_64\Include;$(IncludePath)</IncludePath>
<OutDir>$(SolutionDir)bin\</OutDir> <OutDir>$(SolutionDir)bin\</OutDir>
<LibraryPath>..\libs\$(Configuration)\;$(LibraryPath)</LibraryPath> <LibraryPath>..\libs\$(Configuration)\;$(LibraryPath)</LibraryPath>
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<RunCodeAnalysis>false</RunCodeAnalysis> <RunCodeAnalysis>false</RunCodeAnalysis>
<TargetName>$(ProjectName)-$(PlatformShortName)</TargetName> <TargetName>$(ProjectName)-$(PlatformShortName)</TargetName>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat> <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<BufferSecurityCheck>true</BufferSecurityCheck> <BufferSecurityCheck>true</BufferSecurityCheck>
<AdditionalIncludeDirectories>..\wxWidgets\include\msvc</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\wxWidgets\include\msvc</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>wxmsw31ud_adv.lib;wxbase31ud.lib;wxmsw31ud_core.lib;wxmsw31ud_aui.lib;wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;odbc32.lib;odbccp32.lib;comctl32.lib;ws2_32.lib;shlwapi.lib;winmm.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;avcodec.lib;avformat.lib;avutil.lib;swresample.lib;swscale.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>wxmsw31ud_adv.lib;wxbase31ud.lib;wxmsw31ud_core.lib;wxmsw31ud_aui.lib;wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;odbc32.lib;odbccp32.lib;comctl32.lib;ws2_32.lib;shlwapi.lib;winmm.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;avcodec.lib;avformat.lib;avutil.lib;swresample.lib;swscale.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<DataExecutionPrevention>false</DataExecutionPrevention> <DataExecutionPrevention>false</DataExecutionPrevention>
<AdditionalLibraryDirectories>..\wxWidgets\lib\vc_lib;..\ffmpeg\Windows\x86\lib</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>..\wxWidgets\lib\vc_lib;..\ffmpeg\Windows\x86\lib</AdditionalLibraryDirectories>
</Link> </Link>
<PreBuildEvent> <PreBuildEvent>
<Command> <Command>
</Command> </Command>
</PreBuildEvent> </PreBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<AdditionalIncludeDirectories>..\wxWidgets\include\msvc</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\wxWidgets\include\msvc</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>wxmsw31ud_adv.lib;wxbase31ud.lib;wxmsw31ud_core.lib;wxmsw31ud_aui.lib;wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;odbc32.lib;odbccp32.lib;comctl32.lib;ws2_32.lib;shlwapi.lib;winmm.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;avcodec.lib;avformat.lib;avutil.lib;swresample.lib;swscale.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>wxmsw31ud_adv.lib;wxbase31ud.lib;wxmsw31ud_core.lib;wxmsw31ud_aui.lib;wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;odbc32.lib;odbccp32.lib;comctl32.lib;ws2_32.lib;shlwapi.lib;winmm.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;avcodec.lib;avformat.lib;avutil.lib;swresample.lib;swscale.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<DataExecutionPrevention>false</DataExecutionPrevention> <DataExecutionPrevention>false</DataExecutionPrevention>
<AdditionalLibraryDirectories>..\wxWidgets\lib\vc_x64_lib;..\ffmpeg\Windows\x86_64\lib</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>..\wxWidgets\lib\vc_x64_lib;..\ffmpeg\Windows\x86_64\lib</AdditionalLibraryDirectories>
</Link> </Link>
<PreBuildEvent> <PreBuildEvent>
<Command>"$(SolutionDir)\Utilities\git-version-gen.cmd"</Command> <Command>"$(SolutionDir)\Utilities\git-version-gen.cmd"</Command>
</PreBuildEvent> </PreBuildEvent>
<ProjectReference> <ProjectReference>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs> <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference> </ProjectReference>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile> <ClCompile>
<WarningLevel>TurnOffAllWarnings</WarningLevel> <WarningLevel>TurnOffAllWarnings</WarningLevel>
<Optimization>Full</Optimization> <Optimization>Full</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\wxWidgets\include\msvc</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\wxWidgets\include\msvc</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableLanguageExtensions>false</DisableLanguageExtensions> <DisableLanguageExtensions>false</DisableLanguageExtensions>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<ExceptionHandling>Sync</ExceptionHandling> <ExceptionHandling>Sync</ExceptionHandling>
<EnablePREfast>false</EnablePREfast> <EnablePREfast>false</EnablePREfast>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>wxmsw31u_adv.lib;wxbase31u.lib;wxmsw31u_core.lib;wxmsw31u_aui.lib;odbc32.lib;odbccp32.lib;comctl32.lib;ws2_32.lib;shlwapi.lib;winmm.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;wsock32.lib;wininet.lib;avcodec.lib;avformat.lib;avutil.lib;swresample.lib;swscale.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>wxmsw31u_adv.lib;wxbase31u.lib;wxmsw31u_core.lib;wxmsw31u_aui.lib;odbc32.lib;odbccp32.lib;comctl32.lib;ws2_32.lib;shlwapi.lib;winmm.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;wsock32.lib;wininet.lib;avcodec.lib;avformat.lib;avutil.lib;swresample.lib;swscale.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreAllDefaultLibraries> <IgnoreAllDefaultLibraries>
</IgnoreAllDefaultLibraries> </IgnoreAllDefaultLibraries>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<DataExecutionPrevention>false</DataExecutionPrevention> <DataExecutionPrevention>false</DataExecutionPrevention>
<AdditionalLibraryDirectories>..\wxWidgets\lib\vc_lib;..\ffmpeg\Windows\x86\lib</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>..\wxWidgets\lib\vc_lib;..\ffmpeg\Windows\x86\lib</AdditionalLibraryDirectories>
</Link> </Link>
<PreBuildEvent> <PreBuildEvent>
<Command> <Command>
</Command> </Command>
</PreBuildEvent> </PreBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Full</Optimization> <Optimization>Full</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\wxWidgets\include\msvc</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\wxWidgets\include\msvc</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableLanguageExtensions>false</DisableLanguageExtensions> <DisableLanguageExtensions>false</DisableLanguageExtensions>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<ExceptionHandling>Sync</ExceptionHandling> <ExceptionHandling>Sync</ExceptionHandling>
<EnablePREfast>false</EnablePREfast> <EnablePREfast>false</EnablePREfast>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>wxmsw31u_adv.lib;wxbase31u.lib;wxmsw31u_core.lib;wxmsw31u_aui.lib;odbc32.lib;odbccp32.lib;comctl32.lib;ws2_32.lib;shlwapi.lib;winmm.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;wsock32.lib;wininet.lib;avcodec.lib;avformat.lib;avutil.lib;swresample.lib;swscale.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>wxmsw31u_adv.lib;wxbase31u.lib;wxmsw31u_core.lib;wxmsw31u_aui.lib;odbc32.lib;odbccp32.lib;comctl32.lib;ws2_32.lib;shlwapi.lib;winmm.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;wsock32.lib;wininet.lib;avcodec.lib;avformat.lib;avutil.lib;swresample.lib;swscale.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreAllDefaultLibraries> <IgnoreAllDefaultLibraries>
</IgnoreAllDefaultLibraries> </IgnoreAllDefaultLibraries>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<DataExecutionPrevention>false</DataExecutionPrevention> <DataExecutionPrevention>false</DataExecutionPrevention>
<AdditionalLibraryDirectories>..\wxWidgets\lib\vc_x64_lib;..\ffmpeg\Windows\x86_64\lib</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>..\wxWidgets\lib\vc_x64_lib;..\ffmpeg\Windows\x86_64\lib</AdditionalLibraryDirectories>
</Link> </Link>
<PreBuildEvent> <PreBuildEvent>
<Command> <Command>
</Command> </Command>
</PreBuildEvent> </PreBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\scetool\scetool.cpp"> <ClCompile Include="..\Utilities\SMutex.cpp" />
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader> <ClCompile Include="..\Utilities\Thread.cpp" />
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader> <ClCompile Include="AppConnector.cpp" />
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader> <ClCompile Include="Crypto\aes.cpp" />
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader> <ClCompile Include="Crypto\key_vault.cpp" />
</ClCompile> <ClCompile Include="Crypto\sha1.cpp" />
<ClCompile Include="..\Utilities\SMutex.cpp" /> <ClCompile Include="Crypto\unpkg.cpp" />
<ClCompile Include="..\Utilities\Thread.cpp" /> <ClCompile Include="Crypto\unself.cpp" />
<ClCompile Include="AppConnector.cpp" /> <ClCompile Include="Crypto\utils.cpp" />
<ClCompile Include="Emu\Audio\AudioManager.cpp" /> <ClCompile Include="Emu\Audio\AudioManager.cpp" />
<ClCompile Include="Emu\ARMv7\ARMv7Thread.cpp" /> <ClCompile Include="Emu\ARMv7\ARMv7Thread.cpp" />
<ClCompile Include="Emu\Cell\MFC.cpp" /> <ClCompile Include="Emu\Cell\MFC.cpp" />
<ClCompile Include="Emu\Cell\PPCDecoder.cpp" /> <ClCompile Include="Emu\Cell\PPCDecoder.cpp" />
<ClCompile Include="Emu\Cell\PPCThread.cpp" /> <ClCompile Include="Emu\Cell\PPCThread.cpp" />
<ClCompile Include="Emu\Cell\PPUProgramCompiler.cpp" /> <ClCompile Include="Emu\Cell\PPUProgramCompiler.cpp" />
<ClCompile Include="Emu\Cell\PPUThread.cpp" /> <ClCompile Include="Emu\Cell\PPUThread.cpp" />
<ClCompile Include="Emu\Cell\RawSPUThread.cpp" /> <ClCompile Include="Emu\Cell\RawSPUThread.cpp" />
<ClCompile Include="Emu\Cell\SPUThread.cpp" /> <ClCompile Include="Emu\Cell\SPUThread.cpp" />
<ClCompile Include="Emu\CPU\CPUThread.cpp" /> <ClCompile Include="Emu\CPU\CPUThread.cpp" />
<ClCompile Include="Emu\CPU\CPUThreadManager.cpp" /> <ClCompile Include="Emu\CPU\CPUThreadManager.cpp" />
<ClCompile Include="Emu\DbgConsole.cpp" /> <ClCompile Include="Emu\DbgConsole.cpp" />
<ClCompile Include="Emu\Event.cpp" /> <ClCompile Include="Emu\Event.cpp" />
<ClCompile Include="Emu\FS\VFS.cpp" /> <ClCompile Include="Emu\FS\VFS.cpp" />
<ClCompile Include="Emu\FS\vfsDevice.cpp" /> <ClCompile Include="Emu\FS\vfsDevice.cpp" />
<ClCompile Include="Emu\FS\vfsDeviceLocalFile.cpp" /> <ClCompile Include="Emu\FS\vfsDeviceLocalFile.cpp" />
<ClCompile Include="Emu\FS\vfsDir.cpp" /> <ClCompile Include="Emu\FS\vfsDir.cpp" />
<ClCompile Include="Emu\FS\vfsDirBase.cpp" /> <ClCompile Include="Emu\FS\vfsDirBase.cpp" />
<ClCompile Include="Emu\FS\vfsFile.cpp" /> <ClCompile Include="Emu\FS\vfsFile.cpp" />
<ClCompile Include="Emu\FS\vfsFileBase.cpp" /> <ClCompile Include="Emu\FS\vfsFileBase.cpp" />
<ClCompile Include="Emu\FS\vfsLocalDir.cpp" /> <ClCompile Include="Emu\FS\vfsLocalDir.cpp" />
<ClCompile Include="Emu\FS\vfsLocalFile.cpp" /> <ClCompile Include="Emu\FS\vfsLocalFile.cpp" />
<ClCompile Include="Emu\FS\vfsStream.cpp" /> <ClCompile Include="Emu\FS\vfsStream.cpp" />
<ClCompile Include="Emu\FS\vfsStreamMemory.cpp" /> <ClCompile Include="Emu\FS\vfsStreamMemory.cpp" />
<ClCompile Include="Emu\GS\GL\GLBuffers.cpp" /> <ClCompile Include="Emu\GS\GL\GLBuffers.cpp" />
<ClCompile Include="Emu\GS\GL\GLFragmentProgram.cpp" /> <ClCompile Include="Emu\GS\GL\GLFragmentProgram.cpp" />
<ClCompile Include="Emu\GS\GL\GLGSRender.cpp" /> <ClCompile Include="Emu\GS\GL\GLGSRender.cpp" />
<ClCompile Include="Emu\GS\GL\GLProgram.cpp" /> <ClCompile Include="Emu\GS\GL\GLProgram.cpp" />
<ClCompile Include="Emu\GS\GL\GLProgramBuffer.cpp" /> <ClCompile Include="Emu\GS\GL\GLProgramBuffer.cpp" />
<ClCompile Include="Emu\GS\GL\GLVertexProgram.cpp" /> <ClCompile Include="Emu\GS\GL\GLVertexProgram.cpp" />
<ClCompile Include="Emu\GS\GL\OpenGL.cpp" /> <ClCompile Include="Emu\GS\GL\OpenGL.cpp" />
<ClCompile Include="Emu\GS\GSManager.cpp" /> <ClCompile Include="Emu\GS\GSManager.cpp" />
<ClCompile Include="Emu\GS\GSRender.cpp" /> <ClCompile Include="Emu\GS\GSRender.cpp" />
<ClCompile Include="Emu\GS\RSXTexture.cpp" /> <ClCompile Include="Emu\GS\RSXTexture.cpp" />
<ClCompile Include="Emu\GS\RSXThread.cpp" /> <ClCompile Include="Emu\GS\RSXThread.cpp" />
<ClCompile Include="Emu\HDD\HDD.cpp" /> <ClCompile Include="Emu\HDD\HDD.cpp" />
<ClCompile Include="Emu\Io\Keyboard.cpp" /> <ClCompile Include="Emu\Io\Keyboard.cpp" />
<ClCompile Include="Emu\Io\Mouse.cpp" /> <ClCompile Include="Emu\Io\Mouse.cpp" />
<ClCompile Include="Emu\Io\Pad.cpp" /> <ClCompile Include="Emu\Io\Pad.cpp" />
<ClCompile Include="Emu\Memory\Memory.cpp" /> <ClCompile Include="Emu\Memory\Memory.cpp" />
<ClCompile Include="Emu\SysCalls\Callback.cpp" /> <ClCompile Include="Emu\SysCalls\Callback.cpp" />
<ClCompile Include="Emu\SysCalls\FuncList.cpp" /> <ClCompile Include="Emu\SysCalls\FuncList.cpp" />
<ClCompile Include="Emu\SysCalls\lv2\SC_Condition.cpp" /> <ClCompile Include="Emu\SysCalls\lv2\SC_Condition.cpp" />
<ClCompile Include="Emu\SysCalls\lv2\SC_Event.cpp" /> <ClCompile Include="Emu\SysCalls\lv2\SC_Event.cpp" />
<ClCompile Include="Emu\SysCalls\lv2\SC_Event_flag.cpp" /> <ClCompile Include="Emu\SysCalls\lv2\SC_Event_flag.cpp" />
<ClCompile Include="Emu\SysCalls\lv2\SC_FileSystem.cpp" /> <ClCompile Include="Emu\SysCalls\lv2\SC_FileSystem.cpp" />
<ClCompile Include="Emu\SysCalls\lv2\SC_GCM.cpp" /> <ClCompile Include="Emu\SysCalls\lv2\SC_GCM.cpp" />
<ClCompile Include="Emu\SysCalls\lv2\SC_Heap.cpp" /> <ClCompile Include="Emu\SysCalls\lv2\SC_Heap.cpp" />
<ClCompile Include="Emu\SysCalls\lv2\SC_Keyboard.cpp" /> <ClCompile Include="Emu\SysCalls\lv2\SC_Keyboard.cpp" />
<ClCompile Include="Emu\SysCalls\lv2\SC_Lwcond.cpp" /> <ClCompile Include="Emu\SysCalls\lv2\SC_Lwcond.cpp" />
<ClCompile Include="Emu\SysCalls\lv2\SC_Lwmutex.cpp" /> <ClCompile Include="Emu\SysCalls\lv2\SC_Lwmutex.cpp" />
<ClCompile Include="Emu\SysCalls\lv2\SC_Memory.cpp" /> <ClCompile Include="Emu\SysCalls\lv2\SC_Memory.cpp" />
<ClCompile Include="Emu\SysCalls\lv2\SC_Mouse.cpp" /> <ClCompile Include="Emu\SysCalls\lv2\SC_Mouse.cpp" />
<ClCompile Include="Emu\SysCalls\lv2\SC_Mutex.cpp" /> <ClCompile Include="Emu\SysCalls\lv2\SC_Mutex.cpp" />
<ClCompile Include="Emu\SysCalls\lv2\SC_Pad.cpp" /> <ClCompile Include="Emu\SysCalls\lv2\SC_Pad.cpp" />
<ClCompile Include="Emu\SysCalls\lv2\SC_PPU_Thread.cpp" /> <ClCompile Include="Emu\SysCalls\lv2\SC_PPU_Thread.cpp" />
<ClCompile Include="Emu\SysCalls\lv2\SC_Process.cpp" /> <ClCompile Include="Emu\SysCalls\lv2\SC_Process.cpp" />
<ClCompile Include="Emu\SysCalls\lv2\SC_RSX.cpp" /> <ClCompile Include="Emu\SysCalls\lv2\SC_RSX.cpp" />
<ClCompile Include="Emu\SysCalls\lv2\SC_Rwlock.cpp" /> <ClCompile Include="Emu\SysCalls\lv2\SC_Rwlock.cpp" />
<ClCompile Include="Emu\SysCalls\lv2\SC_Semaphore.cpp" /> <ClCompile Include="Emu\SysCalls\lv2\SC_Semaphore.cpp" />
<ClCompile Include="Emu\SysCalls\lv2\SC_SPU_Thread.cpp" /> <ClCompile Include="Emu\SysCalls\lv2\SC_SPU_Thread.cpp" />
<ClCompile Include="Emu\SysCalls\lv2\SC_Time.cpp" /> <ClCompile Include="Emu\SysCalls\lv2\SC_Time.cpp" />
<ClCompile Include="Emu\SysCalls\lv2\SC_Timer.cpp" /> <ClCompile Include="Emu\SysCalls\lv2\SC_Timer.cpp" />
<ClCompile Include="Emu\SysCalls\lv2\SC_Trace.cpp" /> <ClCompile Include="Emu\SysCalls\lv2\SC_Trace.cpp" />
<ClCompile Include="Emu\SysCalls\lv2\SC_TTY.cpp" /> <ClCompile Include="Emu\SysCalls\lv2\SC_TTY.cpp" />
<ClCompile Include="Emu\SysCalls\lv2\SC_VM.cpp" /> <ClCompile Include="Emu\SysCalls\lv2\SC_VM.cpp" />
<ClCompile Include="Emu\SysCalls\Modules.cpp" /> <ClCompile Include="Emu\SysCalls\Modules.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellAdec.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellAdec.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellAudio.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellAudio.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellDmux.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellDmux.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellFont.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellFont.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellFontFT.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellFontFT.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellGame.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellGame.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellGcmSys.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellGcmSys.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellGifDec.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellGifDec.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellJpgDec.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellJpgDec.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellPamf.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellPamf.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellPngDec.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellPngDec.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellResc.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellResc.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellRtc.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellRtc.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellSync.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellSync.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellSysmodule.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellSysmodule.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellSysutil.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellSysutil.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellSysutilAp.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellSysutilAp.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellVdec.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellVdec.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellVpost.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\cellVpost.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\sceNp.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\sceNp.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\sceNpTrophy.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\sceNpTrophy.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\sysPrxForUser.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\sysPrxForUser.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\sys_fs.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\sys_fs.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\sys_io.cpp" /> <ClCompile Include="Emu\SysCalls\Modules\sys_io.cpp" />
<ClCompile Include="Emu\SysCalls\SysCalls.cpp" /> <ClCompile Include="Emu\SysCalls\SysCalls.cpp" />
<ClCompile Include="Emu\System.cpp" /> <ClCompile Include="Emu\System.cpp" />
<ClCompile Include="Gui\CompilerELF.cpp" /> <ClCompile Include="Gui\CompilerELF.cpp" />
<ClCompile Include="Gui\ConLog.cpp" /> <ClCompile Include="Gui\ConLog.cpp" />
<ClCompile Include="Gui\Debugger.cpp" /> <ClCompile Include="Gui\Debugger.cpp" />
<ClCompile Include="Gui\DisAsmFrame.cpp" /> <ClCompile Include="Gui\DisAsmFrame.cpp" />
<ClCompile Include="Gui\GameViewer.cpp" /> <ClCompile Include="Gui\GameViewer.cpp" />
<ClCompile Include="Gui\InterpreterDisAsm.cpp" /> <ClCompile Include="Gui\InterpreterDisAsm.cpp" />
<ClCompile Include="Gui\MainFrame.cpp" /> <ClCompile Include="Gui\MainFrame.cpp" />
<ClCompile Include="Gui\MemoryViewer.cpp" /> <ClCompile Include="Gui\MemoryViewer.cpp" />
<ClCompile Include="Gui\RSXDebugger.cpp" /> <ClCompile Include="Gui\RSXDebugger.cpp" />
<ClCompile Include="Gui\TextInputDialog.cpp" /> <ClCompile Include="Gui\TextInputDialog.cpp" />
<ClCompile Include="Gui\VFSManager.cpp" /> <ClCompile Include="Gui\VFSManager.cpp" />
<ClCompile Include="Gui\VHDDManager.cpp" /> <ClCompile Include="Gui\VHDDManager.cpp" />
<ClCompile Include="Ini.cpp" /> <ClCompile Include="Ini.cpp" />
<ClCompile Include="Loader\ELF.cpp" /> <ClCompile Include="Loader\ELF.cpp" />
<ClCompile Include="Loader\ELF32.cpp" /> <ClCompile Include="Loader\ELF32.cpp" />
<ClCompile Include="Loader\ELF64.cpp" /> <ClCompile Include="Loader\ELF64.cpp" />
<ClCompile Include="Loader\Loader.cpp" /> <ClCompile Include="Loader\Loader.cpp" />
<ClCompile Include="Loader\PKG.cpp" /> <ClCompile Include="Loader\PKG.cpp" />
<ClCompile Include="Loader\PSF.cpp" /> <ClCompile Include="Loader\PSF.cpp" />
<ClCompile Include="Loader\SELF.cpp" /> <ClCompile Include="Loader\SELF.cpp" />
<ClCompile Include="Loader\TRP.cpp" /> <ClCompile Include="Loader\TRP.cpp" />
<ClCompile Include="rpcs3.cpp" /> <ClCompile Include="rpcs3.cpp" />
<ClCompile Include="stdafx.cpp"> <ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="rpcs3.rc" /> <ResourceCompile Include="rpcs3.rc" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\Utilities\Array.h" /> <ClInclude Include="..\Utilities\Array.h" />
<ClInclude Include="..\Utilities\BEType.h" /> <ClInclude Include="..\Utilities\BEType.h" />
<ClInclude Include="..\Utilities\IdManager.h" /> <ClInclude Include="..\Utilities\IdManager.h" />
<ClInclude Include="..\Utilities\MTProgressDialog.h" /> <ClInclude Include="..\Utilities\MTProgressDialog.h" />
<ClInclude Include="..\Utilities\SMutex.h" /> <ClInclude Include="..\Utilities\SMutex.h" />
<ClInclude Include="..\Utilities\SQueue.h" /> <ClInclude Include="..\Utilities\SQueue.h" />
<ClInclude Include="..\Utilities\Thread.h" /> <ClInclude Include="..\Utilities\Thread.h" />
<ClInclude Include="..\Utilities\Timer.h" /> <ClInclude Include="..\Utilities\Timer.h" />
<ClInclude Include="Emu\Audio\AudioManager.h" /> <ClInclude Include="Crypto\aes.h" />
<ClInclude Include="Emu\Audio\cellAudio.h" /> <ClInclude Include="Crypto\key_vault.h" />
<ClInclude Include="Emu\Cell\MFC.h" /> <ClInclude Include="Crypto\sha1.h" />
<ClInclude Include="Emu\Cell\PPCDecoder.h" /> <ClInclude Include="Crypto\unpkg.h" />
<ClInclude Include="Emu\Cell\PPCDisAsm.h" /> <ClInclude Include="Crypto\unself.h" />
<ClInclude Include="Emu\Cell\PPCInstrTable.h" /> <ClInclude Include="Crypto\utils.h" />
<ClInclude Include="Emu\Cell\PPCThread.h" /> <ClInclude Include="Emu\Audio\AudioManager.h" />
<ClInclude Include="Emu\Cell\PPCThreadManager.h" /> <ClInclude Include="Emu\Audio\cellAudio.h" />
<ClInclude Include="Emu\Cell\PPUDecoder.h" /> <ClInclude Include="Emu\Cell\MFC.h" />
<ClInclude Include="Emu\Cell\PPUDisAsm.h" /> <ClInclude Include="Emu\Cell\PPCDecoder.h" />
<ClInclude Include="Emu\Cell\PPUInstrTable.h" /> <ClInclude Include="Emu\Cell\PPCDisAsm.h" />
<ClInclude Include="Emu\Cell\PPUInterpreter.h" /> <ClInclude Include="Emu\Cell\PPCInstrTable.h" />
<ClInclude Include="Emu\Cell\PPUOpcodes.h" /> <ClInclude Include="Emu\Cell\PPCThread.h" />
<ClInclude Include="Emu\Cell\PPUProgramCompiler.h" /> <ClInclude Include="Emu\Cell\PPCThreadManager.h" />
<ClInclude Include="Emu\Cell\PPUThread.h" /> <ClInclude Include="Emu\Cell\PPUDecoder.h" />
<ClInclude Include="Emu\Cell\RawSPUThread.h" /> <ClInclude Include="Emu\Cell\PPUDisAsm.h" />
<ClInclude Include="Emu\Cell\SPUDecoder.h" /> <ClInclude Include="Emu\Cell\PPUInstrTable.h" />
<ClInclude Include="Emu\Cell\SPUDisAsm.h" /> <ClInclude Include="Emu\Cell\PPUInterpreter.h" />
<ClInclude Include="Emu\Cell\SPUInterpreter.h" /> <ClInclude Include="Emu\Cell\PPUOpcodes.h" />
<ClInclude Include="Emu\Cell\SPUOpcodes.h" /> <ClInclude Include="Emu\Cell\PPUProgramCompiler.h" />
<ClInclude Include="Emu\Cell\SPUThread.h" /> <ClInclude Include="Emu\Cell\PPUThread.h" />
<ClInclude Include="Emu\DbgConsole.h" /> <ClInclude Include="Emu\Cell\RawSPUThread.h" />
<ClInclude Include="Emu\GameInfo.h" /> <ClInclude Include="Emu\Cell\SPUDecoder.h" />
<ClInclude Include="Emu\GS\GCM.h" /> <ClInclude Include="Emu\Cell\SPUDisAsm.h" />
<ClInclude Include="Emu\GS\GL\GLGSRender.h" /> <ClInclude Include="Emu\Cell\SPUInterpreter.h" />
<ClInclude Include="Emu\GS\GSManager.h" /> <ClInclude Include="Emu\Cell\SPUOpcodes.h" />
<ClInclude Include="Emu\GS\GSRender.h" /> <ClInclude Include="Emu\Cell\SPUThread.h" />
<ClInclude Include="Emu\GS\Null\NullGSRender.h" /> <ClInclude Include="Emu\DbgConsole.h" />
<ClInclude Include="Emu\Io\Null\NullPadHandler.h" /> <ClInclude Include="Emu\GameInfo.h" />
<ClInclude Include="Emu\Io\Pad.h" /> <ClInclude Include="Emu\GS\GCM.h" />
<ClInclude Include="Emu\Io\PadHandler.h" /> <ClInclude Include="Emu\GS\GL\GLGSRender.h" />
<ClInclude Include="Emu\Memory\Memory.h" /> <ClInclude Include="Emu\GS\GSManager.h" />
<ClInclude Include="Emu\Memory\MemoryBlock.h" /> <ClInclude Include="Emu\GS\GSRender.h" />
<ClInclude Include="Emu\SysCalls\ErrorCodes.h" /> <ClInclude Include="Emu\GS\Null\NullGSRender.h" />
<ClInclude Include="Emu\SysCalls\SysCalls.h" /> <ClInclude Include="Emu\Io\Null\NullPadHandler.h" />
<ClInclude Include="Emu\System.h" /> <ClInclude Include="Emu\Io\Pad.h" />
<ClInclude Include="Gui\CompilerELF.h" /> <ClInclude Include="Emu\Io\PadHandler.h" />
<ClInclude Include="Gui\ConLog.h" /> <ClInclude Include="Emu\Memory\Memory.h" />
<ClInclude Include="Gui\DisAsmFrame.h" /> <ClInclude Include="Emu\Memory\MemoryBlock.h" />
<ClInclude Include="Gui\FrameBase.h" /> <ClInclude Include="Emu\SysCalls\ErrorCodes.h" />
<ClInclude Include="Gui\GameViewer.h" /> <ClInclude Include="Emu\SysCalls\SysCalls.h" />
<ClInclude Include="Gui\InterpreterDisAsm.h" /> <ClInclude Include="Emu\System.h" />
<ClInclude Include="Gui\MainFrame.h" /> <ClInclude Include="Gui\CompilerELF.h" />
<ClInclude Include="Gui\MemoryViewer.h" /> <ClInclude Include="Gui\ConLog.h" />
<ClInclude Include="Ini.h" /> <ClInclude Include="Gui\DisAsmFrame.h" />
<ClInclude Include="Loader\ELF.h" /> <ClInclude Include="Gui\FrameBase.h" />
<ClInclude Include="Loader\ELF32.h" /> <ClInclude Include="Gui\GameViewer.h" />
<ClInclude Include="Loader\ELF64.h" /> <ClInclude Include="Gui\InterpreterDisAsm.h" />
<ClInclude Include="Loader\Loader.h" /> <ClInclude Include="Gui\MainFrame.h" />
<ClInclude Include="Loader\PSF.h" /> <ClInclude Include="Gui\MemoryViewer.h" />
<ClInclude Include="Loader\SELF.h" /> <ClInclude Include="Ini.h" />
<ClInclude Include="rpcs3.h" /> <ClInclude Include="Loader\ELF.h" />
<ClInclude Include="stdafx.h" /> <ClInclude Include="Loader\ELF32.h" />
</ItemGroup> <ClInclude Include="Loader\ELF64.h" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ClInclude Include="Loader\Loader.h" />
<ImportGroup Label="ExtensionTargets"> <ClInclude Include="Loader\PSF.h" />
</ImportGroup> <ClInclude Include="Loader\SELF.h" />
<ClInclude Include="rpcs3.h" />
<ClInclude Include="stdafx.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project> </Project>

File diff suppressed because it is too large Load Diff

View File

@ -1,2 +0,0 @@
scetool (C) 2011-2013 by naehrwert
NP local license handling (C) 2012 by flatz

View File

@ -1,10 +0,0 @@
#ifndef _AES_OMAC_H_
#define _AES_OMAC_H_
#include "types.h"
#define AES_OMAC1_DIGEST_SIZE 0x10
void aes_omac1(scetool::u8 *digest, scetool::u8 *input, scetool::u32 length, scetool::u8 *key, scetool::u32 keybits);
#endif

View File

@ -1,200 +0,0 @@
// Copyright 2007,2008,2010 Segher Boessenkool <segher@kernel.crashing.org>
// Licensed under the terms of the GNU GPL, version 2
// http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
#include <string.h>
#include <stdio.h>
#include "types.h"
void bn_print(char *name, scetool::u8 *a, scetool::u32 n)
{
scetool::u32 i;
printf("%s = ", name);
for (i = 0; i < n; i++)
printf("%02x", a[i]);
printf("\n");
}
static void bn_zero(scetool::u8 *d, scetool::u32 n)
{
memset(d, 0, n);
}
void bn_copy(scetool::u8 *d, scetool::u8 *a, scetool::u32 n)
{
memcpy(d, a, n);
}
int bn_compare(scetool::u8 *a, scetool::u8 *b, scetool::u32 n)
{
scetool::u32 i;
for (i = 0; i < n; i++) {
if (a[i] < b[i])
return -1;
if (a[i] > b[i])
return 1;
}
return 0;
}
static scetool::u8 bn_add_1(scetool::u8 *d, scetool::u8 *a, scetool::u8 *b, scetool::u32 n)
{
scetool::u32 i;
scetool::u32 dig;
scetool::u8 c;
c = 0;
for (i = n - 1; i < n; i--) {
dig = a[i] + b[i] + c;
c = dig >> 8;
d[i] = dig;
}
return c;
}
static scetool::u8 bn_sub_1(scetool::u8 *d, scetool::u8 *a, scetool::u8 *b, scetool::u32 n)
{
scetool::u32 i;
scetool::u32 dig;
scetool::u8 c;
c = 1;
for (i = n - 1; i < n; i--) {
dig = a[i] + 255 - b[i] + c;
c = dig >> 8;
d[i] = dig;
}
return 1 - c;
}
void bn_reduce(scetool::u8 *d, scetool::u8 *N, scetool::u32 n)
{
if (bn_compare(d, N, n) >= 0)
bn_sub_1(d, d, N, n);
}
void bn_add(scetool::u8 *d, scetool::u8 *a, scetool::u8 *b, scetool::u8 *N, scetool::u32 n)
{
if (bn_add_1(d, a, b, n))
bn_sub_1(d, d, N, n);
bn_reduce(d, N, n);
}
void bn_sub(scetool::u8 *d, scetool::u8 *a, scetool::u8 *b, scetool::u8 *N, scetool::u32 n)
{
if (bn_sub_1(d, a, b, n))
bn_add_1(d, d, N, n);
}
static const scetool::u8 inv256[0x80] = {
0x01, 0xab, 0xcd, 0xb7, 0x39, 0xa3, 0xc5, 0xef,
0xf1, 0x1b, 0x3d, 0xa7, 0x29, 0x13, 0x35, 0xdf,
0xe1, 0x8b, 0xad, 0x97, 0x19, 0x83, 0xa5, 0xcf,
0xd1, 0xfb, 0x1d, 0x87, 0x09, 0xf3, 0x15, 0xbf,
0xc1, 0x6b, 0x8d, 0x77, 0xf9, 0x63, 0x85, 0xaf,
0xb1, 0xdb, 0xfd, 0x67, 0xe9, 0xd3, 0xf5, 0x9f,
0xa1, 0x4b, 0x6d, 0x57, 0xd9, 0x43, 0x65, 0x8f,
0x91, 0xbb, 0xdd, 0x47, 0xc9, 0xb3, 0xd5, 0x7f,
0x81, 0x2b, 0x4d, 0x37, 0xb9, 0x23, 0x45, 0x6f,
0x71, 0x9b, 0xbd, 0x27, 0xa9, 0x93, 0xb5, 0x5f,
0x61, 0x0b, 0x2d, 0x17, 0x99, 0x03, 0x25, 0x4f,
0x51, 0x7b, 0x9d, 0x07, 0x89, 0x73, 0x95, 0x3f,
0x41, 0xeb, 0x0d, 0xf7, 0x79, 0xe3, 0x05, 0x2f,
0x31, 0x5b, 0x7d, 0xe7, 0x69, 0x53, 0x75, 0x1f,
0x21, 0xcb, 0xed, 0xd7, 0x59, 0xc3, 0xe5, 0x0f,
0x11, 0x3b, 0x5d, 0xc7, 0x49, 0x33, 0x55, 0xff,
};
static void bn_mon_muladd_dig(scetool::u8 *d, scetool::u8 *a, scetool::u8 b, scetool::u8 *N, scetool::u32 n)
{
scetool::u32 dig;
scetool::u32 i;
scetool::u8 z = -(d[n-1] + a[n-1]*b) * inv256[N[n-1]/2];
dig = d[n-1] + a[n-1]*b + N[n-1]*z;
dig >>= 8;
for (i = n - 2; i < n; i--) {
dig += d[i] + a[i]*b + N[i]*z;
d[i+1] = dig;
dig >>= 8;
}
d[0] = dig;
dig >>= 8;
if (dig)
bn_sub_1(d, d, N, n);
bn_reduce(d, N, n);
}
void bn_mon_mul(scetool::u8 *d, scetool::u8 *a, scetool::u8 *b, scetool::u8 *N, scetool::u32 n)
{
scetool::u8 t[512];
scetool::u32 i;
bn_zero(t, n);
for (i = n - 1; i < n; i--)
bn_mon_muladd_dig(t, a, b[i], N, n);
bn_copy(d, t, n);
}
void bn_to_mon(scetool::u8 *d, scetool::u8 *N, scetool::u32 n)
{
scetool::u32 i;
for (i = 0; i < 8*n; i++)
bn_add(d, d, d, N, n);
}
void bn_from_mon(scetool::u8 *d, scetool::u8 *N, scetool::u32 n)
{
scetool::u8 t[512];
bn_zero(t, n);
t[n-1] = 1;
bn_mon_mul(d, d, t, N, n);
}
static void bn_mon_exp(scetool::u8 *d, scetool::u8 *a, scetool::u8 *N, scetool::u32 n, scetool::u8 *e, scetool::u32 en)
{
scetool::u8 t[512];
scetool::u32 i;
scetool::u8 mask;
bn_zero(d, n);
d[n-1] = 1;
bn_to_mon(d, N, n);
for (i = 0; i < en; i++)
for (mask = 0x80; mask != 0; mask >>= 1) {
bn_mon_mul(t, d, d, N, n);
if ((e[i] & mask) != 0)
bn_mon_mul(d, t, a, N, n);
else
bn_copy(d, t, n);
}
}
void bn_mon_inv(scetool::u8 *d, scetool::u8 *a, scetool::u8 *N, scetool::u32 n)
{
scetool::u8 t[512], s[512];
bn_zero(s, n);
s[n-1] = 2;
bn_sub_1(t, N, s, n);
bn_mon_exp(d, a, N, n, t, n);
}

View File

@ -1,76 +0,0 @@
/*
* Copyright (c) 2011-2013 by naehrwert
* This file is released under the GPLv2.
*/
#ifndef _CONFIG_H_
#define _CONFIG_H_
/*! scetool base version. */
#define SCETOOL_VERSION_BASE "0.2.9"
/*! Private build. */
//#define CONFIG_PRIVATE_BUILD
#define BUILD_FOR "naehrwert"
//#define BUILD_FOR "unicorns"
/*! scetool version. */
#ifdef CONFIG_PRIVATE_BUILD
#ifdef BUILD_FOR
#define SCETOOL_VERSION SCETOOL_VERSION_BASE " <PRIVATE BUILD:" BUILD_FOR ">"
#else
#error Specify a name in BUILD_FOR.
#endif
#else
#define SCETOOL_VERSION SCETOOL_VERSION_BASE " <public build>"
#endif
/*! Private build options. */
#ifdef CONFIG_PRIVATE_BUILD
#define CONFIG_CUSTOM_INDIV_SEED
#define CONFIG_DUMP_INDIV_SEED
#endif
#if 0
/*! scetool API. */
#define CONFIG_EXPORTS
#ifdef CONFIG_EXPORTS
#define SCETOOL_API __declspec(dllexport)
#else
#define SCETOOL_API __declspec(dllimport)
#endif
#endif
/*! NPDRM watermark text (16 bytes exactly). */
//"I like kittens !"
#define CONFIG_NPDRM_WATERMARK "watermarktrololo"
/*! Environment variables. */
#define CONFIG_ENV_PS3 "PS3"
/*! Path configurations. */
#define CONFIG_KEYS_FILE "keys"
#define CONFIG_KEYS_PATH "./data"
#define CONFIG_CURVES_FILE "ldr_curves"
#define CONFIG_CURVES_PATH "./data"
#define CONFIG_VSH_CURVES_FILE "vsh_curves"
#define CONFIG_VSH_CURVES_PATH "./data"
#define CONFIG_IDPS_FILE "idps"
#define CONFIG_IDPS_PATH "./data"
#define CONFIG_ACT_DAT_FILE "act.dat"
#define CONFIG_ACT_DAT_PATH "./data"
#define CONFIG_RIF_FILE_EXT ".rif"
#define CONFIG_RIF_PATH "./rifs"
#define CONFIG_RAP_FILE_EXT ".rap"
#define CONFIG_RAP_PATH "./raps"
/*! Key names. */
#define CONFIG_NP_TID_KNAME "NP_tid"
#define CONFIG_NP_CI_KNAME "NP_ci"
#define CONFIG_NP_KLIC_FREE_KNAME "NP_klic_free"
#define CONFIG_NP_KLIC_KEY_KNAME "NP_klic_key"
#define CONFIG_NP_IDPS_CONST_KNAME "NP_idps_const"
#define CONFIG_NP_RIF_KEY_KNAME "NP_rif_key"
#define CONFIG_NP_SIG_KNAME "NP_sig"
#endif

View File

@ -1,10 +0,0 @@
#ifndef _ECDSA_H_
#define _ECDSA_H_
int ecdsa_set_curve(scetool::u32 type);
void ecdsa_set_pub(scetool::u8 *Q);
void ecdsa_set_priv(scetool::u8 *k);
int ecdsa_verify(scetool::u8 *hash, scetool::u8 *R, scetool::u8 *S);
void ecdsa_sign(scetool::u8 *hash, scetool::u8 *R, scetool::u8 *S);
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,137 +0,0 @@
/*
* Copyright (c) 2011-2013 by naehrwert
* This file is released under the GPLv2.
*/
#ifndef _ELF_INLINES_H_
#define _ELF_INLINES_H_
#include <string.h>
#define NOCOMPILE
#include "types.h"
#include "elf.h"
static inline void _es_elf32_ehdr(Elf32_Ehdr *h)
{
h->e_type = _Es16(h->e_type);
h->e_machine = _Es16(h->e_machine);
h->e_version = _Es32(h->e_version);
h->e_entry = _Es32(h->e_entry);
h->e_phoff = _Es32(h->e_phoff);
h->e_shoff = _Es32(h->e_shoff);
h->e_flags = _Es32(h->e_flags);
h->e_ehsize = _Es16(h->e_ehsize);
h->e_phentsize = _Es16(h->e_phentsize);
h->e_phnum = _Es16(h->e_phnum);
h->e_shentsize = _Es16(h->e_shentsize);
h->e_shnum = _Es16(h->e_shnum);
h->e_shstrndx = _Es16(h->e_shstrndx);
}
static inline void _copy_es_elf32_ehdr(Elf32_Ehdr *dst, Elf32_Ehdr *src)
{
memcpy(dst, src, sizeof(Elf32_Ehdr));
_es_elf32_ehdr(dst);
}
static inline void _es_elf64_ehdr(Elf64_Ehdr *h)
{
h->e_type = _Es16(h->e_type);
h->e_machine = _Es16(h->e_machine);
h->e_version = _Es32(h->e_version);
h->e_entry = _Es64(h->e_entry);
h->e_phoff = _Es64(h->e_phoff);
h->e_shoff = _Es64(h->e_shoff);
h->e_flags = _Es32(h->e_flags);
h->e_ehsize = _Es16(h->e_ehsize);
h->e_phentsize = _Es16(h->e_phentsize);
h->e_phnum = _Es16(h->e_phnum);
h->e_shentsize = _Es16(h->e_shentsize);
h->e_shnum = _Es16(h->e_shnum);
h->e_shstrndx = _Es16(h->e_shstrndx);
}
static inline void _copy_es_elf64_ehdr(Elf64_Ehdr *dst, Elf64_Ehdr *src)
{
memcpy(dst, src, sizeof(Elf64_Ehdr));
_es_elf64_ehdr(dst);
}
static inline void _es_elf32_shdr(Elf32_Shdr *h)
{
h->sh_name = _Es32(h->sh_name);
h->sh_type = _Es32(h->sh_type);
h->sh_flags = _Es32(h->sh_flags);
h->sh_addr = _Es32(h->sh_addr);
h->sh_offset = _Es32(h->sh_offset);
h->sh_size = _Es32(h->sh_size);
h->sh_link = _Es32(h->sh_link);
h->sh_info = _Es32(h->sh_info);
h->sh_addralign = _Es32(h->sh_addralign);
h->sh_entsize = _Es32(h->sh_entsize);
}
static inline void _copy_es_elf32_shdr(Elf32_Shdr *dst, Elf32_Shdr *src)
{
memcpy(dst, src, sizeof(Elf32_Shdr));
_es_elf32_shdr(dst);
}
static inline void _es_elf64_shdr(Elf64_Shdr *h)
{
h->sh_name = _Es32(h->sh_name);
h->sh_type = _Es32(h->sh_type);
h->sh_flags = _Es64(h->sh_flags);
h->sh_addr = _Es64(h->sh_addr);
h->sh_offset = _Es64(h->sh_offset);
h->sh_size = _Es64(h->sh_size);
h->sh_link = _Es32(h->sh_link);
h->sh_info = _Es32(h->sh_info);
h->sh_addralign = _Es64(h->sh_addralign);
h->sh_entsize = _Es64(h->sh_entsize);
}
static inline void _copy_es_elf64_shdr(Elf64_Shdr *dst, Elf64_Shdr *src)
{
memcpy(dst, src, sizeof(Elf64_Shdr));
_es_elf64_shdr(dst);
}
static inline void _es_elf32_phdr(Elf32_Phdr *h)
{
h->p_type = _Es32(h->p_type);
h->p_offset = _Es32(h->p_offset);
h->p_vaddr = _Es32(h->p_vaddr);
h->p_paddr = _Es32(h->p_paddr);
h->p_filesz = _Es32(h->p_filesz);
h->p_memsz = _Es32(h->p_memsz);
h->p_flags = _Es32(h->p_flags);
h->p_align = _Es32(h->p_align);
}
static inline void _copy_es_elf32_phdr(Elf32_Phdr *dst, Elf32_Phdr *src)
{
memcpy(dst, src, sizeof(Elf32_Phdr));
_es_elf32_phdr(dst);
}
static inline void _es_elf64_phdr(Elf64_Phdr *h)
{
h->p_type = _Es32(h->p_type);
h->p_flags = _Es32(h->p_flags);
h->p_offset = _Es64(h->p_offset);
h->p_vaddr = _Es64(h->p_vaddr);
h->p_paddr = _Es64(h->p_paddr);
h->p_filesz = _Es64(h->p_filesz);
h->p_memsz = _Es64(h->p_memsz);
h->p_align = _Es64(h->p_align);
}
static inline void _copy_es_elf64_phdr(Elf64_Phdr *dst, Elf64_Phdr *src)
{
memcpy(dst, src, sizeof(Elf64_Phdr));
_es_elf64_phdr(dst);
}
#endif

View File

@ -1,14 +0,0 @@
/*
* Copyright (c) 2011-2013 by naehrwert
* This file is released under the GPLv2.
*/
#ifndef _FRONTEND_H_
#define _FRONTEND_H_
void frontend_print_infos(scetool::s8 *file);
void frontend_decrypt(scetool::s8 *file_in, scetool::s8 *file_out);
void frontend_encrypt(scetool::s8 *file_in, scetool::s8 *file_out);
#endif

View File

@ -1,529 +0,0 @@
#ifdef _WIN32
/* Getopt for Microsoft C
This code is a modification of the Free Software Foundation, Inc.
Getopt library for parsing command line argument the purpose was
to provide a Microsoft Visual C friendly derivative. This code
provides functionality for both Unicode and Multibyte builds.
Date: 02/03/2011 - Ludvik Jerabek - Initial Release
Version: 1.0
Comment: Supports getopt, getopt_long, and getopt_long_only
and POSIXLY_CORRECT environment flag
License: LGPL
Revisions:
02/03/2011 - Ludvik Jerabek - Initial Release
02/20/2011 - Ludvik Jerabek - Fixed compiler warnings at Level 4
07/05/2011 - Ludvik Jerabek - Added no_argument, required_argument, optional_argument defs
08/03/2011 - Ludvik Jerabek - Fixed non-argument runtime bug which caused runtime exception
08/09/2011 - Ludvik Jerabek - Added code to export functions for DLL and LIB
**DISCLAIMER**
THIS MATERIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING, BUT Not LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, OR NON-INFRINGEMENT. SOME JURISDICTIONS DO NOT ALLOW THE
EXCLUSION OF IMPLIED WARRANTIES, SO THE ABOVE EXCLUSION MAY NOT
APPLY TO YOU. IN NO EVENT WILL I BE LIABLE TO ANY PARTY FOR ANY
DIRECT, INDIRECT, SPECIAL OR OTHER CONSEQUENTIAL DAMAGES FOR ANY
USE OF THIS MATERIAL INCLUDING, WITHOUT LIMITATION, ANY LOST
PROFITS, BUSINESS INTERRUPTION, LOSS OF PROGRAMS OR OTHER DATA ON
YOUR INFORMATION HANDLING SYSTEM OR OTHERWISE, EVEN If WE ARE
EXPRESSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*/
#define _CRT_SECURE_NO_WARNINGS
#include <stdlib.h>
#include <stdio.h>
#include "getopt.h"
enum ENUM_ORDERING { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER };
struct _getopt_data
{
int optind;
int opterr;
int optopt;
TCHAR *optarg;
int __initialized;
TCHAR *__nextchar;
int __ordering;
int __posixly_correct;
int __first_nonopt;
int __last_nonopt;
};
static struct _getopt_data getopt_data;
TCHAR *optarg;
int optind = 1;
int opterr = 1;
int optopt = _T('?');
static void exchange(TCHAR **argv, struct _getopt_data *d)
{
int bottom = d->__first_nonopt;
int middle = d->__last_nonopt;
int top = d->optind;
TCHAR *tem;
while (top > middle && middle > bottom)
{
if (top - middle > middle - bottom)
{
int len = middle - bottom;
register int i;
for (i = 0; i < len; i++)
{
tem = argv[bottom + i];
argv[bottom + i] = argv[top - (middle - bottom) + i];
argv[top - (middle - bottom) + i] = tem;
}
top -= len;
}
else
{
int len = top - middle;
register int i;
for (i = 0; i < len; i++)
{
tem = argv[bottom + i];
argv[bottom + i] = argv[middle + i];
argv[middle + i] = tem;
}
bottom += len;
}
}
d->__first_nonopt += (d->optind - d->__last_nonopt);
d->__last_nonopt = d->optind;
}
static const TCHAR *_getopt_initialize (const TCHAR *optstring, struct _getopt_data *d, int posixly_correct)
{
d->__first_nonopt = d->__last_nonopt = d->optind;
d->__nextchar = NULL;
d->__posixly_correct = posixly_correct | !!_tgetenv(_T("POSIXLY_CORRECT"));
if (optstring[0] == _T('-'))
{
d->__ordering = RETURN_IN_ORDER;
++optstring;
}
else if (optstring[0] == _T('+'))
{
d->__ordering = REQUIRE_ORDER;
++optstring;
}
else if (d->__posixly_correct)
d->__ordering = REQUIRE_ORDER;
else
d->__ordering = PERMUTE;
return optstring;
}
int _getopt_internal_r (int argc, TCHAR *const *argv, const TCHAR *optstring, const struct option *longopts, int *longind, int long_only, struct _getopt_data *d, int posixly_correct)
{
int print_errors = d->opterr;
if (argc < 1)
return -1;
d->optarg = NULL;
if (d->optind == 0 || !d->__initialized)
{
if (d->optind == 0)
d->optind = 1;
optstring = _getopt_initialize (optstring, d, posixly_correct);
d->__initialized = 1;
}
else if (optstring[0] == _T('-') || optstring[0] == _T('+'))
optstring++;
if (optstring[0] == _T(':'))
print_errors = 0;
if (d->__nextchar == NULL || *d->__nextchar == _T('\0'))
{
if (d->__last_nonopt > d->optind)
d->__last_nonopt = d->optind;
if (d->__first_nonopt > d->optind)
d->__first_nonopt = d->optind;
if (d->__ordering == PERMUTE)
{
if (d->__first_nonopt != d->__last_nonopt && d->__last_nonopt != d->optind)
exchange ((TCHAR **) argv, d);
else if (d->__last_nonopt != d->optind)
d->__first_nonopt = d->optind;
while (d->optind < argc && (argv[d->optind][0] != _T('-') || argv[d->optind][1] == _T('\0')))
d->optind++;
d->__last_nonopt = d->optind;
}
if (d->optind != argc && !_tcscmp(argv[d->optind], _T("--")))
{
d->optind++;
if (d->__first_nonopt != d->__last_nonopt && d->__last_nonopt != d->optind)
exchange ((TCHAR **) argv, d);
else if (d->__first_nonopt == d->__last_nonopt)
d->__first_nonopt = d->optind;
d->__last_nonopt = argc;
d->optind = argc;
}
if (d->optind == argc)
{
if (d->__first_nonopt != d->__last_nonopt)
d->optind = d->__first_nonopt;
return -1;
}
if ((argv[d->optind][0] != _T('-') || argv[d->optind][1] == _T('\0')))
{
if (d->__ordering == REQUIRE_ORDER)
return -1;
d->optarg = argv[d->optind++];
return 1;
}
d->__nextchar = (argv[d->optind] + 1 + (longopts != NULL && argv[d->optind][1] == _T('-')));
}
if (longopts != NULL && (argv[d->optind][1] == _T('-') || (long_only && (argv[d->optind][2] || !_tcschr(optstring, argv[d->optind][1])))))
{
TCHAR *nameend;
const struct option *p;
const struct option *pfound = NULL;
int exact = 0;
int ambig = 0;
int indfound = -1;
int option_index;
for (nameend = d->__nextchar; *nameend && *nameend != _T('='); nameend++);
for (p = longopts, option_index = 0; p->name; p++, option_index++)
if (!_tcsncmp(p->name, d->__nextchar, nameend - d->__nextchar))
{
if ((unsigned int)(nameend - d->__nextchar) == (unsigned int)_tcslen(p->name))
{
pfound = p;
indfound = option_index;
exact = 1;
break;
}
else if (pfound == NULL)
{
pfound = p;
indfound = option_index;
}
else if (long_only || pfound->has_arg != p->has_arg || pfound->flag != p->flag || pfound->val != p->val)
ambig = 1;
}
if (ambig && !exact)
{
if (print_errors)
{
_ftprintf(stderr, _T("%s: option '%s' is ambiguous\n"),
argv[0], argv[d->optind]);
}
d->__nextchar += _tcslen(d->__nextchar);
d->optind++;
d->optopt = 0;
return _T('?');
}
if (pfound != NULL)
{
option_index = indfound;
d->optind++;
if (*nameend)
{
if (pfound->has_arg)
d->optarg = nameend + 1;
else
{
if (print_errors)
{
if (argv[d->optind - 1][1] == _T('-'))
{
_ftprintf(stderr, _T("%s: option '--%s' doesn't allow an argument\n"),argv[0], pfound->name);
}
else
{
_ftprintf(stderr, _T("%s: option '%c%s' doesn't allow an argument\n"),argv[0], argv[d->optind - 1][0],pfound->name);
}
}
d->__nextchar += _tcslen(d->__nextchar);
d->optopt = pfound->val;
return _T('?');
}
}
else if (pfound->has_arg == 1)
{
if (d->optind < argc)
d->optarg = argv[d->optind++];
else
{
if (print_errors)
{
_ftprintf(stderr,_T("%s: option '--%s' requires an argument\n"),argv[0], pfound->name);
}
d->__nextchar += _tcslen(d->__nextchar);
d->optopt = pfound->val;
return optstring[0] == _T(':') ? _T(':') : _T('?');
}
}
d->__nextchar += _tcslen(d->__nextchar);
if (longind != NULL)
*longind = option_index;
if (pfound->flag)
{
*(pfound->flag) = pfound->val;
return 0;
}
return pfound->val;
}
if (!long_only || argv[d->optind][1] == _T('-') || _tcschr(optstring, *d->__nextchar) == NULL)
{
if (print_errors)
{
if (argv[d->optind][1] == _T('-'))
{
/* --option */
_ftprintf(stderr, _T("%s: unrecognized option '--%s'\n"),argv[0], d->__nextchar);
}
else
{
/* +option or -option */
_ftprintf(stderr, _T("%s: unrecognized option '%c%s'\n"),argv[0], argv[d->optind][0], d->__nextchar);
}
}
d->__nextchar = (TCHAR *)_T("");
d->optind++;
d->optopt = 0;
return _T('?');
}
}
{
TCHAR c = *d->__nextchar++;
TCHAR *temp = (TCHAR*)_tcschr(optstring, c);
if (*d->__nextchar == _T('\0'))
++d->optind;
if (temp == NULL || c == _T(':') || c == _T(';'))
{
if (print_errors)
{
_ftprintf(stderr, _T("%s: invalid option -- '%c'\n"), argv[0], c);
}
d->optopt = c;
return _T('?');
}
if (temp[0] == _T('W') && temp[1] == _T(';'))
{
TCHAR *nameend;
const struct option *p;
const struct option *pfound = NULL;
int exact = 0;
int ambig = 0;
int indfound = 0;
int option_index;
if (*d->__nextchar != _T('\0'))
{
d->optarg = d->__nextchar;
d->optind++;
}
else if (d->optind == argc)
{
if (print_errors)
{
_ftprintf(stderr,
_T("%s: option requires an argument -- '%c'\n"),
argv[0], c);
}
d->optopt = c;
if (optstring[0] == _T(':'))
c = _T(':');
else
c = _T('?');
return c;
}
else
d->optarg = argv[d->optind++];
for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != _T('='); nameend++);
for (p = longopts, option_index = 0; p->name; p++, option_index++)
if (!_tcsncmp(p->name, d->__nextchar, nameend - d->__nextchar))
{
if ((unsigned int) (nameend - d->__nextchar) == _tcslen(p->name))
{
pfound = p;
indfound = option_index;
exact = 1;
break;
}
else if (pfound == NULL)
{
pfound = p;
indfound = option_index;
}
else if (long_only || pfound->has_arg != p->has_arg || pfound->flag != p->flag || pfound->val != p->val)
ambig = 1;
}
if (ambig && !exact)
{
if (print_errors)
{
_ftprintf(stderr, _T("%s: option '-W %s' is ambiguous\n"),
argv[0], d->optarg);
}
d->__nextchar += _tcslen(d->__nextchar);
d->optind++;
return _T('?');
}
if (pfound != NULL)
{
option_index = indfound;
if (*nameend)
{
if (pfound->has_arg)
d->optarg = nameend + 1;
else
{
if (print_errors)
{
_ftprintf(stderr, _T("\
%s: option '-W %s' doesn't allow an argument\n"),
argv[0], pfound->name);
}
d->__nextchar += _tcslen(d->__nextchar);
return _T('?');
}
}
else if (pfound->has_arg == 1)
{
if (d->optind < argc)
d->optarg = argv[d->optind++];
else
{
if (print_errors)
{
_ftprintf(stderr, _T("\
%s: option '-W %s' requires an argument\n"),
argv[0], pfound->name);
}
d->__nextchar += _tcslen(d->__nextchar);
return optstring[0] == _T(':') ? _T(':') : _T('?');
}
}
else
d->optarg = NULL;
d->__nextchar += _tcslen(d->__nextchar);
if (longind != NULL)
*longind = option_index;
if (pfound->flag)
{
*(pfound->flag) = pfound->val;
return 0;
}
return pfound->val;
}
d->__nextchar = NULL;
return _T('W');
}
if (temp[1] == _T(':'))
{
if (temp[2] == _T(':'))
{
if (*d->__nextchar != _T('\0'))
{
d->optarg = d->__nextchar;
d->optind++;
}
else
d->optarg = NULL;
d->__nextchar = NULL;
}
else
{
if (*d->__nextchar != _T('\0'))
{
d->optarg = d->__nextchar;
d->optind++;
}
else if (d->optind == argc)
{
if (print_errors)
{
_ftprintf(stderr,
_T("%s: option requires an argument -- '%c'\n"),
argv[0], c);
}
d->optopt = c;
if (optstring[0] == _T(':'))
c = _T(':');
else
c = _T('?');
}
else
d->optarg = argv[d->optind++];
d->__nextchar = NULL;
}
}
return c;
}
}
int _getopt_internal (int argc, TCHAR *const *argv, const TCHAR *optstring, const struct option *longopts, int *longind, int long_only, int posixly_correct)
{
int result;
getopt_data.optind = optind;
getopt_data.opterr = opterr;
result = _getopt_internal_r (argc, argv, optstring, longopts,longind, long_only, &getopt_data,posixly_correct);
optind = getopt_data.optind;
optarg = getopt_data.optarg;
optopt = getopt_data.optopt;
return result;
}
int getopt (int argc, TCHAR *const *argv, const TCHAR *optstring)
{
return _getopt_internal (argc, argv, optstring, (const struct option *) 0, (int *) 0, 0, 0);
}
int getopt_long (int argc, TCHAR *const *argv, const TCHAR *options, const struct option *long_options, int *opt_index)
{
return _getopt_internal (argc, argv, options, long_options, opt_index, 0, 0);
}
int _getopt_long_r (int argc, TCHAR *const *argv, const TCHAR *options, const struct option *long_options, int *opt_index, struct _getopt_data *d)
{
return _getopt_internal_r (argc, argv, options, long_options, opt_index,0, d, 0);
}
int getopt_long_only (int argc, TCHAR *const *argv, const TCHAR *options, const struct option *long_options, int *opt_index)
{
return _getopt_internal (argc, argv, options, long_options, opt_index, 1, 0);
}
int _getopt_long_only_r (int argc, TCHAR *const *argv, const TCHAR *options, const struct option *long_options, int *opt_index, struct _getopt_data *d)
{
return _getopt_internal_r (argc, argv, options, long_options, opt_index, 1, d, 0);
}
#endif

View File

@ -1,106 +0,0 @@
#ifdef _WIN32
/* Getopt for Microsoft C
This code is a modification of the Free Software Foundation, Inc.
Getopt library for parsing command line argument the purpose was
to provide a Microsoft Visual C friendly derivative. This code
provides functionality for both Unicode and Multibyte builds.
Date: 02/03/2011 - Ludvik Jerabek - Initial Release
Version: 1.0
Comment: Supports getopt, getopt_long, and getopt_long_only
and POSIXLY_CORRECT environment flag
License: LGPL
Revisions:
02/03/2011 - Ludvik Jerabek - Initial Release
02/20/2011 - Ludvik Jerabek - Fixed compiler warnings at Level 4
07/05/2011 - Ludvik Jerabek - Added no_argument, required_argument, optional_argument defs
08/03/2011 - Ludvik Jerabek - Fixed non-argument runtime bug which caused runtime exception
08/09/2011 - Ludvik Jerabek - Added code to export functions for DLL and LIB
**DISCLAIMER**
THIS MATERIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING, BUT Not LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, OR NON-INFRINGEMENT. SOME JURISDICTIONS DO NOT ALLOW THE
EXCLUSION OF IMPLIED WARRANTIES, SO THE ABOVE EXCLUSION MAY NOT
APPLY TO YOU. IN NO EVENT WILL I BE LIABLE TO ANY PARTY FOR ANY
DIRECT, INDIRECT, SPECIAL OR OTHER CONSEQUENTIAL DAMAGES FOR ANY
USE OF THIS MATERIAL INCLUDING, WITHOUT LIMITATION, ANY LOST
PROFITS, BUSINESS INTERRUPTION, LOSS OF PROGRAMS OR OTHER DATA ON
YOUR INFORMATION HANDLING SYSTEM OR OTHERWISE, EVEN If WE ARE
EXPRESSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*/
#ifndef __GETOPT_H_
#define __GETOPT_H_
#define STATIC_GETOPT
#ifdef _GETOPT_API
#undef _GETOPT_API
#endif
#if defined(EXPORTS_GETOPT) && defined(STATIC_GETOPT)
#error "The preprocessor definitions of EXPORTS_GETOPT and STATIC_GETOPT can only be used individually"
#elif defined(STATIC_GETOPT)
#pragma message("Warning static builds of getopt violate the Lesser GNU Public License")
#define _GETOPT_API
#elif defined(EXPORTS_GETOPT)
#pragma message("Exporting getopt library")
#define _GETOPT_API __declspec(dllexport)
#else
#pragma message("Importing getopt library")
#define _GETOPT_API __declspec(dllimport)
#endif
#include <tchar.h>
// Standard GNU options
#define null_argument 0 /*Argument Null*/
#define no_argument 0 /*Argument Switch Only*/
#define required_argument 1 /*Argument Required*/
#define optional_argument 2 /*Argument Optional*/
// Change behavior for C\C++
#ifdef __cplusplus
#define _BEGIN_EXTERN_C extern "C" {
#define _END_EXTERN_C }
#define _GETOPT_THROW throw()
#else
#define _BEGIN_EXTERN_C
#define _END_EXTERN_C
#define _GETOPT_THROW
#endif
_BEGIN_EXTERN_C
extern _GETOPT_API TCHAR *optarg;
extern _GETOPT_API int optind;
extern _GETOPT_API int opterr;
extern _GETOPT_API int optopt;
struct option
{
const TCHAR* name;
int has_arg;
int *flag;
TCHAR val;
};
extern _GETOPT_API int getopt(int argc, TCHAR *const *argv, const TCHAR *optstring) _GETOPT_THROW;
extern _GETOPT_API int getopt_long(int ___argc, TCHAR *const *___argv, const TCHAR *__shortopts, const struct option *__longopts, int *__longind) _GETOPT_THROW;
extern _GETOPT_API int getopt_long_only(int ___argc, TCHAR *const *___argv, const TCHAR *__shortopts, const struct option *__longopts, int *__longind) _GETOPT_THROW;
_END_EXTERN_C
// Undefine so the macros are not included
#undef _BEGIN_EXTERN_C
#undef _END_EXTERN_C
#undef _GETOPT_THROW
#undef _GETOPT_API
#endif // __GETOPT_H_
#endif

View File

@ -1,131 +0,0 @@
/*
* Copyright (c) 2011-2013 by naehrwert
* This file is released under the GPLv2.
*/
#ifndef _KEYS_H_
#define _KEYS_H_
#include "types.h"
#include "sce.h"
#define KEYBITS(klen) BYTES2BITS(klen)
#define KEYTYPE_SELF 1
#define KEYTYPE_RVK 2
#define KEYTYPE_PKG 3
#define KEYTYPE_SPP 4
#define KEYTYPE_OTHER 5
/*! Flag to use VSH curve. */
#define USE_VSH_CURVE 0x40
/*! Length of whole curves file. */
#define CURVES_LENGTH 0x1E40
#define CTYPE_MIN 0
#define CTYPE_MAX 63
/*! Length of the whole VSH curves file. */
#define VSH_CURVES_LENGTH 0x168
#define VSH_CTYPE_MIN 0
#define VSH_CTYPE_MAX 2
/*! Length of the idps, act.dat, .rif and .rap files. */
#define IDPS_LENGTH 0x10
#define ACT_DAT_LENGTH 0x1038
#define RIF_LENGTH 0x98
#define RAP_LENGTH 0x10
/*! IDPS, RIF, act.dat key lengths. */
#define IDPS_KEYBITS 128
#define ACT_DAT_KEYBITS 128
#define RIF_KEYBITS 128
#define RAP_KEYBITS 128
/*! Keyset. */
typedef struct _keyset
{
/*! Name. */
scetool::s8 *name;
/*! Type. */
scetool::u32 type;
/*! Key revision. */
scetool::u16 key_revision;
/*! Version. */
scetool::u64 version;
/*! SELF type. */
scetool::u32 self_type;
/*! Key length. */
scetool::u32 erklen;
/*! Key. */
scetool::u8 *erk;
/*! IV length. */
scetool::u32 rivlen;
/*! IV. */
scetool::u8 *riv;
/*! Pub. */
scetool::u8 *pub;
/*! Priv. */
scetool::u8 *priv;
/*! Curve type. */
scetool::u8 ctype;
} keyset_t;
/*! Curve entry. */
typedef struct _curve
{
scetool::u8 p[20];
scetool::u8 a[20];
scetool::u8 b[20];
scetool::u8 N[21];
scetool::u8 Gx[20];
scetool::u8 Gy[20];
} curve_t;
/*! VSH Curve entry. */
typedef struct _vsh_curve
{
scetool::u8 a[20];
scetool::u8 b[20];
scetool::u8 N[20];
scetool::u8 p[20];
scetool::u8 Gx[20];
scetool::u8 Gy[20];
} vsh_curve_t;
/*! act.dat. */
typedef struct _act_dat
{
scetool::u8 account_info[16];
scetool::u8 primary_key_table[2048];
scetool::u8 secondary_key_table[2048];
scetool::u8 signature[40];
} act_dat_t;
/*! RIF. */
typedef struct _rif
{
scetool::u8 account_info[16];
scetool::u8 content_id[48];
scetool::u8 act_key_index[16];
scetool::u8 klicensee[16];
scetool::u64 timestamp;
scetool::u64 zero;
scetool::u8 signature[40];
} rif_t;
BOOL keys_load(const scetool::s8 *kfile);
keyset_t *keyset_find(sce_buffer_ctxt_t *ctxt);
keyset_t *keyset_find_by_name(const scetool::s8 *name);
BOOL curves_load(const scetool::s8 *cfile);
curve_t *curve_find(scetool::u8 ctype);
BOOL vsh_curves_load(const scetool::s8 *cfile);
curve_t *vsh_curve_find(scetool::u8 ctype);
BOOL klicensee_by_content_id(const scetool::s8 *content_id, scetool::u8 *klicensee);
keyset_t *keyset_from_buffer(scetool::u8 *keyset);
#endif

View File

@ -1,37 +0,0 @@
/*
* Copyright (c) 2011-2013 by naehrwert
* This file is released under the GPLv2.
*/
#ifndef _LIST_H_
#define _LIST_H_
#include "types.h"
#define LIST_FOREACH(iter, list) for(lnode_t *iter = list->head; iter != NULL; iter = iter->next)
typedef struct _lnode
{
void *value;
struct _lnode *next;
} lnode_t;
typedef struct _list
{
lnode_t *head;
scetool::u32 count;
} list_t;
list_t *list_create();
void list_destroy(list_t *l);
BOOL list_isempty(list_t *l);
scetool::u32 list_count(list_t *l);
BOOL list_push(list_t *l, void *value);
void *list_pop(list_t *l);
BOOL list_add_back(list_t *l, void *value);
void *list_get(list_t *l, scetool::u32 idx);
lnode_t *list_get_node(list_t *l, scetool::u32 idx);
BOOL list_remove_node(list_t *l, lnode_t *node);
BOOL list_remove_value(list_t *l, void *value);
#endif

View File

@ -1,41 +0,0 @@
//Mersenne-Twister 19937 pseudorandom number generator.
//Reference implementation at:
//http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/CODES/mt19937ar.c
#ifndef _MT19937_H_
#define _MT19937_H_
/*! State size. */
#define MT_N 624
#define MT_M 397
#define MT_MATRIX_A 0x9908b0df
#define MT_UPPER_MASK 0x80000000
#define MT_LOWER_MASK 0x7fffffff
/*! Mersenne-Twister 19937 context. */
typedef struct _mt19937_ctxt
{
/*! State. */
unsigned int state[MT_N];
/*! Index. */
unsigned int idx;
} mt19937_ctxt_t;
/*!
* \brief Initialize Mersenne-Twister 19937 context.
*
* \param ctxt Mersenne-Twister 19937 context.
* \param seed Random seed.
*/
void mt19937_init(mt19937_ctxt_t *ctxt, unsigned int seed);
/*!
* \brief Update Mersenne-Twister 19937 state.
*
* \param ctxt Mersenne-Twister 19937 context.
*
* \return Generated pseudorandom number.
*/
unsigned int mt19937_update(mt19937_ctxt_t *ctxt);
#endif

View File

@ -1,42 +0,0 @@
/*
* Copyright (c) 2011-2013 by naehrwert
* This file is released under the GPLv2.
*/
#ifndef _NP_H_
#define _NP_H_
#include "types.h"
#include "sce.h"
/*! NPDRM config. */
typedef struct _npdrm_config
{
/*! License type. */
scetool::u32 license_type;
/*! Application type. */
scetool::u32 app_type;
/*! klicensee. */
scetool::u8 *klicensee;
/*! Content ID. */
scetool::u8 content_id[0x30];
/*! Real file name. */
scetool::s8 *real_fname;
} npdrm_config_t;
/*! Set klicensee. */
void np_set_klicensee(scetool::u8 *klicensee);
/*! Remove NPDRM layer. */
BOOL np_decrypt_npdrm(sce_buffer_ctxt_t *ctxt);
/*! Add NPDRM layer. */
BOOL np_encrypt_npdrm(sce_buffer_ctxt_t *ctxt);
/*! Create NPDRM control info. */
BOOL np_create_ci(npdrm_config_t *npconf, ci_data_npdrm_t *cinp);
/*! Add NP signature to file. */
BOOL np_sign_file(scetool::s8 *fname);
#endif

View File

@ -1,84 +0,0 @@
/*
* Copyright (c) 2011-2013 by naehrwert
* This file is released under the GPLv2.
*/
#ifndef _RVK_H_
#define _RVK_H_
#include "types.h"
#include "sce.h"
/*
header:
00000200 00 00 00 04 00 00 00 01 00 03 00 41 00 00 00 00
00000210 00 00 00 06 00 00 00 00 00 00 00 00 00 00 00 00
body:
00000220 00 00 00 03 00 00 00 01 00 03 00 41 00 00 00 00 00 00 00 00 00 00 00 02 FF FF FF FF FF FF FF FF
00000240 00 00 00 04 00 00 00 01 00 03 00 41 00 00 00 00 10 70 00 05 FF 00 00 01 FF FF FF FF FF FF FF FF
00000260 00 00 00 04 00 00 00 01 00 03 00 41 00 00 00 00 10 70 00 05 FE 00 00 01 FF FF FF FF FF FF FF FF
00000280 00 00 00 04 00 00 00 01 00 03 00 41 00 00 00 00 10 70 00 05 FD 00 00 01 FF FF FF FF FF FF FF FF
000002A0 00 00 00 04 00 00 00 01 00 03 00 41 00 00 00 00 10 70 00 05 FC 00 00 01 FF FF FF FF FF FF FF FF
000002C0 00 00 00 04 00 00 00 03 00 01 00 00 00 00 00 00 10 70 00 04 00 00 00 01 FF FF FF FF FF FF FF FF
*/
/*
0 self != rvk
1 self == rvk
2 !(rvk <= self) -> self < rvk
3 self <= rvk
4 !(self <= rvk) -> self > rvk
5 rvk <= self -> self >= rvk
*/
#define CHECK_SELF_NEQU_RVK 0
#define CHECK_SELF_EQU_RVK 1
#define CHECK_SELF_LT_RVK 2
#define CHECK_SELF_LTEQU_RVK 3
#define CHECK_SELF_GT_RVK 4
#define CHECK_SELF_GTEQU_RVK 5
/*! RVK header. */
typedef struct _rvk_header
{
scetool::u32 type_0;
scetool::u32 type_1;
scetool::u64 opaque; //Program revoke: version, Package revoke: unknown.
scetool::u32 entcnt;
scetool::u8 padding[12];
} rvk_header_t;
static inline void _es_rvk_header(rvk_header_t *h)
{
h->type_0 = _Es32(h->type_0);
h->type_1 = _Es32(h->type_1);
h->opaque = _Es64(h->opaque);
h->entcnt = _Es32(h->entcnt);
}
/*! Program revoke list entry. */
typedef struct _prg_rvk_entry
{
scetool::u32 self_type; //3, 4
scetool::u32 check_type;
scetool::u64 version;
union
{
scetool::u64 auth_id;
scetool::u64 unk_3;
};
scetool::u64 mask;
} prg_rvk_entry_t;
static inline void _es_prg_rvk_entry(prg_rvk_entry_t *e)
{
e->self_type = _Es32(e->self_type);
e->check_type = _Es32(e->check_type);
e->version = _Es64(e->version);
e->auth_id = _Es64(e->auth_id);
e->mask = _Es64(e->mask);
}
/*! Print RVK infos. */
void rvk_print(FILE *fp, sce_buffer_ctxt_t *ctxt);
#endif

View File

@ -1,616 +0,0 @@
/*
* Copyright (c) 2011-2013 by naehrwert
* This file is released under the GPLv2.
*/
#ifndef _SCE_H_
#define _SCE_H_
#include <stdio.h>
#include <string.h>
#include "types.h"
#include "list.h"
/*! SCE file align. */
#define SCE_ALIGN 0x10
/*! Header align. */
#define HEADER_ALIGN 0x80
/*! SCE header magic value ("SCE\0"). */
#define SCE_HEADER_MAGIC 0x53434500
/*! SCE header versions. */
/*! Header version 2. */
#define SCE_HEADER_VERSION_2 2
/*! Key revisions. */
#define KEY_REVISION_0 0x00
#define KEY_REVISION_092_330 0x01
#define KEY_REVISION_1 0x02
//#define KEY_REVISION_ 0x03
#define KEY_REVISION_340_342 0x04
//#define KEY_REVISION_ 0x05
//#define KEY_REVISION_ 0x06
#define KEY_REVISION_350 0x07
//#define KEY_REVISION_ 0x08
//#define KEY_REVISION_ 0x09
#define KEY_REVISION_355 0x0a
//#define KEY_REVISION_ 0x0b
//#define KEY_REVISION_ 0x0c
#define KEY_REVISION_356 0x0d
//#define KEY_REVISION_ 0x0e
//#define KEY_REVISION_ 0x0f
#define KEY_REVISION_360_361 0x10
//#define KEY_REVISION_ 0x11
//#define KEY_REVISION_ 0x12
#define KEY_REVISION_365 0x13
//#define KEY_REVISION_ 0x14
//#define KEY_REVISION_ 0x15
#define KEY_REVISION_370_373 0x16
//#define KEY_REVISION_ 0x17
//#define KEY_REVISION_ 0x18
#define KEY_REVISION_DEBUG 0x8000
/*! SCE header types. */
/*! SELF header. */
#define SCE_HEADER_TYPE_SELF 1
/*! RVK header. */
#define SCE_HEADER_TYPE_RVK 2
/*! PKG header. */
#define SCE_HEADER_TYPE_PKG 3
/*! SPP header. */
#define SCE_HEADER_TYPE_SPP 4
/*! Sub header types. */
/*! SCE version header. */
#define SUB_HEADER_TYPE_SCEVERSION 1
/*! SELF header. */
#define SUB_HEADER_TYPE_SELF 3
/*! Control info types. */
/*! Control flags. */
#define CONTROL_INFO_TYPE_FLAGS 1
/*! Digest. */
#define CONTROL_INFO_TYPE_DIGEST 2
/*! NPDRM block. */
#define CONTROL_INFO_TYPE_NPDRM 3
/*! Optional header types. */
/*! Capability flags header. */
#define OPT_HEADER_TYPE_CAP_FLAGS 1
/*! Individuals seed header. */
#define OPT_HEADER_TYPE_INDIV_SEED 2
/*! Metadata key/iv lengths. */
#define METADATA_INFO_KEYBITS 128
#define METADATA_INFO_KEY_LEN 16
#define METADATA_INFO_KEYPAD_LEN 16
#define METADATA_INFO_IV_LEN 16
#define METADATA_INFO_IVPAD_LEN 16
/*! Metadata section types. */
/*! Segment header. */
#define METADATA_SECTION_TYPE_SHDR 1
/*! Program header. */
#define METADATA_SECTION_TYPE_PHDR 2
/*! Unknown header type 3. */
#define METADATA_SECTION_TYPE_UNK_3 3
/*! Section is hashed. */
#define METADATA_SECTION_HASHED 2
/*! Section is not encrypted. */
#define METADATA_SECTION_NOT_ENCRYPTED 1
/*! Section is encrypted. */
#define METADATA_SECTION_ENCRYPTED 3
/*! Section is not compressed. */
#define METADATA_SECTION_NOT_COMPRESSED 1
/*! Section is compressed. */
#define METADATA_SECTION_COMPRESSED 2
/*! Signature sizes. */
/*! Signature S part size. */
#define SIGNATURE_S_SIZE 21
/*! Signature R part size. */
#define SIGNATURE_R_SIZE 21
/*! Compressed. */
#define SECTION_INFO_COMPRESSED 2
/*! Not compressed. */
#define SECTION_INFO_NOT_COMPRESSED 1
/*! SCE version not present. */
#define SCE_VERSION_NOT_PRESENT 0
/*! SCE version present. */
#define SCE_VERSION_PRESENT 1
/*! SELF types. */
/*! lv0. */
#define SELF_TYPE_LV0 1
/*! lv1. */
#define SELF_TYPE_LV1 2
/*! lv2. */
#define SELF_TYPE_LV2 3
/*! Application. */
#define SELF_TYPE_APP 4
/*! Isolated SPU module. */
#define SELF_TYPE_ISO 5
/*! Secure loader. */
#define SELF_TYPE_LDR 6
/*! Unknown type 7. */
#define SELF_TYPE_UNK_7 7
/*! NPDRM application. */
#define SELF_TYPE_NPDRM 8
/*! NPDRM control info magic value ("NPD\0"). */
#define NP_CI_MAGIC 0x4E504400
/*! NPDRM license types. */
#define NP_LICENSE_NETWORK 1
#define NP_LICENSE_LOCAL 2
#define NP_LICENSE_FREE 3
/*! NPDRM application types. */
#define NP_TYPE_UPDATE 0x20
#define NP_TYPE_SPRX 0
#define NP_TYPE_EXEC 1
#define NP_TYPE_USPRX (NP_TYPE_UPDATE | NP_TYPE_SPRX)
#define NP_TYPE_UEXEC (NP_TYPE_UPDATE | NP_TYPE_EXEC)
/*! SCE header. */
typedef struct _sce_header
{
/*! Magic value. */
scetool::u32 magic;
/*! Header version .*/
scetool::u32 version;
/*! Key revision. */
scetool::u16 key_revision;
/*! Header type. */
scetool::u16 header_type;
/*! Metadata offset. */
scetool::u32 metadata_offset;
/*! Header length. */
scetool::u64 header_len;
/*! Length of encapsulated data. */
scetool::u64 data_len;
} sce_header_t;
/*! SELF header. */
typedef struct _self_header
{
/*! Header type. */
scetool::u64 header_type;
/*! Application info offset. */
scetool::u64 app_info_offset;
/*! ELF offset. */
scetool::u64 elf_offset;
/*! Program headers offset. */
scetool::u64 phdr_offset;
/*! Section headers offset. */
scetool::u64 shdr_offset;
/*! Section info offset. */
scetool::u64 section_info_offset;
/*! SCE version offset. */
scetool::u64 sce_version_offset;
/*! Control info offset. */
scetool::u64 control_info_offset;
/*! Control info size. */
scetool::u64 control_info_size;
/*! Padding. */
scetool::u64 padding;
} self_header_t;
/*! Metadata info. */
typedef struct _metadata_info
{
/*! Key. */
scetool::u8 key[METADATA_INFO_KEY_LEN];
/*! Key padding. */
scetool::u8 key_pad[METADATA_INFO_KEYPAD_LEN];
/*! IV. */
scetool::u8 iv[METADATA_INFO_IV_LEN];
/*! IV padding. */
scetool::u8 iv_pad[METADATA_INFO_IVPAD_LEN];
} metadata_info_t;
typedef struct _metadata_header
{
/*! Signature input length. */
scetool::u64 sig_input_length;
scetool::u32 unknown_0;
/*! Section count. */
scetool::u32 section_count;
/*! Key count. */
scetool::u32 key_count;
/*! Optional header size. */
scetool::u32 opt_header_size;
scetool::u32 unknown_1;
scetool::u32 unknown_2;
} metadata_header_t;
/*! Metadata section header. */
typedef struct _metadata_section_header
{
/*! Data offset. */
scetool::u64 data_offset;
/*! Data size. */
scetool::u64 data_size;
/*! Type. */
scetool::u32 type;
/*! Index. */
scetool::u32 index;
/*! Hashed. */
scetool::u32 hashed;
/*! SHA1 index. */
scetool::u32 sha1_index;
/*! Encrypted. */
scetool::u32 encrypted;
/*! Key index. */
scetool::u32 key_index;
/*! IV index. */
scetool::u32 iv_index;
/*! Compressed. */
scetool::u32 compressed;
} metadata_section_header_t;
/*! SCE file signature. */
typedef struct _signature
{
scetool::u8 r[SIGNATURE_R_SIZE];
scetool::u8 s[SIGNATURE_S_SIZE];
scetool::u8 padding[6];
} signature_t;
/*! Section info. */
typedef struct _section_info
{
scetool::u64 offset;
scetool::u64 size;
scetool::u32 compressed;
scetool::u32 unknown_0;
scetool::u32 unknown_1;
scetool::u32 encrypted;
} section_info_t;
/*! SCE version. */
typedef struct _sce_version
{
/*! Header type. */
scetool::u32 header_type;
/*! SCE version section present? */
scetool::u32 present;
/*! Size. */
scetool::u32 size;
scetool::u32 unknown_3;
} sce_version_t;
/*! SCE version data 0x30. */
typedef struct _sce_version_data_30
{
scetool::u16 unknown_1; //Dunno.
scetool::u16 unknown_2; //0x0001
scetool::u32 unknown_3; //Padding?
scetool::u32 unknown_4; //Number of sections?
scetool::u32 unknown_5; //Padding?
/*! Data offset. */
scetool::u64 offset;
/*! Data size. */
scetool::u64 size;
} sce_version_data_30_t;
//(auth_id & AUTH_ONE_MASK) has to be 0x1000000000000000
#define AUTH_ONE_MASK 0xF000000000000000
#define AUTH_TERRITORY_MASK 0x0FF0000000000000
#define VENDOR_TERRITORY_MASK 0xFF000000
#define VENDOR_ID_MASK 0x00FFFFFF
/*! Application info. */
typedef struct _app_info
{
/*! Auth ID. */
scetool::u64 auth_id;
/*! Vendor ID. */
scetool::u32 vendor_id;
/*! SELF type. */
scetool::u32 self_type;
/*! Version. */
scetool::u64 version;
/*! Padding. */
scetool::u64 padding;
} app_info_t;
/*! Control info. */
typedef struct _control_info
{
/*! Control info type. */
scetool::u32 type;
/*! Size of following data. */
scetool::u32 size;
/*! Next flag (1 if another info follows). */
scetool::u64 next;
} control_info_t;
#define CI_FLAG_00_80 0x80
#define CI_FLAG_00_40 0x40 //root access
#define CI_FLAG_00_20 0x20 //kernel access
#define CI_FLAG_17_01 0x01
#define CI_FLAG_17_02 0x02
#define CI_FLAG_17_04 0x04
#define CI_FLAG_17_08 0x08
#define CI_FLAG_17_10 0x10
//1B:
//bdj 0x01, 0x09
//psp_emu 0x08
//psp_transl 0x0C
#define CI_FLAG_1B_01 0x01 //may use shared mem?
#define CI_FLAG_1B_02 0x02
#define CI_FLAG_1B_04 0x04
#define CI_FLAG_1B_08 0x08 //ss
#define CI_FLAG_1F_SHAREABLE 0x01
#define CI_FLAG_1F_02 0x02 //internal?
#define CI_FLAG_1F_FACTORY 0x04
#define CI_FLAG_1F_08 0x08 //???
/*! Control info data flags. */
typedef struct _ci_data_flags
{
scetool::u8 data[0x20];
} ci_data_flags_t;
/*! Control info data digest 0x30. */
typedef struct _ci_data_digest_30
{
scetool::u8 digest[20];
scetool::u64 unknown_0;
} ci_data_digest_30_t;
/*! Control info data digest 0x40. */
typedef struct _ci_data_digest_40
{
scetool::u8 digest1[20];
scetool::u8 digest2[20];
scetool::u64 fw_version;
} ci_data_digest_40_t;
/*! Control info data NPDRM. */
typedef struct _ci_data_npdrm
{
/*! Magic. */
scetool::u32 magic;
scetool::u32 unknown_0;
/*! License type. */
scetool::u32 license_type;
/*! Application type. */
scetool::u32 app_type;
/*! Content ID. */
scetool::u8 content_id[0x30];
/*! Random padding. */
scetool::u8 rndpad[0x10];
/*! ContentID_FileName hash. */
scetool::u8 hash_cid_fname[0x10];
/*! Control info hash. */
scetool::u8 hash_ci[0x10];
scetool::u64 unknown_1;
scetool::u64 unknown_2;
} ci_data_npdrm_t;
/*! Optional header. */
typedef struct _opt_header
{
/*! Type. */
scetool::u32 type;
/*! Size. */
scetool::u32 size;
/*! Next flag (1 if another header follows). */
scetool::u64 next;
} opt_header_t;
/*! Capability flags. */
#define CAP_FLAG_1 0x01 //only seen in PPU selfs
#define CAP_FLAG_2 0x02 //only seen in PPU selfs
#define CAP_FLAG_4 0x04 //only seen in bdj PPU self
#define CAP_FLAG_REFTOOL 0x08
#define CAP_FLAG_DEBUG 0x10
#define CAP_FLAG_RETAIL 0x20
#define CAP_FLAG_SYSDBG 0x40
#define UNK7_2000 0x2000 //hddbind?
#define UNK7_20000 0x20000 //flashbind?
#define UNK7_40000 0x40000 //discbind?
#define UNK7_80000 0x80000
#define UNK7_PS3SWU 0x116000 //dunno...
/*! SCE file capability flags. */
typedef struct _oh_data_cap_flags
{
scetool::u64 unk3; //0
scetool::u64 unk4; //0
/*! Flags. */
scetool::u64 flags;
scetool::u32 unk6;
scetool::u32 unk7;
} oh_data_cap_flags_t;
/*! Section context. */
typedef struct _sce_section_ctxt
{
/*! Data buffer. */
void *buffer;
/*! Size. */
scetool::u32 size;
/*! Offset. */
scetool::u32 offset;
/*! May be compressed. */
BOOL may_compr;
} sce_section_ctxt_t;
typedef struct _makeself_ctxt
{
/*! ELF file buffer (for ELF -> SELF). */
scetool::u8 *elf;
/*! ELF file length. */
scetool::u32 elf_len;
/*! ELF header. */
void *ehdr;
/*! ELF header size. */
scetool::u32 ehsize;
/*! Program headers. */
void *phdrs;
/*! Program headers size. */
scetool::u32 phsize;
/*! Section headers. */
void *shdrs;
/*! Section headers size. */
scetool::u32 shsize;
/*! Section info count. */
scetool::u32 si_cnt;
/*! Number of section infos that are present as data sections. */
scetool::u32 si_sec_cnt;
} makeself_ctxt_t;
/*! SCE file buffer context. */
typedef struct _sce_buffer_ctxt
{
/*! SCE file buffer. */
scetool::u8 *scebuffer;
/*! SCE header. */
sce_header_t *sceh;
/*! File type dependent header. */
union
{
struct
{
/*! SELF header. */
self_header_t *selfh;
/*! Application info. */
app_info_t *ai;
/*! Section info. */
section_info_t *si;
/*! SCE version. */
sce_version_t *sv;
/*! Control infos. */
list_t *cis;
/*! Optional headers. */
list_t *ohs;
} self;
};
/*! Metadata info. */
metadata_info_t *metai;
/*! Metadata header. */
metadata_header_t *metah;
/*! Metadata section headers. */
metadata_section_header_t *metash;
/*! SCE file keys. */
scetool::u8 *keys;
/*! Keys length. */
scetool::u32 keys_len;
/*! Signature. */
signature_t *sig;
/*! Metadata decrypted? */
BOOL mdec;
/*! Data layout. */
/*! SCE header offset. */
scetool::u32 off_sceh;
union
{
struct
{
/*! SELF header offset. */
scetool::u32 off_selfh;
/*! Application info offset. */
scetool::u32 off_ai;
/*! ELF header offset. */
scetool::u32 off_ehdr;
/*! Program header offset. */
scetool::u32 off_phdr;
/*! Section info offset. */
scetool::u32 off_si;
/*! SCE version offset. */
scetool::u32 off_sv;
/*! Control infos offset. */
scetool::u32 off_cis;
/*! Optional headers offset. */
scetool::u32 off_ohs;
} off_self;
};
/*! Metadata info offset. */
scetool::u32 off_metai;
/*! Metadata header offset. */
scetool::u32 off_metah;
/*! Metadata section headers offset. */
scetool::u32 off_metash;
/*! Keys offset. */
scetool::u32 off_keys;
/*! Signature offset. */
scetool::u32 off_sig;
/*! Header padding end offset. */
scetool::u32 off_hdrpad;
/*! File creation type dependent data. */
union
{
/*! ELF -> SELF. */
makeself_ctxt_t *makeself;
};
/*! Data sections. */
list_t *secs;
} sce_buffer_ctxt_t;
/*! Create SCE file context from SCE file buffer. */
sce_buffer_ctxt_t *sce_create_ctxt_from_buffer(scetool::u8 *scebuffer);
/*! Create SCE file context for SELF creation. */
sce_buffer_ctxt_t *sce_create_ctxt_build_self(scetool::u8 *elf, scetool::u32 elf_len);
/*! Add data section to SCE context. */
void sce_add_data_section(sce_buffer_ctxt_t *ctxt, void *buffer, scetool::u32 size, BOOL may_compr);
/*! Set metadata section header. */
void sce_set_metash(sce_buffer_ctxt_t *ctxt, scetool::u32 type, BOOL encrypted, scetool::u32 idx);
/*! Compress data. */
void sce_compress_data(sce_buffer_ctxt_t *ctxt);
/*! Layout offsets for SCE file creation. */
void sce_layout_ctxt(sce_buffer_ctxt_t *ctxt);
/*! Encrypt context. */
BOOL sce_encrypt_ctxt(sce_buffer_ctxt_t *ctxt, scetool::u8 *keyset);
/*! Write context to file. */
BOOL sce_write_ctxt(sce_buffer_ctxt_t *ctxt, scetool::s8 *fname);
/*! Decrypt header (use passed metadata_into if not NULL). */
BOOL sce_decrypt_header(sce_buffer_ctxt_t *ctxt, scetool::u8 *metadata_info, scetool::u8 *keyset);
/*! Decrypt data. */
BOOL sce_decrypt_data(sce_buffer_ctxt_t *ctxt);
/*! Print SCE file info. */
void sce_print_info(FILE *fp, sce_buffer_ctxt_t *ctxt);
/*! Get version string from version. */
scetool::s8 *sce_version_to_str(scetool::u64 version);
/*! Get version from version string. */
scetool::u64 sce_str_to_version(scetool::s8 *version);
/*! Convert hex version to dec version. */
scetool::u64 sce_hexver_to_decver(scetool::u64 version);
/*! Get control info. */
control_info_t *sce_get_ctrl_info(sce_buffer_ctxt_t *ctxt, scetool::u32 type);
/*! Get optional header. */
opt_header_t *sce_get_opt_header(sce_buffer_ctxt_t *ctxt, scetool::u32 type);
#endif

View File

@ -1,201 +0,0 @@
/*
* Copyright (c) 2011-2013 by naehrwert
* This file is released under the GPLv2.
*/
#ifndef _SCE_INLINES_H_
#define _SCE_INLINES_H_
#include <string.h>
#include "types.h"
#include "sce.h"
static inline void _es_sce_header(sce_header_t *h)
{
h->magic = _Es32(h->magic);
h->version = _Es32(h->version);
h->key_revision = _Es16(h->key_revision);
h->header_type = _Es16(h->header_type);
h->metadata_offset = _Es32(h->metadata_offset);
h->header_len = _Es64(h->header_len);
h->data_len = _Es64(h->data_len);
}
static inline void _copy_es_sce_header(sce_header_t *dst, sce_header_t *src)
{
memcpy(dst, src, sizeof(sce_header_t));
_es_sce_header(dst);
}
static inline void _es_metadata_header(metadata_header_t *h)
{
h->sig_input_length = _Es64(h->sig_input_length);
h->unknown_0 = _Es32(h->unknown_0);
h->section_count = _Es32(h->section_count);
h->key_count = _Es32(h->key_count);
h->opt_header_size = _Es32(h->opt_header_size);
h->unknown_1 = _Es32(h->unknown_1);
h->unknown_2 = _Es32(h->unknown_2);
}
static inline void _copy_es_metadata_header(metadata_header_t *dst, metadata_header_t *src)
{
memcpy(dst, src, sizeof(metadata_header_t));
_es_metadata_header(dst);
}
static inline void _es_metadata_section_header(metadata_section_header_t *h)
{
h->data_offset = _Es64(h->data_offset);
h->data_size = _Es64(h->data_size);
h->type = _Es32(h->type);
h->index = _Es32(h->index);
h->hashed = _Es32(h->hashed);
h->sha1_index = _Es32(h->sha1_index);
h->encrypted = _Es32(h->encrypted);
h->key_index = _Es32(h->key_index);
h->iv_index = _Es32(h->iv_index);
h->compressed = _Es32(h->compressed);
}
static inline void _copy_es_metadata_section_header(metadata_section_header_t *dst, metadata_section_header_t *src)
{
memcpy(dst, src, sizeof(metadata_section_header_t));
_es_metadata_section_header(dst);
}
static inline void _es_self_header(self_header_t *h)
{
h->header_type = _Es64(h->header_type);
h->app_info_offset = _Es64(h->app_info_offset);
h->elf_offset = _Es64(h->elf_offset);
h->phdr_offset = _Es64(h->phdr_offset);
h->shdr_offset = _Es64(h->shdr_offset);
h->section_info_offset = _Es64(h->section_info_offset);
h->sce_version_offset = _Es64(h->sce_version_offset);
h->control_info_offset = _Es64(h->control_info_offset);
h->control_info_size = _Es64(h->control_info_size);
h->padding = _Es64(h->padding);
}
static inline void _copy_es_self_header(self_header_t *dst, self_header_t *src)
{
memcpy(dst, src, sizeof(self_header_t));
_es_self_header(dst);
}
static inline void _es_section_info(section_info_t *si)
{
si->offset = _Es64(si->offset);
si->size = _Es64(si->size);
si->compressed = _Es32(si->compressed);
si->unknown_0 = _Es32(si->unknown_0);
si->unknown_1 = _Es32(si->unknown_1);
si->encrypted = _Es32(si->encrypted);
}
static inline void _copy_es_section_info(section_info_t *dst, section_info_t *src)
{
memcpy(dst, src, sizeof(section_info_t));
_es_section_info(dst);
}
static inline void _es_sce_version(sce_version_t *sv)
{
sv->header_type = _Es32(sv->header_type);
sv->present = _Es32(sv->present);
sv->size = _Es32(sv->size);
sv->unknown_3 = _Es32(sv->unknown_3);
}
static inline void _copy_es_sce_version(sce_version_t *dst, sce_version_t *src)
{
memcpy(dst, src, sizeof(sce_version_t));
_es_sce_version(dst);
}
static inline void _es_app_info(app_info_t *ai)
{
ai->auth_id = _Es64(ai->auth_id);
ai->vendor_id = _Es32(ai->vendor_id);
ai->self_type = _Es32(ai->self_type);
ai->version = _Es64(ai->version);
ai->padding = _Es64(ai->padding);
}
static inline void _copy_es_app_info(app_info_t *dst, app_info_t *src)
{
memcpy(dst, src, sizeof(app_info_t));
_es_app_info(dst);
}
static inline void _es_control_info(control_info_t *ci)
{
ci->type = _Es32(ci->type);
ci->size = _Es32(ci->size);
ci->next = _Es64(ci->next);
}
static inline void _copy_es_control_info(control_info_t *dst, control_info_t *src)
{
memcpy(dst, src, sizeof(control_info_t));
_es_control_info(dst);
}
static inline void _es_ci_data_digest_40(ci_data_digest_40_t *dig)
{
dig->fw_version = _Es64(dig->fw_version);
}
static inline void _copy_es_ci_data_digest_40(ci_data_digest_40_t *dst, ci_data_digest_40_t *src)
{
memcpy(dst, src, sizeof(ci_data_digest_40_t));
_es_ci_data_digest_40(dst);
}
static inline void _es_ci_data_npdrm(ci_data_npdrm_t *np)
{
np->magic = _Es32(np->magic);
np->unknown_0 = _Es32(np->unknown_0);
np->license_type = _Es32(np->license_type);
np->app_type = _Es32(np->app_type);
np->unknown_1 = _Es64(np->unknown_1);
np->unknown_2 = _Es64(np->unknown_2);
}
static inline void _copy_es_ci_data_npdrm(ci_data_npdrm_t *dst, ci_data_npdrm_t *src)
{
memcpy(dst, src, sizeof(ci_data_npdrm_t));
_es_ci_data_npdrm(dst);
}
static inline void _es_opt_header(opt_header_t *oh)
{
oh->type = _Es32(oh->type);
oh->size = _Es32(oh->size);
oh->next = _Es64(oh->next);
}
static inline void _copy_es_opt_header(opt_header_t *dst, opt_header_t *src)
{
memcpy(dst, src, sizeof(opt_header_t));
_es_opt_header(dst);
}
static inline void _es_oh_data_cap_flags(oh_data_cap_flags_t *cf)
{
cf->unk3 = _Es64(cf->unk3);
cf->unk4 = _Es64(cf->unk4);
cf->flags = _Es64(cf->flags);
cf->unk6 = _Es32(cf->unk6);
cf->unk7 = _Es32(cf->unk7);
}
static inline void _copy_es_cap_flags(oh_data_cap_flags_t *dst, oh_data_cap_flags_t *src)
{
memcpy(dst, src, sizeof(oh_data_cap_flags_t));
_es_oh_data_cap_flags(dst);
}
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +0,0 @@
#pragma once
#include "types.h"
bool scetool_decrypt(scetool::s8 *_file_in, scetool::s8 *_file_out);

View File

@ -1,72 +0,0 @@
/*
* Copyright (c) 2011-2013 by naehrwert
* This file is released under the GPLv2.
*/
#ifndef _SELF_H_
#define _SELF_H_
#include "types.h"
#include "config.h"
#include "np.h"
/*! PS3 specific ELF constants. */
/*! LV2 OS ABI. */
#define ELFOSABI_CELL_LV2 0x66
/*! PRX ELF type. */
#define ET_PS3PRX 0xFFA4
/*! PS3 Params. */
#define PT_PS3_PARAMS 0x60000001
/*! PS3 PRX. */
#define PT_PS3_PRX 0x60000002
/*! PRX Relocations. */
#define PT_PS3_PRX_RELOC 0x700000A4
/*! SELF config. */
typedef struct _self_config
{
/*! Add section headers. */
BOOL add_shdrs;
/*! Compress data. */
BOOL compress_data;
/*! Skip sections. */
BOOL skip_sections;
/*! Key revision. */
scetool::u16 key_revision;
/*! Auth ID. */
scetool::u64 auth_id;
/*! Vendor ID. */
scetool::u32 vendor_id;
/*! SELF type. */
scetool::u32 self_type;
/*! Application version. */
scetool::u64 app_version;
/*! Firmware version. */
scetool::u64 fw_version;
/*! Control flags. */
scetool::u8 *ctrl_flags;
/*! Capability flags. */
scetool::u8 *cap_flags;
#ifdef CONFIG_CUSTOM_INDIV_SEED
/*! Individuals seed. */
scetool::u8 *indiv_seed;
/*! Individuals seed size. */
scetool::u32 indiv_seed_size;
#endif
/*! NPDRM config (used if not NULL). */
npdrm_config_t *npdrm_config;
} self_config_t;
/*! Print SELF info. */
BOOL self_print_info(FILE *fp, sce_buffer_ctxt_t *ctxt);
/*! Create ELF from SELF. */
BOOL self_write_to_elf(sce_buffer_ctxt_t *ctxt, const scetool::s8 *elf_out);
/*! Create SELF from ELF. */
BOOL self_build_self(sce_buffer_ctxt_t *ctxt, self_config_t *sconf);
#endif

View File

@ -1,62 +0,0 @@
/*
* Copyright (c) 2011-2013 by naehrwert
* This file is released under the GPLv2.
*/
#ifndef _SPP_H_
#define _SPP_H_
#include "types.h"
#include "sce.h"
/*! SPP entry types. */
#define SPP_ENTRY_TYPE_1 1
#define SPP_ENTRY_TYPE_2 2
/*! SPP header. */
typedef struct _spp_header
{
scetool::u16 unk1;
scetool::u16 unk2;
scetool::u32 spp_size;
scetool::u32 unk3;
scetool::u32 unk4;
scetool::u64 unk5;
scetool::u32 entcnt;
scetool::u32 unk7;
} spp_header_t;
static inline void _es_spp_header(spp_header_t *h)
{
h->unk1 = _Es16(h->unk1);
h->unk2 = _Es16(h->unk2);
h->spp_size = _Es32(h->spp_size);
h->unk3 = _Es32(h->unk3);
h->unk4 = _Es32(h->unk4);
h->unk5 = _Es64(h->unk5);
h->entcnt = _Es32(h->entcnt);
h->unk7 = _Es32(h->unk7);
}
/*! SPP entry header. */
typedef struct _spp_entry_header
{
scetool::u32 entry_size;
scetool::u32 type;
scetool::u64 laid;
scetool::u64 paid;
scetool::u8 name[0x20];
} spp_entry_header_t;
static inline void _es_spp_entry_header(spp_entry_header_t *h)
{
h->entry_size = _Es32(h->entry_size);
h->type = _Es32(h->type);
h->laid = _Es64(h->laid);
h->paid = _Es64(h->paid);
}
/*! Print SPP infos. */
void spp_print(FILE *fp, sce_buffer_ctxt_t *ctxt);
#endif

View File

@ -1,54 +0,0 @@
/*
* Copyright (c) 2011-2013 by naehrwert
* This file is released under the GPLv2.
*/
#ifndef _TABLES_H_
#define _TABLES_H_
#include "types.h"
#include "util.h"
/*! SELF types. */
extern id_to_name_t _self_types[];
/*! SELF types as parameter. */
extern id_to_name_t _self_types_params[];
/* Control info types. */
extern id_to_name_t _control_info_types[];
/*! Optional header types. */
extern id_to_name_t _optional_header_types[];
/*! NPDRM application types. */
extern id_to_name_t _np_app_types[];
/*! Auth IDs. */
extern id_to_name_t _auth_ids[];
/*! Vendor IDs. */
extern id_to_name_t _vendor_ids[];
/*! ELF machines. */
extern id_to_name_t _e_machines[];
/*! ELF types. */
extern id_to_name_t _e_types[];
/*! Section header types. */
extern id_to_name_t _sh_types[];
/*! Program header types. */
extern id_to_name_t _ph_types[];
/*! Key types. */
extern id_to_name_t _key_types[];
/*! Key revisions. */
//extern const scetool::s8 *_key_revisions[];
/*! SCE header types. */
extern id_to_name_t _sce_header_types[];
#endif

View File

@ -1,65 +0,0 @@
/*
* Copyright (c) 2011-2013 by naehrwert
* This file is released under the GPLv2.
*/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
namespace scetool{
typedef char s8;
typedef unsigned char u8;
typedef short s16;
typedef unsigned short u16;
typedef int s32;
typedef unsigned int u32;
#if defined(_WIN32) && defined(_MSC_VER)
typedef __int64 s64;
typedef unsigned __int64 u64;
#else
typedef long long int s64;
typedef unsigned long long int u64;
#endif
}
#define BOOL int
#define TRUE 1
#define FALSE 0
//Align.
#define ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1))
//Bits <-> bytes conversion.
#define BITS2BYTES(x) ((x) / 8)
#define BYTES2BITS(x) ((x) * 8)
//Endian swap for scetool::u16.
#define _Es16(val) \
((scetool::u16)(((((scetool::u16)val) & 0xff00) >> 8) | \
((((scetool::u16)val) & 0x00ff) << 8)))
//Endian swap for scetool::u32.
#define _Es32(val) \
((scetool::u32)(((((scetool::u32)val) & 0xff000000) >> 24) | \
((((scetool::u32)val) & 0x00ff0000) >> 8 ) | \
((((scetool::u32)val) & 0x0000ff00) << 8 ) | \
((((scetool::u32)val) & 0x000000ff) << 24)))
//Endian swap for scetool::u64.
#define _Es64(val) \
((scetool::u64)(((((scetool::u64)val) & 0xff00000000000000ull) >> 56) | \
((((scetool::u64)val) & 0x00ff000000000000ull) >> 40) | \
((((scetool::u64)val) & 0x0000ff0000000000ull) >> 24) | \
((((scetool::u64)val) & 0x000000ff00000000ull) >> 8 ) | \
((((scetool::u64)val) & 0x00000000ff000000ull) << 8 ) | \
((((scetool::u64)val) & 0x0000000000ff0000ull) << 24) | \
((((scetool::u64)val) & 0x000000000000ff00ull) << 40) | \
((((scetool::u64)val) & 0x00000000000000ffull) << 56)))
#ifdef __cplusplus
}
#endif

View File

@ -1,60 +0,0 @@
/*
* Copyright (c) 2011-2013 by naehrwert
* This file is released under the GPLv2.
*/
#ifndef _UTIL_H_
#define _UTIL_H_
#include <stdio.h>
#include "types.h"
/*! Verbose. */
extern BOOL _verbose;
#define _LOG_VERBOSE(...) _IF_VERBOSE(printf("[*] " __VA_ARGS__))
#define _IF_VERBOSE(code) \
do \
{ \
if(_verbose == TRUE) \
{ \
code; \
} \
} while(0)
/*! Raw. */
extern BOOL _raw;
#define _PRINT_RAW(fp, ...) _IF_RAW(fprintf(fp, __VA_ARGS__))
#define _IF_RAW(code) \
do \
{ \
if(_raw == TRUE) \
{ \
code; \
} \
} while(0)
/*! ID to name entry. */
typedef struct _id_to_name
{
scetool::u64 id;
const scetool::s8 *name;
} id_to_name_t;
/*! Utility functions. */
void _hexdump(FILE *fp, const char *name, scetool::u32 offset, scetool::u8 *buf, int len, BOOL print_addr);
void _print_align(FILE *fp, const scetool::s8 *str, scetool::s32 align, scetool::s32 len);
scetool::u8 *_read_buffer(const scetool::s8 *file, scetool::u32 *length);
int _write_buffer(const scetool::s8 *file, scetool::u8 *buffer, scetool::u32 length);
const scetool::s8 *_get_name(id_to_name_t *tab, scetool::u64 id);
scetool::u64 _get_id(id_to_name_t *tab, const scetool::s8 *name);
void _zlib_inflate(scetool::u8 *in, scetool::u64 len_in, scetool::u8 *out, scetool::u64 len_out);
void _zlib_deflate(scetool::u8 *in, scetool::u64 len_in, scetool::u8 *out, scetool::u64 len_out);
scetool::u8 _get_rand_byte();
void _fill_rand_bytes(scetool::u8 *dst, scetool::u32 len);
void _memcpy_inv(scetool::u8 *dst, scetool::u8 *src, scetool::u32 len);
void *_memdup(void *ptr, scetool::u32 size);
scetool::u64 _x_to_u64(const scetool::s8 *hex);
scetool::u8 *_x_to_u8_buffer(const scetool::s8 *hex);
#endif

View File

@ -1,428 +0,0 @@
/* zconf.h -- configuration of the zlib compression library
* Copyright (C) 1995-2010 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
/* @(#) $Id$ */
#ifndef ZCONF_H
#define ZCONF_H
/*
* If you *really* need a unique prefix for all types and library functions,
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
* Even better than compiling with -DZ_PREFIX would be to use configure to set
* this permanently in zconf.h using "./configure --zprefix".
*/
#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
/* all linked symbols */
# define _dist_code z__dist_code
# define _length_code z__length_code
# define _tr_align z__tr_align
# define _tr_flush_block z__tr_flush_block
# define _tr_init z__tr_init
# define _tr_stored_block z__tr_stored_block
# define _tr_tally z__tr_tally
# define adler32 z_adler32
# define adler32_combine z_adler32_combine
# define adler32_combine64 z_adler32_combine64
# define compress z_compress
# define compress2 z_compress2
# define compressBound z_compressBound
# define crc32 z_crc32
# define crc32_combine z_crc32_combine
# define crc32_combine64 z_crc32_combine64
# define deflate z_deflate
# define deflateBound z_deflateBound
# define deflateCopy z_deflateCopy
# define deflateEnd z_deflateEnd
# define deflateInit2_ z_deflateInit2_
# define deflateInit_ z_deflateInit_
# define deflateParams z_deflateParams
# define deflatePrime z_deflatePrime
# define deflateReset z_deflateReset
# define deflateSetDictionary z_deflateSetDictionary
# define deflateSetHeader z_deflateSetHeader
# define deflateTune z_deflateTune
# define deflate_copyright z_deflate_copyright
# define get_crc_table z_get_crc_table
# define gz_error z_gz_error
# define gz_intmax z_gz_intmax
# define gz_strwinerror z_gz_strwinerror
# define gzbuffer z_gzbuffer
# define gzclearerr z_gzclearerr
# define gzclose z_gzclose
# define gzclose_r z_gzclose_r
# define gzclose_w z_gzclose_w
# define gzdirect z_gzdirect
# define gzdopen z_gzdopen
# define gzeof z_gzeof
# define gzerror z_gzerror
# define gzflush z_gzflush
# define gzgetc z_gzgetc
# define gzgets z_gzgets
# define gzoffset z_gzoffset
# define gzoffset64 z_gzoffset64
# define gzopen z_gzopen
# define gzopen64 z_gzopen64
# define gzprintf z_gzprintf
# define gzputc z_gzputc
# define gzputs z_gzputs
# define gzread z_gzread
# define gzrewind z_gzrewind
# define gzseek z_gzseek
# define gzseek64 z_gzseek64
# define gzsetparams z_gzsetparams
# define gztell z_gztell
# define gztell64 z_gztell64
# define gzungetc z_gzungetc
# define gzwrite z_gzwrite
# define inflate z_inflate
# define inflateBack z_inflateBack
# define inflateBackEnd z_inflateBackEnd
# define inflateBackInit_ z_inflateBackInit_
# define inflateCopy z_inflateCopy
# define inflateEnd z_inflateEnd
# define inflateGetHeader z_inflateGetHeader
# define inflateInit2_ z_inflateInit2_
# define inflateInit_ z_inflateInit_
# define inflateMark z_inflateMark
# define inflatePrime z_inflatePrime
# define inflateReset z_inflateReset
# define inflateReset2 z_inflateReset2
# define inflateSetDictionary z_inflateSetDictionary
# define inflateSync z_inflateSync
# define inflateSyncPoint z_inflateSyncPoint
# define inflateUndermine z_inflateUndermine
# define inflate_copyright z_inflate_copyright
# define inflate_fast z_inflate_fast
# define inflate_table z_inflate_table
# define uncompress z_uncompress
# define zError z_zError
# define zcalloc z_zcalloc
# define zcfree z_zcfree
# define zlibCompileFlags z_zlibCompileFlags
# define zlibVersion z_zlibVersion
/* all zlib typedefs in zlib.h and zconf.h */
# define Byte z_Byte
# define Bytef z_Bytef
# define alloc_func z_alloc_func
# define charf z_charf
# define free_func z_free_func
# define gzFile z_gzFile
# define gz_header z_gz_header
# define gz_headerp z_gz_headerp
# define in_func z_in_func
# define intf z_intf
# define out_func z_out_func
# define uInt z_uInt
# define uIntf z_uIntf
# define uLong z_uLong
# define uLongf z_uLongf
# define voidp z_voidp
# define voidpc z_voidpc
# define voidpf z_voidpf
/* all zlib structs in zlib.h and zconf.h */
# define gz_header_s z_gz_header_s
# define internal_state z_internal_state
#endif
#if defined(__MSDOS__) && !defined(MSDOS)
# define MSDOS
#endif
#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
# define OS2
#endif
#if defined(_WINDOWS) && !defined(WINDOWS)
# define WINDOWS
#endif
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
# ifndef WIN32
# define WIN32
# endif
#endif
#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
# ifndef SYs16BIT
# define SYs16BIT
# endif
# endif
#endif
/*
* Compile with -DMAXSEG_64K if the alloc function cannot allocate more
* than 64k bytes at a time (needed on systems with 16-bit int).
*/
#ifdef SYs16BIT
# define MAXSEG_64K
#endif
#ifdef MSDOS
# define UNALIGNED_OK
#endif
#ifdef __STDC_VERSION__
# ifndef STDC
# define STDC
# endif
# if __STDC_VERSION__ >= 199901L
# ifndef STDC99
# define STDC99
# endif
# endif
#endif
#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
# define STDC
#endif
#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
# define STDC
#endif
#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
# define STDC
#endif
#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
# define STDC
#endif
#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
# define STDC
#endif
#ifndef STDC
# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
# define const /* note: need a more gentle solution here */
# endif
#endif
/* Some Mac compilers merge all .h files incorrectly: */
#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
# define NO_DUMMY_DECL
#endif
/* Maximum value for memLevel in deflateInit2 */
#ifndef MAX_MEM_LEVEL
# ifdef MAXSEG_64K
# define MAX_MEM_LEVEL 8
# else
# define MAX_MEM_LEVEL 9
# endif
#endif
/* Maximum value for windowBits in deflateInit2 and inflateInit2.
* WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
* created by gzip. (Files created by minigzip can still be extracted by
* gzip.)
*/
#ifndef MAX_WBITS
# define MAX_WBITS 15 /* 32K LZ77 window */
#endif
/* The memory requirements for deflate are (in bytes):
(1 << (windowBits+2)) + (1 << (memLevel+9))
that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
plus a few kilobytes for small objects. For example, if you want to reduce
the default memory requirements from 256K to 128K, compile with
make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
Of course this will generally degrade compression (there's no free lunch).
The memory requirements for inflate are (in bytes) 1 << windowBits
that is, 32K for windowBits=15 (default value) plus a few kilobytes
for small objects.
*/
/* Type declarations */
#ifndef OF /* function prototypes */
# ifdef STDC
# define OF(args) args
# else
# define OF(args) ()
# endif
#endif
/* The following definitions for FAR are needed only for MSDOS mixed
* model programming (small or medium model with some far allocations).
* This was tested only with MSC; for other MSDOS compilers you may have
* to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
* just define FAR to be empty.
*/
#ifdef SYs16BIT
# if defined(M_I86SM) || defined(M_I86MM)
/* MSC small or medium model */
# define SMALL_MEDIUM
# ifdef _MSC_VER
# define FAR _far
# else
# define FAR far
# endif
# endif
# if (defined(__SMALL__) || defined(__MEDIUM__))
/* Turbo C small or medium model */
# define SMALL_MEDIUM
# ifdef __BORLANDC__
# define FAR _far
# else
# define FAR far
# endif
# endif
#endif
#if defined(WINDOWS) || defined(WIN32)
/* If building or using zlib as a DLL, define ZLIB_DLL.
* This is not mandatory, but it offers a little performance increase.
*/
# ifdef ZLIB_DLL
# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
# ifdef ZLIB_INTERNAL
# define ZEXTERN extern __declspec(dllexport)
# else
# define ZEXTERN extern __declspec(dllimport)
# endif
# endif
# endif /* ZLIB_DLL */
/* If building or using zlib with the WINAPI/WINAPIV calling convention,
* define ZLIB_WINAPI.
* Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
*/
# ifdef ZLIB_WINAPI
# ifdef FAR
# undef FAR
# endif
# include <windows.h>
/* No need for _export, use ZLIB.DEF instead. */
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
# define ZEXPORT WINAPI
# ifdef WIN32
# define ZEXPORTVA WINAPIV
# else
# define ZEXPORTVA FAR CDECL
# endif
# endif
#endif
#if defined (__BEOS__)
# ifdef ZLIB_DLL
# ifdef ZLIB_INTERNAL
# define ZEXPORT __declspec(dllexport)
# define ZEXPORTVA __declspec(dllexport)
# else
# define ZEXPORT __declspec(dllimport)
# define ZEXPORTVA __declspec(dllimport)
# endif
# endif
#endif
#ifndef ZEXTERN
# define ZEXTERN extern
#endif
#ifndef ZEXPORT
# define ZEXPORT
#endif
#ifndef ZEXPORTVA
# define ZEXPORTVA
#endif
#ifndef FAR
# define FAR
#endif
#if !defined(__MACTYPES__)
typedef unsigned char Byte; /* 8 bits */
#endif
typedef unsigned int uInt; /* 16 bits or more */
typedef unsigned long uLong; /* 32 bits or more */
#ifdef SMALL_MEDIUM
/* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
# define Bytef Byte FAR
#else
typedef Byte FAR Bytef;
#endif
typedef char FAR charf;
typedef int FAR intf;
typedef uInt FAR uIntf;
typedef uLong FAR uLongf;
#ifdef STDC
typedef void const *voidpc;
typedef void FAR *voidpf;
typedef void *voidp;
#else
typedef Byte const *voidpc;
typedef Byte FAR *voidpf;
typedef Byte *voidp;
#endif
#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
# define Z_HAVE_UNISTD_H
#endif
#ifdef STDC
# include <sys/types.h> /* for off_t */
#endif
/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
* "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
* though the former does not conform to the LFS document), but considering
* both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
* equivalently requesting no 64-bit operations
*/
#if -_LARGEFILE64_SOURCE - -1 == 1
# undef _LARGEFILE64_SOURCE
#endif
#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
# include <unistd.h> /* for SEEK_* and off_t */
# ifdef VMS
# include <unixio.h> /* for off_t */
# endif
# ifndef z_off_t
# define z_off_t off_t
# endif
#endif
#ifndef SEEK_SET
# define SEEK_SET 0 /* Seek from beginning of file. */
# define SEEK_CUR 1 /* Seek from current position. */
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
#endif
#ifndef z_off_t
# define z_off_t long
#endif
#if defined(_LARGEFILE64_SOURCE) && _LFs64_LARGEFILE-0
# define z_off64_t off64_t
#else
# define z_off64_t z_off_t
#endif
#if defined(__OS400__)
# define NO_vsnprintf
#endif
#if defined(__MVS__)
# define NO_vsnprintf
#endif
/* MVS linker does not support external names larger than 8 bytes */
#if defined(__MVS__)
#pragma map(deflateInit_,"DEIN")
#pragma map(deflateInit2_,"DEIN2")
#pragma map(deflateEnd,"DEEND")
#pragma map(deflateBound,"DEBND")
#pragma map(inflateInit_,"ININ")
#pragma map(inflateInit2_,"ININ2")
#pragma map(inflateEnd,"INEND")
#pragma map(inflateSync,"INSY")
#pragma map(inflateSetDictionary,"INSEDI")
#pragma map(compressBound,"CMBND")
#pragma map(inflate_table,"INTABL")
#pragma map(inflate_fast,"INFA")
#pragma map(inflate_copyright,"INCOPY")
#endif
#endif /* ZCONF_H */

File diff suppressed because it is too large Load Diff