{"name": "Sys_LoadDll", "code": "void * __fastcall Sys_LoadDll ( const char * @@a1@@ , const void * * @@a2@@ , __int64 @@a3@@ ) { void * @@result@@ ; char @@s@@ [ Number ] ; char @@buf@@ [ Number ] ; void ( __fastcall * @@v7@@ ) ( __int64 ) ; __int64 @@v8@@ ; _BYTE * @@v9@@ ; _BYTE * @@v10@@ ; __int64 @@v11@@ ; char * @@v12@@ ; void * @@handle@@ ; @@v12@@ = Number L ; getcwd ( @@buf@@ , Number ) ; snprintf ( @@s@@ , Number , String , @@a1@@ ) ; @@v11@@ = Sys_Pwd ( ) ; @@v10@@ = ( _BYTE * ) Cvar_VariableString ( String ) ; @@v9@@ = ( _BYTE * ) Cvar_VariableString ( String ) ; @@v8@@ = Cvar_VariableString ( String ) ; @@handle@@ = try_dlopen ( @@v11@@ , @@v8@@ , ( __int64 ) @@s@@ ) ; if ( ! @@handle@@ && @@v9@@ && * @@v9@@ ) @@handle@@ = try_dlopen ( ( __int64 ) @@v9@@ , @@v8@@ , ( __int64 ) @@s@@ ) ; if ( ! @@handle@@ && @@v10@@ && * @@v10@@ ) @@handle@@ = try_dlopen ( ( __int64 ) @@v10@@ , @@v8@@ , ( __int64 ) @@s@@ ) ; if ( @@handle@@ ) { @@v7@@ = ( void ( __fastcall * ) ( __int64 ) ) dlsym ( @@handle@@ , String ) ; * @@a2@@ = dlsym ( @@handle@@ , String ) ; if ( * @@a2@@ && @@v7@@ ) { Com_Printf ( String , @@a1@@ , * @@a2@@ ) ; @@v7@@ ( @@a3@@ ) ; Com_Printf ( String , @@a1@@ ) ; @@result@@ = @@handle@@ ; } else { @@v12@@ = do_dlerror ( ) ; Com_Printf ( String , @@a1@@ , @@v12@@ ) ; dlclose ( @@handle@@ ) ; @@v12@@ = do_dlerror ( ) ; if ( @@v12@@ ) Com_Printf ( String , @@a1@@ , @@v12@@ ) ; @@result@@ = Number L ; } } else { Com_Printf ( String , @@a1@@ ) ; @@result@@ = Number L ; } return @@result@@ ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r16"}, {"n": "a1", "t": {"T": 3, "t": "const char"}, "location": "r56"}, {"n": "a2", "t": {"T": 3, "t": "const void *"}, "location": "r64"}, {"n": "result", "t": {"T": 3, "t": "void"}, "location": "r8"}, {"n": "v12", "t": {"T": 3, "t": "char"}, "location": "s16"}, {"n": "v11", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s24"}, {"n": "v10", "t": {"T": 3, "t": "_BYTE"}, "location": "s32"}, {"n": "v9", "t": {"T": 3, "t": "_BYTE"}, "location": "s40"}, {"n": "buf", "t": {"T": 2, "n": 4104, "s": 1, "t": "char"}, "location": "s4160"}, {"n": "v8", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s48"}, {"n": "v7", "t": {"T": 9, "n": "void (__fastcall *)(__int64)"}, "location": "s56"}, {"n": "handle", "t": {"T": 3, "t": "void"}, "location": "s8"}, {"n": "s", "t": {"T": 2, "n": 4096, "s": 1, "t": "char"}, "location": "s8256"}]}
{"name": "try_dlopen", "code": "void * __fastcall try_dlopen ( __int64 @@a1@@ , __int64 @@a2@@ , __int64 @@a3@@ ) { char * v3 ; void * result ; void * @@v5@@ ; char * @@file@@ ; @@file@@ = ( char * ) FS_BuildOSPath ( @@a1@@ , @@a2@@ , @@a3@@ ) ; Com_Printf ( String , @@file@@ ) ; @@v5@@ = dlopen ( @@file@@ , Number ) ; if ( @@v5@@ ) { Com_Printf ( String , @@file@@ ) ; result = @@v5@@ ; } else { v3 = do_dlerror ( ) ; Com_Printf ( String , @@file@@ , v3 ) ; result = Number L ; } return result ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r16"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r64"}, {"n": "v5", "t": {"T": 3, "t": "void"}, "location": "s16"}, {"n": "file", "t": {"T": 3, "t": "char"}, "location": "s8"}]}