Function at 0x401a50
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 0x401d68
mov esi, dword [0x4060c4]
mov eax, dword fs:[0x18]
cmp dword [eax + 0x24], esi
je 0x401d38
test byte [0x40302c], 8
jne 0x401c48
test byte [0x40303c], 8
jne 0x401bc0
lea edi, [ebp - 0xe0]
mov esi, edi
test byte [0x40304c], 8
jne 0x401c08
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 0x401b0e
mov edx, dword [ebp - 0xec]
cmp edx, 3
jbe 0x401b80
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 0x401b1d
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 + 0x40412c]
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 0x401b0e
mov dword [esp], 0x40303c
call sym.___wine_dbg_get_channel_flags
and al, 8
je 0x401ac6
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 0x401d1d
mov dword [esp], 0x40304c
call sym.___wine_dbg_get_channel_flags
and al, 8
je 0x401adb
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 0x401adb
mov dword [esp], 0x40302c
call sym.___wine_dbg_get_channel_flags
and al, 8
je 0x401ab9
mov eax, dword [0x406024]
or eax, dword [0x406020]
je 0x401d50
lea eax, [ebp - 0xe8]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_QueryPerformanceCounter]
mov eax, 0xf4240
mov esi, dword [0x406020]
imul ecx, dword [ebp - 0xe4], 0xf4240
mul dword [ebp - 0xe8]
mov edi, dword [0x406024]
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 0x401ace
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], 0x406020
call dword [sym.imp.kernel32.dll_QueryPerformanceFrequency]
sub esp, 4
jmp 0x401c6d
mov eax, 0xffffffff
jmp 0x401b6b