im on windows7 i loaded windowsxp in virtualbox and it works, so its a problem with windows7 and calling the function
Code:
.586
.MODEL FLAT, STDCALL
OPTION CASEMAP:NONE
INCLUDE C:\MASM32\INCLUDE\WINDOWS.INC
INCLUDE C:\MASM32\INCLUDE\KERNEL32.INC
INCLUDELIB C:\MASM32\LIB\KERNEL32.LIB
INCLUDE C:\MASM32\INCLUDE\USER32.INC
INCLUDELIB C:\MASM32\LIB\USER32.LIB
.DATA
Encrypted DB "24EFEC132692C63CF934083B6D6F2EB9A2B0310BFFB92B0639782F0297DED722FB509F236DAFCC7AAFD4707079A9", 0 ; "steampass"
TheDir DB "C:\Program Files\Steam\",0
TheDLL DB "steam.dll",0
TheFunction DB "SteamDecryptDataForThisMachine",0
EncryptedL DD 5Ch
Decrypted DB 20 DUP(0)
DecryptedL DD ?
DecryptBufL DD sizeof Decrypted
Buffer DB 100 DUP(0)
.CONST
Message DB "Encrypted Str: %s", 13
DB "Encrypted Len: %i", 13, 13
DB "Decrypted Str: %s", 13
DB "Decrypted Len: %i", 0
.CODE
START:
invoke SetCurrentDirectory, addr TheDir ;/// C:\Program Files\Steam\
push OFFSET TheDLL
call LoadLibrary ;/// Load steam.dll
push OFFSET TheFunction
push eax
call GetProcAddress ;/// Get address of SteamDecryptDataForThisMachine function
push OFFSET DecryptedL
push DecryptBufL
push OFFSET Decrypted
push EncryptedL
push OFFSET Encrypted ;/// Encrypted pass from blob
call eax ;/// Call CryptDecodeString function (returned from GetProcAddress)
INVOKE wsprintf, OFFSET Buffer, OFFSET Message, OFFSET Encrypted, EncryptedL, OFFSET Decrypted, DecryptedL
INVOKE MessageBoxA, NULL, OFFSET Buffer, NULL, NULL
INVOKE ExitProcess, NULL
END START