Function at 0x14004bf24
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 - 0xbf0]
sub rsp, 0xcf0
mov rax, qword [0x140139980]
xor rax, rsp
mov qword [rbp + 0xbe8], rax
xor r12d, r12d
mov byte [rsp + 0x43], r8b
and dword [rcx + 8], r12d
xor eax, eax
and dword [rcx + 0x1c], r12d
mov rsi, rdx
and dword [rcx + 0xc], r12d
mov r14, rcx
and dword [rcx + 0x20], r12d
xor ebx, ebx
mov qword [rbp - 0x30], rdx
mov qword [rsp + 0x78], rcx
mov dword [rsp + 0x50], r12d
mov dword [rbp + 0xbe0], eax
mov word [rbp + 0xbe4], ax
mov rcx, rsi
call fcn.14006f82c
mov byte [rbp + rbx + 0xbe0], al
inc rbx
cmp rbx, 6
jl 0x14004bf91
cmp byte [rbp + 0xbe0], 0x47
jne 0x14004c9f0
cmp byte [rbp + 0xbe1], 0x49
jne 0x14004c9f0
cmp byte [rbp + 0xbe2], 0x46
jne 0x14004c9f0
cmp byte [rbp + 0xbe3], 0x38
movsx eax, byte [rbp + 0xbe5]
jne 0x14004bfed
cmp byte [rbp + 0xbe4], 0x39
jg 0x14004bfed
cmp al, 0x61
je 0x14004c012
movsx r9d, byte [rbp + 0xbe4]
lea rcx, str._s_is_version__c_c_c.
movsx r8d, byte [rbp + 0xbe3]
mov rdx, qword [rsi + 0x28]
mov dword [rsp + 0x20], eax
call qword [0x140138758]
mov rcx, rsi
call fcn.14006f918
movzx eax, ax
mov rcx, rsi
mov dword [rsp + 0x54], eax
call fcn.14006f918
movzx eax, ax
mov rcx, rsi
mov dword [rsp + 0x48], eax
call fcn.14006f82c
movzx ebx, al
xor r8d, r8d
mov edx, 0x208
mov byte [rsp + 0x47], bl
mov rcx, rsi
call fcn.14004bdc0
test eax, eax
jne 0x14004ca01
xor edx, edx
lea rcx, [rbp + 0x8e0]
mov r8d, 0x300
call sub.VCRUNTIME140.dll_memset
mov ecx, ebx
mov eax, 2
and ecx, 7
xor r13d, r13d
shl eax, cl
mov rcx, rsi
test bl, bl
cmovs r13d, eax
call fcn.14006f82c
mov rcx, rsi
mov byte [rsp + 0x45], al
call fcn.14006f82c
xor r8d, r8d
mov edx, 0x212
mov rcx, rsi
call fcn.14004bdc0
test eax, eax
jne 0x14004ca01
xor ecx, ecx
mov byte [rsp + 0x41], r12b
and dword [rsp + 0x64], ecx
mov byte [rsp + 0x40], r12b
mov byte [rsp + 0x42], r12b
mov dword [rsp + 0x68], ecx
test bl, bl
jns 0x14004c132
test r13d, r13d
jle 0x14004c132
xor r15d, r15d
movsxd r14, r13d
lea r12, [rbp + 0x8e1]
mov rcx, rsi
call fcn.14006f82c
mov rcx, rsi
mov byte [rbp + r15 - 0x20], al
mov dil, al
call fcn.14006f82c
mov rcx, rsi
mov byte [rbp + r15 + 0xe0], al
mov bl, al
call fcn.14006f82c
mov byte [rbp + r15 + 0x1e0], al
inc r15
mov byte [r12 - 1], dil
mov byte [r12], bl
mov byte [r12 + 1], al
lea r12, [r12 + 3]
cmp r15, r14
jl 0x14004c0db
mov r14, qword [rsp + 0x78]
mov r12d, dword [rsp + 0x50]
xor r8d, r8d
mov edx, 0x229
mov rcx, rsi
call fcn.14004bdc0
test eax, eax
jne 0x14004ca01
jmp 0x14004c984
and dword [rbp + 0xbe0], 0
cmp edi, 0x21
jne 0x14004c310
mov rcx, rsi
call fcn.14006f82c
mov rcx, rsi
movzx edi, al
call fcn.14006f82c
xor r8d, r8d
movzx r15d, al
mov edx, 0x238
mov rcx, rsi
call fcn.14004bdc0
test eax, eax
jne 0x14004ca01
cmp dil, 0xf9
jne 0x14004c20a
cmp r15d, 4
jne 0x14004c2e3
mov rcx, rsi
call fcn.14006f82c
movzx ebx, al
mov rcx, rsi
mov eax, ebx
shr eax, 2
and eax, 7
mov dword [rsp + 0x64], eax
call fcn.14006f918
movzx ecx, ax
mov dword [rsp + 0x68], ecx
mov rcx, rsi
call fcn.14006f82c
mov rcx, rsi
mov byte [rsp + 0x41], al
call fcn.14006f82c
xor r8d, r8d
movzx r15d, al
mov edx, 0x241
mov rcx, rsi
call fcn.14004bdc0
test eax, eax
jne 0x14004ca01
mov al, bl
shr bl, 1
and al, 1
and bl, 1
mov byte [rsp + 0x40], al
mov byte [rsp + 0x42], bl
jmp 0x14004c943
cmp dil, 0xff
jne 0x14004c2cf
xor edx, edx
lea rcx, [rbp + 0x2e0]
mov r8d, 0x200
call sub.VCRUNTIME140.dll_memset
xor ebx, ebx
test r15d, r15d
je 0x14004c246
mov rcx, rsi
call fcn.14006f82c
mov byte [rbp + rbx + 0x2e0], al
inc rbx
cmp rbx, r15
jl 0x14004c22f
mov rcx, rsi
call fcn.14006f82c
xor r8d, r8d
movzx r15d, al
mov edx, 0x24b
mov rcx, rsi
call fcn.14004bdc0
test eax, eax
jne 0x14004ca01
test r15d, r15d
je 0x14004c296
lea rbx, [rbp + rbx + 0x2e0]
mov rcx, rsi
call fcn.14006f82c
mov byte [rbx], al
inc rbx
sub r15d, 1
jne 0x14004c277
mov rcx, rsi
call fcn.14006f82c
movzx r15d, al
xor r8d, r8d
mov edx, 0x250
mov rcx, rsi
call fcn.14004bdc0
test eax, eax
jne 0x14004ca01
lea rax, [rbp + 0x2e0]
mov dword [rbp - 0x70], r12d
mov qword [rbp - 0x40], rax
lea rdx, [rbp - 0x70]
mov rax, qword [r14]
mov rcx, r14
call qword [rax + 0x68]
jmp 0x14004c943
cmp dil, 0xfe
je 0x14004c943
cmp dil, 1
je 0x14004c943
mov rbx, qword [rsi + 0x28]
mov rcx, rsi
call fcn.14006f9ac
mov r8d, edi
mov dword [rsp + 0x20], r15d
mov rdx, rbx
lea rcx, str._s:_unknown_GIF_extension_0x_02x_at_offset__ld__length___d
lea r9d, [rax - 3]
call qword [0x140138758]
jmp 0x14004c943
cmp edi, 0x2c
jne 0x14004c9a9
mov rcx, rsi
call fcn.14006f918
movzx eax, ax
mov rcx, rsi
mov dword [rsp + 0x6c], eax
call fcn.14006f918
movzx eax, ax
mov rcx, rsi
mov dword [rsp + 0x70], eax
call fcn.14006f918
movzx eax, ax
mov rcx, rsi
mov dword [rsp + 0x4c], eax
call fcn.14006f918
movzx eax, ax
mov rcx, rsi
mov dword [rsp + 0x58], eax
call fcn.14006f82c
movzx ebx, al
xor r8d, r8d
mov edx, 0x26b
mov byte [rsp + 0x46], bl
mov rcx, rsi
call fcn.14004bdc0
test eax, eax
jne 0x14004ca01
mov al, bl
shr al, 6
and al, 1
mov byte [rsp + 0x44], al
test bl, bl
jns 0x14004c413
mov ecx, ebx
lea r13d, [rdi - 0x2a]
and ecx, 7
xor edx, edx
shl r13d, cl
mov r8d, 0x300
lea rcx, [rbp + 0x5e0]
call sub.VCRUNTIME140.dll_memset
xor r15d, r15d
test r13d, r13d
jle 0x14004c413
lea r12, [rbp + 0x5e1]
movsxd r14, r13d
mov rcx, rsi
call fcn.14006f82c
mov rcx, rsi
mov byte [rbp + r15 - 0x20], al
mov dil, al
call fcn.14006f82c
mov rcx, rsi
mov byte [rbp + r15 + 0xe0], al
mov bl, al
call fcn.14006f82c
mov byte [rbp + r15 + 0x1e0], al
inc r15
mov byte [r12 - 1], dil
mov byte [r12], bl
mov byte [r12 + 1], al
lea r12, [r12 + 3]
cmp r15, r14
jl 0x14004c3c1
mov r14, qword [rsp + 0x78]
xor r8d, r8d
mov edx, 0x27e
mov rcx, rsi
call fcn.14004bdc0
test eax, eax
jne 0x14004ca01
mov rcx, rsi
call fcn.14006f82c
movzx r15d, al
xor r8d, r8d
mov edx, 0x285
mov rcx, rsi
mov ebx, r15d
call fcn.14004bdc0
test eax, eax
jne 0x14004ca01
lea eax, [r15 - 2]
cmp eax, 6
jbe 0x14004c46f
mov rdx, qword [rsi + 0x28]
lea rcx, str.Fl_GIF_Image:__s_invalid_LZW_initial_code_size__d._n
mov r8d, r15d
call qword [0x140138758]
inc r15d
mov dword [rsp + 0x5c], r15d
test r13d, r13d
jne 0x14004c4f3
mov rdx, qword [rsi + 0x28]
lea rcx, str._s_does_not_have_a_color_table__using_default._n
call qword [0x140138758]
mov ecx, ebx
mov word [rbp + 0x1e0], 0xff00
mov r13d, 1
mov word [rbp + 0xe0], 0xff00
shl r13d, cl
mov r8d, 2
movsxd r10, r13d
mov word [rbp - 0x20], 0xff00
cmp r8, r10
jge 0x14004c4f3
lea r11d, [r13 - 1]
mov r9d, 0x1fe
mov eax, r9d
add r9d, 0xff
cdq
idiv r11d
mov byte [rbp + r8 + 0x1e0], al
mov byte [rbp + r8 + 0xe0], al
mov byte [rbp + r8 - 0x20], al
inc r8
cmp r8, r10
jl 0x14004c4c8
mov ecx, ebx
mov eax, 1
shl eax, cl
cmp eax, 0x100
cmovg eax, r13d
cmp byte [rsp + 0x40], 0
movsxd r13, eax
mov dword [rsp + 0x60], r13d
mov rdi, r13
je 0x14004c621
movzx r15d, byte [rsp + 0x41]
mov dword [rsp + 0x60], edi
cmp r15d, edi
jl 0x14004c61c
mov eax, r15d
sub eax, edi
inc eax
cmp eax, 0x10
jb 0x14004c5f1
movsxd rdx, r15d
lea r13, [rbp - 0x20]
lea r8, [rbp - 0x20]
add r13, rdi
lea r12, [rbp + 0xe0]
add r8, rdx
lea r9, [rbp + 0xe0]
add r12, rdi
add r9, rdx
cmp r13, r9
ja 0x14004c571
cmp r8, r12
jae 0x14004c5f1
lea r10, [rbp + 0x1e0]
lea rcx, [rbp + 0x1e0]
add r10, rdi
add rcx, rdx
cmp r13, rcx
ja 0x14004c58f
cmp r8, r10
jae 0x14004c5f1
cmp r12, rcx
ja 0x14004c599
cmp r9, r10
jae 0x14004c5f1
and eax, 0x8000000f
jge 0x14004c5a7
dec eax
or eax, 0xfffffff0
inc eax
mov edx, r15d
sub edx, eax
mov eax, edi
add edi, 0x10
cmp edi, edx
jle 0x14004c5ae
sub edx, eax
mov rcx, r10
lea eax, [rdx + 0x10]
cdq
and edx, 0xf
add eax, edx
mov dl, 0xff
sar eax, 4
movsxd rbx, eax
shl rbx, 4
mov r8, rbx
call sub.VCRUNTIME140.dll_memset
mov r8, rbx
mov dl, 0xff
mov rcx, r12
call sub.VCRUNTIME140.dll_memset
mov r8, rbx
mov dl, 0xff
mov rcx, r13
call sub.VCRUNTIME140.dll_memset
movsxd rax, edi
jmp 0x14004c60e
mov byte [rbp + rax + 0x1e0], 0xff
mov byte [rbp + rax + 0xe0], 0xff
mov byte [rbp + rax - 0x20], 0xff
inc rax
cmp rax, r15
jle 0x14004c5f6
lea r13d, [r15 + 1]
mov dword [rsp + 0x60], r13d
mov r15d, dword [rsp + 0x5c]
xor r8d, r8d
mov edx, 0x2ac
mov rcx, rsi
call fcn.14004bdc0
test eax, eax
jne 0x14004ca01
mov ecx, dword [rsp + 0x58]
mov ebx, dword [rsp + 0x4c]
imul ecx, ebx
movsxd rcx, ecx
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
movzx ecx, byte [rsp + 0x44]
mov r9d, ebx
mov dword [rsp + 0x38], ecx
mov r8, rax
mov dword [rsp + 0x30], r13d
mov rdx, rsi
mov dword [rsp + 0x28], r15d
mov rcx, r14
mov r15d, dword [rsp + 0x58]
mov rdi, rax
mov dword [rsp + 0x20], r15d
mov qword [rbp - 0x80], rax
call fcn.14004ca34
cmp dword [r14 + 0x14], 0
jne 0x14004ca09
mov eax, dword [rsp + 0x50]
mov r8d, 0x2fd
cmp byte [rsp + 0x42], 0
movzx r12d, byte [rsp + 0x41]
mov dword [rbp - 0x70], eax
mov eax, dword [rsp + 0x54]
mov dword [rbp - 0x6c], eax
mov eax, dword [rsp + 0x48]
mov dword [rbp - 0x68], eax
mov eax, dword [rsp + 0x6c]
mov dword [rbp - 0x64], eax
mov eax, dword [rsp + 0x70]
mov dword [rbp - 0x60], eax
mov eax, dword [rsp + 0x64]
mov dword [rbp - 0x48], eax
mov eax, dword [rsp + 0x68]
mov ecx, eax
not ecx
mov dword [rbp - 0x5c], ebx
cmovne eax, ecx
mov dword [rbp - 0x58], r15d
mov dword [rbp - 0x44], eax
lea rcx, [rbp + 0x2e3]
movzx eax, byte [rsp + 0x45]
or ebx, 0xffffffff
cmp byte [rsp + 0x40], 0
mov dword [rbp - 0x50], eax
cmovne ebx, r12d
mov qword [rbp - 0x40], rdi
xor eax, eax
mov dword [rbp - 0x54], r13d
xor edx, edx
mov word [rbp + 0x2e0], ax
mov byte [rbp + 0x2e2], al
mov dword [rsp + 0x5c], ebx
mov dword [rbp - 0x4c], ebx
call sub.VCRUNTIME140.dll_memset
cmp byte [rsp + 0x46], 0
jge 0x14004c72c
lea rax, [rbp + 0x5e0]
jmp 0x14004c77a
cmp byte [rsp + 0x47], 0
jge 0x14004c73c
lea rax, [rbp + 0x8e0]
jmp 0x14004c77a
xor ecx, ecx
movsxd r8, r13d
test r13d, r13d
jle 0x14004c773
lea rdx, [rbp + 0x2e1]
mov al, byte [rbp + rcx - 0x20]
mov byte [rdx - 1], al
mov al, byte [rbp + rcx + 0xe0]
mov byte [rdx], al
lea rdx, [rdx + 3]
mov al, byte [rbp + rcx + 0x1e0]
inc rcx
mov byte [rdx - 2], al
cmp rcx, r8
jl 0x14004c74d
lea rax, [rbp + 0x2e0]
mov qword [rbp - 0x38], rax
lea rdx, [rbp - 0x70]
mov rax, qword [r14]
mov rcx, r14
call qword [rax + 0x60]
cmp dword [rsp + 0x50], 0
jne 0x14004c91c
cmp byte [rsp + 0x43], 0
mov eax, dword [rsp + 0x4c]
je 0x14004c8d6
mov ecx, dword [rsp + 0x54]
cmp eax, ecx
jne 0x14004c7b8
cmp r15d, dword [rsp + 0x48]
je 0x14004c8d6
mov eax, dword [rsp + 0x48]
mov dword [r14 + 0xc], eax
mov dword [r14 + 0x20], eax
imul eax, ecx
mov dword [r14 + 8], ecx
mov dword [r14 + 0x1c], ecx
mov dword [r14 + 0x10], 1
movsxd rbx, eax
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov cl, byte [rsp + 0x40]
mov r8, rbx
neg cl
mov r15, rax
mov rcx, rax
sbb edx, edx
and edx, r12d
call sub.VCRUNTIME140.dll_memset
movsxd r10, dword [rsp + 0x54]
mov r8d, dword [rsp + 0x70]
mov r11d, dword [rsp + 0x48]
mov r9d, dword [rsp + 0x6c]
mov eax, dword [rsp + 0x4c]
mov ecx, dword [rsp + 0x58]
add eax, r9d
cmp eax, r10d
cmova eax, r10d
add ecx, r8d
cmp ecx, r11d
cmova ecx, r11d
cmp r8d, ecx
jae 0x14004c896
mov r12d, eax
mov ebx, r9d
mov eax, r8d
movzx esi, r9w
imul eax, r10d
sub rbx, rsi
add rbx, qword [rbp - 0x80]
sub r12, r9
sub ecx, r8d
mov r13, r10
mov r14d, ecx
movsxd rdi, eax
lea rcx, [rdi + r15]
mov r8, r12
add rcx, rsi
mov rdx, rbx
call sub.VCRUNTIME140.dll_memcpy
movsxd rcx, dword [rsp + 0x4c]
add rdi, r13
add rbx, rcx
sub r14, 1
jne 0x14004c857
mov rsi, qword [rbp - 0x30]
mov r14, qword [rsp + 0x78]
mov r13d, dword [rsp + 0x60]
mov rdi, qword [rbp - 0x80]
mov r10d, dword [rsp + 0x54]
mov r11d, dword [rsp + 0x48]
mov eax, dword [rsp + 0x5c]
lea r9, [rbp - 0x20]
mov dword [rsp + 0x28], eax
mov r8d, r11d
mov edx, r10d
mov dword [rsp + 0x20], r13d
mov rcx, r15
call fcn.14004bb18
mov qword [r14 + 0x28], rax
mov rcx, r15
mov eax, dword [rsp + 0x58]
add eax, 2
mov dword [r14 + 0x30], 1
mov dword [r14 + 0x18], eax
call fcn.140031d40
jmp 0x14004c91c
mov dword [rsp + 0x28], ebx
lea r9, [rbp - 0x20]
mov r8d, r15d
mov dword [rsp + 0x20], r13d
mov edx, eax
mov dword [r14 + 8], eax
mov rcx, rdi
mov dword [r14 + 0x1c], eax
mov dword [r14 + 0xc], r15d
mov dword [r14 + 0x20], r15d
mov dword [r14 + 0x10], 1
call fcn.14004bb18
mov qword [r14 + 0x28], rax
lea eax, [r15 + 2]
mov dword [r14 + 0x18], eax
mov dword [r14 + 0x30], 1
mov rcx, rdi
call fcn.140031d40
cmp byte [rsp + 0x43], 0
je 0x14004ca09
mov r12d, dword [rsp + 0x50]
mov r15d, dword [rbp + 0xbe0]
inc r12d
mov dword [rsp + 0x50], r12d
xor r8d, r8d
mov edx, 0x300
mov rcx, rsi
call fcn.14004bdc0
test eax, eax
jne 0x14004ca01
test r15d, r15d
je 0x14004c984
mov rcx, rsi
call fcn.14006f9ac
mov rcx, rsi
lea edx, [r15 + rax]
call fcn.14006f958
mov rcx, rsi
call fcn.14006f82c
movzx r15d, al
test al, al
jne 0x14004c960
mov rcx, rsi
call fcn.14006f82c
xor r8d, r8d
movzx edi, al
mov edx, 0x232
mov rcx, rsi
call fcn.14004bdc0
test eax, eax
je 0x14004c14f
jmp 0x14004ca01
cmp edi, 0x3b
jne 0x14004c9cb
test r12d, r12d
jne 0x14004ca09
mov rdx, qword [rsi + 0x28]
lea rcx, str._s:_no_image_data_found.
call qword [case.0x140061e48.0]
or dword [r14 + 0x14], 0xffffffff
jmp 0x14004ca09
mov rbx, qword [rsi + 0x28]
mov rcx, rsi
call fcn.14006f9ac
mov r8d, edi
lea rcx, str._s:_unknown_GIF_code_0x_02x_at_offset__ld
mov rdx, rbx
lea r9d, [rax - 1]
call qword [case.0x140061e48.0]
jmp 0x14004ca01
mov rdx, qword [rsi + 0x28]
lea rcx, str.Fl_GIF_Image:__s_is_not_a_GIF_file._n
call qword [case.0x140061e48.0]
mov dword [r14 + 0x14], 0xfffffffd
mov rcx, qword [rbp + 0xbe8]
xor rcx, rsp
call fcn.1400a6970
mov rbx, qword [rsp + 0xd40]
add rsp, 0xcf0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret