Function at 0x487820
Capabilities:
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff18
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0xd0], ecx
mov dword [ebp - 0x1c], ecx
mov esi, eax
lea edi, [ebp - 0x2c]
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 0x487aa4
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0x2c]
push eax
call sub.kernel32.dll_GetExitCodeProcess
mov word [ebp - 0x14], 0
mov word [ebp - 0x12], 0
mov eax, dword [0x48d6a0]
mov byte [eax], 0x2e
xor eax, eax
mov dword [ebp - 0x10], eax
xor edi, edi
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x14]
push 0x50
lea eax, [ebp - 0xcc]
push eax
mov eax, dword [0x48ed0c]
push eax
call sub.kernel32.dll_ReadConsoleOutputCharacterA
lea eax, [ebp - 0xd0]
lea edx, [ebp - 0xcc]
mov ecx, 0x50
call fcn.00404d54
mov edx, dword [ebp - 0xd0]
mov eax, 0x487abc
call fcn.004050e8
mov edi, eax
dec edi
cmp edi, 0xffffffff
jg 0x4878ec
inc word [ebp - 0x12]
cmp word [ebp - 0x12], 0x14
jle 0x487879
mov word [ebp - 0x12], 0
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0x2c]
push eax
call sub.kernel32.dll_GetExitCodeProcess
cmp dword [ebp - 8], 2
jbe 0x487a83
jmp 0x487879
cmp dword [ebp - 8], 2
jbe 0x487a83
xor eax, eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x14]
push 0x50
lea eax, [ebp - 0x7c]
push eax
mov eax, dword [0x48ed0c]
push eax
call sub.kernel32.dll_ReadConsoleOutputCharacterA
cmp byte [ebp + edi - 0xcc], 0x5b
jne 0x487a53
mov eax, dword [ebp - 0x10]
add eax, edi
inc eax
lea esi, [edi + 0x42]
sub esi, eax
jl 0x487948
inc esi
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
lea ebx, [ebp + eax - 0xcc]
cmp byte [ebx], 0x2a
jne 0x487948
inc dword [ebp - 0x10]
inc ebx
dec esi
jne 0x48793c
cmp byte [ebp - 1], 0
je 0x487a26
lea eax, [ebp - 0xd4]
mov dl, byte [ebp - 0x87]
mov byte [eax + 1], dl
mov byte [eax], 1
lea edx, [ebp - 0xd4]
lea eax, [ebp - 0xd8]
call fcn.004033d4
lea eax, [ebp - 0xdc]
mov dl, byte [ebp - 0x86]
mov byte [eax + 1], dl
mov byte [eax], 1
lea edx, [ebp - 0xdc]
lea eax, [ebp - 0xd8]
mov cl, 2
call fcn.004033a4
lea edx, [ebp - 0xd8]
lea eax, [ebp - 0xe0]
call fcn.004033d4
lea eax, [ebp - 0xdc]
mov dl, byte [ebp - 0x85]
mov byte [eax + 1], dl
mov byte [eax], 1
lea edx, [ebp - 0xdc]
lea eax, [ebp - 0xe0]
mov cl, 3
call fcn.004033a4
lea edx, [ebp - 0xe0]
lea eax, [ebp - 0xe8]
call fcn.004033d4
lea eax, [ebp - 0xdc]
mov dl, byte [ebp - 0x84]
mov byte [eax + 1], dl
mov byte [eax], 1
lea edx, [ebp - 0xdc]
lea eax, [ebp - 0xe8]
mov cl, 4
call fcn.004033a4
lea edx, [ebp - 0xe8]
lea eax, [ebp - 0x1c]
call fcn.00404d48
mov eax, dword [ebp - 0x1c]
call fcn.0040aaa4
call fcn.00402f88
call fcn.004877d0
fild dword [ebp - 0x10]
fdiv dword [0x487ac0]
fmul dword [0x487ac4]
add esp, 0xfffffff4
fstp xword [esp]
wait
call fcn.0042cccc
mov edx, eax
mov eax, dword [0x48ed08]
mov eax, dword [eax + 0x344]
call fcn.00480d88
cmp dword [ebp - 0x10], 0x40
je 0x487a83
push 0x32
call sub.kernel32.dll_Sleep_1
mov eax, dword [0x48d53c]
mov eax, dword [eax]
call fcn.0047e5cc
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0x2c]
push eax
call sub.kernel32.dll_GetExitCodeProcess
cmp dword [ebp - 8], 2
ja 0x4878f6
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x487aab
lea eax, [ebp - 0xd0]
call fcn.00404ae4
lea eax, [ebp - 0x1c]
call fcn.00404ae4
ret