Function at 0x487894
Capabilities:
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff20
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0xc8], ecx
mov dword [ebp - 0x14], ecx
mov esi, eax
lea edi, [ebp - 0x24]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov byte [ebp - 1], dl
xor eax, eax
push ebp
push 0x487b06
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0x24]
push eax
call sub.kernel32.dll_GetExitCodeProcess
mov word [ebp - 0xc], 0
mov word [ebp - 0xa], 0
mov eax, dword [0x48e6a0]
mov byte [eax], 0x2e
xor edi, edi
xor esi, esi
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0xc]
push 0x50
lea eax, [ebp - 0xc4]
push eax
mov eax, dword [0x48fd0c]
push eax
call sub.kernel32.dll_ReadConsoleOutputCharacterA
lea eax, [ebp - 0xc8]
lea edx, [ebp - 0xc4]
mov ecx, 0x50
call fcn.00404d74
mov edx, dword [ebp - 0xc8]
mov eax, 0x487b1c
call fcn.00405108
mov esi, eax
dec esi
cmp esi, 0xffffffff
jg 0x48795c
inc word [ebp - 0xa]
cmp word [ebp - 0xa], 0x14
jle 0x4878e9
mov word [ebp - 0xa], 0
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0x24]
push eax
call sub.kernel32.dll_GetExitCodeProcess
cmp dword [ebp - 8], 2
jbe 0x487ae5
jmp 0x4878e9
cmp dword [ebp - 8], 2
jbe 0x487ae5
xor eax, eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0xc]
push 0x50
lea eax, [ebp - 0x74]
push eax
mov eax, dword [0x48fd0c]
push eax
call sub.kernel32.dll_ReadConsoleOutputCharacterA
cmp byte [ebp + esi - 0xc4], 0x5b
jne 0x487ab6
lea ecx, [edi + esi + 1]
lea edx, [esi + 0x42]
sub edx, ecx
jl 0x4879ae
inc edx
lea eax, [ebp + ecx - 0xc4]
cmp byte [eax], 0x2a
jne 0x4879ae
inc edi
inc eax
dec edx
jne 0x4879a4
cmp byte [ebp - 1], 0
je 0x487a80
lea eax, [ebp - 0xcc]
mov dl, byte [ebp - 0x7f]
mov byte [eax + 1], dl
mov byte [eax], 1
lea edx, [ebp - 0xcc]
lea eax, [ebp - 0xd0]
call fcn.004033d4
lea eax, [ebp - 0xd4]
mov dl, byte [ebp - 0x7e]
mov byte [eax + 1], dl
mov byte [eax], 1
lea edx, [ebp - 0xd4]
lea eax, [ebp - 0xd0]
mov cl, 2
call fcn.004033a4
lea edx, [ebp - 0xd0]
lea eax, [ebp - 0xd8]
call fcn.004033d4
lea eax, [ebp - 0xd4]
mov dl, byte [ebp - 0x7d]
mov byte [eax + 1], dl
mov byte [eax], 1
lea edx, [ebp - 0xd4]
lea eax, [ebp - 0xd8]
mov cl, 3
call fcn.004033a4
lea edx, [ebp - 0xd8]
lea eax, [ebp - 0xe0]
call fcn.004033d4
lea eax, [ebp - 0xd4]
mov dl, byte [ebp - 0x7c]
mov byte [eax + 1], dl
mov byte [eax], 1
lea edx, [ebp - 0xd4]
lea eax, [ebp - 0xe0]
mov cl, 4
call fcn.004033a4
lea edx, [ebp - 0xe0]
lea eax, [ebp - 0x14]
call fcn.00404d68
mov eax, dword [ebp - 0x14]
call fcn.0040aac4
call fcn.00402f88
call fcn.00487844
mov dword [ebp - 0xd8], edi
fild dword [ebp - 0xd8]
fdiv dword [0x487b20]
fmul dword [0x487b24]
add esp, 0xfffffff4
fstp xword [esp]
wait
call fcn.0042ccec
mov edx, eax
mov eax, dword [0x48fd08]
mov eax, dword [eax + 0x344]
call fcn.00480da8
cmp edi, 0x40
je 0x487ae5
push 0x32
call sub.kernel32.dll_Sleep_1
mov eax, dword [0x48e53c]
mov eax, dword [eax]
call fcn.0047e5ec
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0x24]
push eax
call sub.kernel32.dll_GetExitCodeProcess
cmp dword [ebp - 8], 2
ja 0x487966
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x487b0d
lea eax, [ebp - 0xc8]
call fcn.00404b04
lea eax, [ebp - 0x14]
call fcn.00404b04
ret