﻿#include <windows.h>
#include <tchar.h>
#include <crass_types.h>
#include <acui.h>
#include <cui.h>
#include <package.h>
#include <resource.h>
#include <cui_error.h>
#include <stdio.h>
#include <utility.h>

/* 接口数据结构: 表示cui插件的一般信息 */
struct acui_information IkuraGDL_cui_information = {
	_T("IKURA / Iguchi Satoshi"),			/* copyright */
	_T("IKURA Game Development Library"),	/* system */
	_T(""),									/* package */
	_T("0.9.2"),							/* revision */
	_T("痴汉公贼"),							/* author */
	_T("2007-11-5 20:07"),					/* date */
	NULL,									/* notion */
	ACUI_ATTRIBUTE_LEVEL_DEVELOP
};

/* 所有的封包特定的数据结构都要放在这个#pragma段里 */
#pragma pack (1)
typedef struct {
	s8 magic[8];			// "SM2MPX10"
	u32 index_entries;
	u32 data_offset;
	s8 name[12];			// package name
	u32 maybe_entry_size;	// 20
} IkuraGDL_header_t;

typedef struct {
	u16 index_length;
} IkuraGDL_header2_t;

typedef struct {
	s8 name[12];
	u32 offset;
	u32 length;
} IkuraGDL_entry_t;

typedef struct {
	s8 name[12];
	u32 offset;
} IkuraGDL_entry2_t;

typedef struct {
	s8 magic[8];			// "GGA00000"
	u16 width;
	u16 height;
	u16 unknown;			// 0
	u8 color_depth;
	u8 flag;				// bit0 - alpha; bit5 - parameter；bit4 - always 1
	u32 data_offset;
	u32 data_length;
	u32 parameter_offset;	// 每项12字节，用于描述组合图内各个子图用
	u32 parameter_length;
	u32 reserved[4];		// 0
} ggd_header_t;

typedef struct {
	s8 magic[8];		/* "GGPFAIKE" */
	u32 unknown0;
	u8 xor_magic[8];
	u32 data_offset;
	u32 data_length;	
	u32 unknown1;
	u32 unknown2;		
} ggp_header_t;

typedef struct {
	s8 magic[4];		/* "FULL" */
	u16 width;
	u16 height;	
} full_header_t;
#pragma pack ()

typedef struct {
	s8 name[16];
	u32 length;
	u32 offset;	
} my_IkuraGDL_entry2_t;


/***********************/

#define MAX_SECRETFILTER	3

