Function at 0x414930
Capabilities:
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, ecx
push esi
push ebx
sub esp, 0x5c
mov esi, dword [ebp + 8]
cmp byte [ecx], 0
je 0x414ac8
mov dword [esp], 0x56b5fb
call dbg.adb_printf(char const*, ::)
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x4149a2
mov eax, esi
call dbg.Out
lea eax, [ebp - 0x39]
lea ecx, [ebp - 0x30]
mov dword [esp + 4], eax
mov dword [esp], 0x56b5f9
call dbg.std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)
lea eax, [ebp - 0x30]
sub esp, 8
call dbg.Out
mov eax, dword [ebp - 0x30]
lea ecx, [eax - 0xc]
cmp ecx, 0x566310
jne 0x414b71
mov byte [edi + 1], 1
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8
lea eax, [ebp - 0x30]
mov dword [esp + 4], eax
mov eax, dword [edi + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
movsx eax, word [ebp - 0x30]
sub esp, 8
mov dword [esp + 8], eax
lea eax, [ebp - 0x38]
mov dword [esp], eax
mov dword [esp + 4], esi
call dbg.ElideMiddle(std::string const&, unsigned int)
lea eax, [ebp - 0x38]
mov ecx, esi
mov dword [esp], eax
call dbg.std::string::swap(std::string&)
mov eax, dword [ebp - 0x38]
lea ecx, [eax - 0xc]
sub esp, 4
cmp ecx, 0x566310
jne 0x414b92
movzx edx, word [ebp - 0x30]
movzx ecx, word [ebp - 0x2c]
movzx eax, word [ebp - 0x2a]
mov dword [ebp - 0x50], 0x10000
movsx ebx, dx
mov word [ebp - 0x38], cx
test ebx, ebx
lea ecx, [edx + ecx - 1]
mov word [ebp - 0x50], dx
mov word [ebp - 0x36], ax
mov word [ebp - 0x34], cx
mov word [ebp - 0x32], ax
mov dword [ebp - 0x4c], 0
jne 0x414b30
xor ebx, ebx
test dx, dx
mov eax, dword [ebp - 0x4c]
je 0x414a7b
mov dword [ebp - 0x54], edi
mov edi, esi
mov esi, eax
nop
mov edx, dword [edi]
mov ecx, 0x20
cmp ebx, dword [edx - 0xc]
jae 0x414a60
mov ecx, dword [edx - 4]
test ecx, ecx
js 0x414a5c
mov ecx, edi
call dbg.std::string::_M_leak_hard()
mov edx, dword [edi]
movzx ecx, byte [edx + ebx]
mov byte [esi], cl
movzx edx, word [ebp - 0x28]
add ebx, 1
add esi, 4
mov word [esi - 2], dx
movsx edx, word [ebp - 0x30]
cmp edx, ebx
ja 0x414a40
mov edi, dword [ebp - 0x54]
lea eax, [ebp - 0x38]
mov esi, dword [ebp - 0x4c]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x50]
mov dword [esp + 0xc], 0
mov dword [esp + 4], esi
mov dword [esp + 8], eax
mov eax, dword [edi + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleOutputW]
mov byte [edi + 1], 0
sub esp, 0x14
test esi, esi
je 0x414998
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call dbg.operator delete(void*)
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8
lea ecx, [ebp - 0x30]
mov dword [esp], esi
call dbg.std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&)
lea ecx, [ebp - 0x30]
sub esp, 4
mov dword [esp + 4], 1
mov dword [esp], 0x56b5f9
call dbg.std::string::append(char const*, unsigned int)
lea eax, [ebp - 0x30]
sub esp, 8
call dbg.Out
mov eax, dword [ebp - 0x30]
lea ecx, [eax - 0xc]
cmp ecx, 0x566310
je 0x414998
or edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x414998
lea eax, [ebp - 0x38]
mov dword [esp], eax
call dbg.std::string::_Rep::_M_destroy(std::allocator<char> const&)
push eax
jmp 0x414998
cmp ebx, 0x3fffffff
ja 0x414b6c
lea eax, [ebx*4]
mov dword [esp], eax
call dbg.operator new(unsigned int)
mov dword [ebp - 0x4c], eax
lea esi, [esi]
xor edx, edx
xor ecx, ecx
mov word [eax], dx
add eax, 4
mov word [eax - 2], cx
sub ebx, 1
jne 0x414b50
movzx edx, word [ebp - 0x30]
jmp 0x414a2e
call dbg.std::__throw_bad_alloc()
or edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x414994
lea eax, [ebp - 0x38]
mov dword [esp], eax
call dbg.std::string::_Rep::_M_destroy(std::allocator<char> const&)
push eax
jmp 0x414994
or edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x4149f1
lea eax, [ebp - 0x39]
mov dword [esp], eax
call dbg.std::string::_Rep::_M_destroy(std::allocator<char> const&)
push ebx
jmp 0x4149f1