{"name": "init_v4l2", "code": "__int64 __fastcall init_v4l2 ( int * @@a1@@ ) { _DWORD * @@s@@ ; int i ; int j ; * @@a1@@ = open ( * ( ( const char * * ) @@a1@@ + Number ) , Number ) ; if ( * @@a1@@ == Number ) { perror ( String ) ; return Number ; } memset ( @@a1@@ + Number , Number , Number ) ; if ( ( int ) xioctl ( * @@a1@@ , Number , ( __int64 ) ( @@a1@@ + Number ) ) < Number ) { fprintf ( stderr , String , * ( ( const char * * ) @@a1@@ + Number ) ) ; return Number ; } if ( ( @@a1@@ [ Number ] & Number ) == Number ) { fprintf ( stderr , String , * ( ( const char * * ) @@a1@@ + Number ) ) ; return Number ; } if ( @@a1@@ [ Number ] ) { if ( ( @@a1@@ [ Number ] & Number ) == Number ) { fprintf ( stderr , String , * ( ( const char * * ) @@a1@@ + Number ) ) ; return Number ; } } else if ( ( @@a1@@ [ Number ] & Number ) == Number ) { fprintf ( stderr , String , * ( ( const char * * ) @@a1@@ + Number ) ) ; return Number ; } memset ( @@a1@@ + Number , Number , Number ) ; @@a1@@ [ Number ] = Number ; @@a1@@ [ Number ] = @@a1@@ [ Number ] ; @@a1@@ [ Number ] = @@a1@@ [ Number ] ; @@a1@@ [ Number ] = @@a1@@ [ Number ] ; @@a1@@ [ Number ] = Number ; if ( ( int ) xioctl ( * @@a1@@ , Number , ( __int64 ) ( @@a1@@ + Number ) ) < Number ) { fprintf ( stderr , String , ( unsigned int ) @@a1@@ [ Number ] , ( unsigned int ) @@a1@@ [ Number ] , ( unsigned int ) @@a1@@ [ Number ] ) ; return Number ; } if ( @@a1@@ [ Number ] != @@a1@@ [ Number ] || @@a1@@ [ Number ] != @@a1@@ [ Number ] ) { fprintf ( stderr , String , ( unsigned int ) @@a1@@ [ Number ] , ( unsigned int ) @@a1@@ [ Number ] ) ; @@a1@@ [ Number ] = @@a1@@ [ Number ] ; @@a1@@ [ Number ] = @@a1@@ [ Number ] ; if ( @@a1@@ [ Number ] == @@a1@@ [ Number ] ) { @@a1@@ [ Number ] = @@a1@@ [ Number ] ; } else { if ( @@a1@@ [ Number ] == Number ) { fwrite ( String String , Number , Number , stderr ) ; return Number ; } if ( @@a1@@ [ Number ] == Number ) { fwrite ( String , Number , Number , stderr ) ; return Number ; } } } @@s@@ = calloc ( Number , Number ) ; memset ( @@s@@ , Number , Number ) ; * @@s@@ = Number ; @@s@@ [ Number ] = Number ; @@s@@ [ Number ] = @@a1@@ [ Number ] ; xioctl ( * @@a1@@ , Number , ( __int64 ) @@s@@ ) ; memset ( @@a1@@ + Number , Number , Number ) ; @@a1@@ [ Number ] = Number ; @@a1@@ [ Number ] = Number ; @@a1@@ [ Number ] = Number ; if ( ( int ) xioctl ( * @@a1@@ , Number , ( __int64 ) ( @@a1@@ + Number ) ) < Number ) { perror ( String ) ; return Number ; } for ( i = Number ; i <= Number ; ++ i ) { memset ( @@a1@@ + Number , Number , Number ) ; @@a1@@ [ Number ] = i ; @@a1@@ [ Number ] = Number ; @@a1@@ [ Number ] = Number ; if ( ( int ) xioctl ( * @@a1@@ , Number , ( __int64 ) ( @@a1@@ + Number ) ) < Number ) { perror ( String ) ; return Number ; } if ( debug ) fprintf ( stderr , String , ( unsigned int ) @@a1@@ [ Number ] , ( unsigned int ) @@a1@@ [ Number ] ) ; * ( _QWORD * ) & @@a1@@ [ Number * i + Number ] = mmap ( Number L , ( unsigned int ) @@a1@@ [ Number ] , Number , Number , * @@a1@@ , ( unsigned int ) @@a1@@ [ Number ] ) ; if ( * ( _QWORD * ) & @@a1@@ [ Number * i + Number ] == Number ) { perror ( String ) ; return Number ; } if ( debug ) fprintf ( stderr , String , * ( const void * * ) & @@a1@@ [ Number * i + Number ] ) ; } for ( j = Number ; j <= Number ; ++ j ) { memset ( @@a1@@ + Number , Number , Number ) ; @@a1@@ [ Number ] = j ; @@a1@@ [ Number ] = Number ; @@a1@@ [ Number ] = Number ; if ( ( int ) xioctl ( * @@a1@@ , Number , ( __int64 ) ( @@a1@@ + Number ) ) < Number ) { perror ( String ) ; return Number ; } } return Number L ; }", "source": [{"n": "a1", "t": {"T": 3, "t": "int"}, "location": "r56"}, {"n": "s", "t": {"T": 3, "t": "_DWORD"}, "location": "s16"}]}
{"name": "xioctl", "code": "__int64 __fastcall xioctl ( int @@a1@@ , unsigned int @@a2@@ , __int64 @@a3@@ ) { int * v4 ; char * v5 ; unsigned int @@v8@@ ; int @@v9@@ ; @@v9@@ = Number ; do { @@v8@@ = ioctl ( @@a1@@ , ( int ) @@a2@@ , @@a3@@ ) ; if ( ! @@v8@@ ) break ; if ( ! @@v9@@ -- ) break ; } while ( * _errno_location ( ) == Number || * _errno_location ( ) == Number || * _errno_location ( ) == Number ) ; if ( @@v8@@ && @@v9@@ <= Number ) { v4 = _errno_location ( ) ; v5 = strerror ( * v4 ) ; fprintf ( stderr , String , @@a2@@ , Number L , v5 ) ; } return @@v8@@ ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r16"}, {"n": "a1", "t": {"T": 1, "n": "int", "s": 4}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r64"}, {"n": "v9", "t": {"T": 1, "n": "int", "s": 4}, "location": "s4"}, {"n": "v8", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s8"}]} {"name": "init_videoIn", "code": "__int64 __fastcall init_videoIn ( __int64 @@a1@@ , const char * @@a2@@ , int @@a3@@ , int @@a4@@ , int @@a5@@ , int @@a6@@ , int @@a7@@ , __int64 @@a8@@ , int @@a9@@ ) { int v10 ; void * v11 ; __int64 v12 ; __int64 @@v13@@ ; int @@v18@@ [ Number ] ; int @@src@@ [ Number ] ; int @@v20@@ ; int @@v21@@ ; if ( ! @@a1@@ || ! @@a2@@ ) return Number ; if ( ! @@a3@@ || ! @@a4@@ ) return Number ; if ( @@a7@@ < Number || @@a7@@ > Number ) @@a7@@ = Number ; * ( _QWORD * ) ( @@a1@@ + Number ) = Number L ; * ( _QWORD * ) ( @@a1@@ + Number ) = Number L ; * ( _QWORD * ) ( @@a1@@ + Number ) = Number L ; * ( _QWORD * ) ( @@a1@@ + Number ) = calloc ( Number , Number ) ; * ( _QWORD * ) ( @@a1@@ + Number ) = calloc ( Number , Number ) ; * ( _QWORD * ) ( @@a1@@ + Number ) = calloc ( Number , Number ) ; snprintf ( * ( char * * ) ( @@a1@@ + Number ) , Number , String , @@a2@@ ) ; * ( _DWORD * ) ( @@a1@@ + Number ) = Number ; * ( _DWORD * ) ( @@a1@@ + Number ) = Number ; * ( _DWORD * ) ( @@a1@@ + Number ) = Number ; * ( _DWORD * ) ( @@a1@@ + Number ) = @@a3@@ ; * ( _DWORD * ) ( @@a1@@ + Number ) = @@a4@@ ; * ( _DWORD * ) ( @@a1@@ + Number ) = @@a5@@ ; * ( _DWORD * ) ( @@a1@@ + Number ) = @@a6@@ ; * ( _DWORD * ) ( @@a1@@ + Number ) = @@a7@@ ; if ( ( int ) init_v4l2 ( @@a1@@ ) >= Number ) { @@v20@@ = Number ; @@src@@ [ Number ] = Number ; if ( ! ( unsigned int ) xioctl ( * ( _DWORD * ) @@a1@@ , Number , ( __int64 ) & @@src@@ [ Number ] ) ) { @@src@@ [ Number ] = @@src@@ [ Number ] ; @@v20@@ = @@src@@ [ Number ] ; } * ( _QWORD * ) ( @@a8@@ + Number L * @@a9@@ + Number ) = Number L ; for ( * ( _DWORD * ) ( @@a8@@ + Number L * @@a9@@ + Number ) = Number ; ; ++ * ( _DWORD * ) ( @@a8@@ + Number L * @@a9@@ + Number ) ) { @@src@@ [ Number ] = * ( _DWORD * ) ( @@a8@@ + Number L * @@a9@@ + Number ) ; @@src@@ [ Number ] = Number ; if ( ( int ) xioctl ( * ( _DWORD * ) @@a1@@ , Number , ( __int64 ) @@src@@ ) < Number ) break ; if ( * ( _QWORD * ) ( @@a8@@ + Number L * @@a9@@ + Number ) ) v11 = realloc ( * ( void * * ) ( @@a8@@ + Number L * @@a9@@ + Number ) , Number L * ( * ( _DWORD * ) ( @@a8@@ + Number L * @@a9@@ + Number ) + Number ) ) ; else v11 = calloc ( Number , Number ) ; * ( _QWORD * ) ( @@a8@@ + Number L * @@a9@@ + Number ) = v11 ; if ( ! * ( _QWORD * ) ( @@a8@@ + Number L * @@a9@@ + Number ) ) return Number ; memcpy ( ( void * ) ( Number L * * ( int * ) ( @@a8@@ + Number L * @@a9@@ + Number ) + * ( _QWORD * ) ( @@a8@@ + Number L * @@a9@@ + Number ) ) , @@src@@ , Number ) ; if ( @@src@@ [ Number ] == @@a6@@ ) * ( _DWORD * ) ( @@a8@@ + Number L * @@a9@@ + Number ) = * ( _DWORD * ) ( @@a8@@ + Number L * @@a9@@ + Number ) ; @@v18@@ [ Number ] = * ( _DWORD * ) ( @@a8@@ + Number L * @@a9@@ + Number ) ; @@v18@@ [ Number ] = @@src@@ [ Number ] ; @@v21@@ = Number ; * ( _QWORD * ) ( * ( _QWORD * ) ( @@a8@@ + Number L * @@a9@@ + Number ) + Number L * * ( int * ) ( @@a8@@ + Number L * @@a9@@ + Number ) + Number ) = Number L ; * ( _DWORD * ) ( * ( _QWORD * ) ( @@a8@@ + Number L * @@a9@@ + Number ) + Number L * * ( int * ) ( @@a8@@ + Number L * @@a9@@ + Number ) + Number ) = Number ; * ( _BYTE * ) ( * ( _QWORD * ) ( @@a8@@ + Number L * @@a9@@ + Number ) + Number L * * ( int * ) ( @@a8@@ + Number L * @@a9@@ + Number ) + Number ) = Number ; while ( Number ) { @@v18@@ [ Number ] = @@v21@@ ++ ; if ( ( unsigned int ) xioctl ( * ( _DWORD * ) @@a1@@ , Number , ( __int64 ) @@v18@@ ) ) break ; v12 = * ( _QWORD * ) ( @@a8@@ + Number L * @@a9@@ + Number ) + Number L * * ( int * ) ( @@a8@@ + Number L * @@a9@@ + Number ) ; ++ * ( _DWORD * ) ( v12 + Number ) ; @@v13@@ = * ( _QWORD * ) ( @@a8@@ + Number L * @@a9@@ + Number ) + Number L * * ( int * ) ( @@a8@@ + Number L * @@a9@@ + Number ) ; if ( * ( _QWORD * ) ( @@v13@@ + Number ) ) * ( _QWORD * ) ( @@v13@@ + Number ) = realloc ( * ( void * * ) ( * ( _QWORD * ) ( @@a8@@ + Number L * @@a9@@ + Number ) + Number L * * ( int * ) ( @@a8@@ + Number L * @@a9@@ + Number ) + Number ) , Number L * @@v21@@ ) ; else * ( _QWORD * ) ( @@v13@@ + Number ) = calloc ( Number , Number ) ; if ( ! * ( _QWORD * ) ( * ( _QWORD * ) ( @@a8@@ + Number L * @@a9@@ + Number ) + Number L * * ( int * ) ( @@a8@@ + Number L * @@a9@@ + Number ) + Number ) ) return Number ; * ( _DWORD * ) ( * ( _QWORD * ) ( * ( _QWORD * ) ( @@a8@@ + Number L * @@a9@@ + Number ) + Number L * * ( int * ) ( @@a8@@ + Number L * @@a9@@ + Number ) + Number ) + Number L * @@v21@@ - Number ) = @@v18@@ [ Number ] ; * ( _DWORD * ) ( * ( _QWORD * ) ( * ( _QWORD * ) ( @@a8@@ + Number L * @@a9@@ + Number ) + Number L * * ( int * ) ( @@a8@@ + Number L * @@a9@@ + Number ) + Number ) + Number L * @@v21@@ - Number + Number ) = @@v18@@ [ Number ] ; if ( @@src@@ [ Number ] == @@a6@@ ) * ( _BYTE * ) ( * ( _QWORD * ) ( @@a8@@ + Number L * @@a9@@ + Number ) + Number L * * ( int * ) ( @@a8@@ + Number L * @@a9@@ + Number ) + Number ) = @@v21@@ - Number ; } } * ( _DWORD * ) ( @@a1@@ + Number ) = Number * * ( _DWORD * ) ( @@a1@@ + Number ) * * ( _DWORD * ) ( @@a1@@ + Number ) ; v10 = * ( _DWORD * ) ( @@a1@@ + Number ) ; if ( v10 == Number ) { * ( _QWORD * ) ( @@a1@@ + Number ) = calloc ( Number , * ( int * ) ( @@a1@@ + Number ) ) ; if ( ! * ( _QWORD * ) ( @@a1@@ + Number ) ) goto LABEL_41 ; * ( _QWORD * ) ( @@a1@@ + Number ) = calloc ( Number , Number * * ( int * ) ( @@a1@@ + Number ) * ( __int64 ) ( * ( _DWORD * ) ( @@a1@@ + Number ) + Number ) ) ; } else { if ( v10 != Number ) { fwrite ( String , Number , Number , stderr ) ; goto LABEL_41 ; } * ( _QWORD * ) ( @@a1@@ + Number ) = calloc ( Number , * ( int * ) ( @@a1@@ + Number ) ) ; } if ( * ( _QWORD * ) ( @@a1@@ + Number ) ) return Number L ; } else { fwrite ( String , Number , Number , stderr ) ; } LABEL_41 : free ( * ( void * * ) ( @@a8@@ + Number L * @@a9@@ + Number ) ) ; free ( * ( void * * ) ( @@a1@@ + Number ) ) ; free ( * ( void * * ) ( @@a1@@ + Number ) ) ; free ( * ( void * * ) ( @@a1@@ + Number ) ) ; close ( * ( _DWORD * ) @@a1@@ ) ; return Number ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "int", "s": 4}, "location": "r16"}, {"n": "a4", "t": {"T": 1, "n": "int", "s": 4}, "location": "r24"}, {"n": "v13", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r32"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 3, "t": "const char"}, "location": "r64"}, {"n": "a5", "t": {"T": 1, "n": "int", "s": 4}, "location": "r72"}, {"n": "a6", "t": {"T": 1, "n": "int", "s": 4}, "location": "r80"}, {"n": "a7", "t": {"T": 1, "n": "int", "s": 4}, "location": "s-16"}, {"n": "a8", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s-24"}, {"n": "a9", "t": {"T": 1, "n": "int", "s": 4}, "location": "s-32"}, {"n": "v21", "t": {"T": 1, "n": "int", "s": 4}, "location": "s20"}, {"n": "v20", "t": {"T": 1, "n": "int", "s": 4}, "location": "s24"}, {"n": "src", "t": {"T": 2, "n": 70, "s": 4, "t": "int"}, "location": "s304"}, {"n": "v18", "t": {"T": 2, "n": 12, "s": 4, "t": "int"}, "location": "s352"}]} {"name": "setResolution", "code": "__int64 __fastcall setResolution ( int * @@a1@@ , int @@a2@@ , int @@a3@@ ) { __int64 @@result@@ ; int @@i@@ ; @@a1@@ [ Number ] = Number ; if ( ( unsigned int ) video_disable ( @@a1@@ , Number ) ) return Number ; for ( @@i@@ = Number ; @@i@@ <= Number ; ++ @@i@@ ) munmap ( * ( void * * ) & @@a1@@ [ Number * @@i@@ + Number ] , ( unsigned int ) @@a1@@ [ Number ] ) ; close ( * @@a1@@ ) ; @@a1@@ [ Number ] = @@a2@@ ; @@a1@@ [ Number ] = @@a3@@ ; if ( ( int ) init_v4l2 ( @@a1@@ ) >= Number ) { video_enable ( @@a1@@ ) ; @@result@@ = Number L ; } else { fwrite ( String , Number , Number , stderr ) ; @@result@@ = Number ; } return @@result@@ ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "int", "s": 4}, "location": "r16"}, {"n": "a1", "t": {"T": 3, "t": "int"}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "int", "s": 4}, "location": "r64"}, {"n": "result", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r8"}, {"n": "i", "t": {"T": 1, "n": "int", "s": 4}, "location": "s4"}]}