// format2array.exe -f UMINOM.EXE -r 16 -o 634312 -a -l 2048 > re.txt
static char secret_filter_code_table[MAX_SECRETFILTER][2048] = {
	{
		0x55, 0x4f, 0x42, 0x30, 0x47, 0x4d, 0x56, 0x4d, 
		0x38, 0x4b, 0x38, 0x31, 0x32, 0x47, 0x5a, 0x50, 
		0x31, 0x56, 0x4a, 0x43, 0x41, 0x44, 0x4e, 0x50, 
		0x32, 0x4c, 0x58, 0x35, 0x34, 0x33, 0x52, 0x33, 
		0x42, 0x50, 0x4f, 0x53, 0x4d, 0x52, 0x55, 0x36, 
		0x42, 0x41, 0x4b, 0x49, 0x56, 0x59, 0x42, 0x36, 
		0x57, 0x32, 0x4a, 0x52, 0x52, 0x51, 0x46, 0x48, 
		0x4e, 0x33, 0x59, 0x43, 0x35, 0x4e, 0x53, 0x56, 
		0x35, 0x41, 0x49, 0x54, 0x54, 0x36, 0x4f, 0x58, 
		0x49, 0x44, 0x4f, 0x57, 0x30, 0x59, 0x52, 0x4f, 
		0x54, 0x52, 0x54, 0x37, 0x4d, 0x46, 0x4a, 0x34, 
		0x35, 0x52, 0x31, 0x56, 0x59, 0x46, 0x46, 0x37, 
		0x31, 0x4d, 0x47, 0x49, 0x34, 0x58, 0x49, 0x4f, 
		0x55, 0x5a, 0x43, 0x35, 0x31, 0x31, 0x52, 0x30, 
		0x48, 0x41, 0x4a, 0x43, 0x36, 0x57, 0x5a, 0x55, 
		0x30, 0x45, 0x5a, 0x45, 0x55, 0x55, 0x48, 0x30, 
		0x4b, 0x37, 0x41, 0x54, 0x30, 0x55, 0x37, 0x34, 
		0x39, 0x4b, 0x49, 0x4f, 0x56, 0x4c, 0x46, 0x35, 
		0x46, 0x41, 0x34, 0x43, 0x33, 0x42, 0x46, 0x58, 
		0x4d, 0x32, 0x54, 0x34, 0x47, 0x38, 0x46, 0x35, 
		0x37, 0x53, 0x57, 0x35, 0x45, 0x47, 0x36, 0x34, 
		0x4c, 0x55, 0x39, 0x47, 0x58, 0x52, 0x4b, 0x5a, 
		0x32, 0x4f, 0x30, 0x59, 0x47, 0x4e, 0x37, 0x51, 
		0x41, 0x34, 0x51, 0x52, 0x55, 0x4d, 0x41, 0x4c, 
		0x44, 0x46, 0x46, 0x4a, 0x4a, 0x36, 0x4e, 0x48, 
		0x4c, 0x54, 0x56, 0x59, 0x59, 0x48, 0x4b, 0x48, 
		0x52, 0x4d, 0x57, 0x45, 0x52, 0x51, 0x38, 0x4b, 
		0x37, 0x38, 0x32, 0x4b, 0x49, 0x54, 0x56, 0x43, 
		0x43, 0x48, 0x32, 0x47, 0x36, 0x35, 0x43, 0x32, 
		0x57, 0x52, 0x51, 0x38, 0x35, 0x48, 0x49, 0x4e, 
		0x53, 0x4d, 0x4c, 0x48, 0x57, 0x30, 0x36, 0x54, 
		0x49, 0x42, 0x41, 0x44, 0x41, 0x47, 0x4c, 0x45, 
		0x44, 0x4b, 0x39, 0x59, 0x44, 0x41, 0x52, 0x53, 
		0x34, 0x37, 0x45, 0x54, 0x32, 0x41, 0x36, 0x4a, 
		0x41, 0x46, 0x34, 0x49, 0x38, 0x57, 0x41, 0x57, 
		0x37, 0x4b, 0x31, 0x46, 0x49, 0x58, 0x49, 0x53, 
		0x4b, 0x4a, 0x4b, 0x4e, 0x4e, 0x43, 0x30, 0x4b, 
		0x50, 0x31, 0x4d, 0x53, 0x4f, 0x35, 0x59, 0x36, 
		0x43, 0x32, 0x4a, 0x42, 0x45, 0x46, 0x49, 0x41, 
		0x37, 0x47, 0x35, 0x4e, 0x54, 0x45, 0x43, 0x4d, 
		0x58, 0x4d, 0x4e, 0x4c, 0x59, 0x53, 0x54, 0x43, 
		0x30, 0x44, 0x39, 0x53, 0x46, 0x36, 0x56, 0x4e, 
		0x58, 0x57, 0x37, 0x41, 0x4c, 0x49, 0x47, 0x45, 
		0x42, 0x52, 0x4a, 0x46, 0x44, 0x55, 0x47, 0x5a, 
		0x45, 0x39, 0x46, 0x49, 0x4c, 0x57, 0x4d, 0x34, 
		0x42, 0x4d, 0x44, 0x59, 0x32, 0x35, 0x4e, 0x33, 
		0x59, 0x48, 0x4b, 0x43, 0x41, 0x55, 0x42, 0x53, 
		0x42, 0x4a, 0x42, 0x4d, 0x4d, 0x5a, 0x58, 0x30, 
		0x54, 0x37, 0x58, 0x48, 0x41, 0x51, 0x48, 0x58, 
		0x55, 0x46, 0x33, 0x5a, 0x55, 0x52, 0x4f, 0x4f, 
		0x35, 0x50, 0x36, 0x57, 0x47, 0x55, 0x32, 0x59, 
		0x55, 0x33, 0x52, 0x50, 0x49, 0x43, 0x46, 0x56, 
		0x58, 0x47, 0x41, 0x41, 0x36, 0x34, 0x36, 0x54, 
		0x4f, 0x54, 0x54, 0x32, 0x44, 0x45, 0x58, 0x4b, 
		0x39, 0x52, 0x54, 0x58, 0x46, 0x51, 0x38, 0x49, 
		0x45, 0x31, 0x42, 0x4e, 0x43, 0x37, 0x41, 0x52, 
		0x44, 0x43, 0x57, 0x34, 0x54, 0x50, 0x32, 0x55, 
		0x53, 0x30, 0x31, 0x59, 0x4e, 0x38, 0x34, 0x5a, 
		0x56, 0x31, 0x46, 0x59, 0x57, 0x4a, 0x31, 0x30, 
		0x48, 0x41, 0x4a, 0x5a, 0x55, 0x50, 0x4b, 0x59, 
		0x51, 0x46, 0x37, 0x52, 0x35, 0x56, 0x36, 0x35, 
		0x34, 0x49, 0x45, 0x58, 0x33, 0x39, 0x4b, 0x36, 
		0x48, 0x43, 0x31, 0x5a, 0x33, 0x32, 0x43, 0x33, 
		0x46, 0x5a, 0x36, 0x51, 0x35, 0x4e, 0x56, 0x4e, 
		0x45, 0x4c, 0x57, 0x49, 0x4a, 0x54, 0x39, 0x56, 
		0x47, 0x36, 0x51, 0x52, 0x4b, 0x38, 0x39, 0x46, 
		0x4a, 0x4c, 0x58, 0x4c, 0x4b, 0x55, 0x50, 0x46, 
		0x4a, 0x4c, 0x34, 0x47, 0x52, 0x4f, 0x4b, 0x37, 
		0x54, 0x5a, 0x51, 0x37, 0x51, 0x48, 0x4d, 0x36, 
		0x4a, 0x33, 0x5a, 0x55, 0x39, 0x4e, 0x55, 0x30, 
		0x42, 0x35, 0x47, 0x56, 0x38, 0x41, 0x39, 0x50, 
		0x58, 0x55, 0x46, 0x41, 0x4f, 0x39, 0x4b, 0x57, 
		0x38, 0x30, 0x51, 0x36, 0x57, 0x4e, 0x41, 0x42, 
		0x59, 0x4d, 0x41, 0x31, 0x56, 0x56, 0x4e, 0x43, 
		0x32, 0x4a, 0x35, 0x47, 0x48, 0x48, 0x57, 0x4e, 
		0x50, 0x51, 0x39, 0x55, 0x37, 0x4c, 0x4b, 0x33, 
		0x54, 0x46, 0x30, 0x43, 0x4d, 0x53, 0x59, 0x47, 
		0x41, 0x46, 0x59, 0x50, 0x47, 0x5a, 0x4c, 0x50, 
		0x58, 0x4e, 0x50, 0x48, 0x33, 0x44, 0x34, 0x31, 
		0x56, 0x4c, 0x31, 0x41, 0x33, 0x4e, 0x55, 0x36, 
		0x4e, 0x36, 0x53, 0x33, 0x56, 0x39, 0x58, 0x58, 
		0x59, 0x46, 0x45, 0x53, 0x45, 0x55, 0x43, 0x4b, 
		0x59, 0x4b, 0x30, 0x4e, 0x41, 0x4d, 0x31, 0x4d, 
		0x42, 0x5a, 0x39, 0x42, 0x4a, 0x36, 0x41, 0x4d, 
		0x51, 0x4b, 0x4b, 0x46, 0x32, 0x35, 0x37, 0x31, 
		0x39, 0x56, 0x38, 0x52, 0x4e, 0x35, 0x34, 0x43, 
		0x31, 0x51, 0x32, 0x37, 0x4c, 0x52, 0x49, 0x38, 
		0x53, 0x53, 0x4b, 0x36, 0x32, 0x52, 0x4b, 0x53, 
		0x5a, 0x34, 0x56, 0x54, 0x59, 0x41, 0x45, 0x32, 
		0x4a, 0x38, 0x37, 0x4c, 0x46, 0x41, 0x56, 0x49, 
		0x32, 0x55, 0x31, 0x56, 0x32, 0x31, 0x59, 0x51, 
		0x31, 0x33, 0x55, 0x4c, 0x4f, 0x51, 0x57, 0x38, 
		0x36, 0x50, 0x48, 0x39, 0x52, 0x44, 0x55, 0x45, 
		0x56, 0x41, 0x37, 0x55, 0x45, 0x4a, 0x36, 0x4a, 
		0x54, 0x55, 0x37, 0x58, 0x31, 0x47, 0x4a, 0x59, 
		0x4e, 0x43, 0x31, 0x56, 0x52, 0x36, 0x36, 0x46, 
		0x32, 0x45, 0x41, 0x43, 0x33, 0x54, 0x46, 0x47, 
		0x43, 0x34, 0x41, 0x4b, 0x4f, 0x56, 0x41, 0x5a, 
		0x57, 0x31, 0x33, 0x37, 0x45, 0x57, 0x30, 0x56, 
		0x36, 0x41, 0x41, 0x55, 0x32, 0x30, 0x31, 0x58, 
		0x37, 0x4e, 0x44, 0x33, 0x59, 0x54, 0x55, 0x4e, 
		0x58, 0x32, 0x51, 0x42, 0x52, 0x32, 0x34, 0x44, 
		0x58, 0x58, 0x43, 0x31, 0x42, 0x57, 0x54, 0x45, 
		0x5a, 0x55, 0x58, 0x56, 0x54, 0x58, 0x4e, 0x42, 
		0x36, 0x33, 0x57, 0x35, 0x52, 0x44, 0x39, 0x47, 
		0x49, 0x51, 0x56, 0x39, 0x49, 0x50, 0x36, 0x43, 
		0x44, 0x44, 0x50, 0x41, 0x45, 0x57, 0x32, 0x49, 
		0x47, 0x41, 0x44, 0x54, 0x4b, 0x42, 0x57, 0x37, 
		0x44, 0x50, 0x41, 0x4e, 0x43, 0x41, 0x4f, 0x42, 
		0x55, 0x31, 0x38, 0x5a, 0x38, 0x34, 0x50, 0x48, 
		0x4c, 0x46, 0x36, 0x45, 0x51, 0x32, 0x48, 0x37, 
		0x53, 0x37, 0x41, 0x32, 0x44, 0x48, 0x43, 0x37, 
		0x35, 0x51, 0x31, 0x41, 0x58, 0x34, 0x4e, 0x53, 
		0x4e, 0x37, 0x4a, 0x51, 0x4e, 0x47, 0x4a, 0x47, 
		0x58, 0x48, 0x54, 0x41, 0x4f, 0x42, 0x48, 0x49, 
		0x35, 0x44, 0x44, 0x4d, 0x4d, 0x45, 0x35, 0x5a, 
		0x51, 0x50, 0x54, 0x38, 0x35, 0x36, 0x44, 0x45, 
		0x49, 0x4d, 0x4d, 0x36, 0x56, 0x4d, 0x38, 0x58, 
		0x49, 0x38, 0x57, 0x45, 0x34, 0x45, 0x34, 0x4a, 
		0x4b, 0x59, 0x4d, 0x59, 0x35, 0x57, 0x37, 0x41, 
		0x42, 0x45, 0x48, 0x38, 0x32, 0x4c, 0x53, 0x52, 
		0x58, 0x34, 0x47, 0x4b, 0x46, 0x41, 0x59, 0x4e, 
		0x48, 0x4c, 0x55, 0x53, 0x42, 0x54, 0x34, 0x43, 
		0x30, 0x41, 0x32, 0x31, 0x35, 0x4b, 0x5a, 0x54, 
		0x56, 0x58, 0x31, 0x4b, 0x34, 0x39, 0x45, 0x48, 
		0x41, 0x4f, 0x38, 0x4f, 0x37, 0x59, 0x4a, 0x43, 
		0x55, 0x53, 0x38, 0x59, 0x56, 0x56, 0x55, 0x32, 
		0x42, 0x33, 0x58, 0x47, 0x38, 0x51, 0x4f, 0x42, 
		0x4e, 0x35, 0x31, 0x35, 0x38, 0x53, 0x36, 0x30, 
		0x4e, 0x41, 0x45, 0x42, 0x50, 0x4e, 0x58, 0x30, 
		0x31, 0x45, 0x49, 0x52, 0x53, 0x35, 0x4a, 0x51, 
		0x46, 0x56, 0x52, 0x4d, 0x31, 0x43, 0x4f, 0x4d, 
		0x39, 0x46, 0x36, 0x43, 0x58, 0x4b, 0x59, 0x41, 
		0x46, 0x32, 0x4e, 0x51, 0x45, 0x5a, 0x55, 0x56, 
		0x48, 0x49, 0x45, 0x54, 0x42, 0x34, 0x4d, 0x43, 
		0x45, 0x47, 0x48, 0x41, 0x36, 0x51, 0x46, 0x34, 
		0x42, 0x39, 0x43, 0x4d, 0x55, 0x44, 0x49, 0x49, 
		0x44, 0x48, 0x52, 0x4e, 0x4e, 0x51, 0x48, 0x4f, 
		0x4e, 0x54, 0x4b, 0x59, 0x37, 0x44, 0x57, 0x43, 
		0x44, 0x52, 0x52, 0x55, 0x53, 0x41, 0x4f, 0x58, 
		0x32, 0x5a, 0x4f, 0x56, 0x49, 0x58, 0x5a, 0x4b, 
		0x30, 0x33, 0x34, 0x5a, 0x54, 0x58, 0x59, 0x47, 
		0x4d, 0x43, 0x59, 0x45, 0x59, 0x4b, 0x4d, 0x35, 
		0x35, 0x4d, 0x47, 0x32, 0x53, 0x4b, 0x34, 0x37, 
		0x44, 0x44, 0x31, 0x4f, 0x47, 0x54, 0x53, 0x49, 
		0x47, 0x58, 0x5a, 0x44, 0x43, 0x4b, 0x4a, 0x47, 
		0x30, 0x4c, 0x45, 0x31, 0x36, 0x39, 0x43, 0x47, 
		0x33, 0x38, 0x36, 0x44, 0x35, 0x5a, 0x51, 0x37, 
		0x4b, 0x4e, 0x34, 0x39, 0x39, 0x4c, 0x4c, 0x4a, 
		0x42, 0x46, 0x43, 0x31, 0x4f, 0x49, 0x58, 0x31, 
		0x57, 0x48, 0x47, 0x47, 0x45, 0x58, 0x57, 0x31, 
		0x33, 0x38, 0x41, 0x56, 0x54, 0x55, 0x53, 0x46, 
		0x49, 0x45, 0x45, 0x48, 0x49, 0x50, 0x43, 0x32, 
		0x50, 0x44, 0x58, 0x5a, 0x43, 0x4b, 0x5a, 0x51, 
		0x5a, 0x41, 0x47, 0x55, 0x41, 0x59, 0x44, 0x54, 
		0x49, 0x4e, 0x59, 0x41, 0x53, 0x45, 0x55, 0x47, 
		0x4f, 0x4e, 0x33, 0x57, 0x57, 0x46, 0x42, 0x4c, 
		0x43, 0x31, 0x43, 0x50, 0x55, 0x44, 0x58, 0x39, 
		0x45, 0x51, 0x49, 0x31, 0x49, 0x4e, 0x34, 0x58, 
		0x42, 0x57, 0x34, 0x32, 0x34, 0x54, 0x50, 0x33, 
		0x5a, 0x45, 0x48, 0x4d, 0x4f, 0x45, 0x4c, 0x52, 
		0x39, 0x51, 0x4e, 0x5a, 0x54, 0x50, 0x34, 0x49, 
		0x4f, 0x54, 0x52, 0x42, 0x33, 0x37, 0x43, 0x47, 
		0x48, 0x50, 0x33, 0x33, 0x37, 0x36, 0x46, 0x43, 
		0x56, 0x4c, 0x4b, 0x52, 0x4e, 0x51, 0x37, 0x48, 
		0x4c, 0x45, 0x52, 0x35, 0x4a, 0x4c, 0x4a, 0x38, 
		0x4d, 0x45, 0x42, 0x50, 0x4c, 0x4f, 0x49, 0x41, 
		0x48, 0x50, 0x51, 0x49, 0x34, 0x37, 0x4c, 0x5a, 
		0x45, 0x43, 0x51, 0x4a, 0x47, 0x48, 0x30, 0x50, 
		0x38, 0x4d, 0x53, 0x42, 0x59, 0x58, 0x5a, 0x57, 
		0x48, 0x31, 0x36, 0x35, 0x59, 0x34, 0x41, 0x49, 
		0x44, 0x35, 0x59, 0x41, 0x31, 0x30, 0x4f, 0x4a, 
		0x32, 0x4f, 0x32, 0x38, 0x39, 0x41, 0x54, 0x4c, 
		0x33, 0x49, 0x4f, 0x35, 0x4c, 0x56, 0x56, 0x4e, 
		0x50, 0x38, 0x48, 0x48, 0x4b, 0x46, 0x4f, 0x32, 
		0x51, 0x38, 0x42, 0x4b, 0x52, 0x41, 0x50, 0x42, 
		0x30, 0x4c, 0x51, 0x4e, 0x54, 0x30, 0x38, 0x47, 
		0x49, 0x43, 0x56, 0x49, 0x35, 0x4c, 0x53, 0x31, 
		0x36, 0x4f, 0x37, 0x53, 0x37, 0x47, 0x4a, 0x53, 
		0x33, 0x46, 0x4d, 0x32, 0x48, 0x50, 0x57, 0x56, 
		0x52, 0x4a, 0x4f, 0x39, 0x58, 0x46, 0x37, 0x51, 
		0x42, 0x53, 0x4e, 0x57, 0x42, 0x39, 0x4b, 0x4d, 
		0x37, 0x49, 0x36, 0x58, 0x51, 0x56, 0x56, 0x51, 
		0x4e, 0x4c, 0x4a, 0x34, 0x47, 0x54, 0x52, 0x57, 
		0x48, 0x44, 0x4a, 0x37, 0x49, 0x37, 0x58, 0x32, 
		0x59, 0x58, 0x30, 0x4a, 0x54, 0x57, 0x46, 0x38, 
		0x51, 0x42, 0x5a, 0x42, 0x31, 0x43, 0x32, 0x33, 
		0x31, 0x30, 0x49, 0x50, 0x57, 0x35, 0x34, 0x41, 
		0x56, 0x42, 0x55, 0x41, 0x46, 0x59, 0x58, 0x38, 
		0x42, 0x39, 0x53, 0x36, 0x46, 0x46, 0x52, 0x54, 
		0x36, 0x32, 0x31, 0x33, 0x5a, 0x46, 0x52, 0x38, 
		0x47, 0x44, 0x4f, 0x49, 0x33, 0x31, 0x31, 0x30, 
		0x32, 0x33, 0x56, 0x57, 0x4c, 0x35, 0x59, 0x36, 
		0x56, 0x4d, 0x4b, 0x44, 0x5a, 0x50, 0x41, 0x46, 
		0x49, 0x32, 0x48, 0x30, 0x4a, 0x4a, 0x54, 0x4e, 
		0x4b, 0x53, 0x32, 0x54, 0x44, 0x55, 0x57, 0x39, 
		0x55, 0x51, 0x4e, 0x36, 0x59, 0x37, 0x32, 0x59, 
		0x4c, 0x43, 0x50, 0x38, 0x41, 0x49, 0x31, 0x43, 
		0x38, 0x34, 0x39, 0x4a, 0x4e, 0x32, 0x48, 0x31, 
		0x50, 0x50, 0x46, 0x4c, 0x34, 0x50, 0x41, 0x44, 
		0x46, 0x50, 0x30, 0x56, 0x49, 0x46, 0x4c, 0x54, 
		0x30, 0x34, 0x43, 0x4a, 0x38, 0x46, 0x39, 0x59, 
		0x42, 0x45, 0x32, 0x50, 0x42, 0x37, 0x37, 0x36, 
		0x4c, 0x31, 0x41, 0x48, 0x4e, 0x53, 0x35, 0x55, 
		0x4d, 0x56, 0x4c, 0x45, 0x39, 0x5a, 0x35, 0x36, 
		0x35, 0x31, 0x46, 0x52, 0x4f, 0x33, 0x49, 0x56, 
		0x44, 0x49, 0x47, 0x41, 0x4b, 0x36, 0x52, 0x33, 
		0x4b, 0x34, 0x5a, 0x51, 0x46, 0x32, 0x50, 0x41, 
		0x51, 0x4b, 0x52, 0x54, 0x38, 0x32, 0x4e, 0x4c, 
		0x4c, 0x4e, 0x50, 0x5a, 0x4b, 0x58, 0x4f, 0x52, 
		0x48, 0x45, 0x4e, 0x4f, 0x48, 0x30, 0x36, 0x56, 
		0x48, 0x4e, 0x4c, 0x42, 0x55, 0x49, 0x46, 0x49, 
		0x4e, 0x47, 0x50, 0x56, 0x4a, 0x4d, 0x38, 0x52, 
		0x48, 0x55, 0x4c, 0x5a, 0x55, 0x43, 0x55, 0x49, 
		0x38, 0x48, 0x52, 0x57, 0x35, 0x51, 0x52, 0x54, 
		0x4f, 0x52, 0x32, 0x54, 0x46, 0x57, 0x33, 0x49, 
		0x51, 0x4d, 0x45, 0x58, 0x39, 0x4d, 0x46, 0x4b, 
		0x46, 0x58, 0x47, 0x37, 0x4a, 0x4c, 0x46, 0x36, 
		0x54, 0x4a, 0x4d, 0x50, 0x4e, 0x36, 0x35, 0x46, 
		0x33, 0x59, 0x30, 0x47, 0x4e, 0x5a, 0x50, 0x43, 
		0x57, 0x4c, 0x4a, 0x30, 0x4a, 0x57, 0x57, 0x30, 
		0x4d, 0x4f, 0x41, 0x50, 0x4d, 0x56, 0x33, 0x59, 
		0x56, 0x54, 0x56, 0x47, 0x36, 0x35, 0x36, 0x38, 
		0x36, 0x37, 0x56, 0x35, 0x32, 0x45, 0x4e, 0x42, 
		0x4d, 0x39, 0x4e, 0x54, 0x4a, 0x37, 0x51, 0x42, 
		0x52, 0x36, 0x59, 0x37, 0x36, 0x39, 0x56, 0x35, 
		0x4e, 0x57, 0x57, 0x34, 0x57, 0x44, 0x32, 0x31, 
		0x56, 0x54, 0x58, 0x48, 0x38, 0x51, 0x48, 0x54, 
		0x54, 0x59, 0x32, 0x51, 0x48, 0x35, 0x36, 0x53, 
		0x32, 0x30, 0x32, 0x33, 0x41, 0x53, 0x59, 0x41, 
		0x56, 0x55, 0x57, 0x47, 0x32, 0x45, 0x37, 0x52, 
		0x4f, 0x4a, 0x35, 0x4e, 0x52, 0x44, 0x34, 0x47, 
		0x31, 0x45, 0x55, 0x51, 0x4c, 0x43, 0x56, 0x59, 
		0x43, 0x34, 0x31, 0x47, 0x32, 0x44, 0x56, 0x31, 
		0x53, 0x30, 0x55, 0x51, 0x56, 0x53, 0x42, 0x46, 
		0x4e, 0x4b, 0x43, 0x4a, 0x38, 0x51, 0x51, 0x59, 
		0x42, 0x50, 0x55, 0x48, 0x34, 0x37, 0x4e, 0x46, 
		0x55, 0x55, 0x32, 0x58, 0x4d, 0x52, 0x48, 0x37, 
		0x39, 0x41, 0x49, 0x59, 0x4d, 0x57, 0x48, 0x43, 
		0x43, 0x45, 0x33, 0x4f, 0x44, 0x32, 0x53, 0x37, 
		0x38, 0x46, 0x51, 0x41, 0x44, 0x34, 0x4e, 0x30, 
		0x46, 0x5a, 0x32, 0x58, 0x36, 0x51, 0x55, 0x52, 
		0x4c, 0x57, 0x45, 0x53, 0x4e, 0x34, 0x57, 0x54, 
		0x55, 0x31, 0x51, 0x37, 0x55, 0x49, 0x5a, 0x39, 
		0x56, 0x49, 0x57, 0x35, 0x4e, 0x43, 0x43, 0x50, 
		0x46, 0x4e, 0x54, 0x46, 0x59, 0x57, 0x42, 0x54, 
		0x4e, 0x48, 0x55, 0x4a, 0x38, 0x4d, 0x37, 0x46, 
		0x52, 0x55, 0x46, 0x31, 0x45, 0x36, 0x43, 0x43, 
		0x57, 0x41, 0x4c, 0x50, 0x43, 0x33, 0x45, 0x4d, 
		0x52, 0x48, 0x55, 0x34, 0x34, 0x52, 0x4c, 0x4f, 
		0x55, 0x32, 0x59, 0x35, 0x54, 0x4a, 0x37, 0x57, 
		0x42, 0x4c, 0x31, 0x4d, 0x51, 0x32, 0x37, 0x53, 
		0x46, 0x4a, 0x52, 0x37, 0x55, 0x45, 0x55, 0x30, 
		0x55, 0x45, 0x46, 0x43, 0x30, 0x53, 0x4c, 0x53, 
		0x33, 0x35, 0x4b, 0x38, 0x51, 0x59, 0x32, 0x31, 
		0x34, 0x47, 0x43, 0x35, 0x4f, 0x31, 0x33, 0x34, 
	},
	{
		'U', 'O', 'B', '0', 'G', 'M', 'V', 'M', '8', 'K', '8', '1', '2', 'G', 'Z', 'P', 
		'1', 'V', 'J', 'C', 'A', 'D', 'N', 'P', '2', 'L', 'X', '5', '4', '3', 'R', '3', 
		'B', 'P', 'O', 'S', 'M', 'R', 'U', '6', 'B', 'A', 'K', 'I', 'V', 'Y', 'B', '6', 
		'W', '2', 'J', 'R', 'R', 'Q', 'F', 'H', 'N', '3', 'Y', 'C', '5', 'N', 'S', 'V', 
		'5', 'A', 'I', 'T', 'T', '6', 'O', 'X', 'I', 'D', 'O', 'W', '0', 'Y', 'R', 'O', 
		'T', 'R', 'T', '7', 'M', 'F', 'J', '4', '5', 'R', '1', 'V', 'Y', 'F', 'F', '7', 
		'1', 'M', 'G', 'I', '4', 'X', 'I', 'O', 'U', 'Z', 'C', '5', '1', '1', 'R', '0', 
		'H', 'A', 'J', 'C', '6', 'W', 'Z', 'U', '0', 'E', 'Z', 'E', 'U', 'U', 'H', '0', 
		'K', '7', 'A', 'T', '0', 'U', '7', '4', '9', 'K', 'I', 'O', 'V', 'L', 'F', '5', 
		'F', 'A', '4', 'C', '3', 'B', 'F', 'X', 'M', '2', 'T', '4', 'G', '8', 'F', '5', 
		'7', 'S', 'W', '5', 'E', 'G', '6', '4', 'L', 'U', '9', 'G', 'X', 'R', 'K', 'Z', 
		'2', 'O', '0', 'Y', 'G', 'N', '7', 'Q', 'A', '4', 'Q', 'R', 'U', 'M', 'A', 'L', 
		'D', 'F', 'F', 'J', 'J', '6', 'N', 'H', 'L', 'T', 'V', 'Y', 'Y', 'H', 'K', 'H', 
		'R', 'M', 'W', 'E', 'R', 'Q', '8', 'K', '7', '8', '2', 'K', 'I', 'T', 'V', 'C', 
		'C', 'H', '2', 'G', '6', '5', 'C', '2', 'W', 'R', 'Q', '8', '5', 'H', 'I', 'N', 
		'S', 'M', 'L', 'H', 'W', '0', '6', 'T', 'I', 'B', 'A', 'D', 'A', 'G', 'L', 'E', 
		'D', 'K', '9', 'Y', 'D', 'A', 'R', 'S', '4', '7', 'E', 'T', '2', 'A', '6', 'J', 
		'A', 'F', '4', 'I', '8', 'W', 'A', 'W', '7', 'K', '1', 'F', 'I', 'X', 'I', 'S', 
		'K', 'J', 'K', 'N', 'N', 'C', '0', 'K', 'P', '1', 'M', 'S', 'O', '5', 'Y', '6', 
		'C', '2', 'J', 'B', 'E', 'F', 'I', 'A', '7', 'G', '5', 'N', 'T', 'E', 'C', 'M', 
		'X', 'M', 'N', 'L', 'Y', 'S', 'T', 'C', '0', 'D', '9', 'S', 'F', '6', 'V', 'N', 
		'X', 'W', '7', 'A', 'L', 'I', 'G', 'E', 'B', 'R', 'J', 'F', 'D', 'U', 'G', 'Z', 
		'E', '9', 'F', 'I', 'L', 'W', 'M', '4', 'B', 'M', 'D', 'Y', '2', '5', 'N', '3', 
		'Y', 'H', 'K', 'C', 'A', 'U', 'B', 'S', 'B', 'J', 'B', 'M', 'M', 'Z', 'X', '0', 
		'T', '7', 'X', 'H', 'A', 'Q', 'H', 'X', 'U', 'F', '3', 'Z', 'U', 'R', 'O', 'O', 
		'5', 'P', '6', 'W', 'G', 'U', '2', 'Y', 'U', '3', 'R', 'P', 'I', 'C', 'F', 'V', 
		'X', 'G', 'A', 'A', '6', '4', '6', 'T', 'O', 'T', 'T', '2', 'D', 'E', 'X', 'K', 
		'9', 'R', 'T', 'X', 'F', 'Q', '8', 'I', 'E', '1', 'B', 'N', 'C', '7', 'A', 'R', 
		'D', 'C', 'W', '4', 'T', 'P', '2', 'U', 'S', '0', '1', 'Y', 'N', '8', '4', 'Z', 
		'V', '1', 'F', 'Y', 'W', 'J', '1', '0', 'H', 'A', 'J', 'Z', 'U', 'P', 'K', 'Y', 
		'Q', 'F', '7', 'R', '5', 'V', '6', '5', '4', 'I', 'E', 'X', '3', '9', 'K', '6', 
		'H', 'C', '1', 'Z', '3', '2', 'C', '3', 'F', 'Z', '6', 'Q', '5', 'N', 'V', 'N', 
		'E', 'L', 'W', 'I', 'J', 'T', '9', 'V', 'G', '6', 'Q', 'R', 'K', '8', '9', 'F', 
		'J', 'L', 'X', 'L', 'K', 'U', 'P', 'F', 'J', 'L', '4', 'G', 'R', 'O', 'K', '7', 
		'T', 'Z', 'Q', '7', 'Q', 'H', 'M', '6', 'J', '3', 'Z', 'U', '9', 'N', 'U', '0', 
		'B', '5', 'G', 'V', '8', 'A', '9', 'P', 'X', 'U', 'F', 'A', 'O', '9', 'K', 'W', 
		'8', '0', 'Q', '6', 'W', 'N', 'A', 'B', 'Y', 'M', 'A', '1', 'V', 'V', 'N', 'C', 
		'2', 'J', '5', 'G', 'H', 'H', 'W', 'N', 'P', 'Q', '9', 'U', '7', 'L', 'K', '3', 
		'T', 'F', '0', 'C', 'M', 'S', 'Y', 'G', 'A', 'F', 'Y', 'P', 'G', 'Z', 'L', 'P', 
		'X', 'N', 'P', 'H', '3', 'D', '4', '1', 'V', 'L', '1', 'A', '3', 'N', 'U', '6', 
		'N', '6', 'S', '3', 'V', '9', 'X', 'X', 'Y', 'F', 'E', 'S', 'E', 'U', 'C', 'K', 
		'Y', 'K', '0', 'N', 'A', 'M', '1', 'M', 'B', 'Z', '9', 'B', 'J', '6', 'A', 'M', 
		'Q', 'K', 'K', 'F', '2', '5', '7', '1', '9', 'V', '8', 'R', 'N', '5', '4', 'C', 
		'1', 'Q', '2', '7', 'L', 'R', 'I', '8', 'S', 'S', 'K', '6', '2', 'R', 'K', 'S', 
		'Z', '4', 'V', 'T', 'Y', 'A', 'E', '2', 'J', '8', '7', 'L', 'F', 'A', 'V', 'I', 
		'2', 'U', '1', 'V', '2', '1', 'Y', 'Q', '1', '3', 'U', 'L', 'O', 'Q', 'W', '8', 
		'6', 'P', 'H', '9', 'R', 'D', 'U', 'E', 'V', 'A', '7', 'U', 'E', 'J', '6', 'J', 
		'T', 'U', '7', 'X', '1', 'G', 'J', 'Y', 'N', 'C', '1', 'V', 'R', '6', '6', 'F', 
		'2', 'E', 'A', 'C', '3', 'T', 'F', 'G', 'C', '4', 'A', 'K', 'O', 'V', 'A', 'Z', 
		'W', '1', '3', '7', 'E', 'W', '0', 'V', '6', 'A', 'A', 'U', '2', '0', '1', 'X', 
		'7', 'N', 'D', '3', 'Y', 'T', 'U', 'N', 'X', '2', 'Q', 'B', 'R', '2', '4', 'D', 
		'X', 'X', 'C', '1', 'B', 'W', 'T', 'E', 'Z', 'U', 'X', 'V', 'T', 'X', 'N', 'B', 
		'6', '3', 'W', '5', 'R', 'D', '9', 'G', 'I', 'Q', 'V', '9', 'I', 'P', '6', 'C', 
		'D', 'D', 'P', 'A', 'E', 'W', '2', 'I', 'G', 'A', 'D', 'T', 'K', 'B', 'W', '7', 
		'D', 'P', 'A', 'N', 'C', 'A', 'O', 'B', 'U', '1', '8', 'Z', '8', '4', 'P', 'H', 
		'L', 'F', '6', 'E', 'Q', '2', 'H', '7', 'S', '7', 'A', '2', 'D', 'H', 'C', '7', 
		'5', 'Q', '1', 'A', 'X', '4', 'N', 'S', 'N', '7', 'J', 'Q', 'N', 'G', 'J', 'G', 
		'X', 'H', 'T', 'A', 'O', 'B', 'H', 'I', '5', 'D', 'D', 'M', 'M', 'E', '5', 'Z', 
		'Q', 'P', 'T', '8', '5', '6', 'D', 'E', 'I', 'M', 'M', '6', 'V', 'M', '8', 'X', 
		'I', '8', 'W', 'E', '4', 'E', '4', 'J', 'K', 'Y', 'M', 'Y', '5', 'W', '7', 'A', 
		'B', 'E', 'H', '8', '2', 'L', 'S', 'R', 'X', '4', 'G', 'K', 'F', 'A', 'Y', 'N', 
		'H', 'L', 'U', 'S', 'B', 'T', '4', 'C', '0', 'A', '2', '1', '5', 'K', 'Z', 'T', 
		'V', 'X', '1', 'K', '4', '9', 'E', 'H', 'A', 'O', '8', 'O', '7', 'Y', 'J', 'C', 
		'U', 'S', '8', 'Y', 'V', 'V', 'U', '2', 'B', '3', 'X', 'G', '8', 'Q', 'O', 'B', 
		'8', 'O', '3', 'X', 'M', 'J', 'H', 'O', 'T', 'A', 'E', 'H', 'L', 'T', 'F', '5', 
		'A', 'X', 'X', '5', 'H', 'D', 'P', 'V', 'A', 'E', 'U', 'O', 'H', 'Y', 'S', '0', 
		'U', 'I', 'O', '6', 'I', 'C', 'W', 'K', 'W', 'O', '7', '4', 'V', 'E', 'H', 'W', 
		'W', 'L', 'G', '8', 'U', 'U', 'Y', 'T', 'Q', '4', '0', 'R', 'Q', 'T', 'C', '7', 
		'H', 'B', 'B', 'I', 'P', 'R', '9', 'F', 'M', 'D', '3', 'I', '0', '3', 'W', '5', 
		'6', 'Z', 'Y', '8', '5', 'L', '8', '1', 'X', 'L', '6', 'H', '9', '8', '4', 'V', 
		'W', '1', 'E', 'U', 'L', 'P', 'Y', 'C', 'Y', 'W', 'O', 'Z', '7', 'M', 'W', 'J', 
		'D', 'G', 'I', '5', 'K', 'A', 'T', '1', 'S', '9', '3', 'R', 'H', '3', 'R', 'I', 
		'W', 'J', 'O', 'C', '5', 'K', '4', '4', 'S', 'Q', 'V', '2', '6', '2', 'G', 'E', 
		'U', 'B', 'F', '6', 'T', 'Y', 'R', 'V', '9', 'K', 'U', 'Q', 'G', 'O', 'M', '9', 
		'C', 'I', '4', '6', 'W', '4', 'Q', '5', '3', '8', 'W', 'F', '6', 'W', 'C', 'O', 
		'W', 'R', 'E', 'M', '7', '4', 'W', 'C', 'B', 'R', 'P', 'M', 'M', 'P', 'U', 'W', 
		'1', 'N', '1', 'S', 'T', 'J', 'H', 'K', 'V', 'M', '7', 'V', 'Z', '2', '2', 'Z', 
		'X', 'X', 'C', '0', 'H', 'M', 'U', 'T', '0', '2', 'C', 'T', '2', '9', 'C', 'W', 
		'X', 'J', 'Y', 'R', 'G', 'D', 'W', '3', '5', '3', 'L', 'D', 'X', 'U', 'Z', 'N', 
		'C', 'T', 'F', 'X', 'Z', 'R', 'Z', 'E', 'C', 'M', 'N', 'V', 'D', 'V', 'W', 'D', 
		'Z', 'E', 'I', 'K', 'N', '7', 'K', '2', '1', 'Q', 'Q', 'X', 'P', 'J', 'K', 'M', 
		'3', 'W', 'U', 'B', 'E', 'M', 'J', 'K', 'T', '2', '9', '2', 'D', '1', 'P', 'V', 
		'0', '8', 'J', 'R', 'W', 'R', 'M', 'N', 'H', 'F', 'W', 'B', '2', 'I', 'K', 'B', 
		'6', 'C', '9', 'T', 'L', '3', 'C', 'E', 'B', 'H', '7', 'M', 'J', 'B', 'R', 'E', 
		'4', 'Q', 'P', 'Q', 'F', 'H', 'T', 'H', 'R', '5', 'R', 'H', 'K', '2', 'S', '6', 
		'J', 'J', 'U', 'U', '0', 'W', '9', '7', '7', 'J', 'O', '6', '6', '7', 'F', 'G', 
		'B', '8', 'Z', 'U', '9', '2', 'I', 'X', 'Z', 'N', 'J', '7', 'Q', 'J', 'B', '2', 
		'9', 'L', '7', 'K', '8', 'K', 'R', 'Z', '7', 'D', '7', 'F', 'B', '9', 'R', 'Z', 
		'N', 'W', 'A', 'G', 'K', '2', '3', '0', 'A', 'N', 'C', '8', 'K', '9', 'C', 'I', 
		'W', '2', 'Y', 'F', '9', 'D', '5', '0', 'L', 'M', '3', 'N', '6', '1', 'F', 'C', 
		'7', 'P', 'V', '3', '4', 'J', 'R', 'F', 'Y', 'Q', 'N', 'H', 'L', 'Z', 'W', 'Q', 
		'2', 'C', '0', 'Y', 'L', '2', 'I', 'B', 'I', 'U', 'Y', 'E', 'J', 'G', 'S', 'L', 
		'2', 'J', 'B', 'E', '6', 'W', 'G', 'I', '6', 'F', '7', '1', 'S', 'V', 'S', 'M', 
		'D', 'U', 'H', 'X', '9', 'R', 'P', 'L', 'A', 'J', 'L', '9', 'N', 'V', '1', 'F', 
		'E', '7', 'E', '7', 'K', '0', 'Z', '8', 'A', '3', 'Y', '4', 'Q', 'G', 'K', 'O', 
		'G', 'U', 'V', '8', 'V', 'Z', 'C', '4', '7', '0', '8', '2', 'E', '2', '4', '7', 
		'D', 'G', '7', 'G', 'L', '2', 'T', '9', 'J', '4', '9', '3', 'J', 'Q', 'L', '4', 
		'2', 'G', 'V', 'W', 'H', 'P', 'X', 'W', 'L', 'K', '9', 'T', '4', '7', 'T', 'Z', 
		'8', 'X', '4', 'A', '5', 'P', 'C', 'V', 'A', 'P', 'M', 'J', 'T', '2', '1', 'S', 
		'W', 'T', 'J', '6', 'R', '9', 'L', 'K', 'R', 'D', 'E', 'K', 'P', 'V', 'M', 'C', 
		'6', '3', 'S', '0', 'M', '1', 'L', '2', 'X', 'Z', 'Y', '5', 'Q', '8', 'R', '6', 
		'P', 'V', '5', 'D', 'U', 'E', 'C', 'D', '5', 'J', 'M', 'N', 'K', '0', 'V', 'P', 
		'H', 'F', '6', '0', 'Y', 'H', 'H', 'F', 'V', 'Y', 'C', 'Q', 'Z', 'E', 'H', 'F', 
		'A', 'I', 'A', '1', 'G', 'A', 'Y', '9', '6', '1', '7', 'G', 'O', '1', 'N', 'Z', 
		'G', 'A', 'H', 'X', 'L', 'W', 'O', '8', 'I', 'M', '7', 'C', 'S', '6', 'O', 'C', 
		'F', 'K', 'T', 'T', 'T', 'H', '0', 'W', '9', 'S', 'Q', 'L', 'I', 'Q', 'S', 'U', 
		'F', 'W', '6', 'I', 'J', 'K', 'K', 'E', 'C', 'U', '9', '5', 'V', 'J', 'N', 'E', 
		'0', 'Q', 'V', 'L', 'O', 'Z', 'S', 'G', 'W', 'K', '0', 'T', '3', 'B', '0', 'L', 
		'R', 'F', '3', 'N', 'B', '5', 'F', 'J', 'U', 'B', 'H', 'F', 'J', 'X', 'D', 'Q', 
		'W', 'L', 'U', 'B', 'B', '5', 'F', 'W', 'L', '3', '5', 'Z', 'Z', 'D', 'O', '5', 
		'V', 'Y', 'A', 'E', 'Z', 'R', '9', 'V', 'K', 'Q', '3', 'P', 'L', '3', 'Q', '4', 
		'0', 'O', 'H', '4', 'L', 'Q', 'S', 'S', 'W', '0', 'K', '7', '8', 'X', '1', '5', 
		'6', 'E', '2', '0', '4', 'U', 'T', 'A', '2', 'P', 'O', 'M', 'D', 'B', 'A', '0', 
		'B', 'E', 'Q', 'B', 'U', 'Z', 'L', 'C', 'F', 'T', 'X', 'O', 'H', 'E', '3', 'U', 
		'4', 'O', '2', 'V', 'V', 'C', 'O', 'D', 'X', 'N', '0', 'W', 'S', '6', 'G', 'G', 
		'Q', '4', 'W', 'D', 'X', 'H', 'A', 'F', 'P', 'X', '8', 'Q', 'U', 'L', 'L', '6', 
		'7', 'K', '7', 'G', 'U', 'I', '6', 'B', 'R', 'Y', '8', 'K', '7', 'P', 'E', '8', 
		'A', '1', 'I', 'V', 'A', '7', '3', 'M', 'F', 'P', 'N', 'Y', '0', 'R', '4', 'O', 
		'Y', 'Q', 'N', 'I', '9', '3', 'H', 'Y', '8', 'Y', 'P', 'O', 'L', 'C', '1', 'Q', 
		'1', 'B', 'D', 'M', 'V', 'L', '1', '2', '9', 'E', 'R', 'Z', '6', 'I', '0', 'M', 
		'W', 'T', 'W', 'V', 'T', '6', 'G', 'V', '0', 'T', '3', 'J', 'E', 'X', '4', '0', 
		'1', 'Z', 'M', 'I', '4', 'G', 'X', 'N', 'W', '5', 'C', 'O', '2', 'X', 'D', 'W', 
		'N', '9', 'O', 'I', 'Q', 'B', 'U', '7', 'V', 'N', 'C', 'I', 'N', 'P', '6', 'T', 
		'D', '0', 'M', 'N', '3', '0', 'C', 'V', '2', 'Z', 'I', '0', 'Z', 'F', '4', '0', 
		'S', 'I', '0', 'M', 'T', 'E', '1', 'S', 'H', 'G', 'O', '6', 'V', 'C', 'H', 'I', 
		'6', '8', '2', '8', 'B', 'W', 'M', 'V', 'I', 'W', 'L', '5', 'O', 'W', 'X', '7', 
		'0', 'V', '8', 'I', 'D', 'R', 'D', '4', 'N', '4', 'L', 'A', '3', 'V', '3', '3', 
		'N', 'G', 'W', 'P', 'T', '5', 'X', 'I', '2', 'R', '9', 'E', 'J', 'K', '9', 'B', 
	},
	{
		'U', 'O', 'B', '0', 'G', 'M', 'V', 'M', '8', 'K', '8', '1', '2', 'G', 'Z', 'P', 
		'1', 'V', 'J', 'C', 'A', 'D', 'N', 'P', '2', 'L', 'X', '5', '4', '3', 'R', '3', 
		'B', 'P', 'O', 'S', 'M', 'R', 'U', '6', 'B', 'A', 'K', 'I', 'V', 'Y', 'B', '6', 
		'W', '2', 'J', 'R', 'R', 'Q', 'F', 'H', 'N', '3', 'Y', 'C', '5', 'N', 'S', 'V', 
		'5', 'A', 'I', 'T', 'T', '6', 'O', 'X', 'I', 'D', 'O', 'W', '0', 'Y', 'R', 'O', 
		'T', 'R', 'T', '7', 'M', 'F', 'J', '4', '5', 'R', '1', 'V', 'Y', 'F', 'F', '7', 
		'1', 'M', 'G', 'I', '4', 'X', 'I', 'O', 'U', 'Z', 'C', '5', '1', '1', 'R', '0', 
		'H', 'A', 'J', 'C', '6', 'W', 'Z', 'U', '0', 'E', 'Z', 'E', 'U', 'U', 'H', '0', 
		'K', '7', 'A', 'T', '0', 'U', '7', '4', '9', 'K', 'I', 'O', 'V', 'L', 'F', '5', 
		'F', 'A', '4', 'C', '3', 'B', 'F', 'X', 'M', '2', 'T', '4', 'G', '8', 'F', '5', 
		'7', 'S', 'W', '5', 'E', 'G', '6', '4', 'L', 'U', '9', 'G', 'X', 'R', 'K', 'Z', 
		'2', 'O', '0', 'Y', 'G', 'N', '7', 'Q', 'A', '4', 'Q', 'R', 'U', 'M', 'A', 'L', 
		'D', 'F', 'F', 'J', 'J', '6', 'N', 'H', 'L', 'T', 'V', 'Y', 'Y', 'H', 'K', 'H', 
		'R', 'M', 'W', 'E', 'R', 'Q', '8', 'K', '7', '8', '2', 'K', 'I', 'T', 'V', 'C', 
		'C', 'H', '2', 'G', '6', '5', 'C', '2', 'W', 'R', 'Q', '8', '5', 'H', 'I', 'N', 
		'S', 'M', 'L', 'H', 'W', '0', '6', 'T', 'I', 'B', 'A', 'D', 'A', 'G', 'L', 'E', 
		'D', 'K', '9', 'Y', 'D', 'A', 'R', 'S', '4', '7', 'E', 'T', '2', 'A', '6', 'J', 
		'A', 'F', '4', 'I', '8', 'W', 'A', 'W', '7', 'K', '1', 'F', 'I', 'X', 'I', 'S', 
		'K', 'J', 'K', 'N', 'N', 'C', '0', 'K', 'P', '1', 'M', 'S', 'O', '5', 'Y', '6', 
		'C', '2', 'J', 'B', 'E', 'F', 'I', 'A', '7', 'G', '5', 'N', 'T', 'E', 'C', 'M', 
		'X', 'M', 'N', 'L', 'Y', 'S', 'T', 'C', '0', 'D', '9', 'S', 'F', '6', 'V', 'N', 
		'X', 'W', '7', 'A', 'L', 'I', 'G', 'E', 'B', 'R', 'J', 'F', 'D', 'U', 'G', 'Z', 
		'E', '9', 'F', 'I', 'L', 'W', 'M', '4', 'B', 'M', 'D', 'Y', '2', '5', 'N', '3', 
		'Y', 'H', 'K', 'C', 'A', 'U', 'B', 'S', 'B', 'J', 'B', 'M', 'M', 'Z', 'X', '0', 
		'T', '7', 'X', 'H', 'A', 'Q', 'H', 'X', 'U', 'F', '3', 'Z', 'U', 'R', 'O', 'O', 
		'5', 'P', '6', 'W', 'G', 'U', '2', 'Y', 'U', '3', 'R', 'P', 'I', 'C', 'F', 'V', 
		'X', 'G', 'A', 'A', '6', '4', '6', 'T', 'O', 'T', 'T', '2', 'D', 'E', 'X', 'K', 
		'9', 'R', 'T', 'X', 'F', 'Q', '8', 'I', 'E', '1', 'B', 'N', 'C', '7', 'A', 'R', 
		'D', 'C', 'W', '4', 'T', 'P', '2', 'U', 'S', '0', '1', 'Y', 'N', '8', '4', 'Z', 
		'V', '1', 'F', 'Y', 'W', 'J', '1', '0', 'H', 'A', 'J', 'Z', 'U', 'P', 'K', 'Y', 
		'Q', 'F', '7', 'R', '5', 'V', '6', '5', '4', 'I', 'E', 'X', '3', '9', 'K', '6', 
		'H', 'C', '1', 'Z', '3', '2', 'C', '3', 'F', 'Z', '6', 'Q', '5', 'N', 'V', 'N', 
		'E', 'L', 'W', 'I', 'J', 'T', '9', 'V', 'G', '6', 'Q', 'R', 'K', '8', '9', 'F', 
		'J', 'L', 'X', 'L', 'K', 'U', 'P', 'F', 'J', 'L', '4', 'G', 'R', 'O', 'K', '7', 
		'T', 'Z', 'Q', '7', 'Q', 'H', 'M', '6', 'J', '3', 'Z', 'U', '9', 'N', 'U', '0', 
		'B', '5', 'G', 'V', '8', 'A', '9', 'P', 'X', 'U', 'F', 'A', 'O', '9', 'K', 'W', 
		'8', '0', 'Q', '6', 'W', 'N', 'A', 'B', 'Y', 'M', 'A', '1', 'V', 'V', 'N', 'C', 
		'2', 'J', '5', 'G', 'H', 'H', 'W', 'N', 'P', 'Q', '9', 'U', '7', 'L', 'K', '3', 
		'T', 'F', '0', 'C', 'M', 'S', 'Y', 'G', 'A', 'F', 'Y', 'P', 'G', 'Z', 'L', 'P', 
		'X', 'N', 'P', 'H', '3', 'D', '4', '1', 'V', 'L', '1', 'A', '3', 'N', 'U', '6', 
		'N', '6', 'S', '3', 'V', '9', 'X', 'X', 'Y', 'F', 'E', 'S', 'E', 'U', 'C', 'K', 
		'Y', 'K', '0', 'N', 'A', 'M', '1', 'M', 'B', 'Z', '9', 'B', 'J', '6', 'A', 'M', 
		'Q', 'K', 'K', 'F', '2', '5', '7', '1', '9', 'V', '8', 'R', 'N', '5', '4', 'C', 
		'1', 'Q', '2', '7', 'L', 'R', 'I', '8', 'S', 'S', 'K', '6', '2', 'R', 'K', 'S', 
		'Z', '4', 'V', 'T', 'Y', 'A', 'E', '2', 'J', '8', '7', 'L', 'F', 'A', 'V', 'I', 
		'2', 'U', '1', 'V', '2', '1', 'Y', 'Q', '1', '3', 'U', 'L', 'O', 'Q', 'W', '8', 
		'6', 'P', 'H', '9', 'R', 'D', 'U', 'E', 'V', 'A', '7', 'U', 'E', 'J', '6', 'J', 
		'T', 'U', '7', 'X', '1', 'G', 'J', 'Y', 'N', 'C', '1', 'V', 'R', '6', '6', 'F', 
		'2', 'E', 'A', 'C', '3', 'T', 'F', 'G', 'C', '4', 'A', 'K', 'O', 'V', 'A', 'Z', 
		'W', '1', '3', '7', 'E', 'W', '0', 'V', '6', 'A', 'A', 'U', '2', '0', '1', 'X', 
		'7', 'N', 'D', '3', 'Y', 'T', 'U', 'N', 'X', '2', 'Q', 'B', 'R', '2', '4', 'D', 
		'X', 'X', 'C', '1', 'B', 'W', 'T', 'E', 'Z', 'U', 'X', 'V', 'T', 'X', 'N', 'B', 
		'6', '3', 'W', '5', 'R', 'D', '9', 'G', 'I', 'Q', 'V', '9', 'I', 'P', '6', 'C', 
		'D', 'D', 'P', 'A', 'E', 'W', '2', 'I', 'G', 'A', 'D', 'T', 'K', 'B', 'W', '7', 
		'D', 'P', 'A', 'N', 'C', 'A', 'O', 'B', 'U', '1', '8', 'Z', '8', '4', 'P', 'H', 
		'L', 'F', '6', 'E', 'Q', '2', 'H', '7', 'S', '7', 'A', '2', 'D', 'H', 'C', '7', 
		'5', 'Q', '1', 'A', 'X', '4', 'N', 'S', 'N', '7', 'J', 'Q', 'N', 'G', 'J', 'G', 
		'X', 'H', 'T', 'A', 'O', 'B', 'H', 'I', '5', 'D', 'D', 'M', 'M', 'E', '5', 'Z', 
		'Q', 'P', 'T', '8', '5', '6', 'D', 'E', 'I', 'M', 'M', '6', 'V', 'M', '8', 'X', 
		'I', '8', 'W', 'E', '4', 'E', '4', 'J', 'K', 'Y', 'M', 'Y', '5', 'W', '7', 'A', 
		'B', 'E', 'H', '8', '2', 'L', 'S', 'R', 'X', '4', 'G', 'K', 'F', 'A', 'Y', 'N', 
		'H', 'L', 'U', 'S', 'B', 'T', '4', 'C', '0', 'A', '2', '1', '5', 'K', 'Z', 'T', 
		'V', 'X', '1', 'K', '4', '9', 'E', 'H', 'A', 'O', '8', 'O', '7', 'Y', 'J', 'C', 
		'U', 'S', '8', 'Y', 'V', 'V', 'U', '2', 'B', '3', 'X', 'G', '8', 'Q', 'O', 'B', 
		'Y', '4', 'H', 'U', 'X', 'B', 'J', '4', 'Z', 'D', '1', 'U', 'S', 'X', 'O', 'E', 
		'H', 'A', 'P', 'Z', '6', 'A', '2', '8', '2', 'Q', 'E', 'I', 'X', '8', 'C', 'S', 
		'Y', 'Z', 'U', 'J', 'A', '2', 'M', 'J', 'E', '9', 'V', 'O', '7', 'D', 'B', 'J', 
		'6', 'M', '6', 'N', 'M', 'T', 'V', 'I', '1', 'Q', 'N', 'Z', 'V', 'Y', 'W', '8', 
		'T', 'U', 'J', 'Y', '9', 'H', '2', 'Y', 'X', 'Z', 'Y', 'N', 'W', '7', 'J', '0', 
		'O', '2', 'C', '2', '7', 'H', '4', 'L', '6', 'E', '8', 'D', '8', 'L', 'X', 'F', 
		'S', '2', 'V', 'C', 'D', 'B', 'S', 'T', '8', 'M', 'B', 'T', 'V', 'J', '4', 'R', 
		'F', 'P', '9', 'E', 'T', '4', 'O', '4', 'U', '2', 'F', '7', 'W', 'V', 'O', 'Y', 
		'E', 'G', 'M', 'R', 'R', 'E', 'K', 'X', '9', 'Q', 'F', '0', 'S', 'K', 'Q', '0', 
		'Z', '4', 'B', 'J', 'V', 'K', 'C', '1', 'F', 'M', 'U', 'N', 'D', 'F', '8', 'P', 
		'8', 'E', 'X', 'Z', '7', 'L', '6', 'D', '0', 'H', '4', 'X', '1', 'J', 'X', '9', 
		'0', 'H', 'F', '7', 'I', 'N', 'Q', 'J', 'L', 'F', 'M', 'S', 'U', '1', 'M', 'U', 
		'4', 'R', 'C', 'O', '7', 'Q', '8', 'I', 'P', 'I', 'R', 'X', 'M', 'P', '8', 'B', 
		'E', 'F', 'T', 'W', 'J', '9', 'I', '5', '3', 'E', '7', 'E', '3', 'H', 'U', 'S', 
		'Y', '0', 'S', '5', 'T', 'Q', '9', 'Y', 'O', '0', 'Y', '8', '4', 'B', 'Z', '9', 
		'6', '5', '4', 'W', 'E', 'C', '3', 'L', 'V', '1', 'G', '3', 'N', 'K', 'O', '9', 
		'Z', 'E', 'J', 'J', 'Y', 'X', 'W', 'H', 'F', 'R', 'I', 'R', 'T', 'V', 'G', 'N', 
		'V', 'B', '7', 'B', 'K', 'C', 'E', 'U', 'S', '4', 'O', 'D', 'M', 'G', 'T', '4', 
		'3', 'I', 'R', 'X', 'S', '4', 'Y', 'O', 'P', 'T', 'U', 'H', 'Z', 'A', '2', 'J', 
		'N', 'E', '9', 'P', 'N', 'O', 'C', 'K', 'R', 'O', 'O', 'X', 'U', 'Y', '7', '3', 
		'1', '9', '7', 'W', 'L', 'G', '8', 'N', '9', '6', 'X', 'P', 'W', 'D', 'O', 'F', 
		'6', 'Z', 'F', 'Z', '8', 'X', 'H', '1', 'I', '9', 'G', '6', 'Q', '1', '3', 'A', 
		'9', 'X', 'L', '0', '3', 'L', 'P', 'A', '2', '2', 'E', 'U', 'Y', 'D', 'E', 'B', 
		'Q', 'G', '8', 'F', 'Y', 'N', 'I', '9', 'T', 'L', 'I', 'O', 'E', '9', '1', 'P', 
		'I', 'L', 'W', 'J', 'O', 'L', 'H', 'L', '9', 'B', 'Z', 'Z', '3', 'Q', '5', 'Q', 
		'3', 'N', 'D', '7', 'K', 'V', 'F', 'F', 'F', 'T', 'S', 'W', 'L', 'L', 'G', 'G', 
		'N', 'V', 'K', 'J', 'C', 'I', 'H', 'X', '5', 'C', 'R', '1', 'X', 'Y', 'Q', 'D', 
		'7', 'Z', 'X', 'B', 'F', 'P', '6', 'Z', '6', 'K', 'M', '4', 'S', '0', 'M', 'Y', 
		'P', 'W', 'D', 'V', 'V', 'I', 'M', 'U', '7', '1', 'A', 'N', 'N', 'I', 'X', 'B', 
		'6', 'C', 'F', 'H', 'M', 'B', 'L', 'P', '3', 'Z', 'R', 'F', 'Z', 'J', 'P', 'V', 
		'V', 'E', 'I', '5', 'L', 'P', 'O', 'A', 'Z', 'U', 'H', 'A', '8', 'Z', 'C', 'W', 
		'A', '7', 'S', '6', 'T', 'V', 'E', 'K', 'D', 'T', 'A', 'N', 'Z', '9', 'S', '7', 
		'H', 'J', 'L', 'S', 'I', 'B', 'D', 'D', '9', 'P', 'O', '6', '6', 'W', 'J', 'Q', 
		'Z', 'I', 'B', 'R', 'C', 'J', 'A', 'W', 'C', 'A', 'S', 'D', '5', '7', 'V', '6', 
		'2', '2', 'N', '0', 'C', 'K', '9', 'J', 'Z', '5', 'N', 'B', 'Q', 'U', 'Y', 'O', 
		'T', 'S', 'P', 'A', '8', 'L', 'R', 'A', 'H', '5', '7', '2', 'I', 'I', 'W', 'C', 
		'9', 'A', '4', 'R', 'E', 'O', 'W', 'J', '6', '7', 'J', 'H', 'S', 'I', 'Z', 'Y', 
		'I', '2', '4', 'M', '5', '9', 'C', 'M', 'H', 'P', 'W', 'U', 'S', 'C', 'O', 'I', 
		'V', 'Z', 'T', 'R', 'O', 'X', 'N', 'E', '4', 'F', 'W', 'B', 'U', 'I', 'U', 'Y', 
		'Z', 'Y', '3', 'E', 'E', 'U', 'C', 'Z', '4', 'T', 'M', 'P', 'C', 'V', 'W', 'Q', 
		'X', 'I', 'Z', 'L', 'U', 'M', 'W', 'C', '5', 'W', 'P', '3', '2', 'J', 'R', 'G', 
		'A', 'I', 'K', '1', 'Y', 'P', '1', 'V', 'D', 'S', 'I', 'E', '6', 'A', '6', 'F', 
		'H', 'P', '9', 'K', '5', '4', 'T', '0', 'T', 'A', 'B', '0', 'C', 'B', 'R', 'G', 
		'M', 'D', 'V', 'S', 'G', '5', 'N', 'X', 'C', 'J', '7', 'F', 'Y', 'U', '3', '9', 
		'U', 'Z', 'P', 'R', 'L', 'S', 'K', '7', 'U', 'P', 'H', 'X', '5', 'N', 'V', '8', 
		'C', 'Q', 'R', 'L', '6', 'K', '8', '7', 'C', 'I', 'N', '4', '0', 'S', '1', '4', 
		'H', 'A', 'S', '2', 'S', '1', '6', '2', '2', 'V', 'G', 'L', 'N', '9', 'Y', 'F', 
		'Y', 'A', 'E', '8', '2', 'F', 'S', 'Y', 'R', 'M', '7', 'K', 'C', 'G', 'E', '8', 
		'Y', '2', 'C', '4', 'Z', 'A', 'K', '0', 'I', '0', 'S', 'G', 'N', 'Z', 'T', 'T', 
		'5', '8', 'D', '9', 'R', '4', '7', 'Q', '6', 'D', 'Q', 'M', 'K', '6', 'D', '5', 
		'0', 'B', 'N', 'E', '4', '0', 'N', 'Q', 'B', 'U', 'G', 'T', 'M', 'P', '5', 'L', 
		'R', 'D', 'N', '1', 'G', '6', 'B', 'D', 'E', 'T', 'D', 'Y', 'Z', 'A', '5', 'L', 
		'L', 'K', 'E', '3', 'T', 'P', '5', '8', 'U', 'O', 'W', 'O', 'O', '9', 'L', '6', 
		'S', 'Y', 'L', 'M', '3', '3', 'S', 'Z', '9', 'F', 'Q', 'Z', 'K', '7', 'T', 'N', 
		'R', 'V', 'O', '8', '9', 'W', 'P', 'Q', 'J', 'B', 'W', 'U', 'L', 'K', 'M', '9', 
		'C', 'T', 'Z', 'X', '9', 'E', 'A', 'Y', 'V', 'C', 'V', 'X', 'W', 'C', 'A', 'O', 
		'Q', 'T', 'X', 'L', 'D', '5', 'Y', 'T', '1', '3', 'P', 'Z', 'T', 'L', 'P', 'T', 
		'Q', 'A', '1', 'N', '5', 'O', 'B', 'Z', 'E', '5', '6', 'R', '8', '6', 'H', 'A', 
		'U', 'I', '4', 'P', 'P', '2', 'A', '8', '4', 'W', 'W', 'G', 'G', 'A', '4', '4', 
		'E', 'B', 'C', '7', 'O', 'K', 'A', '1', '9', '0', 'G', 'B', 'I', '6', '5', 'C', 
		'O', 'M', 'H', 'Z', 'G', '8', '6', '5', 'S', '5', 'I', 'E', '8', 'O', '5', 'P', 
		'0', '9', 'W', 'V', 'C', 'N', 'J', 'B', 'X', 'L', 'Z', '3', 'B', 'W', '0', '3', 
		'W', 'B', 'R', 'H', 'I', 'C', 'U', 'W', '3', 'S', '0', 'S', 'J', 'S', 'X', 'F', 
		'9', '2', '4', 'O', 'C', 'M', 'C', 'E', '4', '2', 'C', 'H', 'U', 'U', 'M', '0', 
	},
};

// 49b544
static char decode_table[] = "G5FXIL094MPRKWCJ3OEBVA7HQ2SU8Y6TZ1ND";

static char hex_table[36] = {
	0x06, 0x21, 0x19, 0x10, 0x08, 0x01, 0x1E, 0x16, 0x1C,
	0x07, 0x15, 0x13, 0x0E, 0x23, 0x12, 0x02, 0x00, 0x17, 
	0x04, 0x0F, 0x0C, 0x05, 0x09, 0x22, 0x11, 0x0A, 0x18, 
	0x0B, 0x1A, 0x1F, 0x1B, 0x14, 0x0D, 0x03, 0x1D, 0x20  
};

static int isf_check_ok;
static char *code_table = secret_filter_code_table[0];	// 默认

static char inline __chr2hex(char chr)
{	
	char dec;

	if (chr >= '0' && chr <= '9')   
		dec = chr - '0';   
	else if (chr >= 'a' && chr <= 'z')   
		dec = chr -'a' + 10;   
	else if (chr >= 'A' && chr <= 'Z')   
		dec = chr -'A' + 10;   
	else   
        dec = 0;

	return dec;
}

static char chr2hex(char chr)
{	
	return hex_table[__chr2hex(chr)];
}

static unsigned int str2hex(char *shex, int len)
{   
	int i, mid;
	int idec;

	mid = 0;
	idec = 0;   
	for (i = 0; i < len; i++) {
		mid = __chr2hex(shex[i]);    
		mid <<= ((len - i - 1) << 2);   
		idec |= mid;
	}   
	return idec;   
}

