Function at 0x401130
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 [0x407008]
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 0x4012a0
mov dword [esp + 4], esi
add ebx, 4
mov dword [esp + 8], ebx
mov dword [esp], eax
call sym._wvsprintfW_12
mov esi, eax
mov eax, dword [section..data]
sub esp, 0xc
test eax, eax
jne 0x401258
mov dword [ebp - 0x1c], 0
mov ebx, dword [0x407004]
xor eax, eax
mov dword [section..data], eax
test ebx, ebx
je 0x401310
mov edi, dword [0x407008]
call dword [sym.imp.kernel32.dll_GetConsoleOutputCP]
lea edx, [ebp - 0x1c]
mov ecx, pe_overlay
mov dword [esp + 0x1c], edx
mov edx, 0x405036
mov dword [esp + 0x10], ebx
xor ebx, ebx
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], 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 [0x407004]
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 0x40123b
test byte [0x404004], 8
jne 0x401360
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
mov dword [esp], 0xfffffff5
mov ebx, dword [0x407008]
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], esi
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WriteConsoleW]
sub esp, 0x14
test eax, eax
je 0x401182
jmp 0x40121a
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 [0x407008], eax
sub esp, 0xc
test eax, eax
jne 0x40115d
xor ebx, ebx
test byte [0x404004], 1
je 0x40123e
mov dword [esp], 0
mov eax, str.Out_of_memory___could_not_allocate_2_x_64_KB_buffers_n
mov dword [esp + 0xc], eax
mov eax, 0x4050e4
mov dword [esp + 8], eax
mov eax, 0x404004
mov dword [esp + 4], eax
call sym._wine_dbg_log.constprop.0
jmp 0x40123e
xor ecx, ecx
mov edx, pe_overlay
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 [0x407004], eax
sub esp, 0xc
test eax, eax
mov ebx, eax
jne 0x40119e
test byte [0x404004], 1
jne 0x401398
xor ebx, ebx
jmp 0x40123e
mov eax, dword [section..data]
mov edx, str.Writing_to_console____d__n
mov ecx, 0x4050e4
mov dword [esp + 0xc], edx
mov ebx, 0x404004
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 0x401231
mov dword [esp], 0
mov eax, str.Out_of_memory___could_not_allocate_2_x_64_KB_buffers_n
xor ebx, ebx
mov dword [esp + 0xc], eax
mov eax, 0x4050e4
mov dword [esp + 8], eax
mov eax, 0x404004
mov dword [esp + 4], eax
call sym._wine_dbg_log.constprop.0
jmp 0x40123e