Function at 0x4015d0
Capabilities:
Get process heap flags
Write file on windows

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
sub esp, 0x48
mov dword [ebp - 0xc], ebx
mov eax, dword [0x40b008]
mov ebx, ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 8], esi
mov dword [ebp - 4], edi
test eax, eax
mov esi, dword [ecx]
je 0x401780
add ebx, 4
xor ecx, ecx
mov dword [ebp - 0x24], ebx
lea edx, [ebp - 0x24]
xor ebx, ebx
mov dword [esp + 0x18], edx
mov edx, 0x7fff
mov dword [esp + 8], ebx
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], ecx
mov dword [esp + 4], esi
mov dword [esp], 0x400
call dword [sym.imp.kernel32.dll_FormatMessageW]
sub esp, 0x1c
test eax, eax
mov ebx, eax
jne 0x4016a0
mov edi, dword fs:[0x18]
cmp dword [edi + 0x34], 0xeb
je 0x4016a0
test byte [0x408004], 1
je 0x4017bd
mov eax, esi
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0x14], eax
mov eax, dword [edi + 0x34]
mov dword [esp], 0
mov dword [esp + 0x10], eax
mov eax, str.Could_not_format_string:_le_u__fmt_s_n
mov dword [esp + 0xc], eax
mov eax, str.XCOPY_wprintf
mov dword [esp + 8], eax
mov eax, 0x408004
mov dword [esp + 4], eax
call sym._wine_dbg_log.constprop.0
jmp 0x401769
mov eax, dword [section..data]
test eax, eax
jne 0x4017c8
mov dword [ebp - 0x1c], 0
mov esi, dword [0x40b004]
xor eax, eax
mov dword [section..data], eax
test esi, esi
je 0x401840
mov edi, dword [0x40b008]
call dword [sym.imp.kernel32.dll_GetConsoleOutputCP]
lea edx, [ebp - 0x1c]
mov ecx, 0xffff
mov dword [esp + 0x1c], edx
mov edx, 0x4090a0
mov dword [esp + 0xc], ebx
xor ebx, ebx
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], esi
mov dword [esp + 8], edi
xor edi, edi
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WideCharToMultiByte]
mov esi, dword [0x40b004]
sub esp, 0x20
mov ebx, eax
mov dword [esp], 0xfffffff5
call dword [sym.imp.kernel32.dll_GetStdHandle]
lea edx, [ebp - 0x20]
sub esp, 4
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], edx
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
mov esi, dword [section..bss]
test esi, esi
jne 0x401766
test byte [0x408004], 8
jne 0x401880
mov eax, 1
mov dword [section..bss], eax
mov ebx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x10]
mov eax, ebx
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
lea esp, [ecx - 4]
ret
xor ecx, ecx
mov edx, 0x1fffe
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [0x40b008], eax
sub esp, 0xc
test eax, eax
jne 0x4015fd
test byte [0x408004], 1
jne 0x401810
xor ebx, ebx
jmp 0x401769
mov dword [esp], 0xfffffff5
mov esi, dword [0x40b008]
xor edi, edi
call dword [sym.imp.kernel32.dll_GetStdHandle]
lea edx, [ebp - 0x20]
sub esp, 4
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], edx
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WriteConsoleW]
sub esp, 0x14
test eax, eax
je 0x4016ad
jmp 0x401745
mov eax, 0x408004
mov esi, str.Out_of_memory___could_not_allocate_2_x_64K_buffers_n
mov dword [esp + 0xc], esi
mov edi, str.XCOPY_wprintf
xor ebx, ebx
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
jmp 0x401769
xor ecx, ecx
mov edx, 0xffff
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [0x40b004], eax
sub esp, 0xc
test eax, eax
mov esi, eax
je 0x4017b4
jmp 0x4016c9
mov eax, dword [section..data]
mov edx, str.Writing_to_console____d__n
mov ecx, str.XCOPY_wprintf
mov dword [esp + 0xc], edx
mov ebx, 0x408004
mov dword [esp + 8], ecx
mov dword [esp + 4], ebx
mov dword [esp + 0x10], eax
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x40175c