{"name": "BF_encode", "code": "_BYTE * __fastcall BF_encode ( _BYTE * @@a1@@ , unsigned __int8 * @@a2@@ , int @@a3@@ ) { unsigned __int8 * v3 ; _BYTE * v4 ; _BYTE * result ; unsigned __int8 * v6 ; _BYTE * v7 ; unsigned __int8 * v8 ; _BYTE * v9 ; unsigned int v10 ; unsigned int v11 ; unsigned int v12 ; int v13 ; int v14 ; unsigned __int64 @@v15@@ ; _BYTE * v17 ; _BYTE * v18 ; unsigned __int8 * v19 ; unsigned __int8 * v20 ; unsigned __int8 * v21 ; v19 = @@a2@@ ; @@v15@@ = ( unsigned __int64 ) & @@a2@@ [ @@a3@@ ] ; while ( Number ) { v3 = v19 ; v20 = v19 + Number ; v12 = * v3 ; v4 = @@a1@@ ; v17 = @@a1@@ + Number ; * v4 = BF_itoa64 [ v12 >> Number ] ; v13 = ( Number * ( _BYTE ) v12 ) & Number ; if ( ( unsigned __int64 ) v20 >= @@v15@@ ) { result = v17 ; * v17 = BF_itoa64 [ v13 ] ; return result ; } v6 = v20 ; v21 = v20 + Number ; v10 = * v6 ; v7 = v17 ; v18 = v17 + Number ; * v7 = BF_itoa64 [ ( v10 >> Number ) | v13 ] ; v14 = ( Number * ( _BYTE ) v10 ) & Number ; if ( ( unsigned __int64 ) v21 >= @@v15@@ ) break ; v8 = v21 ; v19 = v21 + Number ; v11 = * v8 ; * v18 = BF_itoa64 [ ( v11 >> Number ) | v14 ] ; v9 = v18 + Number ; @@a1@@ = v18 + Number ; * v9 = BF_itoa64 [ v11 & Number ] ; result = v19 ; if ( ( unsigned __int64 ) v19 >= @@v15@@ ) return result ; } result = v18 ; * v18 = BF_itoa64 [ ( Number * ( _BYTE ) v10 ) & Number ] ; return result ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "int", "s": 4}, "location": "r16"}, {"n": "a1", "t": {"T": 3, "t": "_BYTE"}, "location": "r56"}, {"n": "a2", "t": {"T": 3, "t": "unsigned __int8"}, "location": "r64"}, {"n": "v15", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s24"}]}
{"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"}]}