Function at 0x402d50
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 0x403068
mov esi, dword [0x4080c4]
mov eax, dword fs:[0x18]
cmp dword [eax + 0x24], esi
je 0x403038
test byte [0x40401c], 8
jne 0x402f48
test byte [0x40402c], 8
jne 0x402ec0
lea edi, [ebp - 0xe0]
mov esi, edi
test byte [0x40403c], 8
jne 0x402f08
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 0x402e0e
mov edx, dword [ebp - 0xec]
cmp edx, 3
jbe 0x402e80
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 0x402e1d
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 + 0x4055a8]
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 0x402e0e
mov dword [esp], 0x40402c
call sym.___wine_dbg_get_channel_flags
and al, 8
je 0x402dc6
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 0x40301d
mov dword [esp], 0x40403c
call sym.___wine_dbg_get_channel_flags
and al, 8
je 0x402ddb
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 0x402ddb
mov dword [esp], 0x40401c
call sym.___wine_dbg_get_channel_flags
and al, 8
je 0x402db9
mov eax, dword [0x408024]
or eax, dword [0x408020]
je 0x403050
lea eax, [ebp - 0xe8]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_QueryPerformanceCounter]
mov eax, 0xf4240
mov esi, dword [0x408020]
imul ecx, dword [ebp - 0xe4], 0xf4240
mul dword [ebp - 0xe8]
mov edi, dword [0x408024]
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 0x402dce
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], 0x408020
call dword [sym.imp.kernel32.dll_QueryPerformanceFrequency]
sub esp, 4
jmp 0x402f6d
mov eax, 0xffffffff
jmp 0x402e6b