{"name": "server_thread", "code": "__int64 __fastcall server_thread ( __int64 @@a1@@ ) { uint16_t v1 ; const char * v2 ; int v3 ; uint16_t v4 ; int @@v5@@ ; __int64 @@v6@@ ; __int64 @@v7@@ ; int v8 ; struct __jmp_buf_tag @@env@@ ; char @@v11@@ [ Number ] ; __int64 @@v12@@ ; char @@v13@@ [ Number ] ; char @@s@@ [ Number ] ; fd_set @@readfds@@ ; __int64 @@v16@@ ; socklen_t @@addr_len@@ ; struct sockaddr @@addr@@ ; struct addrinfo @@req@@ ; struct addrinfo * @@pai@@ ; pthread_t @@newthread@@ ; int @@optval@@ [ Number ] ; void * @@arg@@ ; int @@ecode@@ ; __int64 @@v26@@ ; void ( __fastcall * @@v27@@ ) ( __int64 ) ; __int64 @@v28@@ ; int @@i@@ ; int @@v30@@ ; struct addrinfo * @@j@@ ; @@addr_len@@ = Number ; @@v30@@ = Number ; @@v28@@ = @@a1@@ ; pglobal = * ( _QWORD * ) ( @@a1@@ + Number ) ; @@v27@@ = server_cleanup ; @@v26@@ = @@a1@@ ; if ( _sigsetjmp ( & @@env@@ , Number ) ) { @@v27@@ ( @@v26@@ ) ; _pthread_unwind_next ( ( __pthread_unwind_buf_t * ) & @@env@@ ) ; } _pthread_register_cancel ( ( __pthread_unwind_buf_t * ) & @@env@@ ) ; @@req@@ . ai_protocol = Number ; * ( _QWORD * ) & @@req@@ . ai_addrlen = Number L ; @@req@@ . ai_addr = Number L ; @@req@@ . ai_canonname = Number L ; @@req@@ . ai_next = Number L ; @@req@@ . ai_family = Number ; @@req@@ . ai_flags = Number ; @@req@@ . ai_socktype = Number ; v1 = ntohs ( * ( _DWORD * ) ( @@v28@@ + Number ) ) ; snprintf ( @@s@@ , Number , String , v1 ) ; @@ecode@@ = getaddrinfo ( Number L , @@s@@ , & @@req@@ , & @@pai@@ ) ; if ( @@ecode@@ ) { v2 = gai_strerror ( @@ecode@@ ) ; perror ( v2 ) ; exit ( Number ) ; } for ( @@i@@ = Number ; @@i@@ <= Number ; ++ @@i@@ ) * ( _DWORD * ) ( @@v28@@ + Number L * @@i@@ ) = Number ; @@i@@ = Number ; for ( @@j@@ = @@pai@@ ; @@j@@ ; @@j@@ = @@j@@ -> ai_next ) { v3 = socket ( @@j@@ -> ai_family , @@j@@ -> ai_socktype , Number ) ; * ( _DWORD * ) ( @@v28@@ + Number L * @@i@@ ) = v3 ; if ( * ( int * ) ( @@v28@@ + Number L * @@i@@ ) >= Number ) { @@optval@@ [ Number ] = Number ; if ( setsockopt ( * ( _DWORD * ) ( @@v28@@ + Number L * @@i@@ ) , Number , Number , @@optval@@ , Number ) < Number ) perror ( String ) ; @@optval@@ [ Number ] = Number ; if ( @@j@@ -> ai_family == Number && setsockopt ( * ( _DWORD * ) ( @@v28@@ + Number L * @@i@@ ) , Number , Number , @@optval@@ , Number ) < Number ) perror ( String ) ; if ( bind ( * ( _DWORD * ) ( @@v28@@ + Number L * @@i@@ ) , @@j@@ -> ai_addr , @@j@@ -> ai_addrlen ) >= Number ) { if ( listen ( * ( _DWORD * ) ( @@v28@@ + Number L * @@i@@ ) , Number ) >= Number ) { if ( ++ @@i@@ > Number ) { @@env@@ . __saved_mask . __val [ Number ] = Number L ; @@env@@ . __saved_mask . __val [ Number ] = Number L ; memset ( & @@env@@ . __saved_mask . __val [ Number ] , Number , Number ) ; snprintf ( ( char * ) & @@env@@ . __saved_mask . __val [ Number ] , Number , String , String ) ; fwrite ( String , Number , Number , stderr ) ; fputs ( ( const char * ) & @@env@@ . __saved_mask . __val [ Number ] , stderr ) ; syslog ( Number , String , ( const char * ) & @@env@@ . __saved_mask . __val [ Number ] ) ; -- @@i@@ ; break ; } } else { perror ( String ) ; * ( _DWORD * ) ( @@v28@@ + Number L * @@i@@ ) = Number ; } } else { perror ( String ) ; * ( _DWORD * ) ( @@v28@@ + Number L * @@i@@ ) = Number ; } } } * ( _DWORD * ) ( @@v28@@ + Number ) = @@i@@ ; if ( * ( int * ) ( @@v28@@ + Number ) <= Number ) { * ( _QWORD * ) @@v11@@ = Number L ; @@v12@@ = Number L ; memset ( @@v13@@ , Number , sizeof ( @@v13@@ ) ) ; v4 = htons ( * ( _DWORD * ) ( @@v28@@ + Number ) ) ; snprintf ( @@v11@@ , Number , String , String , v4 ) ; fwrite ( String , Number , Number , stderr ) ; fputs ( @@v11@@ , stderr ) ; syslog ( Number , String , @@v11@@ ) ; closelog ( ) ; exit ( Number ) ; } while ( ! * ( _DWORD * ) pglobal ) { @@arg@@ = malloc ( Number ) ; if ( ! @@arg@@ ) { fwrite ( String , Number , Number , stderr ) ; exit ( Number ) ; } do { memset ( & @@readfds@@ , Number , sizeof ( @@readfds@@ ) ) ; @@optval@@ [ Number ] = Number ; @@optval@@ [ Number ] = ( unsigned int ) & @@v16@@ ; for ( @@i@@ = Number ; @@i@@ <= Number ; ++ @@i@@ ) { if ( * ( _DWORD * ) ( @@v28@@ + Number L * @@i@@ ) != Number ) { @@v5@@ = * ( _DWORD * ) ( @@v28@@ + Number L * @@i@@ ) / Number ; @@v6@@ = * ( int * ) ( @@v28@@ + Number L * @@i@@ ) ; @@readfds@@ . fds_bits [ @@v5@@ ] |= Number L << ( ( ( ( HIDWORD ( @@v6@@ ) >> Number ) + @@v6@@ ) & Number ) - ( HIDWORD ( @@v6@@ ) >> Number ) ) ; if ( @@v30@@ < * ( _DWORD * ) ( @@v28@@ + Number L * @@i@@ ) ) @@v30@@ = * ( _DWORD * ) ( @@v28@@ + Number L * @@i@@ ) ; } } @@ecode@@ = select ( @@v30@@ + Number , & @@readfds@@ , Number L , Number L , Number L ) ; if ( @@ecode@@ < Number && * _errno_location ( ) != Number ) { perror ( String ) ; exit ( Number ) ; } } while ( @@ecode@@ <= Number ) ; for ( @@i@@ = Number ; @@v30@@ >= @@i@@ ; ++ @@i@@ ) { if ( * ( _DWORD * ) ( @@v28@@ + Number L * @@i@@ ) != Number ) { @@v7@@ = * ( int * ) ( @@v28@@ + Number L * @@i@@ ) ; if ( ( @@readfds@@ . fds_bits [ * ( _DWORD * ) ( @@v28@@ + Number L * @@i@@ ) / Number ] & ( Number L << ( ( ( ( HIDWORD ( @@v7@@ ) >> Number ) + @@v7@@ ) & Number ) - ( HIDWORD ( @@v7@@ ) >> Number ) ) ) ) != Number ) { v8 = accept ( * ( _DWORD * ) ( @@v28@@ + Number L * @@i@@ ) , & @@addr@@ , & @@addr_len@@ ) ; * ( ( _DWORD * ) @@arg@@ + Number ) = v8 ; * ( _QWORD * ) @@arg@@ = @@v28@@ ; if ( pthread_create ( & @@newthread@@ , Number L , client_thread , @@arg@@ ) ) { close ( * ( ( _DWORD * ) @@arg@@ + Number ) ) ; free ( @@arg@@ ) ; } else { pthread_detach ( @@newthread@@ ) ; } } } } } _pthread_unregister_cancel ( ( __pthread_unwind_buf_t * ) & @@env@@ ) ; @@v27@@ ( @@v26@@ ) ; return Number L ; }", "source": [{"n": "v6", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r1280"}, {"n": "v7", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r1288"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "v5", "t": {"T": 1, "n": "int", "s": 4}, "location": "r64"}, {"n": "v30", "t": {"T": 1, "n": "int", "s": 4}, "location": "s12"}, {"n": "req", "t": {"T": 6, "n": "struct addrinfo", "l": [{"T": 4, "n": "ai_flags", "t": "int", "s": 4}, {"T": 4, "n": "ai_family", "t": "int", "s": 4}, {"T": 4, "n": "ai_socktype", "t": "int", "s": 4}, {"T": 4, "n": "ai_protocol", "t": "int", "s": 4}, {"T": 4, "n": "ai_addrlen", "t": "socklen_t", "s": 4}, {"T": 5, "s": 4}, {"T": 4, "n": "ai_addr", "t": "sockaddr *", "s": 8}, {"T": 4, "n": "ai_canonname", "t": "char *", "s": 8}, {"T": 4, "n": "ai_next", "t": "addrinfo *", "s": 8}]}, "location": "s144"}, {"n": "s", "t": {"T": 2, "n": 1040, "s": 1, "t": "char"}, "location": "s1456"}, {"n": "i", "t": {"T": 1, "n": "int", "s": 4}, "location": "s16"}, {"n": "v28", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s24"}, {"n": "v13", "t": {"T": 2, "n": 1008, "s": 1, "t": "char"}, "location": "s2464"}, {"n": "v12", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s2472"}, {"n": "v11", "t": {"T": 2, "n": 8, "s": 1, "t": "char"}, "location": "s2480"}, {"n": "addr", "t": {"T": 6, "n": "struct sockaddr", "l": [{"T": 4, "n": "sa_family", "t": "sa_family_t", "s": 2}, {"T": 4, "n": "sa_data", "t": "char[14]", "s": 14}]}, "location": "s272"}, {"n": "addr_len", "t": {"T": 1, "n": "socklen_t", "s": 4}, "location": "s276"}, {"n": "v16", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s288"}, {"n": "v27", "t": {"T": 9, "n": "void (__fastcall *)(__int64 a1)"}, "location": "s32"}, {"n": "env", "t": {"T": 6, "n": "struct __jmp_buf_tag", "l": [{"T": 4, "n": "__jmpbuf", "t": "__jmp_buf", "s": 64}, {"T": 4, "n": "__mask_was_saved", "t": "int", "s": 4}, {"T": 5, "s": 4}, {"T": 4, "n": "__saved_mask", "t": "__sigset_t", "s": 128}]}, "location": "s3616"}, {"n": "v26", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s40"}, {"n": "readfds", "t": {"T": 6, "n": "fd_set", "l": [{"T": 4, "n": "fds_bits", "t": "__fd_mask[16]", "s": 128}]}, "location": "s416"}, {"n": "ecode", "t": {"T": 1, "n": "int", "s": 4}, "location": "s48"}, {"n": "arg", "t": {"T": 3, "t": "void"}, "location": "s56"}, {"n": "optval", "t": {"T": 2, "n": 3, "s": 4, "t": "int"}, "location": "s68"}, {"n": "j", "t": {"T": 3, "t": "struct addrinfo"}, "location": "s8"}, {"n": "newthread", "t": {"T": 1, "n": "pthread_t", "s": 8}, "location": "s80"}, {"n": "pai", "t": {"T": 3, "t": "struct addrinfo"}, "location": "s88"}]}
{"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"}]} {"name": "server_cleanup", "code": "void __fastcall server_cleanup ( __int64 @@a1@@ ) { char @@s@@ [ Number ] ; __int64 @@v2@@ ; char @@v3@@ [ Number ] ; __int64 @@v4@@ ; int @@i@@ ; @@v4@@ = @@a1@@ ; * ( _QWORD * ) @@s@@ = Number L ; @@v2@@ = Number L ; memset ( @@v3@@ , Number , sizeof ( @@v3@@ ) ) ; snprintf ( @@s@@ , Number , String , * ( unsigned int * ) ( @@a1@@ + Number ) ) ; fwrite ( String , Number , Number , stderr ) ; fputs ( @@s@@ , stderr ) ; syslog ( Number , String , @@s@@ ) ; for ( @@i@@ = Number ; @@i@@ <= Number ; ++ @@i@@ ) close ( * ( _DWORD * ) ( @@v4@@ + Number L * @@i@@ ) ) ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "v3", "t": {"T": 2, "n": 1008, "s": 1, "t": "char"}, "location": "s1024"}, {"n": "v2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s1032"}, {"n": "s", "t": {"T": 2, "n": 8, "s": 1, "t": "char"}, "location": "s1040"}, {"n": "v4", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s16"}, {"n": "i", "t": {"T": 1, "n": "int", "s": 4}, "location": "s4"}]}