Function at 0x40343a
Capabilities:
Write file on windows

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x68
test byte [0x40701c], 8
mov edi, dword [ecx + 4]
jne 0x403485
mov dword [esp], edi
mov ebx, dword [sym.imp.oleaut32.dll_SafeArrayGetDim]
call ebx
sub esp, 4
cmp eax, 1
je 0x403500
test byte [0x40701c], 1
mov edx, 0x80004001
jne 0x4034b0
lea esp, [ebp - 0x10]
mov eax, edx
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 8
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], 0x408204
mov dword [esp + 8], str.Host_Echo
mov dword [esp + 4], 0x40701c
mov dword [esp], 3
call sym._wine_dbg_log.constprop.16
jmp 0x403450
mov dword [ebp - 0x3c], edx
mov dword [esp], edi
call ebx
sub esp, 4
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Unsupported_args_dim__d_n
mov dword [esp + 8], str.Host_Echo
mov dword [esp + 4], 0x40701c
mov dword [esp], 0
call sym._wine_dbg_log.constprop.16
mov edx, dword [ebp - 0x3c]
lea esp, [ebp - 0x10]
pop ecx
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 8
lea eax, [ebp - 0x30]
mov dword [esp + 4], 1
mov dword [esp], edi
mov dword [esp + 8], eax
call dword [sym.imp.oleaut32.dll_SafeArrayGetLBound]
lea eax, [ebp - 0x34]
sub esp, 0xc
mov dword [esp + 4], 1
mov dword [esp], edi
mov dword [esp + 8], eax
call dword [sym.imp.oleaut32.dll_SafeArrayGetUBound]
lea eax, [ebp - 0x2c]
sub esp, 0xc
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [sym.imp.oleaut32.dll_SafeArrayAccessData]
sub esp, 8
test eax, eax
mov edx, eax
js 0x403475
mov ebx, dword [ebp - 0x34]
sub ebx, dword [ebp - 0x30]
mov dword [esp + 4], 4
lea eax, [ebx + 1]
mov dword [ebp - 0x3c], eax
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_calloc]
test eax, eax
mov dword [ebp - 0x40], eax
je 0x4039d9
mov eax, dword [ebp - 0x3c]
mov ecx, ebx
test eax, eax
je 0x403976
mov dword [ebp - 0x44], edi
xor ebx, ebx
mov edi, ecx
jmp 0x4035e3
xor eax, eax
mov dword [esp + 0xc], 8
mov dword [esp + 8], 0
mov word [ebp - 0x28], ax
lea eax, [ebp - 0x28]
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.oleaut32.dll_VariantChangeType]
sub esp, 0x10
test eax, eax
js 0x403615
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x40]
mov dword [ecx + ebx*4], eax
mov dword [esp], eax
mov esi, dword [sym.imp.oleaut32.dll_SysStringLen]
add ebx, 1
call esi
sub esp, 4
add edi, eax
cmp ebx, dword [ebp - 0x3c]
je 0x4037d0
mov esi, ebx
shl esi, 4
add esi, dword [ebp - 0x2c]
cmp word [esi], 1
jne 0x403591
mov dword [esp], str.null
call dword [sym.imp.oleaut32.dll_SysAllocString]
mov ecx, dword [ebp - 0x40]
sub esp, 4
test eax, eax
mov dword [ecx + ebx*4], eax
jne 0x4035c7
mov edi, dword [ebp - 0x44]
mov edx, 0x8007000e
jmp 0x403627
test byte [0x40701c], 4
mov edx, eax
mov edi, dword [ebp - 0x44]
jne 0x403760
mov dword [ebp - 0x44], edx
mov dword [esp], edi
call dword [sym.imp.oleaut32.dll_SafeArrayUnaccessData]
mov edx, dword [ebp - 0x44]
sub esp, 4
mov dword [ebp - 0x48], 0
xor esi, esi
mov ebx, dword [sym.imp.oleaut32.dll_SysFreeString]
mov dword [ebp - 0x44], edx
mov edi, esi
mov esi, dword [ebp - 0x40]
mov edx, dword [esi + edi*4]
add edi, 1
mov dword [esp], edx
call ebx
sub esp, 4
cmp dword [ebp - 0x3c], edi
ja 0x403650
mov edx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x40]
mov edi, dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x3c], edx
mov dword [esp], eax
call edi
mov edx, dword [ebp - 0x3c]
test edx, edx
js 0x403475
cmp word [0x407018], 0
jne 0x4037a0
mov ecx, dword [ebp - 0x48]
cmp word [ecx], 0
mov eax, ecx
je 0x4039c4
nop
add eax, 2
cmp word [eax], 0
jne 0x4036a0
sub eax, dword [ebp - 0x48]
sar eax, 1
mov dword [ebp - 0x40], eax
mov ebx, eax
mov eax, dword [sym.imp.kernel32.dll_GetStdHandle]
mov dword [esp], 0xfffffff5
mov dword [ebp - 0x3c], eax
call eax
lea ecx, [ebp - 0x28]
sub esp, 4
mov esi, dword [sym.imp.kernel32.dll_WriteConsoleW]
mov dword [esp + 0x10], 0
mov dword [esp + 8], ebx
mov dword [esp + 0xc], ecx
mov ecx, dword [ebp - 0x48]
mov dword [esp], eax
mov dword [esp + 4], ecx
call esi
sub esp, 0x14
test eax, eax
je 0x403860
cmp word [0x40858c], 0
je 0x4039d2
mov ebx, 0x40858c
lea esi, [esi]
add ebx, 2
cmp word [ebx], 0
jne 0x403710
sub ebx, 0x40858c
sar ebx, 1
mov dword [esp], 0xfffffff5
call dword [ebp - 0x3c]
lea ecx, [ebp - 0x28]
sub esp, 4
mov dword [esp + 0x10], 0
mov dword [esp + 8], ebx
mov dword [esp + 0xc], ecx
mov dword [esp + 4], 0x40858c
mov dword [esp], eax
call esi
sub esp, 0x14
mov eax, dword [ebp - 0x48]
mov dword [esp], eax
call edi
xor edx, edx
jmp 0x403475
mov dword [ebp - 0x44], eax
mov eax, esi
call dbg.wine_dbgstr_variant
mov dword [esp + 0xc], str.Could_not_convert_argument__s_to_string_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0x408c50
mov dword [esp + 4], 0x40701c
mov dword [esp], 2
call sym._wine_dbg_log.constprop.16
mov edx, dword [ebp - 0x44]
jmp 0x403627
mov eax, dword [ebp - 0x48]
mov dword [esp + 0xc], 0
mov dword [esp + 8], str.Windows_Script_Host
mov dword [esp], 0
mov dword [esp + 4], eax
call dword [sym.imp.user32.dll_MessageBoxW]
sub esp, 0x10
jmp 0x403751
mov dword [ebp - 0x48], edi
mov edi, dword [ebp - 0x44]
mov dword [esp], edi
xor edi, edi
call dword [sym.imp.oleaut32.dll_SafeArrayUnaccessData]
mov eax, dword [ebp - 0x48]
sub esp, 4
lea eax, [eax + eax + 2]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
test eax, eax
mov dword [ebp - 0x48], eax
mov ecx, eax
mov edx, 0x8007000e
je 0x403640
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x4c], ebx
mov esi, ecx
jmp 0x40381b
mov eax, 0x20
lea esi, [ebx + 2]
mov word [ebx], ax
mov eax, dword [ebp - 0x40]
mov edx, dword [eax + edi*4]
add edi, 1
mov dword [esp], edx
mov dword [ebp - 0x44], edx
call dword [ebp - 0x50]
mov edx, dword [ebp - 0x44]
lea ebx, [eax + eax]
sub esp, 4
mov dword [esp], esi
mov dword [esp + 8], ebx
add ebx, esi
mov dword [esp + 4], edx
call sym._memcpy
cmp dword [ebp - 0x4c], edi
jne 0x403810
xor ecx, ecx
xor edx, edx
mov word [ebx], cx
jmp 0x403640
mov edx, dword [sym.imp.kernel32.dll_GetOEMCP]
mov dword [ebp - 0x4c], edx
call edx
mov ecx, dword [ebp - 0x40]
mov edx, dword [ebp - 0x48]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov dword [esp], eax
mov esi, dword [sym.imp.kernel32.dll_WideCharToMultiByte]
call esi
sub esp, 0x20
mov dword [ebp - 0x44], eax
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_malloc]
test eax, eax
mov ebx, eax
je 0x403751
mov edx, dword [ebp - 0x4c]
call edx
mov ecx, dword [ebp - 0x44]
mov edx, dword [ebp - 0x48]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], ebx
mov dword [esp + 4], 0
mov dword [esp + 0x14], ecx
mov ecx, dword [ebp - 0x40]
mov dword [esp + 8], edx
mov dword [esp], eax
mov dword [esp + 0xc], ecx
call esi
sub esp, 0x20
mov dword [esp], 0xfffffff5
call dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x44]
lea edx, [ebp - 0x28]
sub esp, 4
mov esi, dword [sym.imp.kernel32.dll_WriteFile]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov dword [esp + 4], ebx
mov dword [esp + 8], ecx
mov dword [esp], eax
call esi
sub esp, 0x14
mov dword [esp], ebx
call edi
mov dword [esp], 0xfffffff5
call dword [ebp - 0x3c]
lea ecx, [ebp - 0x28]
sub esp, 4
mov dword [esp + 0x10], 0
mov dword [esp + 8], 2
mov dword [esp + 0xc], ecx
mov dword [esp + 4], 0x4085e1
mov dword [esp], eax
call esi
sub esp, 0x14
jmp 0x403751
mov dword [esp], edi
call dword [sym.imp.oleaut32.dll_SafeArrayUnaccessData]
sub esp, 4
mov dword [esp], 0
call dword [sym.imp.ucrtbase.dll_malloc]
test eax, eax
mov dword [ebp - 0x48], eax
je 0x4039ae
xor edx, edx
mov edi, dword [sym.imp.ucrtbase.dll_free]
mov word [eax], dx
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call edi
jmp 0x403682
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
mov edx, 0x8007000e
jmp 0x403475
xor ebx, ebx
mov dword [ebp - 0x40], 0
jmp 0x4036b3
xor ebx, ebx
jmp 0x403721
mov dword [esp], edi
call dword [sym.imp.oleaut32.dll_SafeArrayUnaccessData]
mov edx, 0x8007000e
push eax
jmp 0x403475