diff --git a/UDK GUID Reader.sln b/UDK GUID Reader.sln new file mode 100644 index 0000000..79e0578 --- /dev/null +++ b/UDK GUID Reader.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UDK GUID Reader", "UDK GUID Reader\UDK GUID Reader.vcxproj", "{CAFCAE99-FB9D-4DA5-BE25-B3675B078C66}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CAFCAE99-FB9D-4DA5-BE25-B3675B078C66}.Debug|x64.ActiveCfg = Debug|x64 + {CAFCAE99-FB9D-4DA5-BE25-B3675B078C66}.Debug|x64.Build.0 = Debug|x64 + {CAFCAE99-FB9D-4DA5-BE25-B3675B078C66}.Debug|x86.ActiveCfg = Debug|Win32 + {CAFCAE99-FB9D-4DA5-BE25-B3675B078C66}.Debug|x86.Build.0 = Debug|Win32 + {CAFCAE99-FB9D-4DA5-BE25-B3675B078C66}.Release|x64.ActiveCfg = Release|x64 + {CAFCAE99-FB9D-4DA5-BE25-B3675B078C66}.Release|x64.Build.0 = Release|x64 + {CAFCAE99-FB9D-4DA5-BE25-B3675B078C66}.Release|x86.ActiveCfg = Release|Win32 + {CAFCAE99-FB9D-4DA5-BE25-B3675B078C66}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/UDK GUID Reader/Main.c b/UDK GUID Reader/Main.c new file mode 100644 index 0000000..129fa1e --- /dev/null +++ b/UDK GUID Reader/Main.c @@ -0,0 +1,75 @@ +/** + * Copyright (C) 2016 Jessica James. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Written by Jessica James + */ + +#define _CRT_SECURE_NO_WARNINGS + +#include +#include +#include + +int main(int argc, const char **args) +{ + const char *filename; + FILE *file; + uint32_t GUID[4]; + int chr; + + if (argc < 2 || strcmp(args[1], "-help") == 0 || strcmp(args[1], "/?") == 0) + { + puts(""); + return 0; + } + + filename = args[1]; + + file = fopen(filename, "rb"); + if (file == NULL) + { + puts("ERROR: UNABLE TO OPEN FILE."); + return 0; + } + + // seek to string + fseek(file, 0x10, SEEK_CUR); + + // parse through string + while (chr = fgetc(file) != 0) + { + if (chr == EOF) + { + puts("ERROR: UNEXPECTED EOF."); + return 0; + } + } + + // seek to GUID + fseek(file, 48, SEEK_CUR); + + // read GUID + if (fread(GUID, sizeof(uint32_t), 4, file) != 4) + { + puts("ERROR: UNEXPECTED EOF IN GUID."); + return 0; + } + + // cleanup + fclose(file); + + printf("%.8X%.8X%.8X%.8X\n", GUID[0], GUID[1], GUID[2], GUID[3]); + return 0; +} diff --git a/UDK GUID Reader/UDK GUID Reader.vcxproj b/UDK GUID Reader/UDK GUID Reader.vcxproj new file mode 100644 index 0000000..f7adb85 --- /dev/null +++ b/UDK GUID Reader/UDK GUID Reader.vcxproj @@ -0,0 +1,128 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {CAFCAE99-FB9D-4DA5-BE25-B3675B078C66} + UDKGUIDReader + 8.1 + + + + Application + true + v140 + MultiByte + + + Application + false + v140 + true + MultiByte + + + Application + true + v140 + MultiByte + + + Application + false + v140 + true + MultiByte + + + + + + + + + + + + + + + + + + + + + UDK_GUID_Reader + + + + Level3 + Disabled + true + + + true + + + + + Level3 + Disabled + true + + + true + + + + + Level3 + MaxSpeed + true + true + true + + + true + true + true + + + + + Level3 + MaxSpeed + true + true + true + + + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/UDK GUID Reader/UDK GUID Reader.vcxproj.filters b/UDK GUID Reader/UDK GUID Reader.vcxproj.filters new file mode 100644 index 0000000..d832379 --- /dev/null +++ b/UDK GUID Reader/UDK GUID Reader.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file