{"name": "rpl_alloc_dag", "code": "char * __fastcall rpl_alloc_dag ( unsigned __int8 @@a1@@ ) { char * @@v2@@ ; char * @@s@@ ; @@v2@@ = ( char * ) rpl_get_instance ( @@a1@@ ) ; if ( ! @@v2@@ ) { @@v2@@ = rpl_alloc_instance ( @@a1@@ ) ; if ( ! @@v2@@ ) return Number L ; } for ( @@s@@ = @@v2@@ + Number ; @@s@@ < @@v2@@ + Number ; @@s@@ += Number ) { if ( ! @@s@@ [ Number ] ) { memset ( @@s@@ , Number , Number ) ; * ( ( _QWORD * ) @@s@@ + Number ) = @@s@@ + Number ; * ( ( _QWORD * ) @@s@@ + Number ) = Number L ; list_init ( * ( ( _QWORD * ) @@s@@ + Number ) ) ; @@s@@ [ Number ] = Number ; * ( ( _WORD * ) @@s@@ + Number ) = Number ; * ( ( _WORD * ) @@s@@ + Number ) = Number ; * ( ( _QWORD * ) @@s@@ + Number ) = @@v2@@ ; return @@s@@ ; } } rpl_free_instance ( @@v2@@ ) ; return Number L ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "unsigned __int8", "s": 1}, "location": "r56"}, {"n": "v2", "t": {"T": 3, "t": "char"}, "location": "s16"}, {"n": "s", "t": {"T": 3, "t": "char"}, "location": "s8"}]}
{"name": "rpl_set_root", "code": "__int64 __fastcall rpl_set_root ( unsigned __int8 @@a1@@ , _QWORD * @@a2@@ ) { __int64 @@v3@@ ; __int64 @@v4@@ ; _BYTE * v5 ; __int64 v6 ; char @@v7@@ ; @@v7@@ = Number ; v5 = get_dag ( @@a1@@ , @@a2@@ ) ; if ( v5 ) { @@v7@@ = v5 [ Number ] + Number ; if ( v5 == * ( _BYTE * * ) ( * ( ( _QWORD * ) v5 + Number ) + Number L ) ) * ( _QWORD * ) ( * ( ( _QWORD * ) v5 + Number ) + Number L ) = Number L ; rpl_free_dag ( v5 ) ; } v6 = rpl_alloc_dag ( @@a1@@ , @@a2@@ ) ; if ( ! v6 ) return Number L ; @@v4@@ = * ( _QWORD * ) ( v6 + Number ) ; * ( _BYTE * ) ( v6 + Number ) = @@v7@@ ; * ( _BYTE * ) ( v6 + Number ) = Number ; * ( _BYTE * ) ( v6 + Number ) = Number ; * ( _BYTE * ) ( @@v4@@ + Number ) = Number ; * ( _QWORD * ) ( @@v4@@ + Number ) = rpl_of_etx ; * ( _QWORD * ) ( v6 + Number ) = Number L ; @@v3@@ = @@a2@@ [ Number ] ; * ( _QWORD * ) v6 = * @@a2@@ ; * ( _QWORD * ) ( v6 + Number ) = @@v3@@ ; * ( _BYTE * ) ( @@v4@@ + Number ) = Number ; * ( _BYTE * ) ( @@v4@@ + Number ) = Number ; * ( _BYTE * ) ( @@v4@@ + Number ) = Number ; * ( _BYTE * ) ( @@v4@@ + Number ) = Number ; * ( _WORD * ) ( @@v4@@ + Number ) = Number ; * ( _WORD * ) ( @@v4@@ + Number ) = Number ; * ( _BYTE * ) ( @@v4@@ + Number ) = Number ; * ( _WORD * ) ( @@v4@@ + Number ) = Number ; * ( _WORD * ) ( v6 + Number ) = * ( _WORD * ) ( @@v4@@ + Number ) ; if ( v6 != * ( _QWORD * ) ( @@v4@@ + Number ) ) { if ( * ( _QWORD * ) ( @@v4@@ + Number ) ) { rpl_remove_routes ( * ( _QWORD * ) ( @@v4@@ + Number ) ) ; * ( _BYTE * ) ( * ( _QWORD * ) ( @@v4@@ + Number ) + Number L ) = Number ; } } * ( _QWORD * ) ( @@v4@@ + Number ) = v6 ; * ( _BYTE * ) ( @@v4@@ + Number ) = Number ; ( * ( void ( __fastcall * * ) ( __int64 ) ) ( * ( _QWORD * ) ( @@v4@@ + Number ) + Number L ) ) ( @@v4@@ ) ; default_instance = @@v4@@ ; rpl_reset_dio_timer ( @@v4@@ ) ; return v6 ; }", "source": [{"n": "v3", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r16"}, {"n": "a1", "t": {"T": 1, "n": "unsigned __int8", "s": 1}, "location": "r56"}, {"n": "a2", "t": {"T": 3, "t": "_QWORD"}, "location": "r64"}, {"n": "v7", "t": {"T": 1, "n": "char", "s": 1}, "location": "s1"}, {"n": "v4", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s24"}]} {"name": "rpl_alloc_instance", "code": "char * __fastcall rpl_alloc_instance ( char @@a1@@ ) { char * @@s@@ ; for ( @@s@@ = ( char * ) & instance_table ; @@s@@ < ( char * ) & instance_table + Number ; @@s@@ += Number ) { if ( ! @@s@@ [ Number ] ) { memset ( @@s@@ , Number , Number ) ; @@s@@ [ Number ] = @@a1@@ ; * ( ( _QWORD * ) @@s@@ + Number ) = Number L ; @@s@@ [ Number ] = Number ; return @@s@@ ; } } return Number L ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "char", "s": 1}, "location": "r56"}, {"n": "s", "t": {"T": 3, "t": "char"}, "location": "s8"}]} {"name": "rpl_free_instance", "code": "__int64 __fastcall rpl_free_instance ( __int64 @@a1@@ ) { __int64 @@result@@ ; unsigned __int64 @@i@@ ; for ( @@i@@ = @@a1@@ + Number ; @@i@@ < @@a1@@ + Number ; @@i@@ += Number L ) { if ( * ( _BYTE * ) ( @@i@@ + Number ) ) rpl_free_dag ( @@i@@ ) ; } rpl_set_default_route ( @@a1@@ , Number L ) ; ctimer_stop ( @@a1@@ + Number ) ; ctimer_stop ( @@a1@@ + Number ) ; if ( @@a1@@ == default_instance ) default_instance = Number L ; @@result@@ = @@a1@@ ; * ( _BYTE * ) ( @@a1@@ + Number ) = Number ; return @@result@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "result", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r8"}, {"n": "i", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]} {"name": "rpl_get_instance", "code": "__int64 __fastcall rpl_get_instance ( char @@a1@@ ) { int @@i@@ ; for ( @@i@@ = Number ; @@i@@ <= Number ; ++ @@i@@ ) { if ( * ( ( _BYTE * ) & unk_4238F1 + Number * @@i@@ ) && @@a1@@ == * ( ( _BYTE * ) & unk_4238F0 + Number * @@i@@ ) ) return Number L * @@i@@ + Number ; } return Number L ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "char", "s": 1}, "location": "r56"}, {"n": "i", "t": {"T": 1, "n": "int", "s": 4}, "location": "s4"}]} {"name": "rpl_join_instance", "code": "__int64 __fastcall rpl_join_instance ( _QWORD * @@a1@@ , __int64 @@a2@@ ) { __int64 @@result@@ ; __int64 @@v3@@ ; __int64 ( __fastcall * * @@v4@@ ) ( ) ; __int64 @@v5@@ ; __int64 @@v6@@ ; __int64 @@v7@@ ; @@result@@ = ( __int64 ) rpl_alloc_dag ( * ( _BYTE * ) ( @@a2@@ + Number ) ) ; @@v7@@ = @@result@@ ; if ( @@result@@ ) { @@v6@@ = * ( _QWORD * ) ( @@result@@ + Number ) ; @@v5@@ = rpl_add_parent ( @@result@@ , @@a2@@ , @@a1@@ ) ; if ( @@v5@@ ) { * ( _BYTE * ) ( @@v5@@ + Number ) = * ( _BYTE * ) ( @@a2@@ + Number ) ; @@v4@@ = rpl_find_of ( * ( _WORD * ) ( @@a2@@ + Number ) ) ; if ( @@v4@@ ) { if ( ( * ( _BYTE * ) ( @@a2@@ + Number ) & Number ) != Number ) check_prefix ( Number L , ( unsigned __int8 * ) ( @@a2@@ + Number ) ) ; * ( _BYTE * ) ( @@v7@@ + Number ) = Number ; * ( _BYTE * ) ( @@v7@@ + Number ) = * ( _BYTE * ) ( @@a2@@ + Number ) ; * ( _BYTE * ) ( @@v7@@ + Number ) = * ( _BYTE * ) ( @@a2@@ + Number ) ; * ( _BYTE * ) ( @@v7@@ + Number ) = * ( _BYTE * ) ( @@a2@@ + Number ) ; * ( _QWORD * ) ( @@v6@@ + Number ) = @@v4@@ ; * ( _BYTE * ) ( @@v6@@ + Number ) = * ( _BYTE * ) ( @@a2@@ + Number ) ; * ( _QWORD * ) ( @@v6@@ + Number ) = @@v7@@ ; * ( _BYTE * ) ( @@v6@@ + Number ) = Number ; * ( _WORD * ) ( @@v6@@ + Number ) = * ( _WORD * ) ( @@a2@@ + Number ) ; * ( _WORD * ) ( @@v6@@ + Number ) = * ( _WORD * ) ( @@a2@@ + Number ) ; * ( _BYTE * ) ( @@v6@@ + Number ) = * ( _BYTE * ) ( @@a2@@ + Number ) ; * ( _BYTE * ) ( @@v6@@ + Number ) = * ( _BYTE * ) ( @@a2@@ + Number ) ; * ( _BYTE * ) ( @@v6@@ + Number ) = * ( _BYTE * ) ( @@v6@@ + Number ) + * ( _BYTE * ) ( @@v6@@ + Number ) ; * ( _BYTE * ) ( @@v6@@ + Number ) = * ( _BYTE * ) ( @@a2@@ + Number ) ; * ( _BYTE * ) ( @@v6@@ + Number ) = * ( _BYTE * ) ( @@a2@@ + Number ) ; * ( _WORD * ) ( @@v6@@ + Number ) = * ( _WORD * ) ( @@a2@@ + Number ) ; @@v3@@ = * ( _QWORD * ) ( @@a2@@ + Number ) ; * ( _QWORD * ) @@v7@@ = * ( _QWORD * ) @@a2@@ ; * ( _QWORD * ) ( @@v7@@ + Number ) = @@v3@@ ; memcpy ( ( void * ) ( @@v7@@ + Number ) , ( const void * ) ( @@a2@@ + Number ) , Number ) ; * ( _QWORD * ) ( @@v7@@ + Number ) = @@v5@@ ; ( * ( void ( __fastcall * * ) ( __int64 ) ) ( * ( _QWORD * ) ( @@v6@@ + Number ) + Number L ) ) ( @@v6@@ ) ; * ( _WORD * ) ( @@v7@@ + Number ) = ( * ( __int64 ( __fastcall * * ) ( __int64 , _QWORD ) ) ( * ( _QWORD * ) ( @@v6@@ + Number ) + Number L ) ) ( @@v5@@ , Number L ) ; * ( _WORD * ) ( @@v7@@ + Number ) = * ( _WORD * ) ( @@v7@@ + Number ) ; if ( ! default_instance ) default_instance = @@v6@@ ; rpl_reset_dio_timer ( @@v6@@ ) ; rpl_set_default_route ( @@v6@@ , @@a1@@ ) ; @@result@@ = * ( unsigned __int8 * ) ( @@v6@@ + Number ) ; if ( ( _BYTE ) @@result@@ ) @@result@@ = rpl_schedule_dao ( @@v6@@ ) ; } else { rpl_remove_parent ( @@v7@@ , @@v5@@ ) ; @@result@@ = @@v6@@ ; * ( _BYTE * ) ( @@v6@@ + Number ) = Number ; } } else { @@result@@ = @@v6@@ ; * ( _BYTE * ) ( @@v6@@ + Number ) = Number ; } } return @@result@@ ; }", "source": [{"n": "v3", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r16"}, {"n": "a1", "t": {"T": 3, "t": "_QWORD"}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r64"}, {"n": "result", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r8"}, {"n": "v6", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s16"}, {"n": "v5", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s24"}, {"n": "v4", "t": {"T": 9, "n": "__int64 (__fastcall **)()"}, "location": "s32"}, {"n": "v7", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s8"}]} {"name": "rpl_add_dag", "code": "char * __fastcall rpl_add_dag ( _QWORD * @@a1@@ , __int64 @@a2@@ ) { char * @@result@@ ; __int64 @@v3@@ ; __int64 @@v4@@ ; __int64 @@v5@@ ; __int64 @@v6@@ ; __int64 @@v7@@ ; @@result@@ = rpl_alloc_dag ( * ( _BYTE * ) ( @@a2@@ + Number ) ) ; @@v6@@ = ( __int64 ) @@result@@ ; if ( @@result@@ ) { @@v5@@ = * ( ( _QWORD * ) @@result@@ + Number ) ; @@v4@@ = find_parent_dag ( @@v5@@ , @@a1@@ ) ; if ( @@v4@@ ) { @@v7@@ = ( __int64 ) rpl_find_parent ( @@v4@@ , @@a1@@ ) ; if ( @@v7@@ ) rpl_move_parent ( @@v4@@ , @@v6@@ , @@v7@@ ) ; } else { @@v7@@ = rpl_add_parent ( @@v6@@ , @@a2@@ , @@a1@@ ) ; if ( ! @@v7@@ ) { @@result@@ = ( char * ) @@v6@@ ; * ( _BYTE * ) ( @@v6@@ + Number ) = Number ; return @@result@@ ; } } if ( rpl_find_of ( * ( _WORD * ) ( @@a2@@ + Number ) ) == * ( __int64 ( __fastcall * * * ) ( ) ) ( @@v5@@ + Number ) && * ( _BYTE * ) ( @@v5@@ + Number ) == * ( _BYTE * ) ( @@a2@@ + Number ) && * ( _WORD * ) ( @@v5@@ + Number ) == * ( _WORD * ) ( @@a2@@ + Number ) && * ( _WORD * ) ( @@v5@@ + Number ) == * ( _WORD * ) ( @@a2@@ + Number ) && * ( _BYTE * ) ( @@v5@@ + Number ) == * ( _BYTE * ) ( @@a2@@ + Number ) && * ( _BYTE * ) ( @@v5@@ + Number ) == * ( _BYTE * ) ( @@a2@@ + Number ) && * ( _BYTE * ) ( @@v5@@ + Number ) == * ( _BYTE * ) ( @@a2@@ + Number ) && * ( _BYTE * ) ( @@v5@@ + Number ) == * ( _BYTE * ) ( @@a2@@ + Number ) && * ( _WORD * ) ( @@v5@@ + Number ) == * ( _WORD * ) ( @@a2@@ + Number ) ) { * ( _BYTE * ) ( @@v6@@ + Number ) = Number ; * ( _BYTE * ) ( @@v6@@ + Number ) = * ( _BYTE * ) ( @@a2@@ + Number ) ; * ( _BYTE * ) ( @@v6@@ + Number ) = * ( _BYTE * ) ( @@a2@@ + Number ) ; * ( _BYTE * ) ( @@v6@@ + Number ) = * ( _BYTE * ) ( @@a2@@ + Number ) ; @@v3@@ = * ( _QWORD * ) ( @@a2@@ + Number ) ; * ( _QWORD * ) @@v6@@ = * ( _QWORD * ) @@a2@@ ; * ( _QWORD * ) ( @@v6@@ + Number ) = @@v3@@ ; memcpy ( ( void * ) ( @@v6@@ + Number ) , ( const void * ) ( @@a2@@ + Number ) , Number ) ; * ( _QWORD * ) ( @@v6@@ + Number ) = @@v7@@ ; * ( _WORD * ) ( @@v6@@ + Number ) = ( * ( __int64 ( __fastcall * * ) ( __int64 , _QWORD ) ) ( * ( _QWORD * ) ( @@v5@@ + Number ) + Number L ) ) ( @@v7@@ , Number L ) ; * ( _WORD * ) ( @@v6@@ + Number ) = * ( _WORD * ) ( @@v6@@ + Number ) ; rpl_process_parent_event ( @@v5@@ , @@v7@@ ) ; @@result@@ = ( char * ) @@v7@@ ; * ( _BYTE * ) ( @@v7@@ + Number ) = * ( _BYTE * ) ( @@a2@@ + Number ) ; } else { rpl_remove_parent ( @@v6@@ , @@v7@@ ) ; @@result@@ = ( char * ) @@v6@@ ; * ( _BYTE * ) ( @@v6@@ + Number ) = Number ; } } return @@result@@ ; }", "source": [{"n": "v3", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r16"}, {"n": "a1", "t": {"T": 3, "t": "_QWORD"}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r64"}, {"n": "result", "t": {"T": 3, "t": "char"}, "location": "r8"}, {"n": "v6", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s16"}, {"n": "v5", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s24"}, {"n": "v4", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s32"}, {"n": "v7", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s8"}]} {"name": "list_init", "code": "_QWORD * __fastcall list_init ( _QWORD * @@a1@@ ) { _QWORD * @@result@@ ; @@result@@ = @@a1@@ ; * @@a1@@ = Number L ; return @@result@@ ; }", "source": [{"n": "a1", "t": {"T": 3, "t": "_QWORD"}, "location": "r56"}, {"n": "result", "t": {"T": 3, "t": "_QWORD"}, "location": "r8"}]}