Function at 0x418140
Capabilities:
Hide graphical window
Set console window title

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x4713e0]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x4689fc
mov eax, dword [ebp + 0xc]
push eax
call fcn.00413e00
add esp, 8
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x418332
call dword [sym.imp.KERNEL32.dll_AllocConsole]
test eax, eax
je 0x418330
push str.Console_created_r_n
call fcn.004145f0
add esp, 4
cmp dword [0x4740f4], 0
jne 0x41828d
push 0
push 1
push 0
push 3
push 0xc0000000
call dword [sym.imp.KERNEL32.dll_CreateConsoleScreenBuffer]
mov dword [0x4740f4], eax
cmp dword [0x4740f4], 0
je 0x41828d
push str.Screenbuffer_created_r_n
call fcn.004145f0
add esp, 4
push 0x1c
call dword [sym.imp.USER32.dll_GetSystemMetrics]
cmp eax, 0x50
jge 0x4181de
mov dword [ebp - 0x34], 0x50
jmp 0x4181e9
push 0x1c
call dword [sym.imp.USER32.dll_GetSystemMetrics]
mov dword [ebp - 0x34], eax
mov cx, word [ebp - 0x34]
mov word [ebp - 0x24], cx
push 0x1d
call dword [sym.imp.USER32.dll_GetSystemMetrics]
cmp eax, 0x19
jge 0x418207
mov dword [ebp - 0x30], 0x19
jmp 0x418212
push 0x1d
call dword [sym.imp.USER32.dll_GetSystemMetrics]
mov dword [ebp - 0x30], eax
mov dx, word [ebp - 0x30]
mov word [ebp - 0x22], dx
movsx eax, word [ebp - 0x22]
push eax
movsx ecx, word [ebp - 0x24]
push ecx
push str.Screenbuffer_size__u_x__u_r_n
call fcn.004145f0
add esp, 0xc
mov edx, dword [ebp - 0x24]
push edx
mov eax, dword [0x4740f4]
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleScreenBufferSize]
lea ecx, [ebp - 0x1c]
push ecx
mov edx, dword [0x4740f4]
push edx
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
xor eax, eax
mov word [ebp - 0x2c], ax
xor ecx, ecx
mov word [ebp - 0x2a], cx
movsx edx, word [ebp - 0x2c]
movsx eax, word [ebp - 0xa]
add edx, eax
mov word [ebp - 0x28], dx
movsx ecx, word [ebp - 0x2a]
movsx edx, word [ebp - 8]
add ecx, edx
mov word [ebp - 0x2a], cx
lea eax, [ebp - 0x2c]
push eax
push 1
mov ecx, dword [0x4740f4]
push ecx
call dword [sym.imp.KERNEL32.dll_SetConsoleWindowInfo]
cmp dword [0x4740f4], 0
je 0x4182b4
mov edx, dword [0x4740f4]
push edx
call dword [sym.imp.KERNEL32.dll_SetConsoleActiveScreenBuffer]
test eax, eax
je 0x4182b4
push str.Screenbuffer_assigned_r_n
call fcn.004145f0
add esp, 4
mov eax, 1
shl eax, 2
mov ecx, dword [ebp - 0x20]
movzx edx, byte [ecx + eax]
cmp edx, 0x2c
jne 0x4182d3
mov eax, dword [ebp + 0xc]
add eax, 5
mov dword [ebp - 0x20], eax
jmp 0x4182fc
mov ecx, 1
imul edx, ecx, 0
movzx eax, byte [edx + 0x4850c0]
test eax, eax
je 0x4182ef
mov dword [ebp - 0x38], 0x4850c0
jmp 0x4182f6
mov dword [ebp - 0x38], 0x467800
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
push str.hide
mov eax, dword [ebp - 0x20]
push eax
call fcn.00413e00
add esp, 8
test eax, eax
je 0x418330
call dword [sym.imp.KERNEL32.dll_GetConsoleWindow]
mov dword [ebp - 0x3c], eax
push 0
mov ecx, dword [ebp - 0x3c]
push ecx
call dword [sym.imp.USER32.dll_ShowWindow]
jmp 0x418382
push 0x468ae0
mov edx, dword [ebp + 0xc]
push edx
call fcn.00413e00
add esp, 8
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x418382
call dword [sym.imp.KERNEL32.dll_FreeConsole]
test eax, eax
je 0x418382
push str.Console_closed_r_n
call fcn.004145f0
add esp, 4
cmp dword [0x4740f4], 0
je 0x418378
mov eax, dword [0x4740f4]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x4740f4], 0
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00439b24
mov esp, ebp
pop ebp
ret