static BYTE __decode(char sub)
{
	if (sub >= 0)
		return decode_table[sub % 36];
	else {
		sub = 0 - sub;
		if (!(sub % 36))
			return decode_table[0];
		return decode_table[36 - (sub % 36)];
	}
}

static int isf_create_decode_string(char **ret_decode_string)
{
	char len_str[2];
	int i, len;

	for (i = 0; i < 2; i++)
		len_str[i] = __decode(chr2hex(code_table[1280 + i]) - chr2hex(code_table[256 + i]));

	len = str2hex(len_str, 2);
	*ret_decode_string = (char *)malloc(len + 1);
	if (!*ret_decode_string)
		return -1;

	for (i = 0; i < len; i++)
		(*ret_decode_string)[i] = __decode(chr2hex(code_table[1296 + i]) - chr2hex(code_table[272 + i]));
	(*ret_decode_string)[i] = 0;
	return len;
}

static int isf_check_sum(char *code_table)
{
	BYTE buf[14];
	unsigned int i;
	BYTE sum_8;
	WORD sum_16;
	DWORD sum_32;
	BYTE *bp;
	WORD *wp;
	DWORD *dp;

	for (i = 0; i < sizeof(buf); i++)
		buf[i] = __decode(chr2hex(code_table[1282 + i]) - chr2hex(code_table[258 + i]));	

	sum_8 = 0;
	sum_16 = 0;
	sum_32 = 0;
	bp = (BYTE *)code_table;
	wp = (WORD *)code_table;
	dp = (DWORD *)code_table;
	for (i = 0; i < 2048 / 4; i++) {
		if (i < (1280 / 4) || i >= (1296 / 4)) {
			sum_8 += bp[0] + bp[1] + bp[2] + bp[3];
			sum_16 += wp[0] + wp[1];
			sum_32 += dp[0];
		}
		bp += 4;
		wp += 2;
		dp++;
	}
	if (sum_8 != str2hex((char *)buf, 2))
		return 0;

	if (sum_16 != str2hex((char *)buf + 2, 4))
		return 0;

	if ((sum_32 >> 16) != str2hex((char *)buf + 6, 4))
		return 0;

	if ((sum_32 & 0xffff) != str2hex((char *)buf + 10, 4))
		return 0;

	return 1;
}

