Function at 0x18005f780
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x88
mov rax, qword [0x1804a9038]
xor rax, rsp
mov qword [rsp + 0x80], rax
cmp dword [r9 + 0x3c], 0
je 0x18005f7d4
xor ebp, ebp
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.180364a40
mov eax, ebp
add rsp, 0x88
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov r15, r9
cmp dword [r9 + 0x40], 0
jne 0x18005f7ac
cmp dword [r15 + 0x44], 0
jne 0x18005f7ac
cmp dword [r15 + 0x20], 0
jne 0x18005f7ac
cmp dword [r15 + 0x24], 0
jne 0x18005f7ac
cmp dword [r15 + 0x28], 0
jne 0x18005f7ac
cmp dword [r15 + 0x1c], 1
jne 0x18005f7ac
mov r14, rdx
mov eax, dword [r15 + 0x48]
cmp eax, dword [rdx + 0x24]
jne 0x18005f7ac
mov ecx, dword [r15 + 0x4c]
cmp ecx, dword [r14 + 0x28]
jne 0x18005f7ac
mov edx, dword [r15 + 0x50]
cmp edx, dword [r14 + 0x2c]
jne 0x18005f7ac
mov rsi, r8
cmp eax, dword [r8 + 0x24]
jne 0x18005f7ac
cmp ecx, dword [rsi + 0x28]
jne 0x18005f7ac
xor ebp, ebp
cmp edx, 1
jne 0x18005f7ae
cmp dword [rsi + 0x2c], 1
jne 0x18005f7ae
mov eax, dword [r15 + 0x10]
lea r8, [rsp + 0x74]
mov dword [r8], eax
mov eax, dword [r15 + 0x14]
mov dword [r8 + 4], eax
mov eax, dword [r15 + 0x18]
mov dword [r8 + 8], eax
mov eax, dword [r15 + 0x2c]
lea rbx, [rsp + 0x68]
mov dword [rbx], eax
mov ecx, dword [r15 + 0x30]
mov dword [rbx + 4], ecx
mov edx, dword [r15 + 0x34]
mov dword [rbx + 8], edx
mov dword [rsp + 0x54], eax
mov dword [rsp + 0x58], ecx
mov dword [rsp + 0x5c], 1
mov dword [rsp + 0x60], edx
mov eax, dword [r15 + 0x38]
mov dword [rsp + 0x64], eax
lea rdx, [0x180419f34]
mov rcx, r14
call fcn.180019710
mov rdi, rax
lea rdx, [0x180419f40]
mov rcx, rsi
mov r8, rbx
call fcn.180019710
mov rbx, rax
mov r12d, dword [r14 + 0x20]
mov eax, dword [r14 + 0x28]
mov dword [rsp + 0x24], eax
mov eax, dword [r14 + 0x38]
mov dword [rsp + 0x28], eax
movsxd rax, dword [r14 + 0x24]
mov qword [rsp + 0x38], rax
mov r8d, dword [r15 + 0x14]
mov rcx, r14
mov edx, 1
call fcn.180018830
mov r13, rax
mov r8d, dword [r15 + 0x14]
mov rcx, r14
mov edx, 1
call fcn.1800189c0
mov r14, rax
call fcn.18016f3e0
mov byte [rsp + 0x23], al
xor ebp, ebp
cmp r12, 0x33
ja 0x18005f7ae
movabs rax, 0x8102000000000
bt rax, r12
jae 0x18005f7ae
cmp dword [rsp + 0x28], 4
je 0x18005f96b
lea rcx, str._s:_d_WARNING:_UNSUPPORTED:_Samples:__d_n
lea rdx, str....._third_party_swiftshader_srcDeviceBlitter.cpp
mov r8d, 0x893
mov r9d, dword [rsp + 0x28]
call fcn.180171480
lea rdx, [rsp + 0x54]
mov rcx, rsi
xor r8d, r8d
call fcn.180019790
mov bpl, 1
jmp 0x18005f7ae
cmp dword [rsp + 0x24], 0
jle 0x18005f953
mov rdx, rbx
mov eax, dword [rsp + 0x38]
movsxd rbp, r14d
mov r14, rdi
add r14, rbp
lea r9, [r14 + rbp]
add rbp, r9
mov qword [rsp + 0x40], rax
cmp eax, 4
setge al
movsxd rcx, r13d
mov qword [rsp + 0x48], rcx
and byte [rsp + 0x23], al
xor eax, eax
jmp 0x18005f9c4
mov rax, qword [rsp + 0x48]
add rdi, rax
add r14, rax
add r9, rax
add rbp, rax
add rdx, rax
mov eax, dword [rsp + 0x34]
inc eax
cmp eax, dword [rsp + 0x24]
je 0x18005f953
mov dword [rsp + 0x34], eax
mov ecx, 0
cmp byte [rsp + 0x23], 0
mov rax, qword [rsp + 0x38]
je 0x18005fa16
mov ecx, 3
movdqu xmm0, xmmword [rdi + rcx*4 - 0xc]
movdqu xmm1, xmmword [r14 + rcx*4 - 0xc]
pavgb xmm1, xmm0
movdqu xmm0, xmmword [r9 + rcx*4 - 0xc]
movdqu xmm2, xmmword [rbp + rcx*4 - 0xc]
pavgb xmm2, xmm0
pavgb xmm2, xmm1
movdqu xmmword [rdx + rcx*4 - 0xc], xmm2
add rcx, 4
cmp rcx, rax
jl 0x18005f9de
add ecx, 0xfffffffd
cmp ecx, eax
jge 0x18005f9a4
mov r12d, ecx
mov rcx, qword [rsp + 0x40]
sub rcx, r12
shl r12, 2
mov qword [rsp + 0x28], rdx
mov r15d, r12d
and r15d, 0xfffffffc
mov r11d, dword [rdi + r15]
mov eax, dword [r14 + r15]
mov r13d, dword [r9 + r15]
mov rbx, rdi
mov r10d, dword [rbp + r15]
mov edx, 0x1010101
mov edi, 0x7f7f7f7f
mov r8, r9
mov r9, rbp
mov ebp, eax
and ebp, r11d
xor eax, r11d
mov r11d, eax
shr r11d, 1
and r11d, edi
and eax, edx
add eax, ebp
add eax, r11d
mov r11d, r10d
and r11d, r13d
xor r10d, r13d
mov ebp, r10d
shr ebp, 1
and ebp, edi
and r10d, edx
add r10d, r11d
add r10d, ebp
mov rbp, r9
mov r9, r8
mov r11d, r10d
and r11d, eax
xor r10d, eax
mov eax, r10d
shr eax, 1
and eax, edi
and r10d, edx
add r10d, r11d
mov rdx, qword [rsp + 0x28]
add r10d, eax
mov dword [rdx + r15], r10d
mov rdi, rbx
add r12, 4
dec rcx
jne 0x18005fa2e
jmp 0x18005f9a4