Function at 0x406a60
Capabilities:
Create thread
Read file on windows

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff8
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x20c
mov eax, dword [ecx + 4]
mov esi, dword [ecx]
mov dword [ebp - 0x168], eax
movzx eax, byte [0x413058]
mov dword [ebp - 0x164], esi
test esi, esi
jle 0x4071f8
xor esi, esi
jmp 0x406aaf
add esi, 1
cmp dword [ebp - 0x164], esi
je 0x406c21
mov edx, eax
and edx, 8
je 0x406aa0
mov eax, dword [ebp - 0x168]
mov ebx, dword [eax + esi*4]
test ebx, ebx
je 0x407110
mov eax, ebx
shr eax, 0x10
je 0x407070
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 0x406bde
cmp word [ebx], 0
je 0x407120
lea esi, [esi]
mov edx, eax
lea eax, [eax + 1]
cmp word [ebx + edx*2 + 2], 0
jne 0x406b00
mov eax, 0x224c
mov dword [ebp - 0x160], ebx
lea ecx, [ebp - 0x13e]
mov word [ebp - 0x140], ax
jmp 0x406b60
cmp ax, 9
je 0x406f60
cmp ax, 0xa
jne 0x406f7e
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea edi, [ebp - 0x1e]
lea eax, [edx - 1]
cmp ecx, edi
ja 0x406bb0
test edx, edx
jle 0x406bb0
mov edx, eax
add dword [ebp - 0x160], 2
mov eax, dword [ebp - 0x160]
movzx eax, word [eax - 2]
cmp ax, 0xd
je 0x406f48
jbe 0x406b30
cmp ax, 0x22
je 0x406fd0
cmp ax, 0x5c
jne 0x406f71
mov edi, 0x5c5c
add ecx, 2
lea eax, [edx - 1]
mov word [ecx - 2], di
lea edi, [ebp - 0x1e]
cmp ecx, edi
jbe 0x406b5a
lea esi, [esi]
nop
mov byte [ecx], 0x22
test eax, eax
jle 0x407139
mov ebx, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], bx
mov byte [eax], 0
lea eax, [ebp - 0x140]
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov edx, eax
mov dword [esp + 0x10], edx
add esi, 1
mov dword [esp + 0xc], 0x41437c
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 - 0x164], esi
jne 0x406aaf
test dl, dl
jne 0x407148
mov dword [0x418004], 0x1f7
call dword [sym.imp.kernel32.dll_GetOEMCP]
mov dword [esp + 4], 4
movd xmm0, eax
mov dword [esp], 0x32
mov dword [0x418094], 0x32
punpckldq xmm0, xmm0
movq qword [0x4180a4], xmm0
call dword [sym.imp.ucrtbase.dll_calloc]
mov dword [0x418090], eax
test eax, eax
je 0x40705d
cmp dword [ebp - 0x164], 1
jle 0x40725b
mov dword [ebp - 0x174], 0
mov ebx, 1
mov dword [ebp - 0x170], 0
mov dword [ebp - 0x16c], 0
mov dword [ebp - 0x160], 0
jmp 0x406cf8
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 0x406fe8
movq xmm1, qword [0x414c90]
mov dword [ebp - 0x160], 1
movq qword [0x41800c], xmm1
add ebx, 1
cmp dword [ebp - 0x164], ebx
jle 0x406d34
mov eax, dword [ebp - 0x168]
lea esi, [ebx*4]
mov dword [esp + 4], 0x414380
lea edi, [eax + esi]
mov eax, dword [edi]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcscmp]
test eax, eax
jne 0x406cb8
mov dword [ebp - 0x160], 1
add ebx, 1
cmp dword [ebp - 0x164], ebx
jg 0x406cf8
mov esi, dword [section..bss]
test esi, esi
je 0x407643
mov ecx, dword [ebp - 0x16c]
mov eax, 0x50
test ecx, ecx
cmovne eax, ecx
mov ecx, dword [ebp - 0x170]
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 0x40705d
mov ebx, dword [ebp - 0x160]
test ebx, ebx
je 0x407294
mov ebx, dword [sym.imp.kernel32.dll_GetStdHandle]
mov dword [esp], 0xfffffff6
call ebx
sub esp, 4
mov dword [0x4180b4], eax
mov dword [esp], 0xfffffff5
call ebx
mov ecx, dword [0x4180b4]
mov dword [0x4180b8], eax
sub esp, 4
test ecx, ecx
je 0x40767e
mov edx, dword [0x41800c]
test edx, edx
jne 0x407694
test eax, eax
je 0x406de7
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 eax, dword [0x4180b8]
test eax, eax
je 0x406e17
mov ecx, 3
mov edx, 0x414414
mov eax, section..bss
call sym._tty_write.part.0
mov eax, dword [0x41800c]
mov dword [0x4190cc], 1
test eax, eax
jne 0x406e40
mov eax, dword [0x4180b4]
test eax, eax
je 0x406e40
mov eax, dword [0x4180b0]
test eax, eax
je 0x407ad8
mov eax, dword [ebp - 0x174]
test eax, eax
je 0x407306
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 - 0x178], eax
sub esp, 0x10
test eax, eax
je 0x406eeb
lea eax, [ebp - 0x15a]
mov dword [esp + 0x20], 0
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x154]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x178]
mov dword [esp + 0x1c], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x174]
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 0x407310
cmp eax, 0x103
je 0x407310
mov ebx, 1
mov edi, dword [0x41800c]
test edi, edi
je 0x407062
mov eax, dword [0x4190c8]
xor eax, 7
test al, 0xf
je 0x406f28
mov esi, dword [0x4180b8]
test esi, esi
je 0x406f28
mov ecx, 3
mov edx, 0x414100
mov eax, section..bss
call sym._tty_write.part.0
mov dword [0x4190c8], 7
mov eax, section..bss
call sym._tty_flush
jmp 0x407062
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x406b50
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x406b50
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x407100
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 0x406b50
mov eax, 0x225c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x406b50
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 0x407090
add ebx, 1
cmp dword [ebp - 0x164], ebx
je 0x40705d
lea eax, [ebp - 0x158]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x168]
mov eax, dword [eax + esi + 4]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcstol]
mov dword [ebp - 0x16c], eax
test eax, eax
je 0x4070e9
cmp dword [ebp - 0x16c], 0xffff
jg 0x40705d
mov eax, dword [ebp - 0x158]
cmp word [eax], 0
je 0x406ced
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 0x406bde
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 0x407178
add ebx, 1
cmp dword [ebp - 0x164], ebx
je 0x40705d
lea eax, [ebp - 0x158]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x168]
mov eax, dword [eax + esi + 4]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcstol]
mov dword [ebp - 0x170], eax
test eax, eax
jne 0x4071e0
mov ecx, dword [0x41800c]
test ecx, ecx
jne 0x40704d
jmp 0x40705d
mov byte [ecx], al
add ecx, 1
jmp 0x406b50
mov edx, str._null_
jmp 0x406bde
mov edx, 0x224c
mov byte [ebp - 0x13e], 0x22
lea ecx, [ebp - 0x13e]
mov word [ebp - 0x140], dx
lea eax, [ecx + 1]
jmp 0x406bcb
mov dword [esp + 0xc], 0x414338
mov dword [esp + 8], str.wmain
mov dword [esp + 4], 0x413058
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x406c29
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 0x407202
add ebx, 1
cmp dword [ebp - 0x164], ebx
je 0x40705d
lea eax, [ebp - 0x158]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x168]
mov eax, dword [eax + esi + 4]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcstol]
mov edx, dword [ebp - 0x158]
cmp word [edx], 0
jne 0x40705d
mov dword [ebp - 0x174], eax
jmp 0x406ced
cmp dword [ebp - 0x170], 0xffff
jle 0x40704d
jmp 0x40705d
and eax, 8
mov edx, eax
jmp 0x406c21
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 0x407d20
add ebx, 1
cmp dword [ebp - 0x164], ebx
je 0x40705d
lea eax, [ebp - 0x158]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x168]
mov eax, dword [eax + esi + 4]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcstol]
mov dword [section..bss], eax
jmp 0x40704d
mov edi, dword [section..bss]
test edi, edi
je 0x407643
mov ecx, 0x96
mov edx, 0x50
mov eax, 1
call sym._create_screen_buffer.constprop.0
mov dword [0x418008], eax
test eax, eax
je 0x40705d
mov dword [ebp - 0x174], 0
mov dword [esp], section..bss
call sym._init_window
test eax, eax
je 0x40705d
lea eax, [ebp - 0x140]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetStartupInfoW]
mov eax, dword [ebp - 0x134]
sub esp, 4
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcslen]
lea edx, [eax + eax]
mov eax, dword [ebp - 0x134]
call sym._set_console_title.constprop.0
mov eax, 5
test byte [ebp - 0x114], 1
je 0x4072ec
movzx eax, word [ebp - 0x110]
mov dword [esp + 4], eax
mov eax, dword [0x4180ac]
mov dword [esp], eax
call dword [sym.imp.user32.dll_ShowWindow]
sub esp, 8
jmp 0x406e40
mov dword [ebp - 0x178], 0
cmp dword [0x4190d0], 0xfff
mov eax, dword [0x4190d4]
jbe 0x4077eb
test eax, eax
je 0x406eeb
mov eax, dword [section..bss]
mov edi, dword [ebp - 0x174]
mov dword [ebp - 0x14c], eax
mov eax, 1
test edi, edi
je 0x407358
mov eax, dword [ebp - 0x178]
mov dword [ebp - 0x148], eax
mov eax, 2
mov edx, dword [0x4180b0]
mov dword [ebp - 0x16c], eax
mov ecx, eax
test edx, edx
je 0x40737a
add ecx, 1
mov dword [ebp + eax*4 - 0x14c], edx
mov dword [ebp - 0x16c], ecx
mov esi, dword [0x4180ac]
test esi, esi
je 0x40740d
lea eax, [ebp - 0x14c]
mov dword [esp + 0x10], 0x1cff
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x16c]
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 - 0x16c], eax
je 0x407790
test eax, eax
je 0x4074d8
cmp eax, 1
je 0x40743b
xor ebx, ebx
test byte [0x413058], 8
je 0x406ef0
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 0x406ef0
lea eax, [ebp - 0x14c]
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x16c]
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WaitForMultipleObjects]
sub esp, 0x10
jmp 0x4073bc
mov edx, dword [ebp - 0x154]
movzx eax, byte [0x413058]
test edx, edx
jne 0x407ced
cmp dword [ebp - 0x150], 2
jne 0x407ced
test al, 1
jne 0x407818
lea eax, [ebp - 0x15a]
mov dword [esp + 0x20], 0
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x154]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x178]
mov dword [esp + 0x1c], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x174]
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 0x40737a
cmp eax, 0x103
je 0x40737a
jmp 0x406eeb
mov dword [esp], 0x413040
xor ebx, ebx
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
lea eax, [ebp - 0x140]
mov edi, dword [0x4190d4]
mov dword [ebp - 0x160], 0
mov dword [ebp - 0x168], eax
sub esp, 4
mov esi, edi
mov edx, esi
mov esi, dword [0x4190d0]
mov ecx, dword [0x41801c]
xor eax, eax
lea edi, [ebp - 0x13c]
test ecx, ecx
mov ecx, 0xf
setne al
mov dword [ebp - 0x164], eax
mov dword [0x418024], eax
xor eax, eax
rep stosd dword es:[edi], eax
mov eax, dword [section..bss]
mov ecx, dword [ebp - 0x160]
mov dword [ebp - 0xd0], str.get_next_console_request
mov dword [ebp - 0x140], 0x3b
mov dword [ebp - 0x134], eax
mov eax, dword [ebp - 0x164]
mov dword [ebp - 0x100], 0
mov dword [ebp - 0x128], ecx
mov dword [ebp - 0x130], eax
test ebx, ebx
je 0x407598
mov dword [ebp - 0xf8], edx
mov dword [ebp - 0x100], 1
mov dword [ebp - 0xf4], ebx
mov dword [ebp - 0x13c], ebx
mov eax, dword [ebp - 0x168]
mov dword [ebp - 0x138], esi
mov dword [ebp - 0xfc], edx
mov dword [esp], eax
call dword [sym.imp.ntdll.dll_wine_server_call]
mov ecx, dword [ebp - 0x138]
mov esi, dword [ebp - 0x134]
mov ebx, dword [ebp - 0x130]
mov edi, dword [ebp - 0x13c]
cmp eax, 0x103
je 0x4076ad
cmp eax, 0x80000005
jne 0x4076c2
mov esi, dword [0x4190d0]
mov edx, dword [0x4190d4]
cmp ebx, esi
ja 0x407610
test edx, edx
je 0x407c8f
mov dword [ebp - 0x160], 0
jmp 0x407510
mov dword [esp], edx
mov dword [esp + 4], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
mov edx, eax
test eax, eax
je 0x407c8f
mov dword [0x4190d4], eax
mov esi, ebx
mov dword [0x4190d0], ebx
mov dword [ebp - 0x160], 0
jmp 0x407510
test byte [0x413058], 2
je 0x40705d
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 0x407062
test eax, eax
je 0x40784c
mov ecx, dword [0x41800c]
test ecx, ecx
je 0x406dd3
mov dword [0x4190c8], 7
mov dword [0x4190cc], 1
jmp 0x406e40
mov dword [esp], 0x413040
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
sub esp, 4
jmp 0x40737a
test eax, eax
jne 0x407c5e
cmp ecx, 0x500168
je 0x407a58
test esi, esi
jne 0x407953
mov esi, dword [0x4190d4]
mov edx, ecx
mov dword [ebp - 0x164], esi
cmp ecx, 0x504044
ja 0x4078f0
cmp ecx, 0x504027
ja 0x4078c0
cmp ecx, 0x500054
je 0x408678
jbe 0x40785b
cmp ecx, 0x500058
je 0x409e00
cmp ecx, 0x504000
jne case.0x4078cb.5259305
test byte [0x413058], 8
jne 0x4087e6
mov edx, dword [0x4190d0]
mov eax, esi
cmp ebx, 4
jne 0x408828
test edi, edi
jne 0x408828
cmp edx, 3
jbe 0x4087b7
test esi, esi
je 0x4085da
mov edx, dword [0x418004]
mov ebx, 4
mov dword [eax], edx
mov dword [ebp - 0x164], ebx
mov dword [ebp - 0x160], 0
mov ebx, dword [ebp - 0x164]
jmp 0x407508
lea eax, [ebp - 0x140]
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 0x40737a
cmp dword [ebp - 0x13c], 0x12
je 0x407c9d
mov dword [esp], edi
call esi
sub esp, 4
jmp 0x4077a4
mov dword [esp + 4], 0x1000
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_realloc]
test eax, eax
je 0x406eeb
mov dword [0x4190d4], eax
mov dword [0x4190d0], 0x1000
jmp 0x40732d
movzx eax, word [ebp - 0x15a]
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 0x407465
mov dword [0x418014], 1
jmp 0x406e40
cmp ecx, 0x500008
je 0x409dee
cmp ecx, 0x500050
jne case.0x4078cb.5259305
or ebx, edi
jne 0x408828
cmp dword [0x41800c], 0
je 0x407ad1
cmp dword [0x4180b8], 0
je 0x4078a1
mov ecx, 1
mov edx, 0x414185
mov eax, section..bss
call sym._tty_write.part.0
mov eax, section..bss
call sym._tty_sync
mov esi, dword [0x4190d4]
jmp 0x407772
lea eax, [ecx - 0x504028]
cmp eax, 0x1c
ja case.0x4078cb.5259305
jmp dword [eax*4 + 0x414620]
mov dword [ebp - 0x160], 0xc0000008
test byte [0x413058], 4
jne 0x408698
xor ebx, ebx
jmp 0x407508
cmp ecx, 0x508034
je 0x409129
jbe 0x407a94
cmp ecx, 0x508040
je 0x4086cd
cmp ecx, 0x508048
jne case.0x4078cb.5259305
mov eax, edi
and eax, 1
or eax, ebx
mov dword [ebp - 0x164], eax
jne 0x408828
mov edx, edi
mov eax, esi
call sym._set_console_title.constprop.0
mov dword [ebp - 0x160], eax
mov ebx, dword [ebp - 0x160]
mov esi, dword [0x4190d4]
test ebx, ebx
je 0x407782
xor ebx, ebx
jmp 0x407508
mov edx, dword [0x413004]
test edx, edx
je 0x407b28
mov dword [ebp - 0x170], ebx
mov ebx, edx
mov dword [ebp - 0x160], ecx
jmp 0x407982
mov eax, dword [ebx + 4]
cmovns eax, dword [ebx + 8]
mov ebx, eax
test eax, eax
je 0x407b28
mov dword [esp + 4], ebx
mov dword [esp], esi
call dword [section..data]
test eax, eax
jne 0x407971
mov edx, dword [ebp - 0x160]
mov esi, dword [0x4190d4]
mov dword [ebp - 0x160], eax
mov eax, ebx
sub eax, 0x94
mov dword [ebp - 0x164], ebx
mov ebx, dword [ebp - 0x170]
mov dword [ebp - 0x17c], esi
mov dword [ebp - 0x170], eax
cmp edx, 0x508098
ja case.0x407c0b.5275769
cmp edx, 0x508077
ja 0x407c00
cmp edx, 0x504080
je 0x407dde
ja 0x407b88
cmp edx, 0x50016c
je 0x4085eb
cmp edx, 0x504000
jne 0x407b52
test byte [0x413058], 8
jne 0x408595
mov edx, dword [0x4190d0]
mov eax, esi
cmp ebx, 4
jne 0x408828
test edi, edi
jne 0x408828
cmp edx, 3
jbe 0x40856a
test esi, esi
je 0x4085da
mov ecx, dword [ebp - 0x164]
mov ebx, 4
mov edx, dword [ecx - 0x8c]
mov dword [eax], edx
jmp 0x407772
test byte [0x413058], 8
jne 0x407cc0
mov eax, dword [0x418008]
mov dword [0x418010], 0
test eax, eax
je 0x407ca4
mov ecx, dword [eax + 0x10]
mov edx, dword [eax + 0xc]
mov eax, esi
call sym._create_screen_buffer.constprop.0
mov esi, dword [0x4190d4]
jmp 0x407772
cmp ecx, 0x504060
je 0x4084cb
cmp ecx, 0x508004
jne case.0x4078cb.5259305
cmp edi, 4
jne 0x408828
test ebx, ebx
jne 0x408828
mov eax, dword [esi]
mov dword [0x418004], eax
test byte [0x413058], 8
jne 0x408496
xor ebx, ebx
jmp 0x407772
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 [0x4180b0], eax
sub esp, 0x18
test eax, eax
je 0x40705d
jmp 0x406e40
test byte [0x413058], 2
jne 0x407d99
mov edx, dword [0x4190d4]
mov esi, dword [0x4190d0]
xor ebx, ebx
mov dword [ebp - 0x160], 0xc0000008
jmp 0x407510
cmp edx, 0x500008
jne case.0x407c0b.5275769
mov eax, dword [ebp - 0x164]
mov eax, dword [eax - 0x94]
cmp dword [eax + 0xc], 0
jne 0x407772
mov dword [ebp - 0x160], 0xc00000bb
xor ebx, ebx
jmp 0x407508
cmp edx, 0x504088
je 0x407f09
cmp edx, 0x508004
jne case.0x407c0b.5275769
test ebx, ebx
jne 0x408828
cmp edi, 4
jne 0x408828
mov eax, dword [esi]
mov ecx, dword [ebp - 0x164]
mov dword [ecx - 0x8c], eax
test byte [0x413058], 8
je 0x407ad1
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 esi, dword [0x4190d4]
jmp 0x407772
lea eax, [edx - 0x508078]
cmp eax, 0x20
ja case.0x407c0b.5275769
jmp dword [eax*4 + 0x414694]
mov dword [ebp - 0x160], 0xc0000008
test byte [0x413058], 4
je 0x4078e9
mov dword [esp + 0x10], edx
xor ebx, ebx
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 esi, dword [0x4190d4]
jmp 0x407508
test byte [0x413058], 8
je 0x407c8f
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
mov dword [esp], 0x413040
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
push ebx
xor ebx, ebx
jmp 0x406ef0
mov eax, esi
mov ecx, 0x96
mov edx, 0x50
call sym._create_screen_buffer.constprop.0
mov esi, dword [0x4190d4]
jmp 0x407772
mov dword [esp + 0x10], esi
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 0x407a65
xor ebx, ebx
test al, 8
je 0x406ef0
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 0x406ef0
test byte [0x413058], 1
je 0x40705d
mov ebx, dword [edi]
test ebx, ebx
je 0x40866e
mov eax, ebx
shr eax, 0x10
je 0x408656
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
push edx
push edx
test eax, eax
jne 0x408643
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 0x407062
mov dword [esp + 0x10], esi
xor ebx, 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 [0x4190d4]
mov dword [ebp - 0x160], 0xc0000008
mov esi, dword [0x4190d0]
jmp 0x407510
cmp edi, 0x10
jne 0x408828
mov eax, dword [ebp - 0x164]
mov eax, dword [eax - 0x94]
mov dword [eax + 0x10], 0
mov eax, dword [esi]
mov edx, dword [esi + 8]
mov dword [ebp - 0x17c], eax
mov eax, dword [esi + 4]
mov dword [ebp - 0x170], eax
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x160], eax
test byte [0x413058], 8
jne 0x4083d7
mov eax, dword [0x4190d0]
mov ecx, esi
mov dword [ebp - 0x180], eax
cmp edx, 1
je 0x40833d
cmp edx, 2
je 0x40820a
mov dword [ebp - 0x160], 0xc000000d
test edx, edx
jne 0x4078e9
mov edi, dword [ebp - 0x164]
mov eax, dword [edi - 0x88]
cmp dword [ebp - 0x17c], eax
jae 0x407ad1
mov edi, dword [edi - 0x84]
mov dword [ebp - 0x160], edi
cmp dword [ebp - 0x170], edi
jae 0x407ad1
mov edi, dword [ebp - 0x164]
shr ebx, 1
mov edi, dword [edi - 0x64]
mov dword [ebp - 0x164], edi
mov edi, dword [ebp - 0x170]
imul edi, eax
add edi, dword [ebp - 0x17c]
imul eax, dword [ebp - 0x160]
shl edi, 2
mov dword [ebp - 0x170], edi
shl eax, 2
sub eax, edi
mov edi, ebx
sar eax, 2
cmp eax, ebx
cmovbe edi, eax
lea ebx, [edi + edi]
cmp ebx, dword [ebp - 0x180]
ja 0x4081d9
test esi, esi
je 0x4085da
mov eax, dword [ebp - 0x164]
mov dword [ebp - 0x160], ebx
add eax, dword [ebp - 0x170]
jmp 0x407efa
movzx ebx, word [eax + edx*4]
mov word [ecx + edx*2], bx
add edx, 1
cmp edi, edx
jne 0x407eef
mov ebx, dword [ebp - 0x160]
jmp 0x407772
mov edx, dword [0x4190d0]
cmp ebx, 0x63
jbe 0x408828
test edi, edi
jne 0x408828
mov eax, dword [ebp - 0x164]
mov eax, dword [eax - 4]
mov dword [ebp - 0x160], eax
add eax, 0x32
add eax, eax
cmp ebx, eax
cmova ebx, eax
cmp ebx, edx
ja 0x408171
test esi, esi
je 0x4085da
mov ecx, dword [ebp - 0x164]
mov esi, dword [ebp - 0x17c]
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 - 0x160], eax
sub eax, 1
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]
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]
cmp ebx, 0x64
ja 0x408147
test byte [0x413058], 8
jne 0x40801e
mov esi, dword [0x4190d4]
jmp 0x407772
mov eax, dword [ebp - 0x17c]
lea edi, [eax + 0x64]
mov eax, edi
shr eax, 0x10
je 0x4081a8
lea esi, [ebx - 0x64]
mov dword [esp], edi
shr esi, 1
mov dword [esp + 4], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
push ecx
push ecx
test eax, eax
jne 0x40819e
mov edx, esi
mov eax, edi
call sym._wine_dbgstr_wn.part.0
mov edx, eax
mov eax, dword [ebp - 0x17c]
mov dword [ebp - 0x184], edx
mov edx, dword [ebp - 0x164]
movsx ecx, word [eax + 0x1e]
movsx esi, word [eax + 0xe]
movsx edi, word [eax + 0x1c]
mov dword [ebp - 0x160], ecx
movsx ecx, word [eax + 0xc]
mov eax, dword [edx - 0x14]
mov dword [ebp - 0x180], ecx
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 edx, dword [ebp - 0x184]
mov ecx, dword [ebp - 0x180]
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], edi
mov dword [esp + 0x40], edx
mov edx, dword [ebp - 0x160]
mov dword [esp + 0x30], ecx
mov ecx, dword [ebp - 0x17c]
mov dword [esp + 0x3c], edx
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 + 8], str.get_output_info
mov dword [esp + 4], 0x413058
mov dword [esp], 3
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x170]
mov dword [esp + 0x10], eax
call sym._wine_dbg_log.constprop.0
mov esi, dword [0x4190d4]
jmp 0x407772
mov esi, dword [ebp - 0x164]
mov eax, dword [ebp - 0x17c]
lea ecx, [ebx - 0x64]
mov edx, dword [esi - 8]
add eax, 0x64
mov dword [esp + 8], ecx
mov dword [esp], eax
mov dword [esp + 4], edx
call sym._memcpy
jmp 0x40800a
mov eax, dword [ebp - 0x17c]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_realloc]
mov dword [ebp - 0x17c], eax
test eax, eax
je 0x4081c2
mov dword [0x4190d4], eax
mov dword [0x4190d0], ebx
jmp 0x407f49
mov edx, 0x414068
jmp 0x408059
movzx eax, di
mov dword [esp], 0x414072
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf
mov edx, eax
jmp 0x408059
mov dword [ebp - 0x160], 0xc0000017
mov esi, dword [0x4190d4]
xor ebx, ebx
jmp 0x407508
mov dword [ebp - 0x160], edx
mov dword [esp + 4], ebx
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_realloc]
mov ecx, eax
test eax, eax
je 0x4081c2
mov dword [0x4190d4], eax
mov edx, dword [ebp - 0x160]
mov esi, eax
mov dword [0x4190d0], ebx
jmp 0x407edb
cmp ebx, 7
jbe 0x408828
mov edx, dword [ebp - 0x160]
test edx, edx
je 0x408828
mov eax, dword [ebp - 0x164]
mov edi, dword [eax - 0x88]
cmp dword [ebp - 0x17c], edi
jae 0x408828
mov eax, dword [eax - 0x84]
mov dword [ebp - 0x184], eax
cmp dword [ebp - 0x170], eax
jae 0x408828
lea eax, [ebx - 8]
lea ebx, [edx*4]
xor edx, edx
div ebx
mov ebx, dword [ebp - 0x184]
mov edx, dword [ebp - 0x160]
sub ebx, dword [ebp - 0x170]
cmp eax, ebx
cmovbe ebx, eax
mov eax, ebx
mov dword [ebp - 0x184], ebx
mov ebx, edi
sub ebx, dword [ebp - 0x17c]
cmp ebx, edx
cmovbe edx, ebx
imul eax, edx
lea ebx, [eax*4 + 8]
cmp ebx, dword [ebp - 0x180]
ja 0x408463
test esi, esi
je 0x4085da
mov eax, dword [ebp - 0x17c]
mov edi, dword [ebp - 0x184]
mov esi, dword [ebp - 0x170]
mov word [ecx], ax
lea eax, [eax + edx - 1]
shl edx, 2
mov word [ecx + 4], ax
mov eax, edi
lea eax, [esi + eax - 1]
mov word [ecx + 2], si
lea esi, [ecx + 8]
mov word [ecx + 6], ax
mov eax, dword [ebp - 0x170]
mov dword [ebp - 0x170], ebx
mov ebx, edx
add edi, eax
mov dword [ebp - 0x160], edi
mov edi, eax
jmp 0x408324
mov ecx, dword [ebp - 0x164]
mov eax, dword [ecx - 0x88]
mov ecx, dword [ecx - 0x64]
mov dword [esp], esi
add esi, ebx
mov dword [esp + 8], ebx
imul eax, edi
add eax, dword [ebp - 0x17c]
add edi, 1
lea eax, [ecx + eax*4]
mov dword [esp + 4], eax
call sym._memcpy
cmp dword [ebp - 0x160], edi
jne 0x4082f4
mov ebx, dword [ebp - 0x170]
mov esi, dword [0x4190d4]
jmp 0x407772
mov eax, dword [ebp - 0x164]
mov edx, dword [eax - 0x88]
cmp dword [ebp - 0x17c], edx
jae 0x407ad1
mov edi, eax
mov eax, dword [eax - 0x84]
cmp dword [ebp - 0x170], eax
jae 0x407ad1
mov edi, dword [edi - 0x64]
imul eax, edx
shr ebx, 1
mov dword [ebp - 0x160], edi
mov edi, dword [ebp - 0x170]
shl eax, 2
imul edi, edx
add edi, dword [ebp - 0x17c]
shl edi, 2
sub eax, edi
sar eax, 2
cmp eax, ebx
cmovbe ebx, eax
mov edx, ebx
add ebx, ebx
cmp ebx, dword [ebp - 0x180]
ja 0x40842e
test esi, esi
je 0x4085da
add edi, dword [ebp - 0x160]
xor eax, eax
mov dword [ebp - 0x160], edx
jmp 0x4083ca
movzx edx, word [edi + eax*4 + 2]
mov word [ecx + eax*2], dx
add eax, 1
cmp dword [ebp - 0x160], eax
jne 0x4083be
jmp 0x407772
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x170]
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x17c]
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 - 0x180], edx
call sym._wine_dbg_log.constprop.0
mov esi, dword [0x4190d4]
mov edx, dword [ebp - 0x180]
jmp 0x407e24
mov dword [ebp - 0x164], edx
mov dword [esp + 4], ebx
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_realloc]
mov ecx, eax
test eax, eax
je 0x4081c2
mov dword [0x4190d4], eax
mov edx, dword [ebp - 0x164]
mov esi, eax
mov dword [0x4190d0], ebx
jmp 0x4083ae
mov dword [ebp - 0x160], edx
mov dword [esp + 4], ebx
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_realloc]
mov ecx, eax
test eax, eax
je 0x4081c2
mov dword [0x4190d4], eax
mov edx, dword [ebp - 0x160]
mov dword [0x4190d0], ebx
jmp 0x4082a9
mov dword [esp + 0x10], eax
xor ebx, ebx
mov dword [esp + 0xc], str.set__x_mode_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 esi, dword [0x4190d4]
jmp 0x407772
cmp edi, 3
jbe 0x408828
cmp ebx, 3
jbe 0x408828
mov eax, ebx
or eax, edi
and eax, 1
mov dword [ebp - 0x164], eax
jne 0x408828
cmp dword [0x4180b4], 0
je 0x408502
cmp dword [0x4180b0], 0
je 0x40852b
mov eax, dword [esi]
lea ecx, [esi + 4]
lea edx, [ebx - 4]
mov dword [esp + 4], eax
lea eax, [edi - 4]
shr eax, 1
mov dword [esp], eax
mov eax, 0x504060
call sym._read_console.constprop.0
mov dword [ebp - 0x160], eax
jmp 0x407938
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 [0x4180b0], eax
sub esp, 0x18
jmp 0x408502
mov dword [esp + 4], 4
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_realloc]
test eax, eax
je 0x4085d4
mov dword [0x4190d4], eax
mov esi, eax
mov dword [0x4190d0], 4
jmp 0x407a3d
mov eax, dword [ebp - 0x164]
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 esi, dword [0x4190d4]
jmp 0x407a13
mov esi, dword [0x4190d4]
mov dword [ebp - 0x160], 0xc0000017
xor ebx, ebx
jmp 0x407508
or ebx, edi
jne 0x408828
mov eax, dword [ebp - 0x164]
mov ecx, dword [ebp - 0x170]
mov eax, dword [eax - 0x94]
cmp ecx, dword [eax + 8]
je 0x40864d
mov edi, dword [ebp - 0x164]
mov eax, edi
call sym._rb_remove.constprop.0
mov eax, dword [edi - 8]
mov esi, dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], eax
call esi
mov eax, dword [edi - 0x64]
mov dword [esp], eax
call esi
mov eax, dword [ebp - 0x170]
mov dword [esp], eax
call esi
mov esi, dword [0x4190d4]
jmp 0x407772
mov eax, 0x414068
jmp 0x407d67
mov dword [eax + 8], 0
jmp 0x40860a
movzx ebx, bx
mov dword [esp], 0x414072
mov dword [esp + 4], ebx
call sym._wine_dbg_sprintf
jmp 0x407d67
mov eax, str._null_
jmp 0x407d67
or ebx, edi
jne 0x408828
test byte [0x413058], 8
jne 0x408702
mov dword [0x41801c], 0
jmp 0x407772
mov dword [esp + 0x10], edx
xor ebx, ebx
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 esi, dword [0x4190d4]
jmp 0x407508
test byte [0x413058], 8
jne 0x40878e
cmp edi, 0x10
jne 0x408777
test ebx, ebx
jne 0x408777
mov eax, dword [esi]
test al, 1
jne 0x408757
test al, 2
jne 0x408731
mov esi, dword [0x4190d4]
xor ebx, ebx
jmp 0x407772
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 esi, dword [0x4190d4]
jmp 0x408689
mov eax, dword [esi + 8]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsValidCodePage]
push edi
test eax, eax
je 0x408777
mov eax, dword [esi + 8]
xor ebx, ebx
mov esi, dword [0x4190d4]
mov dword [0x4180a8], eax
jmp 0x407772
mov eax, dword [esi + 4]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsValidCodePage]
push edx
test eax, eax
je 0x408777
mov eax, dword [esi + 4]
mov dword [0x4180a4], eax
mov eax, dword [esi]
jmp 0x4086f1
mov dword [ebp - 0x160], 0xc000000d
mov esi, dword [0x4190d4]
xor ebx, ebx
jmp 0x407508
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 0x4086da
mov dword [esp + 4], 4
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_realloc]
test eax, eax
je 0x4085d4
mov dword [0x4190d4], eax
mov esi, eax
mov dword [0x4190d0], 4
jmp 0x407765
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 esi, dword [0x4190d4]
jmp 0x40773b
cmp dword [esi + 0xc], 0
jne 0x409948
mov dword [ebp - 0x160], 0xc000000d
xor ebx, ebx
jmp 0x407508
cmp edi, 4
jne 0x408828
mov eax, dword [esi]
mov edi, dword [0x41808c]
test eax, eax
cmovne edi, dword [0x418088]
mov dword [ebp - 0x17c], eax
test edi, edi
je 0x4089e6
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_wcslen]
lea edx, [ebx - 8]
mov esi, dword [0x4190d4]
mov dword [ebp - 0x160], eax
add eax, eax
cmp eax, edx
cmovbe edx, eax
mov dword [ebp - 0x170], edx
lea ebx, [edx + 8]
cmp ebx, dword [0x4190d0]
ja 0x40897f
mov eax, dword [0x4190d4]
mov dword [ebp - 0x164], eax
mov esi, eax
test eax, eax
je 0x4085da
test byte [0x413058], 8
jne 0x4088f1
mov ecx, dword [ebp - 0x170]
mov esi, dword [0x4190d4]
test ecx, ecx
je 0x4088de
mov eax, dword [ebp - 0x164]
mov dword [esp + 8], ecx
mov dword [esp + 4], edi
add eax, 4
mov dword [esp], eax
call sym._memcpy
mov esi, dword [0x4190d4]
mov eax, dword [ebp - 0x164]
mov ecx, dword [ebp - 0x160]
mov dword [eax], ecx
jmp 0x407772
mov eax, edi
shr eax, 0x10
je 0x4089ce
mov dword [esp + 4], 0xffffffff
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
push esi
push esi
test eax, eax
jne 0x4089c4
or edx, 0xffffffff
mov eax, edi
call sym._wine_dbgstr_wn.part.0
cmp dword [ebp - 0x17c], 0
mov ecx, str.original_title
mov dword [esp + 0x14], eax
mov edx, str.title
cmove edx, ecx
mov dword [esp + 0xc], str.returning__s__s_n
mov dword [esp + 8], str.console_input_ioctl
mov dword [esp + 0x10], edx
mov dword [esp + 4], 0x413058
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x4088af
mov dword [ebp - 0x170], 0
mov ebx, 8
mov dword [ebp - 0x160], 0
mov dword [esp + 4], ebx
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_realloc]
mov dword [ebp - 0x164], eax
test eax, eax
je 0x4081c2
mov dword [0x4190d4], eax
mov dword [0x4190d0], ebx
test byte [0x413058], 8
je 0x4088af
test edi, edi
jne 0x4088f1
mov eax, str._null_
jmp 0x408921
mov eax, 0x414068
jmp 0x408921
movzx eax, di
mov dword [esp], 0x414072
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf
jmp 0x408921
cmp dword [0x4190d0], 7
jbe 0x408966
test byte [0x413058], 8
jne 0x408a6b
mov dword [ebp - 0x160], 0
mov ebx, 8
jmp 0x4088de
test byte [0x413058], 8
jne 0x409ffa
mov edx, dword [0x4190d0]
mov eax, esi
test edi, edi
jne 0x408828
cmp ebx, 0xc
jne 0x408828
cmp edx, 0xb
jbe 0x409fcb
test esi, esi
je 0x4085da
mov edx, dword [0x4180a4]
mov ebx, 0xc
mov dword [eax], edx
mov edx, dword [0x4180a8]
mov dword [eax + 4], edx
mov edx, dword [0x41801c]
mov dword [eax + 8], edx
jmp 0x407772
mov dword [ebp - 0x170], 0
mov ebx, 8
mov dword [ebp - 0x160], 0
jmp 0x4089ba
test ebx, ebx
jne 0x408828
cmp edi, 0x18
jne 0x408828
mov eax, dword [ebp - 0x164]
mov eax, dword [eax - 0x94]
mov dword [eax + 0x10], 0
movsx ecx, word [esi]
movsx eax, word [esi + 4]
movsx edi, word [esi + 2]
movsx ebx, word [esi + 6]
mov word [ebp - 0x1aa], cx
sub eax, ecx
mov dword [ebp - 0x194], ecx
add eax, 1
sub ebx, edi
mov word [ebp - 0x1ac], di
mov dword [ebp - 0x184], eax
lea eax, [ebx + 1]
mov dword [ebp - 0x180], edi
mov dword [ebp - 0x17c], eax
test byte [0x413058], 8
jne 0x4090da
mov ebx, dword [ebp - 0x164]
xor eax, eax
cmp word [esi + 0xc], 0
mov ecx, eax
mov edx, eax
cmovns cx, word [esi + 0xc]
cmp word [esi + 0xe], 0
mov eax, dword [ebx - 0x88]
cmovns dx, word [esi + 0xe]
mov word [ebp - 0x19c], cx
mov word [ebp - 0x1a0], dx
mov edi, eax
lea edx, [eax - 1]
mov dword [ebp - 0x1a4], eax
movsx eax, word [esi + 0x10]
cmp edx, eax
cmovbe eax, edx
mov edx, dword [ebx - 0x84]
mov ecx, eax
movsx eax, word [esi + 0x12]
mov dword [ebp - 0x188], edx
sub edx, 1
cmp edx, eax
cmovbe eax, edx
mov dword [ebp - 0x1b8], eax
cmp word [ebp - 0x1a0], ax
jg 0x409022
mov dword [ebp - 0x1b4], ecx
cmp word [ebp - 0x19c], cx
jg 0x409022
movzx ecx, word [esi]
test cx, cx
js 0x409022
movzx edx, word [esi + 2]
test dx, dx
js 0x409022
movsx eax, word [esi + 4]
mov ebx, eax
cmp edi, eax
jbe 0x409022
movsx eax, word [esi + 6]
cmp cx, bx
setg cl
cmp dx, ax
setg dl
or cl, dl
jne 0x409022
mov edx, dword [ebp - 0x188]
cmp edx, eax
jbe 0x409022
movzx ecx, word [esi + 8]
mov word [ebp - 0x188], cx
test cx, cx
js 0x409022
movsx ebx, cx
mov dword [ebp - 0x1d0], ebx
cmp edi, ebx
jbe 0x409022
movzx eax, word [esi + 0xa]
mov word [ebp - 0x18c], ax
test ax, ax
js 0x409022
movsx ebx, ax
mov dword [ebp - 0x1d4], ebx
cmp edx, ebx
jbe 0x409022
movsx eax, word [ebp - 0x19c]
movsx edi, word [ebp - 0x1a0]
mov edx, dword [ebp - 0x1b4]
mov dword [ebp - 0x1a8], eax
mov eax, dword [ebp - 0x194]
mov ebx, edi
cmp eax, dword [ebp - 0x1a8]
mov dword [ebp - 0x1c0], edi
mov ecx, eax
cmovl ecx, dword [ebp - 0x1a8]
mov word [ebp - 0x1ae], dx
mov dword [ebp - 0x198], ecx
mov word [ebp - 0x1ba], cx
mov ecx, dword [ebp - 0x180]
cmp ecx, edi
cmovge ebx, ecx
mov dword [ebp - 0x190], ebx
mov word [ebp - 0x1bc], bx
movsx ebx, dx
mov dword [ebp - 0x1c4], ebx
mov ecx, ebx
mov ebx, dword [ebp - 0x184]
add eax, ebx
mov word [ebp - 0x1ca], bx
cmp eax, ecx
jg 0x408cab
movzx eax, word [ebp - 0x1aa]
lea eax, [eax + ebx - 1]
mov word [ebp - 0x1ae], ax
mov ecx, dword [ebp - 0x1b8]
mov edi, dword [ebp - 0x17c]
mov edx, dword [ebp - 0x180]
movsx ebx, cx
mov word [ebp - 0x1b0], cx
mov eax, edi
add edx, edi
mov dword [ebp - 0x1c8], ebx
cmp edx, ebx
jg 0x408cee
movzx ecx, word [ebp - 0x1ac]
movzx edi, word [ebp - 0x17c]
lea ecx, [ecx + edi - 1]
mov word [ebp - 0x1b0], cx
movzx ebx, word [ebp - 0x188]
movzx ecx, word [ebp - 0x1ca]
lea ecx, [ebx + ecx - 1]
mov word [ebp - 0x1aa], cx
movzx ecx, word [ebp - 0x18c]
lea eax, [ecx + eax - 1]
movzx ecx, word [ebp - 0x19c]
mov word [ebp - 0x1ac], ax
cmp cx, bx
jle 0x408d44
mov edx, dword [ebp - 0x1a8]
sub edx, dword [ebp - 0x1d0]
mov word [ebp - 0x188], cx
add dword [ebp - 0x194], edx
sub dword [ebp - 0x184], edx
movzx ebx, word [ebp - 0x1a0]
movzx eax, word [ebp - 0x18c]
cmp bx, ax
jle 0x408d76
mov eax, dword [ebp - 0x1c0]
sub eax, dword [ebp - 0x1d4]
mov word [ebp - 0x18c], bx
add dword [ebp - 0x180], eax
sub dword [ebp - 0x17c], eax
movsx eax, word [ebp - 0x1aa]
cmp word [ebp - 0x1b4], ax
jge 0x408d92
sub eax, dword [ebp - 0x1c4]
sub dword [ebp - 0x184], eax
movsx eax, word [ebp - 0x1ac]
cmp word [ebp - 0x1b8], ax
jge 0x408dae
sub eax, dword [ebp - 0x1c8]
sub dword [ebp - 0x17c], eax
cmp dword [ebp - 0x184], 0
jle 0x408e7a
cmp dword [ebp - 0x17c], 0
jle 0x408e7a
mov eax, dword [ebp - 0x164]
movsx ebx, word [ebp - 0x188]
movsx ecx, word [ebp - 0x18c]
mov edi, dword [ebp - 0x180]
mov edx, dword [eax - 0x64]
mov eax, dword [ebp - 0x184]
mov dword [ebp - 0x19c], ebx
shl eax, 2
mov dword [ebp - 0x184], eax
cmp ecx, edi
jle 0x409048
mov eax, dword [ebp - 0x17c]
mov dword [ebp - 0x180], esi
lea eax, [edi + eax - 1]
imul eax, dword [ebp - 0x1a4]
add eax, dword [ebp - 0x194]
lea edi, [edx + eax*4]
mov eax, dword [ebp - 0x17c]
lea eax, [eax + ecx - 1]
imul eax, dword [ebp - 0x1a4]
add eax, ebx
mov ebx, dword [ebp - 0x17c]
lea edx, [edx + eax*4]
mov esi, edx
mov eax, dword [ebp - 0x184]
mov dword [esp + 4], edi
mov dword [esp], esi
mov dword [esp + 8], eax
call sym._memcpy
mov eax, dword [ebp - 0x164]
mov eax, dword [eax - 0x88]
mov dword [ebp - 0x17c], eax
shl eax, 2
sub esi, eax
sub edi, eax
sub ebx, 1
jne 0x408e40
mov esi, dword [ebp - 0x180]
movsx edx, word [ebp - 0x1b0]
cmp edx, dword [ebp - 0x190]
jl 0x408f96
movsx eax, word [ebp - 0x1aa]
mov ebx, dword [ebp - 0x198]
mov dword [ebp - 0x17c], esi
movsx edi, word [ebp - 0x1ae]
add eax, 1
cmp eax, ebx
cmovl eax, ebx
mov ecx, eax
movzx eax, word [ebp - 0x188]
cmp bx, ax
cmovge ebx, ecx
sub eax, 1
mov dword [ebp - 0x194], ebx
movsx ebx, word [ebp - 0x18c]
mov dword [ebp - 0x19c], ebx
lea ebx, [edx + 1]
mov dword [ebp - 0x180], ebx
movsx ebx, ax
mov edx, dword [ebp - 0x190]
mov eax, dword [ebp - 0x19c]
cmp edx, eax
jl 0x40903b
movsx eax, word [ebp - 0x1ac]
cmp eax, edx
jl 0x40903b
movzx edx, word [ebp - 0x188]
cmp word [ebp - 0x1ba], dx
jl 0x4090c8
mov edx, edi
mov eax, ecx
je 0x4090c8
lea esi, [edx + 1]
mov dword [ebp - 0x184], esi
cmp edx, eax
jl 0x408f7d
mov dword [ebp - 0x1a0], ecx
mov esi, dword [ebp - 0x17c]
mov dword [ebp - 0x1a4], ebx
mov ebx, dword [ebp - 0x164]
mov ecx, dword [ebp - 0x190]
imul ecx, dword [ebx - 0x88]
mov edx, ecx
mov ecx, dword [ebx - 0x64]
mov ebx, dword [esi + 0x14]
add edx, eax
add eax, 1
mov dword [ecx + edx*4], ebx
cmp eax, dword [ebp - 0x184]
jne 0x408f40
mov dword [ebp - 0x17c], esi
mov ecx, dword [ebp - 0x1a0]
mov ebx, dword [ebp - 0x1a4]
add dword [ebp - 0x190], 1
mov eax, dword [ebp - 0x190]
cmp eax, dword [ebp - 0x180]
jne 0x408ee0
mov ecx, dword [ebp - 0x198]
movzx eax, word [ebp - 0x188]
mov edx, dword [ebp - 0x168]
cmp cx, ax
cmovle eax, ecx
movsx ecx, word [ebp - 0x1aa]
cwde
mov dword [ebp - 0x140], eax
movsx eax, word [ebp - 0x1ae]
cmp cx, ax
cmovge eax, ecx
movsx ecx, word [ebp - 0x1bc]
mov dword [ebp - 0x138], eax
movsx eax, word [ebp - 0x18c]
cmp cx, ax
cmovle eax, ecx
movsx ecx, word [ebp - 0x1ac]
mov dword [ebp - 0x13c], eax
movsx eax, word [ebp - 0x1b0]
cmp cx, ax
cmovge eax, ecx
mov dword [ebp - 0x134], eax
mov eax, dword [ebp - 0x170]
call sym._update_output
mov eax, dword [ebp - 0x164]
mov eax, dword [eax - 0x94]
call sym._tty_sync
jmp 0x40902c
mov dword [ebp - 0x160], 0xc000000d
mov dword [ebp - 0x164], 0
jmp 0x407938
mov eax, dword [ebp - 0x198]
mov edx, edi
jmp 0x408f21
mov ebx, dword [ebp - 0x1a4]
mov eax, dword [ebp - 0x180]
mov dword [ebp - 0x180], esi
imul eax, ebx
add eax, dword [ebp - 0x194]
lea edi, [edx + eax*4]
mov eax, ebx
imul eax, ecx
add eax, dword [ebp - 0x19c]
xor ecx, ecx
lea edx, [edx + eax*4]
mov esi, ecx
mov ebx, edx
mov edx, dword [ebp - 0x17c]
mov eax, dword [ebp - 0x184]
mov dword [ebp - 0x194], edx
add esi, 1
mov dword [esp + 4], edi
mov dword [esp], ebx
mov dword [esp + 8], eax
call dword [sym.imp.ucrtbase.dll_memmove]
mov eax, dword [ebp - 0x164]
mov edx, dword [ebp - 0x194]
mov eax, dword [eax - 0x88]
mov dword [ebp - 0x17c], eax
shl eax, 2
add ebx, eax
add edi, eax
cmp edx, esi
jg 0x409080
jmp 0x408e74
cmp ebx, edi
mov edx, edi
mov eax, dword [ebp - 0x194]
cmovle edx, ebx
jmp 0x408f21
mov dword [esp + 0x24], eax
mov eax, dword [ebp - 0x184]
mov dword [esp + 0x20], eax
movsx eax, word [esi + 0xa]
mov dword [esp + 0x1c], eax
movsx eax, word [esi + 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 0x408af9
mov ecx, 0x14
xor edx, edx
mov eax, edi
div ecx
or edx, ebx
mov ecx, eax
mov dword [ebp - 0x164], edx
jne 0x408828
test byte [0x413058], 8
jne 0x409296
cmp edi, 0x13
jbe 0x4086f5
mov dword [esp], 1
mov edx, esi
mov eax, section..bss
call sym._write_console_input.part.0
mov dword [ebp - 0x160], eax
jmp 0x407938
mov eax, dword [ebp - 0x164]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov eax, dword [eax - 0x94]
mov eax, dword [eax + 0xa8]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_MultiByteToWideChar]
mov dword [ebp - 0x160], eax
call eax
sub esp, 0x18
mov ecx, eax
test eax, eax
je 0x408013
add eax, eax
mov dword [ebp - 0x17c], ecx
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
test eax, eax
je 0x4081c2
mov ecx, dword [ebp - 0x17c]
mov dword [esp + 0x10], eax
mov dword [ebp - 0x17c], eax
mov eax, dword [ebp - 0x164]
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], edi
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov eax, dword [eax - 0x94]
mov dword [ebp - 0x180], ecx
mov eax, dword [eax + 0xa8]
mov dword [esp], eax
mov eax, dword [ebp - 0x160]
call eax
mov edx, dword [ebp - 0x17c]
mov ecx, dword [ebp - 0x180]
mov eax, dword [ebp - 0x170]
sub esp, 0x18
mov dword [ebp - 0x164], edx
call sym._write_console
mov edx, dword [ebp - 0x164]
mov dword [ebp - 0x160], eax
mov dword [esp], edx
call dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x164], ebx
jmp 0x407938
mov eax, edi
and eax, 1
or eax, ebx
mov dword [ebp - 0x164], eax
jne 0x408828
mov eax, dword [ebp - 0x170]
mov ecx, edi
mov edx, esi
shr ecx, 1
call sym._write_console
mov dword [ebp - 0x160], eax
jmp 0x407938
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x414246
mov dword [esp + 8], str.write_console_input
mov dword [esp + 4], 0x413058
mov dword [esp], 3
mov dword [ebp - 0x160], eax
call sym._wine_dbg_log.constprop.0
mov ecx, dword [ebp - 0x160]
jmp 0x409151
cmp ebx, 4
jne 0x408828
cmp edi, 0x18
jne 0x408828
test byte [0x413058], 8
jne 0x4094aa
mov ecx, dword [ebp - 0x164]
mov eax, dword [ecx - 0x94]
mov dword [eax + 0x10], 0
mov eax, ecx
mov edx, dword [esi + 4]
mov ecx, dword [ecx - 0x84]
cmp edx, ecx
jae 0x4093bf
mov edi, dword [eax - 0x64]
mov eax, dword [eax - 0x88]
imul ecx, eax
imul edx, eax
add edx, dword [esi]
lea eax, [ecx*4]
mov ebx, eax
cmp edx, ecx
jae 0x409339
lea ebx, [edx*4]
sub eax, ebx
mov edx, dword [esi + 0xc]
lea ecx, [edi + ebx]
sar eax, 2
mov ebx, eax
cmp eax, edx
mov eax, dword [esi + 8]
cmova ebx, edx
cmp eax, 1
je 0x409491
cmp eax, 2
je 0x409470
test eax, eax
jne 0x408777
xor eax, eax
jmp 0x409377
movzx edx, word [esi + 0x14]
mov word [ecx + eax*4], dx
add eax, 1
cmp ebx, eax
jne 0x40936c
test ebx, ebx
je 0x409396
mov eax, dword [ebp - 0x164]
mov ecx, dword [ebp - 0x170]
mov eax, dword [eax - 0x94]
cmp ecx, dword [eax + 8]
je 0x4093c9
mov esi, dword [0x4190d4]
cmp dword [0x4190d0], 3
mov eax, esi
jbe 0x409441
test esi, esi
je 0x4085da
mov dword [eax], ebx
mov ebx, 4
jmp 0x407772
mov ebx, 4
jmp 0x408013
mov eax, dword [ebp - 0x164]
mov ecx, dword [esi + 4]
xor edx, edx
mov esi, dword [esi]
mov edi, dword [eax - 0x88]
lea eax, [ebx + esi - 1]
div edi
mov dword [ebp - 0x160], edi
mov dword [ebp - 0x17c], eax
mov edi, edx
mov eax, esi
xor edx, edx
div dword [ebp - 0x160]
mov dword [ebp - 0x138], edi
add eax, ecx
mov dword [ebp - 0x140], edx
mov edx, dword [ebp - 0x168]
mov dword [ebp - 0x13c], eax
mov eax, dword [ebp - 0x170]
add ecx, dword [ebp - 0x17c]
mov dword [ebp - 0x134], ecx
call sym._update_output
mov eax, dword [ebp - 0x164]
mov eax, dword [eax - 0x94]
call sym._tty_sync
jmp 0x409396
mov dword [esp + 4], 4
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_realloc]
test eax, eax
je 0x4085d4
mov dword [0x4190d4], eax
mov esi, eax
mov dword [0x4190d0], 4
jmp 0x4093b3
xor eax, eax
jmp 0x409488
movzx edx, word [esi + 0x14]
mov word [ecx + eax*4], dx
movzx edx, word [esi + 0x16]
mov word [ecx + eax*4 + 2], dx
add eax, 1
cmp ebx, eax
jne 0x409474
jmp 0x40937b
xor eax, eax
jmp 0x4094a1
movzx edx, word [esi + 0x16]
mov word [ecx + eax*4 + 2], dx
add eax, 1
cmp ebx, eax
jne 0x409495
jmp 0x40937b
mov eax, dword [esi + 8]
mov dword [esp + 0x18], eax
mov eax, dword [esi + 4]
mov dword [esp + 0x14], eax
mov eax, dword [esi]
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 0x4092ee
or ebx, edi
jne 0x408828
test byte [0x413058], 8
jne 0x409bec
mov esi, dword [ebp - 0x164]
mov ecx, dword [ebp - 0x170]
mov eax, dword [esi - 0x94]
mov dword [eax + 8], ecx
mov edi, dword [esi - 0x88]
mov eax, dword [esi - 0x84]
mov dword [ebp - 0x140], 0
lea edx, [edi - 1]
mov dword [ebp - 0x160], edi
mov dword [ebp - 0x138], edx
sub eax, 1
mov edx, dword [ebp - 0x168]
mov dword [ebp - 0x134], eax
mov eax, ecx
mov dword [ebp - 0x13c], 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 esi, dword [0x4190d4]
jmp 0x407772
test ebx, ebx
jne 0x408828
cmp edi, 0x67
jbe 0x408828
test byte [0x413058], 8
jne 0x40988e
mov eax, dword [esi]
test al, 1
je 0x4095cf
movsx eax, word [esi + 4]
lea edx, [eax - 1]
cmp dx, 0x63
ja 0x408777
mov ecx, dword [ebp - 0x164]
mov dword [ecx - 0x80], eax
xor eax, eax
cmp word [esi + 6], 0
setne al
mov dword [ecx - 0x7c], eax
mov eax, dword [esi]
test al, 2
je 0x409641
movsx edx, word [esi + 8]
test dx, dx
js 0x408777
mov ebx, dword [ebp - 0x164]
cmp edx, dword [ebx - 0x88]
jae 0x408777
movsx ecx, word [esi + 0xa]
test cx, cx
js 0x408777
cmp ecx, dword [ebx - 0x84]
jae 0x408777
cmp edx, dword [ebx - 0x78]
je 0x409bc9
mov ebx, dword [ebp - 0x164]
mov dword [ebx - 0x78], edx
mov eax, dword [ebx - 0x94]
movsx ecx, word [esi + 0xa]
mov dword [ebx - 0x74], ecx
cmp dword [eax + 0x10], 0
jne 0x409bbf
mov eax, dword [ebp - 0x170]
call sym._scroll_to_cursor
mov eax, dword [esi]
test al, 4
je 0x40971a
mov ebx, dword [ebp - 0x164]
mov eax, dword [ebx - 0x94]
mov dword [eax + 0x10], 0
movsx edx, word [esi + 0xc]
mov eax, dword [ebx - 0x18]
sub eax, dword [ebx - 0x20]
cmp eax, edx
jge 0x408777
movsx ecx, word [esi + 0xe]
mov eax, dword [ebx - 0x14]
sub eax, dword [ebx - 0x1c]
cmp eax, ecx
jge 0x408777
mov eax, dword [ebp - 0x170]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._change_screen_buffer_size
mov dword [ebp - 0x160], eax
test eax, eax
jne 0x4081cc
mov ecx, dword [ebp - 0x164]
movsx edx, word [esi + 0xc]
mov eax, dword [ecx - 0x18]
cmp eax, edx
jl 0x4096c2
sub eax, dword [ecx - 0x20]
mov dword [ecx - 0x20], 0
mov dword [ecx - 0x18], eax
mov ecx, dword [ebp - 0x164]
movsx edx, word [esi + 0xe]
mov eax, dword [ecx - 0x14]
cmp eax, edx
jl 0x4096e0
sub eax, dword [ecx - 0x1c]
mov dword [ecx - 0x1c], 0
mov dword [ecx - 0x14], eax
mov ecx, dword [ebp - 0x164]
movsx eax, word [esi + 0xc]
cmp dword [ecx - 0x78], eax
jb 0x4096f5
sub eax, 1
mov dword [ecx - 0x78], eax
mov ecx, dword [ebp - 0x164]
movsx eax, word [esi + 0xe]
cmp dword [ecx - 0x74], eax
jb 0x40970a
sub eax, 1
mov dword [ecx - 0x74], eax
mov eax, dword [ebp - 0x170]
mov dword [esp], eax
call sym._notify_screen_buffer_size
mov eax, dword [esi]
test al, 8
je 0x40972e
movzx eax, word [esi + 0x10]
mov ecx, dword [ebp - 0x164]
mov word [ecx - 0x70], ax
mov eax, dword [esi]
test al, 0x40
je 0x409742
movzx eax, word [esi + 0x12]
mov ecx, dword [ebp - 0x164]
mov word [ecx - 0x6e], ax
mov eax, dword [esi]
test al, 0x10
je 0x4097dd
mov ecx, dword [ebp - 0x164]
mov eax, dword [ecx - 0x94]
mov dword [eax + 0x10], 0
movsx edx, word [esi + 0x14]
test dx, dx
js 0x408777
movzx ebx, word [esi + 0x18]
cmp dx, bx
jg 0x408777
movsx eax, bx
mov ebx, ecx
mov dword [ebp - 0x160], eax
cmp eax, dword [ecx - 0x88]
jae 0x408777
movsx eax, word [esi + 0x16]
test ax, ax
js 0x408777
movsx ecx, word [esi + 0x1a]
cmp ax, cx
jg 0x408777
cmp ecx, dword [ebx - 0x84]
jae 0x408777
cmp dword [ebx - 0x20], edx
je 0x4098c1
mov ecx, dword [ebp - 0x164]
mov dword [ecx - 0x20], edx
movsx eax, word [esi + 0x16]
mov dword [ecx - 0x1c], eax
movsx eax, word [esi + 0x18]
mov dword [ecx - 0x18], eax
movsx eax, word [esi + 0x1a]
mov dword [ecx - 0x14], eax
mov eax, dword [esi]
test al, 0x20
je 0x409804
mov ecx, dword [ebp - 0x164]
mov eax, dword [ecx - 0x94]
mov dword [eax + 0x10], 0
movsx eax, word [esi + 0x1c]
mov dword [ecx - 0x6c], eax
movsx eax, word [esi + 0x1e]
mov dword [ecx - 0x68], eax
mov eax, dword [esi]
test al, 0x80
je 0x40986a
sub edi, 0x68
movsx eax, word [esi + 0x22]
lea ecx, [esi + 0x68]
jne 0x40982a
mov ebx, dword [ebp - 0x164]
mov ecx, dword [ebx - 8]
mov ebx, dword [ebx - 4]
mov dword [ebp - 0x160], ebx
mov edi, ebx
add edi, ebx
test eax, eax
jne 0x409833
mov eax, 0xc
cmp word [esi + 0x24], 0x258
mov edx, 0x190
mov ebx, 0x2bc
mov dword [esp + 0xc], eax
cmovge edx, ebx
mov eax, dword [ebp - 0x164]
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 - 0x164]
mov ecx, dword [ebp - 0x170]
mov eax, dword [eax - 0x94]
cmp ecx, dword [eax + 8]
je 0x4098e9
mov esi, dword [0x4190d4]
xor ebx, ebx
jmp 0x407772
mov eax, dword [ebp - 0x170]
mov dword [esp + 0xc], 0x4144f1
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 0x4095a0
cmp dword [ebx - 0x1c], eax
jne 0x4097bd
mov eax, ebx
mov ebx, dword [ebp - 0x160]
cmp dword [eax - 0x18], ebx
jne 0x4097bd
cmp dword [eax - 0x14], ecx
jne 0x4097bd
jmp 0x4097db
call sym._tty_sync
mov eax, dword [ebp - 0x164]
mov dword [esp + 4], 0
xor ebx, ebx
mov eax, dword [eax - 0x94]
mov dword [esp], eax
call sym._update_window_config
mov esi, dword [0x4190d4]
jmp 0x407772
lea eax, [ebx - 4]
and eax, 0xfffffffb
jne 0x408828
cmp edi, 0xf
jbe 0x408828
mov eax, dword [ebp - 0x164]
mov eax, dword [eax - 0x94]
mov dword [eax + 0x10], 0
cmp ebx, 8
je 0x40881e
xor eax, eax
cmp dword [esi + 8], 2
sete al
xor edx, edx
lea ecx, [eax + eax + 2]
lea eax, [edi - 0x10]
div ecx
mov dword [ebp - 0x18c], ecx
mov dword [ebp - 0x180], eax
test byte [0x413058], 8
jne 0x409c1f
mov eax, dword [ebp - 0x164]
mov eax, dword [eax - 0x88]
cmp dword [esi], eax
jae 0x4086f5
mov dword [ebp - 0x160], 0
lea edi, [esi + 0x10]
mov dword [ebp - 0x190], ebx
mov ecx, dword [ebp - 0x160]
cmp dword [ebp - 0x180], ecx
je 0x409a4c
mov eax, dword [esi]
mov ebx, dword [ebp - 0x164]
mov edx, dword [esi + 4]
mov ecx, dword [esi + 0xc]
mov dword [ebp - 0x184], eax
mov ebx, dword [ebx - 0x88]
mov dword [ebp - 0x188], edx
test ecx, ecx
je 0x409a3a
mov eax, dword [ebp - 0x160]
xor edx, edx
div ecx
add edx, dword [ebp - 0x184]
cmp edx, ebx
jae 0x409a28
mov ecx, dword [ebp - 0x164]
add eax, dword [ebp - 0x188]
cmp dword [ecx - 0x84], eax
jbe 0x409a4c
imul eax, ebx
add eax, edx
mov edx, dword [ecx - 0x64]
lea eax, [edx + eax*4]
mov edx, dword [esi + 8]
cmp edx, 1
je 0x409be0
cmp edx, 2
je 0x409bd7
test edx, edx
jne 0x408777
movzx edx, word [edi]
mov word [eax], dx
add dword [ebp - 0x160], 1
add edi, dword [ebp - 0x18c]
jmp 0x40999c
mov eax, dword [ebp - 0x184]
xor edx, edx
add eax, dword [ebp - 0x160]
div ebx
jmp 0x4099e6
cmp dword [ebp - 0x160], 0
mov ebx, dword [ebp - 0x190]
je 0x409a76
mov eax, dword [ebp - 0x164]
mov ecx, dword [ebp - 0x170]
mov eax, dword [eax - 0x94]
cmp ecx, dword [eax + 8]
je 0x409c59
mov esi, dword [0x4190d4]
mov eax, dword [0x4190d0]
mov ecx, esi
cmp ebx, 8
je 0x409e8b
cmp eax, 3
jbe 0x409e5a
test esi, esi
je 0x4085da
mov eax, dword [ebp - 0x160]
mov dword [ecx], eax
jmp 0x407772
cmp dword [0x4180b4], 0
je 0x409abc
cmp dword [0x4180b0], 0
je 0x409b3b
mov dword [esp], 0
xor ecx, ecx
mov edx, ebx
mov eax, 0x50402c
mov dword [esp + 4], 0
call sym._read_console.constprop.0
mov dword [ebp - 0x164], 0
mov dword [ebp - 0x160], eax
jmp 0x407938
mov eax, ebx
and eax, 1
or eax, edi
mov dword [ebp - 0x164], eax
jne 0x408828
cmp dword [0x4180b4], 0
je 0x409b13
cmp dword [0x4180b0], 0
je 0x409b7d
mov dword [esp], 0
xor ecx, ecx
mov edx, ebx
mov eax, 0x504028
mov dword [esp + 4], 0
call sym._read_console.constprop.0
mov dword [ebp - 0x160], eax
jmp 0x407938
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 [0x4180b0], eax
sub esp, 0x18
jmp 0x409abc
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 [0x4180b0], eax
sub esp, 0x18
jmp 0x409b13
call sym._set_tty_cursor_relative
jmp 0x409634
cmp ecx, dword [ebx - 0x74]
jne 0x409614
jmp 0x409641
mov edx, dword [edi]
mov dword [eax], edx
jmp 0x409a28
movzx edx, word [edi]
mov word [eax + 2], dx
jmp 0x409a28
mov eax, dword [ebp - 0x170]
mov dword [esp + 0xc], 0x4144f1
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 0x4094fc
mov dword [esp + 0x18], eax
mov eax, dword [esi + 4]
mov dword [esp + 0x14], eax
mov eax, dword [esi]
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 0x409975
movq xmm2, qword [esi]
mov eax, dword [esi]
mov edi, dword [esi + 4]
movq qword [ebp - 0x140], xmm2
mov ecx, dword [esi + 0xc]
mov dword [ebp - 0x184], eax
test ecx, ecx
je 0x40a0a9
mov eax, dword [ebp - 0x180]
xor edx, edx
div ecx
lea esi, [eax + edi]
mov edi, dword [ebp - 0x164]
mov eax, dword [edi - 0x84]
cmp esi, eax
cmovbe eax, esi
add ecx, dword [ebp - 0x184]
sub eax, 1
mov dword [ebp - 0x134], eax
cmp dword [edi - 0x88], ecx
cmovbe ecx, dword [edi - 0x88]
lea eax, [ecx - 1]
mov dword [ebp - 0x138], eax
mov eax, dword [ebp - 0x170]
mov edx, dword [ebp - 0x168]
call sym._update_output
mov eax, dword [ebp - 0x164]
mov eax, dword [eax - 0x94]
call sym._tty_sync
jmp 0x409a76
test byte [0x413058], 8
jne 0x409d5e
test edi, edi
jne 0x408777
cmp dword [0x4180b4], 0
je 0x409d08
cmp dword [0x4180b0], 0
je 0x409d87
imul eax, dword [0x41801c], 0x14
cmp ebx, eax
cmova ebx, eax
mov eax, dword [0x4190d4]
mov esi, eax
cmp ebx, dword [0x4190d0]
ja 0x409dc9
test eax, eax
je 0x4085da
mov esi, dword [0x4190d4]
test ebx, ebx
je 0x407772
mov edx, dword [0x418018]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sym._memcpy
mov esi, dword [0x4190d4]
jmp 0x407772
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 0x409cee
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 [0x4180b0], eax
sub esp, 0x18
jmp 0x409d08
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_realloc]
test eax, eax
je 0x4081c2
mov dword [0x4190d4], eax
mov dword [0x4190d0], ebx
jmp 0x409d2f
cmp dword [0x41800c], 0
jne 0x407772
jmp 0x407b74
test byte [0x413058], 8
jne 0x409f9c
mov eax, dword [0x4190d0]
mov edx, esi
cmp ebx, 4
jne 0x408828
test edi, edi
jne 0x408828
cmp eax, 3
jbe 0x409f6d
test esi, esi
je 0x4085da
cmp dword [0x4180ac], 0
je 0x409f06
mov eax, dword [0x4180ac]
mov esi, dword [0x4190d4]
mov ebx, 4
mov dword [edx], eax
jmp 0x407772
mov dword [esp + 4], 4
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_realloc]
mov ecx, eax
test eax, eax
je 0x4081c2
mov dword [0x4190d4], eax
mov esi, eax
mov dword [0x4190d0], 4
jmp 0x409a9d
mov edi, dword [ebp - 0x17c]
mov edx, dword [edi + 0xc]
mov dword [ebp - 0x160], edx
mov edx, dword [edi]
mov edi, dword [edi + 4]
cmp eax, 7
jbe 0x409f30
test esi, esi
je 0x4085da
mov eax, dword [ebp - 0x160]
mov word [ecx], dx
mov word [ecx + 2], di
add eax, edx
mov edx, dword [ebp - 0x164]
cmp dword [edx - 0x88], eax
cmovbe eax, dword [edx - 0x88]
xor edx, edx
sub eax, 1
mov word [ecx + 4], ax
mov eax, dword [ebp - 0x180]
div dword [ebp - 0x160]
mov edx, dword [ebp - 0x164]
add edi, eax
mov eax, dword [edx - 0x84]
cmp edi, eax
cmova edi, eax
lea eax, [edi - 1]
mov word [ecx + 6], ax
jmp 0x407772
cmp dword [0x418014], 0
jne 0x409e43
mov dword [esp], section..bss
mov dword [ebp - 0x160], edx
call sym._init_message_window
mov edx, dword [ebp - 0x160]
jmp 0x409e43
mov dword [ebp - 0x170], edx
mov dword [esp + 4], 8
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_realloc]
mov edx, dword [ebp - 0x170]
test eax, eax
mov ecx, eax
je 0x4085d4
mov dword [0x4190d4], eax
mov esi, eax
mov dword [0x4190d0], 8
jmp 0x409eb0
mov dword [esp + 4], 4
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_realloc]
mov edx, eax
test eax, eax
je 0x4085d4
mov dword [0x4190d4], eax
mov dword [0x4190d0], 4
jmp 0x409e36
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 esi, dword [0x4190d4]
jmp 0x409e0d
mov dword [esp + 4], 0xc
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_realloc]
test eax, eax
je 0x4085d4
mov dword [0x4190d4], eax
mov esi, eax
mov dword [0x4190d0], 0xc
jmp 0x408a47
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 esi, dword [0x4190d4]
jmp 0x408a1d
test edi, edi
jne 0x408828
cmp dword [0x4180b4], 0
je 0x40a047
cmp dword [0x4180b0], 0
je 0x40a0f3
cmp dword [0x41801c], 0
jne 0x40a054
test ebx, ebx
jne 0x40a075
mov edx, ebx
mov eax, section..bss
call sym._read_console_input
mov dword [ebp - 0x164], 0
mov dword [ebp - 0x160], eax
jmp 0x407938
test byte [0x413058], 8
jne 0x40a135
mov dword [0x418038], ebx
mov esi, dword [0x4190d4]
xor ebx, ebx
mov dword [0x418034], 0x504030
mov dword [ebp - 0x160], 0x103
jmp 0x407508
mov eax, dword [ebp - 0x160]
mov ecx, dword [ebp - 0x184]
xor edx, edx
lea ecx, [eax + ecx - 1]
mov eax, dword [ebp - 0x164]
mov esi, dword [eax - 0x88]
mov eax, ecx
div esi
add eax, edi
mov dword [ebp - 0x134], eax
cmp ecx, esi
jb 0x40a15e
mov dword [ebp - 0x140], 0
lea eax, [esi - 1]
mov dword [ebp - 0x138], eax
jmp 0x409cbe
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 [0x4180b0], eax
sub esp, 0x18
jmp 0x40a047
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 0x40a082
mov dword [ebp - 0x138], ecx
jmp 0x409cbe