Function at 0x14003c390
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x38
mov ebp, dword [rcx + 0x5d260]
xor r14d, r14d
movzx edx, word [rcx + 0x12]
mov eax, ebp
imul edx, dword [rcx + 0x5d248]
xor edi, edi
shr eax, 7
mov rsi, rcx
mov ebx, edx
shr ebx, 3
and eax, ebx
add ebx, eax
mov dword [rsp + 0x78], ebx
lea eax, [rbx*8]
sub eax, edx
mov dword [rsp + 0x88], eax
test bpl, 1
je 0x14003c3f8
shl ebx, 4
mov eax, 0x88888889
imul ebx
add ebx, edx
sar ebx, 3
mov eax, ebx
shr eax, 0x1f
add ebx, eax
mov dword [rsp + 0x78], ebx
movzx eax, word [rcx + 0x10]
and ebp, 0x18
xor r15d, r15d
add ebp, 8
mov dword [rsp + 0x70], r15d
lea ecx, [rax + 1]
shr ecx, 1
mov dword [rsp + 0x80], ecx
test eax, eax
je 0x14003c633
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], r13
mov r12d, ebp
nop dword [rax + rax]
mov rcx, rsi
call sym.EURawImg.exe_protected:_void___cdecl_LibRaw::checkCancel_void____ptr64
mov ecx, dword [rsi + 0x5d260]
mov r13d, r15d
test cl, 2
je 0x14003c4d1
mov r8d, dword [rsp + 0x80]
mov eax, r15d
cdq
idiv r8d
lea r13d, [rax + rdx*2]
cmp r13d, 1
jne 0x14003c4d1
test cl, 4
je 0x14003c4d1
mov rcx, qword [rsi + 0x5d158]
xor r14d, r14d
mov r9, qword [rcx]
add r9, 0x18
cmp dword [rsi + 0x5d24c], r14d
je 0x14003c4a4
mov rdx, qword [rsi + 0x5d200]
mov eax, r8d
imul eax, ebx
xor r8d, r8d
neg eax
cdqe
and rax, 0xfffffffffffff800
sub rdx, rax
call qword [r9]
jmp 0x14003c4d1
xor edx, edx
lea r8d, [rdx + 2]
call qword [r9]
mov rcx, qword [rsi + 0x5d158]
mov rbx, qword [rcx]
call qword [rbx + 0x20]
mov rcx, qword [rsi + 0x5d158]
xor r8d, r8d
sar rax, 1
and rax, 0xfffffffffffffffc
mov rdx, rax
call qword [rbx + 0x18]
mov rcx, qword [rsi + 0x5d158]
mov rax, qword [rcx]
call qword [rax + 0x48]
test eax, eax
jne 0x14003c640
movzx r9d, word [rsi + 0x12]
xor edx, edx
mov r15d, edx
cmp dx, r9w
jae 0x14003c603
nop word [rax + rax]
mov eax, dword [rsi + 0x5d248]
sub r14d, eax
jns 0x14003c54d
nop dword [rax + rax]
mov rcx, r12
mov ebx, edx
shl rdi, cl
test ebp, ebp
je 0x14003c53d
nop dword [rax]
mov rcx, qword [rsi + 0x5d158]
mov rax, qword [rcx]
call qword [rax + 0x30]
mov ecx, ebx
add ebx, 8
shl eax, cl
or rdi, rax
cmp ebx, ebp
jl 0x14003c520
xor edx, edx
add r14d, ebp
js 0x14003c510
mov eax, dword [rsi + 0x5d248]
movzx r9d, word [rsi + 0x12]
mov edx, 0x40
mov r8, rdi
sub edx, eax
movzx eax, r9w
imul eax, r13d
mov ecx, edx
sub ecx, r14d
shl r8, cl
mov ecx, edx
shr r8, cl
mov ecx, dword [rsi + 0x5d260]
shr ecx, 6
and ecx, 1
xor ecx, r15d
add ecx, eax
mov rax, qword [rsi + 0x2f3f0]
mov word [rax + rcx*2], r8w
test byte [rsi + 0x5d260], 1
je 0x14003c5ea
mov eax, 0x66666667
imul r15d
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, r15d
lea ecx, [rdx + rdx*4]
add ecx, ecx
sub eax, ecx
cmp eax, 9
jne 0x14003c5ea
mov rcx, qword [rsi + 0x5d158]
mov rax, qword [rcx]
call qword [rax + 0x30]
test eax, eax
je 0x14003c5ea
movzx ecx, word [rsi + 0x18]
movzx eax, word [rsi + 0x14]
add ecx, eax
cmp r13d, ecx
jge 0x14003c5ea
movzx ecx, word [rsi + 0x1a]
movzx eax, word [rsi + 0x16]
add ecx, eax
cmp r15d, ecx
jge 0x14003c5ea
mov rcx, rsi
call sym.EURawImg.exe_protected:_void___cdecl_LibRaw::derror_void____ptr64
movzx eax, word [rsi + 0x12]
inc r15d
movzx r9d, ax
mov edx, 0
cmp r15d, eax
jl 0x14003c500
mov r15d, dword [rsp + 0x70]
sub r14d, dword [rsp + 0x88]
inc r15d
movzx eax, word [rsi + 0x10]
mov ebx, dword [rsp + 0x78]
mov dword [rsp + 0x70], r15d
cmp r15d, eax
jl 0x14003c430
mov r12, qword [rsp + 0x30]
mov r13, qword [rsp + 0x28]
add rsp, 0x38
pop r15
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret
lea rdx, [0x1400a4c08]
mov dword [rsp + 0x70], 4
lea rcx, [rsp + 0x70]
call sub.VCRUNTIME140.dll__CxxThrowException
int3