{"name": "standard_sub_basic", "code": "__int64 __fastcall standard_sub_basic ( __int64 @@a1@@ , __int64 @@a2@@ , int @@a3@@ , double @@a4@@ ) { __int64 v4 ; __int64 v5 ; __int64 v6 ; __int64 v7 ; __int64 v8 ; __int64 v9 ; __int64 v10 ; __int64 v11 ; unsigned int v12 ; __int64 v13 ; __int64 v14 ; __int64 v15 ; void * v16 ; __int64 v17 ; __int64 v18 ; __int64 v19 ; __int64 result ; char @@v22@@ [ Number ] ; char @@v23@@ [ Number ] ; __int64 @@v24@@ ; _BYTE * @@v25@@ ; int @@v26@@ ; __int64 @@i@@ ; __int64 @@v28@@ ; @@v25@@ = get_local_machine_name ( ) ; for ( @@i@@ = @@a2@@ ; ; @@i@@ = @@v28@@ ) { result = strchr_m ( @@i@@ , Number L ) ; @@v28@@ = result ; if ( ! result ) break ; @@v26@@ = @@a3@@ - ( @@v28@@ - @@a2@@ ) ; if ( @@v26@@ < Number ) @@v26@@ = Number ; switch ( * ( _BYTE * ) ( @@v28@@ + Number ) ) { case Number : ++ @@v28@@ ; break ; case Number : v19 = expand_env_var ( @@v28@@ , @@v26@@ ) ; @@v28@@ += v19 ; break ; case Number : safe_strcpy_fn ( & unk_2C94 , Number L , @@v22@@ , & current_user_info [ Number ] , Number L ) ; strupper_m ( @@v22@@ ) ; string_sub ( @@v28@@ , String , @@v22@@ , @@v26@@ ) ; break ; case Number : safe_strcpy_fn ( & unk_2C94 , Number L , @@v22@@ , @@a1@@ , Number L ) ; @@v24@@ = Get_Pwnam ( @@v22@@ ) ; if ( @@v24@@ ) { gidtoname ( * ( unsigned int * ) ( @@v24@@ + Number ) ) ; string_sub ( @@v28@@ , String , @@a4@@ ) ; } else { @@v28@@ += Number L ; } break ; case Number : v4 = @@v26@@ ; v5 = client_addr ( ) ; string_sub ( @@v28@@ , String , v5 , v4 ) ; break ; case Number : if ( @@v25@@ && * @@v25@@ ) { string_sub ( @@v28@@ , String , @@v25@@ , @@v26@@ ) ; } else { v7 = global_myname ( ) ; safe_strcpy_fn ( & unk_2C94 , Number L , @@v22@@ , v7 , Number L ) ; strlower_m ( @@v22@@ ) ; string_sub ( @@v28@@ , String , @@v22@@ , @@v26@@ ) ; } break ; case Number : v8 = @@v26@@ ; v9 = client_name ( ) ; string_sub ( @@v28@@ , String , v9 , v8 ) ; break ; case Number : string_sub ( @@v28@@ , String , remote_proto , @@v26@@ ) ; break ; case Number : v10 = @@v26@@ ; v11 = timestring ( Number L ) ; string_sub ( @@v28@@ , String , v11 , v10 ) ; break ; case Number : safe_strcpy_fn ( & unk_2C94 , Number L , @@v22@@ , @@a1@@ , Number L ) ; strlower_m ( @@v22@@ ) ; string_sub ( @@v28@@ , String , @@v22@@ , @@v26@@ ) ; break ; case Number : string_sub ( @@v28@@ , String , @@a4@@ ) ; break ; case Number : v12 = sys_getpid ( ) ; smb_snprintf ( @@v23@@ , Number L , String , v12 ) ; string_sub ( @@v28@@ , String , @@v23@@ ) ; break ; case Number : v13 = @@v26@@ ; v14 = myhostname ( ) ; string_sub ( @@v28@@ , String , v14 , v13 ) ; break ; case Number : v6 = client_socket_addr ( ) ; string_sub ( @@v28@@ , String , v6 ) ; break ; case Number : v15 = @@v26@@ ; v16 = get_remote_machine_name ( ) ; string_sub ( @@v28@@ , String , v16 , v15 ) ; break ; case Number : v17 = @@v26@@ ; v18 = samba_version_string ( ) ; string_sub ( @@v28@@ , String , v18 , v17 ) ; break ; default : @@v28@@ += Number L ; break ; } } return result ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "int", "s": 4}, "location": "r16"}, {"n": "a4", "t": {"T": 1, "n": "double", "s": 8}, "location": "r496"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r64"}, {"n": "v22", "t": {"T": 2, "n": 1024, "s": 1, "t": "char"}, "location": "s1344"}, {"n": "v28", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s24"}, {"n": "i", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s32"}, {"n": "v23", "t": {"T": 2, "n": 264, "s": 1, "t": "char"}, "location": "s320"}, {"n": "v26", "t": {"T": 1, "n": "int", "s": 4}, "location": "s36"}, {"n": "v25", "t": {"T": 3, "t": "_BYTE"}, "location": "s48"}, {"n": "v24", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s56"}]}
{"name": "get_local_machine_name", "code": "_BYTE * get_local_machine_name ( ) { _BYTE * @@result@@ ; if ( local_machine [ Number ] ) @@result@@ = local_machine ; else @@result@@ = ( _BYTE * ) global_myname ( ) ; return @@result@@ ; }", "source": [{"n": "result", "t": {"T": 3, "t": "_BYTE"}, "location": "r8"}]} {"name": "expand_env_var", "code": "__int64 __fastcall expand_env_var ( __int64 @@a1@@ , int @@a2@@ ) { __int64 result ; unsigned __int64 v3 ; unsigned __int64 v4 ; char @@dest@@ [ Number ] ; char * @@v6@@ ; int @@v7@@ ; char * @@src@@ ; __int64 @@v9@@ ; if ( * ( _BYTE * ) ( @@a1@@ + Number ) != Number ) return Number L ; if ( * ( _BYTE * ) ( @@a1@@ + Number ) != Number ) return Number L ; @@v9@@ = strchr_m ( @@a1@@ , Number L ) ; if ( @@v9@@ ) { @@src@@ = ( char * ) ( @@a1@@ + Number ) ; v3 = @@v9@@ - ( @@a1@@ + Number ) ; if ( v3 > Number ) LODWORD ( v3 ) = Number ; @@v7@@ = v3 ; strncpy ( @@dest@@ , @@src@@ , ( int ) v3 ) ; @@dest@@ [ @@v7@@ ] = Number ; @@v6@@ = getenv ( @@dest@@ ) ; if ( @@v6@@ ) { v4 = @@v9@@ + Number - @@a1@@ ; if ( v4 > Number ) LODWORD ( v4 ) = Number ; @@v7@@ = v4 ; strncpy ( @@dest@@ , ( const char * ) @@a1@@ , ( int ) v4 ) ; @@dest@@ [ @@v7@@ ] = Number ; string_sub ( @@a1@@ , @@dest@@ , @@v6@@ , @@a2@@ ) ; result = Number L ; } else { if ( ( ( int ) * DEBUGLEVEL_CLASS >= Number || ! * DEBUGLEVEL_CLASS_ISSET && ( int ) * DEBUGLEVEL_CLASS >= Number ) && ( unsigned int ) dbghdr ( Number L , String , String , Number L ) ) { dbgtext ( String , @@dest@@ ) ; } result = Number L ; } } else { if ( ( int ) * DEBUGLEVEL_CLASS >= Number || ! * DEBUGLEVEL_CLASS_ISSET && ( int ) * DEBUGLEVEL_CLASS >= Number ) { if ( ( unsigned int ) dbghdr ( Number L , String , String , Number L ) ) dbgtext ( String , ( const char * ) @@a1@@ ) ; } result = Number L ; } 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": "src", "t": {"T": 3, "t": "char"}, "location": "s16"}, {"n": "v7", "t": {"T": 1, "n": "int", "s": 4}, "location": "s20"}, {"n": "dest", "t": {"T": 2, "n": 256, "s": 1, "t": "char"}, "location": "s288"}, {"n": "v6", "t": {"T": 3, "t": "char"}, "location": "s32"}, {"n": "v9", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s8"}]} {"name": "standard_sub_advanced", "code": "__int64 __fastcall standard_sub_advanced ( unsigned int @@a1@@ , __int64 @@a2@@ , __int64 @@a3@@ , unsigned int @@a4@@ , __int64 @@a5@@ , __int64 @@a6@@ , double @@a7@@ , __int64 @@a8@@ ) { int v8 ; char * v9 ; __int64 v10 ; __int64 v11 ; __int64 v12 ; char * v13 ; __int64 @@v15@@ ; __int64 @@v19@@ ; int @@v20@@ ; __int64 @@i@@ ; __int64 @@v22@@ ; @@v15@@ = @@a6@@ ; for ( @@i@@ = @@a6@@ ; ; @@i@@ = @@v22@@ ) { @@v22@@ = strchr_m ( @@i@@ , Number L ) ; if ( ! @@v22@@ ) break ; @@v20@@ = @@a8@@ - ( @@v22@@ - @@v15@@ ) ; if ( @@v20@@ < Number ) @@v20@@ = Number ; v8 = * ( char * ) ( @@v22@@ + Number ) ; if ( * ( _BYTE * ) ( @@v22@@ + Number ) ) { if ( v8 < Number || v8 > Number || v8 < Number ) { LABEL_19 : @@v22@@ += Number L ; } else { switch ( * ( _BYTE * ) ( @@v22@@ + Number ) ) { case String : @@v19@@ = get_user_home_dir ( @@a2@@ ) ; if ( @@v19@@ ) string_sub ( @@v22@@ , String , @@v19@@ , @@v20@@ ) ; else @@v22@@ += Number L ; break ; case String : v9 = automount_server ( ) ; string_sub ( @@v22@@ , String , v9 , @@v20@@ ) ; break ; case String : string_sub ( @@v22@@ , String , @@a3@@ , @@v20@@ ) ; break ; case String : v10 = lp_servicename ( @@a1@@ ) ; string_sub ( @@v22@@ , String , v10 , @@v20@@ ) ; break ; case String : v11 = gidtoname ( @@a4@@ ) ; string_sub ( @@v22@@ , String , v11 , @@v20@@ ) ; break ; case String : v12 = lp_servicename ( @@a1@@ ) ; v13 = automount_path ( v12 ) ; string_sub ( @@v22@@ , String , v13 , @@v20@@ ) ; break ; case String : string_sub ( @@v22@@ , String , @@a2@@ , @@v20@@ ) ; break ; default : goto LABEL_19 ; } } } else { ++ @@v22@@ ; } } return standard_sub_basic ( @@a5@@ , @@v15@@ , @@a8@@ , @@a7@@ ) ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r16"}, {"n": "a4", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r24"}, {"n": "a7", "t": {"T": 1, "n": "double", "s": 8}, "location": "r496"}, {"n": "a1", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r64"}, {"n": "a5", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r72"}, {"n": "a6", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r80"}, {"n": "a8", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s-16"}, {"n": "v22", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s24"}, {"n": "i", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s32"}, {"n": "v20", "t": {"T": 1, "n": "int", "s": 4}, "location": "s36"}, {"n": "v19", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s48"}, {"n": "v15", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s88"}]}