Function at 0x401480
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
sub esp, 0x4c
mov byte [ebp - 0x1d], 0x1a
test byte [0x423010], 8
jne 0x401580
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x40000000
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_CreateFileW]
sub esp, 0x1c
mov ebx, eax
cmp eax, 0xffffffff
je 0x4015e8
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_SetFilePointer]
lea eax, [ebp - 0x1c]
sub esp, 0x10
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x1d]
mov dword [esp + 0x10], 0
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
mov edi, eax
test eax, eax
jne 0x401560
test byte [0x423010], 2
jne 0x401690
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], ebx
mov edi, 1
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, edi
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test eax, eax
je 0x401708
shr eax, 0x10
je 0x401678
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, 0x4350cb
test edx, edx
jne 0x4015b7
mov eax, esi
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Appending_EOF_to__s_n
mov dword [esp + 8], str.WCMD_AppendEOF
mov dword [esp + 4], 0x423010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x40149c
xor edi, edi
test byte [0x423010], 2
je 0x401550
mov eax, dword fs:[0x18]
mov ebx, dword [eax + 0x34]
test esi, esi
je 0x401760
mov eax, esi
shr eax, 0x10
je 0x401730
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, 0x4350cb
test edx, edx
jne 0x401639
mov eax, esi
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [esp + 0x14], ebx
xor edi, edi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Failed_to_open__s___ld__n
mov dword [esp + 8], str.WCMD_AppendEOF
mov dword [esp + 4], 0x423010
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_1
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
movzx eax, si
mov dword [esp], 0x4350be
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_1
jmp 0x4015b7
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [ebp - 0x2c], eax
test esi, esi
je 0x401750
mov eax, esi
shr eax, 0x10
je 0x401718
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, 0x4350cb
test ecx, ecx
jne 0x4016d1
mov eax, esi
call sym._wine_dbgstr_wn.part.0.constprop.0
mov ecx, dword [ebp - 0x2c]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Failed_to_append_EOF_to__s___ld__n
mov dword [esp + 0x14], ecx
mov dword [esp + 8], str.WCMD_AppendEOF
mov dword [esp + 4], 0x423010
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_1
jmp 0x401544
mov eax, 0x4350c4
jmp 0x4015b7
movzx esi, si
mov dword [esp], 0x4350be
mov dword [esp + 4], esi
call sym._wine_dbg_sprintf.constprop.0_1
jmp 0x4016d1
movzx esi, si
mov dword [esp], 0x4350be
mov dword [esp + 4], esi
call sym._wine_dbg_sprintf.constprop.0_1
jmp 0x401639
mov eax, 0x4350c4
jmp 0x4016d1
mov eax, 0x4350c4
jmp 0x401639