Function at 0x406580
Capabilities:
Create thread
Read 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, 0x218
mov eax, dword [ecx + 4]
mov esi, dword [ecx]
mov dword [ebp - 0x174], eax
movzx eax, byte [0x413058]
mov dword [ebp - 0x170], esi
test esi, esi
jle 0x406d18
xor esi, esi
jmp 0x4065cd
inc esi
cmp dword [ebp - 0x170], esi
je 0x40673f
mov edx, eax
and edx, 8
je 0x4065c0
mov eax, dword [ebp - 0x174]
mov ebx, dword [eax + esi*4]
test ebx, ebx
je 0x406c30
mov eax, ebx
shr eax, 0x10
je 0x406b90
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, 0x414068
sub esp, 8
test eax, eax
jne 0x4066fe
cmp word [ebx], 0
je 0x406c40
lea esi, [esi]
nop
mov edx, eax
lea eax, [eax + 1]
cmp word [ebx + edx*2 + 2], 0
jne 0x406620
mov eax, 0x224c
mov dword [ebp - 0x16c], ebx
lea ecx, [ebp - 0x146]
mov word [ebp - 0x148], ax
jmp 0x406680
cmp ax, 9
je 0x406a78
cmp ax, 0xa
jne 0x406a96
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea edi, [ebp - 0x26]
lea eax, [edx - 1]
cmp ecx, edi
ja 0x4066d0
test edx, edx
jle 0x4066d0
mov edx, eax
add dword [ebp - 0x16c], 2
mov eax, dword [ebp - 0x16c]
movzx eax, word [eax - 2]
cmp ax, 0xd
je 0x406a60
jbe 0x406650
cmp ax, 0x22
je 0x406af0
cmp ax, 0x5c
jne 0x406a89
mov edi, 0x5c5c
add ecx, 2
lea eax, [edx - 1]
mov word [ecx - 2], di
lea edi, [ebp - 0x26]
cmp ecx, edi
jbe 0x40667a
lea esi, [esi]
nop
mov byte [ecx], 0x22
test eax, eax
jle 0x406c59
mov ebx, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], bx
mov byte [eax], 0
lea eax, [ebp - 0x148]
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov edx, eax
mov dword [esp + 0x10], edx
inc esi
mov dword [esp + 0xc], 0x414307
mov dword [esp + 8], str.wmain
mov dword [esp + 4], 0x413058
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
movzx eax, byte [0x413058]
mov edx, eax
and edx, 8
cmp dword [ebp - 0x170], esi
jne 0x4065cd
test dl, dl
jne 0x406c68
mov dword [0x418004], 0x1f7
call dword [sym.imp.kernel32.dll_GetOEMCP]
mov dword [esp + 4], 4
mov dword [0x4180a4], eax
mov dword [0x4180a0], eax
mov dword [0x418090], 0x32
mov dword [esp], 0x32
call dword [sym.imp.ucrtbase.dll_calloc]
mov dword [0x41808c], eax
test eax, eax
je 0x406b7b
cmp dword [ebp - 0x170], 1
jle 0x406d79
mov dword [ebp - 0x180], 0
mov ebx, 1
mov dword [ebp - 0x17c], 0
mov dword [ebp - 0x178], 0
mov dword [ebp - 0x16c], 0
jmp 0x406812
mov dword [esp + 4], str.__unix
mov eax, dword [edi]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcscmp]
test eax, eax
jne 0x406b08
mov dword [0x41800c], 1
mov dword [0x418010], 1
mov dword [ebp - 0x16c], 1
inc ebx
cmp dword [ebp - 0x170], ebx
jle 0x40684c
mov eax, dword [ebp - 0x174]
lea esi, [ebx*4]
mov dword [esp + 4], str.__headless
lea edi, [eax + esi]
mov eax, dword [edi]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcscmp]
test eax, eax
jne 0x4067d0
mov dword [ebp - 0x16c], 1
inc ebx
cmp dword [ebp - 0x170], ebx
jg 0x406812
mov esi, dword [section..bss]
test esi, esi
je 0x407165
mov ecx, dword [ebp - 0x178]
mov eax, 0x50
test ecx, ecx
cmovne eax, ecx
mov ecx, dword [ebp - 0x17c]
mov edx, eax
test ecx, ecx
mov eax, 0x96
cmovne eax, ecx
mov ecx, eax
mov eax, 1
call sym._create_screen_buffer.constprop.0
mov dword [0x418008], eax
test eax, eax
je 0x406b7b
mov ebx, dword [ebp - 0x16c]
test ebx, ebx
je 0x406db2
mov ebx, dword [sym.imp.kernel32.dll_GetStdHandle]
mov dword [esp], 0xfffffff6
call ebx
sub esp, 4
mov dword [0x4180b0], eax
mov dword [esp], 0xfffffff5
call ebx
mov ecx, dword [0x4180b0]
mov dword [0x4180b4], eax
sub esp, 4
test ecx, ecx
je 0x4071a0
mov edx, dword [0x41800c]
test edx, edx
jne 0x4071b6
test eax, eax
je 0x4068ff
mov ecx, 4
mov edx, str.e_2J
mov eax, section..bss
call sym._tty_write.part.0
mov eax, dword [0x418008]
movzx edx, word [eax + 0x24]
mov eax, section..bss
call sym._set_tty_attr
mov edi, dword [0x4180b4]
test edi, edi
je 0x406930
mov ecx, 3
mov edx, 0x4143a0
mov eax, section..bss
call sym._tty_write.part.0
mov eax, dword [0x41800c]
mov dword [0x4190c8], 1
test eax, eax
jne 0x40695b
mov esi, dword [0x4180b0]
test esi, esi
je 0x40695b
mov ebx, dword [0x4180ac]
test ebx, ebx
je 0x407609
mov ecx, dword [ebp - 0x180]
test ecx, ecx
je 0x406e24
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateEventW]
mov dword [ebp - 0x188], eax
sub esp, 0x10
test eax, eax
je 0x406a06
lea eax, [ebp - 0x162]
mov dword [esp + 0x20], 0
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x15c]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x188]
mov dword [esp + 0x1c], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x180]
mov dword [esp + 0x18], 2
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [sym.imp.ntdll.dll_NtReadFile]
sub esp, 0x24
test eax, eax
je 0x406e2e
cmp eax, 0x103
je 0x406e2e
mov ebx, 1
mov edi, dword [0x41800c]
test edi, edi
je 0x406b80
mov eax, dword [0x4190c4]
xor eax, 7
test al, 0xf
je 0x406a43
mov esi, dword [0x4180b4]
test esi, esi
je 0x406a43
mov ecx, 3
mov edx, 0x41410c
mov eax, section..bss
call sym._tty_write.part.0
mov dword [0x4190c4], 7
mov eax, section..bss
call sym._tty_flush
jmp 0x406b80
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x406670
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x406670
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x406c20
mov edi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + str.0123456789abcdeftty_flush]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [edi + str.0123456789abcdeftty_flush]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + str.0123456789abcdeftty_flush]
and edi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [edi + str.0123456789abcdeftty_flush]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x406670
mov eax, 0x225c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x406670
mov dword [esp + 4], str.__width
mov eax, dword [edi]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcscmp]
test eax, eax
jne 0x406bb0
inc ebx
cmp dword [ebp - 0x170], ebx
je 0x406b7b
lea eax, [ebp - 0x160]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x174]
mov eax, dword [eax + esi + 4]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcstol]
mov dword [ebp - 0x178], eax
test eax, eax
je 0x406c07
cmp dword [ebp - 0x178], 0xffff
jg 0x406b7b
mov eax, dword [ebp - 0x160]
cmp word [eax], 0
je 0x406809
mov ebx, 1
lea esp, [ebp - 0x10]
mov eax, ebx
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
movzx ebx, bx
mov dword [esp], 0x414072
mov dword [esp + 4], ebx
call sym._wine_dbg_sprintf
mov edx, eax
jmp 0x4066fe
mov dword [esp + 4], str.__height
mov eax, dword [edi]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcscmp]
test eax, eax
jne 0x406c98
inc ebx
cmp dword [ebp - 0x170], ebx
je 0x406b7b
lea eax, [ebp - 0x160]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x174]
mov eax, dword [eax + esi + 4]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcstol]
mov dword [ebp - 0x17c], eax
test eax, eax
jne 0x406d00
mov ecx, dword [0x41800c]
test ecx, ecx
jne 0x406b6b
jmp 0x406b7b
mov byte [ecx], al
inc ecx
jmp 0x406670
mov edx, str._null_
jmp 0x4066fe
mov edx, 0x224c
mov byte [ebp - 0x146], 0x22
lea ecx, [ebp - 0x146]
mov word [ebp - 0x148], dx
lea eax, [ecx + 1]
jmp 0x4066eb
mov dword [esp + 0xc], 0x4142da
mov dword [esp + 8], str.wmain
mov dword [esp + 4], 0x413058
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x406747
mov dword [esp + 4], str.__signal
mov eax, dword [edi]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcscmp]
test eax, eax
jne 0x406d22
inc ebx
cmp dword [ebp - 0x170], ebx
je 0x406b7b
lea eax, [ebp - 0x160]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x174]
mov eax, dword [eax + esi + 4]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcstol]
mov edx, dword [ebp - 0x160]
cmp word [edx], 0
jne 0x406b7b
mov dword [ebp - 0x180], eax
jmp 0x406809
cmp dword [ebp - 0x17c], 0xffff
jle 0x406b6b
jmp 0x406b7b
and eax, 8
mov edx, eax
jmp 0x40673f
mov dword [esp + 4], str.__server
mov eax, dword [edi]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcscmp]
test eax, eax
jne 0x40788d
inc ebx
cmp dword [ebp - 0x170], ebx
je 0x406b7b
lea eax, [ebp - 0x160]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x174]
mov eax, dword [eax + esi + 4]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcstol]
mov dword [section..bss], eax
jmp 0x406b6b
mov edi, dword [section..bss]
test edi, edi
je 0x407165
mov ecx, 0x96
mov edx, 0x50
mov eax, 1
call sym._create_screen_buffer.constprop.0
mov dword [0x418008], eax
test eax, eax
je 0x406b7b
mov dword [ebp - 0x180], 0
mov dword [esp], section..bss
call sym._init_window
test eax, eax
je 0x406b7b
lea eax, [ebp - 0x148]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetStartupInfoW]
mov eax, dword [ebp - 0x13c]
sub esp, 4
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcslen]
lea edx, [eax + eax]
mov eax, dword [ebp - 0x13c]
call sym._set_console_title.constprop.0
mov eax, 5
test byte [ebp - 0x11c], 1
je 0x406e0a
movzx eax, word [ebp - 0x118]
mov dword [esp + 4], eax
mov eax, dword [0x4180a8]
mov dword [esp], eax
call dword [sym.imp.user32.dll_ShowWindow]
sub esp, 8
jmp 0x40695b
mov dword [ebp - 0x188], 0
cmp dword [0x4190cc], 0xfff
mov eax, dword [0x4190d0]
jbe 0x40730b
test eax, eax
je 0x406a06
mov eax, dword [section..bss]
mov edx, dword [ebp - 0x180]
mov dword [ebp - 0x154], eax
mov eax, 1
test edx, edx
je 0x406e76
mov eax, dword [ebp - 0x188]
mov dword [ebp - 0x150], eax
mov eax, 2
mov edx, dword [0x4180ac]
mov dword [ebp - 0x17c], eax
mov ecx, eax
test edx, edx
je 0x406e96
inc ecx
mov dword [ebp + eax*4 - 0x154], edx
mov dword [ebp - 0x17c], ecx
mov eax, dword [0x4180a8]
test eax, eax
je 0x406f28
lea eax, [ebp - 0x154]
mov dword [esp + 0x10], 0x1cff
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x17c]
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [sym.imp.user32.dll_MsgWaitForMultipleObjects]
sub esp, 0x14
cmp dword [ebp - 0x17c], eax
je 0x4072b0
test eax, eax
je 0x406ff0
cmp eax, 1
je 0x406f56
xor ebx, ebx
test byte [0x413058], 8
je 0x406a0b
mov dword [esp + 0xc], str.wait_failed__quit_n
mov dword [esp + 8], str.main_loop
mov dword [esp + 4], 0x413058
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x406a0b
lea eax, [ebp - 0x154]
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x17c]
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WaitForMultipleObjects]
sub esp, 0x10
jmp 0x406ed7
mov edx, dword [ebp - 0x15c]
movzx eax, byte [0x413058]
test edx, edx
jne 0x40785a
cmp dword [ebp - 0x158], 2
jne 0x40785a
test al, 1
jne 0x407338
lea eax, [ebp - 0x162]
mov dword [esp + 0x20], 0
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x15c]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x188]
mov dword [esp + 0x1c], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x180]
mov dword [esp + 0x18], 2
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [sym.imp.ntdll.dll_NtReadFile]
sub esp, 0x24
test eax, eax
je 0x406e96
cmp eax, 0x103
je 0x406e96
jmp 0x406a06
mov dword [esp], 0x413040
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
lea eax, [ebp - 0x148]
mov edi, dword [0x4190d0]
mov dword [ebp - 0x16c], 0
mov dword [ebp - 0x170], 0
sub esp, 4
mov dword [ebp - 0x178], eax
mov ebx, edi
mov edx, ebx
mov ebx, dword [0x4190cc]
mov ecx, dword [0x41801c]
xor eax, eax
lea edi, [ebp - 0x144]
test ecx, ecx
mov ecx, 0xf
setne al
mov esi, eax
xor eax, eax
rep stosd dword es:[edi], eax
mov eax, dword [section..bss]
mov dword [0x418024], esi
mov dword [ebp - 0xd8], str.get_next_console_request
mov dword [ebp - 0x13c], eax
mov eax, dword [ebp - 0x170]
mov dword [ebp - 0x148], 0x3a
mov dword [ebp - 0x130], eax
mov eax, dword [ebp - 0x16c]
mov dword [ebp - 0x108], 0
mov dword [ebp - 0x138], esi
test eax, eax
je 0x4070b5
mov dword [ebp - 0x100], edx
mov dword [ebp - 0x108], 1
mov dword [ebp - 0xfc], eax
mov dword [ebp - 0x144], eax
mov eax, dword [ebp - 0x178]
mov dword [ebp - 0x140], ebx
mov dword [ebp - 0x104], edx
mov dword [esp], eax
call sym._wine_server_call
mov ecx, dword [ebp - 0x138]
mov esi, dword [ebp - 0x140]
mov ebx, dword [ebp - 0x13c]
mov edi, dword [ebp - 0x144]
mov dword [ebp - 0x16c], ecx
cmp eax, 0x103
je 0x4071cf
cmp eax, 0x80000005
jne 0x4071e4
mov ebx, dword [0x4190cc]
mov edx, dword [0x4190d0]
cmp ecx, ebx
ja 0x407130
test edx, edx
je 0x4077af
mov dword [ebp - 0x170], 0
jmp 0x407030
mov dword [esp], edx
mov esi, ecx
mov dword [esp + 4], ecx
call dword [sym.imp.ucrtbase.dll_realloc]
mov edx, eax
test eax, eax
je 0x4077af
mov dword [0x4190d0], eax
mov ebx, esi
mov dword [0x4190cc], esi
mov dword [ebp - 0x170], 0
jmp 0x407030
test byte [0x413058], 2
je 0x406b7b
mov dword [esp + 0xc], str.no_server_handle_n
mov ebx, 1
mov dword [esp + 8], str.wmain
mov dword [esp + 4], 0x413058
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x406b80
test eax, eax
je 0x40736c
mov ecx, dword [0x41800c]
test ecx, ecx
je 0x4068eb
mov dword [0x4190c4], 7
mov dword [0x4190c8], 1
jmp 0x40695b
mov dword [esp], 0x413040
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
sub esp, 4
jmp 0x406e96
test eax, eax
jne 0x4077a2
cmp esi, 0x500168
je 0x407478
test ebx, ebx
jne 0x4074b4
mov ebx, dword [0x4190d0]
cmp esi, 0x504044
ja 0x407418
cmp esi, 0x504027
ja 0x4073e0
cmp esi, 0x500054
je 0x408f23
jbe 0x40737b
cmp esi, 0x500058
je 0x408581
cmp esi, 0x504000
jne case.0x4073eb.5259305
test byte [0x413058], 8
jne 0x408761
cmp dword [ebp - 0x16c], 4
mov edx, dword [0x4190cc]
mov eax, ebx
jne 0x4087a3
test edi, edi
jne 0x4087a3
cmp edx, 3
jbe 0x408732
test ebx, ebx
je 0x4079b6
mov edx, dword [0x418004]
mov dword [eax], edx
mov dword [ebp - 0x16c], 4
mov dword [ebp - 0x170], 0
mov esi, dword [ebp - 0x16c]
mov dword [ebp - 0x16c], esi
jmp 0x407028
lea eax, [ebp - 0x148]
mov ebx, dword [sym.imp.user32.dll_PeekMessageW]
mov esi, dword [sym.imp.user32.dll_DispatchMessageW]
mov edi, eax
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], edi
call ebx
sub esp, 0x14
test eax, eax
je 0x406e96
cmp dword [ebp - 0x144], 0x12
je 0x4077bd
mov dword [esp], edi
call esi
sub esp, 4
jmp 0x4072c4
mov dword [esp + 4], 0x1000
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_realloc]
test eax, eax
je 0x406a06
mov dword [0x4190d0], eax
mov dword [0x4190cc], 0x1000
jmp 0x406e4b
movzx eax, word [ebp - 0x162]
mov dword [esp + 0xc], str.unimplemented_signal__x_n
mov dword [esp + 8], str.main_loop
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x413058
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
jmp 0x406f80
mov dword [0x418014], 1
jmp 0x40695b
cmp esi, 0x500008
je 0x40856f
cmp esi, 0x500050
jne case.0x4073eb.5259305
or dword [ebp - 0x16c], edi
jne 0x4087a3
cmp dword [0x41800c], 0
je 0x4075fa
cmp dword [0x4180b4], 0
je 0x4073c5
mov ecx, 1
mov edx, 0x414191
mov eax, section..bss
call sym._tty_write.part.0
mov eax, section..bss
call sym._tty_sync
mov ebx, dword [0x4190d0]
jmp 0x407295
lea eax, [esi - 0x504028]
cmp eax, 0x1c
ja case.0x4073eb.5259305
jmp dword [eax*4 + 0x4145b0]
mov dword [ebp - 0x170], 0xc0000008
test byte [0x413058], 4
jne 0x408ea5
mov dword [ebp - 0x16c], 0
jmp 0x407028
cmp esi, 0x508034
je 0x408ed8
jbe 0x4075b8
cmp esi, 0x508040
je 0x407906
cmp esi, 0x508048
jne case.0x4073eb.5259305
mov eax, edi
mov esi, dword [ebp - 0x16c]
and eax, 1
or esi, eax
jne 0x4087a3
mov edx, edi
mov eax, ebx
call sym._set_console_title.constprop.0
mov dword [ebp - 0x170], eax
mov edi, dword [ebp - 0x170]
mov ebx, dword [0x4190d0]
test edi, edi
jne 0x407409
jmp 0x4072a5
test byte [0x413058], 8
jne 0x4077e0
mov eax, dword [0x418008]
mov dword [0x418010], 0
test eax, eax
je 0x4077c4
mov ecx, dword [eax + 0x10]
mov edx, dword [eax + 0xc]
mov eax, ebx
call sym._create_screen_buffer.constprop.0
mov ebx, dword [0x4190d0]
jmp 0x407295
mov edx, dword [0x413004]
test edx, edx
je 0x407658
mov dword [ebp - 0x184], esi
mov esi, edx
jmp 0x4074dd
mov eax, dword [esi + 4]
cmovns eax, dword [esi + 8]
mov esi, eax
test eax, eax
je 0x407658
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [section..data]
test eax, eax
jne 0x4074cc
mov dword [ebp - 0x170], eax
mov ebx, dword [0x4190d0]
mov eax, esi
mov dword [ebp - 0x174], esi
mov esi, dword [ebp - 0x184]
sub eax, 0x94
mov dword [ebp - 0x18c], ebx
mov dword [ebp - 0x184], eax
cmp esi, 0x508098
ja case.0x407751.5275769
cmp esi, 0x508077
ja 0x407746
cmp esi, 0x504080
je 0x409172
ja 0x4076c0
cmp esi, 0x50016c
je 0x4087b2
cmp esi, 0x504000
jne 0x40768a
test byte [0x413058], 8
jne 0x407971
cmp dword [ebp - 0x16c], 4
mov edx, dword [0x4190cc]
mov eax, ebx
jne 0x4087a3
test edi, edi
jne 0x4087a3
cmp edx, 3
jbe 0x407946
test ebx, ebx
je 0x4079b6
mov ecx, dword [ebp - 0x174]
mov edx, dword [ecx - 0x8c]
mov dword [eax], edx
mov dword [ebp - 0x16c], 4
jmp 0x407295
cmp esi, 0x504060
je 0x408fc5
cmp esi, 0x508004
jne case.0x4073eb.5259305
cmp edi, 4
jne 0x4087a3
cmp dword [ebp - 0x16c], 0
jne 0x4087a3
mov eax, dword [ebx]
mov dword [0x418004], eax
test byte [0x413058], 8
jne 0x408fac
mov dword [ebp - 0x16c], 0
jmp 0x407295
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x418000
mov dword [esp + 8], sym._tty_input_4
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateThread]
mov dword [0x4180ac], eax
sub esp, 0x18
test eax, eax
je 0x406b7b
jmp 0x40695b
test byte [0x413058], 2
jne 0x40780d
mov edx, dword [0x4190d0]
mov ebx, dword [0x4190cc]
mov dword [ebp - 0x16c], 0
mov dword [ebp - 0x170], 0xc0000008
jmp 0x407030
cmp esi, 0x500008
jne case.0x407751.5275769
mov eax, dword [ebp - 0x174]
mov eax, dword [eax - 0x94]
cmp dword [eax + 0xc], 0
jne 0x407295
mov dword [ebp - 0x170], 0xc00000bb
jmp 0x407409
cmp esi, 0x504088
je 0x40928b
cmp esi, 0x508004
jne case.0x407751.5275769
cmp dword [ebp - 0x16c], 0
jne 0x4087a3
cmp edi, 4
jne 0x4087a3
mov eax, dword [ebx]
mov ecx, dword [ebp - 0x174]
mov dword [ecx - 0x8c], eax
test byte [0x413058], 8
je 0x4075fa
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.set__x_mode_n
mov dword [esp + 8], str.screen_buffer_ioctl
mov dword [esp + 4], 0x413058
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
mov dword [ebp - 0x16c], 0
mov ebx, dword [0x4190d0]
jmp 0x407295
lea eax, [esi - 0x508078]
cmp eax, 0x20
ja case.0x407751.5275769
jmp dword [eax*4 + 0x414624]
mov dword [ebp - 0x170], 0xc0000008
test byte [0x413058], 4
je 0x407409
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], str.invalid_ioctl__x_n
mov dword [esp + 8], str.screen_buffer_ioctl
mov dword [esp + 4], 0x413058
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
mov ebx, dword [0x4190d0]
jmp 0x407409
test byte [0x413058], 8
jne 0x4079c5
mov dword [esp], 0x413040
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
push ebx
xor ebx, ebx
jmp 0x406a0b
mov eax, ebx
mov ecx, 0x96
mov edx, 0x50
call sym._create_screen_buffer.constprop.0
mov ebx, dword [0x4190d0]
jmp 0x407295
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], str.initializing_output__x_n
mov dword [esp + 8], str.process_console_ioctls
mov dword [esp + 4], 0x413058
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x407485
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], str.invalid_screen_buffer_id__x_n
mov dword [esp + 8], str.process_console_ioctls
mov dword [esp + 4], 0x413058
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
mov edx, dword [0x4190d0]
mov dword [ebp - 0x16c], 0
mov dword [ebp - 0x170], 0xc0000008
mov ebx, dword [0x4190cc]
jmp 0x407030
xor ebx, ebx
test al, 8
je 0x406a0b
mov dword [esp + 0xc], str.signaled_quit_n
mov dword [esp + 8], str.main_loop
mov dword [esp + 4], 0x413058
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x406a0b
test byte [0x413058], 1
je 0x406b7b
mov ebx, dword [edi]
test ebx, ebx
je 0x408835
mov eax, ebx
shr eax, 0x10
je 0x40881d
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
push edx
push edx
test eax, eax
jne 0x40880a
or edx, 0xffffffff
mov eax, ebx
call sym._wine_dbgstr_wn.part.0
mov dword [esp + 0x10], eax
mov ebx, 1
mov dword [esp + 0xc], str.unknown_option__s_n
mov dword [esp + 8], str.wmain
mov dword [esp + 4], 0x413058
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
jmp 0x406b80
test byte [0x413058], 8
jne 0x407a55
cmp edi, 0x10
jne 0x407a40
cmp dword [ebp - 0x16c], 0
jne 0x407a40
mov eax, dword [ebx]
test al, 1
jne 0x407a20
test al, 2
jne 0x4079f2
mov ebx, dword [0x4190d0]
jmp 0x4075fa
mov dword [esp + 4], 4
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
test eax, eax
je 0x4079b0
mov dword [0x4190d0], eax
mov ebx, eax
mov dword [0x4190cc], 4
jmp 0x407596
mov eax, dword [ebp - 0x174]
mov eax, dword [eax - 0x8c]
mov dword [esp + 0xc], str.returning_mode__x_n
mov dword [esp + 8], str.screen_buffer_ioctl
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x413058
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
mov ebx, dword [0x4190d0]
jmp 0x407568
mov ebx, dword [0x4190d0]
mov dword [ebp - 0x170], 0xc0000017
jmp 0x407409
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.failed_to_get_next_request:__lx_n
mov dword [esp + 8], str.process_console_ioctls
mov dword [esp + 4], 0x413058
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x4077af
mov eax, dword [ebx + 8]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsValidCodePage]
push esi
test eax, eax
je 0x407a40
mov dword [ebp - 0x16c], 0
mov eax, dword [ebx + 8]
mov ebx, dword [0x4190d0]
mov dword [0x4180a4], eax
jmp 0x407295
mov eax, dword [ebx + 4]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsValidCodePage]
push edi
test eax, eax
je 0x407a40
mov eax, dword [ebx + 4]
mov dword [0x4180a0], eax
mov eax, dword [ebx]
jmp 0x407933
mov dword [ebp - 0x170], 0xc000000d
mov ebx, dword [0x4190d0]
jmp 0x407409
mov dword [esp + 0xc], str.set_info_n
mov dword [esp + 8], str.console_input_ioctl
mov dword [esp + 4], 0x413058
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x407913
cmp edi, 0x18
jne 0x4087a3
cmp dword [ebp - 0x16c], 4
jne 0x4087a3
test byte [0x413058], 8
jne 0x407c66
mov ecx, dword [ebp - 0x174]
mov eax, dword [ecx - 0x94]
mov dword [eax + 0x10], 0
mov eax, ecx
mov edx, dword [ebx + 4]
mov ecx, dword [ecx - 0x84]
cmp edx, ecx
jae 0x407b74
mov esi, dword [eax - 0x64]
mov eax, dword [eax - 0x88]
imul ecx, eax
imul edx, eax
add edx, dword [ebx]
lea eax, [ecx*4]
mov edi, eax
cmp edx, ecx
jae 0x407aec
lea edi, [edx*4]
sub eax, edi
mov edx, dword [ebx + 0xc]
add esi, edi
sar eax, 2
cmp eax, edx
mov edi, edx
cmovbe edi, eax
mov eax, dword [ebx + 8]
cmp eax, 1
je 0x407c4f
cmp eax, 2
je 0x407c30
test eax, eax
jne 0x407a40
xor eax, eax
jmp 0x407b27
movzx edx, word [ebx + 0x14]
mov word [esi + eax*4], dx
inc eax
cmp edi, eax
jne 0x407b1e
test edi, edi
je 0x407b46
mov eax, dword [ebp - 0x174]
mov ecx, dword [ebp - 0x184]
mov eax, dword [eax - 0x94]
cmp ecx, dword [eax + 8]
je 0x407b89
mov ebx, dword [0x4190d0]
cmp dword [0x4190cc], 3
mov eax, ebx
jbe 0x407c01
test ebx, ebx
je 0x4079b6
mov dword [eax], edi
mov dword [ebp - 0x16c], 4
jmp 0x407295
mov dword [ebp - 0x16c], 4
mov ebx, dword [0x4190d0]
jmp 0x407295
mov eax, dword [ebp - 0x174]
mov esi, dword [ebx]
xor edx, edx
mov ecx, dword [ebx + 4]
mov ebx, dword [eax - 0x88]
lea eax, [edi + esi - 1]
div ebx
mov dword [ebp - 0x16c], ebx
mov dword [ebp - 0x170], eax
mov ebx, edx
mov eax, esi
xor edx, edx
div dword [ebp - 0x16c]
mov dword [ebp - 0x140], ebx
add eax, ecx
mov dword [ebp - 0x148], edx
mov edx, dword [ebp - 0x178]
mov dword [ebp - 0x144], eax
mov eax, dword [ebp - 0x184]
add ecx, dword [ebp - 0x170]
mov dword [ebp - 0x13c], ecx
call sym._update_output
mov eax, dword [ebp - 0x174]
mov eax, dword [eax - 0x94]
call sym._tty_sync
jmp 0x407b46
mov dword [esp + 4], 4
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
test eax, eax
je 0x4079b0
mov dword [0x4190d0], eax
mov ebx, eax
mov dword [0x4190cc], 4
jmp 0x407b63
xor eax, eax
jmp 0x407c46
movzx edx, word [ebx + 0x14]
mov word [esi + eax*4], dx
movzx edx, word [ebx + 0x16]
mov word [esi + eax*4 + 2], dx
inc eax
cmp edi, eax
jne 0x407c34
jmp 0x407b2b
xor eax, eax
jmp 0x407c5d
movzx edx, word [ebx + 0x16]
mov word [esi + eax*4 + 2], dx
inc eax
cmp edi, eax
jne 0x407c53
jmp 0x407b2b
mov eax, dword [ebx + 8]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 4]
mov dword [esp + 0x14], eax
mov eax, dword [ebx]
mov dword [esp + 0xc], str.__u__u__mode__u_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.fill_output
mov dword [esp + 4], 0x413058
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x407aa1
or dword [ebp - 0x16c], edi
jne 0x4087a3
test byte [0x413058], 8
jne 0x4099c8
mov esi, dword [ebp - 0x174]
mov ecx, dword [ebp - 0x184]
mov eax, dword [esi - 0x94]
mov dword [eax + 8], ecx
mov ebx, dword [esi - 0x88]
mov eax, dword [esi - 0x84]
mov dword [ebp - 0x148], 0
lea edx, [ebx - 1]
mov dword [ebp - 0x170], ebx
mov dword [ebp - 0x140], edx
dec eax
mov edx, dword [ebp - 0x178]
mov dword [ebp - 0x13c], eax
mov eax, ecx
mov dword [ebp - 0x144], 0
call sym._update_output
mov eax, dword [esi - 0x94]
call sym._tty_sync
mov dword [esp + 4], 0
mov eax, dword [esi - 0x94]
mov dword [esp], eax
call sym._update_window_config
mov ebx, dword [0x4190d0]
jmp 0x407295
cmp dword [ebp - 0x16c], 0
jne 0x4087a3
cmp edi, 0x67
jbe 0x4087a3
test byte [0x413058], 8
jne 0x408098
mov eax, dword [ebx]
test al, 1
je 0x407d92
movsx eax, word [ebx + 4]
lea edx, [eax - 1]
cmp dx, 0x63
ja 0x407a40
mov ecx, dword [ebp - 0x174]
mov dword [ecx - 0x80], eax
xor eax, eax
cmp word [ebx + 6], 0
setne al
mov dword [ecx - 0x7c], eax
mov eax, dword [ebx]
test al, 2
je 0x407e04
movsx edx, word [ebx + 8]
test dx, dx
js 0x407a40
mov esi, dword [ebp - 0x174]
cmp edx, dword [esi - 0x88]
jae 0x407a40
movsx ecx, word [ebx + 0xa]
test cx, cx
js 0x407a40
cmp ecx, dword [esi - 0x84]
jae 0x407a40
cmp edx, dword [esi - 0x78]
je 0x409ba9
mov esi, dword [ebp - 0x174]
mov dword [esi - 0x78], edx
mov eax, dword [esi - 0x94]
movsx ecx, word [ebx + 0xa]
mov dword [esi - 0x74], ecx
cmp dword [eax + 0x10], 0
jne 0x409b9f
mov eax, dword [ebp - 0x184]
call sym._scroll_to_cursor
mov eax, dword [ebx]
test al, 4
je 0x407ee7
mov esi, dword [ebp - 0x174]
mov eax, dword [esi - 0x94]
mov dword [eax + 0x10], 0
mov eax, dword [esi - 0x18]
movsx edx, word [ebx + 0xc]
mov dword [ebp - 0x16c], eax
inc eax
sub eax, dword [esi - 0x20]
cmp edx, eax
jl 0x407a40
mov eax, dword [esi - 0x14]
movsx ecx, word [ebx + 0xe]
mov dword [ebp - 0x16c], eax
inc eax
sub eax, dword [esi - 0x1c]
cmp ecx, eax
jl 0x407a40
mov eax, dword [ebp - 0x184]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._change_screen_buffer_size
mov dword [ebp - 0x170], eax
test eax, eax
jne 0x40808d
mov ecx, dword [ebp - 0x174]
movsx edx, word [ebx + 0xc]
mov eax, dword [ecx - 0x18]
cmp eax, edx
jl 0x407e93
sub eax, dword [ecx - 0x20]
mov dword [ecx - 0x20], 0
mov dword [ecx - 0x18], eax
mov ecx, dword [ebp - 0x174]
movsx edx, word [ebx + 0xe]
mov eax, dword [ecx - 0x14]
cmp eax, edx
jl 0x407eb1
sub eax, dword [ecx - 0x1c]
mov dword [ecx - 0x1c], 0
mov dword [ecx - 0x14], eax
mov ecx, dword [ebp - 0x174]
movsx eax, word [ebx + 0xc]
cmp dword [ecx - 0x78], eax
jb 0x407ec4
dec eax
mov dword [ecx - 0x78], eax
mov ecx, dword [ebp - 0x174]
movsx eax, word [ebx + 0xe]
cmp dword [ecx - 0x74], eax
jb 0x407ed7
dec eax
mov dword [ecx - 0x74], eax
mov eax, dword [ebp - 0x184]
mov dword [esp], eax
call sym._notify_screen_buffer_size
mov eax, dword [ebx]
test al, 8
je 0x407efb
movzx eax, word [ebx + 0x10]
mov ecx, dword [ebp - 0x174]
mov word [ecx - 0x70], ax
mov eax, dword [ebx]
test al, 0x40
je 0x407f0f
movzx eax, word [ebx + 0x12]
mov ecx, dword [ebp - 0x174]
mov word [ecx - 0x6e], ax
mov eax, dword [ebx]
test al, 0x10
je 0x407fa5
mov esi, dword [ebp - 0x174]
mov eax, dword [esi - 0x94]
mov dword [eax + 0x10], 0
movsx edx, word [ebx + 0x14]
test dx, dx
js 0x407a40
movsx eax, word [ebx + 0x18]
cmp dx, ax
jg 0x407a40
mov dword [ebp - 0x16c], eax
cmp eax, dword [esi - 0x88]
jae 0x407a40
movsx eax, word [ebx + 0x16]
test ax, ax
js 0x407a40
movsx ecx, word [ebx + 0x1a]
cmp ax, cx
jg 0x407a40
cmp ecx, dword [esi - 0x84]
jae 0x407a40
cmp dword [esi - 0x20], edx
je 0x4080cb
mov ecx, dword [ebp - 0x174]
mov dword [ecx - 0x20], edx
movsx eax, word [ebx + 0x16]
mov dword [ecx - 0x1c], eax
movsx eax, word [ebx + 0x18]
mov dword [ecx - 0x18], eax
movsx eax, word [ebx + 0x1a]
mov dword [ecx - 0x14], eax
mov eax, dword [ebx]
test al, 0x20
je 0x407fcc
mov ecx, dword [ebp - 0x174]
mov eax, dword [ecx - 0x94]
mov dword [eax + 0x10], 0
movsx eax, word [ebx + 0x1c]
mov dword [ecx - 0x6c], eax
movsx eax, word [ebx + 0x1e]
mov dword [ecx - 0x68], eax
mov eax, dword [ebx]
test al, 0x80
je 0x408032
sub edi, 0x68
movsx eax, word [ebx + 0x22]
lea ecx, [ebx + 0x68]
jne 0x407ff2
mov esi, dword [ebp - 0x174]
mov ecx, dword [esi - 8]
mov esi, dword [esi - 4]
mov dword [ebp - 0x16c], esi
mov edi, esi
add edi, esi
test eax, eax
jne 0x407ffb
mov eax, 0xc
cmp word [ebx + 0x24], 0x258
mov edx, 0x190
mov ebx, 0x2bc
mov dword [esp + 0xc], eax
cmovge edx, ebx
mov eax, dword [ebp - 0x174]
mov dword [esp + 8], edi
mov dword [esp + 4], ecx
mov dword [esp + 0x10], edx
mov eax, dword [eax - 0x94]
mov dword [esp], eax
call sym._update_console_font
mov eax, dword [ebp - 0x174]
mov ecx, dword [ebp - 0x184]
mov eax, dword [eax - 0x94]
cmp ecx, dword [eax + 8]
jne 0x407731
call sym._tty_sync
mov eax, dword [ebp - 0x174]
mov dword [esp + 4], 0
mov eax, dword [eax - 0x94]
mov dword [esp], eax
call sym._update_window_config
mov ebx, dword [0x4190d0]
mov dword [ebp - 0x16c], 0
jmp 0x407295
mov dword [ebp - 0x170], 0xc0000017
mov ebx, dword [0x4190d0]
jmp 0x407409
mov eax, dword [ebp - 0x184]
mov dword [esp + 0xc], 0x414480
mov dword [esp + 8], str.set_output_info
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x413058
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x407d63
cmp dword [esi - 0x1c], eax
jne 0x407f85
mov eax, esi
mov esi, dword [ebp - 0x16c]
cmp dword [eax - 0x18], esi
jne 0x407f85
cmp dword [eax - 0x14], ecx
jne 0x407f85
jmp 0x407fa3
test edi, edi
jne 0x4087a3
mov eax, dword [0x418088]
test eax, eax
je 0x408115
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcslen]
mov ebx, dword [0x4190d0]
mov edi, eax
mov eax, dword [ebp - 0x16c]
lea edx, [edi + edi]
mov dword [ebp - 0x170], ebx
sub eax, 8
cmp edx, eax
cmovbe eax, edx
mov dword [ebp - 0x174], eax
add eax, 8
mov dword [ebp - 0x16c], eax
cmp eax, dword [0x4190cc]
ja 0x4082c4
test ebx, ebx
je 0x4079b6
test byte [0x413058], 8
jne 0x40825d
cmp dword [ebp - 0x174], 0
jne 0x4081d8
mov eax, dword [ebp - 0x170]
mov ebx, dword [0x4190d0]
mov dword [eax], edi
jmp 0x407295
test byte [0x413058], 8
jne 0x40822e
mov edx, dword [0x4190cc]
mov eax, ebx
test edi, edi
jne 0x4087a3
cmp dword [ebp - 0x16c], 0xc
jne 0x4087a3
cmp edx, 0xb
jbe 0x408202
test ebx, ebx
je 0x4079b6
mov edx, dword [0x4180a0]
mov dword [ebp - 0x16c], 0xc
mov dword [eax], edx
mov edx, dword [0x4180a4]
mov dword [eax + 4], edx
mov edx, dword [0x41801c]
mov dword [eax + 8], edx
jmp 0x407295
mov eax, dword [ebp - 0x170]
mov ecx, dword [ebp - 0x174]
mov edx, dword [0x418088]
add eax, 4
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._memcpy
jmp 0x408165
mov dword [esp + 4], 0xc
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
test eax, eax
je 0x4079b0
mov dword [0x4190d0], eax
mov ebx, eax
mov dword [0x4190cc], 0xc
jmp 0x4081af
mov dword [esp + 0xc], str.get_info_n
mov dword [esp + 8], str.console_input_ioctl
mov dword [esp + 4], 0x413058
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
mov ebx, dword [0x4190d0]
jmp 0x408185
mov esi, dword [0x418088]
test esi, esi
je 0x40830d
mov eax, esi
shr eax, 0x10
je 0x4082f8
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
push ebx
push ebx
test eax, eax
jne 0x4082f1
or edx, 0xffffffff
mov eax, esi
call sym._wine_dbgstr_wn.part.0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.returning_title__s_n
mov dword [esp + 8], str.console_input_ioctl
mov dword [esp + 4], 0x413058
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x40815c
mov dword [esp + 4], eax
mov esi, eax
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
mov dword [ebp - 0x170], eax
test eax, eax
je 0x408083
mov dword [0x4190d0], eax
mov dword [0x4190cc], esi
jmp 0x40814f
mov eax, 0x414068
jmp 0x408297
movzx esi, si
mov dword [esp], 0x414072
mov dword [esp + 4], esi
call sym._wine_dbg_sprintf
jmp 0x408297
mov eax, str._null_
jmp 0x408297
test byte [0x413058], 8
jne 0x4083aa
test edi, edi
jne 0x407a40
cmp dword [0x4180b0], 0
je 0x40833f
cmp dword [0x4180ac], 0
je 0x40847e
imul eax, dword [0x41801c], 0x14
mov ecx, dword [ebp - 0x16c]
cmp ecx, eax
cmovbe eax, ecx
mov dword [ebp - 0x16c], eax
mov ecx, eax
mov eax, dword [0x4190d0]
mov ebx, eax
cmp ecx, dword [0x4190cc]
ja 0x4083d3
test eax, eax
je 0x4079b6
cmp dword [ebp - 0x16c], 0
mov ebx, dword [0x4190d0]
je 0x407295
mov ecx, dword [ebp - 0x16c]
mov edx, dword [0x418018]
mov dword [esp], eax
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
call sym._memcpy
mov ebx, dword [0x4190d0]
jmp 0x407295
mov dword [esp + 0xc], str.peek_n
mov dword [esp + 8], str.console_input_ioctl
mov dword [esp + 4], 0x413058
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x408321
mov dword [esp + 4], ecx
mov esi, ecx
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_realloc]
test eax, eax
je 0x408083
mov dword [0x4190d0], eax
mov dword [0x4190cc], esi
jmp 0x408370
test edi, edi
jne 0x4087a3
cmp dword [0x4180b0], 0
je 0x408418
cmp dword [0x4180ac], 0
je 0x4084c0
cmp dword [0x41801c], 0
jne 0x40842a
cmp dword [ebp - 0x16c], 0
jne 0x408447
mov edx, dword [ebp - 0x16c]
mov eax, section..bss
xor esi, esi
call sym._read_console_input
mov dword [ebp - 0x170], eax
jmp 0x407460
test byte [0x413058], 8
jne 0x408502
mov eax, dword [ebp - 0x16c]
mov ebx, dword [0x4190d0]
mov dword [0x418034], 0x504030
mov dword [ebp - 0x170], 0x103
mov dword [0x418038], eax
jmp 0x407409
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x418000
mov dword [esp + 8], sym._tty_input_4
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateThread]
mov dword [0x4180ac], eax
sub esp, 0x18
jmp 0x40833f
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x418000
mov dword [esp + 8], sym._tty_input_4
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateThread]
mov dword [0x4180ac], eax
sub esp, 0x18
jmp 0x408418
mov dword [esp + 0xc], str.pending_read_n
mov dword [esp + 8], str.console_input_ioctl
mov dword [esp + 4], 0x413058
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x408454
cmp dword [0x4180b0], 0
je 0x408541
cmp dword [0x4180ac], 0
je 0x408674
mov dword [esp], 0
xor ecx, ecx
mov eax, 0x50402c
xor esi, esi
mov dword [esp + 4], 0
mov edx, dword [ebp - 0x16c]
call sym._read_console.constprop.0
mov dword [ebp - 0x170], eax
jmp 0x407460
cmp dword [0x41800c], 0
jne 0x407295
jmp 0x4076ac
test byte [0x413058], 8
jne 0x408703
cmp dword [ebp - 0x16c], 4
mov eax, dword [0x4190cc]
mov esi, ebx
jne 0x4087a3
test edi, edi
jne 0x4087a3
cmp eax, 3
jbe 0x4086d4
test ebx, ebx
je 0x4079b6
cmp dword [0x4180a8], 0
je 0x4086b6
mov eax, dword [0x4180a8]
mov ebx, dword [0x4190d0]
mov dword [ebp - 0x16c], 4
mov dword [esi], eax
jmp 0x407295
mov eax, dword [ebp - 0x16c]
and eax, 1
or eax, edi
mov esi, eax
jne 0x4087a3
cmp dword [0x4180b0], 0
je 0x408609
cmp dword [0x4180ac], 0
je 0x408635
mov dword [esp + 4], 0
mov edx, dword [ebp - 0x16c]
xor ecx, ecx
mov eax, 0x504028
mov dword [esp], 0
call sym._read_console.constprop.0
mov dword [ebp - 0x170], eax
jmp 0x407460
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x418000
mov dword [esp + 8], sym._tty_input_4
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateThread]
mov dword [0x4180ac], eax
sub esp, 0x18
jmp 0x408609
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x418000
mov dword [esp + 8], sym._tty_input_4
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateThread]
mov dword [0x4180ac], eax
sub esp, 0x18
jmp 0x408541
cmp dword [0x418014], 0
jne 0x4085c8
mov dword [esp], section..bss
call sym._init_message_window
jmp 0x4085c8
mov dword [esp + 4], 4
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
mov esi, eax
test eax, eax
je 0x4079b0
mov dword [0x4190d0], eax
mov dword [0x4190cc], 4
jmp 0x4085bb
mov dword [esp + 0xc], str.get_window_n
mov dword [esp + 8], str.console_input_ioctl
mov dword [esp + 4], 0x413058
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
mov ebx, dword [0x4190d0]
jmp 0x40858e
mov dword [esp + 4], 4
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
test eax, eax
je 0x4079b0
mov dword [0x4190d0], eax
mov ebx, eax
mov dword [0x4190cc], 4
jmp 0x407283
mov eax, dword [0x418004]
mov dword [esp + 0xc], str.returning_mode__x_n
mov dword [esp + 8], str.console_input_ioctl
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x413058
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
mov ebx, dword [0x4190d0]
jmp 0x407255
cmp dword [ebx + 0xc], 0
jne 0x4097ba
mov dword [ebp - 0x170], 0xc000000d
jmp 0x407409
or dword [ebp - 0x16c], edi
jne 0x4087a3
mov eax, dword [ebp - 0x174]
mov ecx, dword [ebp - 0x184]
mov eax, dword [eax - 0x94]
cmp ecx, dword [eax + 8]
je 0x408814
mov esi, dword [ebp - 0x174]
mov eax, esi
call sym._rb_remove.constprop.0
mov eax, dword [esi - 8]
mov ebx, dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], eax
call ebx
mov eax, dword [esi - 0x64]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x184]
mov dword [esp], eax
call ebx
mov ebx, dword [0x4190d0]
jmp 0x407295
mov eax, 0x414068
jmp 0x4078d4
mov dword [eax + 8], 0
jmp 0x4087d1
movzx ebx, bx
mov dword [esp], 0x414072
mov dword [esp + 4], ebx
call sym._wine_dbg_sprintf
jmp 0x4078d4
mov eax, str._null_
jmp 0x4078d4
cmp edi, 0x18
jne 0x4087a3
cmp dword [ebp - 0x16c], 0
jne 0x4087a3
mov eax, dword [ebp - 0x174]
mov eax, dword [eax - 0x94]
mov dword [eax + 0x10], 0
movsx eax, word [ebx + 4]
movsx ecx, word [ebx]
movsx edi, word [ebx + 2]
mov dword [ebp - 0x1a0], eax
inc eax
sub eax, ecx
mov dword [ebp - 0x18c], ecx
mov dword [ebp - 0x190], eax
movsx eax, word [ebx + 6]
mov dword [ebp - 0x198], edi
mov dword [ebp - 0x1ac], eax
inc eax
sub eax, edi
mov dword [ebp - 0x16c], eax
test byte [0x413058], 8
jne 0x408e56
xor eax, eax
mov ecx, dword [ebp - 0x174]
cmp word [ebx + 0xc], 0
mov esi, eax
cmovns si, word [ebx + 0xc]
cmp word [ebx + 0xe], 0
cmovns ax, word [ebx + 0xe]
mov edx, dword [ecx - 0x88]
mov edi, eax
movsx eax, word [ebx + 0x10]
mov dword [ebp - 0x19c], edx
dec edx
mov word [ebp - 0x1b6], di
cmp edx, eax
cmovbe eax, edx
mov dword [ebp - 0x1b4], eax
mov eax, dword [ecx - 0x84]
lea edx, [eax - 1]
mov dword [ebp - 0x194], eax
movsx eax, word [ebx + 0x12]
cmp edx, eax
cmovbe eax, edx
mov dword [ebp - 0x1bc], eax
cmp di, ax
jg 0x408d6f
movzx ecx, word [ebp - 0x1b4]
mov word [ebp - 0x1a8], si
cmp si, cx
jg 0x408d6f
movzx esi, word [ebx]
test si, si
js 0x408d6f
movzx edi, word [ebx + 2]
test di, di
js 0x408d6f
movsx edx, word [ebx + 4]
cmp dword [ebp - 0x19c], edx
jbe 0x408d6f
cmp si, dx
movzx ecx, word [ebx + 6]
setg al
mov esi, eax
cmp di, cx
setg al
mov edx, esi
or dl, al
jne 0x408d6f
mov edx, dword [ebp - 0x194]
movsx eax, cx
cmp edx, eax
jbe 0x408d6f
movzx esi, word [ebx + 8]
test si, si
js 0x408d6f
movsx edi, si
mov dword [ebp - 0x1c0], edi
cmp dword [ebp - 0x19c], edi
jbe 0x408d6f
movsx edi, word [ebx + 0xa]
test di, di
js 0x408d6f
movsx ecx, di
mov dword [ebp - 0x1d4], ecx
cmp edx, ecx
jbe 0x408d6f
movsx edx, word [ebp - 0x1a8]
mov eax, dword [ebp - 0x18c]
mov ecx, dword [ebp - 0x198]
cmp eax, edx
cmovl eax, edx
mov dword [ebp - 0x1a4], eax
mov word [ebp - 0x1b8], ax
movsx eax, word [ebp - 0x1b6]
cmp ecx, eax
mov dword [ebp - 0x1c4], eax
cmovge eax, ecx
mov ecx, dword [ebp - 0x1a0]
mov dword [ebp - 0x194], eax
mov word [ebp - 0x1c6], ax
movsx eax, word [ebp - 0x1b4]
cmp ecx, eax
mov dword [ebp - 0x1cc], eax
cmovg ecx, eax
mov eax, dword [ebp - 0x1ac]
mov dword [ebp - 0x1a0], ecx
movsx ecx, word [ebp - 0x1bc]
cmp eax, ecx
mov dword [ebp - 0x1d0], ecx
cmovg eax, ecx
mov ecx, dword [ebp - 0x190]
mov dword [ebp - 0x1ac], eax
mov eax, ecx
lea eax, [esi + eax - 1]
mov word [ebp - 0x1ae], ax
movzx eax, word [ebp - 0x16c]
lea eax, [edi + eax - 1]
mov word [ebp - 0x1b0], ax
cmp word [ebp - 0x1a8], si
jle 0x408a96
mov eax, edx
sub ecx, edx
sub eax, dword [ebp - 0x1c0]
add ecx, dword [ebp - 0x1c0]
add dword [ebp - 0x18c], eax
movzx esi, word [ebp - 0x1a8]
mov dword [ebp - 0x190], ecx
movzx edx, word [ebp - 0x1b6]
cmp dx, di
jle 0x408acb
mov ecx, dword [ebp - 0x1c4]
mov edi, dword [ebp - 0x1d4]
mov eax, ecx
sub eax, edi
add dword [ebp - 0x198], eax
mov eax, dword [ebp - 0x16c]
sub eax, ecx
add eax, edi
movsx edi, dx
mov dword [ebp - 0x16c], eax
movzx eax, word [ebp - 0x1ae]
cmp word [ebp - 0x1b4], ax
jge 0x408aec
movsx edx, ax
mov eax, dword [ebp - 0x1cc]
sub eax, edx
add dword [ebp - 0x190], eax
movzx eax, word [ebp - 0x1b0]
cmp word [ebp - 0x1bc], ax
jge 0x408b0d
movsx edx, ax
mov eax, dword [ebp - 0x1d0]
sub eax, edx
add dword [ebp - 0x16c], eax
cmp dword [ebp - 0x190], 0
jle 0x408bf8
cmp dword [ebp - 0x16c], 0
jle 0x408bf8
mov eax, dword [ebp - 0x174]
mov ecx, dword [eax - 0x64]
movsx eax, si
mov dword [ebp - 0x1b4], eax
mov eax, dword [ebp - 0x198]
mov dword [ebp - 0x1a8], ecx
mov ecx, dword [ebp - 0x190]
shl ecx, 2
mov dword [ebp - 0x190], ecx
movsx ecx, di
mov edx, ecx
cmp ecx, eax
jle 0x408dad
mov ecx, dword [ebp - 0x16c]
mov edx, dword [ebp - 0x19c]
mov word [ebp - 0x198], di
mov dword [ebp - 0x19c], ebx
lea eax, [eax + ecx - 1]
mov ecx, dword [ebp - 0x1a8]
imul eax, edx
add eax, dword [ebp - 0x18c]
lea ecx, [ecx + eax*4]
lea eax, [edi - 1]
mov edi, esi
cwde
add eax, dword [ebp - 0x16c]
mov esi, ecx
imul eax, edx
mov edx, dword [ebp - 0x1a8]
add eax, dword [ebp - 0x1b4]
lea edx, [edx + eax*4]
mov ebx, edx
mov eax, dword [ebp - 0x190]
mov dword [esp + 4], esi
mov dword [esp], ebx
mov dword [esp + 8], eax
call sym._memcpy
mov eax, dword [ebp - 0x174]
mov eax, dword [eax - 0x88]
mov dword [ebp - 0x18c], eax
shl eax, 2
sub ebx, eax
sub esi, eax
dec dword [ebp - 0x16c]
jne 0x408bb2
mov esi, edi
mov ebx, dword [ebp - 0x19c]
movsx edi, word [ebp - 0x198]
mov ecx, dword [ebp - 0x1ac]
cmp dword [ebp - 0x194], ecx
jg 0x408cec
movsx eax, word [ebp - 0x1ae]
mov ecx, dword [ebp - 0x1a4]
inc eax
cmp eax, ecx
mov edx, eax
movsx eax, di
cmovl edx, ecx
mov dword [ebp - 0x198], eax
mov eax, dword [ebp - 0x1ac]
cmp cx, si
mov dword [ebp - 0x16c], edx
cmovl edx, ecx
inc eax
mov dword [ebp - 0x18c], eax
lea eax, [esi - 1]
cwde
mov dword [ebp - 0x190], edx
mov dword [ebp - 0x19c], eax
mov ecx, dword [ebp - 0x194]
mov eax, dword [ebp - 0x198]
cmp ecx, eax
jl 0x408d80
movsx eax, word [ebp - 0x1b0]
cmp eax, ecx
jl 0x408d80
cmp word [ebp - 0x1b8], si
jl 0x408d91
mov edx, dword [ebp - 0x1a0]
mov eax, dword [ebp - 0x16c]
je 0x408d91
cmp edx, eax
jl 0x408cd4
mov word [ebp - 0x1a8], si
mov dword [ebp - 0x1b4], edx
mov esi, dword [ebp - 0x174]
mov edx, dword [ebp - 0x194]
imul edx, dword [esi - 0x88]
mov ecx, edx
mov edx, dword [esi - 0x64]
mov esi, dword [ebx + 0x14]
add ecx, eax
inc eax
mov dword [edx + ecx*4], esi
cmp eax, dword [ebp - 0x1b4]
jle 0x408ca4
movzx esi, word [ebp - 0x1a8]
inc dword [ebp - 0x194]
mov eax, dword [ebp - 0x194]
cmp eax, dword [ebp - 0x18c]
jne 0x408c51
mov eax, dword [ebp - 0x1a4]
mov ecx, dword [ebp - 0x1a0]
mov edx, dword [ebp - 0x178]
cmp ax, si
cmovg eax, esi
cwde
mov dword [ebp - 0x148], eax
movzx eax, word [ebp - 0x1ae]
cmp cx, ax
cmovge eax, ecx
mov ecx, dword [ebp - 0x1ac]
cwde
mov dword [ebp - 0x140], eax
movsx eax, word [ebp - 0x1c6]
cmp ax, di
cmovg eax, edi
mov dword [ebp - 0x144], eax
movzx eax, word [ebp - 0x1b0]
cmp cx, ax
cmovge eax, ecx
xor esi, esi
cwde
mov dword [ebp - 0x13c], eax
mov eax, dword [ebp - 0x184]
call sym._update_output
mov eax, dword [ebp - 0x174]
mov eax, dword [eax - 0x94]
call sym._tty_sync
jmp 0x407460
mov dword [ebp - 0x170], 0xc000000d
xor esi, esi
jmp 0x407460
mov edx, dword [ebp - 0x1a0]
mov eax, dword [ebp - 0x1a4]
jmp 0x408c93
mov eax, dword [ebp - 0x19c]
mov edx, dword [ebp - 0x1a0]
cmp eax, edx
cmovle edx, eax
mov eax, dword [ebp - 0x190]
jmp 0x408c93
mov ecx, dword [ebp - 0x1a8]
imul edx, dword [ebp - 0x19c]
mov eax, dword [ebp - 0x198]
imul eax, dword [ebp - 0x19c]
mov word [ebp - 0x19c], di
mov edi, esi
add eax, dword [ebp - 0x18c]
mov dword [ebp - 0x18c], 0
lea ecx, [ecx + eax*4]
mov eax, dword [ebp - 0x1b4]
mov esi, ecx
add eax, edx
mov edx, dword [ebp - 0x1a8]
mov dword [ebp - 0x1a8], ebx
lea edx, [edx + eax*4]
mov ebx, edx
mov eax, dword [ebp - 0x190]
mov dword [esp + 4], esi
mov dword [esp], ebx
mov dword [esp + 8], eax
call dword [sym.imp.ucrtbase.dll_memmove]
mov eax, dword [ebp - 0x174]
inc dword [ebp - 0x18c]
mov eax, dword [eax - 0x88]
mov dword [ebp - 0x198], eax
shl eax, 2
add ebx, eax
add esi, eax
mov eax, dword [ebp - 0x18c]
cmp dword [ebp - 0x16c], eax
jg 0x408dfe
mov esi, edi
mov ebx, dword [ebp - 0x1a8]
movsx edi, word [ebp - 0x19c]
jmp 0x408bf8
mov dword [esp + 0x24], eax
mov eax, dword [ebp - 0x190]
mov dword [esp + 0x20], eax
movsx eax, word [ebx + 0xa]
mov dword [esp + 0x1c], eax
movsx eax, word [ebx + 8]
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], str.__d__d_______u__u__w__u_h__u_n
mov dword [esp + 8], str.scroll_output
mov dword [esp + 4], 0x413058
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x4088ae
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], str.unsupported_ioctl__x_n
mov dword [esp + 8], str.console_input_ioctl
mov dword [esp + 4], 0x413058
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
mov ebx, dword [0x4190d0]
jmp 0x407409
mov ecx, 0x14
mov eax, edi
xor edx, edx
mov esi, dword [ebp - 0x16c]
div ecx
mov ecx, eax
or esi, edx
jne 0x4087a3
test byte [0x413058], 8
jne 0x408f47
cmp edi, 0x13
jbe 0x40793b
mov dword [esp], 1
mov edx, ebx
mov eax, section..bss
call sym._write_console_input.part.0
mov dword [ebp - 0x170], eax
jmp 0x407460
or dword [ebp - 0x16c], edi
jne 0x4087a3
test byte [0x413058], 8
jne 0x408f80
mov dword [0x41801c], 0
jmp 0x407295
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x414252
mov dword [esp + 8], str.write_console_input
mov dword [esp + 4], 0x413058
mov dword [esp], 3
mov dword [ebp - 0x16c], eax
call sym._wine_dbg_log.constprop.0
mov ecx, dword [ebp - 0x16c]
jmp 0x408efc
mov dword [esp + 0xc], str.flush_n
mov dword [esp + 8], str.console_input_ioctl
mov dword [esp + 4], 0x413058
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
mov ebx, dword [0x4190d0]
jmp 0x408f38
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.set__x_mode_n
mov dword [esp + 8], str.console_input_ioctl
jmp 0x40771d
cmp edi, 3
jbe 0x4087a3
mov eax, dword [ebp - 0x16c]
cmp eax, 3
jbe 0x4087a3
or eax, edi
and eax, 1
mov esi, eax
jne 0x4087a3
cmp dword [0x4180b0], 0
je 0x408ffc
cmp dword [0x4180ac], 0
je 0x40902b
mov eax, dword [ebx]
mov edx, dword [ebp - 0x16c]
lea ecx, [ebx + 4]
mov dword [esp + 4], eax
lea eax, [edi - 4]
sub edx, 4
shr eax, 1
mov dword [esp], eax
mov eax, 0x504060
call sym._read_console.constprop.0
mov dword [ebp - 0x170], eax
jmp 0x407460
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x418000
mov dword [esp + 8], sym._tty_input_4
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateThread]
mov dword [0x4180ac], eax
sub esp, 0x18
jmp 0x408ffc
mov eax, dword [ebp - 0x174]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov eax, dword [eax - 0x94]
mov eax, dword [eax + 0xa4]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_MultiByteToWideChar]
mov dword [ebp - 0x170], eax
call eax
sub esp, 0x18
mov esi, eax
test eax, eax
je 0x407b7e
add eax, eax
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
test eax, eax
je 0x408083
mov dword [esp + 0x10], eax
mov dword [ebp - 0x18c], eax
mov eax, dword [ebp - 0x174]
mov dword [esp + 0x14], esi
mov dword [esp + 0xc], edi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov eax, dword [eax - 0x94]
mov eax, dword [eax + 0xa4]
mov dword [esp], eax
mov eax, dword [ebp - 0x170]
call eax
mov edx, dword [ebp - 0x18c]
mov eax, dword [ebp - 0x184]
mov ecx, esi
sub esp, 0x18
mov dword [ebp - 0x174], edx
call sym._write_console
mov edx, dword [ebp - 0x174]
mov dword [ebp - 0x170], eax
mov dword [esp], edx
call dword [sym.imp.ucrtbase.dll_free]
mov esi, dword [ebp - 0x16c]
jmp 0x407460
mov eax, edi
mov esi, dword [ebp - 0x16c]
and eax, 1
or esi, eax
jne 0x4087a3
mov eax, dword [ebp - 0x184]
mov ecx, edi
mov edx, ebx
shr ecx, 1
call sym._write_console
mov dword [ebp - 0x170], eax
jmp 0x407460
cmp edi, 0x10
jne 0x4087a3
mov eax, dword [ebp - 0x174]
mov eax, dword [eax - 0x94]
mov dword [eax + 0x10], 0
mov eax, dword [ebx]
mov edx, dword [ebx + 8]
mov dword [ebp - 0x184], eax
mov eax, dword [ebx + 4]
mov dword [ebp - 0x18c], eax
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x170], eax
test byte [0x413058], 8
jne 0x4096c9
mov eax, dword [0x4190cc]
mov ecx, ebx
mov dword [ebp - 0x190], eax
cmp edx, 1
je 0x409630
cmp edx, 2
je 0x4094fe
mov dword [ebp - 0x170], 0xc000000d
test edx, edx
jne 0x407409
mov edi, dword [ebp - 0x174]
mov eax, dword [edi - 0x88]
cmp dword [ebp - 0x184], eax
jae 0x4075fa
mov esi, dword [edi - 0x84]
mov dword [ebp - 0x170], esi
cmp dword [ebp - 0x18c], esi
jae 0x4075fa
mov esi, dword [ebp - 0x18c]
mov edi, dword [edi - 0x64]
imul esi, eax
add esi, dword [ebp - 0x184]
mov dword [ebp - 0x174], edi
imul eax, dword [ebp - 0x170]
lea edi, [esi*4]
mov esi, dword [ebp - 0x16c]
shr esi, 1
shl eax, 2
sub eax, edi
sar eax, 2
cmp eax, esi
cmovbe esi, eax
lea eax, [esi + esi]
mov dword [ebp - 0x16c], eax
cmp eax, dword [ebp - 0x190]
ja 0x4094c4
test ebx, ebx
je 0x4079b6
add edi, dword [ebp - 0x174]
jmp 0x409282
movzx eax, word [edi + edx*4]
mov word [ecx + edx*2], ax
inc edx
cmp esi, edx
jne 0x409279
jmp 0x407295
mov ecx, dword [ebp - 0x16c]
mov edx, dword [0x4190cc]
cmp ecx, 0x63
jbe 0x4087a3
test edi, edi
jne 0x4087a3
mov eax, dword [ebp - 0x174]
mov eax, dword [eax - 4]
add eax, 0x32
add eax, eax
cmp ecx, eax
cmovbe eax, ecx
mov dword [ebp - 0x16c], eax
cmp eax, edx
ja 0x409b6c
test ebx, ebx
je 0x4079b6
mov ecx, dword [ebp - 0x174]
mov esi, dword [ebp - 0x18c]
mov eax, dword [ecx - 0x80]
mov word [esi], ax
mov eax, dword [ecx - 0x7c]
mov word [esi + 2], ax
mov eax, dword [ecx - 0x88]
mov edx, dword [ecx - 0x78]
mov dword [ebp - 0x170], eax
dec eax
cmp eax, edx
cmova eax, edx
mov word [esi + 4], ax
mov eax, dword [ecx - 0x74]
mov word [esi + 6], ax
mov eax, dword [ecx - 0x88]
mov word [esi + 8], ax
mov eax, dword [ecx - 0x84]
mov word [esi + 0xa], ax
movzx eax, word [ecx - 0x70]
mov word [esi + 0xc], ax
movzx eax, word [ecx - 0x6e]
mov word [esi + 0xe], ax
mov eax, dword [ecx - 0x20]
mov word [esi + 0x10], ax
mov eax, dword [ecx - 0x1c]
mov word [esi + 0x12], ax
mov eax, dword [ecx - 0x18]
mov word [esi + 0x14], ax
mov eax, dword [ecx - 0x14]
mov word [esi + 0x16], ax
mov eax, dword [ecx - 0x6c]
mov word [esi + 0x18], ax
mov eax, dword [ecx - 0x68]
mov word [esi + 0x1a], ax
movzx eax, word [ecx - 0x10]
cmp dword [ebp - 0x16c], 0x64
mov word [esi + 0x1c], ax
movzx eax, word [ecx - 0xe]
mov word [esi + 0x1e], ax
movzx eax, word [ecx - 0xc]
mov word [esi + 0x20], ax
movzx eax, word [ecx - 0xa]
mov word [esi + 0x22], ax
lea eax, [esi + 0x24]
lea esi, [ecx - 0x60]
mov ecx, 0x10
mov edi, eax
rep movsd dword es:[edi], dword [esi]
ja 0x409b3c
test byte [0x413058], 8
je 0x407b7e
mov eax, dword [ebp - 0x18c]
lea ebx, [eax + 0x64]
mov eax, ebx
shr eax, 0x10
je 0x409b22
mov eax, dword [ebp - 0x16c]
mov dword [esp], ebx
lea esi, [eax - 0x64]
shr esi, 1
mov dword [esp + 4], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
push ecx
push ecx
test eax, eax
jne 0x409b18
mov eax, ebx
mov edx, esi
call sym._wine_dbgstr_wn.part.0
mov ebx, eax
mov ecx, dword [ebp - 0x18c]
movsx edx, word [ecx + 0x1e]
movsx edi, word [ecx + 0x1c]
movsx esi, word [ecx + 0xe]
movsx ecx, word [ecx + 0xc]
mov dword [ebp - 0x190], edx
mov edx, dword [ebp - 0x174]
mov dword [ebp - 0x170], ecx
mov eax, dword [edx - 0x14]
mov dword [esp + 0x10], eax
mov eax, dword [edx - 0x18]
mov dword [esp + 0xc], eax
mov eax, dword [edx - 0x1c]
mov dword [esp + 8], eax
mov eax, dword [edx - 0x20]
mov dword [esp], str.__d__d____d__d_
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf
mov ecx, dword [ebp - 0x170]
mov edx, dword [ebp - 0x190]
mov dword [esp + 0x40], ebx
mov dword [esp + 0x38], edi
mov dword [esp + 0x30], ecx
mov ecx, dword [ebp - 0x18c]
mov dword [esp + 0x3c], edx
mov dword [esp + 0x34], esi
mov dword [esp + 0x2c], eax
movsx eax, word [ecx + 0xa]
mov dword [esp + 0x28], eax
movsx eax, word [ecx + 8]
mov dword [esp + 0x24], eax
movsx eax, word [ecx + 6]
mov dword [esp + 0x20], eax
movsx eax, word [ecx + 4]
mov dword [esp + 0x1c], eax
movsx eax, word [ecx + 2]
mov dword [esp + 0x18], eax
movsx eax, word [ecx]
mov dword [esp + 0xc], str._p_cursor_size_u_cursor_visible_x_cursor__u__u__width_u_height_u_win_s_attr_x_popup_attr_x_font_width_u_font_height_u__s_n
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x184]
mov dword [esp + 8], str.get_output_info
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x413058
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
mov ebx, dword [0x4190d0]
jmp 0x407295
mov dword [ebp - 0x170], edx
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
mov ecx, eax
test eax, eax
je 0x408083
mov dword [0x4190d0], eax
mov eax, dword [ebp - 0x16c]
mov ebx, ecx
mov edx, dword [ebp - 0x170]
mov dword [0x4190cc], eax
jmp 0x409271
mov eax, dword [ebp - 0x16c]
cmp eax, 7
jbe 0x4087a3
mov edx, dword [ebp - 0x170]
test edx, edx
je 0x4087a3
mov esi, dword [ebp - 0x174]
mov edi, dword [esi - 0x88]
cmp dword [ebp - 0x184], edi
jae 0x4087a3
mov esi, dword [esi - 0x84]
cmp dword [ebp - 0x18c], esi
jae 0x4087a3
shl edx, 2
sub eax, 8
sub esi, dword [ebp - 0x18c]
mov dword [ebp - 0x16c], edx
xor edx, edx
div dword [ebp - 0x16c]
mov edx, esi
cmp eax, esi
mov esi, dword [ebp - 0x170]
cmovbe edx, eax
sub edi, dword [ebp - 0x184]
cmp edi, esi
cmova edi, esi
mov eax, edi
imul eax, edx
lea eax, [eax*4 + 8]
mov dword [ebp - 0x16c], eax
cmp eax, dword [ebp - 0x190]
ja 0x409720
test ebx, ebx
je 0x4079b6
movzx eax, word [ebp - 0x184]
mov esi, edi
mov ebx, dword [ebp - 0x18c]
shl esi, 2
mov word [ecx], ax
mov eax, edi
movzx edi, word [ebp - 0x184]
mov word [ecx + 2], bx
lea eax, [edi + eax - 1]
mov edi, ebx
mov dword [ebp - 0x170], esi
mov word [ecx + 4], ax
mov eax, ebx
mov esi, edi
lea ebx, [ecx + 8]
lea eax, [eax + edx - 1]
mov word [ecx + 6], ax
lea eax, [edi + edx]
mov edi, dword [ebp - 0x184]
mov dword [ebp - 0x18c], eax
jmp 0x409623
mov ecx, dword [ebp - 0x174]
mov eax, dword [ecx - 0x88]
mov edx, dword [ecx - 0x64]
mov dword [esp], ebx
mov ecx, dword [ebp - 0x170]
imul eax, esi
inc esi
mov dword [esp + 8], ecx
add eax, edi
lea eax, [edx + eax*4]
mov dword [esp + 4], eax
call sym._memcpy
add ebx, dword [ebp - 0x170]
cmp dword [ebp - 0x18c], esi
jne 0x4095ef
jmp 0x407b7e
mov edi, dword [ebp - 0x174]
mov eax, dword [edi - 0x88]
cmp dword [ebp - 0x184], eax
jae 0x4075fa
mov edx, dword [edi - 0x84]
cmp dword [ebp - 0x18c], edx
jae 0x4075fa
mov esi, dword [edi - 0x64]
mov dword [ebp - 0x170], esi
mov esi, dword [ebp - 0x18c]
imul esi, eax
add esi, dword [ebp - 0x184]
imul eax, edx
shl esi, 2
mov edx, dword [ebp - 0x16c]
shr edx, 1
shl eax, 2
mov edi, edx
sub eax, esi
sar eax, 2
cmp eax, edx
cmovbe edi, eax
lea eax, [edi + edi]
mov dword [ebp - 0x16c], eax
cmp eax, dword [ebp - 0x190]
ja 0x409755
test ebx, ebx
je 0x4079b6
xor eax, eax
add esi, dword [ebp - 0x170]
jmp 0x4096c0
movzx edx, word [esi + eax*4 + 2]
mov word [ecx + eax*2], dx
inc eax
cmp edi, eax
jne 0x4096b6
jmp 0x407295
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x18c]
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x184]
mov dword [esp + 0xc], str.__u__u__mode__u_width__u_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.read_output
mov dword [esp + 4], 0x413058
mov dword [esp], 3
mov dword [ebp - 0x190], edx
call sym._wine_dbg_log.constprop.0
mov ebx, dword [0x4190d0]
mov edx, dword [ebp - 0x190]
jmp 0x4091b8
mov dword [ebp - 0x170], edx
mov esi, eax
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
mov ecx, eax
test eax, eax
je 0x408083
mov dword [0x4190d0], eax
mov edx, dword [ebp - 0x170]
mov dword [0x4190cc], esi
jmp 0x40959d
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
mov ecx, eax
test eax, eax
je 0x408083
mov dword [0x4190d0], eax
mov eax, dword [ebp - 0x16c]
mov ebx, ecx
mov dword [0x4190cc], eax
jmp 0x4096ac
mov ecx, dword [ebp - 0x16c]
lea eax, [ecx - 4]
and eax, 0xfffffffb
jne 0x4087a3
cmp edi, 0xf
jbe 0x4087a3
mov eax, dword [ebp - 0x174]
mov eax, dword [eax - 0x94]
mov dword [eax + 0x10], 0
cmp ecx, 8
je 0x408799
xor eax, eax
cmp dword [ebx + 8], 2
sete al
xor edx, edx
lea ecx, [eax + eax + 2]
lea eax, [edi - 0x10]
div ecx
mov dword [ebp - 0x19c], ecx
mov dword [ebp - 0x170], eax
test byte [0x413058], 8
jne 0x40990f
mov eax, dword [ebp - 0x174]
mov eax, dword [eax - 0x88]
cmp dword [ebx], eax
jae 0x40793b
lea esi, [ebx + 0x10]
xor edi, edi
cmp dword [ebp - 0x170], edi
je 0x4098c2
mov edx, dword [ebx + 0xc]
mov eax, dword [ebx]
mov ecx, dword [ebp - 0x174]
mov dword [ebp - 0x190], edx
mov edx, dword [ebx + 4]
mov dword [ebp - 0x198], eax
mov eax, dword [ecx - 0x88]
mov dword [ebp - 0x1a0], edx
mov ecx, edx
mov edx, dword [ebp - 0x190]
mov dword [ebp - 0x194], eax
test edx, edx
je 0x4098aa
mov eax, edi
xor edx, edx
div dword [ebp - 0x190]
add edx, dword [ebp - 0x198]
cmp edx, dword [ebp - 0x194]
jae 0x40989e
add eax, ecx
mov ecx, dword [ebp - 0x174]
cmp dword [ecx - 0x84], eax
jbe 0x4098c2
imul eax, dword [ebp - 0x194]
add eax, edx
mov edx, dword [ecx - 0x64]
lea eax, [edx + eax*4]
mov edx, dword [ebx + 8]
cmp edx, 1
je 0x409bc0
cmp edx, 2
je 0x409bb7
test edx, edx
jne 0x407a40
movzx edx, word [esi]
mov word [eax], dx
inc edi
add esi, dword [ebp - 0x19c]
jmp 0x409800
mov eax, dword [ebp - 0x198]
xor edx, edx
add eax, edi
div dword [ebp - 0x194]
add eax, dword [ebp - 0x1a0]
jmp 0x40985e
test edi, edi
je 0x4098dd
mov eax, dword [ebp - 0x174]
mov ecx, dword [ebp - 0x184]
mov eax, dword [eax - 0x94]
cmp ecx, dword [eax + 8]
je 0x409949
mov ebx, dword [0x4190d0]
cmp dword [ebp - 0x16c], 8
mov eax, dword [0x4190cc]
mov ecx, ebx
je 0x409a2e
cmp eax, 3
jbe 0x4099fb
test ebx, ebx
je 0x4079b6
mov dword [ecx], edi
jmp 0x407295
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 4]
mov dword [esp + 0x14], eax
mov eax, dword [ebx]
mov dword [esp + 0xc], str.__u__u__cnt__u_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.write_output
mov dword [esp + 4], 0x413058
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x4097e7
mov esi, dword [ebx]
mov dword [ebp - 0x148], esi
mov ecx, dword [ebx + 4]
mov dword [ebp - 0x144], ecx
mov ebx, dword [ebx + 0xc]
test ebx, ebx
je 0x409a98
mov eax, dword [ebp - 0x170]
xor edx, edx
div ebx
mov edx, dword [ebp - 0x174]
add ecx, eax
mov eax, dword [edx - 0x84]
cmp ecx, eax
cmovbe eax, ecx
add ebx, esi
dec eax
mov dword [ebp - 0x13c], eax
cmp dword [edx - 0x88], ebx
cmovbe ebx, dword [edx - 0x88]
lea eax, [ebx - 1]
mov dword [ebp - 0x140], eax
mov eax, dword [ebp - 0x184]
mov edx, dword [ebp - 0x178]
call sym._update_output
mov eax, dword [ebp - 0x174]
mov eax, dword [eax - 0x94]
call sym._tty_sync
jmp 0x4098dd
mov eax, dword [ebp - 0x184]
mov dword [esp + 0xc], 0x414480
mov dword [esp + 8], str.screen_buffer_activate
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x413058
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x407cbc
mov dword [esp + 4], 4
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
mov ecx, eax
test eax, eax
je 0x408083
mov dword [0x4190d0], eax
mov ebx, eax
mov dword [0x4190cc], 4
mov dword [ecx], edi
jmp 0x407295
mov edi, dword [ebp - 0x18c]
mov esi, dword [edi + 0xc]
mov edx, dword [edi]
mov edi, dword [edi + 4]
cmp eax, 7
jbe 0x409ad0
test ebx, ebx
je 0x4079b6
mov word [ecx], dx
lea eax, [esi + edx]
mov edx, dword [ebp - 0x174]
mov word [ecx + 2], di
cmp dword [edx - 0x88], eax
cmovbe eax, dword [edx - 0x88]
xor edx, edx
dec eax
mov word [ecx + 4], ax
mov eax, dword [ebp - 0x170]
div esi
mov edx, dword [ebp - 0x174]
add edi, eax
mov eax, dword [edx - 0x84]
cmp edi, eax
cmova edi, eax
lea eax, [edi - 1]
mov word [ecx + 6], ax
jmp 0x407295
mov eax, dword [ebp - 0x174]
lea ebx, [edi + esi - 1]
xor edx, edx
mov esi, dword [eax - 0x88]
mov eax, ebx
div esi
add eax, ecx
mov dword [ebp - 0x13c], eax
cmp ecx, eax
je 0x409b0d
mov dword [ebp - 0x148], 0
dec esi
mov dword [ebp - 0x140], esi
jmp 0x4099a1
mov dword [ebp - 0x184], edx
mov dword [esp + 4], 8
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
mov edx, dword [ebp - 0x184]
test eax, eax
mov ecx, eax
je 0x4079b0
mov dword [0x4190d0], eax
mov ebx, eax
mov dword [0x4190cc], 8
jmp 0x409a4d
mov dword [ebp - 0x140], ebx
jmp 0x4099a1
mov ebx, 0x414068
jmp 0x4093e2
movzx ebx, bx
mov dword [esp], 0x414072
mov dword [esp + 4], ebx
call sym._wine_dbg_sprintf
mov ebx, eax
jmp 0x4093e2
mov esi, dword [ebp - 0x174]
mov eax, dword [ebp - 0x18c]
mov ecx, dword [ebp - 0x16c]
mov edx, dword [esi - 8]
add eax, 0x64
sub ecx, 0x64
mov dword [esp], eax
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
call sym._memcpy
jmp 0x409394
mov dword [esp + 4], eax
mov esi, eax
mov eax, dword [ebp - 0x18c]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_realloc]
mov dword [ebp - 0x18c], eax
test eax, eax
je 0x408083
mov dword [0x4190d0], eax
mov dword [0x4190cc], esi
jmp 0x4092d1
call sym._set_tty_cursor_relative
jmp 0x407df7
cmp ecx, dword [esi - 0x74]
jne 0x407dd7
jmp 0x407e04
mov edx, dword [esi]
mov dword [eax], edx
jmp 0x40989e
movzx edx, word [esi]
mov word [eax + 2], dx
jmp 0x40989e