Function at 0x404340
Capabilities:
Accept command line arguments
Get file size
Query or enumerate registry value
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x15c
test byte [0x40608c], 8
jne 0x404b98
call dword [sym.imp.kernel32.dll_GetCommandLineW]
lea edx, [ebp - 0x128]
mov dword [esp], eax
mov dword [esp + 4], edx
call dword [sym.imp.shell32.dll_CommandLineToArgvW]
sub esp, 8
mov edi, eax
test eax, eax
je 0x404430
mov edx, dword [ebp - 0x128]
mov ebx, 1
cmp edx, 1
jg 0x4043c5
jmp 0x40441a
mov dword [esp + 4], 0x408e80
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll__wcsicmp]
test eax, eax
jne 0x4043f0
mov eax, 0xffffffff
mov word [0x406018], ax
mov edx, dword [ebp - 0x128]
add ebx, 1
cmp edx, ebx
jle 0x40441a
mov ecx, dword [edi + ebx*4]
movzx eax, word [ecx]
mov esi, eax
and esi, 0xfffffffd
cmp si, 0x2d
jne 0x4044e0
lea esi, [ecx + 2]
cmp ax, 0x2f
jne 0x404398
cmp word [ecx + 2], 0x2f
jne 0x404398
lea esi, [ecx + 4]
jmp 0x404398
mov dword [esp + 4], 0x408e84
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll__wcsicmp]
test eax, eax
jne 0x404448
mov edx, dword [ebp - 0x128]
add ebx, 1
xor eax, eax
mov word [0x406018], ax
cmp edx, ebx
jg 0x4043c5
test byte [0x40608c], 1
jne 0x404dc4
lea esi, [esi]
nop
mov ebx, 1
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret 0x10
mov dword [esp + 4], 0x408e88
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll__wcsicmp]
test eax, eax
jne 0x404c20
test byte [0x40608c], 1
je 0x4043b8
mov eax, 0x408e88
shr eax, 0x10
test eax, eax
je 0x404d97
mov dword [esp + 4], 0xffffffff
mov dword [esp], 0x408e88
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x4044ab
mov eax, 0x408e88
call fcn.00403a10
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.ignored__s_switch_n
mov dword [esp + 8], 0x4091c8
mov dword [esp + 4], 0x40608c
mov dword [esp], 0
call fcn.00403c50
jmp 0x4043b8
lea eax, [edi + ebx*4 + 4]
sub edx, ebx
mov dword [0x412004], eax
lea eax, [ebp - 0x12c]
sub edx, 1
mov dword [section..bss], edx
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x412040
mov dword [esp + 4], 0x104
mov dword [esp], ecx
mov dword [ebp - 0x130], ecx
call dword [sym.imp.kernel32.dll_GetFullPathNameW]
sub eax, 1
sub esp, 0x10
cmp eax, 0x103
ja 0x404430
mov dword [esp + 4], 0x2e
mov eax, dword [ebp - 0x12c]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcsrchr]
mov edi, eax
test eax, eax
je 0x404db0
lea eax, [ebp - 0x120]
mov esi, dword [sym.imp.advapi32.dll_RegOpenKeyW]
mov dword [esp + 4], edi
mov dword [esp + 8], eax
mov dword [esp], 0x80000000
call esi
sub esp, 0xc
test eax, eax
jne 0x404d20
lea eax, [ebp - 0x124]
mov ebx, dword [sym.imp.advapi32.dll_RegQueryValueW]
mov dword [ebp - 0x124], 0x40
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x10c]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x120]
mov dword [esp], eax
call ebx
mov edx, dword [sym.imp.advapi32.dll_RegCloseKey]
mov dword [ebp - 0x134], eax
mov eax, dword [ebp - 0x120]
sub esp, 0x10
mov dword [esp], eax
mov dword [ebp - 0x138], edx
call edx
mov eax, dword [ebp - 0x134]
sub esp, 4
test eax, eax
jne 0x404d20
test byte [0x40608c], 8
mov ecx, dword [ebp - 0x130]
jne 0x404ee3
cmp word [ebp - 0x10c], 0
lea edx, [ebp - 0x10c]
je 0x404611
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x404608
xor eax, eax
mov dword [ebp - 0x130], ecx
lea esi, [esi]
movzx ecx, word [eax + str.ScriptEngine]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x404620
lea eax, [ebp - 0x120]
mov dword [esp], 0x80000000
mov dword [esp + 8], eax
lea eax, [ebp - 0x10c]
mov dword [esp + 4], eax
call esi
sub esp, 0xc
test eax, eax
jne 0x404d20
mov dword [ebp - 0x124], 0x40
lea eax, [ebp - 0x124]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x8c]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x120]
mov dword [esp], eax
call ebx
mov ebx, eax
mov eax, dword [ebp - 0x120]
sub esp, 0x10
mov dword [esp], eax
mov eax, dword [ebp - 0x138]
call eax
sub esp, 4
test ebx, ebx
jne 0x404d20
test byte [0x40608c], 8
mov ecx, dword [ebp - 0x130]
jne 0x404fc6
lea eax, [ebp - 0x8c]
mov dword [ebp - 0x130], ecx
lea esi, [ebp - 0x11c]
mov dword [esp], eax
mov dword [esp + 4], esi
call dword [sym.imp.ole32.dll_CLSIDFromProgID]
mov ecx, dword [ebp - 0x130]
sub esp, 8
test eax, eax
js 0x404d20
mov dword [ebp - 0x130], ecx
mov dword [esp], 0
call dword [sym.imp.ole32.dll_CoInitialize]
lea eax, [ebp - 0x8c]
sub esp, 4
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x40fab8
mov dword [esp + 8], 3
mov dword [esp + 4], 0
mov dword [esp], esi
call dword [sym.imp.ole32.dll_CoCreateInstance]
sub esp, 0x14
test eax, eax
js 0x404e17
mov eax, dword [ebp - 0x8c]
lea edi, [ebp - 0x10c]
mov edx, dword [eax]
mov dword [esp + 8], edi
mov dword [esp + 4], 0x40c7d8
mov dword [esp], eax
call dword [edx]
mov esi, eax
mov eax, dword [ebp - 0x8c]
sub esp, 0xc
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
test esi, esi
js 0x404e17
mov eax, dword [ebp - 0x10c]
lea edi, [ebp - 0x120]
mov edx, dword [eax]
mov dword [esp + 8], edi
mov dword [esp + 4], 0x40c7c8
mov dword [esp], eax
call dword [edx]
mov ecx, dword [ebp - 0x130]
sub esp, 0xc
test eax, eax
js 0x404e06
lea eax, [ebp - 0x8c]
mov dword [ebp - 0x130], ecx
mov edi, dword [ebp - 0x10c]
mov esi, dword [ebp - 0x120]
mov dword [esp + 4], eax
mov dword [esp], str.wscript.exe
call dword [sym.imp.oleaut32.dll_LoadTypeLib]
mov ecx, dword [ebp - 0x130]
sub esp, 8
test eax, eax
js 0x404ead
mov eax, dword [ebp - 0x8c]
mov dword [ebp - 0x130], ecx
mov edx, dword [eax]
mov dword [esp + 8], 0x412024
mov dword [esp + 4], 0x4091fc
mov dword [esp], eax
call dword [edx + 0x18]
mov ecx, dword [ebp - 0x130]
sub esp, 0xc
test eax, eax
js 0x404e9c
mov eax, dword [ebp - 0x8c]
mov dword [ebp - 0x134], ecx
mov edx, dword [eax]
mov dword [esp + 8], 0x412020
mov dword [esp + 4], 0x40921c
mov dword [esp], eax
call dword [edx + 0x18]
mov dword [ebp - 0x130], eax
mov eax, dword [ebp - 0x8c]
sub esp, 0xc
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
mov eax, dword [ebp - 0x130]
sub esp, 4
test eax, eax
js 0x404ead
mov eax, dword [edi]
mov dword [esp + 4], 0x406044
mov dword [esp], edi
call dword [eax + 0xc]
sub esp, 8
test eax, eax
js 0x404ead
mov eax, dword [esi]
mov dword [esp], esi
call dword [eax + 0xc]
sub esp, 4
test eax, eax
js 0x404ead
mov eax, dword [edi]
mov dword [esp + 8], 2
mov dword [esp + 4], str.WScript
mov dword [esp], edi
call dword [eax + 0x20]
sub esp, 0xc
test eax, eax
js 0x404ead
mov eax, dword [edi]
mov dword [esp + 8], 2
mov dword [esp + 4], 0x408e58
mov dword [esp], edi
call dword [eax + 0x20]
sub esp, 0xc
test eax, eax
js 0x404ead
mov eax, dword [edi]
mov dword [esp + 4], 5
mov dword [esp], edi
call dword [eax + 0x14]
sub esp, 8
test eax, eax
js 0x404ead
mov eax, dword [ebp - 0x120]
mov dword [ebp - 0x138], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 1
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x80000000
mov ecx, dword [ebp - 0x134]
mov dword [esp], ecx
call dword [sym.imp.kernel32.dll_CreateFileW]
sub esp, 0x1c
mov esi, eax
cmp eax, 0xffffffff
je 0x405073
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileSize]
sub esp, 8
mov dword [ebp - 0x134], eax
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_CreateFileMappingW]
mov ecx, dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 0x18
mov dword [ebp - 0x130], eax
mov dword [esp], esi
mov dword [ebp - 0x13c], ecx
call ecx
mov edx, dword [ebp - 0x130]
sub esp, 4
cmp edx, 0xffffffff
je 0x405073
mov dword [esp], edx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 4
call dword [sym.imp.kernel32.dll_MapViewOfFile]
mov edx, dword [ebp - 0x130]
sub esp, 0x14
mov esi, eax
mov dword [esp], edx
mov ecx, dword [ebp - 0x13c]
call ecx
sub esp, 4
test esi, esi
je 0x405073
mov edx, dword [sym.imp.kernel32.dll_MultiByteToWideChar]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov eax, dword [ebp - 0x134]
mov dword [esp + 0xc], eax
mov dword [ebp - 0x130], esi
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [ebp - 0x140], edx
call edx
sub esp, 0x18
mov dword [esp + 4], eax
mov dword [ebp - 0x13c], eax
mov dword [esp], 0
call dword [sym.imp.oleaut32.dll_SysAllocStringLen]
mov ecx, dword [ebp - 0x13c]
sub esp, 8
mov esi, eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
mov edx, dword [ebp - 0x134]
mov dword [esp + 0xc], edx
mov eax, dword [ebp - 0x130]
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x140]
call edx
mov eax, dword [ebp - 0x130]
sub esp, 0x18
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_UnmapViewOfFile]
sub esp, 4
test esi, esi
je 0x405073
mov edx, dword [ebp - 0x138]
mov eax, dword [edx]
mov dword [esp], edx
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0x82
mov dword [esp + 0x18], 1
mov dword [esp + 0x14], 1
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], esi
call dword [eax + 0x14]
sub esp, 0x28
mov dword [ebp - 0x130], eax
mov dword [esp], esi
call dword [sym.imp.oleaut32.dll_SysFreeString]
mov eax, dword [ebp - 0x130]
sub esp, 4
test eax, eax
js 0x4050f4
mov eax, dword [edi]
mov dword [esp + 4], 1
mov dword [esp], edi
call dword [eax + 0x14]
sub esp, 8
test eax, eax
js 0x4050bc
mov eax, dword [edi]
mov dword [esp], edi
call dword [eax + 0x1c]
mov eax, dword [0x412024]
sub esp, 4
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov eax, dword [edi]
mov dword [esp], edi
call dword [eax + 8]
mov eax, dword [ebp - 0x120]
sub esp, 4
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
call dword [sym.imp.ole32.dll_CoUninitialize]
jmp 0x404435
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x404d8d
mov eax, dword [ebp + 0x10]
shr eax, 0x10
test eax, eax
je 0x404c90
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x404bdb
mov eax, dword [ebp + 0x10]
call fcn.00403a10
mov edx, dword [ebp + 0x14]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], str.__p__p__s__x__n
mov dword [esp + 8], str.wWinMain
mov dword [esp + 4], 0x40608c
mov dword [esp + 0x10], eax
mov dword [esp], 3
call fcn.00403c50
jmp 0x404359
mov dword [esp + 4], 0x408eaa
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll__wcsicmp]
test eax, eax
jne 0x404cb0
test byte [0x40608c], 1
je 0x4043b8
mov eax, 0x408eaa
shr eax, 0x10
test eax, eax
je 0x404ded
mov dword [esp + 4], 0xffffffff
mov dword [esp], 0x408eaa
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x4044ab
mov eax, 0x408eaa
call fcn.00403a10
jmp 0x4044ab
mov eax, dword [ebp + 0x10]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.004039b0
jmp 0x404bdb
mov dword [esp + 4], 0x408eae
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll__wcsicmp]
test eax, eax
jne 0x404e2f
test byte [0x40608c], 1
je 0x4043b8
mov eax, 0x408eae
shr eax, 0x10
test eax, eax
je 0x404fad
mov dword [esp + 4], 0xffffffff
mov dword [esp], 0x408eae
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x4044ab
mov eax, 0x408eae
call fcn.00403a10
jmp 0x4044ab
test byte [0x40608c], 1
je 0x404430
mov eax, edi
shr eax, 0x10
test eax, eax
je 0x404f6f
mov dword [esp + 4], 0xffffffff
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x404d60
mov eax, edi
call fcn.00403a10
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Could_not_find_engine_for__s_n
mov dword [esp + 8], str.wWinMain
mov dword [esp + 4], 0x40608c
mov dword [esp], 0
call fcn.00403c50
jmp 0x404430
mov eax, str._null_
jmp 0x404bdb
mov dword [esp + 4], 0x408e88
mov dword [esp], str._04x
call fcn.004039b0
jmp 0x4044ab
test byte [0x40608c], 1
je 0x404430
mov eax, str._null_
jmp 0x404d60
mov dword [esp + 0xc], str.No_file_name_specified_n
mov dword [esp + 8], str.wWinMain
mov dword [esp + 4], 0x40608c
mov dword [esp], 0
call fcn.00403c50
jmp 0x404430
mov dword [esp + 4], 0x408eaa
mov dword [esp], str._04x
call fcn.004039b0
jmp 0x4044ab
mov eax, dword [ebp - 0x10c]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
test byte [0x40608c], 1
jne 0x404f84
call dword [sym.imp.ole32.dll_CoUninitialize]
jmp 0x404430
test byte [0x40608c], 1
je 0x404430
mov eax, esi
shr eax, 0x10
test eax, eax
je 0x4050a7
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x404e6f
mov eax, esi
call fcn.00403a10
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.unsupported_switch__s_n
mov dword [esp + 8], 0x4091c8
mov dword [esp + 4], 0x40608c
mov dword [esp], 0
call fcn.00403c50
jmp 0x404430
mov eax, dword [ebp - 0x8c]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
test byte [0x40608c], 1
je 0x404b6e
mov dword [esp + 0xc], str.Script_initialization_failed_n
mov dword [esp + 8], str.wWinMain
mov dword [esp + 4], 0x40608c
mov dword [esp], 0
call fcn.00403c50
jmp 0x404b6e
lea eax, [ebp - 0x10c]
shr eax, 0x10
test eax, eax
je 0x405052
lea eax, [ebp - 0x10c]
mov dword [ebp - 0x130], ecx
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, dword [ebp - 0x130]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x404f36
lea eax, [ebp - 0x10c]
call fcn.00403a10
mov ecx, dword [ebp - 0x130]
mov dword [ebp - 0x130], ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.fileid_is__s_n
mov dword [esp + 8], str.get_engine_clsid
mov dword [esp + 4], 0x40608c
mov dword [esp], 3
call fcn.00403c50
mov ecx, dword [ebp - 0x130]
jmp 0x4045f2
mov dword [esp + 4], edi
mov dword [esp], str._04x
call fcn.004039b0
jmp 0x404d60
mov dword [esp + 0xc], str.Could_not_create_script_engine_n
mov dword [esp + 8], str.wWinMain
mov dword [esp + 4], 0x40608c
mov dword [esp], 0
call fcn.00403c50
jmp 0x404e24
mov dword [esp + 4], 0x408eae
mov dword [esp], str._04x
call fcn.004039b0
jmp 0x4044ab
lea eax, [ebp - 0x8c]
shr eax, 0x10
test eax, eax
je 0x40512c
lea eax, [ebp - 0x8c]
mov dword [ebp - 0x130], ecx
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, dword [ebp - 0x130]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x405019
lea eax, [ebp - 0x8c]
call fcn.00403a10
mov ecx, dword [ebp - 0x130]
mov dword [ebp - 0x130], ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.ProgID_is__s_n
mov dword [esp + 8], str.get_engine_clsid
mov dword [esp + 4], 0x40608c
mov dword [esp], 3
call fcn.00403c50
mov ecx, dword [ebp - 0x130]
jmp 0x4046c0
lea eax, [ebp - 0x10c]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.004039b0
mov ecx, dword [ebp - 0x130]
jmp 0x404f36
test byte [0x40608c], 1
je 0x404b53
xor ecx, ecx
mov dword [esp + 0xc], str.Could_not_get_script_text_n
mov dword [esp + 8], str.run_script
mov dword [esp + 4], 0x40608c
mov dword [esp], ecx
call fcn.00403c50
jmp 0x404b53
mov dword [esp + 4], esi
mov dword [esp], str._04x
call fcn.004039b0
jmp 0x404e6f
test byte [0x40608c], 1
je 0x404b53
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0xc], str.SetScriptState_failed:__08lx_n
mov dword [esp + 8], str.run_script
mov dword [esp + 4], 0x40608c
mov dword [esp], eax
call fcn.00403c50
jmp 0x404b53
test byte [0x40608c], 1
je 0x404b53
xor edx, edx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.ParseScriptText_failed:__08lx_n
mov dword [esp + 8], str.run_script
mov dword [esp + 4], 0x40608c
mov dword [esp], edx
call fcn.00403c50
jmp 0x404b53
lea eax, [ebp - 0x8c]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.004039b0
mov ecx, dword [ebp - 0x130]
jmp 0x405019