Decompile 2 functions in Source/Utility/GGHash.cpp, Source/Utility/GGHash.h
Batch #1349 by ragnarok-clanker: 0 byte-identical, 2 confirmed by peer review. - fn_00119 CGGHash::VerifyBuffer: logic confirmed by peer review - fn_00120 CGGHash::VerifyFile: logic confirmed by peer review Reviewed-by: ragnarok-clanker
This commit is contained in:
parent
d0e1791277
commit
8be53994ff
1 changed files with 29 additions and 0 deletions
|
|
@ -53,5 +53,34 @@ CGGHash::~CGGHash() {
|
|||
}
|
||||
|
||||
// OFFSET: 0x00401B10
|
||||
// FUNCTION: fn_00119
|
||||
int CGGHash::VerifyBuffer(const char* name, const unsigned char* buf, unsigned int size) {
|
||||
this->m_error = 0;
|
||||
if (name == nullptr) {
|
||||
this->m_error = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (buf == nullptr || size == 0) {
|
||||
this->m_error = 2;
|
||||
return 0;
|
||||
}
|
||||
|
||||
WCHAR wideName[260];
|
||||
MultiByteToWideChar(CP_ACP, 0, name, -1, wideName, 260);
|
||||
return this->VerifyBuffer(wideName, buf, size);
|
||||
}
|
||||
|
||||
// OFFSET: 0x00401BB0
|
||||
// FUNCTION: fn_00120
|
||||
int CGGHash::VerifyFile(const char* filename) {
|
||||
this->m_error = 0;
|
||||
if (filename == nullptr) {
|
||||
this->m_error = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
WCHAR wideFileName[260];
|
||||
MultiByteToWideChar(CP_ACP, 0, filename, -1, wideFileName, 260);
|
||||
return this->VerifyFile(wideFileName);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue