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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x28
mov eax, dword [0x4050ec]
test eax, eax
je 0x401cc8
lea edx, [ebp + 0xc]
mov dword [esp], eax
mov dword [esp + 8], edx
mov edx, dword [ebp + 8]
mov dword [esp + 4], edx
call dword [sym.imp.user32.dll_wvsprintfW]
mov edx, dword [0x405108]
sub esp, 0xc
mov esi, eax
test edx, edx
jne 0x401c80
mov ebx, dword [0x4050e8]
mov dword [ebp - 0x10], 0
mov dword [0x405108], 0
test ebx, ebx
je 0x401d40
mov edi, dword [0x4050ec]
call dword [sym.imp.kernel32.dll_GetOEMCP]
lea edx, [ebp - 0x10]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x1c], edx
mov dword [esp + 0xc], esi
mov dword [esp + 0x18], 0x40604e
mov dword [esp + 0x14], 0xffff
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WideCharToMultiByte]
mov esi, dword [0x4050e8]
sub esp, 0x20
mov ebx, eax
mov dword [esp], 0xfffffff5
call dword [sym.imp.kernel32.dll_GetStdHandle]
lea edx, [ebp - 0x14]
sub esp, 4
mov dword [esp + 0x10], 0
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 eax, dword [0x40510c]
test eax, eax
jne 0x401c6d
test byte [0x404010], 8
jne 0x401d90
mov dword [0x40510c], 1
mov ebx, dword [ebp - 0x14]
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [0x4050ec]
mov dword [esp], 0xfffffff5
call dword [sym.imp.kernel32.dll_GetStdHandle]
lea edx, [ebp - 0x14]
sub esp, 4
mov dword [esp + 0x10], 0
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 0x401bb0
jmp 0x401c4d
mov dword [esp + 8], 0x1fffe
mov dword [esp + 4], 0
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 [0x4050ec], eax
sub esp, 0xc
test eax, eax
jne 0x401b86
xor ebx, ebx
test byte [0x404010], 1
je 0x401c70
mov dword [esp + 0xc], str.Out_of_memory___could_not_allocate_2_x_64_KB_buffers_n
mov dword [esp + 8], str.NETSTAT_wprintf
mov dword [esp + 4], 0x404010
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], 0xffff
mov dword [esp + 4], 0
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 [0x4050e8], eax
sub esp, 0xc
mov ebx, eax
test eax, eax
jne 0x401bcf
test byte [0x404010], 1
jne 0x401dc8
xor ebx, ebx
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [0x405108]
mov dword [esp + 0xc], str.Writing_to_console____d__n
mov dword [esp + 8], str.NETSTAT_wprintf
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x404010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x401c63
mov dword [esp + 0xc], str.Out_of_memory___could_not_allocate_2_x_64_KB_buffers_n
xor ebx, ebx
mov dword [esp + 8], str.NETSTAT_wprintf
mov dword [esp + 4], 0x404010
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
jmp 0x401d82