Function at 0x406e20
Capabilities:
Write file on windows

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x108
mov eax, dword [ecx]
mov ebx, dword [ecx + 4]
mov dword [ebp - 0xec], eax
mov eax, dword [ecx + 8]
mov dword [esp], ebx
mov dword [ebp - 0xf0], eax
call sym.___wine_dbg_get_channel_flags
movzx ecx, byte [ebp - 0xec]
movzx eax, al
sar eax, cl
test al, 1
je 0x407138
mov esi, dword [0x40f504]
mov eax, dword fs:[0x18]
cmp dword [eax + 0x24], esi
je 0x407108
test byte [0x40801c], 8
jne 0x407018
test byte [0x40802c], 8
jne 0x406f90
lea edi, [ebp - 0xe0]
mov esi, edi
test byte [0x40803c], 8
jne 0x406fd8
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x24]
mov ecx, str._04x:
mov dword [esp + 4], ecx
mov dword [esp], esi
mov dword [esp + 8], eax
call sym._sprintf
mov ecx, dword [ebp - 0xf0]
test ecx, ecx
je 0x406ede
mov edx, dword [ebp - 0xec]
cmp edx, 3
jbe 0x406f50
mov dword [esp], 2
mov ebx, edi
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
mov edx, dword [ebx]
add ebx, 4
lea ecx, [edx - 0x1010101]
not edx
and ecx, edx
and ecx, 0x80808080
je 0x406eed
mov dword [esp + 0xc], eax
mov esi, ecx
mov eax, 1
mov dword [esp + 4], eax
shr esi, 0x10
test ecx, 0x8080
mov dword [esp], edi
cmove ecx, esi
lea esi, [ebx + 2]
mov dl, cl
cmove ebx, esi
add dl, cl
sbb ebx, 3
sub ebx, edi
mov dword [esp + 8], ebx
call dword [sym.imp.ucrtbase.dll_fwrite]
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov dword [esp + 0x14], ecx
mov ecx, dword [edx*4 + 0x409664]
add eax, esi
mov dword [esp], eax
inc ebx
mov edx, str._s:_s:_s
mov dword [esp + 0x10], ebx
mov dword [esp + 8], edx
mov dword [esp + 0xc], ecx
mov ecx, edi
sub ecx, eax
add ecx, 0xc8
mov dword [esp + 4], ecx
call sym._snprintf.constprop.0
jmp 0x406ede
mov dword [esp], 0x40802c
call sym.___wine_dbg_get_channel_flags
and al, 8
je 0x406e96
call dword [sym.imp.kernel32.dll_GetTickCount]
mov edx, 0x10624dd3
mov ecx, eax
mul edx
shr edx, 6
mov dword [esp + 8], edx
imul eax, edx, 0x3e8
sub ecx, eax
mov eax, str._3u._03u:
mov dword [esp + 0xc], ecx
mov dword [esp + 4], eax
jmp 0x4070ed
mov dword [esp], 0x40803c
call sym.___wine_dbg_get_channel_flags
and al, 8
je 0x406eab
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x20]
mov dword [esp], esi
mov dword [esp + 8], eax
mov eax, str._04x:
mov dword [esp + 4], eax
call sym._sprintf
add esi, eax
jmp 0x406eab
mov dword [esp], 0x40801c
call sym.___wine_dbg_get_channel_flags
and al, 8
je 0x406e89
mov eax, dword [0x40f464]
or eax, dword [0x40f460]
je 0x407120
lea eax, [ebp - 0xe8]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_QueryPerformanceCounter]
mov eax, 0xf4240
mov esi, dword [0x40f460]
imul ecx, dword [ebp - 0xe4], 0xf4240
mul dword [ebp - 0xe8]
mov edi, dword [0x40f464]
sub esp, 4
add edx, ecx
mov dword [esp + 8], esi
xor esi, esi
mov dword [esp + 0xc], edi
mov dword [esp], eax
mov dword [esp + 4], edx
call sym.___divdi3
mov ecx, 0xf4240
mov dword [esp + 8], ecx
mov dword [esp + 0xc], esi
mov dword [esp], eax
mov dword [esp + 4], edx
mov dword [ebp - 0xf8], eax
mov dword [ebp - 0xf4], edx
call sym.___moddi3
mov edx, dword [ebp - 0xf4]
mov dword [esp + 4], edx
mov dword [esp + 0xc], eax
mov eax, 0xf4240
mov dword [esp + 8], eax
xor eax, eax
mov edi, dword [esp + 0xc]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0xf8]
mov dword [esp], eax
call sym.___divdi3
mov dword [esp + 0xc], edi
mov dword [esp + 8], eax
mov eax, str._3u._06u:
mov dword [esp + 4], eax
lea edi, [ebp - 0xe0]
mov dword [esp], edi
call sym._sprintf
add eax, edi
mov esi, eax
jmp 0x406e9e
lea esp, [ebp - 0x10]
xor eax, eax
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov dword [esp], 0x40f460
call dword [sym.imp.kernel32.dll_QueryPerformanceFrequency]
sub esp, 4
jmp 0x40703d
mov eax, 0xffffffff
jmp 0x406f3b