Rename method to toInt32()

This commit is contained in:
de4dot 2012-01-07 19:14:15 +01:00
parent fd7363f1e1
commit 03a27110e7
4 changed files with 11 additions and 11 deletions

View File

@ -677,7 +677,7 @@ namespace de4dot.code.deobfuscators {
return false;
}
public static int convert(bool b) {
public static int toInt32(bool b) {
return b ? 1 : 0;
}
}

View File

@ -76,8 +76,8 @@ namespace de4dot.code.deobfuscators.Dotfuscator {
protected override int detectInternal() {
int val = 0;
int sum = convert(foundDotfuscatorAttribute) +
convert(stringDecrypter.Detected);
int sum = toInt32(foundDotfuscatorAttribute) +
toInt32(stringDecrypter.Detected);
if (sum > 0)
val += 100 + 10 * (sum - 1);

View File

@ -221,9 +221,9 @@ namespace de4dot.code.deobfuscators.dotNET_Reactor.v3 {
protected override int detectInternal() {
int val = 0;
int sum = convert(unpackedNativeFile) +
convert(decrypterType.Detected) +
convert(nativeLibSaver.Detected);
int sum = toInt32(unpackedNativeFile) +
toInt32(decrypterType.Detected) +
toInt32(nativeLibSaver.Detected);
if (sum > 0)
val += 100 + 10 * (sum - 1);

View File

@ -225,11 +225,11 @@ namespace de4dot.code.deobfuscators.dotNET_Reactor.v4 {
protected override int detectInternal() {
int val = 0;
int sum = convert(methodsDecrypter.Detected) +
convert(stringDecrypter.Detected) +
convert(booleanDecrypter.Detected) +
convert(assemblyResolver.Detected) +
convert(resourceResolver.Detected);
int sum = toInt32(methodsDecrypter.Detected) +
toInt32(stringDecrypter.Detected) +
toInt32(booleanDecrypter.Detected) +
toInt32(assemblyResolver.Detected) +
toInt32(resourceResolver.Detected);
if (sum > 0)
val += 100 + 10 * (sum - 1);