{"name": "__crypt_blowfish", "code": "void * __fastcall _crypt_blowfish ( _BYTE * @@a1@@ , char * @@a2@@ , _BYTE * @@a3@@ ) { _BOOL4 v3 ; _BOOL4 v4 ; void * result ; char @@v6@@ [ Number ] ; int @@v7@@ [ Number ] ; char @@s2@@ [ Number ] ; int @@v9@@ ; _DWORD @@v10@@ [ Number ] ; char @@dest@@ [ Number ] ; char @@v12@@ [ Number ] ; _BYTE * @@v13@@ ; _BOOL4 @@v14@@ ; void * @@s1@@ ; _BYTE * @@v16@@ ; void * @@src@@ ; _BYTE * @@v18@@ ; @@v18@@ = & unk_1FF5 ; @@src@@ = String ; @@v16@@ = BF_crypt ( @@a1@@ , @@a2@@ , @@a3@@ , Number ) ; strcpy ( @@dest@@ , String ) ; if ( @@v16@@ ) @@dest@@ [ Number ] = @@a2@@ [ Number ] ; memset ( @@v12@@ , Number , Number ) ; @@v12@@ [ Number ] = Number ; @@s1@@ = BF_crypt ( @@v18@@ , @@dest@@ , @@v12@@ , Number ) ; v3 = @@s1@@ == @@v12@@ && ! memcmp ( @@s1@@ , @@dest@@ , Number ) && ! memcmp ( ( char * ) @@s1@@ + Number , & test_hash_1682 [ Number * ( @@dest@@ [ Number ] & Number ) ] , Number ) ; @@v14@@ = v3 ; @@v13@@ = byte_201D ; BF_set_key ( byte_201D , ( __int64 ) @@v6@@ , @@v7@@ , Number ) ; BF_set_key ( @@v13@@ , ( __int64 ) @@s2@@ , @@v10@@ , Number ) ; @@v7@@ [ Number ] ^= Number ; v4 = @@v14@@ && @@v7@@ [ Number ] == Number && @@v9@@ == Number && ! memcmp ( @@v6@@ , @@s2@@ , Number ) && ! memcmp ( @@v7@@ , @@v10@@ , Number ) ; @@v14@@ = v4 ; if ( v4 && @@v16@@ ) result = @@v16@@ ; else result = & unk_2029 ; return result ; }", "source": [{"n": "a3", "t": {"T": 3, "t": "_BYTE"}, "location": "r16"}, {"n": "a1", "t": {"T": 3, "t": "_BYTE"}, "location": "r56"}, {"n": "a2", "t": {"T": 3, "t": "char"}, "location": "r64"}, {"n": "v12", "t": {"T": 2, "n": 66, "s": 1, "t": "char"}, "location": "s122"}, {"n": "dest", "t": {"T": 2, "n": 30, "s": 1, "t": "char"}, "location": "s152"}, {"n": "v18", "t": {"T": 3, "t": "_BYTE"}, "location": "s16"}, {"n": "v10", "t": {"T": 2, "n": 20, "s": 4, "t": "_DWORD"}, "location": "s232"}, {"n": "src", "t": {"T": 3, "t": "void"}, "location": "s24"}, {"n": "v9", "t": {"T": 1, "n": "int", "s": 4}, "location": "s244"}, {"n": "s2", "t": {"T": 2, "n": 68, "s": 1, "t": "char"}, "location": "s312"}, {"n": "v16", "t": {"T": 3, "t": "_BYTE"}, "location": "s32"}, {"n": "v7", "t": {"T": 2, "n": 20, "s": 4, "t": "int"}, "location": "s392"}, {"n": "s1", "t": {"T": 3, "t": "void"}, "location": "s40"}, {"n": "v14", "t": {"T": 1, "n": "_BOOL4", "s": 4}, "location": "s44"}, {"n": "v6", "t": {"T": 2, "n": 80, "s": 1, "t": "char"}, "location": "s472"}, {"n": "v13", "t": {"T": 3, "t": "_BYTE"}, "location": "s56"}]}
{"name": "BF_set_key", "code": "_DWORD * __fastcall BF_set_key ( _BYTE * @@a1@@ , __int64 @@a2@@ , _DWORD * @@a3@@ , unsigned __int8 @@a4@@ ) { _DWORD * @@result@@ ; int @@v5@@ ; int @@v6@@ ; int @@v7@@ ; unsigned int @@v8@@ ; int @@v9@@ ; int @@v10@@ ; unsigned int @@j@@ ; unsigned int @@i@@ ; _BYTE * @@v13@@ ; @@v13@@ = @@a1@@ ; @@v8@@ = @@a4@@ & Number ; @@v7@@ = ( @@a4@@ << Number ) & Number ; @@v9@@ = Number ; @@v10@@ = Number ; for ( @@i@@ = Number ; @@i@@ <= Number ; ++ @@i@@ ) { @@v6@@ = Number ; @@v5@@ = Number ; for ( @@j@@ = Number ; @@j@@ <= Number ; ++ @@j@@ ) { @@v5@@ <<= Number ; @@v5@@ |= ( unsigned __int8 ) * @@v13@@ ; @@v6@@ <<= Number ; @@v6@@ |= ( char ) * @@v13@@ ; if ( @@j@@ ) @@v10@@ |= @@v6@@ & Number ; if ( * @@v13@@ ) ++ @@v13@@ ; else @@v13@@ = @@a1@@ ; } @@v9@@ |= @@v5@@ ^ @@v6@@ ; * ( _DWORD * ) ( @@a2@@ + Number L * @@i@@ ) = * ( & @@v5@@ + @@v8@@ ) ; @@a3@@ [ @@i@@ ] = BF_init_state [ @@i@@ ] ^ * ( & @@v5@@ + @@v8@@ ) ; } LOWORD ( @@v9@@ ) = HIWORD ( @@v9@@ ) | @@v9@@ ; @@v9@@ = ( unsigned __int16 ) @@v9@@ + Number ; @@v10@@ <<= Number ; @@v10@@ &= @@v7@@ & ~ @@v9@@ ; @@result@@ = @@a3@@ ; * @@a3@@ ^= @@v10@@ ; return @@result@@ ; }", "source": [{"n": "a3", "t": {"T": 3, "t": "_DWORD"}, "location": "r16"}, {"n": "a4", "t": {"T": 1, "n": "unsigned __int8", "s": 1}, "location": "r24"}, {"n": "a1", "t": {"T": 3, "t": "_BYTE"}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r64"}, {"n": "result", "t": {"T": 3, "t": "_DWORD"}, "location": "r8"}, {"n": "i", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s12"}, {"n": "j", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s16"}, {"n": "v10", "t": {"T": 1, "n": "int", "s": 4}, "location": "s20"}, {"n": "v9", "t": {"T": 1, "n": "int", "s": 4}, "location": "s24"}, {"n": "v8", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s28"}, {"n": "v7", "t": {"T": 1, "n": "int", "s": 4}, "location": "s32"}, {"n": "v6", "t": {"T": 1, "n": "int", "s": 4}, "location": "s36"}, {"n": "v5", "t": {"T": 1, "n": "int", "s": 4}, "location": "s40"}, {"n": "v13", "t": {"T": 3, "t": "_BYTE"}, "location": "s8"}]} {"name": "BF_crypt", "code": "_BYTE * __fastcall BF_crypt ( _BYTE * @@a1@@ , char * @@a2@@ , _BYTE * @@a3@@ , unsigned int @@a4@@ ) { unsigned int @@v6@@ ; unsigned int @@v7@@ ; unsigned int @@v8@@ [ Number ] ; int @@v9@@ ; int @@v10@@ ; _BYTE @@v11@@ [ Number ] ; _BYTE @@v12@@ [ Number ] ; unsigned int @@v13@@ ; unsigned int @@v14@@ ; unsigned int @@v15@@ ; unsigned int @@v16@@ ; unsigned int @@v17@@ ; unsigned int @@v18@@ ; unsigned int @@v19@@ ; unsigned int @@v20@@ ; unsigned int @@v21@@ ; int @@v22@@ ; unsigned int * @@i@@ ; unsigned int @@v24@@ ; int @@v25@@ ; int @@j@@ ; unsigned int @@v27@@ ; if ( * @@a2@@ != Number || @@a2@@ [ Number ] != Number || ( unsigned int ) ( @@a2@@ [ Number ] - Number ) > Number || ! flags_by_subtype_1637 [ @@a2@@ [ Number ] - Number ] || @@a2@@ [ Number ] != Number || ( unsigned int ) ( @@a2@@ [ Number ] - Number ) > Number || ( unsigned int ) ( @@a2@@ [ Number ] - Number ) > Number || @@a2@@ [ Number ] != Number ) { return Number L ; } @@v27@@ = Number << ( Number * ( @@a2@@ [ Number ] - Number ) + @@a2@@ [ Number ] - Number ) ; if ( @@v27@@ < @@a4@@ || ( unsigned int ) BF_decode ( & @@v13@@ , ( unsigned __int8 * ) @@a2@@ + Number , Number ) ) return Number L ; BF_swap ( & @@v13@@ , Number ) ; BF_set_key ( @@a1@@ , ( __int64 ) @@v12@@ , @@v8@@ , flags_by_subtype_1637 [ @@a2@@ [ Number ] - Number ] ) ; memcpy ( @@v11@@ , & unk_88 , sizeof ( @@v11@@ ) ) ; @@v25@@ = Number ; @@v24@@ = Number ; for ( @@i@@ = @@v8@@ ; ; @@i@@ += Number ) { @@v25@@ = BF_encrypt ( @@v8@@ , @@v25@@ ^ @@v13@@ , @@v24@@ ^ @@v14@@ , @@i@@ , ( unsigned __int64 ) @@i@@ ) ; @@v24@@ = @@i@@ [ Number ] ; @@i@@ += Number ; if ( @@i@@ >= ( unsigned int * ) @@v12@@ ) break ; @@v25@@ = BF_encrypt ( @@v8@@ , @@v25@@ ^ @@v15@@ , @@v24@@ ^ @@v16@@ , @@i@@ , ( unsigned __int64 ) @@i@@ ) ; @@v24@@ = @@i@@ [ Number ] ; } do { for ( @@j@@ = Number ; @@j@@ <= Number ; @@j@@ += Number ) { @@v8@@ [ @@j@@ ] ^= @@v8@@ [ @@j@@ + Number ] ; @@v8@@ [ @@j@@ + Number ] ^= @@v8@@ [ @@j@@ + Number ] ; } @@v22@@ = Number ; while ( Number ) { BF_encrypt ( @@v8@@ , Number , Number , @@v8@@ , ( unsigned __int64 ) @@v12@@ ) ; if ( @@v22@@ ) break ; @@v22@@ = Number ; @@v20@@ = @@v13@@ ; @@v19@@ = @@v14@@ ; @@v18@@ = @@v15@@ ; @@v17@@ = @@v16@@ ; for ( @@j@@ = Number ; @@j@@ <= Number ; @@j@@ += Number ) { @@v8@@ [ @@j@@ ] ^= @@v20@@ ; @@v8@@ [ @@j@@ + Number ] ^= @@v19@@ ; @@v8@@ [ @@j@@ + Number ] ^= @@v18@@ ; @@v8@@ [ @@j@@ + Number ] ^= @@v17@@ ; } @@v9@@ ^= @@v20@@ ; @@v10@@ ^= @@v19@@ ; } -- @@v27@@ ; } while ( @@v27@@ ) ; for ( @@j@@ = Number ; @@j@@ <= Number ; @@j@@ += Number ) { @@v21@@ = BF_magic_w [ @@j@@ ] ; @@v7@@ = BF_magic_w [ @@j@@ + Number ] ; @@v27@@ = Number ; do { @@v21@@ = BF_encrypt ( @@v8@@ , @@v21@@ , @@v7@@ , & @@v6@@ , ( unsigned __int64 ) & @@v6@@ ) ; -- @@v27@@ ; } while ( @@v27@@ ) ; @@v8@@ [ @@j@@ + Number ] = @@v21@@ ; @@v8@@ [ @@j@@ + Number ] = @@v7@@ ; } memcpy ( @@a3@@ , @@a2@@ , Number ) ; @@a3@@ [ Number ] = BF_itoa64 [ BF_atoi64 [ @@a2@@ [ Number ] - Number ] & Number ] ; BF_swap ( & @@v13@@ , Number ) ; BF_encode ( @@a3@@ + Number , ( unsigned __int8 * ) & @@v13@@ , Number ) ; @@a3@@ [ Number ] = Number ; return @@a3@@ ; }", "source": [{"n": "a3", "t": {"T": 3, "t": "_BYTE"}, "location": "r16"}, {"n": "a4", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r24"}, {"n": "a1", "t": {"T": 3, "t": "_BYTE"}, "location": "r56"}, {"n": "a2", "t": {"T": 3, "t": "char"}, "location": "r64"}, {"n": "v27", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s12"}, {"n": "j", "t": {"T": 1, "n": "int", "s": 4}, "location": "s16"}, {"n": "v12", "t": {"T": 2, "n": 72, "s": 1, "t": "_BYTE"}, "location": "s160"}, {"n": "v25", "t": {"T": 1, "n": "int", "s": 4}, "location": "s20"}, {"n": "v24", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s24"}, {"n": "i", "t": {"T": 3, "t": "unsigned int"}, "location": "s32"}, {"n": "v22", "t": {"T": 1, "n": "int", "s": 4}, "location": "s36"}, {"n": "v21", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s40"}, {"n": "v11", "t": {"T": 2, "n": 4096, "s": 1, "t": "_BYTE"}, "location": "s4256"}, {"n": "v10", "t": {"T": 1, "n": "int", "s": 4}, "location": "s4260"}, {"n": "v9", "t": {"T": 1, "n": "int", "s": 4}, "location": "s4264"}, {"n": "v8", "t": {"T": 2, "n": 16, "s": 4, "t": "unsigned int"}, "location": "s4328"}, {"n": "v7", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s4332"}, {"n": "v6", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s4336"}, {"n": "v20", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s44"}, {"n": "v19", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s48"}, {"n": "v18", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s52"}, {"n": "v17", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s56"}, {"n": "v16", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s76"}, {"n": "v15", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s80"}, {"n": "v14", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s84"}, {"n": "v13", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s88"}]}