|
#include <windows.h> #define ERROR_TITLE "Key File ReverseMe" void main(void){ // GetModuleHandleA, LoadIconA, LoadCursor 생략 HANDLE hFile; BYTE buffer[70]; DWORD rCnt = 0; DWORD pbuf,Cnt; hFile = CreateFileA("Keyfile.dat",0xC0000000,0x03,0x00,0x03,0x05B9E0B9,0x00); if ( hFile == INVALID_HANDLE_VALUE ){ MessageBoxA( NULL, "Evaluation period out of date. Purchase new license", ERROR_TITLE, 0x00 ); ExitProcess(0); return; } if ( !ReadFile(hFile,buffer,0x46,&rCnt,NULL) ) goto INCORRECT_VALUE; pbuf = Cnt = 0; if ( rCnt < 0x10 ) goto INCORRECT_VALUE; while(TRUE){ if ( buffer[pbuf] == 0 ) break; else if ( buffer[pbuf] == 0x47 ) Cnt++; pbuf++; } if ( Cnt < 0x08 ) goto INCORRECT_VALUE; MessageBoxA(NULL,"You really did it! Cngratz !!!",ERROR_TITLE,0x00); ExitProcess(0); return; INCORRECT_VALUE: MessageBoxA(NULL,"Keyfile is not valid. Sorry.",ERROR_TITLE,0x00); ExitProcess(0); return; } |
[Javascript] referrer 를 통한 웹사이트 접근 금지 (6) | 2011.10.15 |
---|---|
모처럼이니까 ! (0) | 2011.08.07 |
[API] 모든 드라이브 경로 구하기 (8) | 2010.04.11 |
[업데이트] Image Downloader Beta 1.1v (4) | 2010.02.10 |
Image Downloader Beta 1.0 (8) | 2010.01.18 |
HANDLE WINAPI FindFirstVolume( __out LPTSTR lpszVolumeName, __in DWORD cchBufferLength ); |
BOOL WINAPI FindNextVolume( __in HANDLE hFindVolume, __out LPTSTR lpszVolumeName, __in DWORD cchBufferLength ); |
BOOL WINAPI FindVolumeClose( __in HANDLE hFindVolume ); |
BOOL WINAPI GetVolumePathNamesForVolumeName( __in LPCTSTR lpszVolumeName, __out LPTSTR lpszVolumePathNames, __in DWORD cchBufferLength, __out PDWORD lpcchReturnLength ); |
// 2010. 04. 11 Volume Find // Coding by Fore ( http;//foreblog.tistory.com/ ) #include <windows.h> #include <tchar.h> #include <stdio.h> // 유니코드 호환을 위해 printf 를 매크로 설정해둔다. #ifdef UNICODE #define lprintf wprintf #else #define lprintf printf #endif int main(void){ HANDLE hVolume = NULL; // 볼륨 찾기 핸들 DWORD RetnVal = 0; // 리턴값 TCHAR VolumeName[MAX_PATH+1]; // 볼륨 저장 버퍼 TCHAR Path[MAX_PATH+1]; // 디렉토리 버퍼 // 버퍼 초기화 ZeroMemory(VolumeName,(MAX_PATH+1)*sizeof(TCHAR)); ZeroMemory(Path,(MAX_PATH+1)*sizeof(TCHAR)); // 볼륨 이름 찾기 시작 hVolume = FindFirstVolume(VolumeName,MAX_PATH); if ( hVolume == INVALID_HANDLE_VALUE ) return 0; // 볼륨 이름을 통해 디렉토리 경로를 구해온다. GetVolumePathNamesForVolumeName(VolumeName,Path,MAX_PATH,&RetnVal); // 출력 lprintf(_T("%s %s\n"),Path,VolumeName); // 버퍼 초기화 ZeroMemory(VolumeName,(MAX_PATH+1)*sizeof(TCHAR)); ZeroMemory(Path,(MAX_PATH+1)*sizeof(TCHAR)); // 반복 while(FindNextVolume(hVolume,VolumeName,MAX_PATH)){ GetVolumePathNamesForVolumeName(VolumeName,Path,MAX_PATH,&RetnVal); lprintf(_T("%s %s\n"),Path,VolumeName); ZeroMemory(VolumeName,(MAX_PATH+1)*sizeof(TCHAR)); ZeroMemory(Path,(MAX_PATH+1)*sizeof(TCHAR)); } // 볼륨 찾기 종료 FindVolumeClose(hVolume); // 핸들 초기화 hVolume = NULL; RetnVal = 0; return 0; } |
UINT WINAPI GetDriveType( __in_opt LPCTSTR lpRootPathName ); |
모처럼이니까 ! (0) | 2011.08.07 |
---|---|
심심해서 적어보는 ReverseMe ! 풀이 [2] (6) | 2010.08.24 |
[업데이트] Image Downloader Beta 1.1v (4) | 2010.02.10 |
Image Downloader Beta 1.0 (8) | 2010.01.18 |
WAV 구조 (?) (2) | 2009.08.26 |
심심해서 적어보는 ReverseMe ! 풀이 [2] (6) | 2010.08.24 |
---|---|
[API] 모든 드라이브 경로 구하기 (8) | 2010.04.11 |
Image Downloader Beta 1.0 (8) | 2010.01.18 |
WAV 구조 (?) (2) | 2009.08.26 |
중단 (124) | 2009.07.13 |
심심해서 적어보는 ReverseMe ! 풀이 [2] (6) | 2010.08.24 |
---|---|
[API] 모든 드라이브 경로 구하기 (8) | 2010.04.11 |
[업데이트] Image Downloader Beta 1.1v (4) | 2010.02.10 |
WAV 구조 (?) (2) | 2009.08.26 |
중단 (124) | 2009.07.13 |
FMT
Subchunk1ID - wave file의 정보를 가지고있다.
Subchunk1Size - 16 for PCM.
AudioFormat - 아날로그 - 디지털 변환 방법
NumChannels - Mono = 1, Stereo = 2 채널 숫자 : 스테레오/모노
SampleRate - 표본화율
ByteRate - SampleRate * NumChannels * BitsPerSample/8 용량
BlockAlign - NumChannels * BitsPerSample/8
BitsPerSample - 8 bits = 8, 16 bits = 16
DATA - data는 subchunk 자료(전체 데이터길이 정보)를 가지고있고 사실음의 크기를 포함한다Subchunk2ID
Subchunk2Size - NumSamples * NumChannels * BitsPerSample/8 이것은 자료에 있는 바이트 수이다. 또한 이 수 뒤에 subchunk의 크기로 이것을 생각할 수 있다.
data - The actual sound data.
◎ 원문
The canonical WAVE format starts with the RIFF header:
0 4 ChunkID Contains the letters "RIFF" in ASCII form (0x52494646 big-endian form).
4 4 ChunkSize 36 + SubChunk2Size, or more precisely:
4 + (8 + SubChunk1Size) + (8 + SubChunk2Size)
- This is the size of the rest of the chunk
following this number. This is the size of the
entire file in bytes minus 8 bytes for the
two fields not included in this count:
ChunkID and ChunkSize.
8 4 Format Contains the letters "WAVE" (0x57415645 big-endian form).
- The "WAVE" format consists of two subchunks: "fmt " and "data":
The "fmt " subchunk describes the sound data's format:
12 4 Subchunk1ID Contains the letters "fmt " (0x666d7420 big-endian form).
16 4 Subchunk1Size 16 for PCM. This is the size of the
- rest of the Subchunk which follows this number.
20 2 AudioFormat PCM = 1 (i.e. Linear quantization)
- Values other than 1 indicate some form of compression.
22 2 NumChannels Mono = 1, Stereo = 2, etc.
24 4 SampleRate 8000, 44100, etc.
28 4 ByteRate == SampleRate * NumChannels * BitsPerSample/8
32 2 BlockAlign == NumChannels * BitsPerSample/8
- The number of bytes for one sample including
all channels. I wonder what happens when
this number isn't an integer?
34 2 BitsPerSample 8 bits = 8, 16 bits = 16, etc.
2 ExtraParamSize if PCM, then doesn't exist X ExtraParams space for extra parameters
- The "data" subchunk contains the size of the data and the actual sound:
36 4 Subchunk2ID Contains the letters "data" (0x64617461 big-endian form).
40 4 Subchunk2Size == NumSamples * NumChannels *BitsPerSample/8
- This is the number of bytes in the data.
You can also think of this as the size
of the read of the subchunk following this number.
44 * Data The actual sound data.
이건 C언어로 들어가야하나..
아무튼 참고자료
심심해서 적어보는 ReverseMe ! 풀이 [2] (6) | 2010.08.24 |
---|---|
[API] 모든 드라이브 경로 구하기 (8) | 2010.04.11 |
[업데이트] Image Downloader Beta 1.1v (4) | 2010.02.10 |
Image Downloader Beta 1.0 (8) | 2010.01.18 |
중단 (124) | 2009.07.13 |
|
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |