int
__cdecl wmain(signed
int
a1,
int
a2)
{
signed
int
v2;
/
/
edi@
1
wchar_t
*
v3;
/
/
eax@
2
HRSRC v4;
/
/
eax@
9
HGLOBAL v5;
/
/
eax@
10
const char
*
v6;
/
/
eax@
11
HMODULE hLibModule;
/
/
[sp
+
Ch] [bp
-
454h
]@
1
wchar_t
*
Str
;
/
/
[sp
+
10h
] [bp
-
450h
]@
2
wchar_t
*
Str1;
/
/
[sp
+
14h
] [bp
-
44Ch
]@
2
int
(__stdcall
*
*
v11)(
int
);
/
/
[sp
+
18h
] [bp
-
448h
]@
1
int
v12;
/
/
[sp
+
1Ch
] [bp
-
444h
]@
1
int
v13;
/
/
[sp
+
20h
] [bp
-
440h
]@
14
wchar_t v14;
/
/
[sp
+
24h
] [bp
-
43Ch
]@
1
int
v15;
/
/
[sp
+
230h
] [bp
-
230h
]@
1
int
v16;
/
/
[sp
+
234h
] [bp
-
22Ch
]@
1
int
v17;
/
/
[sp
+
238h
] [bp
-
228h
]@
14
int
v18;
/
/
[sp
+
23Ch
] [bp
-
224h
]@
14
int
v19;
/
/
[sp
+
240h
] [bp
-
220h
]@
14
int
v20;
/
/
[sp
+
244h
] [bp
-
21Ch
]@
14
int
v21;
/
/
[sp
+
248h
] [bp
-
218h
]@
14
int
v22;
/
/
[sp
+
24Ch
] [bp
-
214h
]@
14
WCHAR
Buffer
;
/
/
[sp
+
250h
] [bp
-
210h
]@
1
char Dst;
/
/
[sp
+
252h
] [bp
-
20Eh
]@
1
hConsoleOutput
=
GetStdHandle(
0xFFFFFFF5
);
v14
=
0
;
v16
=
0
;
v12
=
0
;
v11
=
&off_4022D8;
Buffer
=
0
;
memset(&Dst,
0
,
0x208u
);
GetCurrentDirectoryW(
0x104u
, &
Buffer
);
v15
=
0
;
sub_4013C4(&
Buffer
);
v2
=
a1;
for
( hLibModule
=
(HMODULE)
1
; (signed
int
)hLibModule < v2
-
1
; hLibModule
=
(HMODULE)((char
*
)hLibModule
+
1
) )
{
v3
=
*
(wchar_t
*
*
)(
4
*
(_DWORD)hLibModule
+
a2
+
4
);
Str1
=
*
(wchar_t
*
*
)(
4
*
(_DWORD)hLibModule
+
a2);
Str
=
v3;
if
( !wcscmp(Str1, L
"-d"
) )
{
v15
=
1
;
v16
=
wtoi(
Str
);
}
if
( !wcscmp(Str1, L
"-f"
) )
{
sub_4013C4(
Str
);
v2
=
a1;
}
}
if
( v2 >
1
&& !wcscmp(
*
(const wchar_t
*
*
)(a2
+
4
), L
"-h"
) )
{
v4
=
FindResourceW(
0
, (LPCWSTR)
0x65
, L
"BIN"
);
if
( v4 && (v5
=
LoadResource(
0
, v4)) !
=
0
)
v6
=
(const char
*
)LockResource(v5);
else
v6
=
0
;
printf(v6);
}
else
{
hLibModule
=
0
;
sub_401B0D();
v13
=
0
;
v17
=
0
;
v18
=
0
;
v19
=
0
;
v20
=
0
;
v21
=
0
;
v22
=
0
;
sub_401004(&v14,
0
);
sub_401848();
wprintf(L
"\r\n\r\nType AltStreamDump -h to get more information about this tool.\r\n"
);
if
( hLibModule )
FreeLibrary(hLibModule);
}
return
0
;
}