Function at 0x403400
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
test byte [0x408020], 8
jne 0x4037d4
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym._SafeArrayGetDim_4
sub esp, 4
cmp eax, 1
jne 0x40390b
lea eax, [ebp - 0x30]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym._SafeArrayGetLBound_12
lea eax, [ebp - 0x34]
sub esp, 0xc
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], 1
mov dword [esp], eax
call sym._SafeArrayGetUBound_12
lea eax, [ebp - 0x2c]
sub esp, 0xc
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym._SafeArrayAccessData_8
sub esp, 8
mov esi, eax
test eax, eax
js 0x40378a
mov eax, dword [ebp - 0x34]
sub eax, dword [ebp - 0x30]
mov dword [ebp - 0x3c], eax
add eax, 1
mov ebx, eax
mov dword [ebp - 0x44], eax
call sym._GetProcessHeap_0
lea edx, [ebx*4]
mov dword [esp + 4], 8
mov dword [esp + 8], edx
mov dword [esp], eax
call sym._HeapAlloc_12
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x4039e2
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x403958
mov eax, dword [ebp - 0x3c]
xor edi, edi
mov esi, edi
mov dword [ebp - 0x40], eax
jmp 0x403531
xor eax, eax
mov dword [esp + 0xc], 8
mov word [ebp - 0x28], ax
lea eax, [ebp - 0x28]
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov dword [esp], eax
call sym._VariantChangeType_16
sub esp, 0x10
test eax, eax
js 0x403560
mov eax, dword [ebp - 0x20]
mov dword [ebx + esi*4], eax
mov eax, dword [ebx + esi*4]
mov dword [esp], eax
call sym._SysStringLen_4
lea edx, [esi + 1]
add dword [ebp - 0x40], eax
sub esp, 4
cmp dword [ebp - 0x3c], esi
je 0x403840
mov esi, edx
mov edx, esi
mov edi, dword [ebp - 0x2c]
shl edx, 4
add edi, edx
cmp word [edi], 1
jne 0x4034e0
mov dword [esp], str.null
call sym._SysAllocString_4
sub esp, 4
mov dword [ebx + esi*4], eax
test eax, eax
jne 0x403512
mov esi, 0x8007000e
jmp 0x40356f
mov esi, eax
test byte [0x408020], 4
jne 0x4037a0
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym._SafeArrayUnaccessData_4
mov dword [ebp - 0x3c], 0
sub esp, 4
mov dword [ebp - 0x40], esi
mov esi, ebx
mov ebx, dword [ebp - 0x44]
xor edi, edi
nop
mov eax, dword [esi + edi*4]
add edi, 1
mov dword [esp], eax
call sym._SysFreeString_4
sub esp, 4
cmp ebx, edi
ja 0x403590
mov ebx, esi
mov esi, dword [ebp - 0x40]
call sym._GetProcessHeap_0
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._HeapFree_12
sub esp, 0xc
test esi, esi
jne 0x40378a
cmp word [0x40801c], 0
jne 0x4038e0
mov eax, dword [ebp - 0x3c]
cmp word [eax], 0
mov ebx, eax
je 0x4039b3
lea esi, [esi]
nop
add ebx, 2
cmp word [ebx], 0
jne 0x4035f0
sub ebx, dword [ebp - 0x3c]
sar ebx, 1
mov edi, ebx
mov dword [esp], 0xfffffff5
lea esi, [ebp - 0x28]
call sym._GetStdHandle_4
mov ecx, dword [ebp - 0x3c]
sub esp, 4
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], edi
mov dword [esp + 4], ecx
mov dword [esp], eax
call sym._WriteConsoleW_20
sub esp, 0x14
test eax, eax
jne 0x403804
call sym._GetConsoleOutputCP_0
mov ecx, dword [ebp - 0x3c]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 8], ecx
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ebx
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._WideCharToMultiByte_32
sub esp, 0x20
mov dword [ebp - 0x40], eax
call sym._GetProcessHeap_0
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._HeapAlloc_12
sub esp, 0xc
mov edi, eax
test eax, eax
je 0x403769
call sym._GetConsoleOutputCP_0
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x40]
mov dword [esp + 0x10], edi
mov dword [esp + 0x1c], 0
mov dword [esp + 8], ecx
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], 0
mov dword [esp + 0xc], ebx
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._WideCharToMultiByte_32
sub esp, 0x20
mov dword [esp], 0xfffffff5
call sym._GetStdHandle_4
mov edx, dword [ebp - 0x40]
sub esp, 4
mov dword [esp + 8], edx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 4], edi
mov dword [esp], eax
call sym._WriteFile_20
sub esp, 0x14
call sym._GetProcessHeap_0
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._HeapFree_12
sub esp, 0xc
mov dword [esp], 0xfffffff5
call sym._GetStdHandle_4
sub esp, 4
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], 2
mov dword [esp + 4], 0x4095a5
mov dword [esp], eax
call sym._WriteFile_20
sub esp, 0x14
call sym._GetProcessHeap_0
mov ecx, dword [ebp - 0x3c]
mov dword [esp + 4], 0
xor esi, esi
mov dword [esp], eax
mov dword [esp + 8], ecx
call sym._HeapFree_12
sub esp, 0xc
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret 8
mov eax, edi
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], 0x409c50
mov dword [esp + 4], 0x408020
mov dword [esp], 2
call sym._wine_dbg_log.constprop.14
jmp 0x40356f
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], 0x409224
mov dword [esp + 8], str.Host_Echo
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x408020
mov dword [esp], 3
call sym._wine_dbg_log.constprop.14
jmp 0x403416
mov dword [esp], 0xfffffff5
call sym._GetStdHandle_4
sub esp, 4
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], 2
mov dword [esp + 4], 0x409738
mov dword [esp], eax
call sym._WriteConsoleW_20
sub esp, 0x14
jmp 0x403769
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x48], edx
mov esi, 0x8007000e
mov dword [esp], eax
call sym._SafeArrayUnaccessData_4
sub esp, 4
call sym._GetProcessHeap_0
mov ecx, dword [ebp - 0x40]
mov dword [esp + 4], 0
mov dword [esp], eax
lea ecx, [ecx + ecx + 2]
mov dword [esp + 8], ecx
call sym._HeapAlloc_12
sub esp, 0xc
mov dword [ebp - 0x3c], eax
test eax, eax
je 0x403584
mov edx, dword [ebp - 0x48]
mov esi, eax
mov dword [ebp - 0x48], ebx
lea ecx, [ebx + edx*4]
mov dword [ebp - 0x40], ecx
jmp 0x40389f
mov edi, 0x20
lea esi, [edx + 2]
mov word [edx], di
mov eax, dword [ebx]
add ebx, 4
mov dword [esp], eax
call sym._SysStringLen_4
lea edi, [eax + eax]
mov eax, dword [ebx - 4]
sub esp, 4
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov dword [esp], esi
call sym._memcpy
lea edx, [esi + edi]
cmp dword [ebp - 0x40], ebx
jne 0x403894
xor ecx, ecx
mov ebx, dword [ebp - 0x48]
xor esi, esi
mov word [edx], cx
jmp 0x403584
mov eax, dword [ebp - 0x3c]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x409740
mov dword [esp + 4], eax
mov dword [esp], 0
call sym._MessageBoxW_16
sub esp, 0x10
jmp 0x403769
mov esi, 0x80004001
test byte [0x408020], 1
je 0x40378a
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym._SafeArrayGetDim_4
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], 0x408020
mov dword [esp], 0
call sym._wine_dbg_log.constprop.14
jmp 0x40378a
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym._SafeArrayUnaccessData_4
sub esp, 4
call sym._GetProcessHeap_0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._HeapAlloc_12
sub esp, 0xc
mov dword [ebp - 0x3c], eax
test eax, eax
je 0x4039bc
xor edx, edx
mov word [eax], dx
call sym._GetProcessHeap_0
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._HeapFree_12
sub esp, 0xc
jmp 0x4035ce
xor edi, edi
xor ebx, ebx
jmp 0x403600
call sym._GetProcessHeap_0
mov dword [esp + 8], ebx
mov esi, 0x8007000e
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._HeapFree_12
sub esp, 0xc
jmp 0x40378a
mov eax, dword [ebp + 0xc]
mov esi, 0x8007000e
mov dword [esp], eax
call sym._SafeArrayUnaccessData_4
sub esp, 4
jmp 0x40378a