Function at 0x140076ed0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xd0
movaps xmmword [rsp + 0xc0], xmm6
mov rax, qword [0x14022b800]
xor rax, rsp
mov qword [rbp + 7], rax
mov r15, rdx
mov rdi, rcx
mov rbx, qword [rcx + 0x10]
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x61], xmm1
test rbx, rbx
je 0x140076f5f
mov qword [rbp - 0x61], rbx
mov eax, 1
lock xadd dword [rbx], eax
inc eax
cmp eax, 1
jle 0x140076f4d
mov rax, qword gs:[0x30]
mov ecx, dword [rax + 0x48]
cmp dword [rbx + 4], ecx
je 0x140076f5c
mov edx, 0xffffffff
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rax, qword gs:[0x30]
mov ecx, dword [rax + 0x48]
mov dword [rbx + 4], ecx
inc dword [rbx + 8]
xor esi, esi
lea r13d, [rsi - 1]
test r15, r15
jne 0x140076f73
lea r14d, [rsi + 1]
jmp 0x140077448
cmp byte [reloc.d2d1.dll_Ordinal_1], sil
je 0x140076fd4
lea rcx, str.mfplat.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
test rax, rax
je 0x140076fc3
lea rcx, str.mf.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
test rax, rax
je 0x140076fc3
lea rcx, str.mfreadwrite.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
test rax, rax
je 0x140076fc3
mov al, 1
mov byte [reloc.d2d1.dll_Ordinal_1], sil
mov byte [0x140230bd4], al
jmp 0x140076fdb
xor al, al
mov byte [reloc.d2d1.dll_Ordinal_1], sil
mov byte [0x140230bd4], al
jmp 0x140076fdb
movzx eax, byte [0x140230bd4]
test al, al
jne 0x140076fea
mov r14d, 0x80004005
jmp 0x140077448
mov qword [rbp - 0x41], rsi
mov dword [rbp - 0x49], esi
mov qword [rbp - 0x39], rsi
mov qword [rbp - 0x21], rsi
mov rax, qword [r15]
mov rcx, r15
call qword [rax + 8]
lea r9, [rbp - 0x21]
lea r8, [0x1401dcd20]
lea rdx, [0x14019cfd0]
mov rcx, r15
call qword [sym.imp.MF.dll_MFGetService]
mov rcx, qword [rbp - 0x21]
test rcx, rcx
je 0x140077030
mov rax, qword [rcx]
call qword [rax + 0x10]
mov qword [rbp - 0x21], rsi
mov dword [rbp - 0x11], esi
mov rax, qword [r15]
lea rdx, [rbp - 0x11]
mov rcx, r15
call qword [rax + 0x28]
mov rax, qword [r15]
lea r8, [rbp - 0x39]
lea rdx, [0x1401dcf40]
mov rcx, r15
call qword [rax]
mov rcx, qword [rbp - 0x39]
test rcx, rcx
je 0x14007708c
mov rax, qword [rcx]
lea r8, [rbp - 0x49]
lea rdx, [rbp - 0x41]
call qword [rax + 0x18]
mov r14d, eax
mov r8d, dword [rbp - 0x49]
test r8d, r8d
je 0x1400770db
mov eax, r8d
cdq
mov ecx, eax
xor ecx, edx
sub ecx, edx
xor edx, edx
mov eax, dword [rbp - 0x11]
div ecx
mov r12d, eax
jmp 0x1400770f0
mov qword [rbp - 0x19], rsi
mov rax, qword [r15]
xor r9d, r9d
xor r8d, r8d
lea rdx, [rbp - 0x19]
mov rcx, r15
call qword [rax + 0x18]
mov r14d, eax
test eax, eax
js 0x14007706d
mov r8d, dword [rdi + 0x38]
mov dword [rbp - 0x49], r8d
test r8d, r8d
jns 0x1400770d1
mov eax, r8d
cdq
xor eax, edx
sub eax, edx
mov ecx, dword [rdi + 0x40]
dec ecx
imul eax, ecx
add rax, qword [rbp - 0x19]
mov qword [rbp - 0x41], rax
jmp 0x140077071
mov rax, qword [rbp - 0x19]
mov qword [rbp - 0x41], rax
jmp 0x140077071
mov r12d, dword [rdi + 0x40]
lea rdx, str.Camera_buffer_stride_is_0
mov ecx, 7
call fcn.1400838f0
cmp qword [rdi + 0x18], rsi
je 0x140077414
mov rbx, qword [rdi + 0xa8]
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x71], xmm1
test rbx, rbx
je 0x140077154
mov qword [rbp - 0x71], rbx
mov eax, 1
lock xadd dword [rbx], eax
inc eax
cmp eax, 1
jle 0x140077142
mov rax, qword gs:[0x30]
mov ecx, dword [rax + 0x48]
cmp dword [rbx + 4], ecx
je 0x140077151
mov edx, 0xffffffff
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rax, qword gs:[0x30]
mov ecx, dword [rax + 0x48]
mov dword [rbx + 4], ecx
inc dword [rbx + 8]
mov rdx, qword [rdi + 0x78]
test rdx, rdx
je 0x1400773c8
mov rcx, qword [rdi + 0x68]
dec rcx
and rcx, qword [rdi + 0x70]
mov rax, qword [rdi + 0x60]
mov rcx, qword [rax + rcx*8]
movups xmm6, xmmword [rcx]
lea rax, [rdx - 1]
mov qword [rdi + 0x78], rax
test rax, rax
jne 0x14007718a
mov qword [rdi + 0x70], rsi
jmp 0x14007718e
inc qword [rdi + 0x70]
mov qword [rbp - 9], rsi
mov eax, dword [rdi + 0x3c]
mov dword [rbp - 1], eax
mov eax, dword [rdi + 0x40]
mov dword [rbp + 3], eax
xorps xmm0, xmm0
movups xmmword [rbp - 0x31], xmm0
mov ecx, dword [rdi + 0x34]
lea eax, [rcx - 0x15]
mov r9d, 0x2000
lea r8, [rbp - 9]
lea rdx, [rbp - 0x31]
cmp eax, 1
jbe 0x140077309
cmp ecx, 0x14
jne 0x14007727e
movq rbx, xmm6
mov qword [rbp - 0x79], rbx
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x68]
mov r14d, eax
test eax, eax
js 0x140077340
test r12d, r12d
jle 0x14007726e
mov eax, dword [rdi + 0x3c]
xor ebx, ebx
test eax, eax
je 0x140077263
nop word [rax + rax]
mov eax, esi
imul eax, dword [rbp - 0x31]
movsxd r11, eax
add r11, qword [rbp - 0x29]
mov eax, esi
imul eax, dword [rbp - 0x49]
movsxd r10, eax
add r10, qword [rbp - 0x41]
lea r8d, [rbx + rbx*2]
lea r9d, [rbx*4]
movzx eax, byte [r8 + r10]
mov byte [r9 + r11], al
lea eax, [r8 + 1]
lea ecx, [r9 + 1]
movzx eax, byte [rax + r10]
mov byte [rcx + r11], al
lea eax, [r8 + 2]
lea ecx, [r9 + 2]
movzx eax, byte [rax + r10]
mov byte [rcx + r11], al
lea eax, [r9 + 3]
mov byte [rax + r11], 0xff
inc ebx
mov eax, dword [rdi + 0x3c]
cmp ebx, eax
jb 0x140077200
inc esi
cmp esi, r12d
jl 0x1400771f4
mov rbx, qword [rbp - 0x79]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x70]
xor esi, esi
jmp 0x140077340
mov rcx, qword [rdi + 0x48]
mov rax, qword [rcx]
call qword [rax + 0x68]
mov r14d, eax
test eax, eax
js 0x140077340
mov dword [rsp + 0x20], r12d
mov r9d, dword [rbp - 0x31]
mov r8, qword [rbp - 0x29]
mov edx, dword [rbp - 0x49]
mov rcx, qword [rbp - 0x41]
call fcn.140074cd0
mov rcx, qword [rdi + 0x48]
mov rax, qword [rcx]
call qword [rax + 0x70]
mov rbx, qword [rdi + 0x18]
mov rbx, qword [rbx + 0x10]
mov qword [rbp - 0x51], rbx
test rbx, rbx
je 0x1400772d1
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 8]
nop
mov rax, qword [rbx]
mov dword [rsp + 0x28], 2
mov qword [rsp + 0x20], rsi
movq r9, xmm6
xor r8d, r8d
mov rdx, qword [rdi + 0x48]
mov rcx, rbx
call qword [rax + 0x110]
mov r14d, eax
test rbx, rbx
je 0x140077340
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x10]
jmp 0x140077340
movq rbx, xmm6
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x68]
mov r14d, eax
test eax, eax
js 0x140077340
mov dword [rsp + 0x20], r12d
mov r9d, dword [rbp - 0x31]
mov r8, qword [rbp - 0x29]
mov edx, dword [rbp - 0x49]
mov rcx, qword [rbp - 0x41]
call fcn.140074cd0
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x70]
sub rdi, 0xffffffffffffff80
mov rcx, qword [rdi + 0x20]
mov rdx, qword [rdi + 0x10]
lea rax, [rcx + 1]
cmp rdx, rax
ja 0x140077365
mov rcx, rdi
call fcn.1400779c0
mov rdx, qword [rdi + 0x10]
mov rcx, qword [rdi + 0x20]
lea rax, [rdx - 1]
and qword [rdi + 0x18], rax
add rcx, qword [rdi + 0x18]
lea rax, [rdx - 1]
and rax, rcx
lea rbx, [rax*8]
mov rax, qword [rdi + 8]
cmp qword [rax + rbx], 0
jne 0x1400773a1
mov ecx, 0x10
call fcn.14014f310
mov rcx, qword [rdi + 8]
mov qword [rbx + rcx], rax
mov rax, qword [rdi + 8]
mov rax, qword [rax + rbx]
movups xmmword [rax], xmm6
inc qword [rdi + 0x20]
call fcn.1400616f0
xor r9d, r9d
xor r8d, r8d
mov edx, 0x8078
mov rcx, qword [rax + 0x50]
call qword [sym.imp.USER32.dll_PostMessageW]
jmp 0x1400773da
lea rdx, str.CameraCapture::DrawFrame___AvailibleBuffers_Empty
mov ecx, 7
call fcn.140083970
nop
mov rcx, qword [rbp - 0x71]
test rcx, rcx
je 0x140077414
add dword [rcx + 8], 0xffffffff
mov edx, dword [rcx + 8]
jne 0x1400773ef
mov dword [rcx + 4], esi
mov eax, r13d
lock xadd dword [rcx], eax
cmp eax, 1
je 0x140077414
test edx, edx
jne 0x140077414
xor r8d, r8d
lea edx, [r8 + 1]
mov rcx, qword [rbp - 0x71]
mov rcx, qword [rcx + 0x10]
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov rcx, qword [rbp - 0x39]
test rcx, rcx
je 0x140077422
mov rax, qword [rcx]
jmp 0x140077428
mov rax, qword [r15]
mov rcx, r15
call qword [rax + 0x20]
mov rcx, qword [rbp - 0x39]
test rcx, rcx
je 0x14007743e
mov rax, qword [rcx]
call qword [rax + 0x10]
mov qword [rbp - 0x39], rsi
mov rax, qword [r15]
mov rcx, r15
call qword [rax + 0x10]
nop
mov rax, qword [rbp - 0x61]
test rax, rax
je 0x140077480
add dword [rax + 8], 0xffffffff
mov ecx, dword [rax + 8]
jne 0x14007745d
mov dword [rax + 4], esi
lock xadd dword [rax], r13d
cmp r13d, 1
je 0x140077480
test ecx, ecx
jne 0x140077480
xor r8d, r8d
lea edx, [rcx + 1]
mov rcx, qword [rbp - 0x61]
mov rcx, qword [rcx + 0x10]
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov eax, r14d
mov rcx, qword [rbp + 7]
xor rcx, rsp
call fcn.14014f2f0
mov rbx, qword [rsp + 0x120]
movaps xmm6, xmmword [rsp + 0xc0]
add rsp, 0xd0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret