{"name": "pjsua_app_init", "code": "__int64 __fastcall pjsua_app_init ( const void * @@a1@@ ) { unsigned int @@v2@@ ; pj_memcpy ( & app_cfg , @@a1@@ , Number ) ; @@v2@@ = app_init ( ) ; if ( @@v2@@ ) return @@v2@@ ; if ( app_config [ Number ] ) @@v2@@ = cli_init ( ) ; return @@v2@@ ; }", "source": [{"n": "a1", "t": {"T": 3, "t": "const void"}, "location": "r56"}, {"n": "v2", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s4"}]}
{"name": "pj_memcpy", "code": "void * __fastcall pj_memcpy ( void * @@a1@@ , const void * @@a2@@ , size_t @@a3@@ ) { return memcpy ( @@a1@@ , @@a2@@ , @@a3@@ ) ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "size_t", "s": 8}, "location": "r16"}, {"n": "a1", "t": {"T": 3, "t": "void"}, "location": "r56"}, {"n": "a2", "t": {"T": 3, "t": "const void"}, "location": "r64"}]} {"name": "app_init", "code": "__int64 app_init ( ) { __int64 @@v1@@ ; __int64 v2 ; unsigned __int64 v3 ; __int64 v4 ; __int64 v5 ; __int64 v6 ; __int64 v7 ; __int64 v8 ; unsigned int * v9 ; __int64 v10 ; int @@v11@@ [ Number ] ; __int16 @@s@@ ; __int16 @@v13@@ ; __int16 @@v14@@ ; _WORD @@v15@@ [ Number ] ; __int16 @@v16@@ ; _BYTE @@v17@@ [ Number ] ; unsigned __int16 @@v18@@ ; char @@v19@@ [ Number ] ; int @@v20@@ ; unsigned int @@v21@@ ; unsigned int @@v22@@ ; unsigned int @@v23@@ ; unsigned int @@v24@@ ; __int64 @@v25@@ ; __int64 @@v26@@ ; __int64 @@v27@@ [ Number ] ; __int64 @@v28@@ ; __int64 @@v29@@ ; unsigned int @@v30@@ ; int @@v31@@ [ Number ] ; unsigned int @@v32@@ ; unsigned int @@v33@@ ; int @@v34@@ ; _BYTE * @@v35@@ ; unsigned int @@v36@@ ; _BYTE * @@v37@@ ; int @@v38@@ ; unsigned int @@v39@@ ; __int64 @@v40@@ ; unsigned int @@j@@ ; unsigned int @@v42@@ ; unsigned int @@v43@@ ; unsigned int @@i@@ ; @@v32@@ = Number ; @@v43@@ = pjsua_create ( ) ; if ( @@v43@@ ) return @@v43@@ ; * ( _QWORD * ) & app_config [ Number ] = pjsua_pool_create ( String , Number L , Number L ) ; @@v40@@ = pjsua_pool_create ( String , Number L , Number L ) ; if ( ! app_running ) { pj_cli_cfg_default ( ( unsigned int ) ( ( _DWORD ) app_config + Number ) ) ; pj_cli_telnet_cfg_default ( ( unsigned int ) ( ( _DWORD ) app_config + Number ) ) ; pj_cli_console_cfg_default ( ( unsigned int ) ( ( _DWORD ) app_config + Number ) ) ; * ( _QWORD * ) & app_config [ Number ] = cli_on_started ; } @@v43@@ = load_config ( ( unsigned int ) app_cfg , qword_3488 , uri_arg ) ; if ( @@v43@@ ) goto LABEL_6 ; * ( _QWORD * ) & app_config [ Number ] = on_call_state ; * ( _QWORD * ) & app_config [ Number ] = on_call_media_state ; * ( _QWORD * ) & app_config [ Number ] = on_incoming_call ; * ( _QWORD * ) & app_config [ Number ] = on_call_tsx_state ; * ( _QWORD * ) & app_config [ Number ] = call_on_dtmf_callback ; * ( _QWORD * ) & app_config [ Number ] = call_on_redirected ; * ( _QWORD * ) & app_config [ Number ] = on_reg_state ; * ( _QWORD * ) & app_config [ Number ] = on_incoming_subscribe ; * ( _QWORD * ) & app_config [ Number ] = on_buddy_state ; * ( _QWORD * ) & app_config [ Number ] = on_buddy_evsub_state ; * ( _QWORD * ) & app_config [ Number ] = on_pager ; * ( _QWORD * ) & app_config [ Number ] = on_typing ; * ( _QWORD * ) & app_config [ Number ] = on_call_transfer_status ; * ( _QWORD * ) & app_config [ Number ] = on_call_replaced ; * ( _QWORD * ) & app_config [ Number ] = on_nat_detect ; * ( _QWORD * ) & app_config [ Number ] = on_mwi_info ; * ( _QWORD * ) & app_config [ Number ] = on_transport_state ; * ( _QWORD * ) & app_config [ Number ] = on_ice_transport_error ; * ( _QWORD * ) & app_config [ Number ] = on_snd_dev_operation ; * ( _QWORD * ) & app_config [ Number ] = on_call_media_event ; if ( app_config [ Number ] ) app_config [ Number ] = app_config [ Number ] ; if ( app_config [ Number ] ) app_config [ Number ] = app_config [ Number ] ; if ( qword_34A0 ) qword_34A0 ( app_config ) ; @@v43@@ = pjsua_init ( app_config , ( unsigned int ) ( ( _DWORD ) app_config + Number ) , ( unsigned int ) ( ( _DWORD ) app_config + Number ) ) ; if ( @@v43@@ ) { LABEL_6 : pj_pool_release ( @@v40@@ ) ; return @@v43@@ ; } @@v1@@ = pjsua_get_pjsip_endpt ( ) ; @@v43@@ = pjsip_endpt_register_module ( @@v1@@ , & mod_default_handler ) ; if ( @@v43@@ ) return @@v43@@ ; for ( @@i@@ = Number ; @@i@@ <= Number ; ++ @@i@@ ) { app_config [ Number * @@i@@ + Number ] = Number ; * ( _QWORD * ) & app_config [ Number * ( unsigned __int64 ) @@i@@ + Number ] = call_timeout_callback ; } for ( @@i@@ = Number ; @@i@@ < app_config [ Number ] ; ++ @@i@@ ) { @@v42@@ = Number ; if ( app_config [ Number ] ) @@v42@@ |= Number ; @@v43@@ = pjsua_player_create ( & app_config [ Number * @@i@@ + Number ] , @@v42@@ , & @@v30@@ ) ; if ( @@v43@@ ) goto LABEL_100 ; if ( app_config [ Number ] == Number ) { app_config [ Number ] = @@v30@@ ; app_config [ Number ] = pjsua_player_get_conf_port ( app_config [ Number ] ) ; if ( app_config [ Number ] ) { pjsua_player_get_port ( app_config [ Number ] , & @@v29@@ ) ; @@v43@@ = pjmedia_wav_player_set_eof_cb ( @@v29@@ , Number L , on_playfile_done ) ; if ( @@v43@@ ) goto LABEL_100 ; pj_timer_entry_init ( ( unsigned int ) ( ( _DWORD ) app_config + Number ) , Number L , Number L , hangup_timeout_callback ) ; } } } for ( @@i@@ = Number ; @@i@@ < app_config [ Number ] ; ++ @@i@@ ) { snprintf ( ( char * ) & @@s@@ , Number , String , ( unsigned int ) SLOWORD ( app_config [ Number * @@i@@ + Number ] ) , ( unsigned int ) SHIWORD ( app_config [ Number * @@i@@ + Number ] ) ) ; @@v27@@ [ Number ] = pj_str ( & @@s@@ ) ; @@v27@@ [ Number ] = v2 ; @@v33@@ = pjmedia_tonegen_create2 ( * ( _QWORD * ) & app_config [ Number ] , @@v27@@ , Number L , Number L , Number L , Number L , Number L , & @@v28@@ ) ; if ( @@v33@@ ) { pjsua_perror ( String , String , @@v33@@ ) ; goto LABEL_100 ; } @@v33@@ = pjsua_conf_add_port ( * ( _QWORD * ) & app_config [ Number ] , @@v28@@ , & app_config [ @@i@@ + Number ] ) ; if ( @@v33@@ ) _assert_fail ( String , String , Number , String ) ; @@v33@@ = pjmedia_tonegen_play ( @@v28@@ , Number L , & app_config [ Number * @@i@@ + Number ] , Number L ) ; if ( @@v33@@ ) _assert_fail ( String , String , Number , String ) ; } if ( * ( _QWORD * ) & app_config [ Number ] ) { @@v43@@ = pjsua_recorder_create ( ( unsigned int ) ( ( _DWORD ) app_config + Number ) , Number L , Number L , Number L , Number L , ( unsigned int ) ( ( _DWORD ) app_config + Number ) ) ; if ( @@v43@@ ) goto LABEL_100 ; app_config [ Number ] = pjsua_recorder_get_conf_port ( app_config [ Number ] ) ; } v3 = ( unsigned __int64 ) @@v31@@ ; pj_memcpy ( @@v31@@ , ( const void * ) ( unsigned int ) ( ( _DWORD ) app_config + Number ) , Number ) ; if ( ! app_config [ Number ] ) { @@v39@@ = app_config [ Number ] * app_config [ Number ] * app_config [ Number ] / Number ; @@v25@@ = pj_str ( String ) ; @@v26@@ = v4 ; @@v43@@ = pjmedia_tonegen_create2 ( * ( _QWORD * ) & app_config [ Number ] , & @@v25@@ , app_config [ Number ] , app_config [ Number ] , @@v39@@ , Number L , Number L , & app_config [ Number ] ) ; if ( @@v43@@ ) goto LABEL_100 ; pj_bzero ( & @@s@@ , Number ) ; for ( @@j@@ = Number ; ! @@j@@ ; @@j@@ = Number ) { @@s@@ = Number ; @@v13@@ = Number ; @@v14@@ = Number ; @@v15@@ [ Number ] = Number ; } @@v15@@ [ Number ] = Number ; pjmedia_tonegen_play ( * ( _QWORD * ) & app_config [ Number ] , Number L , & @@s@@ , Number L ) ; @@v43@@ = pjsua_conf_add_port ( * ( _QWORD * ) & app_config [ Number ] , * ( _QWORD * ) & app_config [ Number ] , ( unsigned int ) ( ( _DWORD ) app_config + Number ) ) ; if ( @@v43@@ ) goto LABEL_100 ; @@v25@@ = pj_str ( String ) ; @@v26@@ = v5 ; @@v43@@ = pjmedia_tonegen_create2 ( * ( _QWORD * ) & app_config [ Number ] , & @@v25@@ , app_config [ Number ] , app_config [ Number ] , @@v39@@ , Number L , Number L , & app_config [ Number ] ) ; if ( @@v43@@ ) goto LABEL_100 ; for ( @@j@@ = Number ; @@j@@ <= Number ; @@v15@@ [ Number * @@j@@ ++ ] = Number ) { * ( & @@s@@ + Number * @@j@@ ) = Number ; * ( & @@v13@@ + Number * @@j@@ ) = Number ; * ( & @@v14@@ + Number * @@j@@ ) = Number ; } @@v16@@ = Number ; pjmedia_tonegen_play ( * ( _QWORD * ) & app_config [ Number ] , Number L , & @@s@@ , Number L ) ; v3 = * ( _QWORD * ) & app_config [ Number ] ; @@v43@@ = pjsua_conf_add_port ( v3 , * ( _QWORD * ) & app_config [ Number ] , ( unsigned int ) ( ( _DWORD ) app_config + Number ) ) ; if ( @@v43@@ ) goto LABEL_100 ; } if ( app_config [ Number ] && ( int ) pj_log_get_level ( v3 ) > Number ) { v3 = ( unsigned __int64 ) String ; pj_log_2 ( String , String ) ; } if ( ! app_config [ Number ] ) { @@v38@@ = Number ; @@v43@@ = pjsua_transport_create ( Number L , ( unsigned int ) ( ( _DWORD ) app_config + Number ) , & @@v32@@ ) ; if ( @@v43@@ ) goto LABEL_100 ; pjsua_acc_add_local ( @@v32@@ , Number L , & @@v24@@ ) ; pjsua_acc_get_config ( @@v24@@ , @@v40@@ , & @@s@@ ) ; app_config_init_video ( & @@s@@ ) ; qmemcpy ( @@v19@@ , ( const void * ) ( unsigned int ) ( ( _DWORD ) app_config + Number ) , sizeof ( @@v19@@ ) ) ; pjsua_acc_modify ( @@v24@@ , & @@s@@ ) ; v3 = ( unsigned int ) ( ( __int64 ( * ) ( void ) ) pjsua_acc_get_default ) ( ) ; pjsua_acc_set_online_status ( v3 , Number L ) ; if ( ! app_config [ Number ] ) { pjsua_transport_get_info ( @@v32@@ , & @@s@@ ) ; @@v37@@ = @@v17@@ ; v3 = @@v18@@ ; @@v31@@ [ Number ] = ( unsigned __int16 ) pj_ntohs ( @@v18@@ ) ; } } if ( ! app_config [ Number ] && app_config [ Number ] ) { @@v36@@ = Number ; qmemcpy ( @@v11@@ , ( const void * ) ( unsigned int ) ( ( _DWORD ) app_config + Number ) , sizeof ( @@v11@@ ) ) ; if ( @@v11@@ [ Number ] ) @@v11@@ [ Number ] += Number ; else @@v11@@ [ Number ] = Number ; @@v43@@ = pjsua_transport_create ( @@v36@@ , @@v11@@ , & @@v32@@ ) ; if ( @@v43@@ ) goto LABEL_100 ; pjsua_acc_add_local ( @@v32@@ , Number L , & @@v23@@ ) ; pjsua_acc_get_config ( @@v23@@ , @@v40@@ , & @@s@@ ) ; app_config_init_video ( & @@s@@ ) ; qmemcpy ( @@v19@@ , ( const void * ) ( unsigned int ) ( ( _DWORD ) app_config + Number ) , sizeof ( @@v19@@ ) ) ; @@v20@@ = Number ; v6 = @@v23@@ ; pjsua_acc_modify ( @@v23@@ , & @@s@@ ) ; v3 = ( unsigned int ) pjsua_acc_get_default ( v6 ) ; pjsua_acc_set_online_status ( v3 , Number L ) ; if ( ! app_config [ Number ] ) { pjsua_transport_get_info ( @@v32@@ , & @@s@@ ) ; @@v35@@ = @@v17@@ ; v3 = @@v18@@ ; @@v31@@ [ Number ] = ( unsigned __int16 ) pj_ntohs ( @@v18@@ ) ; } } if ( ! app_config [ Number ] ) { @@v43@@ = pjsua_transport_create ( Number L , @@v31@@ , & @@v32@@ ) ; if ( @@v43@@ ) goto LABEL_100 ; pjsua_acc_add_local ( @@v32@@ , Number L , & @@v22@@ ) ; pjsua_acc_get_config ( @@v22@@ , @@v40@@ , & @@s@@ ) ; app_config_init_video ( & @@s@@ ) ; qmemcpy ( @@v19@@ , ( const void * ) ( unsigned int ) ( ( _DWORD ) app_config + Number ) , sizeof ( @@v19@@ ) ) ; v7 = @@v22@@ ; pjsua_acc_modify ( @@v22@@ , & @@s@@ ) ; v3 = ( unsigned int ) pjsua_acc_get_default ( v7 ) ; pjsua_acc_set_online_status ( v3 , Number L ) ; } if ( app_config [ Number ] || ! app_config [ Number ] ) { LABEL_74 : if ( @@v32@@ == Number ) { if ( ( int ) pj_log_get_level ( v3 ) > Number ) pj_log_1 ( String , String ) ; @@v43@@ = Number ; } else { for ( @@i@@ = Number ; @@i@@ < app_config [ Number ] ; ++ @@i@@ ) { qmemcpy ( & app_config [ Number * @@i@@ + Number ] , ( const void * ) ( unsigned int ) ( ( _DWORD ) app_config + Number ) , Number ) ; app_config [ Number * @@i@@ + Number ] = Number ; app_config [ Number * @@i@@ + Number ] = Number ; app_config_init_video ( & app_config [ Number * @@i@@ + Number ] ) ; v9 = & app_config [ Number * @@i@@ + Number ] ; @@v43@@ = pjsua_acc_add ( v9 , Number L , Number L ) ; if ( @@v43@@ ) goto LABEL_100 ; v3 = ( unsigned int ) pjsua_acc_get_default ( v9 ) ; pjsua_acc_set_online_status ( v3 , Number L ) ; } for ( @@i@@ = Number ; @@i@@ < app_config [ Number ] ; ++ @@i@@ ) { v3 = ( unsigned __int64 ) & app_config [ Number * @@i@@ + Number ] ; @@v43@@ = pjsua_buddy_add ( v3 , Number L ) ; if ( @@v43@@ ) { pj_perror_1 ( String , @@v43@@ , String ) ; goto LABEL_100 ; } } for ( @@i@@ = Number ; @@i@@ < app_config [ Number ] ; ++ @@i@@ ) { v3 = ( unsigned __int64 ) & app_config [ Number * @@i@@ + Number ] ; pjsua_codec_set_priority ( v3 , Number L ) ; } for ( @@i@@ = Number ; @@i@@ < app_config [ Number ] ; ++ @@i@@ ) { v3 = ( unsigned __int64 ) & app_config [ Number * @@i@@ + Number ] ; pjsua_codec_set_priority ( v3 , ( unsigned __int8 ) ( @@i@@ - Number ) ) ; } if ( app_config [ Number ] ) { @@v43@@ = pjsua_set_null_snd_dev ( v3 ) ; if ( @@v43@@ ) return @@v43@@ ; } if ( app_config [ Number ] == Number && app_config [ Number ] == Number || ( @@v43@@ = pjsua_set_snd_dev ( app_config [ Number ] , app_config [ Number ] ) ) == Number ) { pjsua_call_setting_default ( call_opt ) ; call_opt [ Number ] = app_config [ Number ] ; call_opt [ Number ] = app_config [ Number ] ; pj_pool_release ( @@v40@@ ) ; return Number L ; } } goto LABEL_100 ; } @@v34@@ = Number ; @@v31@@ [ Number ] += Number ; @@v43@@ = pjsua_transport_create ( Number L , @@v31@@ , & @@v32@@ ) ; if ( ! @@v43@@ ) { pjsua_acc_add_local ( @@v32@@ , Number L , & @@v21@@ ) ; pjsua_acc_get_config ( @@v21@@ , @@v40@@ , & @@s@@ ) ; app_config_init_video ( & @@s@@ ) ; qmemcpy ( @@v19@@ , ( const void * ) ( unsigned int ) ( ( _DWORD ) app_config + Number ) , sizeof ( @@v19@@ ) ) ; @@v20@@ = Number ; v8 = @@v21@@ ; pjsua_acc_modify ( @@v21@@ , & @@s@@ ) ; v3 = ( unsigned int ) pjsua_acc_get_default ( v8 ) ; pjsua_acc_set_online_status ( v3 , Number L ) ; goto LABEL_74 ; } LABEL_100 : v10 = @@v40@@ ; pj_pool_release ( @@v40@@ ) ; app_destroy ( v10 ) ; return @@v43@@ ; }", "source": [{"n": "v1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r8"}, {"n": "v42", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s12"}, {"n": "v19", "t": {"T": 2, "n": 432, "s": 1, "t": "char"}, "location": "s1224"}, {"n": "j", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s16"}, {"n": "v40", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s24"}, {"n": "v18", "t": {"T": 1, "n": "unsigned __int16", "s": 2}, "location": "s2782"}, {"n": "v17", "t": {"T": 2, "n": 2, "s": 1, "t": "_BYTE"}, "location": "s2784"}, {"n": "v39", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s28"}, {"n": "v16", "t": {"T": 1, "n": "__int16", "s": 2}, "location": "s2802"}, {"n": "v15", "t": {"T": 2, "n": 12, "s": 2, "t": "_WORD"}, "location": "s2826"}, {"n": "v14", "t": {"T": 1, "n": "__int16", "s": 2}, "location": "s2828"}, {"n": "v13", "t": {"T": 1, "n": "__int16", "s": 2}, "location": "s2830"}, {"n": "s", "t": {"T": 1, "n": "__int16", "s": 2}, "location": "s2832"}, {"n": "v38", "t": {"T": 1, "n": "int", "s": 4}, "location": "s32"}, {"n": "v11", "t": {"T": 2, "n": 108, "s": 4, "t": "int"}, "location": "s3264"}, {"n": "i", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s4"}, {"n": "v37", "t": {"T": 3, "t": "_BYTE"}, "location": "s40"}, {"n": "v36", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s44"}, {"n": "v31", "t": {"T": 2, "n": 111, "s": 4, "t": "int"}, "location": "s512"}, {"n": "v30", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s516"}, {"n": "v29", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s528"}, {"n": "v28", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s536"}, {"n": "v35", "t": {"T": 3, "t": "_BYTE"}, "location": "s56"}, {"n": "v27", "t": {"T": 2, "n": 3, "s": 8, "t": "__int64"}, "location": "s560"}, {"n": "v26", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s568"}, {"n": "v25", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s576"}, {"n": "v24", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s580"}, {"n": "v23", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s584"}, {"n": "v22", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s588"}, {"n": "v21", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s592"}, {"n": "v34", "t": {"T": 1, "n": "int", "s": 4}, "location": "s60"}, {"n": "v33", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s64"}, {"n": "v32", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s68"}, {"n": "v20", "t": {"T": 1, "n": "int", "s": 4}, "location": "s792"}, {"n": "v43", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s8"}]}