Function at 0x410f30
Capabilities:
Manipulate console buffer

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x30
mov edi, dword [esp + 0x44]
cmp byte [ecx], 0
mov esi, ecx
je 0x410fbe
mov ebx, dword [esp + 0x48]
push 0x573691
call fcn.00439ea0
add esp, 4
test ebx, ebx
je 0x411028
mov ecx, dword [sym.imp.msvcrt.dll__iob]
mov eax, dword [edi]
add ecx, 0x20
push ecx
push dword [eax - 0xc]
push 1
push eax
call fcn.00439f70
add esp, 0x10
mov eax, esp
lea ecx, [esp + 0x14]
push eax
push 0x57368f
call fcn.005350b0
mov ecx, dword [sym.imp.msvcrt.dll__iob]
mov eax, dword [esp + 0x14]
add ecx, 0x20
push ecx
push dword [eax - 0xc]
push 1
push eax
call fcn.00439f70
add esp, 0x10
mov eax, dword [esp + 0x14]
lea ecx, [eax - 0xc]
cmp ecx, 0x56dff0
jne 0x411155
mov byte [esi + 1], 1
jmp 0x41114b
lea esi, [esp + 0x14]
mov ecx, esi
push edi
call fcn.00535150
mov ecx, esi
push 1
push 0x57368f
call fcn.00533e50
mov ecx, dword [sym.imp.msvcrt.dll__iob]
mov eax, dword [esp + 0x14]
add ecx, 0x20
push ecx
push dword [eax - 0xc]
push 1
push eax
call fcn.00439f70
add esp, 0x10
mov eax, dword [esp + 0x14]
lea ecx, [eax - 0xc]
cmp ecx, 0x56dff0
je 0x41114b
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x41114b
lea eax, [esp + 4]
push eax
call fcn.00533980
jmp 0x41114b
lea eax, [esp + 0x14]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
movsx eax, word [esp + 0x14]
lea ebp, [esp + 4]
push eax
push edi
push ebp
call fcn.00410d80
add esp, 0xc
mov ecx, edi
push ebp
call fcn.00533c10
mov eax, dword [esp + 4]
lea ecx, [eax - 0xc]
cmp ecx, 0x56dff0
jne 0x411176
movsx edx, word [esp + 0x14]
movzx eax, word [esp + 0x18]
movzx ecx, word [esp + 0x1a]
mov word [esp + 4], ax
test edx, edx
lea eax, [edx + eax - 1]
mov word [esp + 6], cx
mov word [esp + 8], ax
mov word [esp + 0xa], cx
je 0x41110e
test dx, dx
js 0x411195
mov ebp, edx
mov dword [esp + 0xc], edx
shl ebp, 2
push ebp
call fcn.00564040
add esp, 4
mov ebx, eax
push ebp
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
movzx eax, word [esp + 0x14]
test ax, ax
je 0x411104
mov ecx, dword [edi]
xor ebp, ebp
nop word [eax + eax]
cmp ebp, dword [ecx - 0xc]
mov dl, 0x20
jae 0x4110ef
cmp dword [ecx - 4], 0
js 0x4110eb
mov ecx, edi
call fcn.00533360
mov ecx, dword [edi]
movzx eax, word [esp + 0x14]
movzx edx, byte [ecx + ebp]
mov byte [ebx + ebp*4], dl
movzx edx, word [esp + 0x1c]
mov word [ebx + ebp*4 + 2], dx
inc ebp
movsx edx, ax
cmp ebp, edx
jb 0x4110d0
mov edx, dword [esp + 0xc]
lea ebp, [esp + 4]
jmp 0x411110
xor ebx, ebx
mov eax, dword [esi + 4]
mov word [esp + 0x10], dx
mov word [esp + 0x12], 1
mov dword [esp + 0x2c], 0
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x10]
push ebp
push ecx
push edx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleOutputW]
test ebx, ebx
mov byte [esi + 1], 0
je 0x41114b
push ebx
call fcn.00563f90
add esp, 4
add esp, 0x30
pop esi
pop edi
pop ebx
pop ebp
ret 8
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x410fb5
lea eax, [esp + 4]
push eax
call fcn.00533980
jmp 0x410fb5
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x411065
mov eax, esp
push eax
call fcn.00533980
jmp 0x411065
call fcn.0055dfc0
nop word [eax + eax]