{"name": "command", "code": "void __fastcall command ( __int64 @@a1@@ , int @@a2@@ , const char * @@a3@@ ) { unsigned int v3 ; unsigned int v4 ; unsigned int v5 ; unsigned int v6 ; unsigned int v7 ; size_t v8 ; char @@v10@@ [ Number ] ; __int64 @@v11@@ ; char @@v12@@ [ Number ] ; char @@buf@@ [ Number ] ; __int64 @@v14@@ ; char @@v15@@ [ Number ] ; char * @@v16@@ ; char * @@v17@@ ; int @@v18@@ ; unsigned int @@v19@@ ; char * @@string@@ ; unsigned int @@v21@@ ; unsigned int @@v22@@ ; unsigned int @@v23@@ ; unsigned int @@v24@@ ; unsigned int @@v25@@ ; char * @@nptr@@ ; * ( _QWORD * ) @@buf@@ = Number L ; @@v14@@ = Number L ; memset ( @@v15@@ , Number , sizeof ( @@v15@@ ) ) ; @@string@@ = Number L ; @@nptr@@ = Number L ; @@v25@@ = Number ; @@v24@@ = Number ; @@v19@@ = Number ; @@v18@@ = Number ; if ( ! @@a3@@ || strlen ( @@a3@@ ) > Number || ! * @@a3@@ ) { send_error ( @@a2@@ , Number , String ) ; return ; } @@string@@ = strstr ( @@a3@@ , String ) ; if ( ! @@string@@ ) { send_error ( @@a2@@ , Number , String ) ; return ; } @@string@@ += Number ; @@v18@@ = strspn ( @@string@@ , String ) ; @@string@@ = strndup ( @@string@@ , @@v18@@ ) ; if ( ! @@string@@ ) goto LABEL_58 ; @@v17@@ = @@string@@ ; @@v18@@ = strspn ( @@string@@ , String ) ; @@nptr@@ = strndup ( @@v17@@ , @@v18@@ ) ; if ( ! @@nptr@@ ) { if ( @@string@@ ) free ( @@string@@ ) ; LABEL_58 : send_error ( @@a2@@ , Number , String ) ; * ( _QWORD * ) @@v10@@ = Number L ; @@v11@@ = Number L ; memset ( @@v12@@ , Number , sizeof ( @@v12@@ ) ) ; snprintf ( @@v10@@ , Number , String ) ; fputs ( @@v10@@ , stderr ) ; syslog ( Number , String , @@v10@@ ) ; return ; } if ( strtol ( @@nptr@@ , Number L , Number ) <= Number && strtol ( @@nptr@@ , Number L , Number ) < Number ) { v3 = Number ; } else if ( strtol ( @@nptr@@ , Number L , Number ) > Number ) { v3 = Number ; } else { v3 = strtol ( @@nptr@@ , Number L , Number ) ; } @@v19@@ = v3 ; @@v16@@ = strstr ( @@a3@@ , String ) ; if ( @@v16@@ ) { @@v16@@ += Number ; @@v18@@ = strspn ( @@v16@@ , String ) ; @@nptr@@ = strndup ( @@v16@@ , @@v18@@ ) ; if ( ! @@nptr@@ ) { if ( @@string@@ ) free ( @@string@@ ) ; goto LABEL_58 ; } if ( strtol ( @@nptr@@ , Number L , Number ) <= Number && strtol ( @@nptr@@ , Number L , Number ) < Number ) { v4 = Number ; } else if ( strtol ( @@nptr@@ , Number L , Number ) > Number ) { v4 = Number ; } else { v4 = strtol ( @@nptr@@ , Number L , Number ) ; } @@v24@@ = v4 ; } @@v23@@ = Number ; @@v16@@ = strstr ( @@a3@@ , String ) ; if ( @@v16@@ ) { @@v16@@ += Number ; @@v18@@ = strspn ( @@v16@@ , String ) ; @@nptr@@ = strndup ( @@v16@@ , @@v18@@ ) ; if ( ! @@nptr@@ ) { if ( @@string@@ ) free ( @@string@@ ) ; goto LABEL_58 ; } if ( strtol ( @@nptr@@ , Number L , Number ) <= Number && strtol ( @@nptr@@ , Number L , Number ) < Number ) { v5 = Number ; } else if ( strtol ( @@nptr@@ , Number L , Number ) > Number ) { v5 = Number ; } else { v5 = strtol ( @@nptr@@ , Number L , Number ) ; } @@v23@@ = v5 ; } @@v22@@ = Number ; @@v16@@ = strstr ( @@a3@@ , String ) ; if ( @@v16@@ ) { @@v16@@ += Number ; @@v18@@ = strspn ( @@v16@@ , String ) ; @@nptr@@ = strndup ( @@v16@@ , @@v18@@ ) ; if ( ! @@nptr@@ ) { if ( @@string@@ ) free ( @@string@@ ) ; goto LABEL_58 ; } if ( strtol ( @@nptr@@ , Number L , Number ) <= Number && strtol ( @@nptr@@ , Number L , Number ) < Number ) { v6 = Number ; } else if ( strtol ( @@nptr@@ , Number L , Number ) > Number ) { v6 = Number ; } else { v6 = strtol ( @@nptr@@ , Number L , Number ) ; } @@v22@@ = v6 ; } @@v21@@ = Number ; @@v16@@ = strstr ( @@a3@@ , String ) ; if ( @@v16@@ ) { @@v16@@ += Number ; @@v18@@ = strspn ( @@v16@@ , String ) ; @@nptr@@ = strndup ( @@v16@@ , @@v18@@ ) ; if ( ! @@nptr@@ ) { if ( @@string@@ ) free ( @@string@@ ) ; goto LABEL_58 ; } if ( strtol ( @@nptr@@ , Number L , Number ) <= Number && strtol ( @@nptr@@ , Number L , Number ) < Number ) { v7 = Number ; } else if ( strtol ( @@nptr@@ , Number L , Number ) > Number ) { v7 = Number ; } else { v7 = strtol ( @@nptr@@ , Number L , Number ) ; } @@v21@@ = v7 ; } if ( @@v22@@ != Number ) { if ( ( int ) @@v22@@ > Number ) goto LABEL_75 ; if ( ! @@v22@@ ) { if ( ( signed int ) @@v21@@ < * ( _DWORD * ) ( pglobal + Number ) ) @@v25@@ = ( * ( __int64 ( __fastcall * * ) ( _QWORD , _QWORD , _QWORD , _QWORD ) ) ( pglobal + Number L * ( int ) @@v21@@ + Number ) ) ( @@v21@@ , @@v19@@ , @@v23@@ , @@v24@@ ) ; goto LABEL_76 ; } if ( @@v22@@ == Number ) { if ( ( signed int ) @@v21@@ < * ( _DWORD * ) ( pglobal + Number ) ) @@v25@@ = ( * ( __int64 ( __fastcall * * ) ( _QWORD , _QWORD , _QWORD , _QWORD ) ) ( pglobal + Number L * ( int ) @@v21@@ + Number ) ) ( @@v21@@ , @@v19@@ , @@v23@@ , @@v24@@ ) ; } else { LABEL_75 : fprintf ( stderr , String , @@v22@@ ) ; } } LABEL_76 : sprintf ( @@buf@@ , String String String String String String String String String , @@string@@ , @@v25@@ ) ; v8 = strlen ( @@buf@@ ) ; write ( @@a2@@ , @@buf@@ , v8 ) ; if ( @@string@@ ) free ( @@string@@ ) ; if ( @@nptr@@ ) free ( @@nptr@@ ) ; }", "source": [{"n": "a3", "t": {"T": 3, "t": "const char"}, "location": "r16"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "int", "s": 4}, "location": "r64"}, {"n": "v15", "t": {"T": 2, "n": 1008, "s": 1, "t": "char"}, "location": "s1072"}, {"n": "v14", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s1080"}, {"n": "buf", "t": {"T": 2, "n": 8, "s": 1, "t": "char"}, "location": "s1088"}, {"n": "v25", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s12"}, {"n": "v24", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s16"}, {"n": "v23", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s20"}, {"n": "v12", "t": {"T": 2, "n": 1008, "s": 1, "t": "char"}, "location": "s2096"}, {"n": "v11", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s2104"}, {"n": "v10", "t": {"T": 2, "n": 8, "s": 1, "t": "char"}, "location": "s2112"}, {"n": "v22", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s24"}, {"n": "v21", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s28"}, {"n": "string", "t": {"T": 3, "t": "char"}, "location": "s40"}, {"n": "v19", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s44"}, {"n": "v18", "t": {"T": 1, "n": "int", "s": 4}, "location": "s48"}, {"n": "v17", "t": {"T": 3, "t": "char"}, "location": "s56"}, {"n": "v16", "t": {"T": 3, "t": "char"}, "location": "s64"}, {"n": "nptr", "t": {"T": 3, "t": "char"}, "location": "s8"}]}
{"name": "send_error", "code": "ssize_t __fastcall send_error ( int @@a1@@ , int @@a2@@ , const char * @@a3@@ ) { size_t @@v3@@ ; char @@s@@ [ Number ] ; __int64 @@v6@@ ; char @@v7@@ [ Number ] ; * ( _QWORD * ) @@s@@ = Number L ; @@v6@@ = Number L ; memset ( @@v7@@ , Number , sizeof ( @@v7@@ ) ) ; switch ( @@a2@@ ) { case Number : sprintf ( @@s@@ , String String String String String String String String String String String , @@a3@@ ) ; break ; case Number : sprintf ( @@s@@ , String String String String String String String String String String , @@a3@@ ) ; break ; case Number : sprintf ( @@s@@ , String String String String String String String String String String , @@a3@@ ) ; break ; case Number : sprintf ( @@s@@ , String String String String String String String String String String , @@a3@@ ) ; break ; default : sprintf ( @@s@@ , String String String String String String String String String String , @@a3@@ ) ; break ; } @@v3@@ = strlen ( @@s@@ ) ; return write ( @@a1@@ , @@s@@ , @@v3@@ ) ; }", "source": [{"n": "a3", "t": {"T": 3, "t": "const char"}, "location": "r16"}, {"n": "a1", "t": {"T": 1, "n": "int", "s": 4}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "int", "s": 4}, "location": "r64"}, {"n": "v3", "t": {"T": 1, "n": "size_t", "s": 8}, "location": "r8"}, {"n": "v7", "t": {"T": 2, "n": 1008, "s": 1, "t": "char"}, "location": "s1008"}, {"n": "v6", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s1016"}, {"n": "s", "t": {"T": 2, "n": 8, "s": 1, "t": "char"}, "location": "s1024"}]} {"name": "client_thread", "code": "void * __fastcall client_thread ( void * @@a1@@ ) { __int64 @@v1@@ ; void * result ; int v3 ; int v4 ; char @@v5@@ [ Number ] ; __int64 @@v6@@ ; char @@v7@@ [ Number ] ; char @@nptr@@ [ Number ] ; __int64 @@v9@@ ; int @@fd@@ [ Number ] ; void * @@v11@@ ; char * @@dest@@ ; void * @@v13@@ ; char * @@s2@@ ; _DWORD @@v15@@ [ Number ] ; __int64 @@s@@ [ Number ] ; char * @@v17@@ ; int @@v18@@ ; int @@v19@@ ; int @@v20@@ ; char * @@src@@ ; unsigned int @@v22@@ ; char @@v23@@ ; @@v23@@ = Number ; @@v22@@ = Number ; @@s@@ [ Number ] = Number L ; @@s@@ [ Number ] = Number L ; memset ( & @@s@@ [ Number ] , Number , Number ) ; @@src@@ = ( char * ) @@s@@ ; if ( ! @@a1@@ ) return Number L ; @@v1@@ = * ( ( _QWORD * ) @@a1@@ + Number ) ; @@v9@@ = * ( _QWORD * ) @@a1@@ ; * ( _QWORD * ) @@fd@@ = @@v1@@ ; free ( @@a1@@ ) ; init_iobuffer ( @@v15@@ ) ; init_request ( ( __int64 ) & @@v11@@ ) ; memset ( @@s@@ , Number , Number ) ; @@v20@@ = readline ( @@fd@@ [ Number ] , @@v15@@ , @@s@@ , Number ) ; if ( @@v20@@ == Number ) { close ( @@fd@@ [ Number ] ) ; return Number L ; } if ( strstr ( ( const char * ) @@s@@ , String ) ) { LODWORD ( @@v11@@ ) = Number ; @@v23@@ = Number ; goto LABEL_40 ; } if ( strstr ( ( const char * ) @@s@@ , String ) ) { LODWORD ( @@v11@@ ) = Number ; @@v23@@ = Number ; goto LABEL_40 ; } if ( strstr ( ( const char * ) @@s@@ , String ) && strstr ( ( const char * ) @@s@@ , String ) ) { LODWORD ( @@v11@@ ) = Number ; @@v23@@ = Number ; goto LABEL_40 ; } if ( strstr ( ( const char * ) @@s@@ , String ) && strstr ( ( const char * ) @@s@@ , String ) ) { LODWORD ( @@v11@@ ) = Number ; @@v23@@ = Number ; goto LABEL_40 ; } if ( strstr ( ( const char * ) @@s@@ , String ) ) { LODWORD ( @@v11@@ ) = Number ; @@v23@@ = Number ; goto LABEL_40 ; } if ( strstr ( ( const char * ) @@s@@ , String ) ) { LODWORD ( @@v11@@ ) = Number ; @@src@@ = strstr ( ( const char * ) @@s@@ , String ) ; if ( ! @@src@@ ) { LABEL_19 : send_error ( @@fd@@ [ Number ] , Number , String ) ; close ( @@fd@@ [ Number ] ) ; return Number L ; } @@src@@ += Number ; if ( strspn ( @@src@@ , String ) && strspn ( @@src@@ , String ) > Number ) { v3 = Number ; } else if ( strspn ( @@src@@ , String ) ) { v3 = strspn ( @@src@@ , String ) ; } else { v3 = Number ; } @@v18@@ = v3 ; @@dest@@ = ( char * ) malloc ( v3 + Number ) ; if ( ! @@dest@@ ) exit ( Number ) ; memset ( @@dest@@ , Number , @@v18@@ + Number ) ; strncpy ( @@dest@@ , @@src@@ , @@v18@@ ) ; if ( ( unsigned int ) unescape ( @@dest@@ ) == Number ) { free ( @@dest@@ ) ; send_error ( @@fd@@ [ Number ] , Number , String ) ; * ( _QWORD * ) @@v5@@ = Number L ; @@v6@@ = Number L ; memset ( @@v7@@ , Number , sizeof ( @@v7@@ ) ) ; snprintf ( @@v5@@ , Number , String ) ; fputs ( @@v5@@ , stderr ) ; syslog ( Number , String , @@v5@@ ) ; close ( @@fd@@ [ Number ] ) ; return Number L ; } } else { LODWORD ( @@v11@@ ) = Number ; @@src@@ = strstr ( ( const char * ) @@s@@ , String ) ; if ( ! @@src@@ ) goto LABEL_19 ; @@src@@ += Number ; if ( strspn ( @@src@@ , String ) && strspn ( @@src@@ , String ) > Number ) { v4 = Number ; } else if ( strspn ( @@src@@ , String ) ) { v4 = strspn ( @@src@@ , String ) ; } else { v4 = Number ; } @@v19@@ = v4 ; @@dest@@ = ( char * ) malloc ( v4 + Number ) ; if ( ! @@dest@@ ) exit ( Number ) ; memset ( @@dest@@ , Number , @@v19@@ + Number ) ; strncpy ( @@dest@@ , @@src@@ , @@v19@@ ) ; } LABEL_40 : if ( @@v23@@ ) { @@v17@@ = strchr ( ( const char * ) @@s@@ , Number ) ; if ( @@v17@@ ) { memset ( @@nptr@@ , Number , sizeof ( @@nptr@@ ) ) ; strncpy ( @@nptr@@ , @@v17@@ + Number , Number ) ; @@v22@@ = atoi ( @@nptr@@ ) ; } } do { memset ( @@s@@ , Number , Number ) ; @@v20@@ = readline ( @@fd@@ [ Number ] , @@v15@@ , @@s@@ , Number ) ; if ( @@v20@@ == Number ) { free_request ( & @@v11@@ ) ; close ( @@fd@@ [ Number ] ) ; return Number L ; } if ( strstr ( ( const char * ) @@s@@ , String ) ) { @@v13@@ = strdup ( ( const char * ) & @@s@@ [ Number ] + Number ) ; } else if ( strstr ( ( const char * ) @@s@@ , String ) ) { @@s2@@ = strdup ( ( const char * ) & @@s@@ [ Number ] + Number ) ; decodeBase64 ( @@s2@@ ) ; } } while ( @@v20@@ > Number && LOWORD ( @@s@@ [ Number ] ) != Number ) ; if ( ! * ( _QWORD * ) ( @@v9@@ + Number ) || @@s2@@ && ! strcmp ( * ( const char * * ) ( @@v9@@ + Number ) , @@s2@@ ) ) { if ( ( signed int ) @@v22@@ >= * ( _DWORD * ) ( pglobal + Number ) ) { send_error ( @@fd@@ [ Number ] , Number , String ) ; LODWORD ( @@v11@@ ) = Number ; } switch ( ( int ) @@v11@@ ) { case Number : send_snapshot ( @@fd@@ [ Number ] , @@v22@@ ) ; break ; case Number : send_stream ( @@fd@@ [ Number ] , @@v22@@ ) ; break ; case Number : if ( * ( _BYTE * ) ( @@v9@@ + Number ) ) send_error ( @@fd@@ [ Number ] , Number , String ) ; else command ( * ( unsigned int * ) ( @@v9@@ + Number ) , @@fd@@ [ Number ] , @@dest@@ ) ; break ; case Number : if ( * ( _QWORD * ) ( @@v9@@ + Number ) ) send_file ( * ( _DWORD * ) ( @@v9@@ + Number ) , @@fd@@ [ Number ] , @@dest@@ ) ; else send_error ( @@fd@@ [ Number ] , Number , String ) ; break ; case Number : send_Input_JSON ( ( unsigned int ) @@fd@@ [ Number ] , @@v22@@ ) ; break ; case Number : send_Output_JSON ( ( unsigned int ) @@fd@@ [ Number ] , @@v22@@ ) ; break ; case Number : send_Program_JSON ( ( unsigned int ) @@fd@@ [ Number ] ) ; break ; default : break ; } close ( @@fd@@ [ Number ] ) ; free_request ( & @@v11@@ ) ; result = Number L ; } else { send_error ( @@fd@@ [ Number ] , Number , String ) ; close ( @@fd@@ [ Number ] ) ; if ( @@dest@@ ) free ( @@dest@@ ) ; if ( @@v13@@ ) free ( @@v13@@ ) ; if ( @@s2@@ ) free ( @@s2@@ ) ; result = Number L ; } return result ; }", "source": [{"n": "v1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r16"}, {"n": "a1", "t": {"T": 3, "t": "void"}, "location": "r56"}, {"n": "v23", "t": {"T": 1, "n": "char", "s": 1}, "location": "s1"}, {"n": "s", "t": {"T": 2, "n": 129, "s": 8, "t": "__int64"}, "location": "s1072"}, {"n": "v15", "t": {"T": 2, "n": 68, "s": 4, "t": "_DWORD"}, "location": "s1344"}, {"n": "s2", "t": {"T": 3, "t": "char"}, "location": "s1352"}, {"n": "v13", "t": {"T": 3, "t": "void"}, "location": "s1360"}, {"n": "dest", "t": {"T": 3, "t": "char"}, "location": "s1368"}, {"n": "v11", "t": {"T": 3, "t": "void"}, "location": "s1376"}, {"n": "fd", "t": {"T": 2, "n": 2, "s": 4, "t": "int"}, "location": "s1384"}, {"n": "v9", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s1392"}, {"n": "nptr", "t": {"T": 2, "n": 3, "s": 1, "t": "char"}, "location": "s1395"}, {"n": "src", "t": {"T": 3, "t": "char"}, "location": "s16"}, {"n": "v20", "t": {"T": 1, "n": "int", "s": 4}, "location": "s20"}, {"n": "v19", "t": {"T": 1, "n": "int", "s": 4}, "location": "s24"}, {"n": "v7", "t": {"T": 2, "n": 1008, "s": 1, "t": "char"}, "location": "s2416"}, {"n": "v6", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s2424"}, {"n": "v5", "t": {"T": 2, "n": 8, "s": 1, "t": "char"}, "location": "s2432"}, {"n": "v18", "t": {"T": 1, "n": "int", "s": 4}, "location": "s28"}, {"n": "v17", "t": {"T": 3, "t": "char"}, "location": "s40"}, {"n": "v22", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s8"}]}