Function at 0x403ce0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, ecx
push esi
mov esi, edx
push ebx
mov ebx, eax
sub esp, 0x7c
mov eax, dword [eax + 0x10bc]
mov edx, dword [ebx + 0x10c0]
cmp eax, esi
je 0x403e50
test esi, esi
jne 0x403d30
lea eax, [edx + 1]
cmp eax, ecx
je 0x403e67
cmp ecx, edx
je 0x403f98
test edi, edi
jne 0x403d38
lea eax, [ebp - 0x58]
mov dword [ebp - 0x58], 0x485b1b
mov dword [ebp - 0x5c], eax
jmp 0x403d6a
cmp ecx, edx
je 0x403e08
mov edx, dword [ebx + 0x10c8]
test edx, edx
jne 0x403fb0
lea eax, [esi + 1]
mov dword [esp + 4], str.e__u__uH
mov dword [esp + 0xc], eax
lea eax, [edi + 1]
mov dword [esp + 8], eax
lea eax, [ebp - 0x58]
mov dword [ebp - 0x5c], eax
mov dword [esp], eax
call sym._sprintf
mov eax, dword [ebp - 0x5c]
mov dword [ebx + 0x10bc], esi
mov dword [ebx + 0x10c0], edi
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_strlen]
mov esi, eax
test eax, eax
je 0x403df9
mov eax, dword [ebx + 0xb4]
test eax, eax
je 0x403df9
mov eax, dword [ebx + 0x10b8]
lea edx, [esi + eax]
cmp edx, 0x1000
ja 0x403e80
lea eax, [ebx + eax + 0xb8]
cmp esi, 4
jb 0x403f68
mov edx, dword [ebp - 0x58]
lea ecx, [eax + 4]
and ecx, 0xfffffffc
mov dword [eax], edx
mov edx, dword [ebp + esi - 0x5c]
mov dword [esi + eax - 4], edx
mov edi, dword [ebp - 0x5c]
sub eax, ecx
sub edi, eax
add eax, esi
and eax, 0xfffffffc
cmp eax, 4
jb 0x403df3
mov dword [ebp - 0x5c], ebx
and eax, 0xfffffffc
xor edx, edx
mov ebx, dword [edi + edx]
mov dword [ecx + edx], ebx
add edx, 4
cmp edx, eax
jb 0x403de3
mov ebx, dword [ebp - 0x5c]
add dword [ebx + 0x10b8], esi
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [ebx + 8]
cmp eax, dword [edx + 0xc]
jae 0x403f38
lea edx, [esi + 1]
cmp edx, eax
je 0x404018
cmp eax, esi
jb 0x403ff2
sub eax, esi
mov dword [esp + 4], str.e__uD
mov dword [esp + 8], eax
lea eax, [ebp - 0x58]
mov dword [ebp - 0x5c], eax
mov dword [esp], eax
call sym._sprintf
jmp 0x403d6a
cmp ecx, edx
je 0x403df9
test esi, esi
jne 0x403d38
add edx, 1
cmp edx, ecx
jne 0x403d1a
mov eax, 0xa0d
mov byte [ebp - 0x56], 0
mov word [ebp - 0x58], ax
lea eax, [ebp - 0x58]
mov dword [ebp - 0x5c], eax
jmp 0x403d6a
mov eax, ebx
call sym._tty_flush
mov eax, dword [ebx + 0x10b8]
lea edx, [esi + eax]
cmp edx, 0x1000
jbe 0x403da7
mov dword [esp + 8], 0xb5
mov dword [esp + 4], str._Users_runner_work_wine_wine_programs_conhost_conhost.c
mov dword [esp], str._console__tty_buffer_count
call dword [sym.imp.ucrtbase.dll__assert]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], esi
mov eax, dword [ebp - 0x5c]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0xb4]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
test eax, eax
jne 0x403df9
test byte [0x415058], 4
je 0x403df9
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.write_failed:__lu_n
mov dword [esp + 8], str.tty_write
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x415058
mov dword [esp], 2
call sym._wine_dbg_log.constprop.1
jmp 0x403df9
mov ecx, dword [ebx + 0xc]
test ecx, ecx
jne 0x403fd0
test byte [edx + 8], 2
je 0x403e14
sub eax, 1
mov dword [ebx + 0x10bc], eax
cmp eax, esi
jne 0x403e14
jmp 0x403df9
test esi, esi
je 0x403df3
movzx edx, byte [ebp - 0x58]
mov byte [eax], dl
test esi, 2
je 0x403df3
movzx edx, word [ebp + esi - 0x5a]
mov word [esi + eax - 2], dx
jmp 0x403df3
mov eax, 0xd
mov word [ebp - 0x58], ax
lea eax, [ebp - 0x58]
mov dword [ebp - 0x5c], eax
jmp 0x403d6a
mov ecx, 6
mov edx, str.e__25l
mov eax, ebx
call sym._tty_write
mov dword [ebx + 0x10c8], 0
jmp 0x403d46
mov ecx, 1
mov edx, 0x4160ba
mov eax, ebx
call sym._tty_write
mov dword [ebx + 0x10bc], 0
cmp esi, 0xffffffff
je 0x404018
xor eax, eax
mov edx, esi
mov dword [esp + 4], str.e__uC
sub edx, eax
lea eax, [ebp - 0x58]
mov dword [esp + 8], edx
mov dword [ebp - 0x5c], eax
mov dword [esp], eax
call sym._sprintf
jmp 0x403d6a
mov ecx, 8
lea eax, [ebp - 0x58]
mov word [ebp - 0x58], cx
mov dword [ebp - 0x5c], eax
jmp 0x403d6a