static void isf_decode_prepare(int index, char *dec_string, int dec_string_len, char *ret)
{
	char *p;

	p = code_table + (index & 0x3f) * 16;
	for (int i = 0; i < dec_string_len; i++)
		ret[i] = __decode(chr2hex(dec_string[i]) + chr2hex(p[i]));
}

/***********************/

static void *my_malloc(DWORD len)
{
	return malloc(len);
}

#if 0
static void fagc_image_decompress(unsigned char *uncompr, DWORD uncomprlen, 
							unsigned char *compr, DWORD comprlen)
{
	fagc_header_t *fagc = (fagc_header_t *)compr;
	u16 magic0 = 0, magic1 = 0;

	for (unsigned int i = 0; i < 4; i++) {
		magic0 = (magic0 << 4) | (fagc->magic[i] & 0x6f);
		magic1 = (magic0 << 4) | (fagc->magic[i] & 0xef);
	}
}
#endif

static void full_image_decompress(unsigned char *uncompr, DWORD uncomprlen, 
							unsigned char *compr, DWORD comprlen)
{
	DWORD act_uncomprlen = 0;
	DWORD curbyte = 0;

	while (curbyte < comprlen) {
		BYTE flag;
		DWORD copy_pixel, pixel;
		unsigned int k;
		BYTE b, g, r;

		flag = compr[curbyte++];
		switch (flag) {
		case 0:
			copy_pixel = (DWORD)compr[curbyte++];
			b = uncompr[act_uncomprlen - 3];
			g = uncompr[act_uncomprlen - 2];
			r = uncompr[act_uncomprlen - 1];
			for (k = 0; k < copy_pixel; k++) {
				uncompr[act_uncomprlen++] = b;
				uncompr[act_uncomprlen++] = g;
				uncompr[act_uncomprlen++] = r;
			}
			break;
		case 1:
			copy_pixel = compr[curbyte++];
			pixel = compr[curbyte++];
			for (k = 0; k < copy_pixel * 3; k++) {
				uncompr[act_uncomprlen] = uncompr[act_uncomprlen - pixel * 3];
				act_uncomprlen++;
			}
			break;
		case 2:
			copy_pixel = compr[curbyte++];
			pixel = compr[curbyte++];
			pixel |= compr[curbyte++] << 8;
			for (k = 0; k < copy_pixel * 3; k++) {
				uncompr[act_uncomprlen] = uncompr[act_uncomprlen - pixel * 3];
				act_uncomprlen++;
			}
			break;
		case 3:
			pixel = compr[curbyte++];
			copy_pixel = 1;
			for (k = 0; k < copy_pixel * 3; k++) {
				uncompr[act_uncomprlen] = uncompr[act_uncomprlen - pixel * 3];
				act_uncomprlen++;
			}
			break;
		case 4:
			pixel = compr[curbyte++]; 
			pixel |= compr[curbyte++] << 8;
			copy_pixel = 1;
			for (k = 0; k < copy_pixel * 3; k++) {
				uncompr[act_uncomprlen] = uncompr[act_uncomprlen - pixel * 3];
				act_uncomprlen++;
			}
			break;
		default:
			copy_pixel = flag - 4;
			for (k = 0; k < copy_pixel * 3; k++)
				uncompr[act_uncomprlen++] = compr[curbyte++];
		}
	}
}

static int full_image_extract(BYTE *__full, DWORD full_length, BYTE **ret, DWORD *ret_length)
{
	full_header_t *full_header = (full_header_t *)__full;
	BYTE *compr;
	DWORD comprlen;
	BYTE *uncompr;
	DWORD uncomprlen;
	DWORD line_len;

	line_len = (full_header->width * 3 + 3) & ~3;
	uncomprlen = line_len * full_header->height;
	uncompr = (BYTE *)malloc(uncomprlen * 2);
	if (!uncompr)
		return -CUI_EMEM;

	compr = (BYTE *)(full_header + 1);
	comprlen = full_length - sizeof(full_header_t);
	full_image_decompress(uncompr, uncomprlen, compr, comprlen);

	if (MyBuildBMPFile(uncompr, uncomprlen, NULL, 0,
			full_header->width, 0 - full_header->height, 24,
			ret, ret_length, my_malloc)) {
		free(uncompr);
		return -CUI_EMEM;
	}
	free(uncompr);
	return 0;
}

static inline unsigned char getbit_le(unsigned char byte, unsigned int pos)
{
	return !!(byte & (1 << pos));
}

static void lzss_decompress(unsigned char *uncompr, DWORD *uncomprlen, 
							unsigned char *compr, DWORD comprlen)
{
	unsigned int act_uncomprlen = 0;
	/* compr中的当前字节中的下一个扫描位的位置 */
	unsigned int curbit = 0;
	/* compr中的当前扫描字节 */
	unsigned int curbyte = 0;
	unsigned int nCurWindowByte = 0xfee;
	unsigned int win_size = 4096;
	BYTE win[4096];
	
	memset(win, 0, sizeof(win));
	while (1) {
		/* 如果为0, 表示接下来的1个字节原样输出 */
		BYTE flag;

		if (curbyte >= comprlen)
			break;

		flag = compr[curbyte++];
		for (curbit = 0; curbit < 8; curbit++) {
			if (getbit_le(flag, curbit)) {
				unsigned char data;

				if (curbyte >= comprlen)
					goto out;

				if (act_uncomprlen >= *uncomprlen)
					goto out;

				data = compr[curbyte++];
				uncompr[act_uncomprlen++] = data;
				/* 输出的1字节放入滑动窗口 */
				win[nCurWindowByte++] = data;
				nCurWindowByte &= win_size - 1;
			} else {
				unsigned int copy_bytes, win_offset;
				unsigned int i;

				if (curbyte >= comprlen)
					goto out;
				win_offset = compr[curbyte++];

				if (curbyte >= comprlen)
					goto out;
				copy_bytes = compr[curbyte++];
				win_offset |= (copy_bytes >> 4) << 8;
				copy_bytes &= 0x0f;
				copy_bytes += 3;

				for (i = 0; i < copy_bytes; i++) {	
					unsigned char data;

					if (act_uncomprlen >= *uncomprlen)
						goto out;

					data = win[(win_offset + i) & (win_size - 1)];
					uncompr[act_uncomprlen++] = data;		
					/* 输出的1字节放入滑动窗口 */
					win[nCurWindowByte++] = data;
					nCurWindowByte &= win_size - 1;	
				}
			}
		}
	}
out:
	*uncomprlen = act_uncomprlen;
}

