-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy pathcallTarget.js
105 lines (95 loc) · 2.16 KB
/
callTarget.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
function test0(){
var arrObj0 = {};
var func2 = function(){
}
arrObj0.method0 = func2;
var i32 = new Int32Array(2);
var VarArr0 = 1;
var __loopvar0 = 0;
for(var _strvar27 in i32 ) {
if(_strvar27.indexOf('method') != -1) continue;
if(__loopvar0++ > 3) break;
arrObj0.method0.call(Object.prototype , (arrObj0.length ? 351445441 : -496151049), VarArr0[1]);
}
};
test0();
test0();
test0();
WScript.Echo("PASSED\n");
function test1(){
var obj0 = {};
var func1 = function(){
}
obj0.method0 = func1;
var ary = new Array(10);
function _array2iterate(_array2tmp) {
for(var _array2i in _array2tmp) {
if(_array2tmp[_array2i] instanceof Array) {
_array2iterate(_array2tmp[_array2i]);
}
obj0.method0.call(obj0 , ary[1]);
}
}
_array2iterate([[obj0.prop1, [obj0.prop0]]]);
};
test1();
test1();
test1();
WScript.Echo("PASSED\n");
function test2(){
function bar0 (){
this.prop0;
}
var obj = {func: bar0};
var __loopvar1 = 0;
do {
__loopvar1++;
function v5524()
{
if(false)
{
var uniqobj0 = 1;
}
else
return obj.func.call(uniqobj0);
}
v5524();
} while((1) && __loopvar1 < 3)
};
test2();
test2();
test2();
WScript.Echo("PASSED\n");
function test3(a, b)
{
return String.prototype.replace.call(a, b, "a")
}
test3("foobar", /foo/i)
test3("foobar", /foo/i)
test3("foobar", /foo/i)
print("passed")
function test4()
{
function bar(a)
{
return 'call'
}
function test()
{
return this;
}
function foo()
{
test[bar('1')](this);
test.call(this);
}
foo()
foo()
foo()
}
test4()
print("passed")