Function at 0x14003e6a0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1b00]
mov eax, 0x1c00
call fcn.14007cae0
sub rsp, rax
mov qword [rbp - 0x58], 0xfffffffffffffffe
mov qword [rsp + 0x1c38], rbx
mov qword [rsp + 0x1c40], rsi
mov qword [rsp + 0x1c48], rdi
mov rax, qword [0x1400ada20]
xor rax, rsp
mov qword [rbp + 0x1af0], rax
mov r15, rcx
mov qword [rsp + 0x38], rcx
mov eax, 0x300
cmp word [rcx + 0x16], ax
ja 0x14003f1b9
cmp word [rcx + 0x12], ax
ja 0x14003f1b9
mov eax, 0x200
cmp word [rcx + 0x14], ax
ja 0x14003f1b9
cmp word [rcx + 0x10], ax
ja 0x14003f1b9
lea r8, [rsp + 0x2c]
mov edx, 0x1300
lea rcx, [rsp + 0x60]
call fcn.140032060
nop
mov eax, 0x10
mov dword [rbp - 0x48], 0x100010
mov word [rbp - 0x44], ax
lea r8, [0x1400959ba]
xor r12d, r12d
lea r10, [0x1400959ce]
movsd xmm4, qword [0x140080ef0]
nop dword [rax + rax]
movzx r9d, word [r8 - 2]
movzx eax, word [r8 + 2]
mov edx, eax
cmp r9, rax
ja 0x14003e7ed
sub eax, r9d
movd xmm1, eax
cvtdq2ps xmm1, xmm1
movzx ecx, word [r8]
movzx eax, word [r8 + 4]
sub eax, ecx
movd xmm2, eax
cvtdq2ps xmm2, xmm2
movd xmm3, ecx
cvtdq2ps xmm3, xmm3
mov ecx, r12d
lea rdi, [r15 + 0x1510]
lea rdi, [rdi + r9*2]
sub rdx, r9
inc rdx
nop dword [rax + rax]
movd xmm0, ecx
cvtdq2ps xmm0, xmm0
divss xmm0, xmm1
mulss xmm0, xmm2
addss xmm0, xmm3
cvtps2pd xmm0, xmm0
addsd xmm0, xmm4
cvttsd2si eax, xmm0
mov word [rdi], ax
inc ecx
add rdi, 2
sub rdx, 1
jne 0x14003e7c0
add r8, 4
cmp r8, r10
jl 0x14003e770
mov r9, r12
mov r8, r12
lea r10, [0x1400958b1]
mov rbx, qword [rsp + 0x60]
nop dword [rax]
movzx ecx, byte [r8 + r10 - 1]
mov eax, 0x100
sar eax, cl
test eax, eax
jle 0x14003e841
lea rdi, [rbx + r9*2]
mov edx, eax
movsx ecx, cl
shl cx, 8
movzx eax, byte [r8 + r10]
or cx, ax
movzx eax, cx
mov ecx, edx
rep stosw word [rdi], ax
add r9, rdx
add r8, 2
cmp r8, 0x104
jl 0x14003e810
mov ecx, r12d
cmp dword [r15 + 0x5d1f0], 0xf3
setne cl
add ecx, 2
mov edx, r12d
mov r8d, 8
sub r8d, ecx
shl r8d, 8
lea r9d, [rcx - 1]
lea rax, [rbx + 0x2400]
mov qword [rsp + 0x78], rax
mov rdi, rax
nop word [rax + rax]
mov eax, edx
sar eax, cl
shl eax, cl
or eax, r8d
bts eax, r9d
mov word [rdi], ax
inc edx
lea rdi, [rdi + 2]
cmp edx, 0x100
jl 0x14003e890
xor r8d, r8d
lea edx, [r8 - 1]
mov rcx, r15
call sym.EURawImg.exe_protected:_unsigned_int___cdecl_LibRaw::getbithuff_int__unsigned_short_int____ptr64____ptr64
mov eax, 0x800
movsx rax, ax
lea rdi, [rbp - 0x40]
mov ecx, 0xd92
rep stosw word [rdi], ax
mov dword [rsp + 0x20], r12d
movzx eax, word [r15 + 0x14]
cmp r12w, ax
jae 0x14003f0d6
mov rcx, r15
call sym.EURawImg.exe_protected:_void___cdecl_LibRaw::checkCancel_void____ptr64
mov rdi, r12
xor r8d, r8d
lea edx, [r8 + 6]
mov rcx, r15
call sym.EURawImg.exe_protected:_unsigned_int___cdecl_LibRaw::getbithuff_int__unsigned_short_int____ptr64____ptr64
mov word [rbp + rdi*2 - 0x50], ax
inc rdi
cmp rdi, 3
jl 0x14003e8f1
cmp word [rbp - 0x50], 0
je 0x14003f19f
cmp word [rbp - 0x4e], 0
je 0x14003f19f
cmp word [rbp - 0x4c], 0
je 0x14003f19f
mov esi, r12d
mov dword [rsp + 0x24], r12d
mov r13, r12
mov qword [rsp + 0x48], r12
nop
movsx ebx, word [rbp + r13*2 - 0x50]
mov dword [rsp + 0x34], ebx
movsx ecx, word [rbp + r13*2 - 0x48]
mov eax, 0x1000000
cdq
idiv ecx
lea edi, [rax + 0x7ff]
sar edi, 0xc
imul edi, ebx
mov r9d, ntohl
cmp edi, 0x1001c
mov eax, 0xa
cmovg r9d, eax
lea ecx, [r9 - 1]
mov edx, 0xffffffff
shl edx, cl
not edx
mov ecx, ntohl
sub ecx, r9d
shl edi, cl
movsxd r10, edi
movsxd r11, edx
imul rax, r13, 0x90c
lea rdi, [rbp - 0x40]
add rdi, rax
mov r8d, 0x486
mov r14d, 0x7fffffff
movsx rdx, word [rdi]
imul rdx, r10
add rdx, r11
cmp rdx, r14
cmovg rdx, r14
mov ecx, r9d
sar rdx, cl
mov word [rdi], dx
lea rdi, [rdi + 2]
sub r8, 1
jne 0x14003e9b0
mov word [rbp + r13*2 - 0x48], bx
mov edi, dword [rsp + 0x34]
shl edi, 7
mov dword [rsp + 0x34], edi
imul r8, r13, 0x486
mov qword [rbp - 0x60], r8
mov eax, 0x304
test esi, esi
mov ecx, 0x302
cmove eax, ecx
mov qword [rbp - 0x78], rax
movsxd rax, esi
imul rcx, rax, 0x90c
lea rax, [rbp + 0x5c8]
add rax, rcx
mov qword [rbp - 0x70], rax
mov rax, r12
test esi, esi
mov edx, 2
cmove rax, rdx
add rax, rcx
lea rcx, [rbp - 0x40]
add rax, rcx
mov qword [rbp - 0x68], rax
mov r14d, dword [rsp + 0x20]
mov dword [rsp + 0x28], r14d
mov eax, esi
neg eax
sbb rcx, rcx
add rcx, rdx
mov qword [rsp + 0x58], rcx
movzx ebx, word [r15 + 0x16]
nop word [rax + rax]
movzx edx, bx
mov eax, edx
shr rax, 1
add rax, r8
mov word [rbp + rax*2 + 0x5c8], di
mov word [rbp + rax*2 + 0x2c4], di
mov ebx, 1
mov eax, ebx
mov r14d, edx
shr r14, 1
je 0x14003ee5c
nop
shl eax, 8
cdqe
mov rdi, qword [rsp + 0x60]
lea r8, [rdi + rax*2]
mov edx, 8
mov rcx, r15
call sym.EURawImg.exe_protected:_unsigned_int___cdecl_LibRaw::getbithuff_int__unsigned_short_int____ptr64____ptr64
movsx eax, al
mov dword [rsp + 0x30], eax
test eax, eax
je 0x14003ec80
sub r14, 2
js 0x14003ee3c
lea r12, [r14 + 1]
cmp eax, 8
jne 0x14003eb31
mov rdi, rbx
cmp r12, r14
jl 0x14003eb20
lea rcx, [rdi + r13*2]
add rcx, r13
imul rax, rcx, 0x182
add rax, r12
lea rbx, [rbp - 0x40]
lea rbx, [rbx + rax*2]
mov esi, 2
mov r8, qword [rsp + 0x78]
mov edx, 8
mov rcx, r15
call sym.EURawImg.exe_protected:_unsigned_int___cdecl_LibRaw::getbithuff_int__unsigned_short_int____ptr64____ptr64
movzx ecx, al
movsx eax, word [rbp + r13*2 - 0x50]
mov edx, ecx
imul edx, eax
mov word [rbx], dx
lea rbx, [rbx - 2]
sub rsi, 1
jne 0x14003eaf3
inc rdi
cmp rdi, 3
jl 0x14003ead0
xor r12d, r12d
jmp 0x14003ee3c
mov r13, rbx
lea rsi, [rbp - 0x3e]
lea rsi, [rsi + r12*2]
mov qword [rsp + 0x40], rsi
cmp r12, r14
jl 0x14003ec58
add eax, 0xa
shl eax, 8
movsxd rcx, eax
add rcx, rcx
mov r15, r12
sub r15, r14
inc r15
mov rdx, qword [rsp + 0x48]
lea r8, [rdi + rcx]
test rdx, rdx
je 0x14003ebe0
mov qword [rsp + 0x40], r8
lea rcx, [rdx*2]
add rcx, r13
add rcx, rdx
imul rax, rcx, 0x182
add rax, r12
lea rbx, [rbp - 0x3e]
lea rbx, [rbx + rax*2]
movzx ecx, word [rbx]
nop word [rax + rax]
movsx eax, word [rbx - 0x306]
movsx ecx, cx
add eax, ecx
cdq
sub eax, edx
sar eax, 1
mov edi, eax
mov edx, 8
mov rcx, qword [rsp + 0x38]
call sym.EURawImg.exe_protected:_unsigned_int___cdecl_LibRaw::getbithuff_int__unsigned_short_int____ptr64____ptr64
movsx ecx, al
shl cx, 4
add cx, di
lea rbx, [rbx - 2]
mov word [rbx], cx
sub r15, 1
mov r8, qword [rsp + 0x40]
jne 0x14003eba0
jmp 0x14003ec4f
mov qword [rbp - 0x80], r8
mov rax, rsi
mov qword [rsp + 0x50], rax
movzx edx, word [rsi]
nop
lea rbx, [rax - 2]
movsx esi, word [rbx]
movsx eax, word [rax + 0x304]
lea eax, [rax + rsi*2]
movsx ecx, dx
add eax, ecx
cdq
and edx, 3
lea edi, [rdx + rax]
sar edi, 2
mov edx, 8
mov rcx, qword [rsp + 0x38]
call sym.EURawImg.exe_protected:_unsigned_int___cdecl_LibRaw::getbithuff_int__unsigned_short_int____ptr64____ptr64
movsx ecx, al
shl cx, 4
add cx, di
mov rax, qword [rsp + 0x50]
mov word [rax + 0x302], cx
mov rax, rbx
mov qword [rsp + 0x50], rbx
sub r15, 1
movzx edx, si
mov r8, qword [rbp - 0x80]
jne 0x14003ebf0
mov rsi, qword [rsp + 0x40]
mov eax, dword [rsp + 0x30]
mov rdi, qword [rsp + 0x60]
inc r13
add rsi, 0x304
mov qword [rsp + 0x40], rsi
cmp r13, 3
jl 0x14003eb41
mov r13, qword [rsp + 0x48]
xor r12d, r12d
jmp 0x14003ee3c
cmp r14, 2
jle 0x14003eca3
lea r8, [rdi + 0x1200]
mov edx, 8
mov rcx, r15
call sym.EURawImg.exe_protected:_unsigned_int___cdecl_LibRaw::getbithuff_int__unsigned_short_int____ptr64____ptr64
movsx r15d, al
inc r15d
jmp 0x14003eca6
mov r15d, ebx
mov esi, r12d
lea r12, [rbp - 0x3c]
lea r12, [r12 + r14*2]
cmp esi, r15d
jge 0x14003ee27
test r14, r14
jle 0x14003ee27
sub r12, 4
sub r14, 2
js 0x14003eda3
mov r11, rbx
mov r10, r12
nop word [rax + rax]
lea rdx, [r14 + 1]
cmp rdx, r14
jl 0x14003ed85
test r13, r13
je 0x14003ed42
lea rcx, [r11 + r13*2]
add rcx, r13
imul rax, rcx, 0x182
add rax, rdx
lea rdi, [rbp - 0x3e]
lea rdi, [rdi + rax*2]
mov r8d, 2
movzx ecx, word [rdi]
nop dword [rax]
nop dword [rax + rax]
movsx eax, word [rdi - 0x306]
movsx ecx, cx
add eax, ecx
cdq
sub eax, edx
sar eax, 1
mov ecx, eax
lea rdi, [rdi - 2]
mov word [rdi], ax
sub r8, 1
jne 0x14003ed20
jmp 0x14003ed85
mov r9, r10
mov ebx, 2
movzx edx, word [r10]
nop
movsx r8d, word [r9 - 2]
movsx eax, word [r9 + 0x304]
lea eax, [rax + r8*2]
movsx ecx, dx
add eax, ecx
cdq
and edx, 3
add eax, edx
sar eax, 2
mov word [r9 + 0x302], ax
lea r9, [r9 - 2]
sub rbx, 1
movzx edx, r8w
jne 0x14003ed50
inc r11
add r10, 0x304
cmp r11, 3
jl 0x14003ece0
mov rdi, qword [rsp + 0x60]
mov ebx, 1
test sil, 1
je 0x14003ee17
lea r8, [rdi + 0x1400]
mov edx, 8
mov rcx, qword [rsp + 0x38]
call sym.EURawImg.exe_protected:_unsigned_int___cdecl_LibRaw::getbithuff_int__unsigned_short_int____ptr64____ptr64
mov r10d, eax
mov rdi, rbx
lea r9, [r14 + 1]
cmp r9, r14
jl 0x14003ee0e
movsx r8d, r10b
shl r8w, 4
lea rdx, [rdi + r13*2]
add rdx, r13
imul rax, rdx, 0x182
add rax, r9
lea rcx, [rbp - 0x40]
lea rcx, [rcx + rax*2]
mov eax, 2
nop word [rax + rax]
add word [rcx], r8w
sub rcx, 2
sub rax, 1
jne 0x14003ee00
inc rdi
cmp rdi, 3
jl 0x14003edc5
inc esi
cmp esi, 8
mov rdi, qword [rsp + 0x60]
jl 0x14003ecb1
cmp r15d, 9
mov r15, qword [rsp + 0x38]
mov r12d, 0
je 0x14003ec80
test r14, r14
mov r15, qword [rsp + 0x38]
mov eax, dword [rsp + 0x30]
mov ebx, 1
jg 0x14003ea90
movzx edx, word [r15 + 0x16]
mov esi, dword [rsp + 0x24]
mov r10d, r12d
movzx ecx, dx
movzx eax, dx
mov r14d, dword [rsp + 0x28]
test eax, 0xfffffffe
jbe 0x14003eef8
movsx r11d, word [rbp + r13*2 - 0x50]
mov edi, r12d
imul rax, r13, 0x90c
lea r9, [rbp + 0x2c4]
add r9, rax
nop
movsx eax, word [r9]
shl eax, 4
cdq
idiv r11d
mov ecx, r12d
test eax, eax
cmovns cx, ax
mov rdx, qword [r15 + 0x2f3f0]
movzx r8d, word [r15 + 0x12]
test r13, r13
je 0x14003eece
mov eax, dword [rsp + 0x20]
dec eax
add eax, esi
imul eax, r8d
sub eax, esi
add eax, edi
cdqe
mov word [rdx + rax*2 + 4], cx
jmp 0x14003eedd
mov eax, r14d
imul eax, r8d
add eax, edi
cdqe
mov word [rdx + rax*2], cx
inc r10d
add edi, 2
add r9, 2
movzx ecx, word [r15 + 0x16]
mov eax, ecx
shr eax, 1
cmp r10d, eax
jl 0x14003ee90
movzx edx, cx
mov r10d, r12d
movzx eax, dx
test eax, 0xfffffffe
jbe 0x14003ef99
movsx r11d, word [rbp + r13*2 - 0x50]
mov edi, r12d
imul rax, r13, 0x90c
lea r9, [rbp + 0x5c8]
add r9, rax
nop dword [rax]
nop word [rax + rax]
movsx eax, word [r9]
shl eax, 4
cdq
idiv r11d
mov ecx, r12d
test eax, eax
cmovns cx, ax
mov rdx, qword [r15 + 0x2f3f0]
movzx r8d, word [r15 + 0x12]
test r13, r13
je 0x14003ef6e
mov eax, dword [rsp + 0x20]
inc eax
add eax, esi
imul eax, r8d
sub eax, esi
add eax, edi
cdqe
mov word [rdx + rax*2 + 4], cx
jmp 0x14003ef7f
lea eax, [r14 + 1]
imul eax, r8d
add eax, edi
cdqe
mov word [rdx + rax*2 + 2], cx
inc r10d
add edi, 2
add r9, 2
movzx ebx, word [r15 + 0x16]
mov eax, ebx
shr eax, 1
cmp r10d, eax
jl 0x14003ef30
jmp 0x14003ef9c
movzx ebx, cx
mov r8, qword [rbp - 0x78]
mov rdx, qword [rbp - 0x70]
mov rcx, qword [rbp - 0x68]
call sub.VCRUNTIME140.dll_memcpy
add dword [rsp + 0x28], 2
sub qword [rsp + 0x58], 1
mov edi, dword [rsp + 0x34]
mov r8, qword [rbp - 0x60]
jne 0x14003ea60
inc esi
mov dword [rsp + 0x24], esi
inc r13
mov qword [rsp + 0x48], r13
cmp esi, 3
jl 0x14003e940
mov eax, dword [rsp + 0x20]
lea esi, [rax + 4]
mov dword [rsp + 0x24], esi
cmp eax, esi
jge 0x14003f0c0
mov r13d, 1
nop word [rax + rax]
mov r11d, r12d
movzx ecx, word [r15 + 0x16]
cmp r12w, cx
jae 0x14003f0b2
mov esi, dword [rsp + 0x20]
nop word [rax + rax]
movzx edx, cx
lea ebx, [r11 - 1]
lea eax, [rsi - 1]
add eax, ebx
test r13b, al
je 0x14003f09b
mov r10, qword [r15 + 0x2f3f0]
movzx r8d, word [r15 + 0x12]
imul r8d, esi
lea edi, [r8 + r11]
movsxd r9, edi
lea ecx, [rbx + 2]
movzx eax, dx
mov edx, r13d
cmp ecx, eax
mov eax, 0xffffffff
cmovge edx, eax
lea eax, [rdi + rdx]
cdqe
movzx edx, word [r10 + rax*2]
test r11d, r11d
cmove ebx, r13d
add ebx, r8d
movsxd rax, ebx
movzx ecx, word [r10 + rax*2]
add edx, ecx
shr edx, 1
movzx eax, word [r10 + r9*2]
add eax, 0xfffff800
lea ecx, [rdx + rax*2]
mov eax, r12d
test ecx, ecx
cmovns ax, cx
mov word [r10 + r9*2], ax
movzx ecx, word [r15 + 0x16]
inc r11d
movzx eax, cx
cmp r11d, eax
jl 0x14003f020
mov esi, dword [rsp + 0x24]
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
cmp eax, esi
jl 0x14003f000
mov dword [rsp + 0x20], esi
movzx eax, word [r15 + 0x14]
cmp esi, eax
jl 0x14003e8e6
mov rbx, qword [rsp + 0x60]
movzx ecx, ax
movzx eax, word [r15 + 0x16]
imul ecx, eax
test ecx, ecx
jle 0x14003f121
mov rdi, r12
nop dword [rax + rax]
mov rdx, qword [r15 + 0x2f3f0]
movzx eax, word [rdx + rdi]
movzx ecx, word [r15 + rax*2 + 0x1510]
mov word [rdx + rdi], cx
inc r12d
lea rdi, [rdi + 2]
movzx ecx, word [r15 + 0x16]
movzx eax, word [r15 + 0x14]
imul ecx, eax
cmp r12d, ecx
jl 0x14003f0f0
mov dword [r15 + 0x25538], 0x3fff
test rbx, rbx
je 0x14003f16f
mov rdx, qword [rsp + 0x70]
sub rdx, rbx
sar rdx, 1
add rdx, rdx
mov rax, rbx
cmp rdx, 0x1000
jb 0x14003f167
add rdx, 0x27
mov rbx, qword [rbx - 8]
sub rax, rbx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14003f167
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rbx
call fcn.14007c570
mov rcx, qword [rbp + 0x1af0]
xor rcx, rsp
call fcn.14007c510
lea r11, [rsp + 0x1c00]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
mov dword [rsp + 0x24], 5
lea rdx, [0x1400a4c08]
lea rcx, [rsp + 0x24]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
mov dword [rsp + 0x24], 5
lea rdx, [0x1400a4c08]
lea rcx, [rsp + 0x24]
call sub.VCRUNTIME140.dll__CxxThrowException
int3