Function at 0x402cb0
Capabilities:
Accept command line arguments
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x128
test byte [0x410028], 8
je 0x402d08
mov esi, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
call sym._wine_dbgstr_wn_1
sub esp, 0x20
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], str.__p__p__s__x__n
mov dword [esp + 8], str.wWinMain
mov dword [esp], 3
call sym._wine_dbg_log_2
add esp, 0x20
call dword [sym.imp.kernel32.dll_GetCommandLineW]
lea ecx, [ebp - 0x1c]
push ecx
push eax
call dword [sym.imp.shell32.dll_CommandLineToArgvW]
mov ecx, eax
mov eax, 1
test ecx, ecx
je 0x402ea4
mov eax, dword [ebp - 0x1c]
cmp eax, 2
jl 0x402e74
add ecx, 8
mov edi, 2
mov esi, dword [sym.imp.ucrtbase.dll__wcsicmp]
jmp 0x402d72
mov word [0x41009c], 0xffff
mov eax, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x18]
add ebx, 4
mov edx, dword [ebp - 0x20]
lea edi, [edx + 1]
cmp edx, eax
mov ecx, ebx
jge 0x402e74
mov ebx, esi
mov dword [ebp - 0x18], ecx
mov esi, dword [ecx - 4]
movzx ecx, word [esi]
mov edx, ecx
or edx, 2
cmp edx, 0x2f
jne 0x402eb1
mov dword [ebp - 0x20], edi
lea edi, [esi + 2]
cmp cx, 0x2f
jne 0x402da3
cmp word [esi + 2], 0x2f
jne 0x402da3
add esi, 4
mov edi, esi
mov esi, ebx
push 0x405e84
push edi
call ebx
add esp, 8
test eax, eax
je 0x402d50
push 0x405e88
push edi
call esi
add esp, 8
test eax, eax
je 0x402e10
push 0x405e8c
push edi
call esi
add esp, 8
test eax, eax
je 0x402e1e
push 0x405ec2
push edi
call esi
add esp, 8
test eax, eax
je 0x402e32
push 0x405ec6
push edi
call esi
add esp, 8
movzx ecx, byte [0x410028]
test eax, eax
jne 0x40302c
test cl, 1
je 0x402d59
mov ecx, 0x405ec6
jmp 0x402e44
mov word [0x41009c], 0
jmp 0x402d59
test byte [0x410028], 1
je 0x402d59
mov ecx, 0x405e8c
jmp 0x402e44
test byte [0x410028], 1
je 0x402d59
mov ecx, 0x405ec2
call sym._wine_dbgstr_wn_1
sub esp, 0x14
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.ignored__s_switch_n
mov dword [esp + 8], str.set_host_properties
mov dword [esp], 0
call sym._wine_dbg_log_2
add esp, 0x14
jmp 0x402d59
test byte [0x410028], 1
je 0x402e9f
sub esp, 0x10
mov dword [esp + 0xc], str.No_file_name_specified_n
mov dword [esp + 8], str.wWinMain
mov dword [esp], 0
call sym._wine_dbg_log_2
add esp, 0x10
mov eax, 1
add esp, 0x128
pop esi
pop edi
pop ebx
pop ebp
ret 0x10
mov ecx, dword [ebp - 0x18]
mov dword [0x410094], ecx
sub eax, edi
mov dword [0x410098], eax
lea eax, [ebp - 0x24]
push eax
push 0x4100a0
push 0x104
mov dword [ebp - 0x18], esi
push esi
call dword [sym.imp.kernel32.dll_GetFullPathNameW]
add eax, 0xfffffefb
cmp eax, 0xfffffefc
jb 0x402e9f
push 0x2e
push dword [ebp - 0x24]
call dword [sym.imp.ucrtbase.dll_wcsrchr]
add esp, 8
mov ebx, eax
test eax, eax
je 0x402fff
lea eax, [ebp - 0x14]
push eax
push ebx
push 0x80000000
call dword [sym.imp.advapi32.dll_RegOpenKeyW]
test eax, eax
jne 0x402fff
mov dword [ebp - 0x10], 0x40
lea eax, [ebp - 0x10]
lea esi, [ebp - 0xa4]
push eax
push esi
push 0
push dword [ebp - 0x14]
call dword [sym.imp.advapi32.dll_RegQueryValueW]
mov edi, eax
push dword [ebp - 0x14]
call dword [sym.imp.advapi32.dll_RegCloseKey]
test edi, edi
lea edi, [ebp - 0x14]
jne 0x402fff
test byte [0x410028], 8
je 0x402f82
lea ecx, [ebp - 0xa4]
call sym._wine_dbgstr_wn_1
sub esp, 0x14
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], 3
call sym._wine_dbg_log_2
add esp, 0x14
cmp word [esi], 0
lea esi, [esi + 2]
jne 0x402f82
mov dword [esi - 2], 0x53005c
mov dword [esi + 2], 0x720063
mov dword [esi + 6], 0x700069
mov dword [esi + 0xa], 0x450074
mov dword [esi + 0xe], 0x67006e
mov dword [esi + 0x12], 0x6e0069
mov dword [esi + 0x16], 0x65
lea eax, [ebp - 0xa4]
push edi
push eax
push 0x80000000
call dword [sym.imp.advapi32.dll_RegOpenKeyW]
test eax, eax
jne 0x402fff
mov dword [ebp - 0x10], 0x40
lea esi, [ebp - 0x134]
lea eax, [ebp - 0x10]
push eax
push esi
push 0
push dword [ebp - 0x14]
call dword [sym.imp.advapi32.dll_RegQueryValueW]
mov edi, eax
push dword [ebp - 0x14]
call dword [sym.imp.advapi32.dll_RegCloseKey]
test edi, edi
je 0x403067
test byte [0x410028], 1
je 0x402e9f
mov ecx, ebx
call sym._wine_dbgstr_wn_1
sub esp, 0x14
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Could_not_find_engine_for__s_n
mov dword [esp + 8], str.wWinMain
jmp 0x403053
test cl, 1
je 0x402e9f
mov ecx, edi
call sym._wine_dbgstr_wn_1
sub esp, 0x14
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.unsupported_switch__s_n
mov dword [esp + 8], str.set_host_properties
mov dword [esp], 0
call sym._wine_dbg_log_2
add esp, 0x14
jmp 0x402e9f
test byte [0x410028], 8
je 0x4030a1
lea ecx, [ebp - 0x134]
call sym._wine_dbgstr_wn_1
sub esp, 0x14
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], 3
call sym._wine_dbg_log_2
add esp, 0x14
lea edi, [ebp - 0xb4]
push edi
push esi
call dword [sym.imp.ole32.dll_CLSIDFromProgID]
test eax, eax
js 0x402fff
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
push esi
push 0x406168
push 3
push 0
push edi
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
js 0x40323d
mov eax, dword [ebp - 0x134]
mov ecx, dword [eax]
lea edx, [ebp - 0xa4]
push edx
push 0x409448
push eax
call dword [ecx]
mov edi, eax
mov eax, dword [ebp - 0x134]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
test edi, edi
js 0x40323d
mov eax, dword [ebp - 0xa4]
mov ecx, dword [eax]
lea edx, [ebp - 0x10]
push edx
push 0x409458
push eax
call dword [ecx]
mov ebx, dword [ebp - 0xa4]
test eax, eax
js 0x403237
mov esi, dword [ebp - 0x10]
lea eax, [ebp - 0xa4]
push eax
push str.wscript.exe
call dword [sym.imp.oleaut32.dll_LoadTypeLib]
test eax, eax
js 0x4031f0
mov eax, dword [ebp - 0xa4]
mov ecx, dword [eax]
push 0x4102a8
push 0x405dc4
push eax
call dword [ecx + 0x18]
test eax, eax
js 0x403174
mov eax, dword [ebp - 0xa4]
mov ecx, dword [eax]
push 0x4102ac
push 0x405da4
push eax
call dword [ecx + 0x18]
mov edi, eax
mov eax, dword [ebp - 0xa4]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
test edi, edi
js 0x4031f0
mov eax, dword [ebx]
push 0x410038
push ebx
call dword [eax + 0xc]
test eax, eax
js 0x4031f0
mov eax, dword [esi]
push esi
call dword [eax + 0xc]
test eax, eax
js 0x4031f0
mov eax, dword [ebx]
push 2
push str.WScript
push ebx
call dword [eax + 0x20]
test eax, eax
js 0x4031f0
mov eax, dword [ebx]
push 2
push 0x405f1e
push ebx
call dword [eax + 0x20]
test eax, eax
js 0x4031f0
mov eax, dword [ebx]
push 5
push ebx
call dword [eax + 0x14]
test eax, eax
js 0x4031f0
mov ecx, dword [ebp - 0x18]
mov edx, ebx
push dword [ebp - 0x10]
call sym._run_script
add esp, 4
mov eax, dword [ebx]
push ebx
call dword [eax + 0x1c]
mov eax, dword [0x4102a8]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x40321b
test byte [0x410028], 1
je 0x40321b
sub esp, 0x10
mov dword [esp + 0xc], str.Script_initialization_failed_n
mov dword [esp + 8], str.wWinMain
mov dword [esp], 0
call sym._wine_dbg_log_2
add esp, 0x10
mov eax, dword [ebx]
push ebx
call dword [eax + 8]
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
call dword [sym.imp.ole32.dll_CoUninitialize]
xor eax, eax
jmp 0x402ea4
mov eax, dword [ebx]
push ebx
call dword [eax + 8]
test byte [0x410028], 1
je 0x403268
sub esp, 0x10
mov dword [esp + 0xc], str.Could_not_create_script_engine_n
mov dword [esp + 8], str.wWinMain
mov dword [esp], 0
call sym._wine_dbg_log_2
add esp, 0x10
call dword [sym.imp.ole32.dll_CoUninitialize]
jmp 0x402e9f