Function at 0x140065870
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 [0x140131048]
xor rax, rsp
mov qword [rbp + 0xbe0], rax
xor eax, eax
mov qword [rsp + 0x78], rcx
mov qword [rcx + 8], rax
mov r13, rcx
mov qword [rcx + 0x1c], rax
mov rbx, rdx
mov rcx, rdx
mov byte [rsp + 0x43], r8b
mov qword [rbp - 0x30], rdx
mov dword [rsp + 0x4c], eax
call fcn.14009eba0
mov rcx, rbx
movzx edi, al
call fcn.14009eba0
mov rcx, rbx
movzx r15d, al
call fcn.14009eba0
mov rcx, rbx
movzx r12d, al
call fcn.14009eba0
mov rcx, rbx
movsx r14d, al
call fcn.14009eba0
mov rcx, rbx
movsx esi, al
call fcn.14009eba0
cmp dil, 0x47
jne 0x14006641f
cmp r15b, 0x49
jne 0x14006641f
cmp r12b, 0x46
jne 0x14006641f
cmp r14b, 0x38
jne 0x140065932
cmp sil, 0x39
jg 0x140065932
cmp al, 0x61
je 0x140065950
mov rdx, qword [rbx + 0x28]
lea rcx, str._s_is_version__c_c_c.
movsx eax, al
mov r9d, esi
mov r8d, r14d
mov dword [rsp + 0x20], eax
call qword [0x14012fb78]
mov rcx, rbx
call fcn.14009eca0
movzx eax, ax
mov rcx, rbx
mov dword [rsp + 0x58], eax
call fcn.14009eca0
movzx eax, ax
mov rcx, rbx
mov dword [rsp + 0x50], eax
call fcn.14009eba0
cmp dword [rbx + 0x30], 0
movzx esi, al
mov byte [rsp + 0x4b], al
je 0x140065999
mov rdi, qword [rbx + 0x28]
mov rcx, rbx
call fcn.14009ed50
mov edx, 0x208
jmp 0x14006640a
xor edx, edx
lea rcx, [rbp + 0x8e0]
mov r8d, 0x300
call sub.VCRUNTIME140.dll_memset
test sil, sil
jns 0x1400659c1
mov ecx, esi
mov edi, 2
and ecx, 7
shl edi, cl
jmp 0x1400659c3
xor edi, edi
mov rcx, rbx
mov dword [rsp + 0x44], edi
call fcn.14009eba0
mov rcx, rbx
mov byte [rsp + 0x49], al
call fcn.14009eba0
cmp dword [rbx + 0x30], 0
je 0x1400659f7
mov rdi, qword [rbx + 0x28]
mov rcx, rbx
call fcn.14009ed50
mov edx, 0x212
jmp 0x14006640a
mov byte [rsp + 0x41], 0
mov byte [rsp + 0x40], 0
mov byte [rsp + 0x42], 0
mov dword [rsp + 0x5c], 0
mov dword [rsp + 0x68], 0
test sil, sil
jns 0x140065a7a
movsxd r12, edi
test edi, edi
jle 0x140065a7a
xor r14d, r14d
lea r15, [rbp + 0x8e1]
nop dword [rax]
mov rcx, rbx
call fcn.14009eba0
mov rcx, rbx
mov byte [rbp + r14 - 0x20], al
movzx esi, al
call fcn.14009eba0
mov rcx, rbx
mov byte [rbp + r14 + 0xe0], al
movzx edi, al
call fcn.14009eba0
mov byte [rbp + r14 + 0x1e0], al
inc r14
mov byte [r15 - 1], sil
mov byte [r15], dil
mov byte [r15 + 1], al
lea r15, [r15 + 3]
cmp r14, r12
jl 0x140065a30
cmp dword [rbx + 0x30], 0
je 0x140065a96
mov rdi, qword [rbx + 0x28]
mov rcx, rbx
call fcn.14009ed50
mov edx, 0x229
jmp 0x14006640a
mov rcx, rbx
call fcn.14009eba0
cmp dword [rbx + 0x30], 0
movzx esi, al
jne 0x1400663f9
xor r14d, r14d
mov dword [rbp - 0x78], r14d
cmp esi, 0x21
jne 0x140065c50
mov rcx, rbx
call fcn.14009eba0
mov rcx, rbx
movzx esi, al
call fcn.14009eba0
cmp dword [rbx + 0x30], 0
movzx r14d, al
jne 0x140066313
cmp sil, 0xf9
jne 0x140065b54
cmp r14d, 4
jne 0x140065c23
mov rcx, rbx
call fcn.14009eba0
movzx r12d, al
mov rcx, rbx
mov eax, r12d
shr eax, 2
and eax, 7
mov dword [rsp + 0x68], eax
call fcn.14009eca0
movzx eax, ax
mov rcx, rbx
mov dword [rsp + 0x5c], eax
call fcn.14009eba0
mov rcx, rbx
mov byte [rsp + 0x41], al
call fcn.14009eba0
cmp dword [rbx + 0x30], 0
movzx r14d, al
jne 0x1400662d1
movzx r15d, r12b
shr r12b, 1
and r15b, 1
and r12b, 1
mov byte [rsp + 0x40], r15b
mov byte [rsp + 0x42], r12b
jmp 0x140066295
cmp sil, 0xff
jne 0x140065c0f
xor edx, edx
lea rcx, [rbp + 0x2e0]
mov r8d, 0x200
call sub.VCRUNTIME140.dll_memset
xor edi, edi
test r14d, r14d
je 0x140065b97
nop dword [rax]
mov rcx, rbx
call fcn.14009eba0
mov byte [rbp + rdi + 0x2e0], al
inc rdi
cmp rdi, r14
jl 0x140065b80
mov rcx, rbx
call fcn.14009eba0
cmp dword [rbx + 0x30], 0
movzx r14d, al
jne 0x1400662fd
test al, al
je 0x140065be0
lea rdi, [rbp + rdi + 0x2e0]
nop dword [rax]
mov rcx, rbx
call fcn.14009eba0
mov byte [rdi], al
lea rdi, [rdi + 1]
sub r14d, 1
jne 0x140065bc0
mov rcx, rbx
call fcn.14009eba0
movzx r14d, al
cmp dword [rbx + 0x30], 0
jne 0x1400662e7
mov eax, dword [rsp + 0x4c]
lea rdx, [rbp - 0x70]
mov dword [rbp - 0x70], eax
mov rcx, r13
lea rax, [rbp + 0x2e0]
mov qword [rbp - 0x40], rax
mov rax, qword [r13]
call qword [rax + 0x68]
jmp 0x140066295
cmp sil, 0xfe
je 0x140066295
cmp sil, 1
je 0x140066295
mov rdi, qword [rbx + 0x28]
mov rcx, rbx
call fcn.14009ed50
mov r8d, esi
mov dword [rsp + 0x20], r14d
mov rdx, rdi
lea rcx, str._s:_unknown_GIF_extension_0x_02x_at_offset__ld__length___d
lea r9d, [rax - 3]
call qword [0x14012fb78]
jmp 0x140066295
cmp esi, 0x2c
jne 0x1400663ad
mov rcx, rbx
call fcn.14009eca0
movzx eax, ax
mov rcx, rbx
mov dword [rsp + 0x6c], eax
call fcn.14009eca0
movzx eax, ax
mov rcx, rbx
mov dword [rbp - 0x80], eax
call fcn.14009eca0
movzx eax, ax
mov rcx, rbx
mov dword [rsp + 0x70], eax
call fcn.14009eca0
movzx eax, ax
mov rcx, rbx
mov dword [rsp + 0x54], eax
call fcn.14009eba0
movzx ecx, al
mov byte [rsp + 0x4a], al
cmp dword [rbx + 0x30], r14d
jne 0x14006639a
shr al, 6
and al, 1
mov byte [rsp + 0x48], al
test cl, cl
jns 0x140065d4a
mov ecx, ecx
mov esi, 2
and ecx, 7
xor edx, edx
shl esi, cl
mov r8d, 0x300
lea rcx, [rbp + 0x5e0]
mov dword [rsp + 0x44], esi
call sub.VCRUNTIME140.dll_memset
xor r15d, r15d
movsxd r13, esi
test esi, esi
jle 0x14006604c
lea r12, [rbp + 0x5e1]
mov rcx, rbx
call fcn.14009eba0
mov rcx, rbx
mov byte [rbp + r15 - 0x20], al
movzx esi, al
call fcn.14009eba0
mov rcx, rbx
mov byte [rbp + r15 + 0xe0], al
movzx edi, al
call fcn.14009eba0
mov byte [rbp + r15 + 0x1e0], al
inc r15
mov byte [r12 - 1], sil
mov byte [r12], dil
mov byte [r12 + 1], al
lea r12, [r12 + 3]
cmp r15, r13
jl 0x140065cf7
mov r13, qword [rsp + 0x78]
mov esi, dword [rsp + 0x44]
mov rcx, rbx
cmp dword [rbx + 0x30], r14d
jne 0x14006638a
call fcn.14009eba0
movzx r12d, al
mov edi, r12d
cmp dword [rbx + 0x30], r14d
jne 0x140066374
lea eax, [r12 - 2]
cmp eax, 6
jbe 0x140065d8f
mov rdx, qword [rbx + 0x28]
lea rcx, str.Fl_GIF_Image:__s_invalid_LZW_initial_code_size__d._n
mov r8d, r12d
call qword [0x14012fb78]
inc r12d
mov dword [rsp + 0x60], r12d
test esi, esi
jne 0x140065e1b
mov rdx, qword [rbx + 0x28]
lea rcx, str._s_does_not_have_a_color_table__using_default._n
call qword [0x14012fb78]
mov ecx, edi
mov word [rbp + 0x1e0], 0xff00
mov esi, 1
mov word [rbp + 0xe0], 0xff00
shl esi, cl
mov r8d, 2
movsxd r10, esi
mov dword [rsp + 0x44], esi
mov word [rbp - 0x20], 0xff00
cmp r8, r10
jge 0x140065e1b
lea r11d, [rsi - 1]
mov r9d, 0x1fe
nop dword [rax]
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 0x140065df0
mov ecx, edi
mov esi, 1
shl esi, cl
cmp esi, 0x100
cmovg esi, dword [rsp + 0x44]
mov edi, esi
mov dword [rsp + 0x44], esi
cmp byte [rsp + 0x40], r14b
je 0x140065f55
movzx r15d, byte [rsp + 0x41]
mov dword [rsp + 0x44], esi
cmp r15d, esi
jl 0x140065f55
mov eax, r15d
sub eax, esi
inc eax
cmp eax, 0x10
jb 0x140065f1e
movsxd rcx, esi
lea r13, [rbp - 0x20]
movsxd rdx, r15d
lea r8, [rbp - 0x20]
lea r12, [rbp + 0xe0]
add r13, rcx
lea r9, [rbp + 0xe0]
add r8, rdx
add r12, rcx
add r9, rdx
cmp r13, r9
ja 0x140065e99
cmp r8, r12
jae 0x140065f19
lea r10, [rbp + 0x1e0]
add r10, rcx
lea rcx, [rbp + 0x1e0]
add rcx, rdx
cmp r13, rcx
ja 0x140065eb7
cmp r8, r10
jae 0x140065f19
cmp r12, rcx
ja 0x140065ec1
cmp r9, r10
jae 0x140065f19
and eax, 0x8000000f
jge 0x140065ecf
dec eax
or eax, 0xfffffff0
inc eax
mov edx, r15d
sub edx, eax
mov eax, esi
add esi, 0x10
cmp esi, edx
jle 0x140065ed6
sub edx, eax
mov rcx, r10
lea eax, [rdx + 0x10]
cdq
and edx, 0xf
add eax, edx
mov dl, 0xff
sar eax, 4
movsxd rdi, eax
shl rdi, 4
mov r8, rdi
call sub.VCRUNTIME140.dll_memset
mov r8, rdi
mov dl, 0xff
mov rcx, r12
call sub.VCRUNTIME140.dll_memset
mov r8, rdi
mov dl, 0xff
mov rcx, r13
call sub.VCRUNTIME140.dll_memset
mov r12d, dword [rsp + 0x60]
movsxd rax, esi
cmp rax, r15
jg 0x140065f4d
nop word [rax + rax]
mov byte [rbp + rax + 0x1e0], 0xff
mov byte [rbp + rax + 0xe0], 0xff
mov byte [rbp + rax - 0x20], 0xff
inc rax
cmp rax, r15
jle 0x140065f30
lea edi, [r15 + 1]
mov dword [rsp + 0x44], edi
cmp dword [rbx + 0x30], r14d
jne 0x14006633f
mov eax, dword [rsp + 0x54]
mov esi, dword [rsp + 0x70]
imul eax, esi
movsxd rcx, eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
movzx ecx, byte [rsp + 0x48]
mov r9d, esi
mov r13, qword [rsp + 0x78]
mov r8, rax
mov dword [rsp + 0x38], ecx
mov rdx, rbx
mov dword [rsp + 0x30], edi
mov rcx, r13
mov dword [rsp + 0x28], r12d
mov r15, rax
mov r12d, dword [rsp + 0x54]
mov dword [rsp + 0x20], r12d
mov qword [rsp + 0x60], rax
call fcn.140066470
cmp dword [r13 + 0x14], r14d
jne 0x140066438
mov eax, dword [rsp + 0x4c]
mov dword [rbp - 0x70], eax
mov eax, dword [rsp + 0x58]
mov dword [rbp - 0x6c], eax
mov eax, dword [rsp + 0x50]
mov dword [rbp - 0x68], eax
mov eax, dword [rsp + 0x6c]
mov dword [rbp - 0x64], eax
mov eax, dword [rbp - 0x80]
mov dword [rbp - 0x60], eax
mov eax, dword [rsp + 0x5c]
mov dword [rbp - 0x5c], esi
mov dword [rbp - 0x58], r12d
mov qword [rbp - 0x40], r15
cmp byte [rsp + 0x42], r14b
je 0x140065ff0
not eax
mov ecx, dword [rsp + 0x68]
mov dword [rbp - 0x48], ecx
movzx ecx, byte [rsp + 0x41]
mov dword [rbp - 0x44], eax
cmp byte [rsp + 0x40], r14b
jne 0x14006600b
mov ecx, 0xffffffff
movzx eax, byte [rsp + 0x49]
xor edx, edx
mov dword [rbp - 0x50], eax
mov r8d, 0x2fd
xor eax, eax
mov dword [rbp - 0x4c], ecx
lea rcx, [rbp + 0x2e3]
mov word [rbp + 0x2e0], ax
mov byte [rbp + 0x2e2], al
mov dword [rbp - 0x54], edi
call sub.VCRUNTIME140.dll_memset
cmp byte [rsp + 0x4a], r14b
jge 0x140066056
lea rax, [rbp + 0x5e0]
jmp 0x1400660b1
mov r13, qword [rsp + 0x78]
jmp 0x140065d4e
cmp byte [rsp + 0x4b], r14b
jge 0x140066066
lea rax, [rbp + 0x8e0]
jmp 0x1400660b1
xor ecx, ecx
movsxd r8, edi
test edi, edi
jle 0x1400660aa
lea rdx, [rbp + 0x2e1]
nop word [rax + rax]
movzx eax, byte [rbp + rcx - 0x20]
mov byte [rdx - 1], al
lea rdx, [rdx + 3]
movzx eax, byte [rbp + rcx + 0xe0]
mov byte [rdx - 3], al
movzx eax, byte [rbp + rcx + 0x1e0]
inc rcx
mov byte [rdx - 2], al
cmp rcx, r8
jl 0x140066080
lea rax, [rbp + 0x2e0]
mov qword [rbp - 0x38], rax
lea rdx, [rbp - 0x70]
mov rax, qword [r13]
mov rcx, r13
call qword [rax + 0x60]
cmp dword [rsp + 0x4c], r14d
jne 0x14006627e
cmp byte [rsp + 0x43], r14b
je 0x140066227
mov ecx, dword [rsp + 0x58]
mov eax, dword [rsp + 0x50]
cmp esi, ecx
jne 0x1400660ee
cmp r12d, eax
je 0x140066227
mov dword [r13 + 0xc], eax
mov dword [r13 + 0x20], eax
imul eax, ecx
mov dword [r13 + 8], ecx
mov dword [r13 + 0x1c], ecx
mov dword [r13 + 0x10], 1
movsxd rdi, eax
mov rcx, rdi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov r12, rax
cmp byte [rsp + 0x40], r14b
je 0x140066125
movzx edx, byte [rsp + 0x41]
jmp 0x140066127
xor edx, edx
mov r8, rdi
mov rcx, r12
call sub.VCRUNTIME140.dll_memset
mov edx, dword [rbp - 0x80]
movsxd r10, dword [rsp + 0x58]
mov r11d, dword [rsp + 0x50]
mov r8d, dword [rsp + 0x6c]
lea eax, [r8 + rsi]
mov esi, dword [rsp + 0x54]
cmp eax, r10d
cmova eax, r10d
lea ecx, [rdx + rsi]
cmp ecx, r11d
cmova ecx, r11d
cmp edx, ecx
jae 0x1400661d3
mov r13d, eax
mov edi, r8d
mov eax, edx
movzx ebx, r8w
imul eax, r10d
sub rdi, rbx
add rdi, r15
sub r13, r8
sub ecx, edx
mov r14, r10
mov r15d, ecx
movsxd rsi, eax
nop word [rax + rax]
lea rcx, [rsi + rbx]
mov r8, r13
add rcx, r12
mov rdx, rdi
call sub.VCRUNTIME140.dll_memcpy
movsxd rcx, dword [rsp + 0x70]
add rsi, r14
add rdi, rcx
sub r15, 1
jne 0x140066190
mov rbx, qword [rbp - 0x30]
mov r14d, dword [rbp - 0x78]
mov r13, qword [rsp + 0x78]
mov r15, qword [rsp + 0x60]
mov esi, dword [rsp + 0x54]
mov r10d, dword [rsp + 0x58]
mov r11d, dword [rsp + 0x50]
cmp byte [rsp + 0x40], 0
movzx eax, byte [rsp + 0x41]
jne 0x1400661e4
mov eax, 0xffffffff
mov edi, dword [rsp + 0x44]
lea r9, [rbp - 0x20]
mov dword [rsp + 0x28], eax
mov r8d, r11d
mov edx, r10d
mov dword [rsp + 0x20], edi
mov rcx, r12
call fcn.140065460
mov qword [r13 + 0x28], rax
mov rcx, r12
lea eax, [rsi + 2]
mov dword [r13 + 0x30], 1
mov dword [r13 + 0x18], eax
call fcn.1400466d0
mov rcx, r15
call fcn.1400466d0
jmp 0x140066291
movzx eax, byte [rsp + 0x41]
mov dword [r13 + 8], esi
mov dword [r13 + 0x1c], esi
mov dword [r13 + 0xc], r12d
mov dword [r13 + 0x20], r12d
mov dword [r13 + 0x10], 1
cmp byte [rsp + 0x40], r14b
jne 0x140066250
mov eax, 0xffffffff
mov dword [rsp + 0x28], eax
lea r9, [rbp - 0x20]
mov r8d, r12d
mov dword [rsp + 0x20], edi
mov edx, esi
mov rcx, r15
call fcn.140065460
mov qword [r13 + 0x28], rax
lea eax, [r12 + 2]
mov dword [r13 + 0x18], eax
mov dword [r13 + 0x30], 1
mov rcx, r15
call fcn.1400466d0
cmp byte [rsp + 0x43], r14b
je 0x140066438
inc dword [rsp + 0x4c]
cmp dword [rbx + 0x30], 0
jne 0x140066329
test r14d, r14d
je 0x140065a96
mov rcx, rbx
call fcn.14009ed50
mov rcx, rbx
lea edx, [r14 + rax]
call fcn.14009ecf0
mov rcx, rbx
call fcn.14009eba0
movzx r14d, al
test al, al
jne 0x1400662a8
jmp 0x140065a96
mov rdi, qword [rbx + 0x28]
mov rcx, rbx
call fcn.14009ed50
mov edx, 0x241
jmp 0x14006640a
mov rdi, qword [rbx + 0x28]
mov rcx, rbx
call fcn.14009ed50
mov edx, 0x250
jmp 0x14006640a
mov rdi, qword [rbx + 0x28]
mov rcx, rbx
call fcn.14009ed50
mov edx, 0x24b
jmp 0x14006640a
mov rdi, qword [rbx + 0x28]
mov rcx, rbx
call fcn.14009ed50
mov edx, 0x238
jmp 0x14006640a
mov rdi, qword [rbx + 0x28]
mov rcx, rbx
call fcn.14009ed50
mov edx, 0x300
jmp 0x14006640a
mov rdi, qword [rbx + 0x28]
mov rcx, rbx
call fcn.14009ed50
mov r9d, eax
lea rcx, str.__d__Fl_GIF_Image:__s___unexpected_EOF_or_read_error_at_offset__ld
mov r8, rdi
mov edx, 0x2ac
call qword [case.0x140083a43.0]
mov rax, qword [rsp + 0x78]
mov dword [rax + 0x14], 0xfffffffd
jmp 0x140066438
mov rdi, qword [rbx + 0x28]
mov rcx, rbx
call fcn.14009ed50
mov edx, 0x285
jmp 0x14006640a
mov rdi, qword [rbx + 0x28]
call fcn.14009ed50
mov edx, 0x27e
jmp 0x14006640a
mov rdi, qword [rbx + 0x28]
mov rcx, rbx
call fcn.14009ed50
mov edx, 0x26b
jmp 0x14006640a
cmp esi, 0x3b
jne 0x1400663d4
cmp dword [rsp + 0x4c], r14d
jne 0x140066438
mov rdx, qword [rbx + 0x28]
lea rcx, str._s:_no_image_data_found.
call qword [case.0x140083a43.0]
mov dword [r13 + 0x14], 0xffffffff
jmp 0x140066438
mov rdi, qword [rbx + 0x28]
mov rcx, rbx
call fcn.14009ed50
mov r8d, esi
lea rcx, str._s:_unknown_GIF_code_0x_02x_at_offset__ld
mov rdx, rdi
lea r9d, [rax - 1]
call qword [case.0x140083a43.0]
jmp 0x140066430
mov rdi, qword [rbx + 0x28]
mov rcx, rbx
call fcn.14009ed50
mov edx, 0x232
mov r9d, eax
lea rcx, str.__d__Fl_GIF_Image:__s___unexpected_EOF_or_read_error_at_offset__ld
mov r8, rdi
call qword [case.0x140083a43.0]
jmp 0x140066430
mov rdx, qword [rbx + 0x28]
lea rcx, str.Fl_GIF_Image:__s_is_not_a_GIF_file._n
call qword [case.0x140083a43.0]
mov dword [r13 + 0x14], 0xfffffffd
mov rcx, qword [rbp + 0xbe0]
xor rcx, rsp
call fcn.1400ea730
mov rbx, qword [rsp + 0xd40]
add rsp, 0xcf0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret