Function at 0x40e500
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, 0x1fc
mov eax, dword [ecx + 4]
mov esi, dword [ecx]
mov dword [ebp - 0x168], eax
movzx eax, byte [0x413024]
mov dword [ebp - 0x164], esi
test esi, esi
jle 0x40ec98
xor esi, esi
jmp 0x40e54d
inc esi
cmp dword [ebp - 0x164], esi
je 0x40e6bf
mov edx, eax
and edx, 8
je 0x40e540
mov eax, dword [ebp - 0x168]
mov ebx, dword [eax + esi*4]
test ebx, ebx
je 0x40ebb0
mov eax, ebx
shr eax, 0x10
je 0x40eb10
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, 0x415068
sub esp, 8
test eax, eax
jne 0x40e67e
cmp word [ebx], 0
je 0x40ebc0
lea esi, [esi]
nop
mov edx, eax
lea eax, [eax + 1]
cmp word [ebx + edx*2 + 2], 0
jne 0x40e5a0
mov eax, 0x224c
mov dword [ebp - 0x160], ebx
lea ecx, [ebp - 0x13e]
mov word [ebp - 0x140], ax
jmp 0x40e600
cmp ax, 9
je 0x40e9f8
cmp ax, 0xa
jne 0x40ea16
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea edi, [ebp - 0x1e]
lea eax, [edx - 1]
cmp ecx, edi
ja 0x40e650
test edx, edx
jle 0x40e650
mov edx, eax
add dword [ebp - 0x160], 2
mov eax, dword [ebp - 0x160]
movzx eax, word [eax - 2]
cmp ax, 0xd
je 0x40e9e0
jbe 0x40e5d0
cmp ax, 0x22
je 0x40ea70
cmp ax, 0x5c
jne 0x40ea09
mov edi, 0x5c5c
add ecx, 2
lea eax, [edx - 1]
mov word [ecx - 2], di
lea edi, [ebp - 0x1e]
cmp ecx, edi
jbe 0x40e5fa
lea esi, [esi]
nop
mov byte [ecx], 0x22
test eax, eax
jle 0x40ebd9
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
inc esi
mov dword [esp + 0xc], 0x415388
mov dword [esp + 8], str.wmain
mov dword [esp + 4], 0x413024
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
movzx eax, byte [0x413024]
mov edx, eax
and edx, 8
cmp dword [ebp - 0x164], esi
jne 0x40e54d
test dl, dl
jne 0x40ebe8
mov dword [0x413084], 0x1f7
call dword [sym.imp.kernel32.dll_GetOEMCP]
mov dword [esp + 4], 4
mov dword [0x413128], eax
mov dword [0x413124], eax
mov dword [0x413114], 0x32
mov dword [esp], 0x32
call dword [sym.imp.ucrtbase.dll_calloc]
mov dword [0x413110], eax
test eax, eax
je 0x40eafb
cmp dword [ebp - 0x164], 1
jle 0x40ecf9
mov dword [ebp - 0x174], 0
mov ebx, 1
mov dword [ebp - 0x170], 0
mov dword [ebp - 0x16c], 0
mov dword [ebp - 0x160], 0
jmp 0x40e792
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 0x40ea88
mov dword [0x41308c], 1
mov dword [0x413090], 1
mov dword [ebp - 0x160], 1
inc ebx
cmp dword [ebp - 0x164], ebx
jle 0x40e7cc
mov eax, dword [ebp - 0x168]
lea esi, [ebx*4]
mov dword [esp + 4], 0x41538c
lea edi, [eax + esi]
mov eax, dword [edi]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcscmp]
test eax, eax
jne 0x40e750
mov dword [ebp - 0x160], 1
inc ebx
cmp dword [ebp - 0x164], ebx
jg 0x40e792
mov esi, dword [0x413080]
test esi, esi
je 0x40f0e5
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 [0x413088], eax
test eax, eax
je 0x40eafb
mov ebx, dword [ebp - 0x160]
test ebx, ebx
je 0x40ed32
mov ebx, dword [sym.imp.kernel32.dll_GetStdHandle]
mov dword [esp], 0xfffffff6
call ebx
sub esp, 4
mov dword [0x413134], eax
mov dword [esp], 0xfffffff5
call ebx
mov ecx, dword [0x413134]
mov dword [0x413138], eax
sub esp, 4
test ecx, ecx
je 0x40f120
mov edx, dword [0x41308c]
test edx, edx
jne 0x40f136
test eax, eax
je 0x40e87f
mov ecx, 4
mov edx, str.e_2J
mov eax, 0x413080
call sym._tty_write.part.0
mov eax, dword [0x413088]
movzx edx, word [eax + 0x24]
mov eax, 0x413080
call sym._set_tty_attr
mov edi, dword [0x413138]
test edi, edi
je 0x40e8b0
mov ecx, 3
mov edx, 0x415420
mov eax, 0x413080
call sym._tty_write.part.0
mov eax, dword [0x41308c]
mov dword [0x41414c], 1
test eax, eax
jne 0x40e8db
mov esi, dword [0x413134]
test esi, esi
je 0x40e8db
mov ebx, dword [0x413130]
test ebx, ebx
je 0x40f599
mov ecx, dword [ebp - 0x174]
test ecx, ecx
je 0x40eda4
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 - 0x17c], eax
sub esp, 0x10
test eax, eax
je 0x40e986
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 - 0x17c]
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 0x40edae
cmp eax, 0x103
je 0x40edae
mov ebx, 1
mov edi, dword [0x41308c]
test edi, edi
je 0x40eb00
mov eax, dword [0x414148]
xor eax, 7
test al, 0xf
je 0x40e9c3
mov esi, dword [0x413138]
test esi, esi
je 0x40e9c3
mov ecx, 3
mov edx, 0x41510c
mov eax, 0x413080
call sym._tty_write.part.0
mov dword [0x414148], 7
mov eax, 0x413080
call sym._tty_flush
jmp 0x40eb00
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x40e5f0
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x40e5f0
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x40eba0
mov edi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + 0x416490]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [edi + 0x416490]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + 0x416490]
and edi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [edi + 0x416490]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x40e5f0
mov eax, 0x225c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x40e5f0
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 0x40eb30
inc ebx
cmp dword [ebp - 0x164], ebx
je 0x40eafb
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 0x40eb87
cmp dword [ebp - 0x16c], 0xffff
jg 0x40eafb
mov eax, dword [ebp - 0x158]
cmp word [eax], 0
je 0x40e789
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], 0x415072
mov dword [esp + 4], ebx
call sym._wine_dbg_sprintf
mov edx, eax
jmp 0x40e67e
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 0x40ec18
inc ebx
cmp dword [ebp - 0x164], ebx
je 0x40eafb
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 0x40ec80
mov ecx, dword [0x41308c]
test ecx, ecx
jne 0x40eaeb
jmp 0x40eafb
mov byte [ecx], al
inc ecx
jmp 0x40e5f0
mov edx, str._null_
jmp 0x40e67e
mov edx, 0x224c
mov byte [ebp - 0x13e], 0x22
lea ecx, [ebp - 0x13e]
mov word [ebp - 0x140], dx
lea eax, [ecx + 1]
jmp 0x40e66b
mov dword [esp + 0xc], 0x415344
mov dword [esp + 8], str.wmain
mov dword [esp + 4], 0x413024
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x40e6c7
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 0x40eca2
inc ebx
cmp dword [ebp - 0x164], ebx
je 0x40eafb
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 0x40eafb
mov dword [ebp - 0x174], eax
jmp 0x40e789
cmp dword [ebp - 0x170], 0xffff
jle 0x40eaeb
jmp 0x40eafb
and eax, 8
mov edx, eax
jmp 0x40e6bf
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 0x40f81d
inc ebx
cmp dword [ebp - 0x164], ebx
je 0x40eafb
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 [0x413080], eax
jmp 0x40eaeb
mov edi, dword [0x413080]
test edi, edi
je 0x40f0e5
mov ecx, 0x96
mov edx, 0x50
mov eax, 1
call sym._create_screen_buffer.constprop.0
mov dword [0x413088], eax
test eax, eax
je 0x40eafb
mov dword [ebp - 0x174], 0
mov dword [esp], 0x413080
call sym._init_window
test eax, eax
je 0x40eafb
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 0x40ed8a
movzx eax, word [ebp - 0x110]
mov dword [esp + 4], eax
mov eax, dword [0x41312c]
mov dword [esp], eax
call dword [sym.imp.user32.dll_ShowWindow]
sub esp, 8
jmp 0x40e8db
mov dword [ebp - 0x17c], 0
cmp dword [0x414234], 0xfff
mov eax, dword [0x414230]
jbe 0x40f29b
test eax, eax
je 0x40e986
mov eax, dword [0x413080]
mov edx, dword [ebp - 0x174]
mov dword [ebp - 0x14c], eax
mov eax, 1
test edx, edx
je 0x40edf6
mov eax, dword [ebp - 0x17c]
mov dword [ebp - 0x148], eax
mov eax, 2
mov edx, dword [0x413130]
mov dword [ebp - 0x170], eax
mov ecx, eax
test edx, edx
je 0x40ee16
inc ecx
mov dword [ebp + eax*4 - 0x14c], edx
mov dword [ebp - 0x170], ecx
mov eax, dword [0x41312c]
test eax, eax
je 0x40eea8
lea eax, [ebp - 0x14c]
mov dword [esp + 0x10], 0x1cff
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x170]
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 - 0x170], eax
je 0x40f240
test eax, eax
je 0x40ef70
cmp eax, 1
je 0x40eed6
xor ebx, ebx
test byte [0x413024], 8
je 0x40e98b
mov dword [esp + 0xc], str.wait_failed__quit_n
mov dword [esp + 8], str.main_loop
mov dword [esp + 4], 0x413024
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x40e98b
lea eax, [ebp - 0x14c]
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x170]
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WaitForMultipleObjects]
sub esp, 0x10
jmp 0x40ee57
mov edx, dword [ebp - 0x154]
movzx eax, byte [0x413024]
test edx, edx
jne 0x40f7ea
cmp dword [ebp - 0x150], 2
jne 0x40f7ea
test al, 1
jne 0x40f2c8
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 - 0x17c]
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 0x40ee16
cmp eax, 0x103
je 0x40ee16
jmp 0x40e986
mov dword [esp], 0x414160
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
lea eax, [ebp - 0x140]
mov edi, dword [0x414230]
mov dword [ebp - 0x160], 0
mov dword [ebp - 0x164], 0
sub esp, 4
mov dword [ebp - 0x16c], eax
mov ebx, edi
mov edx, ebx
mov ebx, dword [0x414234]
mov ecx, dword [0x41309c]
xor eax, eax
lea edi, [ebp - 0x13c]
test ecx, ecx
mov ecx, 0xf
setne al
mov esi, eax
xor eax, eax
rep stosd dword es:[edi], eax
mov eax, dword [0x413080]
mov dword [0x4130a4], esi
mov dword [ebp - 0xd0], str.get_next_console_request
mov dword [ebp - 0x134], eax
mov eax, dword [ebp - 0x164]
mov dword [ebp - 0x140], 0x3b
mov dword [ebp - 0x128], eax
mov eax, dword [ebp - 0x160]
mov dword [ebp - 0x100], 0
mov dword [ebp - 0x130], esi
test eax, eax
je 0x40f035
mov dword [ebp - 0xf8], edx
mov dword [ebp - 0x100], 1
mov dword [ebp - 0xf4], eax
mov dword [ebp - 0x13c], eax
mov eax, dword [ebp - 0x16c]
mov dword [ebp - 0x138], ebx
mov dword [ebp - 0xfc], edx
mov dword [esp], eax
call dword [sym.imp.ntdll.dll_wine_server_call]
mov ecx, dword [ebp - 0x130]
mov esi, dword [ebp - 0x138]
mov ebx, dword [ebp - 0x134]
mov edi, dword [ebp - 0x13c]
mov dword [ebp - 0x160], ecx
cmp eax, 0x103
je 0x40f14f
cmp eax, 0x80000005
jne 0x40f164
mov ebx, dword [0x414234]
mov edx, dword [0x414230]
cmp ecx, ebx
ja 0x40f0b0
test edx, edx
je 0x40f73f
mov dword [ebp - 0x164], 0
jmp 0x40efb0
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 0x40f73f
mov dword [0x414230], eax
mov ebx, esi
mov dword [0x414234], esi
mov dword [ebp - 0x164], 0
jmp 0x40efb0
test byte [0x413024], 2
je 0x40eafb
mov dword [esp + 0xc], str.no_server_handle_n
mov ebx, 1
mov dword [esp + 8], str.wmain
mov dword [esp + 4], 0x413024
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x40eb00
test eax, eax
je 0x40f2fc
mov ecx, dword [0x41308c]
test ecx, ecx
je 0x40e86b
mov dword [0x414148], 7
mov dword [0x41414c], 1
jmp 0x40e8db
mov dword [esp], 0x414160
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
sub esp, 4
jmp 0x40ee16
test eax, eax
jne 0x40f732
cmp esi, 0x500168
je 0x40f408
test ebx, ebx
jne 0x40f444
mov ebx, dword [0x414230]
mov dword [ebp - 0x164], ebx
cmp esi, 0x504044
ja 0x40f3a8
cmp esi, 0x504027
ja 0x40f370
cmp esi, 0x500054
je 0x4109cb
jbe 0x40f30b
cmp esi, 0x500058
je 0x4118c5
cmp esi, 0x504000
jne case.0x40f37b.5259305
test byte [0x413024], 8
jne 0x41160c
cmp dword [ebp - 0x160], 4
mov edx, dword [0x414234]
mov eax, ebx
jne 0x4113c5
test edi, edi
jne 0x4113c5
cmp edx, 3
jbe 0x4115dd
test ebx, ebx
je 0x40f946
mov edx, dword [0x413084]
mov dword [eax], edx
mov dword [ebp - 0x160], 4
mov dword [ebp - 0x164], 0
mov esi, dword [ebp - 0x160]
mov dword [ebp - 0x160], esi
jmp 0x40efa8
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 0x40ee16
cmp dword [ebp - 0x13c], 0x12
je 0x40f74d
mov dword [esp], edi
call esi
sub esp, 4
jmp 0x40f254
mov dword [esp + 4], 0x1000
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_realloc]
test eax, eax
je 0x40e986
mov dword [0x414230], eax
mov dword [0x414234], 0x1000
jmp 0x40edcb
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], 0x413024
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
jmp 0x40ef00
mov dword [0x413094], 1
jmp 0x40e8db
cmp esi, 0x500008
je 0x4118b3
cmp esi, 0x500050
jne case.0x40f37b.5259305
or dword [ebp - 0x160], edi
jne 0x4113c5
cmp dword [0x41308c], 0
je 0x40f58a
cmp dword [0x413138], 0
je 0x40f355
mov ecx, 1
mov edx, 0x415191
mov eax, 0x413080
call sym._tty_write.part.0
mov eax, 0x413080
call sym._tty_sync
mov ebx, dword [0x414230]
jmp 0x40f21b
lea eax, [esi - 0x504028]
cmp eax, 0x1c
ja case.0x40f37b.5259305
jmp dword [eax*4 + 0x41562c]
mov dword [ebp - 0x164], 0xc0000008
test byte [0x413024], 4
jne 0x41094d
mov dword [ebp - 0x160], 0
jmp 0x40efa8
cmp esi, 0x508034
je 0x410980
jbe 0x40f548
cmp esi, 0x508040
je 0x40f896
cmp esi, 0x508048
jne case.0x40f37b.5259305
mov eax, edi
mov esi, dword [ebp - 0x160]
and eax, 1
or esi, eax
jne 0x4113c5
mov edx, edi
mov eax, ebx
call sym._set_console_title.constprop.0
mov dword [ebp - 0x164], eax
mov edi, dword [ebp - 0x164]
mov ebx, dword [0x414230]
test edi, edi
jne 0x40f399
jmp 0x40f22b
test byte [0x413024], 8
jne 0x40f770
mov eax, dword [0x413088]
mov dword [0x413090], 0
test eax, eax
je 0x40f754
mov ecx, dword [eax + 0x10]
mov edx, dword [eax + 0xc]
mov eax, ebx
call sym._create_screen_buffer.constprop.0
mov ebx, dword [0x414230]
jmp 0x40f21b
mov edx, dword [0x4142e4]
test edx, edx
je 0x40f5e8
mov dword [ebp - 0x178], esi
mov esi, edx
jmp 0x40f46d
mov eax, dword [esi + 4]
cmovns eax, dword [esi + 8]
mov esi, eax
test eax, eax
je 0x40f5e8
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [0x4142e0]
test eax, eax
jne 0x40f45c
mov dword [ebp - 0x164], eax
mov ebx, dword [0x414230]
mov eax, esi
mov dword [ebp - 0x168], esi
mov esi, dword [ebp - 0x178]
sub eax, 0x94
mov dword [ebp - 0x180], ebx
mov dword [ebp - 0x178], eax
cmp esi, 0x508098
ja case.0x40f6e1.5275769
cmp esi, 0x508077
ja 0x40f6d6
cmp esi, 0x504080
je 0x410c1a
ja 0x40f650
cmp esi, 0x50016c
je 0x411644
cmp esi, 0x504000
jne 0x40f61a
test byte [0x413024], 8
jne 0x40f901
cmp dword [ebp - 0x160], 4
mov edx, dword [0x414234]
mov eax, ebx
jne 0x4113c5
test edi, edi
jne 0x4113c5
cmp edx, 3
jbe 0x40f8d6
test ebx, ebx
je 0x40f946
mov ecx, dword [ebp - 0x168]
mov edx, dword [ecx - 0x8c]
mov dword [eax], edx
mov dword [ebp - 0x160], 4
jmp 0x40f21b
cmp esi, 0x504060
je 0x410a6d
cmp esi, 0x508004
jne case.0x40f37b.5259305
cmp edi, 4
jne 0x4113c5
cmp dword [ebp - 0x160], 0
jne 0x4113c5
mov eax, dword [ebx]
mov dword [0x413084], eax
test byte [0x413024], 8
jne 0x410a54
mov dword [ebp - 0x160], 0
jmp 0x40f21b
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x413080
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 [0x413130], eax
sub esp, 0x18
test eax, eax
je 0x40eafb
jmp 0x40e8db
test byte [0x413024], 2
jne 0x40f79d
mov edx, dword [0x414230]
mov ebx, dword [0x414234]
mov dword [ebp - 0x160], 0
mov dword [ebp - 0x164], 0xc0000008
jmp 0x40efb0
cmp esi, 0x500008
jne case.0x40f6e1.5275769
mov eax, dword [ebp - 0x168]
mov eax, dword [eax - 0x94]
cmp dword [eax + 0xc], 0
jne 0x40f21b
mov dword [ebp - 0x164], 0xc00000bb
jmp 0x40f399
cmp esi, 0x504088
je 0x410d33
cmp esi, 0x508004
jne case.0x40f6e1.5275769
cmp dword [ebp - 0x160], 0
jne 0x4113c5
cmp edi, 4
jne 0x4113c5
mov eax, dword [ebx]
mov ecx, dword [ebp - 0x168]
mov dword [ecx - 0x8c], eax
test byte [0x413024], 8
je 0x40f58a
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], 0x413024
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
mov dword [ebp - 0x160], 0
mov ebx, dword [0x414230]
jmp 0x40f21b
lea eax, [esi - 0x508078]
cmp eax, 0x20
ja case.0x40f6e1.5275769
jmp dword [eax*4 + 0x4156a0]
mov dword [ebp - 0x164], 0xc0000008
test byte [0x413024], 4
je 0x40f399
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], 0x413024
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
mov ebx, dword [0x414230]
jmp 0x40f399
test byte [0x413024], 8
jne 0x40f955
mov dword [esp], 0x414160
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
push ebx
xor ebx, ebx
jmp 0x40e98b
mov eax, ebx
mov ecx, 0x96
mov edx, 0x50
call sym._create_screen_buffer.constprop.0
mov ebx, dword [0x414230]
jmp 0x40f21b
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], 0x413024
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x40f415
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], 0x413024
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
mov edx, dword [0x414230]
mov dword [ebp - 0x160], 0
mov dword [ebp - 0x164], 0xc0000008
mov ebx, dword [0x414234]
jmp 0x40efb0
xor ebx, ebx
test al, 8
je 0x40e98b
mov dword [esp + 0xc], str.signaled_quit_n
mov dword [esp + 8], str.main_loop
mov dword [esp + 4], 0x413024
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x40e98b
test byte [0x413024], 1
je 0x40eafb
mov ebx, dword [edi]
test ebx, ebx
je 0x4116cb
mov eax, ebx
shr eax, 0x10
je 0x4116b3
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
push edx
push edx
test eax, eax
jne 0x4116a0
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], 0x413024
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
jmp 0x40eb00
test byte [0x413024], 8
jne 0x40f9e5
cmp edi, 0x10
jne 0x40f9d0
cmp dword [ebp - 0x160], 0
jne 0x40f9d0
mov eax, dword [ebx]
test al, 1
jne 0x40f9b0
test al, 2
jne 0x40f982
mov ebx, dword [0x414230]
jmp 0x40f58a
mov dword [esp + 4], 4
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
test eax, eax
je 0x40f940
mov dword [0x414230], eax
mov ebx, eax
mov dword [0x414234], 4
jmp 0x40f526
mov eax, dword [ebp - 0x168]
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], 0x413024
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
mov ebx, dword [0x414230]
jmp 0x40f4f8
mov ebx, dword [0x414230]
mov dword [ebp - 0x164], 0xc0000017
jmp 0x40f399
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], 0x413024
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x40f73f
mov eax, dword [ebx + 8]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsValidCodePage]
push esi
test eax, eax
je 0x40f9d0
mov dword [ebp - 0x160], 0
mov eax, dword [ebx + 8]
mov ebx, dword [0x414230]
mov dword [0x413128], eax
jmp 0x40f21b
mov eax, dword [ebx + 4]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsValidCodePage]
push edi
test eax, eax
je 0x40f9d0
mov eax, dword [ebx + 4]
mov dword [0x413124], eax
mov eax, dword [ebx]
jmp 0x40f8c3
mov dword [ebp - 0x164], 0xc000000d
mov ebx, dword [0x414230]
jmp 0x40f399
mov dword [esp + 0xc], str.set_info_n
mov dword [esp + 8], str.console_input_ioctl
mov dword [esp + 4], 0x413024
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x40f8a3
cmp dword [ebp - 0x160], 4
jne 0x4113c5
cmp edi, 0x18
jne 0x4113c5
test byte [0x413024], 8
jne 0x40fbf6
mov ecx, dword [ebp - 0x168]
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 0x40fb04
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 0x40fa7c
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 0x40fbdf
cmp eax, 2
je 0x40fbc0
test eax, eax
jne 0x40f9d0
xor eax, eax
jmp 0x40fab7
movzx edx, word [ebx + 0x14]
mov word [esi + eax*4], dx
inc eax
cmp edi, eax
jne 0x40faae
test edi, edi
je 0x40fad6
mov eax, dword [ebp - 0x168]
mov ecx, dword [ebp - 0x178]
mov eax, dword [eax - 0x94]
cmp ecx, dword [eax + 8]
je 0x40fb19
mov ebx, dword [0x414230]
cmp dword [0x414234], 3
mov eax, ebx
jbe 0x40fb91
test ebx, ebx
je 0x40f946
mov dword [eax], edi
mov dword [ebp - 0x160], 4
jmp 0x40f21b
mov dword [ebp - 0x160], 4
mov ebx, dword [0x414230]
jmp 0x40f21b
mov eax, dword [ebp - 0x168]
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 - 0x160], ebx
mov dword [ebp - 0x164], eax
mov ebx, edx
mov eax, esi
xor edx, edx
div dword [ebp - 0x160]
mov dword [ebp - 0x138], ebx
add eax, ecx
mov dword [ebp - 0x140], edx
mov edx, dword [ebp - 0x16c]
mov dword [ebp - 0x13c], eax
mov eax, dword [ebp - 0x178]
add ecx, dword [ebp - 0x164]
mov dword [ebp - 0x134], ecx
call sym._update_output
mov eax, dword [ebp - 0x168]
mov eax, dword [eax - 0x94]
call sym._tty_sync
jmp 0x40fad6
mov dword [esp + 4], 4
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
test eax, eax
je 0x40f940
mov dword [0x414230], eax
mov ebx, eax
mov dword [0x414234], 4
jmp 0x40faf3
xor eax, eax
jmp 0x40fbd6
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 0x40fbc4
jmp 0x40fabb
xor eax, eax
jmp 0x40fbed
movzx edx, word [ebx + 0x16]
mov word [esi + eax*4 + 2], dx
inc eax
cmp edi, eax
jne 0x40fbe3
jmp 0x40fabb
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], 0x413024
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x40fa31
or dword [ebp - 0x160], edi
jne 0x4113c5
test byte [0x413024], 8
jne 0x41148d
mov esi, dword [ebp - 0x168]
mov ecx, dword [ebp - 0x178]
mov eax, dword [esi - 0x94]
mov dword [eax + 8], ecx
mov ebx, dword [esi - 0x88]
mov eax, dword [esi - 0x84]
mov dword [ebp - 0x140], 0
lea edx, [ebx - 1]
mov dword [ebp - 0x164], ebx
mov dword [ebp - 0x138], edx
dec eax
mov edx, dword [ebp - 0x16c]
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 ebx, dword [0x414230]
jmp 0x40f21b
cmp dword [ebp - 0x160], 0
jne 0x4113c5
cmp edi, 0x67
jbe 0x4113c5
test byte [0x413024], 8
jne 0x410028
mov eax, dword [ebx]
test al, 1
je 0x40fd22
movsx eax, word [ebx + 4]
lea edx, [eax - 1]
cmp dx, 0x63
ja 0x40f9d0
mov ecx, dword [ebp - 0x168]
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 0x40fd94
movsx edx, word [ebx + 8]
test dx, dx
js 0x40f9d0
mov esi, dword [ebp - 0x168]
cmp edx, dword [esi - 0x88]
jae 0x40f9d0
movsx ecx, word [ebx + 0xa]
test cx, cx
js 0x40f9d0
cmp ecx, dword [esi - 0x84]
jae 0x40f9d0
cmp edx, dword [esi - 0x78]
je 0x411766
mov esi, dword [ebp - 0x168]
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 0x41175c
mov eax, dword [ebp - 0x178]
call sym._scroll_to_cursor
mov eax, dword [ebx]
test al, 4
je 0x40fe77
mov esi, dword [ebp - 0x168]
mov eax, dword [esi - 0x94]
mov dword [eax + 0x10], 0
mov eax, dword [esi - 0x18]
movsx edx, word [ebx + 0xc]
mov dword [ebp - 0x160], eax
inc eax
sub eax, dword [esi - 0x20]
cmp edx, eax
jl 0x40f9d0
mov eax, dword [esi - 0x14]
movsx ecx, word [ebx + 0xe]
mov dword [ebp - 0x160], eax
inc eax
sub eax, dword [esi - 0x1c]
cmp ecx, eax
jl 0x40f9d0
mov eax, dword [ebp - 0x178]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._change_screen_buffer_size
mov dword [ebp - 0x164], eax
test eax, eax
jne 0x41001d
mov ecx, dword [ebp - 0x168]
movsx edx, word [ebx + 0xc]
mov eax, dword [ecx - 0x18]
cmp eax, edx
jl 0x40fe23
sub eax, dword [ecx - 0x20]
mov dword [ecx - 0x20], 0
mov dword [ecx - 0x18], eax
mov ecx, dword [ebp - 0x168]
movsx edx, word [ebx + 0xe]
mov eax, dword [ecx - 0x14]
cmp eax, edx
jl 0x40fe41
sub eax, dword [ecx - 0x1c]
mov dword [ecx - 0x1c], 0
mov dword [ecx - 0x14], eax
mov ecx, dword [ebp - 0x168]
movsx eax, word [ebx + 0xc]
cmp dword [ecx - 0x78], eax
jb 0x40fe54
dec eax
mov dword [ecx - 0x78], eax
mov ecx, dword [ebp - 0x168]
movsx eax, word [ebx + 0xe]
cmp dword [ecx - 0x74], eax
jb 0x40fe67
dec eax
mov dword [ecx - 0x74], eax
mov eax, dword [ebp - 0x178]
mov dword [esp], eax
call sym._notify_screen_buffer_size
mov eax, dword [ebx]
test al, 8
je 0x40fe8b
movzx eax, word [ebx + 0x10]
mov ecx, dword [ebp - 0x168]
mov word [ecx - 0x70], ax
mov eax, dword [ebx]
test al, 0x40
je 0x40fe9f
movzx eax, word [ebx + 0x12]
mov ecx, dword [ebp - 0x168]
mov word [ecx - 0x6e], ax
mov eax, dword [ebx]
test al, 0x10
je 0x40ff35
mov esi, dword [ebp - 0x168]
mov eax, dword [esi - 0x94]
mov dword [eax + 0x10], 0
movsx edx, word [ebx + 0x14]
test dx, dx
js 0x40f9d0
movsx eax, word [ebx + 0x18]
cmp dx, ax
jg 0x40f9d0
mov dword [ebp - 0x160], eax
cmp eax, dword [esi - 0x88]
jae 0x40f9d0
movsx eax, word [ebx + 0x16]
test ax, ax
js 0x40f9d0
movsx ecx, word [ebx + 0x1a]
cmp ax, cx
jg 0x40f9d0
cmp ecx, dword [esi - 0x84]
jae 0x40f9d0
cmp dword [esi - 0x20], edx
je 0x41005b
mov ecx, dword [ebp - 0x168]
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 0x40ff5c
mov ecx, dword [ebp - 0x168]
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 0x40ffc2
sub edi, 0x68
movsx eax, word [ebx + 0x22]
lea ecx, [ebx + 0x68]
jne 0x40ff82
mov esi, dword [ebp - 0x168]
mov ecx, dword [esi - 8]
mov esi, dword [esi - 4]
mov dword [ebp - 0x160], esi
mov edi, esi
add edi, esi
test eax, eax
jne 0x40ff8b
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 - 0x168]
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 - 0x168]
mov ecx, dword [ebp - 0x178]
mov eax, dword [eax - 0x94]
cmp ecx, dword [eax + 8]
jne 0x40f6c1
call sym._tty_sync
mov eax, dword [ebp - 0x168]
mov dword [esp + 4], 0
mov eax, dword [eax - 0x94]
mov dword [esp], eax
call sym._update_window_config
mov ebx, dword [0x414230]
mov dword [ebp - 0x160], 0
jmp 0x40f21b
mov dword [ebp - 0x164], 0xc0000017
mov ebx, dword [0x414230]
jmp 0x40f399
mov eax, dword [ebp - 0x178]
mov dword [esp + 0xc], 0x4154fd
mov dword [esp + 8], str.set_output_info
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x413024
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x40fcf3
cmp dword [esi - 0x1c], eax
jne 0x40ff15
mov eax, esi
mov esi, dword [ebp - 0x160]
cmp dword [eax - 0x18], esi
jne 0x40ff15
cmp dword [eax - 0x14], ecx
jne 0x40ff15
jmp 0x40ff33
cmp edi, 4
jne 0x4113c5
mov eax, dword [ebx]
mov esi, dword [0x41310c]
test eax, eax
cmovne esi, dword [0x413108]
mov dword [ebp - 0x178], eax
test esi, esi
je 0x41023c
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_wcslen]
mov edi, dword [ebp - 0x160]
mov ebx, dword [0x414230]
mov dword [ebp - 0x168], eax
add eax, eax
sub edi, 8
cmp eax, edi
cmovbe edi, eax
lea eax, [edi + 8]
mov dword [ebp - 0x160], eax
cmp eax, dword [0x414234]
ja 0x4101ca
mov eax, dword [0x414230]
mov dword [ebp - 0x164], eax
mov ebx, eax
test eax, eax
je 0x40f946
test byte [0x413024], 8
jne 0x41013f
mov ebx, dword [0x414230]
test edi, edi
je 0x41012c
mov eax, dword [ebp - 0x164]
mov dword [esp + 8], edi
mov dword [esp + 4], esi
add eax, 4
mov dword [esp], eax
call sym._memcpy
mov ebx, dword [0x414230]
mov eax, dword [ebp - 0x164]
mov ecx, dword [ebp - 0x168]
mov dword [eax], ecx
jmp 0x40f21b
mov eax, esi
shr eax, 0x10
je 0x410224
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
push ebx
push ebx
test eax, eax
jne 0x41021a
or edx, 0xffffffff
mov eax, esi
call sym._wine_dbgstr_wn.part.0
cmp dword [ebp - 0x178], 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], 0x413024
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x410103
mov dword [ebp - 0x168], 0
xor edi, edi
mov dword [ebp - 0x160], 8
mov eax, dword [ebp - 0x160]
mov dword [esp], ebx
mov dword [esp + 4], eax
call dword [sym.imp.ucrtbase.dll_realloc]
mov dword [ebp - 0x164], eax
test eax, eax
je 0x410013
mov dword [0x414230], eax
mov eax, dword [ebp - 0x160]
mov dword [0x414234], eax
test byte [0x413024], 8
je 0x410103
test esi, esi
jne 0x41013f
mov eax, str._null_
jmp 0x41016f
mov eax, 0x415068
jmp 0x41016f
movzx eax, si
mov dword [esp], 0x415072
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf
jmp 0x41016f
cmp dword [0x414234], 7
jbe 0x4101b4
test byte [0x413024], 8
mov dword [ebp - 0x168], 0
jne 0x4102cf
mov dword [ebp - 0x160], 8
jmp 0x41012c
test byte [0x413024], 8
jne 0x411aa5
mov edx, dword [0x414234]
mov eax, ebx
test edi, edi
jne 0x4113c5
cmp dword [ebp - 0x160], 0xc
jne 0x4113c5
cmp edx, 0xb
jbe 0x411a76
test ebx, ebx
je 0x40f946
mov edx, dword [0x413124]
mov dword [ebp - 0x160], 0xc
mov dword [eax], edx
mov edx, dword [0x413128]
mov dword [eax + 4], edx
mov edx, dword [0x41309c]
mov dword [eax + 8], edx
jmp 0x40f21b
mov dword [ebp - 0x160], 8
xor edi, edi
jmp 0x410210
cmp dword [ebp - 0x160], 0
jne 0x4113c5
cmp edi, 0x18
jne 0x4113c5
mov eax, dword [ebp - 0x168]
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 - 0x194], eax
inc eax
sub eax, ecx
mov dword [ebp - 0x180], ecx
mov dword [ebp - 0x184], eax
movsx eax, word [ebx + 6]
mov dword [ebp - 0x18c], edi
mov dword [ebp - 0x1a0], eax
inc eax
sub eax, edi
mov dword [ebp - 0x160], eax
test byte [0x413024], 8
jne 0x4108fe
xor eax, eax
mov ecx, dword [ebp - 0x168]
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 - 0x190], edx
dec edx
mov word [ebp - 0x1aa], di
cmp edx, eax
cmovbe eax, edx
mov dword [ebp - 0x1a8], eax
mov eax, dword [ecx - 0x84]
lea edx, [eax - 1]
mov dword [ebp - 0x188], eax
movsx eax, word [ebx + 0x12]
cmp edx, eax
cmovbe eax, edx
mov dword [ebp - 0x1b0], eax
cmp di, ax
jg 0x410810
movzx ecx, word [ebp - 0x1a8]
mov word [ebp - 0x19c], si
cmp si, cx
jg 0x410810
movzx esi, word [ebx]
test si, si
js 0x410810
movzx edi, word [ebx + 2]
test di, di
js 0x410810
movsx edx, word [ebx + 4]
cmp dword [ebp - 0x190], edx
jbe 0x410810
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 0x410810
mov edx, dword [ebp - 0x188]
movsx eax, cx
cmp edx, eax
jbe 0x410810
movzx esi, word [ebx + 8]
test si, si
js 0x410810
movsx edi, si
mov dword [ebp - 0x1b4], edi
cmp dword [ebp - 0x190], edi
jbe 0x410810
movsx edi, word [ebx + 0xa]
test di, di
js 0x410810
movsx ecx, di
mov dword [ebp - 0x1c8], ecx
cmp edx, ecx
jbe 0x410810
movsx edx, word [ebp - 0x19c]
mov eax, dword [ebp - 0x180]
mov ecx, dword [ebp - 0x18c]
cmp eax, edx
cmovl eax, edx
mov dword [ebp - 0x198], eax
mov word [ebp - 0x1ac], ax
movsx eax, word [ebp - 0x1aa]
cmp ecx, eax
mov dword [ebp - 0x1b8], eax
cmovge eax, ecx
mov ecx, dword [ebp - 0x194]
mov dword [ebp - 0x188], eax
mov word [ebp - 0x1ba], ax
movsx eax, word [ebp - 0x1a8]
cmp ecx, eax
mov dword [ebp - 0x1c0], eax
cmovg ecx, eax
mov eax, dword [ebp - 0x1a0]
mov dword [ebp - 0x194], ecx
movsx ecx, word [ebp - 0x1b0]
cmp eax, ecx
mov dword [ebp - 0x1c4], ecx
cmovg eax, ecx
mov ecx, dword [ebp - 0x184]
mov dword [ebp - 0x1a0], eax
mov eax, ecx
lea eax, [esi + eax - 1]
mov word [ebp - 0x1a2], ax
movzx eax, word [ebp - 0x160]
lea eax, [edi + eax - 1]
mov word [ebp - 0x1a4], ax
cmp word [ebp - 0x19c], si
jle 0x410537
mov eax, edx
sub ecx, edx
sub eax, dword [ebp - 0x1b4]
add ecx, dword [ebp - 0x1b4]
add dword [ebp - 0x180], eax
movzx esi, word [ebp - 0x19c]
mov dword [ebp - 0x184], ecx
movzx edx, word [ebp - 0x1aa]
cmp dx, di
jle 0x41056c
mov ecx, dword [ebp - 0x1b8]
mov edi, dword [ebp - 0x1c8]
mov eax, ecx
sub eax, edi
add dword [ebp - 0x18c], eax
mov eax, dword [ebp - 0x160]
sub eax, ecx
add eax, edi
movsx edi, dx
mov dword [ebp - 0x160], eax
movzx eax, word [ebp - 0x1a2]
cmp word [ebp - 0x1a8], ax
jge 0x41058d
movsx edx, ax
mov eax, dword [ebp - 0x1c0]
sub eax, edx
add dword [ebp - 0x184], eax
movzx eax, word [ebp - 0x1a4]
cmp word [ebp - 0x1b0], ax
jge 0x4105ae
movsx edx, ax
mov eax, dword [ebp - 0x1c4]
sub eax, edx
add dword [ebp - 0x160], eax
cmp dword [ebp - 0x184], 0
jle 0x410699
cmp dword [ebp - 0x160], 0
jle 0x410699
mov eax, dword [ebp - 0x168]
mov ecx, dword [eax - 0x64]
movsx eax, si
mov dword [ebp - 0x1a8], eax
mov eax, dword [ebp - 0x18c]
mov dword [ebp - 0x19c], ecx
mov ecx, dword [ebp - 0x184]
shl ecx, 2
mov dword [ebp - 0x184], ecx
movsx ecx, di
mov edx, ecx
cmp ecx, eax
jle 0x410855
mov ecx, dword [ebp - 0x160]
mov edx, dword [ebp - 0x190]
mov word [ebp - 0x18c], di
mov dword [ebp - 0x190], ebx
lea eax, [eax + ecx - 1]
mov ecx, dword [ebp - 0x19c]
imul eax, edx
add eax, dword [ebp - 0x180]
lea ecx, [ecx + eax*4]
lea eax, [edi - 1]
mov edi, esi
cwde
add eax, dword [ebp - 0x160]
mov esi, ecx
imul eax, edx
mov edx, dword [ebp - 0x19c]
add eax, dword [ebp - 0x1a8]
lea edx, [edx + eax*4]
mov ebx, edx
mov eax, dword [ebp - 0x184]
mov dword [esp + 4], esi
mov dword [esp], ebx
mov dword [esp + 8], eax
call sym._memcpy
mov eax, dword [ebp - 0x168]
mov eax, dword [eax - 0x88]
mov dword [ebp - 0x180], eax
shl eax, 2
sub ebx, eax
sub esi, eax
dec dword [ebp - 0x160]
jne 0x410653
mov esi, edi
mov ebx, dword [ebp - 0x190]
movsx edi, word [ebp - 0x18c]
mov ecx, dword [ebp - 0x1a0]
cmp dword [ebp - 0x188], ecx
jg 0x41078d
movsx eax, word [ebp - 0x1a2]
mov ecx, dword [ebp - 0x198]
inc eax
cmp eax, ecx
mov edx, eax
movsx eax, di
cmovl edx, ecx
mov dword [ebp - 0x18c], eax
mov eax, dword [ebp - 0x1a0]
cmp cx, si
mov dword [ebp - 0x160], edx
cmovl edx, ecx
inc eax
mov dword [ebp - 0x180], eax
lea eax, [esi - 1]
cwde
mov dword [ebp - 0x184], edx
mov dword [ebp - 0x190], eax
mov ecx, dword [ebp - 0x188]
mov eax, dword [ebp - 0x18c]
cmp ecx, eax
jl 0x410828
movsx eax, word [ebp - 0x1a4]
cmp eax, ecx
jl 0x410828
cmp word [ebp - 0x1ac], si
jl 0x410839
mov edx, dword [ebp - 0x194]
mov eax, dword [ebp - 0x160]
je 0x410839
cmp edx, eax
jl 0x410775
mov word [ebp - 0x19c], si
mov dword [ebp - 0x1a8], edx
mov esi, dword [ebp - 0x168]
mov edx, dword [ebp - 0x188]
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 - 0x1a8]
jle 0x410745
movzx esi, word [ebp - 0x19c]
inc dword [ebp - 0x188]
mov eax, dword [ebp - 0x188]
cmp eax, dword [ebp - 0x180]
jne 0x4106f2
mov eax, dword [ebp - 0x198]
mov ecx, dword [ebp - 0x194]
mov edx, dword [ebp - 0x16c]
cmp ax, si
cmovg eax, esi
cwde
mov dword [ebp - 0x140], eax
movzx eax, word [ebp - 0x1a2]
cmp cx, ax
cmovge eax, ecx
mov ecx, dword [ebp - 0x1a0]
cwde
mov dword [ebp - 0x138], eax
movsx eax, word [ebp - 0x1ba]
cmp ax, di
cmovg eax, edi
mov dword [ebp - 0x13c], eax
movzx eax, word [ebp - 0x1a4]
cmp cx, ax
cmovge eax, ecx
xor esi, esi
cwde
mov dword [ebp - 0x134], eax
mov eax, dword [ebp - 0x178]
call sym._update_output
mov eax, dword [ebp - 0x168]
mov eax, dword [eax - 0x94]
call sym._tty_sync
jmp 0x40f3f0
mov dword [ebp - 0x164], 0xc000000d
xor esi, esi
jmp 0x40f3f0
mov edx, dword [ebp - 0x194]
mov eax, dword [ebp - 0x198]
jmp 0x410734
mov eax, dword [ebp - 0x190]
mov edx, dword [ebp - 0x194]
cmp eax, edx
cmovle edx, eax
mov eax, dword [ebp - 0x184]
jmp 0x410734
mov ecx, dword [ebp - 0x19c]
imul edx, dword [ebp - 0x190]
mov eax, dword [ebp - 0x18c]
imul eax, dword [ebp - 0x190]
mov word [ebp - 0x190], di
mov edi, esi
add eax, dword [ebp - 0x180]
mov dword [ebp - 0x180], 0
lea ecx, [ecx + eax*4]
mov eax, dword [ebp - 0x1a8]
mov esi, ecx
add eax, edx
mov edx, dword [ebp - 0x19c]
mov dword [ebp - 0x19c], ebx
lea edx, [edx + eax*4]
mov ebx, edx
mov eax, dword [ebp - 0x184]
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 - 0x168]
inc dword [ebp - 0x180]
mov eax, dword [eax - 0x88]
mov dword [ebp - 0x18c], eax
shl eax, 2
add ebx, eax
add esi, eax
mov eax, dword [ebp - 0x180]
cmp dword [ebp - 0x160], eax
jg 0x4108a6
mov esi, edi
mov ebx, dword [ebp - 0x19c]
movsx edi, word [ebp - 0x190]
jmp 0x410699
mov dword [esp + 0x24], eax
mov eax, dword [ebp - 0x184]
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], 0x413024
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x41034f
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], 0x413024
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
mov ebx, dword [0x414230]
jmp 0x40f399
mov ecx, 0x14
mov eax, edi
xor edx, edx
mov esi, dword [ebp - 0x160]
div ecx
mov ecx, eax
or esi, edx
jne 0x4113c5
test byte [0x413024], 8
jne 0x4109ef
cmp edi, 0x13
jbe 0x40f8cb
mov dword [esp], 1
mov edx, ebx
mov eax, 0x413080
call sym._write_console_input.part.0
mov dword [ebp - 0x164], eax
jmp 0x40f3f0
or dword [ebp - 0x160], edi
jne 0x4113c5
test byte [0x413024], 8
jne 0x410a28
mov dword [0x41309c], 0
jmp 0x40f21b
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x415252
mov dword [esp + 8], str.write_console_input
mov dword [esp + 4], 0x413024
mov dword [esp], 3
mov dword [ebp - 0x160], eax
call sym._wine_dbg_log.constprop.0
mov ecx, dword [ebp - 0x160]
jmp 0x4109a4
mov dword [esp + 0xc], str.flush_n
mov dword [esp + 8], str.console_input_ioctl
mov dword [esp + 4], 0x413024
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
mov ebx, dword [0x414230]
jmp 0x4109e0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.set__x_mode_n
mov dword [esp + 8], str.console_input_ioctl
jmp 0x40f6ad
cmp edi, 3
jbe 0x4113c5
mov eax, dword [ebp - 0x160]
cmp eax, 3
jbe 0x4113c5
or eax, edi
and eax, 1
mov esi, eax
jne 0x4113c5
cmp dword [0x413134], 0
je 0x410aa4
cmp dword [0x413130], 0
je 0x410ad3
mov eax, dword [ebx]
mov edx, dword [ebp - 0x160]
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 - 0x164], eax
jmp 0x40f3f0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x413080
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 [0x413130], eax
sub esp, 0x18
jmp 0x410aa4
mov eax, dword [ebp - 0x168]
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 + 0xa8]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_MultiByteToWideChar]
mov dword [ebp - 0x164], eax
call eax
sub esp, 0x18
mov esi, eax
test eax, eax
je 0x40fb0e
add eax, eax
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
test eax, eax
je 0x410013
mov dword [esp + 0x10], eax
mov dword [ebp - 0x180], eax
mov eax, dword [ebp - 0x168]
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 + 0xa8]
mov dword [esp], eax
mov eax, dword [ebp - 0x164]
call eax
mov edx, dword [ebp - 0x180]
mov eax, dword [ebp - 0x178]
mov ecx, esi
sub esp, 0x18
mov dword [ebp - 0x168], edx
call sym._write_console
mov edx, dword [ebp - 0x168]
mov dword [ebp - 0x164], eax
mov dword [esp], edx
call dword [sym.imp.ucrtbase.dll_free]
mov esi, dword [ebp - 0x160]
jmp 0x40f3f0
mov eax, edi
mov esi, dword [ebp - 0x160]
and eax, 1
or esi, eax
jne 0x4113c5
mov eax, dword [ebp - 0x178]
mov ecx, edi
mov edx, ebx
shr ecx, 1
call sym._write_console
mov dword [ebp - 0x164], eax
jmp 0x40f3f0
cmp edi, 0x10
jne 0x4113c5
mov eax, dword [ebp - 0x168]
mov eax, dword [eax - 0x94]
mov dword [eax + 0x10], 0
mov eax, dword [ebx]
mov edx, dword [ebx + 8]
mov dword [ebp - 0x178], eax
mov eax, dword [ebx + 4]
mov dword [ebp - 0x180], eax
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x164], eax
test byte [0x413024], 8
jne 0x411171
mov eax, dword [0x414234]
mov ecx, ebx
mov dword [ebp - 0x184], eax
cmp edx, 1
je 0x4110d8
cmp edx, 2
je 0x410fa6
mov dword [ebp - 0x164], 0xc000000d
test edx, edx
jne 0x40f399
mov edi, dword [ebp - 0x168]
mov eax, dword [edi - 0x88]
cmp dword [ebp - 0x178], eax
jae 0x40f58a
mov esi, dword [edi - 0x84]
mov dword [ebp - 0x164], esi
cmp dword [ebp - 0x180], esi
jae 0x40f58a
mov esi, dword [ebp - 0x180]
mov edi, dword [edi - 0x64]
imul esi, eax
add esi, dword [ebp - 0x178]
mov dword [ebp - 0x168], edi
imul eax, dword [ebp - 0x164]
lea edi, [esi*4]
mov esi, dword [ebp - 0x160]
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 - 0x160], eax
cmp eax, dword [ebp - 0x184]
ja 0x410f6c
test ebx, ebx
je 0x40f946
add edi, dword [ebp - 0x168]
jmp 0x410d2a
movzx eax, word [edi + edx*4]
mov word [ecx + edx*2], ax
inc edx
cmp esi, edx
jne 0x410d21
jmp 0x40f21b
mov ecx, dword [ebp - 0x160]
mov edx, dword [0x414234]
cmp ecx, 0x63
jbe 0x4113c5
test edi, edi
jne 0x4113c5
mov eax, dword [ebp - 0x168]
mov eax, dword [eax - 4]
add eax, 0x32
add eax, eax
cmp ecx, eax
cmovbe eax, ecx
mov dword [ebp - 0x160], eax
cmp eax, edx
ja 0x411729
test ebx, ebx
je 0x40f946
mov ecx, dword [ebp - 0x168]
mov esi, dword [ebp - 0x180]
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 - 0x164], 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 - 0x160], 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 0x4116f9
test byte [0x413024], 8
je 0x40fb0e
mov eax, dword [ebp - 0x180]
lea ebx, [eax + 0x64]
mov eax, ebx
shr eax, 0x10
je 0x4116df
mov eax, dword [ebp - 0x160]
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 0x4116d5
mov eax, ebx
mov edx, esi
call sym._wine_dbgstr_wn.part.0
mov ebx, eax
mov ecx, dword [ebp - 0x180]
movsx edx, word [ecx + 0x1e]
movsx edi, word [ecx + 0x1c]
movsx esi, word [ecx + 0xe]
movsx ecx, word [ecx + 0xc]
mov dword [ebp - 0x184], edx
mov edx, dword [ebp - 0x168]
mov dword [ebp - 0x164], 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 - 0x164]
mov edx, dword [ebp - 0x184]
mov dword [esp + 0x40], ebx
mov dword [esp + 0x38], edi
mov dword [esp + 0x30], ecx
mov ecx, dword [ebp - 0x180]
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 - 0x178]
mov dword [esp + 8], str.get_output_info
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x413024
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
mov ebx, dword [0x414230]
jmp 0x40f21b
mov dword [ebp - 0x164], edx
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
mov ecx, eax
test eax, eax
je 0x410013
mov dword [0x414230], eax
mov eax, dword [ebp - 0x160]
mov ebx, ecx
mov edx, dword [ebp - 0x164]
mov dword [0x414234], eax
jmp 0x410d19
mov eax, dword [ebp - 0x160]
cmp eax, 7
jbe 0x4113c5
mov edx, dword [ebp - 0x164]
test edx, edx
je 0x4113c5
mov esi, dword [ebp - 0x168]
mov edi, dword [esi - 0x88]
cmp dword [ebp - 0x178], edi
jae 0x4113c5
mov esi, dword [esi - 0x84]
cmp dword [ebp - 0x180], esi
jae 0x4113c5
shl edx, 2
sub eax, 8
sub esi, dword [ebp - 0x180]
mov dword [ebp - 0x160], edx
xor edx, edx
div dword [ebp - 0x160]
mov edx, esi
cmp eax, esi
mov esi, dword [ebp - 0x164]
cmovbe edx, eax
sub edi, dword [ebp - 0x178]
cmp edi, esi
cmova edi, esi
mov eax, edi
imul eax, edx
lea eax, [eax*4 + 8]
mov dword [ebp - 0x160], eax
cmp eax, dword [ebp - 0x184]
ja 0x4111c8
test ebx, ebx
je 0x40f946
movzx eax, word [ebp - 0x178]
mov esi, edi
mov ebx, dword [ebp - 0x180]
shl esi, 2
mov word [ecx], ax
mov eax, edi
movzx edi, word [ebp - 0x178]
mov word [ecx + 2], bx
lea eax, [edi + eax - 1]
mov edi, ebx
mov dword [ebp - 0x164], 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 - 0x178]
mov dword [ebp - 0x180], eax
jmp 0x4110cb
mov ecx, dword [ebp - 0x168]
mov eax, dword [ecx - 0x88]
mov edx, dword [ecx - 0x64]
mov dword [esp], ebx
mov ecx, dword [ebp - 0x164]
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 - 0x164]
cmp dword [ebp - 0x180], esi
jne 0x411097
jmp 0x40fb0e
mov edi, dword [ebp - 0x168]
mov eax, dword [edi - 0x88]
cmp dword [ebp - 0x178], eax
jae 0x40f58a
mov edx, dword [edi - 0x84]
cmp dword [ebp - 0x180], edx
jae 0x40f58a
mov esi, dword [edi - 0x64]
mov dword [ebp - 0x164], esi
mov esi, dword [ebp - 0x180]
imul esi, eax
add esi, dword [ebp - 0x178]
imul eax, edx
shl esi, 2
mov edx, dword [ebp - 0x160]
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 - 0x160], eax
cmp eax, dword [ebp - 0x184]
ja 0x4111fd
test ebx, ebx
je 0x40f946
xor eax, eax
add esi, dword [ebp - 0x164]
jmp 0x411168
movzx edx, word [esi + eax*4 + 2]
mov word [ecx + eax*2], dx
inc eax
cmp edi, eax
jne 0x41115e
jmp 0x40f21b
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x180]
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x178]
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], 0x413024
mov dword [esp], 3
mov dword [ebp - 0x184], edx
call sym._wine_dbg_log.constprop.0
mov ebx, dword [0x414230]
mov edx, dword [ebp - 0x184]
jmp 0x410c60
mov dword [ebp - 0x164], 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 0x410013
mov dword [0x414230], eax
mov edx, dword [ebp - 0x164]
mov dword [0x414234], esi
jmp 0x411045
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
mov ecx, eax
test eax, eax
je 0x410013
mov dword [0x414230], eax
mov eax, dword [ebp - 0x160]
mov ebx, ecx
mov dword [0x414234], eax
jmp 0x411154
mov ecx, dword [ebp - 0x160]
lea eax, [ecx - 4]
and eax, 0xfffffffb
jne 0x4113c5
cmp edi, 0xf
jbe 0x4113c5
mov eax, dword [ebp - 0x168]
mov eax, dword [eax - 0x94]
mov dword [eax + 0x10], 0
cmp ecx, 8
je 0x4113bb
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 - 0x190], ecx
mov dword [ebp - 0x164], eax
test byte [0x413024], 8
jne 0x4113d4
mov eax, dword [ebp - 0x168]
mov eax, dword [eax - 0x88]
cmp dword [ebx], eax
jae 0x40f8cb
lea esi, [ebx + 0x10]
xor edi, edi
cmp dword [ebp - 0x164], edi
je 0x41136a
mov edx, dword [ebx + 0xc]
mov eax, dword [ebx]
mov ecx, dword [ebp - 0x168]
mov dword [ebp - 0x184], edx
mov edx, dword [ebx + 4]
mov dword [ebp - 0x18c], eax
mov eax, dword [ecx - 0x88]
mov dword [ebp - 0x194], edx
mov ecx, edx
mov edx, dword [ebp - 0x184]
mov dword [ebp - 0x188], eax
test edx, edx
je 0x411352
mov eax, edi
xor edx, edx
div dword [ebp - 0x184]
add edx, dword [ebp - 0x18c]
cmp edx, dword [ebp - 0x188]
jae 0x411346
add eax, ecx
mov ecx, dword [ebp - 0x168]
cmp dword [ecx - 0x84], eax
jbe 0x41136a
imul eax, dword [ebp - 0x188]
add eax, edx
mov edx, dword [ecx - 0x64]
lea eax, [edx + eax*4]
mov edx, dword [ebx + 8]
cmp edx, 1
je 0x41177d
cmp edx, 2
je 0x411774
test edx, edx
jne 0x40f9d0
movzx edx, word [esi]
mov word [eax], dx
inc edi
add esi, dword [ebp - 0x190]
jmp 0x4112a8
mov eax, dword [ebp - 0x18c]
xor edx, edx
add eax, edi
div dword [ebp - 0x188]
add eax, dword [ebp - 0x194]
jmp 0x411306
test edi, edi
je 0x411389
mov eax, dword [ebp - 0x168]
mov ecx, dword [ebp - 0x178]
mov eax, dword [eax - 0x94]
cmp ecx, dword [eax + 8]
je 0x41140e
mov ebx, dword [0x414230]
cmp dword [ebp - 0x160], 8
mov eax, dword [0x414234]
mov ecx, ebx
je 0x4114f3
cmp eax, 3
jbe 0x4114c0
test ebx, ebx
je 0x40f946
mov dword [ecx], edi
jmp 0x40f21b
cmp dword [ebx + 0xc], 0
jne 0x411262
mov dword [ebp - 0x164], 0xc000000d
jmp 0x40f399
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], 0x413024
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x41128f
mov esi, dword [ebx]
mov dword [ebp - 0x140], esi
mov ecx, dword [ebx + 4]
mov dword [ebp - 0x13c], ecx
mov ebx, dword [ebx + 0xc]
test ebx, ebx
je 0x41155d
mov eax, dword [ebp - 0x164]
xor edx, edx
div ebx
mov edx, dword [ebp - 0x168]
add ecx, eax
mov eax, dword [edx - 0x84]
cmp ecx, eax
cmovbe eax, ecx
add ebx, esi
dec eax
mov dword [ebp - 0x134], eax
cmp dword [edx - 0x88], ebx
cmovbe ebx, dword [edx - 0x88]
lea eax, [ebx - 1]
mov dword [ebp - 0x138], eax
mov eax, dword [ebp - 0x178]
mov edx, dword [ebp - 0x16c]
call sym._update_output
mov eax, dword [ebp - 0x168]
mov eax, dword [eax - 0x94]
call sym._tty_sync
jmp 0x411389
mov eax, dword [ebp - 0x178]
mov dword [esp + 0xc], 0x4154fd
mov dword [esp + 8], str.screen_buffer_activate
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x413024
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x40fc4c
mov dword [esp + 4], 4
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
mov ecx, eax
test eax, eax
je 0x410013
mov dword [0x414230], eax
mov ebx, eax
mov dword [0x414234], 4
mov dword [ecx], edi
jmp 0x40f21b
mov edi, dword [ebp - 0x180]
mov esi, dword [edi + 0xc]
mov edx, dword [edi]
mov edi, dword [edi + 4]
cmp eax, 7
jbe 0x411595
test ebx, ebx
je 0x40f946
mov word [ecx], dx
lea eax, [esi + edx]
mov edx, dword [ebp - 0x168]
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 - 0x164]
div esi
mov edx, dword [ebp - 0x168]
add edi, eax
mov eax, dword [edx - 0x84]
cmp edi, eax
cmova edi, eax
lea eax, [edi - 1]
mov word [ecx + 6], ax
jmp 0x40f21b
mov eax, dword [ebp - 0x168]
lea ebx, [edi + esi - 1]
xor edx, edx
mov esi, dword [eax - 0x88]
mov eax, ebx
div esi
add eax, ecx
mov dword [ebp - 0x134], eax
cmp ecx, eax
je 0x4115d2
mov dword [ebp - 0x140], 0
dec esi
mov dword [ebp - 0x138], esi
jmp 0x411466
mov dword [ebp - 0x178], edx
mov dword [esp + 4], 8
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
mov edx, dword [ebp - 0x178]
test eax, eax
mov ecx, eax
je 0x40f940
mov dword [0x414230], eax
mov ebx, eax
mov dword [0x414234], 8
jmp 0x411512
mov dword [ebp - 0x138], ebx
jmp 0x411466
mov dword [esp + 4], 4
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
test eax, eax
je 0x40f940
mov dword [0x414230], eax
mov ebx, eax
mov dword [0x414234], 4
jmp 0x40f209
mov eax, dword [0x413084]
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], 0x413024
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
mov ebx, dword [0x414230]
jmp 0x40f1db
or dword [ebp - 0x160], edi
jne 0x4113c5
mov eax, dword [ebp - 0x168]
mov ecx, dword [ebp - 0x178]
mov eax, dword [eax - 0x94]
cmp ecx, dword [eax + 8]
je 0x4116aa
mov esi, dword [ebp - 0x168]
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 - 0x178]
mov dword [esp], eax
call ebx
mov ebx, dword [0x414230]
jmp 0x40f21b
mov eax, 0x415068
jmp 0x40f864
mov dword [eax + 8], 0
jmp 0x411667
movzx ebx, bx
mov dword [esp], 0x415072
mov dword [esp + 4], ebx
call sym._wine_dbg_sprintf
jmp 0x40f864
mov eax, str._null_
jmp 0x40f864
mov ebx, 0x415068
jmp 0x410e8a
movzx ebx, bx
mov dword [esp], 0x415072
mov dword [esp + 4], ebx
call sym._wine_dbg_sprintf
mov ebx, eax
jmp 0x410e8a
mov esi, dword [ebp - 0x168]
mov eax, dword [ebp - 0x180]
mov ecx, dword [ebp - 0x160]
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 0x410e3c
mov dword [esp + 4], eax
mov esi, eax
mov eax, dword [ebp - 0x180]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_realloc]
mov dword [ebp - 0x180], eax
test eax, eax
je 0x410013
mov dword [0x414230], eax
mov dword [0x414234], esi
jmp 0x410d79
call sym._set_tty_cursor_relative
jmp 0x40fd87
cmp ecx, dword [esi - 0x74]
jne 0x40fd67
jmp 0x40fd94
mov edx, dword [esi]
mov dword [eax], edx
jmp 0x411346
movzx edx, word [esi]
mov word [eax + 2], dx
jmp 0x411346
cmp dword [0x413134], 0
je 0x41179f
cmp dword [0x413130], 0
je 0x4119b8
mov dword [esp], 0
xor ecx, ecx
mov eax, 0x50402c
xor esi, esi
mov dword [esp + 4], 0
mov edx, dword [ebp - 0x160]
call sym._read_console.constprop.0
mov dword [ebp - 0x164], eax
jmp 0x40f3f0
test byte [0x413024], 8
jne 0x411863
test edi, edi
jne 0x40f9d0
cmp dword [0x413134], 0
je 0x4117f8
cmp dword [0x413130], 0
je 0x411b58
imul eax, dword [0x41309c], 0x14
mov ecx, dword [ebp - 0x160]
cmp ecx, eax
cmovbe eax, ecx
mov dword [ebp - 0x160], eax
mov ecx, eax
mov eax, dword [0x414230]
mov ebx, eax
cmp ecx, dword [0x414234]
ja 0x41188c
test eax, eax
je 0x40f946
cmp dword [ebp - 0x160], 0
mov ebx, dword [0x414230]
je 0x40f21b
mov ecx, dword [ebp - 0x160]
mov edx, dword [0x413098]
mov dword [esp], eax
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
call sym._memcpy
mov ebx, dword [0x414230]
jmp 0x40f21b
mov dword [esp + 0xc], str.peek_n
mov dword [esp + 8], str.console_input_ioctl
mov dword [esp + 4], 0x413024
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x4117da
mov dword [esp + 4], ecx
mov esi, ecx
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_realloc]
test eax, eax
je 0x410013
mov dword [0x414230], eax
mov dword [0x414234], esi
jmp 0x411829
cmp dword [0x41308c], 0
jne 0x40f21b
jmp 0x40f63c
test byte [0x413024], 8
jne 0x411a47
cmp dword [ebp - 0x160], 4
mov eax, dword [0x414234]
mov esi, ebx
jne 0x4113c5
test edi, edi
jne 0x4113c5
cmp eax, 3
jbe 0x411a18
test ebx, ebx
je 0x40f946
cmp dword [0x41312c], 0
je 0x4119fa
mov eax, dword [0x41312c]
mov ebx, dword [0x414230]
mov dword [ebp - 0x160], 4
mov dword [esi], eax
jmp 0x40f21b
mov eax, dword [ebp - 0x160]
and eax, 1
or eax, edi
mov esi, eax
jne 0x4113c5
cmp dword [0x413134], 0
je 0x41194d
cmp dword [0x413130], 0
je 0x411979
mov dword [esp + 4], 0
mov edx, dword [ebp - 0x160]
xor ecx, ecx
mov eax, 0x504028
mov dword [esp], 0
call sym._read_console.constprop.0
mov dword [ebp - 0x164], eax
jmp 0x40f3f0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x413080
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 [0x413130], eax
sub esp, 0x18
jmp 0x41194d
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x413080
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 [0x413130], eax
sub esp, 0x18
jmp 0x41179f
cmp dword [0x413094], 0
jne 0x41190c
mov dword [esp], 0x413080
call sym._init_message_window
jmp 0x41190c
mov dword [esp + 4], 4
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
mov esi, eax
test eax, eax
je 0x40f940
mov dword [0x414230], eax
mov dword [0x414234], 4
jmp 0x4118ff
mov dword [esp + 0xc], str.get_window_n
mov dword [esp + 8], str.console_input_ioctl
mov dword [esp + 4], 0x413024
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
mov ebx, dword [0x414230]
jmp 0x4118d2
mov dword [esp + 4], 0xc
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
test eax, eax
je 0x40f940
mov dword [0x414230], eax
mov ebx, eax
mov dword [0x414234], 0xc
jmp 0x4102a6
mov dword [esp + 0xc], str.get_info_n
mov dword [esp + 8], str.console_input_ioctl
mov dword [esp + 4], 0x413024
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
mov ebx, dword [0x414230]
jmp 0x410278
test edi, edi
jne 0x4113c5
cmp dword [0x413134], 0
je 0x411af2
cmp dword [0x413130], 0
je 0x411b9a
cmp dword [0x41309c], 0
jne 0x411b04
cmp dword [ebp - 0x160], 0
jne 0x411b21
mov edx, dword [ebp - 0x160]
mov eax, 0x413080
xor esi, esi
call sym._read_console_input
mov dword [ebp - 0x164], eax
jmp 0x40f3f0
test byte [0x413024], 8
jne 0x411bdc
mov eax, dword [ebp - 0x160]
mov ebx, dword [0x414230]
mov dword [0x4130b4], 0x504030
mov dword [ebp - 0x164], 0x103
mov dword [0x4130b8], eax
jmp 0x40f399
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x413080
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 [0x413130], eax
sub esp, 0x18
jmp 0x4117f8
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x413080
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 [0x413130], eax
sub esp, 0x18
jmp 0x411af2
mov dword [esp + 0xc], str.pending_read_n
mov dword [esp + 8], str.console_input_ioctl
mov dword [esp + 4], 0x413024
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x411b2e