Function at 0x401b20
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 0x401e38
mov esi, dword [0x4060a4]
mov eax, dword fs:[0x18]
cmp dword [eax + 0x24], esi
je 0x401e08
test byte [0x403018], 8
jne 0x401d18
test byte [0x403028], 8
jne 0x401c90
lea edi, [ebp - 0xe0]
mov esi, edi
test byte [0x403038], 8
jne 0x401cd8
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 0x401bde
mov edx, dword [ebp - 0xec]
cmp edx, 3
jbe 0x401c50
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 0x401bed
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 + 0x4040e4]
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 0x401bde
mov dword [esp], 0x403028
call sym.___wine_dbg_get_channel_flags
and al, 8
je 0x401b96
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 0x401ded
mov dword [esp], 0x403038
call sym.___wine_dbg_get_channel_flags
and al, 8
je 0x401bab
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 0x401bab
mov dword [esp], 0x403018
call sym.___wine_dbg_get_channel_flags
and al, 8
je 0x401b89
mov eax, dword [0x406004]
or eax, dword [section..bss]
je 0x401e20
lea eax, [ebp - 0xe8]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_QueryPerformanceCounter]
mov eax, 0xf4240
mov esi, dword [section..bss]
imul ecx, dword [ebp - 0xe4], 0xf4240
mul dword [ebp - 0xe8]
mov edi, dword [0x406004]
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 0x401b9e
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], section..bss
call dword [sym.imp.kernel32.dll_QueryPerformanceFrequency]
sub esp, 4
jmp 0x401d3d
mov eax, 0xffffffff
jmp 0x401c3b