static void ggp_decode(BYTE *dec_data, DWORD dec_data_len, BYTE *ggp, DWORD ggp_len)
{
	BYTE *ggp_data;
	ggp_header_t *header;
	unsigned int i;
	u8 xor_magic[8];
	
	header = (ggp_header_t *)ggp;			
	ggp_data = ggp + header->data_offset;
	memcpy(xor_magic, header->xor_magic, 8);
	for (i = 0; i < 8; i++)
		xor_magic[i] ^= ggp[i];
	
	for (i = 0; i < header->data_length; i++)
		dec_data[i] = ggp_data[i] ^ xor_magic[i & 7];
}	

static DWORD ggd_decompress(BYTE *uncompr, BYTE *compr, DWORD comprlen, DWORD width)
{
	DWORD curbyte = 0;
	DWORD act_uncomprlen = 0;

	while (curbyte < comprlen) {
		BYTE flag;
		DWORD pixel, copy_pixel;
		unsigned int k;

		flag = compr[curbyte++];
		switch (flag) {
		case 0:
			copy_pixel = compr[curbyte++];
			pixel = 1;
			break;
		case 1:
			copy_pixel = *(u16 *)&compr[curbyte];
			curbyte += 2;	
			pixel = 1;
			break;
		case 2:
			copy_pixel = 1;
			pixel = compr[curbyte++];
			break;
		case 3:
			copy_pixel = 1;
			pixel = *(u16 *)&compr[curbyte];;
			curbyte += 2;
			break;
		case 4:
			pixel = compr[curbyte++];
			copy_pixel = compr[curbyte++];
			break;
		case 5:
			pixel = compr[curbyte++];
			copy_pixel = *(u16 *)&compr[curbyte];;
			curbyte += 2;
			break;
		case 6:
			pixel = *(u16 *)&compr[curbyte];;
			curbyte += 2;
			copy_pixel = compr[curbyte++];
			break;
		case 7:				
			pixel =*(u16 *)&compr[curbyte];;
			curbyte += 2;
			copy_pixel = *(u16 *)&compr[curbyte];;
			curbyte += 2;
			break;
		case 8:
			pixel = 1;
			copy_pixel = 1;
			break;
		case 9:
			pixel = width;
			copy_pixel = 1;
			break;
		case 10:
			pixel = width + 1;
			copy_pixel = 1;
			break;
		case 11:
			pixel = width - 1;
			copy_pixel = 1;
			break;
		}

		if (flag > 11) {
			copy_pixel = flag - 11;
			for (k = 0; k < copy_pixel; k++) {
				*(u32 *)&uncompr[act_uncomprlen] = *(u32 *)&compr[curbyte];
				act_uncomprlen += 4;
				curbyte += 4;
			}
		} else {
			for (k = 0; k < copy_pixel * 4; k++) {
				uncompr[act_uncomprlen] = uncompr[act_uncomprlen - pixel * 4];
				act_uncomprlen++;
			}
		}
	}

	return act_uncomprlen;
}

static int ggd_extract(BYTE *__ggd, DWORD ggd_length, BYTE **ret, DWORD *ret_length)
{
	ggd_header_t *ggd_header = (ggd_header_t *)__ggd;
	DWORD act_len;
	BYTE *compr;
	DWORD comprlen;
	BYTE *uncompr;
	DWORD uncomprlen;

	uncomprlen = ggd_header->width * ggd_header->height * 4;
	uncompr = (BYTE *)malloc(uncomprlen);
	if (!uncompr)
		return -CUI_EMEM;

	compr = __ggd + ggd_header->data_offset;
	comprlen = ggd_length - ggd_header->data_offset;
	act_len = ggd_decompress(uncompr, compr, comprlen, ggd_header->width);
//	if (act_len != uncomprlen) {
//		free(uncompr);
//		return -CUI_EUNCOMPR;
//	}

	if (MyBuildBMPFile(uncompr, uncomprlen, NULL, 0,
			ggd_header->width, 0 - ggd_header->height, 32,
			ret, ret_length, my_malloc)) {
		free(uncompr);
		return -CUI_EMEM;
	}
	free(uncompr);
	return 0;
}

/********************* *********************/

/* 封包匹配回调函数 */
static int IkuraGDL_match(struct package *pkg)
{
	s8 magic[8];

	if (pkg->pio->open(pkg, IO_READONLY))
		return -CUI_EOPEN;

	if (pkg->pio->read(pkg, magic, sizeof(magic))) {
		pkg->pio->close(pkg);
		return -CUI_EREAD;
	}

	if (memcmp(magic, "SM2MPX10", 8)) {
		pkg->pio->close(pkg);
		return -CUI_EMATCH;	
	}

	return 0;	
}

/* 封包索引目录提取函数 */
static int IkuraGDL_extract_directory(struct package *pkg,
									  struct package_directory *pkg_dir)
{
	IkuraGDL_header_t IkuraGDL_header;
	IkuraGDL_entry_t *index_buffer;
	unsigned int index_buffer_length;	

	if (pkg->pio->readvec(pkg, &IkuraGDL_header, sizeof(IkuraGDL_header), 0, IO_SEEK_SET))
		return -CUI_EREADVEC;

	index_buffer_length = IkuraGDL_header.index_entries * sizeof(IkuraGDL_entry_t);
	index_buffer = (IkuraGDL_entry_t *)malloc(index_buffer_length);
	if (!index_buffer)
		return -CUI_EMEM;

	if (pkg->pio->read(pkg, index_buffer, index_buffer_length)) {
		free(index_buffer);
		return -CUI_EREAD;
	}

	pkg_dir->index_entries = IkuraGDL_header.index_entries;
	pkg_dir->directory = index_buffer;
	pkg_dir->directory_length = index_buffer_length;
	pkg_dir->index_entry_length = sizeof(IkuraGDL_entry_t);

	return 0;
}

/* 封包索引项解析函数 */
static int IkuraGDL_parse_resource_info(struct package *pkg,
										struct package_resource *pkg_res)
{
	IkuraGDL_entry_t *IkuraGDL_entry;

	IkuraGDL_entry = (IkuraGDL_entry_t *)pkg_res->actual_index_entry;
	strncpy(pkg_res->name, IkuraGDL_entry->name, 12);
	pkg_res->name_length = strlen(pkg_res->name);			/* -1表示名称以NULL结尾 */
	pkg_res->raw_data_length = IkuraGDL_entry->length;
	pkg_res->actual_data_length = 0;	/* 数据都是明文 */
	pkg_res->offset = IkuraGDL_entry->offset;

	return 0;
}

/* 封包资源提取函数 */
static int IkuraGDL_extract_resource(struct package *pkg,
									 struct package_resource *pkg_res)
{
	pkg_res->raw_data = malloc(pkg_res->raw_data_length);
	if (!pkg_res->raw_data)
		return -CUI_EMEM;

	if (pkg->pio->readvec(pkg, pkg_res->raw_data, pkg_res->raw_data_length,
		pkg_res->offset, IO_SEEK_SET)) {
			free(pkg_res->raw_data);
			pkg_res->raw_data = NULL;
			return -CUI_EREADVEC;
	}

	if (pkg_res->flags & PKG_RES_FLAG_RAW)
		return 0;

	pkg_res->actual_data = NULL;
	pkg_res->actual_data_length = 0;

	if (!memcmp(&((BYTE *)pkg_res->raw_data)[pkg_res->raw_data_length - 16], "SECRETFILTER100a", 16)) {
		if (isf_check_ok) {
			char *decode_string;
			int decode_string_length;
			char tmp_dec_string[256];

			decode_string_length = isf_create_decode_string(&decode_string);

			unsigned int i = 0;
			unsigned int n = 0;
			memcpy(tmp_dec_string, decode_string, decode_string_length + 1);
			while (i < pkg_res->raw_data_length - 16) {
				isf_decode_prepare(n++, tmp_dec_string, decode_string_length, tmp_dec_string);
				int k = 0;
				for (; i < pkg_res->raw_data_length - 16; i++) {
					if (k >= decode_string_length)
						break;
					((BYTE *)pkg_res->raw_data)[i] ^= tmp_dec_string[k++];
				}
			}
		} 
	} else if (!strncmp((char *)pkg_res->raw_data, "GGA00000", 8)) {
		int ret;

		ret = ggd_extract((BYTE *)pkg_res->raw_data, pkg_res->raw_data_length, 
			(BYTE **)&pkg_res->actual_data, (DWORD *)&pkg_res->actual_data_length);
		if (ret < 0) {
			free(pkg_res->raw_data);
			pkg_res->raw_data = NULL;
			return ret;
		}
		free(pkg_res->raw_data);
		pkg_res->raw_data = NULL;
		pkg_res->flags |= PKG_RES_FLAG_REEXT;
		pkg_res->replace_extension = _T(".bmp");
	} else if (!strncmp((char *)pkg_res->raw_data, "GGPFAIKE", 8)) {
		ggp_header_t *ggp_header = (ggp_header_t *)pkg_res->raw_data;

		pkg_res->actual_data_length = ggp_header->data_length;
		pkg_res->actual_data = malloc(pkg_res->actual_data_length);
		if (!pkg_res->actual_data) {
			free(pkg_res->raw_data);
			pkg_res->raw_data = NULL;
			return -CUI_EMEM;
		}
		ggp_decode((BYTE *)pkg_res->actual_data, pkg_res->actual_data_length, 
			(BYTE *)pkg_res->raw_data, pkg_res->raw_data_length);
		pkg_res->flags |= PKG_RES_FLAG_REEXT;
		pkg_res->replace_extension = _T(".png");
	} else if (!strncmp((char *)pkg_res->raw_data, "BM", 2)) {
		pkg_res->flags |= PKG_RES_FLAG_REEXT;
		pkg_res->replace_extension = _T(".bmp");
	} else if (!strncmp((char *)pkg_res->raw_data, "\xcd\xca\xc9\xb8", 4)) {	// "256G"
		BITMAPINFOHEADER *binfo = (BITMAPINFOHEADER *)((BYTE *)pkg_res->raw_data + 4);
		BYTE *palette = (BYTE *)(binfo + 1);
		BYTE *compr, *uncompr;
		u32 uncomprlen = *(u32 *)(palette + 256 * 4);
		DWORD comprlen;
		DWORD act_uncomprlen;
		
		compr = palette + 256 * 4;
		uncomprlen = *(u32 *)compr;
		compr += 4;
		uncompr = (BYTE *)malloc(uncomprlen);
		if (!uncompr) {
			free(pkg_res->raw_data);
			pkg_res->raw_data = NULL;
			return -CUI_EMEM;
		}
		
		comprlen = pkg_res->raw_data_length - 4 - sizeof(BITMAPINFOHEADER) - 4;
		act_uncomprlen = uncomprlen;
		lzss_decompress(uncompr, &act_uncomprlen, compr, comprlen);
		if (act_uncomprlen != uncomprlen) {
			free(uncompr);
			free(pkg_res->raw_data);
			pkg_res->raw_data = NULL;
			return -CUI_EUNCOMPR;
		}

		if (MyBuildBMPFile(uncompr, uncomprlen, palette, 1024,
				binfo->biWidth, binfo->biHeight, binfo->biBitCount,
				(BYTE **)&pkg_res->actual_data, (DWORD *)&pkg_res->actual_data_length, my_malloc)) {
			free(uncompr);
			return -CUI_EMEM;
		}
		free(uncompr);
		pkg_res->flags |= PKG_RES_FLAG_REEXT;
		pkg_res->replace_extension = _T(".bmp");
	} else if (!strncmp((char *)pkg_res->raw_data, "\xb9\xaa\xb3\xb3", 4)) {	// "FULL"
		int ret;

		ret = full_image_extract((BYTE *)pkg_res->raw_data, pkg_res->raw_data_length, 
			(BYTE **)&pkg_res->actual_data, (DWORD *)&pkg_res->actual_data_length);
		if (ret < 0) {
			free(pkg_res->raw_data);
			pkg_res->raw_data = NULL;
			return ret;
		}

		free(pkg_res->raw_data);
		pkg_res->raw_data = NULL;
		pkg_res->flags |= PKG_RES_FLAG_REEXT;
		pkg_res->replace_extension = _T(".bmp");
	} else if (!strncmp((char *)pkg_res->raw_data, "\x0\x0\x2\x0\x1\x0", 6)) {
		pkg_res->flags |= PKG_RES_FLAG_REEXT;
		pkg_res->replace_extension = _T(".cur");
	} else if (!strncmp((char *)pkg_res->raw_data, "RIFF", 4) 
			&& !strncmp((char *)pkg_res->raw_data + 8, "ACONanih", 8)) {
		pkg_res->flags |= PKG_RES_FLAG_REEXT;
		pkg_res->replace_extension = _T(".cur");
	} else if (!strncmp((char *)pkg_res->raw_data, "RIFF", 4) 
			&& !strncmp((char *)pkg_res->raw_data + 8, "ACONLIST", 8)) {
		pkg_res->flags |= PKG_RES_FLAG_REEXT;
		pkg_res->replace_extension = _T(".cur");
	}

	if (strstr(pkg_res->name, ".ISF") || strstr(pkg_res->name, ".isf")
			|| strstr(pkg_res->name, ".SNR") || strstr(pkg_res->name, ".snr")) {
		u16 op;
		BYTE *p;
		unsigned int i;

		op = ((WORD *)pkg_res->raw_data)[2];			
		p = (BYTE *)pkg_res->raw_data + 8;
		if (op == 0xce89) {
			u8 xor = ((BYTE *)pkg_res->raw_data)[6];
			for (i = 0; i < pkg_res->raw_data_length - 8; i++)
				p[i] ^= xor;
		} else if (op == 0xd197) {
			for (i = 0; i < pkg_res->raw_data_length - 8; i++)
				p[i] = ~p[i];
		} else if (op == 0x9795) {
			for (i = 0; i < pkg_res->raw_data_length - 8; i++)
				p[i] = p[i] << 6 | p[i] >> 2;			
		}
		pkg_res->flags |= PKG_RES_FLAG_REEXT;
		pkg_res->replace_extension = _T(".ISF");
	}

	return 0;
}

/* 资源保存函数 */
static int IkuraGDL_save_resource(struct resource *res, 
								  struct package_resource *pkg_res)
{
	if (res->rio->create(res))
		return -CUI_ECREATE;

	if (pkg_res->actual_data && pkg_res->actual_data_length) {
		if (res->rio->write(res, pkg_res->actual_data, pkg_res->actual_data_length)) {
			res->rio->close(res);
			return -CUI_EWRITE;
		}
	} else if (pkg_res->raw_data && pkg_res->raw_data_length) {
		if (res->rio->write(res, pkg_res->raw_data, pkg_res->raw_data_length)) {
			res->rio->close(res);
			return -CUI_EWRITE;
		}
	}

	res->rio->close(res);
	
	return 0;
}

/* 封包资源释放函数 */
static void IkuraGDL_release_resource(struct package *pkg, 
									  struct package_resource *pkg_res)
{
	if (pkg_res->actual_data) {
		free(pkg_res->actual_data);
		pkg_res->actual_data = NULL;
	}
	if (pkg_res->raw_data) {
		free(pkg_res->raw_data);
		pkg_res->raw_data = NULL;
	}
}

/* 封包卸载函数 */
static void IkuraGDL_release(struct package *pkg, 
							 struct package_directory *pkg_dir)
{
	if (pkg_dir->directory) {
		free(pkg_dir->directory);
		pkg_dir->directory = NULL;
	}

	pkg->pio->close(pkg);
}

/* 封包处理回调函数集合 */
static cui_ext_operation IkuraGDL_operation = {
	IkuraGDL_match,					/* match */
	IkuraGDL_extract_directory,		/* extract_directory */
	IkuraGDL_parse_resource_info,	/* parse_resource_info */
	IkuraGDL_extract_resource,		/* extract_resource */
	IkuraGDL_save_resource,			/* save_resource */
	IkuraGDL_release_resource,		/* release_resource */
	IkuraGDL_release				/* release */
};

/********************* *********************/

