Function at 0x1007047
Capabilities:
Manipulate console buffer

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
push esi
push edi
xor edi, edi
mov word [ebp - 0x10], di
mov word [ebp - 0xe], di
call fcn.01006687
mov eax, dword [0x1025cb8]
mov esi, dword [ebp + 0x10]
push 0x2a
lea edx, [eax + esi]
pop ecx
cmp edx, ecx
jb 0x1007399
cmp eax, edi
jne 0x1007080
mov ebx, dword [ebp + 0x14]
jmp 0x10070bd
cmp eax, ecx
jae 0x10070b3
mov esi, dword [ebp + 0x14]
sub ecx, eax
mov ebx, ecx
shr ecx, 2
lea edi, [eax + 0x1010ca0]
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
push 0x2a
rep movsb byte es:[edi], byte [esi]
pop ecx
sub ecx, eax
push 0x2a
add edx, 0xffffffd6
add dword [ebp + 0x14], ecx
pop eax
mov dword [ebp + 0x10], edx
mov dword [0x1025cb8], eax
mov esi, dword [ebp + 0x10]
mov ebx, 0x1010ca0
xor edi, edi
mov dx, word [ebx + 0x1e]
cmp dx, 0x12c
jg 0x1007390
cmp dx, di
jl 0x1007390
mov cx, word [ebx + 0x20]
cmp cx, 0x12c
jg 0x1007390
cmp cx, di
jl 0x1007390
movsx ecx, cx
movsx edx, dx
imul ecx, edx
lea ecx, [ecx*4 + 0x2a]
mov edx, 0x14000
cmp ecx, edx
mov dword [ebp - 0x14], ecx
jg 0x1007390
lea edi, [eax + esi]
cmp edi, ecx
jl 0x10073f7
test eax, eax
jne 0x100712f
mov eax, dword [ebp + 0x14]
add eax, 0x2a
sub esi, ecx
add dword [ebp + 0x14], ecx
mov dword [ebp - 4], eax
mov dword [ebp + 0x10], esi
jmp 0x1007161
sub ecx, eax
cmp ecx, edx
mov dword [ebp - 0x18], ecx
jge 0x1007161
mov esi, dword [ebp + 0x14]
mov edx, ecx
shr ecx, 2
lea edi, [eax + 0x1010ca0]
sub eax, dword [ebp - 0x14]
rep movsd dword es:[edi], dword [esi]
add dword [ebp + 0x10], eax
mov ecx, edx
and ecx, 3
mov eax, edx
add dword [ebp + 0x14], eax
rep movsb byte es:[edi], byte [esi]
mov dword [ebp - 4], 0x1010cca
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x38]
push eax
push dword [esi + 0x7b8]
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
xor edi, edi
test eax, eax
jne 0x100718a
mov word [ebp - 0x28], di
mov word [ebp - 0x2c], di
mov word [ebp - 0x2a], di
mov word [ebp - 0x2e], di
test byte [0x102aa64], 1
je 0x1007197
dec word [ebp - 0x28]
mov ax, word [ebp - 0x2c]
add word [ebx + 0x18], ax
mov ax, word [ebp - 0x2e]
mov cx, word [ebx + 0x1e]
add word [ebx + 0x16], ax
cmp cx, di
jne 0x10071ba
cmp word [ebx + 0x20], di
je 0x1007352
mov ax, word [ebx + 8]
cmp ax, di
jne 0x10071e3
mov dx, word [ebp - 0x2c]
add word [ebx + 0x24], dx
mov dx, word [ebp - 0x2e]
add word [ebx + 0x22], dx
mov dx, word [ebp - 0x2e]
add word [ebx + 0x26], dx
mov dx, word [ebp - 0x2c]
add word [ebx + 0x28], dx
cmp ax, 1
jne 0x1007321
mov ax, word [ebx + 0x22]
cmp ax, di
mov dx, word [ebp - 0x28]
jle 0x100723a
cmp word [ebx + 0x20], 1
jne 0x100723a
movsx esi, word [ebp - 0x2c]
movsx edi, dx
sub edi, esi
movsx esi, word [ebx + 0x24]
inc edi
cmp esi, edi
jge 0x100723a
mov word [ebx + 0x24], dx
mov edx, dword [ebp - 0x2e]
add eax, edx
dec ecx
add word [ebx + 0x26], cx
mov word [ebx + 0x22], ax
mov ax, word [ebp - 0x28]
mov word [ebx + 0x28], ax
mov ax, word [ebp - 0x28]
mov word [ebx + 0x18], ax
jmp 0x1007321
mov ax, word [ebx + 0x20]
movsx edi, word [ebp - 0x36]
movsx esi, ax
movsx edx, dx
add edx, esi
dec edi
cmp edx, edi
jle 0x10072bb
xor ecx, ecx
mov word [ebp - 0x1e], ax
mov eax, dword [ebp - 0x36]
dec eax
mov word [ebp - 0x1a], ax
mov eax, dword [ebp - 0x38]
dec eax
test byte [0x102aa64], 1
mov word [ebp - 0xc], cx
mov word [ebp - 0xa], cx
mov word [ebp - 0x20], cx
mov word [ebp - 0x1c], ax
je 0x100727e
inc word [ebp - 0x1a]
mov ax, word [ebp - 0x30]
mov word [ebp - 6], ax
lea eax, [ebp - 8]
push eax
push dword [ebp - 0xc]
lea eax, [ebp - 0x20]
push ecx
push eax
mov eax, dword [ebp + 8]
push dword [eax + 0x7b8]
mov word [ebp - 8], 0x20
call dword [sym.imp.KERNEL32.dll_ScrollConsoleScreenBufferW]
xor eax, eax
mov ax, word [ebp - 0x28]
sub ax, word [ebx + 0x20]
inc eax
mov word [ebx + 0x24], ax
jmp 0x1007225
mov edx, dword [ebp - 0x28]
inc edx
dec ecx
mov word [ebx + 0x24], dx
mov dx, word [ebp - 0x2e]
mov word [ebx + 0x26], cx
mov word [ebx + 0x22], dx
mov ecx, dword [ebp - 0x28]
add ecx, eax
mov word [ebx + 0x28], cx
mov ecx, dword [ebp - 0x28]
add ecx, eax
mov word [ebx + 0x18], cx
test byte [0x102aa64], 1
je 0x1007321
mov cx, word [ebp - 0x28]
movsx edx, cx
add edx, esi
movsx esi, word [ebp - 0x36]
cmp edx, esi
jge 0x100730a
add word [ebp - 0x2c], ax
add cx, word [ebx + 0x20]
mov word [ebp - 0x28], cx
jmp 0x1007321
mov eax, dword [ebp - 0x28]
sub eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x36]
dec ecx
mov word [ebp - 0x28], cx
mov ecx, dword [ebp - 0x28]
sub ecx, eax
mov word [ebp - 0x2c], cx
mov esi, dword [ebp + 8]
lea eax, [ebx + 0x22]
push eax
push dword [ebp - 0x10]
push dword [ebx + 0x1e]
push dword [ebp - 4]
push dword [esi + 0x7b8]
call dword [sym.imp.KERNEL32.dll_WriteConsoleOutputW]
xor edi, edi
cmp dword [0x101074c], edi
je 0x1007352
push dword [ebx + 0x1e]
push dword [ebp - 4]
call fcn.0100629b
test byte [0x102aa64], 1
je 0x1007371
inc word [ebp - 0x28]
lea eax, [ebp - 0x2e]
push eax
push 1
push dword [esi + 0x7b8]
call dword [sym.imp.KERNEL32.dll_SetConsoleWindowInfo]
push dword [ebx + 0x16]
push dword [esi + 0x7b8]
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
xor eax, eax
cmp dword [ebp + 0x10], edi
mov dword [0x1025cb8], eax
jge 0x1007066
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x10
cmp dword [0x100f86c], edi
je 0x10073c3
push 0xa
push 0x1001d8c
push dword [ebp + 0x14]
mov dword [0x100f86c], edi
call dword [sym.imp.msvcrt.dll_strncmp]
add esp, 0xc
test eax, eax
je 0x1007390
mov eax, dword [0x1025cb8]
lea edx, [eax + esi]
cmp edx, 0x14000
jge 0x10073ed
mov ecx, esi
mov esi, dword [ebp + 0x14]
lea edi, [eax + 0x1010ca0]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
mov dword [0x1025cb8], edx
rep movsb byte es:[edi], byte [esi]
call fcn.0100664d
xor eax, eax
inc eax
jmp 0x1007392
mov ecx, esi
mov esi, dword [ebp + 0x14]
mov edx, ecx
shr ecx, 2
lea edi, [eax + 0x1010ca0]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
add eax, dword [ebp + 0x10]
mov dword [0x1025cb8], eax
jmp 0x10073eb