Function at 0x2bbefa1c0
Capabilities:
Capture screenshot

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xc8
add dword [rcx + 0x90], 1
mov r12d, dword [rsp + 0x130]
mov dword [rsp + 0x128], r9d
mov r13, rcx
mov r14, rdx
mov edi, r8d
test rdx, rdx
je 0x2bbefa4bc
cmp dword [rdx], 1
jne 0x2bbefa370
cmp dword [rsp + 0x148], 2
je 0x2bbefa4e7
cmp qword [rdx + 8], 0
je 0x2bbefa8f5
cmp dword [rsp + 0x148], 1
jne 0x2bbefa4de
cmp dword [rsp + 0x140], 1
jne 0x2bbefa4a9
mov dword [rsp + 0x30], r12d
xor r9d, r9d
xor edx, edx
mov r8d, 1
mov eax, dword [rsp + 0x138]
mov dword [rsp + 0x48], 0
lea rbp, [rsp + 0x90]
mov dword [rsp + 0x40], 0x20
mov dword [rsp + 0x38], eax
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
call sym.tcl9tk90.dll_XCreateImage
mov rbx, rax
mov ecx, dword [rax + 0x2c]
imul ecx, dword [rax + 4]
mov rax, qword [0x2bc041fd0]
mov rax, qword [rax]
movsxd rcx, ecx
call qword [rax + 0x28]
xor ecx, ecx
mov qword [rbx + 0x10], rax
call qword [sym.imp.USER32.dll_GetDC]
mov rdx, qword [r14 + 8]
xor r8d, r8d
mov qword [rsp + 0x28], rbp
mov rsi, rax
mov r9d, dword [rsp + 0x138]
mov rcx, rax
mov rdi, qword [sym.imp.GDI32.dll_GetDIBits]
mov dword [rsp + 0x30], 0
mov qword [rsp + 0x20], 0
call rdi
mov eax, dword [rsp + 0x138]
mov rdx, qword [r14 + 8]
mov rcx, rsi
mov qword [rsp + 0x28], rbp
mov r9d, dword [rsp + 0x138]
xor r8d, r8d
neg eax
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x98], eax
mov rax, qword [rbx + 0x10]
mov dword [rsp + 0x90], 0x28
mov dword [rsp + 0x94], r12d
mov dword [rsp + 0x9c], 0x10001
mov qword [rsp + 0xa0], 0
mov qword [rsp + 0xa8], 0
mov qword [rsp + 0xb0], 0
mov qword [rsp + 0x20], rax
call rdi
mov rdx, rsi
xor ecx, ecx
call qword [sym.imp.USER32.dll_ReleaseDC]
jmp 0x2bbefa492
lea rax, [rsp + 0x90]
xor r15d, r15d
mov r8, rax
mov qword [rsp + 0x58], rax
call sym.tcl9tk90.dll_TkWinGetDrawableDC
mov dword [rsp + 0x30], r12d
xor edx, edx
mov rcx, r13
mov rbp, rax
mov eax, dword [rsp + 0x138]
mov dword [rsp + 0x48], 0
mov r8d, 0x20
mov dword [rsp + 0x40], 0x20
mov r9d, dword [rsp + 0x148]
mov dword [rsp + 0x38], eax
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
call sym.tcl9tk90.dll_XCreateImage
mov esi, dword [rax + 0x2c]
mov rbx, rax
imul esi, dword [rax + 4]
mov rax, qword [0x2bc041fd0]
mov rax, qword [rax]
mov rcx, rsi
call qword [rax + 0x28]
mov r8, rsi
xor edx, edx
mov qword [rbx + 0x10], rax
mov rcx, rax
call sym.memset
mov r9d, dword [rsp + 0x138]
test r9d, r9d
je 0x2bbefa482
test r12d, r12d
je 0x2bbefa4c0
mov r13, qword [sym.imp.GDI32.dll_GetPixel]
mov qword [rsp + 0x118], r14
mov r14d, r15d
nop word [rax + rax]
mov esi, dword [rsp + 0x128]
xor r15d, r15d
add esi, r14d
jmp 0x2bbefa457
mov edx, r15d
mov r8d, r14d
mov rcx, rbx
add r15d, 1
call sym.PutPixel
cmp r12d, r15d
je 0x2bbefa46c
lea edx, [rdi + r15]
mov r8d, esi
mov rcx, rbp
call r13
mov r9d, eax
cmp eax, 0xffffffff
jne 0x2bbefa440
add r14d, 1
cmp dword [rsp + 0x138], r14d
jne 0x2bbefa430
mov r14, qword [rsp + 0x118]
mov r8, qword [rsp + 0x58]
mov rdx, rbp
mov rcx, r14
call sym.tcl9tk90.dll_TkWinReleaseDrawableDC
mov rax, rbx
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rcx, str.XGetImage:_not_implemented_for_plane_mask___1
lea rdx, str.XGetImage_Failure
call sym.tcl9tk90.dll_TkpDisplayWarning
xor ebx, ebx
jmp 0x2bbefa492
add r15d, 1
cmp dword [rsp + 0x138], r15d
je 0x2bbefa482
add r15d, 1
cmp dword [rsp + 0x138], r15d
jne 0x2bbefa4c0
jmp 0x2bbefa482
lea rcx, str.XGetImage:_not_implemented_for_format___XYPixmap
jmp 0x2bbefa4b0
lea rax, [rsp + 0x90]
mov r8, rax
mov qword [rsp + 0x58], rax
call sym.tcl9tk90.dll_TkWinGetDrawableDC
mov r8d, dword [rsp + 0x138]
mov edx, r12d
mov rbx, rax
mov rcx, rax
call qword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov rcx, rbx
mov r15, rax
mov qword [rsp + 0x60], rax
call qword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov rbp, qword [sym.imp.GDI32.dll_SelectObject]
mov rdx, r15
mov rsi, rax
mov rcx, rax
call rbp
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x70], rax
test rax, rax
je 0x2bbefa880
mov rdx, rax
mov rax, qword [sym.imp.GDI32.dll_SelectPalette]
xor r8d, r8d
mov rcx, rsi
mov r15, rax
call rax
mov rcx, rsi
mov qword [rsp + 0x78], rax
mov rax, qword [sym.imp.GDI32.dll_RealizePalette]
mov qword [rsp + 0x88], rax
call rax
test eax, eax
jne 0x2bbefa916
xor r8d, r8d
mov rcx, rbx
mov rdx, qword [rsp + 0x70]
call r15
mov rcx, rbx
mov qword [rsp + 0x80], rax
mov rax, qword [rsp + 0x88]
call rax
test eax, eax
jne 0x2bbefa908
mov eax, dword [rsp + 0x128]
mov r9d, r12d
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x30], edi
mov rcx, rsi
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x138]
mov dword [rsp + 0x40], 0xcc0020
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], eax
call qword [sym.imp.GDI32.dll_BitBlt]
xor r8d, r8d
mov rdx, qword [rsp + 0x80]
mov rcx, rbx
mov edi, eax
mov rax, r15
call rax
mov rdx, qword [rsp + 0x68]
mov rcx, rsi
call rbp
mov r8, qword [rsp + 0x58]
mov rdx, rbx
mov rcx, r14
call sym.tcl9tk90.dll_TkWinReleaseDrawableDC
test edi, edi
je 0x2bbefa901
cmp dword [r14], 2
je 0x2bbefa8e8
mov r15d, dword [r14 + 0x18]
mov ecx, 0x2c
cmp r15d, 8
ja 0x2bbefa648
mov ecx, r15d
mov eax, 2
shl rax, cl
lea ecx, [rax + 0x2c]
mov rbp, qword [0x2bc041fd0]
mov rax, qword [rbp]
call qword [rax + 0x28]
mov r8d, 1
mov dword [rax], 0x28
mov rdi, rax
mov dword [rax + 4], r12d
mov eax, dword [rsp + 0x138]
mov word [rdi + 0xc], r8w
neg eax
mov word [rdi + 0xe], r15w
mov dword [rdi + 8], eax
mov qword [rdi + 0x10], 0
mov qword [rdi + 0x18], 0
mov qword [rdi + 0x20], 0
cmp r15d, 1
je 0x2bbefa9e0
cmp r15d, 8
je 0x2bbefaaea
mov qword [rsp + 0x28], rdi
mov rdx, qword [rsp + 0x60]
xor r8d, r8d
mov rcx, rsi
mov dword [rsp + 0x30], 0
mov r9d, dword [rsp + 0x138]
mov qword [rsp + 0x20], 0
mov r14, qword [sym.imp.GDI32.dll_GetDIBits]
cmp r15d, 0x10
je 0x2bbefa924
call r14
mov eax, dword [rsp + 0x138]
imul eax, r12d
lea ecx, [rax*4]
mov rax, qword [rbp]
call qword [rax + 0x28]
mov r10, rax
test rax, rax
je 0x2bbefa9d5
mov qword [rsp + 0x28], r10
xor edx, edx
mov r9d, 2
mov rcx, r13
lea eax, [r12*4]
mov dword [rsp + 0x40], 0
mov r8d, 0x20
mov dword [rsp + 0x48], eax
mov eax, dword [rsp + 0x138]
mov dword [rsp + 0x30], r12d
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x20], 0
mov qword [rsp + 0x58], r10
call sym.tcl9tk90.dll_XCreateImage
mov r10, qword [rsp + 0x58]
test rax, rax
mov rbx, rax
je 0x2bbefabe8
cmp r15d, 0x18
ja 0x2bbefa98c
lea eax, [r12 + r12*2 + 3]
and eax, 0xfffffffc
mov ecx, eax
imul ecx, dword [rsp + 0x138]
mov r13d, eax
mov rax, qword [rbp]
call qword [rax + 0x28]
mov r15, rax
test rax, rax
je 0x2bbefa9c0
xor r8d, r8d
mov qword [rsp + 0x28], rdi
mov rdx, qword [rsp + 0x60]
mov rcx, rsi
mov dword [rsp + 0x30], 0
mov r9d, dword [rsp + 0x138]
mov qword [rsp + 0x20], rax
call r14
test eax, eax
je 0x2bbefabf9
mov eax, dword [rsp + 0x138]
test eax, eax
je 0x2bbefa834
mov r10d, r12d
xor r9d, r9d
xor r8d, r8d
shl r10, 2
mov eax, r8d
imul eax, dword [rbx + 0x2c]
mov edx, r9d
add rax, qword [rbx + 0x10]
add rdx, r15
lea r11, [rax + r10]
test r12d, r12d
je 0x2bbefa823
movzx ecx, byte [rdx]
add rdx, 3
add rax, 4
mov byte [rax - 4], cl
movzx ecx, byte [rdx - 2]
mov byte [rax - 3], cl
movzx ecx, byte [rdx - 1]
mov byte [rax - 2], cl
mov byte [rax - 1], 0
cmp rax, r11
jne 0x2bbefa7fe
add r8d, 1
add r9d, r13d
cmp dword [rsp + 0x138], r8d
jne 0x2bbefa7e4
mov rax, qword [rbp]
mov rcx, r15
call qword [rax + 0x30]
mov rax, qword [rbp]
mov rcx, rdi
call qword [rax + 0x30]
cmp qword [rsp + 0x70], 0
mov r15, qword [sym.imp.GDI32.dll_SelectPalette]
je 0x2bbefa867
mov rdx, qword [rsp + 0x78]
xor r8d, r8d
mov rcx, rsi
mov rax, r15
call rax
mov rcx, rsi
call qword [sym.imp.GDI32.dll_DeleteDC]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.GDI32.dll_DeleteObject]
jmp 0x2bbefa492
mov eax, dword [rsp + 0x128]
mov r9d, r12d
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x30], edi
mov rcx, rsi
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x138]
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x40], 0xcc0020
mov dword [rsp + 0x20], eax
call qword [sym.imp.GDI32.dll_BitBlt]
mov rdx, qword [rsp + 0x68]
mov rcx, rsi
mov edi, eax
call rbp
mov r8, qword [rsp + 0x58]
mov rdx, rbx
mov rcx, r14
xor ebx, ebx
call sym.tcl9tk90.dll_TkWinReleaseDrawableDC
test edi, edi
je 0x2bbefa867
mov qword [rsp + 0x78], 0
jmp 0x2bbefa621
mov rax, qword [r14 + 0x10]
mov r15d, dword [rax + 0x20]
jmp 0x2bbefa62f
lea rcx, str.XGetImage:_not_implemented_for_empty_bitmap_handles
jmp 0x2bbefa4b0
xor ebx, ebx
jmp 0x2bbefa857
mov rcx, rbx
call qword [sym.imp.GDI32.dll_UpdateColors]
jmp 0x2bbefa5b2
mov rcx, rsi
call qword [sym.imp.GDI32.dll_UpdateColors]
jmp 0x2bbefa587
call r14
mov rax, qword [rbp]
mov ecx, dword [rdi + 0x14]
call qword [rax + 0x28]
mov r15, rax
test rax, rax
je 0x2bbefa9d5
mov dword [rsp + 0x30], r12d
mov r9d, 2
xor edx, edx
mov rcx, r13
mov eax, dword [rsp + 0x138]
mov qword [rsp + 0x28], r15
mov r8d, 0x10
mov dword [rsp + 0x48], 0
mov dword [rsp + 0x40], 0x10
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x20], 0
call sym.tcl9tk90.dll_XCreateImage
mov rbx, rax
test rax, rax
je 0x2bbefabd7
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov rdx, qword [rsp + 0x60]
mov rcx, rsi
mov dword [rsp + 0x30], 0
mov rax, qword [rbx + 0x10]
mov r9d, dword [rsp + 0x138]
mov qword [rsp + 0x20], rax
call r14
test eax, eax
jne 0x2bbefa83e
mov rax, qword [rbp]
mov rcx, qword [rbx + 0x10]
call qword [rax + 0x30]
mov rax, qword [rbp]
mov rcx, rbx
call qword [rax + 0x30]
xor ebx, ebx
jmp 0x2bbefa83e
mov rdx, qword [rsp + 0x60]
xor r8d, r8d
mov rcx, rsi
mov qword [rsp + 0x28], rdi
mov r9d, dword [rsp + 0x138]
mov dword [rsp + 0x30], 1
mov qword [rsp + 0x20], 0
mov r14, qword [sym.imp.GDI32.dll_GetDIBits]
call r14
mov rax, qword [rbp]
mov ecx, dword [rdi + 0x14]
call qword [rax + 0x28]
mov r15, rax
test rax, rax
je 0x2bbefa9d5
lea eax, [r12 + 0x1f]
mov dword [rsp + 0x30], r12d
xor edx, edx
mov rcx, r13
shr eax, 3
mov dword [rsp + 0x40], 0x20
mov r9d, 2
mov r8d, 1
and eax, 0xfffffffe
mov qword [rsp + 0x28], r15
mov dword [rsp + 0x48], eax
mov eax, dword [rsp + 0x138]
mov dword [rsp + 0x20], 0
mov dword [rsp + 0x38], eax
call sym.tcl9tk90.dll_XCreateImage
mov rbx, rax
test rax, rax
je 0x2bbefabd7
xor r8d, r8d
mov qword [rsp + 0x28], rdi
mov rdx, qword [rsp + 0x60]
mov rcx, rsi
mov dword [rsp + 0x30], 1
mov r9d, dword [rsp + 0x138]
mov qword [rsp + 0x20], r15
call r14
test eax, eax
je 0x2bbefa9c0
mov eax, dword [rdi + 0x14]
add rax, r15
cmp r15, rax
jae 0x2bbefa83e
mov rdx, rax
sub rdx, r15
and edx, 1
je 0x2bbefaad5
not byte [r15]
add r15, 1
cmp rax, r15
je 0x2bbefa83e
not byte [r15]
not byte [r15 + 1]
add r15, 2
cmp rax, r15
jne 0x2bbefaad5
jmp 0x2bbefa83e
mov rdx, qword [rsp + 0x60]
xor r8d, r8d
mov rcx, rsi
mov qword [rsp + 0x28], rdi
mov r9d, dword [rsp + 0x138]
mov dword [rsp + 0x30], 1
mov qword [rsp + 0x20], 0
mov r14, qword [sym.imp.GDI32.dll_GetDIBits]
call r14
mov rax, qword [rbp]
mov ecx, dword [rdi + 0x14]
call qword [rax + 0x28]
mov r15, rax
test rax, rax
je 0x2bbefa9d5
mov dword [rsp + 0x48], r12d
mov r9d, 2
xor edx, edx
mov rcx, r13
mov eax, dword [rsp + 0x138]
mov dword [rsp + 0x30], r12d
mov r8d, 8
mov dword [rsp + 0x40], 8
mov dword [rsp + 0x38], eax
mov qword [rsp + 0x28], r15
mov dword [rsp + 0x20], 0
call sym.tcl9tk90.dll_XCreateImage
mov rbx, rax
test rax, rax
je 0x2bbefabd7
xor r8d, r8d
mov qword [rsp + 0x28], rdi
mov rdx, qword [rsp + 0x60]
mov rcx, rsi
mov dword [rsp + 0x30], 1
mov r9d, dword [rsp + 0x138]
mov qword [rsp + 0x20], r15
call r14
test eax, eax
je 0x2bbefa9c0
mov ecx, dword [rdi + 0x14]
lea rdx, [rdi + 0x28]
test ecx, ecx
je 0x2bbefa83e
xor eax, eax
movzx ecx, byte [r15 + rax]
movzx ecx, word [rdx + rcx*2]
mov byte [r15 + rax], cl
add rax, 1
cmp eax, dword [rdi + 0x14]
jb 0x2bbefabbc
jmp 0x2bbefa83e
mov rax, qword [rbp]
mov rcx, r15
xor ebx, ebx
call qword [rax + 0x30]
jmp 0x2bbefa83e
mov rax, qword [rbp]
mov rcx, r10
xor ebx, ebx
call qword [rax + 0x30]
jmp 0x2bbefa83e
mov rax, qword [rbp]
mov rcx, qword [rbx + 0x10]
call qword [rax + 0x30]
mov rax, qword [rbp]
mov rcx, rbx
xor ebx, ebx
call qword [rax + 0x30]
mov rax, qword [rbp]
mov rcx, r15
call qword [rax + 0x30]
jmp 0x2bbefa83e