/* 封包匹配回调函数 */
static int IkuraGDL_match2(struct package *pkg)
{
	u16 index_length;
	DWORD index_entries;
	IkuraGDL_entry2_t *index_buffer;

	if (pkg->pio->open(pkg, IO_READONLY))
		return -CUI_EOPEN;

	if (pkg->pio->read(pkg, &index_length, 2)) {
		pkg->pio->close(pkg);
		return -CUI_EREAD;
	}

	index_buffer = (IkuraGDL_entry2_t *)malloc(index_length);
	if (!index_buffer) {
		pkg->pio->close(pkg);
		return -CUI_EMEM;
	}

	if (pkg->pio->read(pkg, index_buffer, index_length)) {
		free(index_buffer);
		pkg->pio->close(pkg);
		return -CUI_EREAD;
	}

	index_entries = index_length / sizeof(IkuraGDL_entry2_t);
	if (index_length != index_buffer->offset - 2) {
		free(index_buffer);
		pkg->pio->close(pkg);
		return -CUI_EMATCH;
	}

	for (DWORD i = 0; i < index_entries; i++) {
		if (pkg->pio->seek(pkg, index_buffer[i].offset, IO_SEEK_SET))
			break;
	}
	free(index_buffer);
	if (i != index_entries) {
		pkg->pio->close(pkg);
		return -CUI_ESEEK;
	}

	return 0;	
}

/* 封包索引目录提取函数 */
static int IkuraGDL_extract_directory2(struct package *pkg,
									   struct package_directory *pkg_dir)
{
	IkuraGDL_header2_t IkuraGDL_header2;
	IkuraGDL_entry2_t *index_buffer;
	my_IkuraGDL_entry2_t *my_index_buffer;
	DWORD my_index_length, index_entries;	
	u32 fsize;

	if (pkg->pio->length_of(pkg, &fsize))
		return -CUI_ELEN;

	if (pkg->pio->readvec(pkg, &IkuraGDL_header2, sizeof(IkuraGDL_header2), 0, IO_SEEK_SET))
		return -CUI_EREADVEC;

	index_buffer = (IkuraGDL_entry2_t *)malloc(IkuraGDL_header2.index_length);
	if (!index_buffer)
		return -CUI_EMEM;

	if (pkg->pio->read(pkg, index_buffer, IkuraGDL_header2.index_length)) {
		free(index_buffer);
		return -CUI_EREAD;
	}

	index_entries = IkuraGDL_header2.index_length / sizeof(IkuraGDL_entry2_t);
	my_index_length = index_entries * sizeof(my_IkuraGDL_entry2_t);
	my_index_buffer = (my_IkuraGDL_entry2_t *)malloc(my_index_length);
	if (!my_index_buffer) {
		free(index_buffer);
		return -CUI_EMEM;
	}
	memset(my_index_buffer, 0, my_index_length);

	for (DWORD i = 0; i < index_entries; i++) {		
		strncpy(my_index_buffer[i].name, index_buffer[i].name, sizeof(index_buffer[i].name));
		my_index_buffer[i].offset = index_buffer[i].offset;
	}

	for (i = 0; i < index_entries; i++)		
		my_index_buffer[i].length = index_buffer[i + 1].offset - index_buffer[i].offset;

	free(index_buffer);

	/* 最后一项是伪项 */
	pkg_dir->index_entries = index_entries - 1;
	pkg_dir->directory = my_index_buffer;
	pkg_dir->directory_length = my_index_length - sizeof(my_IkuraGDL_entry2_t);
	pkg_dir->index_entry_length = sizeof(my_IkuraGDL_entry2_t);

	return 0;
}

static int IkuraGDL_parse_resource_info2(struct package *pkg,
										 struct package_resource *pkg_res)
{
	my_IkuraGDL_entry2_t *my_IkuraGDL_entry2;

	my_IkuraGDL_entry2 = (my_IkuraGDL_entry2_t *)pkg_res->actual_index_entry;
	strncpy(pkg_res->name, my_IkuraGDL_entry2->name, 12);
	pkg_res->name_length = strlen(pkg_res->name);			/* -1表示名称以NULL结尾 */
	pkg_res->raw_data_length = my_IkuraGDL_entry2->length;
	pkg_res->actual_data_length = 0;	/* 数据都是明文 */
	pkg_res->offset = my_IkuraGDL_entry2->offset;

	return 0;
}

/* 封包处理回调函数集合 */
static cui_ext_operation IkuraGDL_operation2 = {
	IkuraGDL_match2,				/* match */
	IkuraGDL_extract_directory2,	/* extract_directory */
	IkuraGDL_parse_resource_info2,	/* parse_resource_info */
	IkuraGDL_extract_resource,		/* extract_resource */
	IkuraGDL_save_resource,			/* save_resource */
	IkuraGDL_release_resource,		/* release_resource */
	IkuraGDL_release				/* release */
};

/* 接口函数: 向cui_core注册支持的封包类型 */
int CALLBACK IkuraGDL_register_cui(struct cui_register_callback *callback)
{
	const char *sec_num;
	int num;

	/* 注册cui插件支持的扩展名、资源放入扩展名、处理回调函数和封包属性 */
	if (callback->add_extension(callback->cui, NULL, NULL, 
		NULL, &IkuraGDL_operation, CUI_EXT_FLAG_PKG | CUI_EXT_FLAG_DIR | CUI_EXT_FLAG_NOEXT))
			return -1;

	if (callback->add_extension(callback->cui, NULL, NULL, 
		NULL, &IkuraGDL_operation2, CUI_EXT_FLAG_PKG | CUI_EXT_FLAG_DIR | CUI_EXT_FLAG_NOEXT | CUI_EXT_FLAG_WEAK_MAGIC))
			return -1;

	sec_num = get_options("SECRETFILTER");
	if (sec_num) {
		num = atoi(sec_num);
		if (num > MAX_SECRETFILTER)
			num = 0;
		else
			num--;

		isf_check_ok = isf_check_sum(secret_filter_code_table[num]);
		if (isf_check_ok)
			code_table = secret_filter_code_table[num];
	}
	return 0;
}
/* ISF文件解析：家族計画～そしてまた家族計画を～　お返しディスク
0042F35E  |.  8B46 14       MOV EAX,DWORD PTR DS:[ESI+14]
0042F361  |.  33DB          XOR EBX,EBX
0042F363  |.  66:8B48 04    MOV CX,WORD PTR DS:[EAX+4] 第一个字节
0042F367  |.  8A50 06       MOV DL,BYTE PTR DS:[EAX+6]
0042F36A  |.  8D78 08       LEA EDI,DWORD PTR DS:[EAX+8]
0042F36D  |.  33C0          XOR EAX,EAX
0042F36F  |.  8AE1          MOV AH,CL
0042F371  |.  8ADD          MOV BL,CH
0042F373  |.  25 FFFF0000   AND EAX,0FFFF
0042F378  |.  81E3 FF000000 AND EBX,0FF
0042F37E  |.  0BC3          OR EAX,EBX
0042F380  |.  3D 97950000   CMP EAX,9597
0042F385  |.  7F 5F         JG SHORT KA_MOOK.0042F3E6
0042F387  |.  74 39         JE SHORT KA_MOOK.0042F3C2
0042F389  |.  3D CE890000   CMP EAX,89CE
0042F38E  |.  74 16         JE SHORT KA_MOOK.0042F3A6
0042F390  |.  3D F78D0000   CMP EAX,8DF7
0042F395  |.  75 73         JNZ SHORT KA_MOOK.0042F40A
0042F397  |.  8B46 44       MOV EAX,DWORD PTR DS:[ESI+44]
0042F39A  |.  BB 01000000   MOV EBX,1
0042F39F  |.  C64430 31 01  MOV BYTE PTR DS:[EAX+ESI+31],1
0042F3A4  |.  EB 68         JMP SHORT KA_MOOK.0042F40E
0042F3A6  |>  8B4C24 10     MOV ECX,DWORD PTR SS:[ESP+10]
0042F3AA  |.  8D41 F8       LEA EAX,DWORD PTR DS:[ECX-8]
0042F3AD  |.  85C0          TEST EAX,EAX
0042F3AF  |.  7E 0A         JLE SHORT KA_MOOK.0042F3BB
0042F3B1  |>  8A0F          /MOV CL,BYTE PTR DS:[EDI]
0042F3B3  |.  32CA          |XOR CL,DL
0042F3B5  |.  880F          |MOV BYTE PTR DS:[EDI],CL
0042F3B7  |.  47            |INC EDI
0042F3B8  |.  48            |DEC EAX
0042F3B9  |.^ 75 F6         \JNZ SHORT KA_MOOK.0042F3B1
0042F3BB  |>  BB 01000000   MOV EBX,1
0042F3C0  |.  EB 4C         JMP SHORT KA_MOOK.0042F40E
0042F3C2  |>  8B5424 10     MOV EDX,DWORD PTR SS:[ESP+10]
0042F3C6  |.  8D4A F8       LEA ECX,DWORD PTR DS:[EDX-8]
0042F3C9  |.  85C9          TEST ECX,ECX
0042F3CB  |.  7E 12         JLE SHORT KA_MOOK.0042F3DF
0042F3CD  |>  8A07          /MOV AL,BYTE PTR DS:[EDI]
0042F3CF  |.  8AD0          |MOV DL,AL
0042F3D1  |.  C0E2 06       |SHL DL,6
0042F3D4  |.  C0E8 02       |SHR AL,2
0042F3D7  |.  0AD0          |OR DL,AL
0042F3D9  |.  8817          |MOV BYTE PTR DS:[EDI],DL
0042F3DB  |.  47            |INC EDI
0042F3DC  |.  49            |DEC ECX
0042F3DD  |.^ 75 EE         \JNZ SHORT KA_MOOK.0042F3CD
0042F3DF  |>  BB 01000000   MOV EBX,1
0042F3E4  |.  EB 28         JMP SHORT KA_MOOK.0042F40E
0042F3E6  |>  3D D1970000   CMP EAX,97D1
0042F3EB  |.  75 1D         JNZ SHORT KA_MOOK.0042F40A
0042F3ED  |.  8B4424 10     MOV EAX,DWORD PTR SS:[ESP+10]
0042F3F1  |.  83C0 F8       ADD EAX,-8
0042F3F4  |.  85C0          TEST EAX,EAX
0042F3F6  |.  7E 0B         JLE SHORT KA_MOOK.0042F403
0042F3F8  |>  8A0F          /MOV CL,BYTE PTR DS:[EDI]
0042F3FA  |.  47            |INC EDI
0042F3FB  |.  F6D1          |NOT CL
0042F3FD  |.  884F FF       |MOV BYTE PTR DS:[EDI-1],CL
0042F400  |.  48            |DEC EAX
0042F401  |.^ 75 F5         \JNZ SHORT KA_MOOK.0042F3F8
0042F403  |>  BB 01000000   MOV EBX,1
0042F408  |.  EB 04         JMP SHORT KA_MOOK.0042F40E
0042F40A  |>  8B5C24 14     MOV EBX,DWORD PTR SS:[ESP+14]
0042F40E  |>  8B56 44       MOV EDX,DWORD PTR DS:[ESI+44]
0042F411  |.  8A4432 31     MOV AL,BYTE PTR DS:[EDX+ESI+31]
0042F415  |.  3C 01         CMP AL,1
0042F417  |.  75 24         JNZ SHORT KA_MOOK.0042F43D
0042F419  |.  8B0D C0294700 MOV ECX,DWORD PTR DS:[4729C0]
0042F41F  |.  6A 10         PUSH 10
0042F421  |.  68 48DA4600   PUSH KA_MOOK.0046DA48
0042F426  |.  E8 C587FFFF   CALL KA_MOOK.00427BF0
0042F42B  |.  C706 01000000 MOV DWORD PTR DS:[ESI],1
0042F431  |.  5F            POP EDI
0042F432  |.  5E            POP ESI
0042F433  |.  5D            POP EBP
0042F434  |.  33C0          XOR EAX,EAX
0042F436  |.  5B            POP EBX
0042F437  |.  83C4 08       ADD ESP,8
0042F43A  |.  C2 0400       RETN 4
0042F43D  |>  85DB          TEST EBX,EBX
0042F43F  |.  0F84 F2000000 JE KA_MOOK.0042F537
0042F445  |.  8B4E 14       MOV ECX,DWORD PTR DS:[ESI+14]
0042F448  |.  84C0          TEST AL,AL
0042F44A  |.  8B01          MOV EAX,DWORD PTR DS:[ECX]
0042F44C  |.  75 13         JNZ SHORT KA_MOOK.0042F461
0042F44E  |.  83E8 08       SUB EAX,8
0042F451  |.  8D69 08       LEA EBP,DWORD PTR DS:[ECX+8]
0042F454  |.  99            CDQ
0042F455  |.  83E2 03       AND EDX,3
0042F458  |.  03C2          ADD EAX,EDX
0042F45A  |.  8BF8          MOV EDI,EAX
0042F45C  |.  C1FF 02       SAR EDI,2
0042F45F  |.  EB 11         JMP SHORT KA_MOOK.0042F472
0042F461  |>  83E8 10       SUB EAX,10
0042F464  |.  8D69 10       LEA EBP,DWORD PTR DS:[ECX+10]
0042F467  |.  99            CDQ
0042F468  |.  83E2 03       AND EDX,3
0042F46B  |.  03C2          ADD EAX,EDX
0042F46D  |.  8BF8          MOV EDI,EAX
0042F46F  |.  C1FF 02       SAR EDI,2
0042F472  |>  8B46 10       MOV EAX,DWORD PTR DS:[ESI+10]
0042F475  |.  85C0          TEST EAX,EAX
0042F477  |.  74 0E         JE SHORT KA_MOOK.0042F487
0042F479  |.  50            PUSH EAX                                 ; /hMem
0042F47A  |.  FF15 04F34500 CALL DWORD PTR DS:[<&KERNEL32.GlobalFree>; \GlobalFree
0042F480  |.  C746 10 00000>MOV DWORD PTR DS:[ESI+10],0
0042F487  |>  8D04BD 000000>LEA EAX,DWORD PTR DS:[EDI*4]
0042F48E  |.  50            PUSH EAX                                 ; /MemSize
0042F48F  |.  6A 40         PUSH 40                                  ; |Flags = GPTR
0042F491  |.  FF15 0CF34500 CALL DWORD PTR DS:[<&KERNEL32.GlobalAllo>; \GlobalAlloc
0042F497  |.  85C0          TEST EAX,EAX
0042F499  |.  8946 10       MOV DWORD PTR DS:[ESI+10],EAX
0042F49C  |.  75 10         JNZ SHORT KA_MOOK.0042F4AE
0042F49E  |.  C706 01000000 MOV DWORD PTR DS:[ESI],1
0042F4A4  |.  5F            POP EDI
0042F4A5  |.  5E            POP ESI
0042F4A6  |.  5D            POP EBP
0042F4A7  |.  5B            POP EBX
0042F4A8  |.  83C4 08       ADD ESP,8
0042F4AB  |.  C2 0400       RETN 4
0042F4AE  |>  33C0          XOR EAX,EAX
0042F4B0  |.  85FF          TEST EDI,EDI
0042F4B2  |.  7E 16         JLE SHORT KA_MOOK.0042F4CA
0042F4B4  |>  8B4E 14       /MOV ECX,DWORD PTR DS:[ESI+14]
0042F4B7  |.  8B55 00       |MOV EDX,DWORD PTR SS:[EBP]
0042F4BA  |.  03CA          |ADD ECX,EDX
0042F4BC  |.  8B56 10       |MOV EDX,DWORD PTR DS:[ESI+10]
0042F4BF  |.  83C5 04       |ADD EBP,4
0042F4C2  |.  890C82        |MOV DWORD PTR DS:[EDX+EAX*4],ECX
0042F4C5  |.  40            |INC EAX
0042F4C6  |.  3BC7          |CMP EAX,EDI
0042F4C8  |.^ 7C EA         \JL SHORT KA_MOOK.0042F4B4
0042F4CA  |>  8B46 44       MOV EAX,DWORD PTR DS:[ESI+44]
0042F4CD  |.  8A4C30 31     MOV CL,BYTE PTR DS:[EAX+ESI+31]
0042F4D1  |.  84C9          TEST CL,CL
0042F4D3  |.  75 09         JNZ SHORT KA_MOOK.0042F4DE
0042F4D5  |.  8D3CBD 080000>LEA EDI,DWORD PTR DS:[EDI*4+8]
0042F4DC  |.  EB 07         JMP SHORT KA_MOOK.0042F4E5
0042F4DE  |>  8D3CBD 100000>LEA EDI,DWORD PTR DS:[EDI*4+10]
0042F4E5  |>  8B4424 10     MOV EAX,DWORD PTR SS:[ESP+10]
0042F4E9  |.  8B4E 14       MOV ECX,DWORD PTR DS:[ESI+14]
0042F4EC  |.  2BC7          SUB EAX,EDI
0042F4EE  |.  83C0 03       ADD EAX,3
0042F4F1  |.  99            CDQ
0042F4F2  |.  83E2 03       AND EDX,3
0042F4F5  |.  03C2          ADD EAX,EDX
0042F4F7  |.  8D1439        LEA EDX,DWORD PTR DS:[ECX+EDI]
0042F4FA  |.  C1F8 02       SAR EAX,2
0042F4FD  |.  85C0          TEST EAX,EAX
0042F4FF  |.  7E 0D         JLE SHORT KA_MOOK.0042F50E
0042F501  |>  8B3A          /MOV EDI,DWORD PTR DS:[EDX]
0042F503  |.  83C2 04       |ADD EDX,4
0042F506  |.  8939          |MOV DWORD PTR DS:[ECX],EDI
0042F508  |.  83C1 04       |ADD ECX,4
0042F50B  |.  48            |DEC EAX
0042F50C  |.^ 75 F3         \JNZ SHORT KA_MOOK.0042F501
0042F50E  |>  8B4E 14       MOV ECX,DWORD PTR DS:[ESI+14]
0042F511  |.  8B5424 1C     MOV EDX,DWORD PTR SS:[ESP+1C]
0042F515  |.  894E 18       MOV DWORD PTR DS:[ESI+18],ECX
0042F518  |.  6A 09         PUSH 9
0042F51A  |.  83C6 24       ADD ESI,24
0042F51D  |.  52            PUSH EDX
0042F51E  |.  56            PUSH ESI
0042F51F  |.  E8 DC710100   CALL KA_MOOK.00446700
0042F524  |.  A1 C0294700   MOV EAX,DWORD PTR DS:[4729C0]
0042F529  |.  83C4 0C       ADD ESP,0C
0042F52C  |.  8B88 28080000 MOV ECX,DWORD PTR DS:[EAX+828]
0042F532  |.  E8 B91C0100   CALL KA_MOOK.004411F0
0042F537  |>  5F            POP EDI
0042F538  |.  5E            POP ESI
0042F539  |.  8BC3          MOV EAX,EBX
0042F53B  |.  5D            POP EBP
0042F53C  |.  5B            POP EBX
0042F53D  |.  83C4 08       ADD ESP,8
0042F540  \.  C2 0400       RETN 4
*/

