Function at 0x46b078
Capabilities:
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
push ebx
mov ebx, eax
xor eax, eax
xor ecx, ecx
push esi
push edi
mov word [ebp - 0x28], cx
lea edi, [ebp - 0x26]
stosw word es:[edi], ax
mov word [ebp - 0x30], cx
lea edi, [ebp - 0x2e]
stosw word es:[edi], ax
mov word [ebp - 0x38], cx
lea edi, [ebp - 0x36]
stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
mov word [ebp - 0x60], cx
mov esi, dword [ebp + 8]
lea edi, [ebp - 0x5e]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [ebp - 0x48], ecx
xor eax, eax
lea edi, [ebp - 0x44]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov edi, 0x320
call fcn.0046d27e
test eax, eax
je 0x46b4a7
mov edi, esi
mov eax, edi
call fcn.0046d2cc
test eax, eax
je 0x46b4a7
cmp dword [edi + 0x14], 0
je 0x46b4a0
call fcn.0040d0e1
test eax, eax
mov dword [ebp - 0x18], eax
je 0x46b4a0
cmp eax, 0xffffffff
je 0x46b4a0
lea ecx, [ebp - 0x60]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x46b4a0
movsx ecx, word [ebp - 0x56]
movsx eax, word [ebp - 0x52]
mov esi, dword [ebp + 0x10]
sub eax, ecx
movsx ecx, word [ebp - 0x54]
inc eax
mov dword [ebp - 8], eax
movsx eax, word [ebp - 0x50]
sub eax, ecx
inc eax
test esi, esi
mov dword [ebp - 4], eax
jne 0x46b150
and dword [ebp - 0x44], esi
and dword [ebp - 0x48], esi
mov eax, dword [edi + 4]
mov edx, dword [edi]
dec eax
dec edx
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x40], edx
jmp 0x46b177
lea edi, [ebp - 0x48]
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 eax, dword [ebp - 0x44]
xor ecx, ecx
cmp eax, ecx
jge 0x46b166
sub dword [ebp + 0xc], eax
mov dword [ebp - 0x44], ecx
cmp dword [ebp - 0x48], ecx
mov edx, dword [ebp - 0x40]
mov edi, dword [ebp + 8]
jge 0x46b177
sub ebx, dword [ebp - 0x48]
mov dword [ebp - 0x48], ecx
mov eax, dword [edi + 4]
cmp dword [ebp - 0x3c], eax
jl 0x46b183
dec eax
mov dword [ebp - 0x3c], eax
mov eax, dword [edi]
cmp edx, eax
jl 0x46b18f
lea edx, [eax - 1]
mov dword [ebp - 0x40], edx
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x46b209
mov esi, dword [ebp + 0xc]
cmp esi, dword [ecx + 4]
jge 0x46b1ab
mov eax, dword [ecx + 4]
mov edi, eax
sub edi, esi
add dword [ebp - 0x44], edi
mov dword [ebp + 0xc], eax
sub esp, 0x10
lea esi, [ebp - 0x48]
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.0043c0ca
mov edi, dword [ebp + 0xc]
mov esi, dword [ecx + 0xc]
add edi, eax
add esp, 0x10
cmp edi, esi
jle 0x46b1d3
sub esi, eax
sub esi, dword [ebp + 0xc]
add dword [ebp - 0x3c], esi
mov eax, dword [ecx]
cmp ebx, eax
jge 0x46b1e2
mov esi, eax
sub esi, ebx
add dword [ebp - 0x48], esi
mov ebx, eax
sub esp, 0x10
lea esi, [ebp - 0x48]
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.0043c0b2
mov ecx, dword [ecx + 8]
mov edi, dword [ebp + 8]
lea esi, [eax + ebx]
add esp, 0x10
cmp esi, ecx
jle 0x46b209
sub ecx, eax
sub ecx, ebx
add edx, ecx
mov ecx, dword [ebp - 0x3c]
cmp dword [ebp - 0x44], ecx
jg 0x46b493
cmp dword [ebp - 0x48], edx
jg 0x46b493
sub ecx, dword [ebp - 0x44]
mov eax, edx
sub eax, dword [ebp - 0x48]
test ebx, ebx
mov word [ebp - 0x28], ax
mov word [ebp - 0x26], cx
jge 0x46b255
sub dword [ebp - 0x48], ebx
mov ax, word [ebp - 0x48]
mov word [ebp - 0x30], ax
mov eax, edx
sub eax, dword [ebp - 0x48]
xor ebx, ebx
cmp dword [ebp - 0x48], edx
mov word [ebp - 0x28], ax
jle 0x46b262
xor edx, edx
inc edx
jmp 0x46b495
cmp ebx, dword [ebp - 8]
jge 0x46b24d
mov si, word [ebp - 0x48]
mov word [ebp - 0x30], si
movsx eax, ax
mov dword [ebp - 0xc], eax
add eax, ebx
cmp eax, dword [ebp - 8]
jle 0x46b28a
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 0xc]
sub eax, ebx
mov ebx, dword [ebp - 8]
add edx, eax
mov eax, edx
sub eax, dword [ebp - 0x48]
mov word [ebp - 0x28], ax
movsx eax, ax
sub ebx, eax
movsx eax, word [ebp - 0x48]
cmp eax, edx
mov dword [ebp - 0x10], eax
jg 0x46b24d
mov eax, dword [ebp + 0xc]
test eax, eax
jge 0x46b47e
mov edx, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x3c]
and dword [ebp + 0xc], 0
sub edx, eax
sub ecx, edx
cmp edx, dword [ebp - 0x3c]
mov word [ebp - 0x2e], dx
mov word [ebp - 0x26], cx
jg 0x46b24d
mov eax, dword [ebp + 0xc]
movsx ecx, cx
mov dword [ebp + 8], ecx
add ecx, eax
cmp ecx, dword [ebp - 4]
jle 0x46b2ec
mov ecx, dword [ebp - 4]
sub ecx, dword [ebp + 8]
sub ecx, eax
add dword [ebp - 0x3c], ecx
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 4]
sub eax, edx
mov word [ebp - 0x26], ax
movsx eax, ax
sub ecx, eax
mov dword [ebp + 0xc], ecx
mov eax, ecx
movsx ecx, dx
cmp ecx, dword [ebp - 0x3c]
mov dword [ebp + 8], ecx
jg 0x46b24d
xor esi, esi
cmp edx, esi
jge 0x46b306
mov dword [ebp - 0x44], esi
mov edx, esi
cmp dword [ebp - 0x48], esi
jge 0x46b30e
mov dword [ebp - 0x48], esi
sub ebx, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x26]
add ebx, dword [ebp - 0x30]
sub eax, edx
add eax, dword [ebp - 0x2e]
mov word [ebp - 0x38], bx
mov word [ebp - 0x36], ax
mov eax, dword [ebp - 0x36]
mov edx, dword [ebp - 0x38]
add eax, ecx
mov ecx, dword [ebp - 0x28]
add ecx, edx
cmp word [ebp - 0x36], si
mov word [ebp - 0x32], ax
mov word [ebp - 0x34], cx
jge 0x46b343
mov word [ebp - 0x36], si
cmp bx, si
jge 0x46b34c
mov word [ebp - 0x38], si
movsx edx, ax
mov eax, dword [ebp - 4]
cmp edx, eax
jl 0x46b35b
dec eax
mov word [ebp - 0x32], ax
mov eax, dword [ebp - 8]
movsx ecx, cx
cmp ecx, eax
jl 0x46b36a
dec eax
mov word [ebp - 0x34], ax
mov si, word [edi]
mov bx, word [edi + 4]
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x30]
mov word [ebp - 0x28], si
mov word [ebp - 0x26], bx
push dword [ebp - 0x28]
push dword [edi + 0x14]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_WriteConsoleOutputA]
movsx edx, bx
movsx esi, si
mov dword [ebp - 0x20], eax
mov eax, edx
imul eax, esi
xor ecx, ecx
test eax, eax
mov dword [ebp - 0xc], esi
jle 0x46b472
mov ebx, dword [edi + 0x14]
cmp byte [ebx], 0x20
jb 0x46b3ba
inc ecx
add ebx, 4
cmp ecx, eax
jl 0x46b3ad
cmp ecx, eax
jge 0x46b472
push dword [ebp - 0x34]
push dword [ebp - 0x38]
call fcn.0043c0bb
add eax, dword [ebp - 0x10]
pop ecx
cmp eax, esi
pop ecx
mov dword [ebp - 4], eax
jl 0x46b3df
lea eax, [esi - 1]
mov dword [ebp - 4], eax
push dword [ebp - 0x34]
push dword [ebp - 0x38]
call fcn.0043c0d3
pop ecx
pop ecx
mov ecx, eax
mov eax, dword [ebp + 8]
add ecx, eax
cmp ecx, edx
mov dword [ebp - 8], ecx
jl 0x46b400
dec edx
mov dword [ebp - 8], edx
mov ecx, edx
cmp eax, ecx
mov dword [ebp + 8], eax
jg 0x46b472
mov edx, esi
imul edx, eax
mov dword [ebp - 0x1c], edx
mov ebx, dword [ebp - 0x10]
cmp ebx, dword [ebp - 4]
jg 0x46b465
lea esi, [edx + ebx]
shl esi, 2
mov eax, dword [edi + 0x14]
add eax, esi
cmp byte [eax], 0x20
jae 0x46b459
mov ecx, ebx
sub ecx, dword [ebp - 0x30]
add ecx, dword [ebp - 0x38]
mov word [ebp - 0x14], cx
mov ecx, dword [ebp + 8]
sub ecx, dword [ebp - 0x2e]
add ecx, dword [ebp - 0x36]
mov word [ebp - 0x12], cx
lea ecx, [ebp - 0x28]
push ecx
push dword [ebp - 0x14]
push 1
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_WriteConsoleOutputCharacterA]
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 8]
inc ebx
add esi, 4
cmp ebx, dword [ebp - 4]
jle 0x46b41d
mov esi, dword [ebp - 0xc]
inc dword [ebp + 8]
add edx, esi
cmp dword [ebp + 8], ecx
mov dword [ebp - 0x1c], edx
jle 0x46b40f
mov eax, edi
call fcn.0046d2e2
mov eax, dword [ebp - 0x20]
jmp 0x46b4a9
cmp eax, dword [ebp - 4]
jge 0x46b24d
mov edx, dword [ebp - 0x44]
mov word [ebp - 0x2e], dx
jmp 0x46b2be
xor edx, edx
mov eax, edi
call fcn.0046d2e2
mov eax, edx
jmp 0x46b4a9
mov eax, edi
call fcn.0046d2e2
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret