Function at 0x4bc840
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 + 0x8c], 1
mov esi, dword [rsp + 0x130]
test rdx, rdx
je 0x4bc9cf
cmp dword [rdx], 1
mov r12d, r8d
mov rbx, rcx
mov dword [rsp + 0x50], r9d
mov qword [rsp + 0x58], rdx
je 0x4bc994
lea rdi, [rsp + 0x90]
mov r8, rdi
mov qword [rsp + 0x60], rdi
call fcn.00422430
mov r13, rax
mov eax, dword [rsp + 0x138]
mov r9d, dword [rsp + 0x148]
xor edx, edx
mov r8d, 0x20
mov rcx, rbx
mov dword [rsp + 0x48], 0
mov dword [rsp + 0x40], 0x20
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x30], esi
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
call fcn.004bc730
mov ebx, dword [rax + 0x2c]
mov rbp, rax
imul ebx, dword [rax + 4]
mov rax, qword [0x00670bd0]
mov rax, qword [rax]
mov ecx, ebx
call qword [rax + 0x28]
mov r8d, ebx
xor edx, edx
mov qword [rbp + 0x10], rax
mov rcx, rax
xor ebx, ebx
call sub.msvcrt.dll_memset
mov r10d, dword [rsp + 0x138]
mov r14, qword [sym.imp.GDI32.dll_GetPixel]
test r10d, r10d
je 0x4bc96b
test esi, esi
je 0x4bc95f
mov eax, dword [rsp + 0x50]
xor r15d, r15d
lea edi, [rax + rbx]
jmp 0x4bc94a
mov edx, r15d
mov r8d, ebx
mov rcx, rbp
add r15d, 1
call fcn.004bc630
cmp r15d, esi
je 0x4bc95f
lea edx, [r12 + r15]
mov r8d, edi
mov rcx, r13
call r14
cmp eax, 0xffffffff
mov r9d, eax
jne 0x4bc933
add ebx, 1
cmp ebx, dword [rsp + 0x138]
jne 0x4bc923
mov r8, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x58]
mov rdx, r13
call fcn.004224e0
mov rax, rbp
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
cmp dword [rsp + 0x148], 2
je 0x4bcb52
mov rax, qword [rsp + 0x58]
cmp qword [rax + 8], 0
je 0x4bcb46
cmp dword [rsp + 0x148], 1
lea rcx, str.XGetImage:_not_implemented_for_format___XYPixmap
je 0x4bc9d3
lea rdx, str.XGetImage_Failure
call fcn.00424790
xor eax, eax
jmp 0x4bc980
cmp dword [rsp + 0x140], 1
lea rcx, str.XGetImage:_not_implemented_for_plane_mask___1
jne 0x4bc9c3
mov eax, dword [rsp + 0x138]
xor r9d, r9d
mov r8d, 1
xor edx, edx
mov rcx, rbx
mov dword [rsp + 0x48], 0
mov dword [rsp + 0x40], 0x20
mov dword [rsp + 0x30], esi
lea r12, [rsp + 0x90]
mov dword [rsp + 0x38], eax
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
call fcn.004bc730
mov rbp, rax
mov rax, qword [0x00670bd0]
mov ecx, dword [rbp + 4]
imul ecx, dword [rbp + 0x2c]
mov rax, qword [rax]
call qword [rax + 0x28]
xor ecx, ecx
mov qword [rbp + 0x10], rax
call qword [sym.imp.USER32.dll_GetDC]
mov r14, qword [rsp + 0x58]
mov rbx, rax
mov r9d, dword [rsp + 0x138]
xor r8d, r8d
mov rcx, rbx
mov rdi, qword [sym.imp.GDI32.dll_GetDIBits]
mov rdx, qword [r14 + 8]
mov dword [rsp + 0x30], 0
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], 0
call rdi
mov eax, dword [rsp + 0x138]
mov edx, 1
mov r9d, dword [rsp + 0x138]
mov word [rsp + 0x9e], dx
mov rdx, qword [r14 + 8]
xor r8d, r8d
mov dword [rsp + 0x30], 0
mov qword [rsp + 0x28], r12
mov rcx, rbx
neg eax
mov dword [rsp + 0x90], 0x28
mov dword [rsp + 0x94], esi
mov dword [rsp + 0x98], eax
mov eax, 1
mov dword [rsp + 0xa0], 0
mov word [rsp + 0x9c], ax
mov rax, qword [rbp + 0x10]
mov dword [rsp + 0xa4], 0
mov dword [rsp + 0xa8], 0
mov dword [rsp + 0xac], 0
mov dword [rsp + 0xb0], 0
mov dword [rsp + 0xb4], 0
mov qword [rsp + 0x20], rax
call rdi
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.USER32.dll_ReleaseDC]
mov rax, rbp
jmp 0x4bc980
lea rcx, str.XGetImage:_not_implemented_for_empty_bitmap_handles
jmp 0x4bc9c3
lea rax, [rsp + 0x90]
mov rdx, qword [rsp + 0x58]
mov r8, rax
mov qword [rsp + 0x60], rax
call fcn.00422430
mov r8d, dword [rsp + 0x138]
mov edx, esi
mov rbp, rax
mov rcx, rax
call qword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov r14, rax
mov rcx, rbp
mov qword [rsp + 0x68], rax
call qword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov rdx, r14
mov rdi, rax
mov rcx, rax
mov r14, qword [sym.imp.GDI32.dll_SelectObject]
call r14
mov r15, rax
mov rax, qword [rsp + 0x90]
test rax, rax
mov qword [rsp + 0x70], rax
je 0x4bcccb
xor r8d, r8d
mov rdx, rax
mov rcx, rdi
mov r13, qword [sym.imp.GDI32.dll_SelectPalette]
call r13
mov qword [rsp + 0x78], rax
mov rax, qword [sym.imp.GDI32.dll_RealizePalette]
mov rcx, rdi
mov qword [rsp + 0x88], rax
call rax
test eax, eax
jne 0x4bccbd
xor r8d, r8d
mov rdx, qword [rsp + 0x70]
mov rcx, rbp
call r13
mov rcx, rbp
mov qword [rsp + 0x80], rax
mov rax, qword [rsp + 0x88]
call rax
test eax, eax
je 0x4bcc23
mov rcx, rbp
call qword [sym.imp.GDI32.dll_UpdateColors]
mov eax, dword [rsp + 0x50]
mov r9d, esi
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x30], r12d
mov rcx, rdi
mov dword [rsp + 0x40], 0xcc0020
mov qword [rsp + 0x28], rbp
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x138]
mov dword [rsp + 0x20], eax
call qword [sym.imp.GDI32.dll_BitBlt]
xor r8d, r8d
mov r12d, eax
mov rdx, qword [rsp + 0x80]
mov rcx, rbp
call r13
mov rdx, r15
mov rcx, rdi
call r14
mov r8, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x58]
mov rdx, rbp
call fcn.004224e0
test r12d, r12d
jne 0x4bcd33
xor ebp, ebp
xor r8d, r8d
mov rdx, qword [rsp + 0x78]
mov rcx, rdi
call r13
mov rcx, rdi
call qword [sym.imp.GDI32.dll_DeleteDC]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.GDI32.dll_DeleteObject]
mov rax, rbp
jmp 0x4bc980
mov rcx, rdi
call qword [sym.imp.GDI32.dll_UpdateColors]
jmp 0x4bcbf3
mov eax, dword [rsp + 0x50]
xor r8d, r8d
mov r9d, esi
xor edx, edx
mov dword [rsp + 0x30], r12d
mov qword [rsp + 0x28], rbp
mov rcx, rdi
mov dword [rsp + 0x40], 0xcc0020
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x138]
mov dword [rsp + 0x20], eax
call qword [sym.imp.GDI32.dll_BitBlt]
mov rdx, r15
mov r12d, eax
mov rcx, rdi
call r14
mov r8, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x58]
mov rdx, rbp
xor ebp, ebp
call fcn.004224e0
test r12d, r12d
je 0x4bcca1
mov qword [rsp + 0x78], 0
mov rax, qword [rsp + 0x58]
cmp dword [rax], 2
je 0x4bd050
mov rax, qword [rsp + 0x58]
mov r15d, dword [rax + 0x18]
cmp r15d, 8
mov ecx, 0x2c
ja 0x4bcd62
mov ecx, r15d
mov eax, 2
shl eax, cl
lea ecx, [rax + 0x2c]
mov r13, qword [0x00670bd0]
mov rax, qword [r13]
call qword [rax + 0x28]
mov r12, rax
mov dword [rax], 0x28
mov dword [rax + 4], esi
mov eax, dword [rsp + 0x138]
mov r9d, 1
mov word [r12 + 0xe], r15w
mov word [r12 + 0xc], r9w
mov dword [r12 + 0x10], 0
mov dword [r12 + 0x14], 0
mov dword [r12 + 0x18], 0
neg eax
cmp r15d, 1
mov dword [r12 + 0x1c], 0
mov dword [r12 + 8], eax
mov dword [r12 + 0x20], 0
mov dword [r12 + 0x24], 0
je 0x4bd160
cmp r15d, 8
je 0x4bd064
xor r8d, r8d
cmp r15d, 0x10
mov dword [rsp + 0x30], 0
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], 0
mov rcx, rdi
mov r9d, dword [rsp + 0x138]
mov rdx, qword [rsp + 0x68]
mov r14, qword [sym.imp.GDI32.dll_GetDIBits]
je 0x4bcf95
call r14
mov ecx, dword [rsp + 0x138]
mov rax, qword [r13]
shl ecx, 2
imul ecx, esi
call qword [rax + 0x28]
test rax, rax
mov r10, rax
je 0x4bd05d
lea eax, [rsi*4]
mov qword [rsp + 0x28], r10
xor edx, edx
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x30], esi
mov r9d, 2
mov dword [rsp + 0x48], eax
mov eax, dword [rsp + 0x138]
mov r8d, 0x20
mov dword [rsp + 0x20], 0
mov rcx, rbx
mov qword [rsp + 0x50], r10
mov dword [rsp + 0x38], eax
call fcn.004bc730
test rax, rax
mov rbp, rax
mov r10, qword [rsp + 0x50]
je 0x4bd250
cmp r15d, 0x18
ja 0x4bcffe
mov ecx, dword [rsp + 0x138]
lea ebx, [rsi + rsi*2 + 3]
mov rax, qword [r13]
and ebx, 0xfffffffc
imul ecx, ebx
call qword [rax + 0x28]
test rax, rax
mov r15, rax
je 0x4bd032
xor r8d, r8d
mov dword [rsp + 0x30], 0
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x138]
mov rcx, rdi
mov rdx, qword [rsp + 0x68]
call r14
test eax, eax
je 0x4bd25f
mov ecx, dword [rsp + 0x138]
test ecx, ecx
je 0x4bcf69
lea eax, [rsi - 1]
xor r9d, r9d
xor ecx, ecx
lea r10, [rax*4 + 4]
mov eax, ecx
mov edx, r9d
imul eax, dword [rbp + 0x2c]
add rdx, r15
add rax, qword [rbp + 0x10]
test esi, esi
lea r11, [rax + r10]
je 0x4bcf5a
movzx r8d, byte [rdx]
add rdx, 3
add rax, 4
mov byte [rax - 4], r8b
movzx r8d, byte [rdx - 2]
mov byte [rax - 3], r8b
movzx r8d, byte [rdx - 1]
mov byte [rax - 2], r8b
cmp rax, r11
mov byte [rax - 1], 0
jne 0x4bcf2f
add ecx, 1
add r9d, ebx
cmp ecx, dword [rsp + 0x138]
jne 0x4bcf17
mov rax, qword [r13]
mov rcx, r15
call qword [rax + 0x30]
mov rax, qword [r13]
mov rcx, r12
call qword [rax + 0x30]
cmp qword [rsp + 0x70], 0
mov r13, qword [sym.imp.GDI32.dll_SelectPalette]
jne 0x4bcc93
jmp 0x4bcca1
call r14
mov rax, qword [r13]
mov ecx, dword [r12 + 0x14]
call qword [rax + 0x28]
test rax, rax
mov r15, rax
je 0x4bd05d
mov eax, dword [rsp + 0x138]
xor edx, edx
mov dword [rsp + 0x48], 0
mov dword [rsp + 0x40], 0x10
mov dword [rsp + 0x30], esi
mov r9d, 2
mov qword [rsp + 0x28], r15
mov dword [rsp + 0x20], 0
mov r8d, 0x10
mov dword [rsp + 0x38], eax
mov rcx, rbx
call fcn.004bc730
test rax, rax
mov rbp, rax
je 0x4bcf69
mov dword [rsp + 0x30], 0
mov qword [rsp + 0x28], r12
xor r8d, r8d
mov rax, qword [rbp + 0x10]
mov r9d, dword [rsp + 0x138]
mov rcx, rdi
mov rdx, qword [rsp + 0x68]
mov qword [rsp + 0x20], rax
call r14
test eax, eax
jne 0x4bcf73
mov rax, qword [r13]
mov rcx, qword [rbp + 0x10]
call qword [rax + 0x30]
mov rax, qword [r13]
mov rcx, rbp
xor ebp, ebp
call qword [rax + 0x30]
jmp 0x4bcf73
mov rax, qword [rax + 0x10]
mov r15d, dword [rax + 0x20]
jmp 0x4bcd4a
xor ebp, ebp
jmp 0x4bcf73
xor r8d, r8d
mov r9d, dword [rsp + 0x138]
mov rdx, qword [rsp + 0x68]
mov rcx, rdi
mov dword [rsp + 0x30], 1
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], 0
mov r14, qword [sym.imp.GDI32.dll_GetDIBits]
call r14
mov rax, qword [r13]
mov ecx, dword [r12 + 0x14]
call qword [rax + 0x28]
test rax, rax
mov r15, rax
je 0x4bd05d
mov eax, dword [rsp + 0x138]
xor edx, edx
mov dword [rsp + 0x48], esi
mov dword [rsp + 0x40], 8
mov dword [rsp + 0x30], esi
mov r9d, 2
mov qword [rsp + 0x28], r15
mov dword [rsp + 0x20], 0
mov r8d, 8
mov dword [rsp + 0x38], eax
mov rcx, rbx
call fcn.004bc730
test rax, rax
mov rbp, rax
je 0x4bcf69
xor r8d, r8d
mov dword [rsp + 0x30], 1
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r15
mov r9d, dword [rsp + 0x138]
mov rcx, rdi
mov rdx, qword [rsp + 0x68]
call r14
test eax, eax
je 0x4bd032
mov r8d, dword [r12 + 0x14]
lea rdx, [r12 + 0x28]
test r8d, r8d
je 0x4bcf73
xor eax, eax
movzx ecx, byte [r15]
add eax, 1
add r15, 1
movzx ecx, word [rdx + rcx*2]
mov byte [r15 - 1], cl
cmp eax, dword [r12 + 0x14]
jb 0x4bd13a
jmp 0x4bcf73
xor r8d, r8d
mov r9d, dword [rsp + 0x138]
mov rdx, qword [rsp + 0x68]
mov rcx, rdi
mov dword [rsp + 0x30], 1
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], 0
mov r14, qword [sym.imp.GDI32.dll_GetDIBits]
call r14
mov rax, qword [r13]
mov ecx, dword [r12 + 0x14]
call qword [rax + 0x28]
test rax, rax
mov r15, rax
je 0x4bd05d
lea eax, [rsi + 0x1f]
xor edx, edx
mov dword [rsp + 0x40], 0x20
mov dword [rsp + 0x30], esi
mov qword [rsp + 0x28], r15
mov r9d, 2
shr eax, 3
mov dword [rsp + 0x20], 0
mov r8d, 1
and eax, 0xfffffffe
mov rcx, rbx
mov dword [rsp + 0x48], eax
mov eax, dword [rsp + 0x138]
mov dword [rsp + 0x38], eax
call fcn.004bc730
test rax, rax
mov rbp, rax
je 0x4bcf69
xor r8d, r8d
mov dword [rsp + 0x30], 1
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r15
mov r9d, dword [rsp + 0x138]
mov rcx, rdi
mov rdx, qword [rsp + 0x68]
call r14
test eax, eax
je 0x4bd032
mov eax, dword [r12 + 0x14]
add rax, r15
cmp r15, rax
jae 0x4bcf73
not byte [r15]
add r15, 1
cmp r15, rax
jne 0x4bd23f
jmp 0x4bcf73
mov rax, qword [r13]
mov rcx, r10
call qword [rax + 0x30]
jmp 0x4bcf73
mov rax, qword [r13]
mov rcx, qword [rbp + 0x10]
call qword [rax + 0x30]
mov rax, qword [r13]
mov rcx, rbp
xor ebp, ebp
call qword [rax + 0x30]
mov rax, qword [r13]
mov rcx, r15
call qword [rax + 0x30]
jmp 0x4bcf73