{"name": "capture_current_time", "code": "unsigned __int64 __fastcall capture_current_time ( __int64 @@a1@@ ) { char @@v1@@ ; int @@v3@@ ; int @@v4@@ ; int @@v5@@ ; int @@v6@@ ; int @@v7@@ ; int @@v8@@ ; int @@v9@@ ; int @@v10@@ ; unsigned __int64 @@v11@@ ; @@v11@@ = __readfsqword ( Number ) ; qemu_get_timedate ( & @@v4@@ , ( unsigned int ) * ( _QWORD * ) ( @@a1@@ + Number ) ) ; * ( _BYTE * ) ( @@a1@@ + Number ) = to_bcd ( @@v4@@ ) ; * ( _BYTE * ) ( @@a1@@ + Number ) = to_bcd ( @@v5@@ ) ; if ( ( * ( _BYTE * ) ( @@a1@@ + Number ) & Number ) != Number ) { @@v3@@ = @@v6@@ ; if ( ! ( @@v6@@ % Number ) ) @@v3@@ = @@v6@@ + Number ; if ( @@v3@@ > Number ) @@v1@@ = to_bcd ( ( unsigned __int8 ) @@v3@@ - Number ) | Number ; else @@v1@@ = to_bcd ( @@v3@@ ) | Number ; * ( _BYTE * ) ( @@a1@@ + Number ) = @@v1@@ ; } else { * ( _BYTE * ) ( @@a1@@ + Number ) = to_bcd ( @@v6@@ ) ; } * ( _BYTE * ) ( @@a1@@ + Number ) = ( @@v10@@ + * ( unsigned __int8 * ) ( @@a1@@ + Number ) ) % Number + Number ; * ( _BYTE * ) ( @@a1@@ + Number ) = to_bcd ( @@v7@@ ) ; * ( _BYTE * ) ( @@a1@@ + Number ) = to_bcd ( ( unsigned __int8 ) @@v8@@ + Number ) ; * ( _BYTE * ) ( @@a1@@ + Number ) = to_bcd ( ( unsigned __int8 ) @@v9@@ - Number ) ; return __readfsqword ( Number ) ^ @@v11@@ ; }", "source": [{"n": "v1", "t": {"T": 1, "n": "char", "s": 1}, "location": "r16"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "v10", "t": {"T": 1, "n": "int", "s": 4}, "location": "s40"}, {"n": "v9", "t": {"T": 1, "n": "int", "s": 4}, "location": "s44"}, {"n": "v8", "t": {"T": 1, "n": "int", "s": 4}, "location": "s48"}, {"n": "v7", "t": {"T": 1, "n": "int", "s": 4}, "location": "s52"}, {"n": "v6", "t": {"T": 1, "n": "int", "s": 4}, "location": "s56"}, {"n": "v5", "t": {"T": 1, "n": "int", "s": 4}, "location": "s60"}, {"n": "v4", "t": {"T": 1, "n": "int", "s": 4}, "location": "s64"}, {"n": "v3", "t": {"T": 1, "n": "int", "s": 4}, "location": "s68"}, {"n": "v11", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]}
{"name": "to_bcd", "code": "__int64 __fastcall to_bcd ( unsigned __int8 @@a1@@ ) { int @@v1@@ ; int @@v2@@ ; @@v1@@ = Number * @@a1@@ ; LOWORD ( @@v1@@ ) = BYTE1 ( @@v1@@ ) ; @@v2@@ = @@v1@@ ; LOBYTE ( @@v2@@ ) = ( unsigned __int8 ) @@v1@@ >> Number ; return ( Number * ( @@a1@@ / Number ) ) | ( @@a1@@ - Number * @@v2@@ ) ; }", "source": [{"n": "v2", "t": {"T": 1, "n": "int", "s": 4}, "location": "r16"}, {"n": "a1", "t": {"T": 1, "n": "unsigned __int8", "s": 1}, "location": "r56"}, {"n": "v1", "t": {"T": 1, "n": "int", "s": 4}, "location": "r8"}]} {"name": "inc_regptr", "code": "unsigned __int64 __fastcall inc_regptr ( __int64 @@a1@@ ) { unsigned __int64 @@result@@ ; * ( _DWORD * ) ( @@a1@@ + Number ) = ( ( unsigned __int8 ) * ( _DWORD * ) ( @@a1@@ + Number ) + Number ) & Number ; @@result@@ = * ( unsigned int * ) ( @@a1@@ + Number ) ; if ( ! ( _DWORD ) @@result@@ ) @@result@@ = capture_current_time ( @@a1@@ ) ; return @@result@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "result", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "r8"}]} {"name": "ds1338_event", "code": "__int64 __fastcall ds1338_event ( __int64 @@a1@@ , int @@a2@@ ) { __int64 @@result@@ ; @@result@@ = object_dynamic_cast_assert ( @@a1@@ , String , String , Number L , String ) ; if ( ! @@a2@@ ) return capture_current_time ( @@result@@ ) ; if ( @@a2@@ == Number ) * ( _BYTE * ) ( @@result@@ + Number ) = Number ; return @@result@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "int", "s": 4}, "location": "r64"}, {"n": "result", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r8"}]}