/* 
 * Script decompiled by jagdecs2 v3.2
 * Decompiler opts:
 * --------------
 * t1LocalAnalyzer:true
 * t2LocalAnalyzer:true
 * beautifier:true
 * --------------
 * Made by mgi125 ;)
 */


void script_4506(int a0,int a1,int a2) {
	int v2 = cs2method_10982(a2);
	if (v2 == -1) {
		return;
	}
	int v0 = cs2method_10982(v2);
	if (v0 == -1) {
		return;
	}
	int v3 = cs2method_10982(a1);
	if (v3 == -1) {
		return;
	}
	cs2method_10467(0, v2);
	cs2method_10565(1, v2);
	if (a0 != -1) {
		cs2method_10467(0, a0);
	}
	for (int v1 = cs2method_10461(cs2method_10163(a2), 1); v1 >= 0; v1 = cs2method_10461(v1, 1)) {
		if (cs2method_11038(a2, v1) == 1 && cs2method_10265(cs2method_10447()) > 0) {
			cs2method_10995(3646, 1);
			cs2method_10057(1, "Select");
			cs2method_20703(new function<script_4507>(int a0,int a1,int a2,int a3) {
				script_7772(a0, a2, a3, a1);
				return;
			}, -2147483643, new WidgetPointer(a2), new WidgetPointer(a1), new WidgetPointer(a0), "iIII");
		}
	}
	script_6360(v2);
	return;
}
