Function at 0x1000d790
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x34
cmp dword [eax + 0x14], 1
mov dword [ebp - 0x10], 0
je 0x1000da4d
mov edi, dword [eax + 0x18]
mov ebx, edx
test edi, edi
jne 0x1000d8f8
mov dword [ebp - 0x20], eax
mov dword [esp], edx
mov edx, dword [sym.imp.oleaut32.dll_SysStringLen]
mov dword [ebp - 0x1c], edx
call edx
sub esp, 4
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.kernel32.dll_WideCharToMultiByte]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [ebp - 0x18], eax
call eax
sub esp, 0x20
mov dword [ebp - 0x14], eax
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov esi, eax
test eax, eax
je 0x1000da57
mov dword [esp], ebx
mov edx, dword [ebp - 0x1c]
call edx
sub esp, 4
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov ecx, dword [ebp - 0x14]
mov dword [esp + 8], ebx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0
mov dword [esp], 0
mov eax, dword [ebp - 0x18]
call eax
lea eax, [ebp - 0x10]
sub esp, 0x20
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov ebx, dword [ebp - 0x14]
mov dword [esp + 4], esi
mov dword [esp + 8], ebx
mov ecx, dword [ebp - 0x20]
mov eax, dword [ecx + 0x28]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
test eax, eax
je 0x1000d89f
cmp dword [ebp - 0x10], ebx
je 0x1000d8e0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
cmp eax, 5
je 0x1000d990
ja 0x1000d9c0
mov edi, 0x800a0035
cmp eax, 2
je 0x1000d8e0
mov edi, 0x800a004c
cmp eax, 3
je 0x1000d8e0
test byte [0x10012028], 1
jne 0x1000da20
mov edi, 0x80004005
lea esi, [esi]
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_free]
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebp - 0x14], eax
mov esi, dword [sym.imp.oleaut32.dll_SysStringByteLen]
mov dword [esp], edx
call esi
lea edx, [ebp - 0x10]
sub esp, 4
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], ebx
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx + 0x28]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
test eax, eax
jne 0x1000d978
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
cmp eax, 5
je 0x1000d9e0
ja 0x1000d9a0
mov edi, 0x800a0035
cmp eax, 2
je 0x1000d8e9
mov edi, 0x800a004c
cmp eax, 3
je 0x1000d8e9
test byte [0x10012028], 1
jne 0x1000d9f0
mov edi, 0x80004005
jmp 0x1000d8e9
mov dword [esp], ebx
xor edi, edi
call esi
sub esp, 4
cmp eax, dword [ebp - 0x10]
jne 0x1000d936
jmp 0x1000d8e9
mov edi, 0x800a0046
jmp 0x1000d8e0
mov edi, 0x800a003a
cmp eax, 0x50
je 0x1000d8e9
cmp eax, 0xb7
je 0x1000d8e9
jmp 0x1000d95e
mov edi, 0x800a003a
cmp eax, 0x50
je 0x1000d8e0
cmp eax, 0xb7
je 0x1000d8e0
jmp 0x1000d8cb
mov edi, 0x800a0046
jmp 0x1000d8e9
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Unsupported_error_code:__ld_n
mov dword [esp + 8], str.create_error
mov dword [esp + 4], 0x10012028
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_1
jmp 0x1000d96b
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Unsupported_error_code:__ld_n
mov dword [esp + 8], str.create_error
mov dword [esp + 4], 0x10012028
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_1
jmp 0x1000d8d8
mov edi, 0x800a0036
jmp 0x1000d8e9
mov edi, 0x8007000e
jmp 0x1000d8e9