Function at 0x403100
Capabilities:
Write file on windows

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff8
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x58
mov eax, dword [ecx + 4]
mov dword [ebp - 0x3c], eax
test byte [0x406018], 8
jne 0x403430
mov eax, dword [ebp - 0x3c]
mov ebx, dword [sym.imp.oleaut32.dll_SafeArrayGetDim]
mov dword [esp], eax
call ebx
mov dword [ebp - 0x44], eax
sub esp, 4
cmp eax, 1
jne 0x40369c
lea eax, [ebp - 0x28]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov edi, dword [ebp - 0x3c]
mov dword [esp], edi
call dword [sym.imp.oleaut32.dll_SafeArrayGetLBound]
lea eax, [ebp - 0x2c]
sub esp, 0xc
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov dword [esp], edi
call dword [sym.imp.oleaut32.dll_SafeArrayGetUBound]
lea eax, [ebp - 0x24]
sub esp, 0xc
mov dword [esp + 4], eax
mov dword [esp], edi
call dword [sym.imp.oleaut32.dll_SafeArrayAccessData]
sub esp, 8
mov ecx, eax
test eax, eax
js 0x4033a3
mov eax, dword [ebp - 0x2c]
sub eax, dword [ebp - 0x28]
mov dword [ebp - 0x30], eax
add eax, 1
mov dword [ebp - 0x34], eax
mov dword [esp + 4], 4
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_calloc]
mov ebx, eax
test eax, eax
je 0x40374a
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x4036af
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x38], ebx
xor esi, esi
mov edi, eax
jmp 0x40323a
xor eax, eax
mov word [ebp - 0x20], ax
lea eax, [ebp - 0x20]
mov dword [esp + 0xc], 8
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.oleaut32.dll_VariantChangeType]
sub esp, 0x10
test eax, eax
js 0x4033b8
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x38]
mov dword [ecx + esi*4], eax
mov dword [esp], eax
mov ebx, dword [sym.imp.oleaut32.dll_SysStringLen]
call ebx
mov ecx, dword [ebp - 0x30]
add edi, eax
sub esp, 4
lea eax, [esi + 1]
cmp esi, ecx
je 0x4035a0
mov esi, eax
mov ebx, dword [ebp - 0x24]
mov edx, esi
shl edx, 4
add ebx, edx
cmp word [ebx], 1
jne 0x4031e0
mov dword [esp], str.null
call dword [sym.imp.oleaut32.dll_SysAllocString]
mov ecx, dword [ebp - 0x38]
sub esp, 4
mov dword [ecx + esi*4], eax
test eax, eax
jne 0x40321a
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x3c]
mov ebx, ecx
mov dword [esp], eax
call dword [sym.imp.oleaut32.dll_SafeArrayUnaccessData]
mov ecx, 0x8007000e
push eax
lea esi, cs:[esi]
mov dword [ebp - 0x30], ecx
mov edi, dword [sym.imp.oleaut32.dll_SysFreeString]
xor esi, esi
lea esi, cs:[esi]
mov edx, dword [ebx + esi*4]
add esi, 1
mov dword [esp], edx
call edi
mov eax, dword [ebp - 0x34]
sub esp, 4
cmp esi, eax
jb 0x403290
mov dword [esp], ebx
mov esi, dword [sym.imp.ucrtbase.dll_free]
call esi
mov ecx, dword [ebp - 0x30]
test ecx, ecx
jne 0x4033a3
cmp word [0x413008], 0
jne 0x403670
mov edi, dword [ebp - 0x40]
cmp word [edi], 0
mov eax, edi
je 0x40372b
lea esi, cs:[esi]
add eax, 2
cmp word [eax], 0
jne 0x4032e0
mov ecx, dword [ebp - 0x40]
sub eax, ecx
sar eax, 1
mov dword [ebp - 0x34], eax
mov ecx, eax
mov eax, dword [sym.imp.kernel32.dll_GetStdHandle]
mov dword [ebp - 0x38], ecx
mov dword [esp], 0xfffffff5
mov dword [ebp - 0x30], eax
call eax
lea ecx, [ebp - 0x20]
mov ebx, dword [sym.imp.kernel32.dll_WriteConsoleW]
sub esp, 4
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ecx
mov ecx, dword [ebp - 0x34]
mov dword [esp + 8], ecx
mov ecx, dword [ebp - 0x40]
mov dword [esp], eax
mov dword [esp + 4], ecx
call ebx
mov ecx, dword [ebp - 0x38]
sub esp, 0x14
test eax, eax
je 0x403460
mov edx, 0x408598
lea esi, cs:[esi]
nop
add edx, 2
cmp word [edx], 0
jne 0x403350
mov dword [ebp - 0x34], edx
mov dword [esp], 0xfffffff5
mov eax, dword [ebp - 0x30]
call eax
lea ecx, [ebp - 0x20]
sub esp, 4
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], 0
mov edx, dword [ebp - 0x34]
mov dword [esp + 4], 0x408598
sub edx, 0x408598
mov dword [esp], eax
sar edx, 1
mov dword [esp + 8], edx
call ebx
mov eax, dword [ebp - 0x40]
sub esp, 0x14
mov dword [esp], eax
call esi
xor ecx, ecx
lea esp, [ebp - 0x10]
mov eax, ecx
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 8
mov esi, ebx
mov ecx, eax
mov ebx, dword [ebp - 0x38]
test byte [0x406018], 4
jne 0x4033f0
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x30], ecx
mov dword [esp], eax
call dword [sym.imp.oleaut32.dll_SafeArrayUnaccessData]
mov dword [ebp - 0x40], 0
mov ecx, dword [ebp - 0x30]
sub esp, 4
jmp 0x403280
mov dword [ebp - 0x30], eax
mov eax, esi
call sym._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], 0x406018
mov dword [esp], 2
call sym._wine_dbg_log.constprop.2
mov ecx, dword [ebp - 0x30]
jmp 0x4033c8
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x4081e3
mov dword [esp + 8], str.Host_Echo
mov dword [esp + 4], 0x406018
mov dword [esp], 3
call sym._wine_dbg_log.constprop.1
jmp 0x403127
mov edx, dword [sym.imp.kernel32.dll_GetOEMCP]
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x48], edx
call edx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov ecx, dword [ebp - 0x38]
mov dword [esp + 0xc], ecx
mov edi, dword [ebp - 0x40]
mov dword [ebp - 0x44], ecx
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_WideCharToMultiByte]
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov dword [ebp - 0x3c], eax
call eax
mov edx, dword [ebp - 0x34]
sub esp, 0x20
mov dword [ebp - 0x38], eax
mov dword [esp], edx
call dword [sym.imp.ucrtbase.dll_malloc]
mov ebx, eax
test eax, eax
je 0x403583
mov edx, dword [ebp - 0x48]
call edx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov ecx, dword [ebp - 0x38]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ecx
mov ecx, dword [ebp - 0x44]
mov dword [esp + 8], edi
mov dword [esp + 0xc], ecx
mov dword [esp + 4], 0
mov dword [esp], eax
mov eax, dword [ebp - 0x3c]
call eax
sub esp, 0x20
mov dword [esp], 0xfffffff5
mov edi, dword [ebp - 0x30]
call edi
lea edx, [ebp - 0x20]
sub esp, 4
mov dword [esp + 0xc], edx
mov edx, dword [sym.imp.kernel32.dll_WriteFile]
mov dword [esp + 0x10], 0
mov ecx, dword [ebp - 0x38]
mov dword [esp + 4], ebx
mov dword [esp + 8], ecx
mov dword [esp], eax
mov dword [ebp - 0x30], edx
call edx
sub esp, 0x14
mov dword [esp], ebx
call esi
mov dword [esp], 0xfffffff5
call edi
lea ecx, [ebp - 0x20]
sub esp, 4
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ecx
mov dword [esp + 8], 2
mov dword [esp + 4], 0x4085ed
mov dword [esp], eax
mov edx, dword [ebp - 0x30]
call edx
sub esp, 0x14
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call esi
lea esp, [ebp - 0x10]
xor ecx, ecx
mov eax, ecx
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 8
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x3c]
mov esi, ebx
mov ebx, dword [ebp - 0x38]
mov dword [esp], eax
call dword [sym.imp.oleaut32.dll_SafeArrayUnaccessData]
lea eax, [edi + edi + 2]
sub esp, 4
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov ecx, dword [ebp - 0x48]
test eax, eax
mov dword [ebp - 0x40], eax
je 0x403759
mov edx, dword [ebx]
mov dword [ebp - 0x3c], ecx
mov dword [esp], edx
mov dword [ebp - 0x38], edx
call esi
sub esp, 4
lea edi, [eax + eax]
mov dword [esp + 8], edi
mov edx, dword [ebp - 0x38]
mov dword [esp + 4], edx
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sym._memcpy
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x3c]
lea edx, [eax + edi]
cmp ecx, 1
je 0x40365f
mov dword [ebp - 0x3c], ebx
mov ebx, dword [ebp - 0x44]
mov dword [ebp - 0x44], esi
lea esi, [esi]
mov eax, dword [ebp - 0x3c]
mov ecx, 0x20
lea edi, [edx + 2]
mov word [edx], cx
mov edx, dword [eax + ebx*4]
mov dword [esp], edx
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x38], edx
call eax
sub esp, 4
lea esi, [eax + eax]
mov dword [esp + 8], esi
mov edx, dword [ebp - 0x38]
mov dword [esp], edi
mov dword [esp + 4], edx
call sym._memcpy
lea edx, [edi + esi]
mov edi, dword [ebp - 0x30]
mov eax, ebx
add ebx, 1
cmp eax, edi
jne 0x403618
mov ebx, dword [ebp - 0x3c]
xor eax, eax
xor ecx, ecx
mov word [edx], ax
jmp 0x403280
mov dword [esp + 0xc], 0
mov dword [esp + 8], str.Windows_Script_Host
mov eax, dword [ebp - 0x40]
mov dword [esp], 0
mov dword [esp + 4], eax
call dword [sym.imp.user32.dll_MessageBoxW]
sub esp, 0x10
jmp 0x403583
test byte [0x406018], 1
jne 0x4036f3
mov ecx, 0x80004001
jmp 0x4033a3
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call dword [sym.imp.oleaut32.dll_SafeArrayUnaccessData]
sub esp, 4
mov dword [esp], 0
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x40], eax
test eax, eax
je 0x403737
xor edx, edx
mov esi, dword [sym.imp.ucrtbase.dll_free]
mov word [eax], dx
mov dword [esp], ebx
call esi
cmp word [0x413008], 0
jne 0x403670
xor ecx, ecx
jmp 0x4032f5
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
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], 0x406018
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_1
jmp 0x4036a5
mov dword [ebp - 0x34], 0
jmp 0x4032f5
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_free]
mov ecx, 0x8007000e
jmp 0x4033a3
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call dword [sym.imp.oleaut32.dll_SafeArrayUnaccessData]
push eax
jmp 0x403740
mov ecx, 0x8007000e
jmp 0x403280