/* 加密的isf解析
0044B560  |.  66:8B48 04    MOV CX,WORD PTR DS:[EAX+4]
0044B564  |.  8A50 06       MOV DL,BYTE PTR DS:[EAX+6]
0044B567  |.  8D78 08       LEA EDI,DWORD PTR DS:[EAX+8]
0044B56A  |.  33C0          XOR EAX,EAX
0044B56C  |.  8AE1          MOV AH,CL
0044B56E  |.  8ADD          MOV BL,CH
0044B570  |.  25 FFFF0000   AND EAX,0FFFF
0044B575  |.  81E3 FF000000 AND EBX,0FF
0044B57B  |.  0BC3          OR EAX,EBX
0044B57D  |.  3D 97950000   CMP EAX,9597
0044B582  |.  7F 58         JG SHORT MUSU.0044B5DC
0044B584  |.  74 37         JE SHORT MUSU.0044B5BD
0044B586  |.  3D CE890000   CMP EAX,89CE
0044B58B  |.  74 19         JE SHORT MUSU.0044B5A6
0044B58D  |.  3D F78D0000   CMP EAX,8DF7
0044B592  |.  75 6D         JNZ SHORT MUSU.0044B601
0044B594  |.  8B4E 44       MOV ECX,DWORD PTR DS:[ESI+44]
0044B597  |.  B8 01000000   MOV EAX,1
0044B59C  |.  894424 10     MOV DWORD PTR SS:[ESP+10],EAX
0044B5A0  |.  884431 31     MOV BYTE PTR DS:[ECX+ESI+31],AL
0044B5A4  |.  EB 5B         JMP SHORT MUSU.0044B601
0044B5A6  |>  8B4424 14     MOV EAX,DWORD PTR SS:[ESP+14]
0044B5AA  |.  83C0 F8       ADD EAX,-8
0044B5AD  |.  85C0          TEST EAX,EAX
0044B5AF  |.  7E 48         JLE SHORT MUSU.0044B5F9
0044B5B1  |>  8A0F          /MOV CL,BYTE PTR DS:[EDI]
0044B5B3  |.  32CA          |XOR CL,DL
0044B5B5  |.  880F          |MOV BYTE PTR DS:[EDI],CL
0044B5B7  |.  47            |INC EDI
0044B5B8  |.  48            |DEC EAX
0044B5B9  |.^ 75 F6         \JNZ SHORT MUSU.0044B5B1
0044B5BB  |.  EB 3C         JMP SHORT MUSU.0044B5F9
0044B5BD  |>  8B4C24 14     MOV ECX,DWORD PTR SS:[ESP+14]
0044B5C1  |.  83C1 F8       ADD ECX,-8
0044B5C4  |.  85C9          TEST ECX,ECX
0044B5C6  |.  7E 31         JLE SHORT MUSU.0044B5F9
0044B5C8  |>  8A07          /MOV AL,BYTE PTR DS:[EDI]
0044B5CA  |.  8AD0          |MOV DL,AL
0044B5CC  |.  C0E2 06       |SHL DL,6
0044B5CF  |.  C0E8 02       |SHR AL,2
0044B5D2  |.  0AD0          |OR DL,AL
0044B5D4  |.  8817          |MOV BYTE PTR DS:[EDI],DL
0044B5D6  |.  47            |INC EDI
0044B5D7  |.  49            |DEC ECX
0044B5D8  |.^ 75 EE         \JNZ SHORT MUSU.0044B5C8
0044B5DA  |.  EB 1D         JMP SHORT MUSU.0044B5F9
0044B5DC  |>  3D D1970000   CMP EAX,97D1
0044B5E1  |.  75 1E         JNZ SHORT MUSU.0044B601
0044B5E3  |.  8B4424 14     MOV EAX,DWORD PTR SS:[ESP+14]
0044B5E7  |.  83C0 F8       ADD EAX,-8
0044B5EA  |.  85C0          TEST EAX,EAX
0044B5EC  |.  7E 0B         JLE SHORT MUSU.0044B5F9
0044B5EE  |>  8A0F          /MOV CL,BYTE PTR DS:[EDI]
0044B5F0  |.  47            |INC EDI
0044B5F1  |.  F6D1          |NOT CL
0044B5F3  |.  884F FF       |MOV BYTE PTR DS:[EDI-1],CL
0044B5F6  |.  48            |DEC EAX
0044B5F7  |.^ 75 F5         \JNZ SHORT MUSU.0044B5EE
0044B5F9  |>  C74424 10 010>MOV DWORD PTR SS:[ESP+10],1
0044B601  |>  8B56 44       MOV EDX,DWORD PTR DS:[ESI+44]
0044B604  |.  8A4432 31     MOV AL,BYTE PTR DS:[EDX+ESI+31]
0044B608  |.  3C 01         CMP AL,1
0044B60A  |.  75 2E         JNZ SHORT MUSU.0044B63A
0044B60C  |.  8B0D 74DC4D00 MOV ECX,DWORD PTR DS:[4DDC74]
0044B612  |.  6A 10         PUSH 10
0044B614  |.  68 6C704A00   PUSH MUSU.004A706C
0044B619  |.  E8 32E30000   CALL MUSU.00459950
0044B61E  |.  C706 01000000 MOV DWORD PTR DS:[ESI],1
0044B624  |.  5F            POP EDI
0044B625  |.  C74424 0C 000>MOV DWORD PTR SS:[ESP+C],0
0044B62D  |.  5E            POP ESI
0044B62E  |.  8B4424 08     MOV EAX,DWORD PTR SS:[ESP+8]
0044B632  |.  5D            POP EBP
0044B633  |.  5B            POP EBX
0044B634  |.  83C4 08       ADD ESP,8
0044B637  |.  C2 0400       RETN 4
0044B63A  |>  8B4C24 10     MOV ECX,DWORD PTR SS:[ESP+10]
0044B63E  |.  33DB          XOR EBX,EBX
0044B640  |.  3BCB          CMP ECX,EBX
0044B642  |.  0F84 F2000000 JE MUSU.0044B73A
0044B648  |.  8B4E 14       MOV ECX,DWORD PTR DS:[ESI+14]
0044B64B  |.  3AC3          CMP AL,BL
0044B64D  |.  8B01          MOV EAX,DWORD PTR DS:[ECX]
0044B64F  |.  75 13         JNZ SHORT MUSU.0044B664
0044B651  |.  83E8 08       SUB EAX,8
0044B654  |.  8D69 08       LEA EBP,DWORD PTR DS:[ECX+8]
0044B657  |.  99            CDQ
0044B658  |.  83E2 03       AND EDX,3
0044B65B  |.  03C2          ADD EAX,EDX
0044B65D  |.  8BF8          MOV EDI,EAX
0044B65F  |.  C1FF 02       SAR EDI,2
0044B662  |.  EB 11         JMP SHORT MUSU.0044B675
0044B664  |>  83E8 10       SUB EAX,10
0044B667  |.  8D69 10       LEA EBP,DWORD PTR DS:[ECX+10]
0044B66A  |.  99            CDQ
0044B66B  |.  83E2 03       AND EDX,3
0044B66E  |.  03C2          ADD EAX,EDX
0044B670  |.  8BF8          MOV EDI,EAX
0044B672  |.  C1FF 02       SAR EDI,2
0044B675  |>  8B46 10       MOV EAX,DWORD PTR DS:[ESI+10]
0044B678  |.  3BC3          CMP EAX,EBX
0044B67A  |.  74 0A         JE SHORT MUSU.0044B686
0044B67C  |.  50            PUSH EAX                                 ; /hMem
0044B67D  |.  FF15 34734900 CALL DWORD PTR DS:[<&KERNEL32.GlobalFree>; \GlobalFree
0044B683  |.  895E 10       MOV DWORD PTR DS:[ESI+10],EBX
0044B686  |>  8D04BD 000000>LEA EAX,DWORD PTR DS:[EDI*4]
0044B68D  |.  50            PUSH EAX                                 ; /MemSize
0044B68E  |.  6A 40         PUSH 40                                  ; |Flags = GPTR
0044B690  |.  FF15 3C734900 CALL DWORD PTR DS:[<&KERNEL32.GlobalAllo>; \GlobalAlloc
0044B696  |.  3BC3          CMP EAX,EBX
0044B698  |.  8946 10       MOV DWORD PTR DS:[ESI+10],EAX
0044B69B  |.  75 16         JNZ SHORT MUSU.0044B6B3
0044B69D  |.  C706 01000000 MOV DWORD PTR DS:[ESI],1
0044B6A3  |.  5F            POP EDI
0044B6A4  |.  5E            POP ESI
0044B6A5  |.  895C24 08     MOV DWORD PTR SS:[ESP+8],EBX
0044B6A9  |.  8BC3          MOV EAX,EBX
0044B6AB  |.  5D            POP EBP
0044B6AC  |.  5B            POP EBX
0044B6AD  |.  83C4 08       ADD ESP,8
0044B6B0  |.  C2 0400       RETN 4
0044B6B3  |>  33C0          XOR EAX,EAX
0044B6B5  |.  3BFB          CMP EDI,EBX
0044B6B7  |.  7E 16         JLE SHORT MUSU.0044B6CF
0044B6B9  |>  8B4E 14       /MOV ECX,DWORD PTR DS:[ESI+14]
0044B6BC  |.  8B55 00       |MOV EDX,DWORD PTR SS:[EBP]
0044B6BF  |.  03CA          |ADD ECX,EDX
0044B6C1  |.  8B56 10       |MOV EDX,DWORD PTR DS:[ESI+10]
0044B6C4  |.  83C5 04       |ADD EBP,4
0044B6C7  |.  890C82        |MOV DWORD PTR DS:[EDX+EAX*4],ECX
0044B6CA  |.  40            |INC EAX
0044B6CB  |.  3BC7          |CMP EAX,EDI
0044B6CD  |.^ 7C EA         \JL SHORT MUSU.0044B6B9
0044B6CF  |>  8B46 44       MOV EAX,DWORD PTR DS:[ESI+44]
0044B6D2  |.  385C30 31     CMP BYTE PTR DS:[EAX+ESI+31],BL
0044B6D6  |.  75 09         JNZ SHORT MUSU.0044B6E1
0044B6D8  |.  8D3CBD 080000>LEA EDI,DWORD PTR DS:[EDI*4+8]
0044B6DF  |.  EB 07         JMP SHORT MUSU.0044B6E8
0044B6E1  |>  8D3CBD 100000>LEA EDI,DWORD PTR DS:[EDI*4+10]
0044B6E8  |>  8B4424 14     MOV EAX,DWORD PTR SS:[ESP+14]
0044B6EC  |.  8B4E 14       MOV ECX,DWORD PTR DS:[ESI+14]
0044B6EF  |.  2BC7          SUB EAX,EDI
0044B6F1  |.  83C0 03       ADD EAX,3
0044B6F4  |.  99            CDQ
0044B6F5  |.  83E2 03       AND EDX,3
0044B6F8  |.  03C2          ADD EAX,EDX
0044B6FA  |.  8D1439        LEA EDX,DWORD PTR DS:[ECX+EDI]
0044B6FD  |.  C1F8 02       SAR EAX,2
0044B700  |.  3BC3          CMP EAX,EBX
0044B702  |.  7E 0D         JLE SHORT MUSU.0044B711
0044B704  |>  8B3A          /MOV EDI,DWORD PTR DS:[EDX]
0044B706  |.  83C2 04       |ADD EDX,4
0044B709  |.  8939          |MOV DWORD PTR DS:[ECX],EDI
0044B70B  |.  83C1 04       |ADD ECX,4
0044B70E  |.  48            |DEC EAX
0044B70F  |.^ 75 F3         \JNZ SHORT MUSU.0044B704
0044B711  |>  8B4E 14       MOV ECX,DWORD PTR DS:[ESI+14]
0044B714  |.  8B5424 1C     MOV EDX,DWORD PTR SS:[ESP+1C]
0044B718  |.  894E 18       MOV DWORD PTR DS:[ESI+18],ECX
0044B71B  |.  6A 09         PUSH 9
0044B71D  |.  83C6 24       ADD ESI,24
0044B720  |.  52            PUSH EDX
0044B721  |.  56            PUSH ESI
0044B722  |.  E8 39030300   CALL MUSU.0047BA60
0044B727  |.  A1 74DC4D00   MOV EAX,DWORD PTR DS:[4DDC74]
0044B72C  |.  83C4 0C       ADD ESP,0C
0044B72F  |.  8B88 0C080000 MOV ECX,DWORD PTR DS:[EAX+80C]
0044B735  |.  E8 66B9FCFF   CALL MUSU.004170A0
0044B73A  |>  8B4424 10     MOV EAX,DWORD PTR SS:[ESP+10]
0044B73E  |.  5F            POP EDI
0044B73F  |.  5E            POP ESI
0044B740  |.  5D            POP EBP
0044B741  |.  5B            POP EBX
0044B742  |.  83C4 08       ADD ESP,8
0044B745  \.  C2 0400       RETN 4
*/



