{"name": "init_iobuffer", "code": "_DWORD * __fastcall init_iobuffer ( _DWORD * @@a1@@ ) { _DWORD * @@result@@ ; memset ( @@a1@@ + Number , Number , Number ) ; @@result@@ = @@a1@@ ; * @@a1@@ = Number ; return @@result@@ ; }", "source": [{"n": "a1", "t": {"T": 3, "t": "_DWORD"}, "location": "r56"}, {"n": "result", "t": {"T": 3, "t": "_DWORD"}, "location": "r8"}]}
{"name": "_read", "code": "ssize_t read ( int @@fd@@ , void * @@buf@@ , size_t @@nbytes@@ ) { size_t @@v3@@ ; int @@v4@@ ; unsigned __int64 @@v5@@ ; size_t @@n@@ ; int @@v9@@ ; struct timeval @@timeout@@ ; fd_set @@readfds@@ ; __int64 @@v12@@ ; int @@v13@@ ; unsigned int @@v14@@ ; int @@v15@@ ; int @@v16@@ ; unsigned int @@v17@@ ; @@n@@ = @@v3@@ ; @@v9@@ = @@v4@@ ; @@v17@@ = Number ; memset ( ( void * ) @@nbytes@@ , Number , @@v3@@ ) ; while ( Number ) { if ( @@n@@ <= ( int ) @@v17@@ ) return Number L ; @@v5@@ = * ( int * ) @@buf@@ ; if ( @@n@@ - ( int ) @@v17@@ <= @@v5@@ ) LODWORD ( @@v5@@ ) = @@n@@ - @@v17@@ ; @@v16@@ = @@v5@@ ; memcpy ( ( void * ) ( @@nbytes@@ + ( int ) @@v17@@ ) , ( char * ) @@buf@@ + Number L - * ( int * ) @@buf@@ + Number , ( int ) @@v5@@ ) ; * ( _DWORD * ) @@buf@@ -= @@v16@@ ; @@v17@@ += @@v16@@ ; if ( @@n@@ <= ( int ) @@v17@@ ) return @@v17@@ ; @@timeout@@ . tv_sec = @@v9@@ ; @@timeout@@ . tv_usec = Number L ; memset ( & @@readfds@@ , Number , sizeof ( @@readfds@@ ) ) ; @@v15@@ = Number ; @@v14@@ = ( unsigned int ) & @@v12@@ ; @@readfds@@ . fds_bits [ @@fd@@ / Number ] |= Number L << ( @@fd@@ % Number ) ; @@v13@@ = select ( @@fd@@ + Number , & @@readfds@@ , Number L , Number L , & @@timeout@@ ) ; if ( @@v13@@ <= Number ) break ; init_iobuffer ( @@buf@@ ) ; * ( _DWORD * ) @@buf@@ = read ( @@fd@@ , ( char * ) @@buf@@ + Number , Number ) ; if ( * ( int * ) @@buf@@ <= Number ) return Number ; memmove ( ( char * ) @@buf@@ + Number - * ( _DWORD * ) @@buf@@ + Number , ( char * ) @@buf@@ + Number , * ( int * ) @@buf@@ ) ; } if ( @@v13@@ < Number ) exit ( Number ) ; return @@v17@@ ; }", "source": [{"n": "nbytes", "t": {"T": 1, "n": "size_t", "s": 8}, "location": "r16"}, {"n": "v3", "t": {"T": 1, "n": "size_t", "s": 8}, "location": "r24"}, {"n": "fd", "t": {"T": 1, "n": "int", "s": 4}, "location": "r56"}, {"n": "buf", "t": {"T": 3, "t": "void"}, "location": "r64"}, {"n": "v4", "t": {"T": 1, "n": "int", "s": 4}, "location": "r72"}, {"n": "v5", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "r8"}, {"n": "v15", "t": {"T": 1, "n": "int", "s": 4}, "location": "s12"}, {"n": "v14", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s16"}, {"n": "readfds", "t": {"T": 6, "n": "fd_set", "l": [{"T": 4, "n": "fds_bits", "t": "__fd_mask[16]", "s": 128}]}, "location": "s160"}, {"n": "timeout", "t": {"T": 6, "n": "struct timeval", "l": [{"T": 4, "n": "tv_sec", "t": "__time_t", "s": 8}, {"T": 4, "n": "tv_usec", "t": "__suseconds_t", "s": 8}]}, "location": "s176"}, {"n": "v9", "t": {"T": 1, "n": "int", "s": 4}, "location": "s184"}, {"n": "v13", "t": {"T": 1, "n": "int", "s": 4}, "location": "s20"}, {"n": "n", "t": {"T": 1, "n": "size_t", "s": 8}, "location": "s208"}, {"n": "v12", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s32"}, {"n": "v17", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s4"}, {"n": "v16", "t": {"T": 1, "n": "int", "s": 4}, "location": "s8"}]} {"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"}]}