Function at 0x402f60
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
mov r13, rdx
test byte [0x00407030], 8
jne 0x403230
mov rbx, qword [sym.imp.oleaut32.dll_SafeArrayGetDim]
mov rcx, r13
call rbx
cmp eax, 1
jne 0x4033ef
lea r8, [rsp + 0x64]
mov edx, 1
mov rcx, r13
call qword [sym.imp.oleaut32.dll_SafeArrayGetLBound]
lea r8, [rsp + 0x60]
mov edx, 1
mov rcx, r13
call qword [sym.imp.oleaut32.dll_SafeArrayGetUBound]
lea rdx, [rsp + 0x68]
mov rcx, r13
call qword [sym.imp.oleaut32.dll_SafeArrayAccessData]
mov r14d, eax
test eax, eax
js 0x4031b3
mov edi, dword [rsp + 0x60]
sub edi, dword [rsp + 0x64]
mov edx, 8
lea ecx, [rdi + 1]
mov dword [rsp + 0x54], ecx
call qword [sym.imp.ucrtbase.dll_calloc]
mov r12, rax
test rax, rax
je 0x40345c
mov r9d, dword [rsp + 0x54]
test r9d, r9d
je 0x40342c
mov rsi, rax
mov eax, edi
mov qword [rsp + 0x48], r12
mov rbp, qword [sym.imp.oleaut32.dll_SysStringLen]
lea r14, [rax + rax*2 + 3]
mov qword [rsp + 0x58], rax
xor ebx, ebx
lea r15, [r14*8]
jmp 0x403080
xor r8d, r8d
lea rcx, [rsp + 0x70]
mov r9d, 8
mov rdx, r12
mov word [rsp + 0x70], r8w
xor r8d, r8d
call qword [sym.imp.oleaut32.dll_VariantChangeType]
mov r14d, eax
test eax, eax
js 0x4031d0
mov rcx, qword [rsp + 0x78]
mov qword [rsi], rcx
call rbp
add rbx, 0x18
add rsi, 8
add edi, eax
cmp r15, rbx
je 0x403260
mov r12, qword [rsp + 0x68]
add r12, rbx
cmp word [r12], 1
jne 0x403038
lea rcx, str.null
call qword [sym.imp.oleaut32.dll_SysAllocString]
mov qword [rsi], rax
mov rcx, rax
test rax, rax
jne 0x40306b
mov r12, qword [rsp + 0x48]
mov r15, rax
mov rcx, r13
mov r14d, 0x8007000e
call qword [sym.imp.oleaut32.dll_SafeArrayUnaccessData]
nop
mov rsi, qword [sym.imp.oleaut32.dll_SysFreeString]
mov edi, dword [rsp + 0x54]
xor ebx, ebx
nop dword [rax]
mov rcx, qword [r12 + rbx*8]
add rbx, 1
call rsi
cmp edi, ebx
ja 0x4030d0
mov rsi, qword [sym.imp.ucrtbase.dll_free]
mov rcx, r12
call rsi
test r14d, r14d
jne 0x4031b3
cmp word [section..bss], 0
jne 0x4033d8
xor ebp, ebp
xor r13d, r13d
xor ebx, ebx
cmp word [r15], 0
mov rcx, r15
je 0x403130
nop word [rax + rax]
add rcx, 2
cmp word [rcx], 0
jne 0x403118
sub rcx, r15
mov rbx, rcx
sar rbx, 1
mov r13d, ebx
mov ebp, ebx
mov ecx, 0xfffffff5
mov r12, qword [sym.imp.kernel32.dll_GetStdHandle]
lea rdi, [rsp + 0x70]
call r12
mov r8d, ebp
mov r9, rdi
mov rbp, qword [sym.imp.kernel32.dll_WriteConsoleW]
mov qword [rsp + 0x20], 0
mov rcx, rax
mov rdx, r15
call rbp
test eax, eax
je 0x4032e8
lea r13, [0x004085d0]
mov rbx, r13
nop dword [rax]
add rbx, 2
cmp word [rbx], 0
jne 0x403178
sub rbx, r13
mov ecx, 0xfffffff5
xor r14d, r14d
call r12
mov r8, rbx
mov r9, rdi
lea rdx, [0x004085d0]
mov qword [rsp + 0x20], 0
mov rcx, rax
sar r8, 1
call rbp
mov rcx, r15
call rsi
mov eax, r14d
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r15, r12
mov r12, qword [rsp + 0x48]
test byte [0x00407030], 4
jne 0x4031f8
mov rcx, r13
xor r15d, r15d
call qword [sym.imp.oleaut32.dll_SafeArrayUnaccessData]
jmp 0x4030c0
mov rcx, r15
call sym.wine_dbgstr_variant
lea r9, str.Could_not_convert_argument__s_to_string_n
mov ecx, 2
lea r8, [0x00408ed0]
mov qword [rsp + 0x20], rax
lea rdx, [0x00407030]
call sym.wine_dbg_log.constprop.0_1
jmp 0x4031e1
mov qword [rsp + 0x20], rdx
lea r9, [0x00408264]
lea r8, str.Host_Echo
mov ecx, 3
lea rdx, [0x00407030]
call sym.wine_dbg_log.constprop.0_1
jmp 0x402f83
mov rcx, r13
mov r12, qword [rsp + 0x48]
call qword [sym.imp.oleaut32.dll_SafeArrayUnaccessData]
lea ecx, [rdi + 1]
add rcx, rcx
call qword [sym.imp.ucrtbase.dll_malloc]
mov r15, rax
test rax, rax
je 0x403470
mov r13, qword [rsp + 0x58]
mov rdi, rax
xor esi, esi
jmp 0x4032b0
mov rdi, rbx
cmp esi, 0xffffffff
je 0x4032ac
mov ecx, 0x20
add rdi, 2
mov word [rbx], cx
add rsi, 1
mov r14, qword [r12 + rsi*8]
mov rcx, r14
call rbp
mov rdx, r14
mov rcx, rdi
mov ebx, eax
add rbx, rbx
mov r8, rbx
add rbx, rdi
call sym.memcpy
cmp r13, rsi
jne 0x403298
xor edx, edx
xor r14d, r14d
mov word [rbx], dx
jmp 0x4030c0
mov r10, qword [sym.imp.kernel32.dll_GetOEMCP]
mov qword [rsp + 0x48], r10
call r10
mov r9d, r13d
mov r8, r15
xor edx, edx
mov ecx, eax
mov dword [rsp + 0x28], 0
mov r14, qword [sym.imp.kernel32.dll_WideCharToMultiByte]
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x20], 0
call r14
mov ecx, ebx
mov ebp, eax
call qword [sym.imp.ucrtbase.dll_malloc]
mov rbx, rax
test rax, rax
je 0x4033c5
mov r10, qword [rsp + 0x48]
call r10
mov r9d, r13d
mov r8, r15
xor edx, edx
mov dword [rsp + 0x28], ebp
mov ecx, eax
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x20], rbx
call r14
mov ecx, 0xfffffff5
call r12
mov r8d, ebp
mov r9, rdi
mov rdx, rbx
mov rcx, rax
mov rbp, qword [sym.imp.kernel32.dll_WriteFile]
mov qword [rsp + 0x20], 0
call rbp
mov rcx, rbx
call rsi
mov ecx, 0xfffffff5
call r12
mov r9, rdi
mov r8d, 2
mov qword [rsp + 0x20], 0
mov rcx, rax
lea rdx, [0x00408629]
call rbp
mov rcx, r15
xor r14d, r14d
call rsi
jmp 0x4031b3
xor r9d, r9d
lea r8, str.Windows_Script_Host
mov rdx, r15
xor ecx, ecx
call qword [sym.imp.user32.dll_MessageBoxW]
jmp 0x4033c5
mov r14d, 0x80004001
test byte [0x00407030], 1
je 0x4031b3
mov rcx, r13
call rbx
lea r9, str.Unsupported_args_dim__d_n
lea r8, str.Host_Echo
xor ecx, ecx
mov dword [rsp + 0x20], eax
lea rdx, [0x00407030]
call sym.wine_dbg_log.constprop.0_1
jmp 0x4031b3
mov rcx, r13
call qword [sym.imp.oleaut32.dll_SafeArrayUnaccessData]
xor ecx, ecx
call qword [sym.imp.ucrtbase.dll_malloc]
mov r15, rax
test rax, rax
je 0x40347b
xor eax, eax
mov rsi, qword [sym.imp.ucrtbase.dll_free]
mov rcx, r12
mov word [r15], ax
call rsi
jmp 0x4030f3
mov rcx, r13
mov r14d, 0x8007000e
call qword [sym.imp.oleaut32.dll_SafeArrayUnaccessData]
jmp 0x4031b3
mov r14d, 0x8007000e
jmp 0x4030c0
mov rcx, r12
mov r14d, 0x8007000e
call qword [sym.imp.ucrtbase.dll_free]
jmp 0x4031b3