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

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x218
mov eax, dword [ecx + 4]
mov esi, dword [ecx]
mov dword [ebp - 0x174], eax
movzx eax, byte [0x413024]
mov dword [ebp - 0x170], esi
test esi, esi
jle 0x40ee08
xor esi, esi
jmp 0x40e6bd
inc esi
cmp dword [ebp - 0x170], esi
je 0x40e82f
mov edx, eax
and edx, 8
je 0x40e6b0
mov eax, dword [ebp - 0x174]
mov ebx, dword [eax + esi*4]
test ebx, ebx
je 0x40ed20
mov eax, ebx
shr eax, 0x10
je 0x40ec80
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 0x40e7ee
cmp word [ebx], 0
je 0x40ed30
lea esi, [esi]
nop
mov edx, eax
lea eax, [eax + 1]
cmp word [ebx + edx*2 + 2], 0
jne 0x40e710
mov eax, 0x224c
mov dword [ebp - 0x16c], ebx
lea ecx, [ebp - 0x146]
mov word [ebp - 0x148], ax
jmp 0x40e770
cmp ax, 9
je 0x40eb68
cmp ax, 0xa
jne 0x40eb86
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea edi, [ebp - 0x26]
lea eax, [edx - 1]
cmp ecx, edi
ja 0x40e7c0
test edx, edx
jle 0x40e7c0
mov edx, eax
add dword [ebp - 0x16c], 2
mov eax, dword [ebp - 0x16c]
movzx eax, word [eax - 2]
cmp ax, 0xd
je 0x40eb50
jbe 0x40e740
cmp ax, 0x22
je 0x40ebe0
cmp ax, 0x5c
jne 0x40eb79
mov edi, 0x5c5c
add ecx, 2
lea eax, [edx - 1]
mov word [ecx - 2], di
lea edi, [ebp - 0x26]
cmp ecx, edi
jbe 0x40e76a
lea esi, [esi]
nop
mov byte [ecx], 0x22
test eax, eax
jle 0x40ed49
mov ebx, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], bx
mov byte [eax], 0
lea eax, [ebp - 0x148]
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov edx, eax
mov dword [esp + 0x10], edx
inc esi
mov dword [esp + 0xc], 0x415307
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 - 0x170], esi
jne 0x40e6bd
test dl, dl
jne 0x40ed58
mov dword [0x413084], 0x1f7
call dword [sym.imp.kernel32.dll_GetOEMCP]
mov dword [esp + 4], 4
mov dword [0x413124], eax
mov dword [0x413120], eax
mov dword [0x413110], 0x32
mov dword [esp], 0x32
call dword [sym.imp.ucrtbase.dll_calloc]
mov dword [0x41310c], eax
test eax, eax
je 0x40ec6b
cmp dword [ebp - 0x170], 1
jle 0x40ee69
mov dword [ebp - 0x180], 0
mov ebx, 1
mov dword [ebp - 0x17c], 0
mov dword [ebp - 0x178], 0
mov dword [ebp - 0x16c], 0
jmp 0x40e902
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 0x40ebf8
mov dword [0x41308c], 1
mov dword [0x413090], 1
mov dword [ebp - 0x16c], 1
inc ebx
cmp dword [ebp - 0x170], ebx
jle 0x40e93c
mov eax, dword [ebp - 0x174]
lea esi, [ebx*4]
mov dword [esp + 4], str.__headless
lea edi, [eax + esi]
mov eax, dword [edi]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcscmp]
test eax, eax
jne 0x40e8c0
mov dword [ebp - 0x16c], 1
inc ebx
cmp dword [ebp - 0x170], ebx
jg 0x40e902
mov esi, dword [0x413080]
test esi, esi
je 0x40f255
mov ecx, dword [ebp - 0x178]
mov eax, 0x50
test ecx, ecx
cmovne eax, ecx
mov ecx, dword [ebp - 0x17c]
mov edx, eax
test ecx, ecx
mov eax, 0x96
cmovne eax, ecx
mov ecx, eax
mov eax, 1
call sym._create_screen_buffer.constprop.0
mov dword [0x413088], eax
test eax, eax
je 0x40ec6b
mov ebx, dword [ebp - 0x16c]
test ebx, ebx
je 0x40eea2
mov ebx, dword [sym.imp.kernel32.dll_GetStdHandle]
mov dword [esp], 0xfffffff6
call ebx
sub esp, 4
mov dword [0x413130], eax
mov dword [esp], 0xfffffff5
call ebx
mov ecx, dword [0x413130]
mov dword [0x413134], eax
sub esp, 4
test ecx, ecx
je 0x40f290
mov edx, dword [0x41308c]
test edx, edx
jne 0x40f2a6
test eax, eax
je 0x40e9ef
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 [0x413134]
test edi, edi
je 0x40ea20
mov ecx, 3
mov edx, 0x4153a0
mov eax, 0x413080
call sym._tty_write.part.0
mov eax, dword [0x41308c]
mov dword [0x414148], 1
test eax, eax
jne 0x40ea4b
mov esi, dword [0x413130]
test esi, esi
je 0x40ea4b
mov ebx, dword [0x41312c]
test ebx, ebx
je 0x40f6f9
mov ecx, dword [ebp - 0x180]
test ecx, ecx
je 0x40ef14
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateEventW]
mov dword [ebp - 0x188], eax
sub esp, 0x10
test eax, eax
je 0x40eaf6
lea eax, [ebp - 0x162]
mov dword [esp + 0x20], 0
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x15c]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x188]
mov dword [esp + 0x1c], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x180]
mov dword [esp + 0x18], 2
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [sym.imp.ntdll.dll_NtReadFile]
sub esp, 0x24
test eax, eax
je 0x40ef1e
cmp eax, 0x103
je 0x40ef1e
mov ebx, 1
mov edi, dword [0x41308c]
test edi, edi
je 0x40ec70
mov eax, dword [0x414144]
xor eax, 7
test al, 0xf
je 0x40eb33
mov esi, dword [0x413134]
test esi, esi
je 0x40eb33
mov ecx, 3
mov edx, 0x41510c
mov eax, 0x413080
call sym._tty_write.part.0
mov dword [0x414144], 7
mov eax, 0x413080
call sym._tty_flush
jmp 0x40ec70
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x40e760
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x40e760
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x40ed10
mov edi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + 0x416430]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [edi + 0x416430]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + 0x416430]
and edi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [edi + 0x416430]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x40e760
mov eax, 0x225c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x40e760
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 0x40eca0
inc ebx
cmp dword [ebp - 0x170], ebx
je 0x40ec6b
lea eax, [ebp - 0x160]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x174]
mov eax, dword [eax + esi + 4]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcstol]
mov dword [ebp - 0x178], eax
test eax, eax
je 0x40ecf7
cmp dword [ebp - 0x178], 0xffff
jg 0x40ec6b
mov eax, dword [ebp - 0x160]
cmp word [eax], 0
je 0x40e8f9
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 0x40e7ee
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 0x40ed88
inc ebx
cmp dword [ebp - 0x170], ebx
je 0x40ec6b
lea eax, [ebp - 0x160]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x174]
mov eax, dword [eax + esi + 4]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcstol]
mov dword [ebp - 0x17c], eax
test eax, eax
jne 0x40edf0
mov ecx, dword [0x41308c]
test ecx, ecx
jne 0x40ec5b
jmp 0x40ec6b
mov byte [ecx], al
inc ecx
jmp 0x40e760
mov edx, str._null_
jmp 0x40e7ee
mov edx, 0x224c
mov byte [ebp - 0x146], 0x22
lea ecx, [ebp - 0x146]
mov word [ebp - 0x148], dx
lea eax, [ecx + 1]
jmp 0x40e7db
mov dword [esp + 0xc], 0x4152da
mov dword [esp + 8], str.wmain
mov dword [esp + 4], 0x413024
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x40e837
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 0x40ee12
inc ebx
cmp dword [ebp - 0x170], ebx
je 0x40ec6b
lea eax, [ebp - 0x160]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x174]
mov eax, dword [eax + esi + 4]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcstol]
mov edx, dword [ebp - 0x160]
cmp word [edx], 0
jne 0x40ec6b
mov dword [ebp - 0x180], eax
jmp 0x40e8f9
cmp dword [ebp - 0x17c], 0xffff
jle 0x40ec5b
jmp 0x40ec6b
and eax, 8
mov edx, eax
jmp 0x40e82f
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 0x40f97d
inc ebx
cmp dword [ebp - 0x170], ebx
je 0x40ec6b
lea eax, [ebp - 0x160]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x174]
mov eax, dword [eax + esi + 4]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcstol]
mov dword [0x413080], eax
jmp 0x40ec5b
mov edi, dword [0x413080]
test edi, edi
je 0x40f255
mov ecx, 0x96
mov edx, 0x50
mov eax, 1
call sym._create_screen_buffer.constprop.0
mov dword [0x413088], eax
test eax, eax
je 0x40ec6b
mov dword [ebp - 0x180], 0
mov dword [esp], 0x413080
call sym._init_window
test eax, eax
je 0x40ec6b
lea eax, [ebp - 0x148]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetStartupInfoW]
mov eax, dword [ebp - 0x13c]
sub esp, 4
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcslen]
lea edx, [eax + eax]
mov eax, dword [ebp - 0x13c]
call sym._set_console_title.constprop.0
mov eax, 5
test byte [ebp - 0x11c], 1
je 0x40eefa
movzx eax, word [ebp - 0x118]
mov dword [esp + 4], eax
mov eax, dword [0x413128]
mov dword [esp], eax
call dword [sym.imp.user32.dll_ShowWindow]
sub esp, 8
jmp 0x40ea4b
mov dword [ebp - 0x188], 0
cmp dword [0x414234], 0xfff
mov eax, dword [0x414230]
jbe 0x40f3fb
test eax, eax
je 0x40eaf6
mov eax, dword [0x413080]
mov edx, dword [ebp - 0x180]
mov dword [ebp - 0x154], eax
mov eax, 1
test edx, edx
je 0x40ef66
mov eax, dword [ebp - 0x188]
mov dword [ebp - 0x150], eax
mov eax, 2
mov edx, dword [0x41312c]
mov dword [ebp - 0x17c], eax
mov ecx, eax
test edx, edx
je 0x40ef86
inc ecx
mov dword [ebp + eax*4 - 0x154], edx
mov dword [ebp - 0x17c], ecx
mov eax, dword [0x413128]
test eax, eax
je 0x40f018
lea eax, [ebp - 0x154]
mov dword [esp + 0x10], 0x1cff
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x17c]
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [sym.imp.user32.dll_MsgWaitForMultipleObjects]
sub esp, 0x14
cmp dword [ebp - 0x17c], eax
je 0x40f3a0
test eax, eax
je 0x40f0e0
cmp eax, 1
je 0x40f046
xor ebx, ebx
test byte [0x413024], 8
je 0x40eafb
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 0x40eafb
lea eax, [ebp - 0x154]
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x17c]
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WaitForMultipleObjects]
sub esp, 0x10
jmp 0x40efc7
mov edx, dword [ebp - 0x15c]
movzx eax, byte [0x413024]
test edx, edx
jne 0x40f94a
cmp dword [ebp - 0x158], 2
jne 0x40f94a
test al, 1
jne 0x40f428
lea eax, [ebp - 0x162]
mov dword [esp + 0x20], 0
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x15c]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x188]
mov dword [esp + 0x1c], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x180]
mov dword [esp + 0x18], 2
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [sym.imp.ntdll.dll_NtReadFile]
sub esp, 0x24
test eax, eax
je 0x40ef86
cmp eax, 0x103
je 0x40ef86
jmp 0x40eaf6
mov dword [esp], 0x414160
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
lea eax, [ebp - 0x148]
mov edi, dword [0x414230]
mov dword [ebp - 0x16c], 0
mov dword [ebp - 0x170], 0
sub esp, 4
mov dword [ebp - 0x178], eax
mov ebx, edi
mov edx, ebx
mov ebx, dword [0x414234]
mov ecx, dword [0x41309c]
xor eax, eax
lea edi, [ebp - 0x144]
test ecx, ecx
mov ecx, 0xf
setne al
mov esi, eax
xor eax, eax
rep stosd dword es:[edi], eax
mov eax, dword [0x413080]
mov dword [0x4130a4], esi
mov dword [ebp - 0xd8], str.get_next_console_request
mov dword [ebp - 0x13c], eax
mov eax, dword [ebp - 0x170]
mov dword [ebp - 0x148], 0x3a
mov dword [ebp - 0x130], eax
mov eax, dword [ebp - 0x16c]
mov dword [ebp - 0x108], 0
mov dword [ebp - 0x138], esi
test eax, eax
je 0x40f1a5
mov dword [ebp - 0x100], edx
mov dword [ebp - 0x108], 1
mov dword [ebp - 0xfc], eax
mov dword [ebp - 0x144], eax
mov eax, dword [ebp - 0x178]
mov dword [ebp - 0x140], ebx
mov dword [ebp - 0x104], edx
mov dword [esp], eax
call sym._wine_server_call
mov ecx, dword [ebp - 0x138]
mov esi, dword [ebp - 0x140]
mov ebx, dword [ebp - 0x13c]
mov edi, dword [ebp - 0x144]
mov dword [ebp - 0x16c], ecx
cmp eax, 0x103
je 0x40f2bf
cmp eax, 0x80000005
jne 0x40f2d4
mov ebx, dword [0x414234]
mov edx, dword [0x414230]
cmp ecx, ebx
ja 0x40f220
test edx, edx
je 0x40f89f
mov dword [ebp - 0x170], 0
jmp 0x40f120
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 0x40f89f
mov dword [0x414230], eax
mov ebx, esi
mov dword [0x414234], esi
mov dword [ebp - 0x170], 0
jmp 0x40f120
test byte [0x413024], 2
je 0x40ec6b
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 0x40ec70
test eax, eax
je 0x40f45c
mov ecx, dword [0x41308c]
test ecx, ecx
je 0x40e9db
mov dword [0x414144], 7
mov dword [0x414148], 1
jmp 0x40ea4b
mov dword [esp], 0x414160
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
sub esp, 4
jmp 0x40ef86
test eax, eax
jne 0x40f892
cmp esi, 0x500168
je 0x40f568
test ebx, ebx
jne 0x40f5a4
mov ebx, dword [0x414230]
cmp esi, 0x504044
ja 0x40f508
cmp esi, 0x504027
ja 0x40f4d0
cmp esi, 0x500054
je 0x411013
jbe 0x40f46b
cmp esi, 0x500058
je 0x410671
cmp esi, 0x504000
jne case.0x40f4db.5259305
test byte [0x413024], 8
jne 0x410851
cmp dword [ebp - 0x16c], 4
mov edx, dword [0x414234]
mov eax, ebx
jne 0x410893
test edi, edi
jne 0x410893
cmp edx, 3
jbe 0x410822
test ebx, ebx
je 0x40faa6
mov edx, dword [0x413084]
mov dword [eax], edx
mov dword [ebp - 0x16c], 4
mov dword [ebp - 0x170], 0
mov esi, dword [ebp - 0x16c]
mov dword [ebp - 0x16c], esi
jmp 0x40f118
lea eax, [ebp - 0x148]
mov ebx, dword [sym.imp.user32.dll_PeekMessageW]
mov esi, dword [sym.imp.user32.dll_DispatchMessageW]
mov edi, eax
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], edi
call ebx
sub esp, 0x14
test eax, eax
je 0x40ef86
cmp dword [ebp - 0x144], 0x12
je 0x40f8ad
mov dword [esp], edi
call esi
sub esp, 4
jmp 0x40f3b4
mov dword [esp + 4], 0x1000
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_realloc]
test eax, eax
je 0x40eaf6
mov dword [0x414230], eax
mov dword [0x414234], 0x1000
jmp 0x40ef3b
movzx eax, word [ebp - 0x162]
mov dword [esp + 0xc], str.unimplemented_signal__x_n
mov dword [esp + 8], str.main_loop
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x413024
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
jmp 0x40f070
mov dword [0x413094], 1
jmp 0x40ea4b
cmp esi, 0x500008
je 0x41065f
cmp esi, 0x500050
jne case.0x40f4db.5259305
or dword [ebp - 0x16c], edi
jne 0x410893
cmp dword [0x41308c], 0
je 0x40f6ea
cmp dword [0x413134], 0
je 0x40f4b5
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 0x40f385
lea eax, [esi - 0x504028]
cmp eax, 0x1c
ja case.0x40f4db.5259305
jmp dword [eax*4 + 0x4155b0]
mov dword [ebp - 0x170], 0xc0000008
test byte [0x413024], 4
jne 0x410f95
mov dword [ebp - 0x16c], 0
jmp 0x40f118
cmp esi, 0x508034
je 0x410fc8
jbe 0x40f6a8
cmp esi, 0x508040
je 0x40f9f6
cmp esi, 0x508048
jne case.0x40f4db.5259305
mov eax, edi
mov esi, dword [ebp - 0x16c]
and eax, 1
or esi, eax
jne 0x410893
mov edx, edi
mov eax, ebx
call sym._set_console_title.constprop.0
mov dword [ebp - 0x170], eax
mov edi, dword [ebp - 0x170]
mov ebx, dword [0x414230]
test edi, edi
jne 0x40f4f9
jmp 0x40f395
test byte [0x413024], 8
jne 0x40f8d0
mov eax, dword [0x413088]
mov dword [0x413090], 0
test eax, eax
je 0x40f8b4
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 0x40f385
mov edx, dword [0x4142e4]
test edx, edx
je 0x40f748
mov dword [ebp - 0x184], esi
mov esi, edx
jmp 0x40f5cd
mov eax, dword [esi + 4]
cmovns eax, dword [esi + 8]
mov esi, eax
test eax, eax
je 0x40f748
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [0x4142e0]
test eax, eax
jne 0x40f5bc
mov dword [ebp - 0x170], eax
mov ebx, dword [0x414230]
mov eax, esi
mov dword [ebp - 0x174], esi
mov esi, dword [ebp - 0x184]
sub eax, 0x94
mov dword [ebp - 0x18c], ebx
mov dword [ebp - 0x184], eax
cmp esi, 0x508098
ja case.0x40f841.5275769
cmp esi, 0x508077
ja 0x40f836
cmp esi, 0x504080
je 0x411262
ja 0x40f7b0
cmp esi, 0x50016c
je 0x4108a2
cmp esi, 0x504000
jne 0x40f77a
test byte [0x413024], 8
jne 0x40fa61
cmp dword [ebp - 0x16c], 4
mov edx, dword [0x414234]
mov eax, ebx
jne 0x410893
test edi, edi
jne 0x410893
cmp edx, 3
jbe 0x40fa36
test ebx, ebx
je 0x40faa6
mov ecx, dword [ebp - 0x174]
mov edx, dword [ecx - 0x8c]
mov dword [eax], edx
mov dword [ebp - 0x16c], 4
jmp 0x40f385
cmp esi, 0x504060
je 0x4110b5
cmp esi, 0x508004
jne case.0x40f4db.5259305
cmp edi, 4
jne 0x410893
cmp dword [ebp - 0x16c], 0
jne 0x410893
mov eax, dword [ebx]
mov dword [0x413084], eax
test byte [0x413024], 8
jne 0x41109c
mov dword [ebp - 0x16c], 0
jmp 0x40f385
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 [0x41312c], eax
sub esp, 0x18
test eax, eax
je 0x40ec6b
jmp 0x40ea4b
test byte [0x413024], 2
jne 0x40f8fd
mov edx, dword [0x414230]
mov ebx, dword [0x414234]
mov dword [ebp - 0x16c], 0
mov dword [ebp - 0x170], 0xc0000008
jmp 0x40f120
cmp esi, 0x500008
jne case.0x40f841.5275769
mov eax, dword [ebp - 0x174]
mov eax, dword [eax - 0x94]
cmp dword [eax + 0xc], 0
jne 0x40f385
mov dword [ebp - 0x170], 0xc00000bb
jmp 0x40f4f9
cmp esi, 0x504088
je 0x41137b
cmp esi, 0x508004
jne case.0x40f841.5275769
cmp dword [ebp - 0x16c], 0
jne 0x410893
cmp edi, 4
jne 0x410893
mov eax, dword [ebx]
mov ecx, dword [ebp - 0x174]
mov dword [ecx - 0x8c], eax
test byte [0x413024], 8
je 0x40f6ea
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 - 0x16c], 0
mov ebx, dword [0x414230]
jmp 0x40f385
lea eax, [esi - 0x508078]
cmp eax, 0x20
ja case.0x40f841.5275769
jmp dword [eax*4 + 0x415624]
mov dword [ebp - 0x170], 0xc0000008
test byte [0x413024], 4
je 0x40f4f9
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 0x40f4f9
test byte [0x413024], 8
jne 0x40fab5
mov dword [esp], 0x414160
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
push ebx
xor ebx, ebx
jmp 0x40eafb
mov eax, ebx
mov ecx, 0x96
mov edx, 0x50
call sym._create_screen_buffer.constprop.0
mov ebx, dword [0x414230]
jmp 0x40f385
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 0x40f575
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 - 0x16c], 0
mov dword [ebp - 0x170], 0xc0000008
mov ebx, dword [0x414234]
jmp 0x40f120
xor ebx, ebx
test al, 8
je 0x40eafb
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 0x40eafb
test byte [0x413024], 1
je 0x40ec6b
mov ebx, dword [edi]
test ebx, ebx
je 0x410925
mov eax, ebx
shr eax, 0x10
je 0x41090d
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
push edx
push edx
test eax, eax
jne 0x4108fa
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 0x40ec70
test byte [0x413024], 8
jne 0x40fb45
cmp edi, 0x10
jne 0x40fb30
cmp dword [ebp - 0x16c], 0
jne 0x40fb30
mov eax, dword [ebx]
test al, 1
jne 0x40fb10
test al, 2
jne 0x40fae2
mov ebx, dword [0x414230]
jmp 0x40f6ea
mov dword [esp + 4], 4
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
test eax, eax
je 0x40faa0
mov dword [0x414230], eax
mov ebx, eax
mov dword [0x414234], 4
jmp 0x40f686
mov eax, dword [ebp - 0x174]
mov eax, dword [eax - 0x8c]
mov dword [esp + 0xc], str.returning_mode__x_n
mov dword [esp + 8], str.screen_buffer_ioctl
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x413024
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
mov ebx, dword [0x414230]
jmp 0x40f658
mov ebx, dword [0x414230]
mov dword [ebp - 0x170], 0xc0000017
jmp 0x40f4f9
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 0x40f89f
mov eax, dword [ebx + 8]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsValidCodePage]
push esi
test eax, eax
je 0x40fb30
mov dword [ebp - 0x16c], 0
mov eax, dword [ebx + 8]
mov ebx, dword [0x414230]
mov dword [0x413124], eax
jmp 0x40f385
mov eax, dword [ebx + 4]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsValidCodePage]
push edi
test eax, eax
je 0x40fb30
mov eax, dword [ebx + 4]
mov dword [0x413120], eax
mov eax, dword [ebx]
jmp 0x40fa23
mov dword [ebp - 0x170], 0xc000000d
mov ebx, dword [0x414230]
jmp 0x40f4f9
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 0x40fa03
cmp edi, 0x18
jne 0x410893
cmp dword [ebp - 0x16c], 4
jne 0x410893
test byte [0x413024], 8
jne 0x40fd56
mov ecx, dword [ebp - 0x174]
mov eax, dword [ecx - 0x94]
mov dword [eax + 0x10], 0
mov eax, ecx
mov edx, dword [ebx + 4]
mov ecx, dword [ecx - 0x84]
cmp edx, ecx
jae 0x40fc64
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 0x40fbdc
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 0x40fd3f
cmp eax, 2
je 0x40fd20
test eax, eax
jne 0x40fb30
xor eax, eax
jmp 0x40fc17
movzx edx, word [ebx + 0x14]
mov word [esi + eax*4], dx
inc eax
cmp edi, eax
jne 0x40fc0e
test edi, edi
je 0x40fc36
mov eax, dword [ebp - 0x174]
mov ecx, dword [ebp - 0x184]
mov eax, dword [eax - 0x94]
cmp ecx, dword [eax + 8]
je 0x40fc79
mov ebx, dword [0x414230]
cmp dword [0x414234], 3
mov eax, ebx
jbe 0x40fcf1
test ebx, ebx
je 0x40faa6
mov dword [eax], edi
mov dword [ebp - 0x16c], 4
jmp 0x40f385
mov dword [ebp - 0x16c], 4
mov ebx, dword [0x414230]
jmp 0x40f385
mov eax, dword [ebp - 0x174]
mov esi, dword [ebx]
xor edx, edx
mov ecx, dword [ebx + 4]
mov ebx, dword [eax - 0x88]
lea eax, [edi + esi - 1]
div ebx
mov dword [ebp - 0x16c], ebx
mov dword [ebp - 0x170], eax
mov ebx, edx
mov eax, esi
xor edx, edx
div dword [ebp - 0x16c]
mov dword [ebp - 0x140], ebx
add eax, ecx
mov dword [ebp - 0x148], edx
mov edx, dword [ebp - 0x178]
mov dword [ebp - 0x144], eax
mov eax, dword [ebp - 0x184]
add ecx, dword [ebp - 0x170]
mov dword [ebp - 0x13c], ecx
call sym._update_output
mov eax, dword [ebp - 0x174]
mov eax, dword [eax - 0x94]
call sym._tty_sync
jmp 0x40fc36
mov dword [esp + 4], 4
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
test eax, eax
je 0x40faa0
mov dword [0x414230], eax
mov ebx, eax
mov dword [0x414234], 4
jmp 0x40fc53
xor eax, eax
jmp 0x40fd36
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 0x40fd24
jmp 0x40fc1b
xor eax, eax
jmp 0x40fd4d
movzx edx, word [ebx + 0x16]
mov word [esi + eax*4 + 2], dx
inc eax
cmp edi, eax
jne 0x40fd43
jmp 0x40fc1b
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 0x40fb91
or dword [ebp - 0x16c], edi
jne 0x410893
test byte [0x413024], 8
jne 0x411ab8
mov esi, dword [ebp - 0x174]
mov ecx, dword [ebp - 0x184]
mov eax, dword [esi - 0x94]
mov dword [eax + 8], ecx
mov ebx, dword [esi - 0x88]
mov eax, dword [esi - 0x84]
mov dword [ebp - 0x148], 0
lea edx, [ebx - 1]
mov dword [ebp - 0x170], ebx
mov dword [ebp - 0x140], edx
dec eax
mov edx, dword [ebp - 0x178]
mov dword [ebp - 0x13c], eax
mov eax, ecx
mov dword [ebp - 0x144], 0
call sym._update_output
mov eax, dword [esi - 0x94]
call sym._tty_sync
mov dword [esp + 4], 0
mov eax, dword [esi - 0x94]
mov dword [esp], eax
call sym._update_window_config
mov ebx, dword [0x414230]
jmp 0x40f385
cmp dword [ebp - 0x16c], 0
jne 0x410893
cmp edi, 0x67
jbe 0x410893
test byte [0x413024], 8
jne 0x410188
mov eax, dword [ebx]
test al, 1
je 0x40fe82
movsx eax, word [ebx + 4]
lea edx, [eax - 1]
cmp dx, 0x63
ja 0x40fb30
mov ecx, dword [ebp - 0x174]
mov dword [ecx - 0x80], eax
xor eax, eax
cmp word [ebx + 6], 0
setne al
mov dword [ecx - 0x7c], eax
mov eax, dword [ebx]
test al, 2
je 0x40fef4
movsx edx, word [ebx + 8]
test dx, dx
js 0x40fb30
mov esi, dword [ebp - 0x174]
cmp edx, dword [esi - 0x88]
jae 0x40fb30
movsx ecx, word [ebx + 0xa]
test cx, cx
js 0x40fb30
cmp ecx, dword [esi - 0x84]
jae 0x40fb30
cmp edx, dword [esi - 0x78]
je 0x411c99
mov esi, dword [ebp - 0x174]
mov dword [esi - 0x78], edx
mov eax, dword [esi - 0x94]
movsx ecx, word [ebx + 0xa]
mov dword [esi - 0x74], ecx
cmp dword [eax + 0x10], 0
jne 0x411c8f
mov eax, dword [ebp - 0x184]
call sym._scroll_to_cursor
mov eax, dword [ebx]
test al, 4
je 0x40ffd7
mov esi, dword [ebp - 0x174]
mov eax, dword [esi - 0x94]
mov dword [eax + 0x10], 0
mov eax, dword [esi - 0x18]
movsx edx, word [ebx + 0xc]
mov dword [ebp - 0x16c], eax
inc eax
sub eax, dword [esi - 0x20]
cmp edx, eax
jl 0x40fb30
mov eax, dword [esi - 0x14]
movsx ecx, word [ebx + 0xe]
mov dword [ebp - 0x16c], eax
inc eax
sub eax, dword [esi - 0x1c]
cmp ecx, eax
jl 0x40fb30
mov eax, dword [ebp - 0x184]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._change_screen_buffer_size
mov dword [ebp - 0x170], eax
test eax, eax
jne 0x41017d
mov ecx, dword [ebp - 0x174]
movsx edx, word [ebx + 0xc]
mov eax, dword [ecx - 0x18]
cmp eax, edx
jl 0x40ff83
sub eax, dword [ecx - 0x20]
mov dword [ecx - 0x20], 0
mov dword [ecx - 0x18], eax
mov ecx, dword [ebp - 0x174]
movsx edx, word [ebx + 0xe]
mov eax, dword [ecx - 0x14]
cmp eax, edx
jl 0x40ffa1
sub eax, dword [ecx - 0x1c]
mov dword [ecx - 0x1c], 0
mov dword [ecx - 0x14], eax
mov ecx, dword [ebp - 0x174]
movsx eax, word [ebx + 0xc]
cmp dword [ecx - 0x78], eax
jb 0x40ffb4
dec eax
mov dword [ecx - 0x78], eax
mov ecx, dword [ebp - 0x174]
movsx eax, word [ebx + 0xe]
cmp dword [ecx - 0x74], eax
jb 0x40ffc7
dec eax
mov dword [ecx - 0x74], eax
mov eax, dword [ebp - 0x184]
mov dword [esp], eax
call sym._notify_screen_buffer_size
mov eax, dword [ebx]
test al, 8
je 0x40ffeb
movzx eax, word [ebx + 0x10]
mov ecx, dword [ebp - 0x174]
mov word [ecx - 0x70], ax
mov eax, dword [ebx]
test al, 0x40
je 0x40ffff
movzx eax, word [ebx + 0x12]
mov ecx, dword [ebp - 0x174]
mov word [ecx - 0x6e], ax
mov eax, dword [ebx]
test al, 0x10
je 0x410095
mov esi, dword [ebp - 0x174]
mov eax, dword [esi - 0x94]
mov dword [eax + 0x10], 0
movsx edx, word [ebx + 0x14]
test dx, dx
js 0x40fb30
movsx eax, word [ebx + 0x18]
cmp dx, ax
jg 0x40fb30
mov dword [ebp - 0x16c], eax
cmp eax, dword [esi - 0x88]
jae 0x40fb30
movsx eax, word [ebx + 0x16]
test ax, ax
js 0x40fb30
movsx ecx, word [ebx + 0x1a]
cmp ax, cx
jg 0x40fb30
cmp ecx, dword [esi - 0x84]
jae 0x40fb30
cmp dword [esi - 0x20], edx
je 0x4101bb
mov ecx, dword [ebp - 0x174]
mov dword [ecx - 0x20], edx
movsx eax, word [ebx + 0x16]
mov dword [ecx - 0x1c], eax
movsx eax, word [ebx + 0x18]
mov dword [ecx - 0x18], eax
movsx eax, word [ebx + 0x1a]
mov dword [ecx - 0x14], eax
mov eax, dword [ebx]
test al, 0x20
je 0x4100bc
mov ecx, dword [ebp - 0x174]
mov eax, dword [ecx - 0x94]
mov dword [eax + 0x10], 0
movsx eax, word [ebx + 0x1c]
mov dword [ecx - 0x6c], eax
movsx eax, word [ebx + 0x1e]
mov dword [ecx - 0x68], eax
mov eax, dword [ebx]
test al, 0x80
je 0x410122
sub edi, 0x68
movsx eax, word [ebx + 0x22]
lea ecx, [ebx + 0x68]
jne 0x4100e2
mov esi, dword [ebp - 0x174]
mov ecx, dword [esi - 8]
mov esi, dword [esi - 4]
mov dword [ebp - 0x16c], esi
mov edi, esi
add edi, esi
test eax, eax
jne 0x4100eb
mov eax, 0xc
cmp word [ebx + 0x24], 0x258
mov edx, 0x190
mov ebx, 0x2bc
mov dword [esp + 0xc], eax
cmovge edx, ebx
mov eax, dword [ebp - 0x174]
mov dword [esp + 8], edi
mov dword [esp + 4], ecx
mov dword [esp + 0x10], edx
mov eax, dword [eax - 0x94]
mov dword [esp], eax
call sym._update_console_font
mov eax, dword [ebp - 0x174]
mov ecx, dword [ebp - 0x184]
mov eax, dword [eax - 0x94]
cmp ecx, dword [eax + 8]
jne 0x40f821
call sym._tty_sync
mov eax, dword [ebp - 0x174]
mov dword [esp + 4], 0
mov eax, dword [eax - 0x94]
mov dword [esp], eax
call sym._update_window_config
mov ebx, dword [0x414230]
mov dword [ebp - 0x16c], 0
jmp 0x40f385
mov dword [ebp - 0x170], 0xc0000017
mov ebx, dword [0x414230]
jmp 0x40f4f9
mov eax, dword [ebp - 0x184]
mov dword [esp + 0xc], 0x415480
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 0x40fe53
cmp dword [esi - 0x1c], eax
jne 0x410075
mov eax, esi
mov esi, dword [ebp - 0x16c]
cmp dword [eax - 0x18], esi
jne 0x410075
cmp dword [eax - 0x14], ecx
jne 0x410075
jmp 0x410093
test edi, edi
jne 0x410893
mov eax, dword [0x413108]
test eax, eax
je 0x410205
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcslen]
mov ebx, dword [0x414230]
mov edi, eax
mov eax, dword [ebp - 0x16c]
lea edx, [edi + edi]
mov dword [ebp - 0x170], ebx
sub eax, 8
cmp edx, eax
cmovbe eax, edx
mov dword [ebp - 0x174], eax
add eax, 8
mov dword [ebp - 0x16c], eax
cmp eax, dword [0x414234]
ja 0x4103b4
test ebx, ebx
je 0x40faa6
test byte [0x413024], 8
jne 0x41034d
cmp dword [ebp - 0x174], 0
jne 0x4102c8
mov eax, dword [ebp - 0x170]
mov ebx, dword [0x414230]
mov dword [eax], edi
jmp 0x40f385
test byte [0x413024], 8
jne 0x41031e
mov edx, dword [0x414234]
mov eax, ebx
test edi, edi
jne 0x410893
cmp dword [ebp - 0x16c], 0xc
jne 0x410893
cmp edx, 0xb
jbe 0x4102f2
test ebx, ebx
je 0x40faa6
mov edx, dword [0x413120]
mov dword [ebp - 0x16c], 0xc
mov dword [eax], edx
mov edx, dword [0x413124]
mov dword [eax + 4], edx
mov edx, dword [0x41309c]
mov dword [eax + 8], edx
jmp 0x40f385
mov eax, dword [ebp - 0x170]
mov ecx, dword [ebp - 0x174]
mov edx, dword [0x413108]
add eax, 4
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._memcpy
jmp 0x410255
mov dword [esp + 4], 0xc
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
test eax, eax
je 0x40faa0
mov dword [0x414230], eax
mov ebx, eax
mov dword [0x414234], 0xc
jmp 0x41029f
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 0x410275
mov esi, dword [0x413108]
test esi, esi
je 0x4103fd
mov eax, esi
shr eax, 0x10
je 0x4103e8
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
push ebx
push ebx
test eax, eax
jne 0x4103e1
or edx, 0xffffffff
mov eax, esi
call sym._wine_dbgstr_wn.part.0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.returning_title__s_n
mov dword [esp + 8], str.console_input_ioctl
mov dword [esp + 4], 0x413024
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x41024c
mov dword [esp + 4], eax
mov esi, eax
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
mov dword [ebp - 0x170], eax
test eax, eax
je 0x410173
mov dword [0x414230], eax
mov dword [0x414234], esi
jmp 0x41023f
mov eax, 0x415068
jmp 0x410387
movzx esi, si
mov dword [esp], 0x415072
mov dword [esp + 4], esi
call sym._wine_dbg_sprintf
jmp 0x410387
mov eax, str._null_
jmp 0x410387
test byte [0x413024], 8
jne 0x41049a
test edi, edi
jne 0x40fb30
cmp dword [0x413130], 0
je 0x41042f
cmp dword [0x41312c], 0
je 0x41056e
imul eax, dword [0x41309c], 0x14
mov ecx, dword [ebp - 0x16c]
cmp ecx, eax
cmovbe eax, ecx
mov dword [ebp - 0x16c], eax
mov ecx, eax
mov eax, dword [0x414230]
mov ebx, eax
cmp ecx, dword [0x414234]
ja 0x4104c3
test eax, eax
je 0x40faa6
cmp dword [ebp - 0x16c], 0
mov ebx, dword [0x414230]
je 0x40f385
mov ecx, dword [ebp - 0x16c]
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 0x40f385
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 0x410411
mov dword [esp + 4], ecx
mov esi, ecx
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_realloc]
test eax, eax
je 0x410173
mov dword [0x414230], eax
mov dword [0x414234], esi
jmp 0x410460
test edi, edi
jne 0x410893
cmp dword [0x413130], 0
je 0x410508
cmp dword [0x41312c], 0
je 0x4105b0
cmp dword [0x41309c], 0
jne 0x41051a
cmp dword [ebp - 0x16c], 0
jne 0x410537
mov edx, dword [ebp - 0x16c]
mov eax, 0x413080
xor esi, esi
call sym._read_console_input
mov dword [ebp - 0x170], eax
jmp 0x40f550
test byte [0x413024], 8
jne 0x4105f2
mov eax, dword [ebp - 0x16c]
mov ebx, dword [0x414230]
mov dword [0x4130b4], 0x504030
mov dword [ebp - 0x170], 0x103
mov dword [0x4130b8], eax
jmp 0x40f4f9
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 [0x41312c], eax
sub esp, 0x18
jmp 0x41042f
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 [0x41312c], eax
sub esp, 0x18
jmp 0x410508
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 0x410544
cmp dword [0x413130], 0
je 0x410631
cmp dword [0x41312c], 0
je 0x410764
mov dword [esp], 0
xor ecx, ecx
mov eax, 0x50402c
xor esi, esi
mov dword [esp + 4], 0
mov edx, dword [ebp - 0x16c]
call sym._read_console.constprop.0
mov dword [ebp - 0x170], eax
jmp 0x40f550
cmp dword [0x41308c], 0
jne 0x40f385
jmp 0x40f79c
test byte [0x413024], 8
jne 0x4107f3
cmp dword [ebp - 0x16c], 4
mov eax, dword [0x414234]
mov esi, ebx
jne 0x410893
test edi, edi
jne 0x410893
cmp eax, 3
jbe 0x4107c4
test ebx, ebx
je 0x40faa6
cmp dword [0x413128], 0
je 0x4107a6
mov eax, dword [0x413128]
mov ebx, dword [0x414230]
mov dword [ebp - 0x16c], 4
mov dword [esi], eax
jmp 0x40f385
mov eax, dword [ebp - 0x16c]
and eax, 1
or eax, edi
mov esi, eax
jne 0x410893
cmp dword [0x413130], 0
je 0x4106f9
cmp dword [0x41312c], 0
je 0x410725
mov dword [esp + 4], 0
mov edx, dword [ebp - 0x16c]
xor ecx, ecx
mov eax, 0x504028
mov dword [esp], 0
call sym._read_console.constprop.0
mov dword [ebp - 0x170], eax
jmp 0x40f550
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 [0x41312c], eax
sub esp, 0x18
jmp 0x4106f9
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 [0x41312c], eax
sub esp, 0x18
jmp 0x410631
cmp dword [0x413094], 0
jne 0x4106b8
mov dword [esp], 0x413080
call sym._init_message_window
jmp 0x4106b8
mov dword [esp + 4], 4
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
mov esi, eax
test eax, eax
je 0x40faa0
mov dword [0x414230], eax
mov dword [0x414234], 4
jmp 0x4106ab
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 0x41067e
mov dword [esp + 4], 4
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
test eax, eax
je 0x40faa0
mov dword [0x414230], eax
mov ebx, eax
mov dword [0x414234], 4
jmp 0x40f373
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 0x40f345
cmp dword [ebx + 0xc], 0
jne 0x4118aa
mov dword [ebp - 0x170], 0xc000000d
jmp 0x40f4f9
or dword [ebp - 0x16c], edi
jne 0x410893
mov eax, dword [ebp - 0x174]
mov ecx, dword [ebp - 0x184]
mov eax, dword [eax - 0x94]
cmp ecx, dword [eax + 8]
je 0x410904
mov esi, dword [ebp - 0x174]
mov eax, esi
call sym._rb_remove.constprop.0
mov eax, dword [esi - 8]
mov ebx, dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], eax
call ebx
mov eax, dword [esi - 0x64]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x184]
mov dword [esp], eax
call ebx
mov ebx, dword [0x414230]
jmp 0x40f385
mov eax, 0x415068
jmp 0x40f9c4
mov dword [eax + 8], 0
jmp 0x4108c1
movzx ebx, bx
mov dword [esp], 0x415072
mov dword [esp + 4], ebx
call sym._wine_dbg_sprintf
jmp 0x40f9c4
mov eax, str._null_
jmp 0x40f9c4
cmp edi, 0x18
jne 0x410893
cmp dword [ebp - 0x16c], 0
jne 0x410893
mov eax, dword [ebp - 0x174]
mov eax, dword [eax - 0x94]
mov dword [eax + 0x10], 0
movsx eax, word [ebx + 4]
movsx ecx, word [ebx]
movsx edi, word [ebx + 2]
mov dword [ebp - 0x1a0], eax
inc eax
sub eax, ecx
mov dword [ebp - 0x18c], ecx
mov dword [ebp - 0x190], eax
movsx eax, word [ebx + 6]
mov dword [ebp - 0x198], edi
mov dword [ebp - 0x1ac], eax
inc eax
sub eax, edi
mov dword [ebp - 0x16c], eax
test byte [0x413024], 8
jne 0x410f46
xor eax, eax
mov ecx, dword [ebp - 0x174]
cmp word [ebx + 0xc], 0
mov esi, eax
cmovns si, word [ebx + 0xc]
cmp word [ebx + 0xe], 0
cmovns ax, word [ebx + 0xe]
mov edx, dword [ecx - 0x88]
mov edi, eax
movsx eax, word [ebx + 0x10]
mov dword [ebp - 0x19c], edx
dec edx
mov word [ebp - 0x1b6], di
cmp edx, eax
cmovbe eax, edx
mov dword [ebp - 0x1b4], eax
mov eax, dword [ecx - 0x84]
lea edx, [eax - 1]
mov dword [ebp - 0x194], eax
movsx eax, word [ebx + 0x12]
cmp edx, eax
cmovbe eax, edx
mov dword [ebp - 0x1bc], eax
cmp di, ax
jg 0x410e5f
movzx ecx, word [ebp - 0x1b4]
mov word [ebp - 0x1a8], si
cmp si, cx
jg 0x410e5f
movzx esi, word [ebx]
test si, si
js 0x410e5f
movzx edi, word [ebx + 2]
test di, di
js 0x410e5f
movsx edx, word [ebx + 4]
cmp dword [ebp - 0x19c], edx
jbe 0x410e5f
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 0x410e5f
mov edx, dword [ebp - 0x194]
movsx eax, cx
cmp edx, eax
jbe 0x410e5f
movzx esi, word [ebx + 8]
test si, si
js 0x410e5f
movsx edi, si
mov dword [ebp - 0x1c0], edi
cmp dword [ebp - 0x19c], edi
jbe 0x410e5f
movsx edi, word [ebx + 0xa]
test di, di
js 0x410e5f
movsx ecx, di
mov dword [ebp - 0x1d4], ecx
cmp edx, ecx
jbe 0x410e5f
movsx edx, word [ebp - 0x1a8]
mov eax, dword [ebp - 0x18c]
mov ecx, dword [ebp - 0x198]
cmp eax, edx
cmovl eax, edx
mov dword [ebp - 0x1a4], eax
mov word [ebp - 0x1b8], ax
movsx eax, word [ebp - 0x1b6]
cmp ecx, eax
mov dword [ebp - 0x1c4], eax
cmovge eax, ecx
mov ecx, dword [ebp - 0x1a0]
mov dword [ebp - 0x194], eax
mov word [ebp - 0x1c6], ax
movsx eax, word [ebp - 0x1b4]
cmp ecx, eax
mov dword [ebp - 0x1cc], eax
cmovg ecx, eax
mov eax, dword [ebp - 0x1ac]
mov dword [ebp - 0x1a0], ecx
movsx ecx, word [ebp - 0x1bc]
cmp eax, ecx
mov dword [ebp - 0x1d0], ecx
cmovg eax, ecx
mov ecx, dword [ebp - 0x190]
mov dword [ebp - 0x1ac], eax
mov eax, ecx
lea eax, [esi + eax - 1]
mov word [ebp - 0x1ae], ax
movzx eax, word [ebp - 0x16c]
lea eax, [edi + eax - 1]
mov word [ebp - 0x1b0], ax
cmp word [ebp - 0x1a8], si
jle 0x410b86
mov eax, edx
sub ecx, edx
sub eax, dword [ebp - 0x1c0]
add ecx, dword [ebp - 0x1c0]
add dword [ebp - 0x18c], eax
movzx esi, word [ebp - 0x1a8]
mov dword [ebp - 0x190], ecx
movzx edx, word [ebp - 0x1b6]
cmp dx, di
jle 0x410bbb
mov ecx, dword [ebp - 0x1c4]
mov edi, dword [ebp - 0x1d4]
mov eax, ecx
sub eax, edi
add dword [ebp - 0x198], eax
mov eax, dword [ebp - 0x16c]
sub eax, ecx
add eax, edi
movsx edi, dx
mov dword [ebp - 0x16c], eax
movzx eax, word [ebp - 0x1ae]
cmp word [ebp - 0x1b4], ax
jge 0x410bdc
movsx edx, ax
mov eax, dword [ebp - 0x1cc]
sub eax, edx
add dword [ebp - 0x190], eax
movzx eax, word [ebp - 0x1b0]
cmp word [ebp - 0x1bc], ax
jge 0x410bfd
movsx edx, ax
mov eax, dword [ebp - 0x1d0]
sub eax, edx
add dword [ebp - 0x16c], eax
cmp dword [ebp - 0x190], 0
jle 0x410ce8
cmp dword [ebp - 0x16c], 0
jle 0x410ce8
mov eax, dword [ebp - 0x174]
mov ecx, dword [eax - 0x64]
movsx eax, si
mov dword [ebp - 0x1b4], eax
mov eax, dword [ebp - 0x198]
mov dword [ebp - 0x1a8], ecx
mov ecx, dword [ebp - 0x190]
shl ecx, 2
mov dword [ebp - 0x190], ecx
movsx ecx, di
mov edx, ecx
cmp ecx, eax
jle 0x410e9d
mov ecx, dword [ebp - 0x16c]
mov edx, dword [ebp - 0x19c]
mov word [ebp - 0x198], di
mov dword [ebp - 0x19c], ebx
lea eax, [eax + ecx - 1]
mov ecx, dword [ebp - 0x1a8]
imul eax, edx
add eax, dword [ebp - 0x18c]
lea ecx, [ecx + eax*4]
lea eax, [edi - 1]
mov edi, esi
cwde
add eax, dword [ebp - 0x16c]
mov esi, ecx
imul eax, edx
mov edx, dword [ebp - 0x1a8]
add eax, dword [ebp - 0x1b4]
lea edx, [edx + eax*4]
mov ebx, edx
mov eax, dword [ebp - 0x190]
mov dword [esp + 4], esi
mov dword [esp], ebx
mov dword [esp + 8], eax
call sym._memcpy
mov eax, dword [ebp - 0x174]
mov eax, dword [eax - 0x88]
mov dword [ebp - 0x18c], eax
shl eax, 2
sub ebx, eax
sub esi, eax
dec dword [ebp - 0x16c]
jne 0x410ca2
mov esi, edi
mov ebx, dword [ebp - 0x19c]
movsx edi, word [ebp - 0x198]
mov ecx, dword [ebp - 0x1ac]
cmp dword [ebp - 0x194], ecx
jg 0x410ddc
movsx eax, word [ebp - 0x1ae]
mov ecx, dword [ebp - 0x1a4]
inc eax
cmp eax, ecx
mov edx, eax
movsx eax, di
cmovl edx, ecx
mov dword [ebp - 0x198], eax
mov eax, dword [ebp - 0x1ac]
cmp cx, si
mov dword [ebp - 0x16c], edx
cmovl edx, ecx
inc eax
mov dword [ebp - 0x18c], eax
lea eax, [esi - 1]
cwde
mov dword [ebp - 0x190], edx
mov dword [ebp - 0x19c], eax
mov ecx, dword [ebp - 0x194]
mov eax, dword [ebp - 0x198]
cmp ecx, eax
jl 0x410e70
movsx eax, word [ebp - 0x1b0]
cmp eax, ecx
jl 0x410e70
cmp word [ebp - 0x1b8], si
jl 0x410e81
mov edx, dword [ebp - 0x1a0]
mov eax, dword [ebp - 0x16c]
je 0x410e81
cmp edx, eax
jl 0x410dc4
mov word [ebp - 0x1a8], si
mov dword [ebp - 0x1b4], edx
mov esi, dword [ebp - 0x174]
mov edx, dword [ebp - 0x194]
imul edx, dword [esi - 0x88]
mov ecx, edx
mov edx, dword [esi - 0x64]
mov esi, dword [ebx + 0x14]
add ecx, eax
inc eax
mov dword [edx + ecx*4], esi
cmp eax, dword [ebp - 0x1b4]
jle 0x410d94
movzx esi, word [ebp - 0x1a8]
inc dword [ebp - 0x194]
mov eax, dword [ebp - 0x194]
cmp eax, dword [ebp - 0x18c]
jne 0x410d41
mov eax, dword [ebp - 0x1a4]
mov ecx, dword [ebp - 0x1a0]
mov edx, dword [ebp - 0x178]
cmp ax, si
cmovg eax, esi
cwde
mov dword [ebp - 0x148], eax
movzx eax, word [ebp - 0x1ae]
cmp cx, ax
cmovge eax, ecx
mov ecx, dword [ebp - 0x1ac]
cwde
mov dword [ebp - 0x140], eax
movsx eax, word [ebp - 0x1c6]
cmp ax, di
cmovg eax, edi
mov dword [ebp - 0x144], eax
movzx eax, word [ebp - 0x1b0]
cmp cx, ax
cmovge eax, ecx
xor esi, esi
cwde
mov dword [ebp - 0x13c], eax
mov eax, dword [ebp - 0x184]
call sym._update_output
mov eax, dword [ebp - 0x174]
mov eax, dword [eax - 0x94]
call sym._tty_sync
jmp 0x40f550
mov dword [ebp - 0x170], 0xc000000d
xor esi, esi
jmp 0x40f550
mov edx, dword [ebp - 0x1a0]
mov eax, dword [ebp - 0x1a4]
jmp 0x410d83
mov eax, dword [ebp - 0x19c]
mov edx, dword [ebp - 0x1a0]
cmp eax, edx
cmovle edx, eax
mov eax, dword [ebp - 0x190]
jmp 0x410d83
mov ecx, dword [ebp - 0x1a8]
imul edx, dword [ebp - 0x19c]
mov eax, dword [ebp - 0x198]
imul eax, dword [ebp - 0x19c]
mov word [ebp - 0x19c], di
mov edi, esi
add eax, dword [ebp - 0x18c]
mov dword [ebp - 0x18c], 0
lea ecx, [ecx + eax*4]
mov eax, dword [ebp - 0x1b4]
mov esi, ecx
add eax, edx
mov edx, dword [ebp - 0x1a8]
mov dword [ebp - 0x1a8], ebx
lea edx, [edx + eax*4]
mov ebx, edx
mov eax, dword [ebp - 0x190]
mov dword [esp + 4], esi
mov dword [esp], ebx
mov dword [esp + 8], eax
call dword [sym.imp.ucrtbase.dll_memmove]
mov eax, dword [ebp - 0x174]
inc dword [ebp - 0x18c]
mov eax, dword [eax - 0x88]
mov dword [ebp - 0x198], eax
shl eax, 2
add ebx, eax
add esi, eax
mov eax, dword [ebp - 0x18c]
cmp dword [ebp - 0x16c], eax
jg 0x410eee
mov esi, edi
mov ebx, dword [ebp - 0x1a8]
movsx edi, word [ebp - 0x19c]
jmp 0x410ce8
mov dword [esp + 0x24], eax
mov eax, dword [ebp - 0x190]
mov dword [esp + 0x20], eax
movsx eax, word [ebx + 0xa]
mov dword [esp + 0x1c], eax
movsx eax, word [ebx + 8]
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], str.__d__d_______u__u__w__u_h__u_n
mov dword [esp + 8], str.scroll_output
mov dword [esp + 4], 0x413024
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x41099e
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 0x40f4f9
mov ecx, 0x14
mov eax, edi
xor edx, edx
mov esi, dword [ebp - 0x16c]
div ecx
mov ecx, eax
or esi, edx
jne 0x410893
test byte [0x413024], 8
jne 0x411037
cmp edi, 0x13
jbe 0x40fa2b
mov dword [esp], 1
mov edx, ebx
mov eax, 0x413080
call sym._write_console_input.part.0
mov dword [ebp - 0x170], eax
jmp 0x40f550
or dword [ebp - 0x16c], edi
jne 0x410893
test byte [0x413024], 8
jne 0x411070
mov dword [0x41309c], 0
jmp 0x40f385
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 - 0x16c], eax
call sym._wine_dbg_log.constprop.0
mov ecx, dword [ebp - 0x16c]
jmp 0x410fec
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 0x411028
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.set__x_mode_n
mov dword [esp + 8], str.console_input_ioctl
jmp 0x40f80d
cmp edi, 3
jbe 0x410893
mov eax, dword [ebp - 0x16c]
cmp eax, 3
jbe 0x410893
or eax, edi
and eax, 1
mov esi, eax
jne 0x410893
cmp dword [0x413130], 0
je 0x4110ec
cmp dword [0x41312c], 0
je 0x41111b
mov eax, dword [ebx]
mov edx, dword [ebp - 0x16c]
lea ecx, [ebx + 4]
mov dword [esp + 4], eax
lea eax, [edi - 4]
sub edx, 4
shr eax, 1
mov dword [esp], eax
mov eax, 0x504060
call sym._read_console.constprop.0
mov dword [ebp - 0x170], eax
jmp 0x40f550
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 [0x41312c], eax
sub esp, 0x18
jmp 0x4110ec
mov eax, dword [ebp - 0x174]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov eax, dword [eax - 0x94]
mov eax, dword [eax + 0xa4]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_MultiByteToWideChar]
mov dword [ebp - 0x170], eax
call eax
sub esp, 0x18
mov esi, eax
test eax, eax
je 0x40fc6e
add eax, eax
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
test eax, eax
je 0x410173
mov dword [esp + 0x10], eax
mov dword [ebp - 0x18c], eax
mov eax, dword [ebp - 0x174]
mov dword [esp + 0x14], esi
mov dword [esp + 0xc], edi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov eax, dword [eax - 0x94]
mov eax, dword [eax + 0xa4]
mov dword [esp], eax
mov eax, dword [ebp - 0x170]
call eax
mov edx, dword [ebp - 0x18c]
mov eax, dword [ebp - 0x184]
mov ecx, esi
sub esp, 0x18
mov dword [ebp - 0x174], edx
call sym._write_console
mov edx, dword [ebp - 0x174]
mov dword [ebp - 0x170], eax
mov dword [esp], edx
call dword [sym.imp.ucrtbase.dll_free]
mov esi, dword [ebp - 0x16c]
jmp 0x40f550
mov eax, edi
mov esi, dword [ebp - 0x16c]
and eax, 1
or esi, eax
jne 0x410893
mov eax, dword [ebp - 0x184]
mov ecx, edi
mov edx, ebx
shr ecx, 1
call sym._write_console
mov dword [ebp - 0x170], eax
jmp 0x40f550
cmp edi, 0x10
jne 0x410893
mov eax, dword [ebp - 0x174]
mov eax, dword [eax - 0x94]
mov dword [eax + 0x10], 0
mov eax, dword [ebx]
mov edx, dword [ebx + 8]
mov dword [ebp - 0x184], eax
mov eax, dword [ebx + 4]
mov dword [ebp - 0x18c], eax
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x170], eax
test byte [0x413024], 8
jne 0x4117b9
mov eax, dword [0x414234]
mov ecx, ebx
mov dword [ebp - 0x190], eax
cmp edx, 1
je 0x411720
cmp edx, 2
je 0x4115ee
mov dword [ebp - 0x170], 0xc000000d
test edx, edx
jne 0x40f4f9
mov edi, dword [ebp - 0x174]
mov eax, dword [edi - 0x88]
cmp dword [ebp - 0x184], eax
jae 0x40f6ea
mov esi, dword [edi - 0x84]
mov dword [ebp - 0x170], esi
cmp dword [ebp - 0x18c], esi
jae 0x40f6ea
mov esi, dword [ebp - 0x18c]
mov edi, dword [edi - 0x64]
imul esi, eax
add esi, dword [ebp - 0x184]
mov dword [ebp - 0x174], edi
imul eax, dword [ebp - 0x170]
lea edi, [esi*4]
mov esi, dword [ebp - 0x16c]
shr esi, 1
shl eax, 2
sub eax, edi
sar eax, 2
cmp eax, esi
cmovbe esi, eax
lea eax, [esi + esi]
mov dword [ebp - 0x16c], eax
cmp eax, dword [ebp - 0x190]
ja 0x4115b4
test ebx, ebx
je 0x40faa6
add edi, dword [ebp - 0x174]
jmp 0x411372
movzx eax, word [edi + edx*4]
mov word [ecx + edx*2], ax
inc edx
cmp esi, edx
jne 0x411369
jmp 0x40f385
mov ecx, dword [ebp - 0x16c]
mov edx, dword [0x414234]
cmp ecx, 0x63
jbe 0x410893
test edi, edi
jne 0x410893
mov eax, dword [ebp - 0x174]
mov eax, dword [eax - 4]
add eax, 0x32
add eax, eax
cmp ecx, eax
cmovbe eax, ecx
mov dword [ebp - 0x16c], eax
cmp eax, edx
ja 0x411c5c
test ebx, ebx
je 0x40faa6
mov ecx, dword [ebp - 0x174]
mov esi, dword [ebp - 0x18c]
mov eax, dword [ecx - 0x80]
mov word [esi], ax
mov eax, dword [ecx - 0x7c]
mov word [esi + 2], ax
mov eax, dword [ecx - 0x88]
mov edx, dword [ecx - 0x78]
mov dword [ebp - 0x170], eax
dec eax
cmp eax, edx
cmova eax, edx
mov word [esi + 4], ax
mov eax, dword [ecx - 0x74]
mov word [esi + 6], ax
mov eax, dword [ecx - 0x88]
mov word [esi + 8], ax
mov eax, dword [ecx - 0x84]
mov word [esi + 0xa], ax
movzx eax, word [ecx - 0x70]
mov word [esi + 0xc], ax
movzx eax, word [ecx - 0x6e]
mov word [esi + 0xe], ax
mov eax, dword [ecx - 0x20]
mov word [esi + 0x10], ax
mov eax, dword [ecx - 0x1c]
mov word [esi + 0x12], ax
mov eax, dword [ecx - 0x18]
mov word [esi + 0x14], ax
mov eax, dword [ecx - 0x14]
mov word [esi + 0x16], ax
mov eax, dword [ecx - 0x6c]
mov word [esi + 0x18], ax
mov eax, dword [ecx - 0x68]
mov word [esi + 0x1a], ax
movzx eax, word [ecx - 0x10]
cmp dword [ebp - 0x16c], 0x64
mov word [esi + 0x1c], ax
movzx eax, word [ecx - 0xe]
mov word [esi + 0x1e], ax
movzx eax, word [ecx - 0xc]
mov word [esi + 0x20], ax
movzx eax, word [ecx - 0xa]
mov word [esi + 0x22], ax
lea eax, [esi + 0x24]
lea esi, [ecx - 0x60]
mov ecx, 0x10
mov edi, eax
rep movsd dword es:[edi], dword [esi]
ja 0x411c2c
test byte [0x413024], 8
je 0x40fc6e
mov eax, dword [ebp - 0x18c]
lea ebx, [eax + 0x64]
mov eax, ebx
shr eax, 0x10
je 0x411c12
mov eax, dword [ebp - 0x16c]
mov dword [esp], ebx
lea esi, [eax - 0x64]
shr esi, 1
mov dword [esp + 4], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
push ecx
push ecx
test eax, eax
jne 0x411c08
mov eax, ebx
mov edx, esi
call sym._wine_dbgstr_wn.part.0
mov ebx, eax
mov ecx, dword [ebp - 0x18c]
movsx edx, word [ecx + 0x1e]
movsx edi, word [ecx + 0x1c]
movsx esi, word [ecx + 0xe]
movsx ecx, word [ecx + 0xc]
mov dword [ebp - 0x190], edx
mov edx, dword [ebp - 0x174]
mov dword [ebp - 0x170], ecx
mov eax, dword [edx - 0x14]
mov dword [esp + 0x10], eax
mov eax, dword [edx - 0x18]
mov dword [esp + 0xc], eax
mov eax, dword [edx - 0x1c]
mov dword [esp + 8], eax
mov eax, dword [edx - 0x20]
mov dword [esp], str.__d__d____d__d_
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf
mov ecx, dword [ebp - 0x170]
mov edx, dword [ebp - 0x190]
mov dword [esp + 0x40], ebx
mov dword [esp + 0x38], edi
mov dword [esp + 0x30], ecx
mov ecx, dword [ebp - 0x18c]
mov dword [esp + 0x3c], edx
mov dword [esp + 0x34], esi
mov dword [esp + 0x2c], eax
movsx eax, word [ecx + 0xa]
mov dword [esp + 0x28], eax
movsx eax, word [ecx + 8]
mov dword [esp + 0x24], eax
movsx eax, word [ecx + 6]
mov dword [esp + 0x20], eax
movsx eax, word [ecx + 4]
mov dword [esp + 0x1c], eax
movsx eax, word [ecx + 2]
mov dword [esp + 0x18], eax
movsx eax, word [ecx]
mov dword [esp + 0xc], str._p_cursor_size_u_cursor_visible_x_cursor__u__u__width_u_height_u_win_s_attr_x_popup_attr_x_font_width_u_font_height_u__s_n
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x184]
mov dword [esp + 8], str.get_output_info
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x413024
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
mov ebx, dword [0x414230]
jmp 0x40f385
mov dword [ebp - 0x170], edx
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
mov ecx, eax
test eax, eax
je 0x410173
mov dword [0x414230], eax
mov eax, dword [ebp - 0x16c]
mov ebx, ecx
mov edx, dword [ebp - 0x170]
mov dword [0x414234], eax
jmp 0x411361
mov eax, dword [ebp - 0x16c]
cmp eax, 7
jbe 0x410893
mov edx, dword [ebp - 0x170]
test edx, edx
je 0x410893
mov esi, dword [ebp - 0x174]
mov edi, dword [esi - 0x88]
cmp dword [ebp - 0x184], edi
jae 0x410893
mov esi, dword [esi - 0x84]
cmp dword [ebp - 0x18c], esi
jae 0x410893
shl edx, 2
sub eax, 8
sub esi, dword [ebp - 0x18c]
mov dword [ebp - 0x16c], edx
xor edx, edx
div dword [ebp - 0x16c]
mov edx, esi
cmp eax, esi
mov esi, dword [ebp - 0x170]
cmovbe edx, eax
sub edi, dword [ebp - 0x184]
cmp edi, esi
cmova edi, esi
mov eax, edi
imul eax, edx
lea eax, [eax*4 + 8]
mov dword [ebp - 0x16c], eax
cmp eax, dword [ebp - 0x190]
ja 0x411810
test ebx, ebx
je 0x40faa6
movzx eax, word [ebp - 0x184]
mov esi, edi
mov ebx, dword [ebp - 0x18c]
shl esi, 2
mov word [ecx], ax
mov eax, edi
movzx edi, word [ebp - 0x184]
mov word [ecx + 2], bx
lea eax, [edi + eax - 1]
mov edi, ebx
mov dword [ebp - 0x170], esi
mov word [ecx + 4], ax
mov eax, ebx
mov esi, edi
lea ebx, [ecx + 8]
lea eax, [eax + edx - 1]
mov word [ecx + 6], ax
lea eax, [edi + edx]
mov edi, dword [ebp - 0x184]
mov dword [ebp - 0x18c], eax
jmp 0x411713
mov ecx, dword [ebp - 0x174]
mov eax, dword [ecx - 0x88]
mov edx, dword [ecx - 0x64]
mov dword [esp], ebx
mov ecx, dword [ebp - 0x170]
imul eax, esi
inc esi
mov dword [esp + 8], ecx
add eax, edi
lea eax, [edx + eax*4]
mov dword [esp + 4], eax
call sym._memcpy
add ebx, dword [ebp - 0x170]
cmp dword [ebp - 0x18c], esi
jne 0x4116df
jmp 0x40fc6e
mov edi, dword [ebp - 0x174]
mov eax, dword [edi - 0x88]
cmp dword [ebp - 0x184], eax
jae 0x40f6ea
mov edx, dword [edi - 0x84]
cmp dword [ebp - 0x18c], edx
jae 0x40f6ea
mov esi, dword [edi - 0x64]
mov dword [ebp - 0x170], esi
mov esi, dword [ebp - 0x18c]
imul esi, eax
add esi, dword [ebp - 0x184]
imul eax, edx
shl esi, 2
mov edx, dword [ebp - 0x16c]
shr edx, 1
shl eax, 2
mov edi, edx
sub eax, esi
sar eax, 2
cmp eax, edx
cmovbe edi, eax
lea eax, [edi + edi]
mov dword [ebp - 0x16c], eax
cmp eax, dword [ebp - 0x190]
ja 0x411845
test ebx, ebx
je 0x40faa6
xor eax, eax
add esi, dword [ebp - 0x170]
jmp 0x4117b0
movzx edx, word [esi + eax*4 + 2]
mov word [ecx + eax*2], dx
inc eax
cmp edi, eax
jne 0x4117a6
jmp 0x40f385
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x18c]
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x184]
mov dword [esp + 0xc], str.__u__u__mode__u_width__u_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.read_output
mov dword [esp + 4], 0x413024
mov dword [esp], 3
mov dword [ebp - 0x190], edx
call sym._wine_dbg_log.constprop.0
mov ebx, dword [0x414230]
mov edx, dword [ebp - 0x190]
jmp 0x4112a8
mov dword [ebp - 0x170], edx
mov esi, eax
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
mov ecx, eax
test eax, eax
je 0x410173
mov dword [0x414230], eax
mov edx, dword [ebp - 0x170]
mov dword [0x414234], esi
jmp 0x41168d
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
mov ecx, eax
test eax, eax
je 0x410173
mov dword [0x414230], eax
mov eax, dword [ebp - 0x16c]
mov ebx, ecx
mov dword [0x414234], eax
jmp 0x41179c
mov ecx, dword [ebp - 0x16c]
lea eax, [ecx - 4]
and eax, 0xfffffffb
jne 0x410893
cmp edi, 0xf
jbe 0x410893
mov eax, dword [ebp - 0x174]
mov eax, dword [eax - 0x94]
mov dword [eax + 0x10], 0
cmp ecx, 8
je 0x410889
xor eax, eax
cmp dword [ebx + 8], 2
sete al
xor edx, edx
lea ecx, [eax + eax + 2]
lea eax, [edi - 0x10]
div ecx
mov dword [ebp - 0x19c], ecx
mov dword [ebp - 0x170], eax
test byte [0x413024], 8
jne 0x4119ff
mov eax, dword [ebp - 0x174]
mov eax, dword [eax - 0x88]
cmp dword [ebx], eax
jae 0x40fa2b
lea esi, [ebx + 0x10]
xor edi, edi
cmp dword [ebp - 0x170], edi
je 0x4119b2
mov edx, dword [ebx + 0xc]
mov eax, dword [ebx]
mov ecx, dword [ebp - 0x174]
mov dword [ebp - 0x190], edx
mov edx, dword [ebx + 4]
mov dword [ebp - 0x198], eax
mov eax, dword [ecx - 0x88]
mov dword [ebp - 0x1a0], edx
mov ecx, edx
mov edx, dword [ebp - 0x190]
mov dword [ebp - 0x194], eax
test edx, edx
je 0x41199a
mov eax, edi
xor edx, edx
div dword [ebp - 0x190]
add edx, dword [ebp - 0x198]
cmp edx, dword [ebp - 0x194]
jae 0x41198e
add eax, ecx
mov ecx, dword [ebp - 0x174]
cmp dword [ecx - 0x84], eax
jbe 0x4119b2
imul eax, dword [ebp - 0x194]
add eax, edx
mov edx, dword [ecx - 0x64]
lea eax, [edx + eax*4]
mov edx, dword [ebx + 8]
cmp edx, 1
je 0x411cb0
cmp edx, 2
je 0x411ca7
test edx, edx
jne 0x40fb30
movzx edx, word [esi]
mov word [eax], dx
inc edi
add esi, dword [ebp - 0x19c]
jmp 0x4118f0
mov eax, dword [ebp - 0x198]
xor edx, edx
add eax, edi
div dword [ebp - 0x194]
add eax, dword [ebp - 0x1a0]
jmp 0x41194e
test edi, edi
je 0x4119cd
mov eax, dword [ebp - 0x174]
mov ecx, dword [ebp - 0x184]
mov eax, dword [eax - 0x94]
cmp ecx, dword [eax + 8]
je 0x411a39
mov ebx, dword [0x414230]
cmp dword [ebp - 0x16c], 8
mov eax, dword [0x414234]
mov ecx, ebx
je 0x411b1e
cmp eax, 3
jbe 0x411aeb
test ebx, ebx
je 0x40faa6
mov dword [ecx], edi
jmp 0x40f385
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 0x4118d7
mov esi, dword [ebx]
mov dword [ebp - 0x148], esi
mov ecx, dword [ebx + 4]
mov dword [ebp - 0x144], ecx
mov ebx, dword [ebx + 0xc]
test ebx, ebx
je 0x411b88
mov eax, dword [ebp - 0x170]
xor edx, edx
div ebx
mov edx, dword [ebp - 0x174]
add ecx, eax
mov eax, dword [edx - 0x84]
cmp ecx, eax
cmovbe eax, ecx
add ebx, esi
dec eax
mov dword [ebp - 0x13c], eax
cmp dword [edx - 0x88], ebx
cmovbe ebx, dword [edx - 0x88]
lea eax, [ebx - 1]
mov dword [ebp - 0x140], eax
mov eax, dword [ebp - 0x184]
mov edx, dword [ebp - 0x178]
call sym._update_output
mov eax, dword [ebp - 0x174]
mov eax, dword [eax - 0x94]
call sym._tty_sync
jmp 0x4119cd
mov eax, dword [ebp - 0x184]
mov dword [esp + 0xc], 0x415480
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 0x40fdac
mov dword [esp + 4], 4
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
mov ecx, eax
test eax, eax
je 0x410173
mov dword [0x414230], eax
mov ebx, eax
mov dword [0x414234], 4
mov dword [ecx], edi
jmp 0x40f385
mov edi, dword [ebp - 0x18c]
mov esi, dword [edi + 0xc]
mov edx, dword [edi]
mov edi, dword [edi + 4]
cmp eax, 7
jbe 0x411bc0
test ebx, ebx
je 0x40faa6
mov word [ecx], dx
lea eax, [esi + edx]
mov edx, dword [ebp - 0x174]
mov word [ecx + 2], di
cmp dword [edx - 0x88], eax
cmovbe eax, dword [edx - 0x88]
xor edx, edx
dec eax
mov word [ecx + 4], ax
mov eax, dword [ebp - 0x170]
div esi
mov edx, dword [ebp - 0x174]
add edi, eax
mov eax, dword [edx - 0x84]
cmp edi, eax
cmova edi, eax
lea eax, [edi - 1]
mov word [ecx + 6], ax
jmp 0x40f385
mov eax, dword [ebp - 0x174]
lea ebx, [edi + esi - 1]
xor edx, edx
mov esi, dword [eax - 0x88]
mov eax, ebx
div esi
add eax, ecx
mov dword [ebp - 0x13c], eax
cmp ecx, eax
je 0x411bfd
mov dword [ebp - 0x148], 0
dec esi
mov dword [ebp - 0x140], esi
jmp 0x411a91
mov dword [ebp - 0x184], edx
mov dword [esp + 4], 8
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_realloc]
mov edx, dword [ebp - 0x184]
test eax, eax
mov ecx, eax
je 0x40faa0
mov dword [0x414230], eax
mov ebx, eax
mov dword [0x414234], 8
jmp 0x411b3d
mov dword [ebp - 0x140], ebx
jmp 0x411a91
mov ebx, 0x415068
jmp 0x4114d2
movzx ebx, bx
mov dword [esp], 0x415072
mov dword [esp + 4], ebx
call sym._wine_dbg_sprintf
mov ebx, eax
jmp 0x4114d2
mov esi, dword [ebp - 0x174]
mov eax, dword [ebp - 0x18c]
mov ecx, dword [ebp - 0x16c]
mov edx, dword [esi - 8]
add eax, 0x64
sub ecx, 0x64
mov dword [esp], eax
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
call sym._memcpy
jmp 0x411484
mov dword [esp + 4], eax
mov esi, eax
mov eax, dword [ebp - 0x18c]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_realloc]
mov dword [ebp - 0x18c], eax
test eax, eax
je 0x410173
mov dword [0x414230], eax
mov dword [0x414234], esi
jmp 0x4113c1
call sym._set_tty_cursor_relative
jmp 0x40fee7
cmp ecx, dword [esi - 0x74]
jne 0x40fec7
jmp 0x40fef4
mov edx, dword [esi]
mov dword [eax], edx
jmp 0x41198e
movzx edx, word [esi]
mov word [eax + 2], dx
jmp 0x41198e