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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xa4
mov eax, dword [0x42000c]
xor eax, esp
mov dword [esp + 0xa0], eax
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_AllocConsole]
test eax, eax
je 0x408abe
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
cmp esi, 0xffffffff
je 0x408abe
call dword [sym.imp.KERNEL32.dll_GetConsoleWindow]
mov ebx, eax
mov dword [esp + 0x14], ebx
test ebx, ebx
je 0x408abe
push 0x50
lea eax, [esp + 0x58]
mov dword [esp + 0x14], 0x10
push 0
push eax
mov edi, 8
mov dword [esp + 0x5c], 0x54
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [esp + 0x50]
push eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentConsoleFontEx]
test eax, eax
je 0x408878
movsx eax, word [esp + 0x58]
movsx edi, word [esp + 0x5a]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x28]
push eax
push ebx
call dword [sym.imp.USER32.dll_GetWindowRect]
test eax, eax
je 0x408959
lea eax, [esp + 0x40]
push eax
push ebx
call dword [sym.imp.USER32.dll_GetClientRect]
test eax, eax
je 0x408959
mov eax, dword [esp + 0x40]
mov esi, dword [sym.imp.USER32.dll_ClientToScreen]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x20]
push eax
push ebx
call esi
test eax, eax
je 0x408959
lea eax, [esp + 0x18]
push eax
push ebx
call esi
test eax, eax
je 0x408959
imul eax, dword [esp + 0x10], 0x25
lea ebx, [edi*8]
mov esi, dword [sym.imp.USER32.dll_GetSystemMetrics]
sub ebx, edi
sub ebx, dword [esp + 0x2c]
sub ebx, dword [esp + 0x1c]
add ebx, dword [esp + 0x34]
sub eax, dword [esp + 0x28]
sub eax, dword [esp + 0x18]
add eax, dword [esp + 0x30]
add eax, dword [esp + 0x20]
add ebx, dword [esp + 0x24]
push 1
mov dword [esp + 0x14], eax
call esi
cdq
sub eax, edx
mov edi, eax
mov eax, ebx
cdq
sub eax, edx
sar edi, 1
sar eax, 1
push 0
sub edi, eax
call esi
mov esi, dword [esp + 0x10]
cdq
sub eax, edx
mov ecx, eax
mov eax, esi
push 0
push ebx
mov ebx, dword [esp + 0x1c]
cdq
push esi
sub eax, edx
sar ecx, 1
sar eax, 1
push edi
sub ecx, eax
push ecx
push 0
push ebx
call dword [sym.imp.USER32.dll_SetWindowPos]
push 0
push 0xfffffffffffffff0
push ebx
call dword [sym.imp.USER32.dll_SetWindowLongA]
push 5
push ebx
call dword [sym.imp.USER32.dll_ShowWindow]
push ecx
push 0x10
lea ecx, [esp + 0x30]
call fcn.0040a780
mov esi, eax
cmp esi, 0x420028
je 0x4089fe
mov ecx, dword [0x42003c]
cmp ecx, 8
jb 0x4089be
mov eax, dword [0x420028]
lea ecx, [ecx*2 + 2]
cmp ecx, 0x1000
jb 0x4089b4
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x408a2c
mov eax, edx
push ecx
push eax
call fcn.00416d22
add esp, 8
mov dword [0x420038], 0
xor eax, eax
mov dword [0x42003c], 7
mov word [0x420028], ax
movups xmm0, xmmword [esi]
movups xmmword [0x420028], xmm0
movq xmm0, qword [esi + 0x10]
movq qword [0x420038], xmm0
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], 7
mov word [esi], ax
mov edx, dword [esp + 0x3c]
cmp edx, 8
jb 0x408a3c
mov ecx, dword [esp + 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x408a32
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x408a32
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00416d22
add esp, 8
cmp dword [0x42003c], 8
mov edi, 0x420028
mov ebx, dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
cmovae edi, dword [0x420028]
xor esi, esi
call ebx
xor edx, edx
mov ecx, 0x1a
div ecx
mov ax, word [edx*2 + 0x41b384]
mov word [edi + esi*2], ax
inc esi
cmp esi, 0x10
jl 0x408a57
cmp dword [0x42003c], 8
mov eax, 0x420028
cmovae eax, dword [0x420028]
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleTitleW]
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push 1
call esi
push 1
mov edi, eax
call esi
push edi
push 0x41aa00
push str.CONOUT_
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_freopen_s]
push 0x41a921
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_puts]
add esp, 0x1c
mov ecx, dword [esp + 0xac]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00416887
mov esp, ebp
pop ebp
ret