Function at 0x14000d920
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1380]
mov eax, 0x1480
call fcn.1400602b0
sub rsp, rax
mov rax, qword [0x140088008]
xor rax, rsp
mov qword [rbp + 0x1370], rax
mov r15, rcx
mov byte [rsp + 0x40], 0
xor ecx, ecx
mov dword [rsp + 0x44], 1
xor r14b, r14b
mov dword [rsp + 0x48], ecx
xor eax, eax
mov dword [rsp + 0x50], ecx
mov rbx, qword [r15]
mov r12d, ecx
mov r13d, ecx
mov dword [rsp + 0x54], ecx
mov dword [rsp + 0x4c], ecx
mov qword [r15 + 0x10], rcx
mov qword [r15 + 8], rcx
mov qword [r15 + 0x18], rcx
mov byte [rsp + 0x41], r14b
mov byte [rbp + 0xf60], r14b
mov r14d, ecx
mov rcx, rbx
mov word [rbp + 0xf61], ax
call fcn.14000c0b0
test eax, eax
je 0x14000e553
mov qword [rsp + 0x14b8], rsi
mov qword [rsp + 0x14c0], rdi
mov rcx, rbx
call fcn.140005310
mov rcx, rbx
mov esi, eax
call fcn.140005310
shl esi, 0x10
mov rcx, rbx
add esi, eax
mov dword [rsp + 0x58], esi
call fcn.140005310
mov rcx, rbx
mov edi, eax
call fcn.140005310
shl edi, 0x10
lea edx, [rdi + rax]
mov dword [rsp + 0x5c], edx
mov rcx, qword [rsp + 0x58]
shr rcx, 0x20
cmp ecx, 0x49484452
ja 0x14000ddfa
je 0x14000db60
cmp ecx, 0x43674249
je 0x14000daf7
cmp ecx, 0x49444154
je 0x14000da68
cmp ecx, 0x49454e44
jne 0x14000de0e
cmp dword [rsp + 0x44], 0
jne 0x14000e525
mov rsi, qword [r15 + 8]
test rsi, rsi
jne 0x14000e0be
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.no_IDAT
jmp 0x14000e538
cmp dword [rsp + 0x44], 0
jne 0x14000e525
cmp byte [rsp + 0x40], 0
je 0x14000da83
test r12d, r12d
je 0x14000e375
mov eax, dword [rsp + 0x48]
lea edi, [rsi + rax]
cmp edi, eax
jl 0x14000e541
cmp edi, r14d
jbe 0x14000dad5
test r14d, r14d
jne 0x14000daa9
mov r14d, 0x1000
cmp esi, r14d
cmova r14d, esi
cmp edi, r14d
jbe 0x14000dab8
nop
add r14d, r14d
cmp edi, r14d
ja 0x14000dab0
mov rcx, qword [r15 + 8]
mov edx, r14d
call fcn.140035b2c
test rax, rax
je 0x14000e38d
mov qword [r15 + 8], rax
mov eax, dword [rsp + 0x48]
mov edx, eax
mov r8d, esi
add rdx, qword [r15 + 8]
mov rcx, rbx
call fcn.140005240
test eax, eax
je 0x14000e3a5
mov dword [rsp + 0x48], edi
jmp 0x14000e0a9
mov dword [rsp + 0x4c], 1
test esi, esi
je 0x14000e0a9
jns 0x14000db1c
mov rax, qword [rbx + 0xc8]
mov qword [rbx + 0xc0], rax
jmp 0x14000e0a9
cmp qword [rbx + 0x10], 0
je 0x14000db51
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, esi
jge 0x14000db51
mov rax, qword [rbx + 0xc8]
sub esi, ecx
mov rcx, qword [rbx + 0x28]
mov edx, esi
mov qword [rbx + 0xc0], rax
call qword [rbx + 0x18]
jmp 0x14000e0a9
movsxd rax, esi
add qword [rbx + 0xc0], rax
jmp 0x14000e0a9
cmp dword [rsp + 0x44], 0
je 0x14000e465
mov dword [rsp + 0x44], 0
cmp esi, 0xd
jne 0x14000e44d
mov rcx, rbx
call fcn.140005310
mov rcx, rbx
mov edi, eax
call fcn.140005310
shl edi, 0x10
mov rcx, rbx
add eax, edi
mov dword [rbx], eax
call fcn.140005310
mov rcx, rbx
mov edi, eax
call fcn.140005310
shl edi, 0x10
lea ecx, [rax + rdi]
mov dword [rbx + 4], ecx
cmp ecx, 0x1000000
ja 0x14000ddc6
cmp dword [rbx], 0x1000000
ja 0x14000ddc6
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x14000dbe7
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000dc0d
cmp dword [rbx + 0x30], 0
je 0x14000dc0b
mov rcx, rbx
call fcn.140005160
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000dc0d
xor cl, cl
movzx eax, cl
mov dword [r15 + 0x20], eax
cmp eax, 0x10
ja 0x14000e435
mov ecx, 0x10116
bt ecx, eax
jae 0x14000e435
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x14000dc4a
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000dc70
cmp dword [rbx + 0x30], 0
je 0x14000dc6e
mov rcx, rbx
call fcn.140005160
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000dc70
xor cl, cl
movzx edi, cl
mov dword [rsp + 0x54], edi
cmp edi, 6
ja 0x14000e3bd
cmp edi, 3
jne 0x14000dc9b
cmp dword [r15 + 0x20], 0x10
je 0x14000e3bd
movzx esi, dil
mov byte [rsp + 0x40], dil
jmp 0x14000dcaa
test dil, 1
jne 0x14000e3bd
movzx esi, byte [rsp + 0x40]
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jb 0x14000dccf
cmp dword [rbx + 0x30], 0
je 0x14000dce4
mov rcx, rbx
call fcn.140005160
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
test cl, cl
jne 0x14000e3d5
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jb 0x14000dd09
cmp dword [rbx + 0x30], 0
je 0x14000dd1e
mov rcx, rbx
call fcn.140005160
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
test cl, cl
jne 0x14000e3ed
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x14000dd3d
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000dd63
cmp dword [rbx + 0x30], 0
je 0x14000dd61
mov rcx, rbx
call fcn.140005160
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000dd63
xor cl, cl
movzx r13d, cl
mov dword [rsp + 0x50], r13d
cmp r13d, 1
ja 0x14000e41d
mov r10d, dword [rbx]
test r10d, r10d
je 0x14000e405
mov r9d, dword [rbx + 4]
test r9d, r9d
je 0x14000e405
xor edx, edx
test sil, sil
jne 0x14000ddde
mov r8d, edi
mov eax, edi
and eax, 2
shr r8d, 2
or eax, 1
and r8d, 1
add r8d, eax
mov eax, 0x40000000
div r10d
xor edx, edx
mov dword [rbx + 8], r8d
div r8d
cmp eax, r9d
jae 0x14000e0a9
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.too_large
jmp 0x14000e538
mov eax, 0x40000000
mov dword [rbx + 8], 1
div r10d
shr eax, 2
cmp eax, r9d
jb 0x14000ddc6
jmp 0x14000e0a9
cmp ecx, 0x504c5445
je 0x14000df70
cmp ecx, 0x74524e53
je 0x14000de32
cmp dword [rsp + 0x44], 0
jne 0x14000e525
bt edx, 0x1d
jae 0x14000e47d
mov edx, esi
mov rcx, rbx
call fcn.1400051e0
jmp 0x14000e0a9
cmp dword [rsp + 0x44], 0
jne 0x14000e525
cmp qword [r15 + 8], 0
jne 0x14000e4fb
cmp byte [rsp + 0x40], 0
je 0x14000ded6
test r12d, r12d
je 0x14000e4d1
cmp esi, r12d
ja 0x14000e4bc
mov byte [rsp + 0x40], 4
test esi, esi
je 0x14000e0a9
lea rdi, [rbp + 0xf73]
nop dword [rax]
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x14000de9f
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000dec5
cmp dword [rbx + 0x30], 0
je 0x14000dec3
mov rcx, rbx
call fcn.140005160
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000dec5
xor cl, cl
mov byte [rdi], cl
add rdi, 4
sub rsi, 1
jne 0x14000de80
jmp 0x14000e0a9
mov ecx, dword [rbx + 8]
test cl, 1
je 0x14000e4e6
lea eax, [rcx + rcx]
cmp esi, eax
jne 0x14000e4bc
xor esi, esi
mov byte [rsp + 0x41], 1
cmp dword [r15 + 0x20], 0x10
jne 0x14000df2b
test ecx, ecx
jle 0x14000e0a9
lea rdi, [rbp + 0xf64]
nop word [rax + rax]
mov rcx, rbx
call fcn.140005310
inc esi
mov word [rdi], ax
lea rdi, [rdi + 2]
cmp esi, dword [rbx + 8]
jl 0x14000df10
jmp 0x14000e0a9
test ecx, ecx
jle 0x14000e0a9
lea rdi, [rbp + 0xf60]
lea r13, [0x140074390]
mov rcx, rbx
call fcn.140005310
movsxd rcx, dword [r15 + 0x20]
lea rdi, [rdi + 1]
movzx eax, al
inc esi
movzx edx, byte [rcx + r13]
imul eax, edx
mov byte [rdi - 1], al
cmp esi, dword [rbx + 8]
jl 0x14000df41
mov r13d, dword [rsp + 0x50]
jmp 0x14000e0a9
cmp dword [rsp + 0x44], 0
jne 0x14000e525
cmp esi, 0x300
ja 0x14000e510
mov eax, 0xaaaaaaab
mul esi
mov r12d, edx
shr r12d, 1
lea eax, [r12 + r12*2]
cmp eax, esi
jne 0x14000e510
test r12d, r12d
je 0x14000e0a9
lea rdi, [rbp + 0xf72]
mov esi, r12d
nop dword [rax]
nop word [rax + rax]
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x14000dfdf
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000e005
cmp dword [rbx + 0x30], 0
je 0x14000e003
mov rcx, rbx
call fcn.140005160
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000e005
xor cl, cl
mov rax, qword [rbx + 0xc0]
mov byte [rdi - 2], cl
cmp rax, qword [rbx + 0xc8]
jae 0x14000e027
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000e04d
cmp dword [rbx + 0x30], 0
je 0x14000e04b
mov rcx, rbx
call fcn.140005160
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000e04d
xor cl, cl
mov rax, qword [rbx + 0xc0]
mov byte [rdi - 1], cl
cmp rax, qword [rbx + 0xc8]
jae 0x14000e06f
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000e095
cmp dword [rbx + 0x30], 0
je 0x14000e093
mov rcx, rbx
call fcn.140005160
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14000e095
xor cl, cl
mov byte [rdi], cl
mov byte [rdi + 1], 0xff
add rdi, 4
sub rsi, 1
jne 0x14000dfc0
mov rcx, rbx
call fcn.140005310
mov rcx, rbx
call fcn.140005310
jmp 0x14000d9c6
mov edi, dword [r15 + 0x20]
imul edi, dword [rbx]
add edi, 7
shr edi, 3
imul edi, dword [rbx + 8]
inc edi
imul edi, dword [rbx + 4]
movsxd r14, edi
mov rcx, r14
call fcn.140036d58
mov r12d, dword [rsp + 0x4c]
mov rcx, rax
test rax, rax
jne 0x14000e0f1
xor esi, esi
jmp 0x14000e149
movsxd rax, dword [rsp + 0x48]
add rax, rsi
mov qword [rsp + 0x60], rsi
xor esi, esi
mov qword [rsp + 0x68], rax
lea rax, [r14 + rcx]
mov qword [rbp - 0x80], rcx
mov edx, esi
mov qword [rsp + 0x78], rcx
test r12d, r12d
mov qword [rbp - 0x78], rax
lea rcx, [rsp + 0x60]
mov dword [rbp - 0x70], 1
sete dl
call fcn.14000bf10
test eax, eax
je 0x14000e140
mov edi, dword [rsp + 0x78]
sub edi, dword [rbp - 0x80]
mov rax, qword [rbp - 0x80]
jmp 0x14000e14c
mov rcx, qword [rbp - 0x80]
call fcn.140036340
mov rax, rsi
mov qword [r15 + 0x10], rax
test rax, rax
je 0x14000e541
mov rcx, qword [r15 + 8]
call fcn.140036340
mov qword [r15 + 8], rsi
mov eax, dword [rbx + 8]
movzx esi, byte [rsp + 0x40]
lea ecx, [rax + 1]
test ecx, ecx
jne 0x14000e17e
test sil, sil
je 0x14000e220
movzx r14d, byte [rsp + 0x41]
test r14b, r14b
jne 0x14000e226
mov dword [rbx + 0xc], eax
mov eax, dword [rsp + 0x54]
mov r8d, edi
mov r9d, dword [rbx + 0xc]
mov rcx, r15
mov rdx, qword [r15 + 0x10]
mov dword [rsp + 0x30], r13d
mov dword [rsp + 0x28], eax
mov eax, dword [r15 + 0x20]
mov dword [rsp + 0x20], eax
call fcn.14000d2d0
test eax, eax
je 0x14000e541
test r14b, r14b
je 0x14000e2e5
mov rax, qword [r15]
mov rcx, qword [r15 + 0x18]
mov edx, dword [rax + 4]
imul edx, dword [rax]
cmp dword [r15 + 0x20], 0x10
jne 0x14000e275
cmp dword [rbx + 0xc], 2
jne 0x14000e22e
xor edi, edi
test edx, edx
je 0x14000e2e7
movzx r8d, word [rbp + 0xf64]
nop dword [rax]
cmp word [rcx], r8w
lea rcx, [rcx + 4]
mov eax, 0xffff
cmove ax, di
mov word [rcx - 2], ax
sub rdx, 1
jne 0x14000e200
jmp 0x14000e2e7
movzx r14d, byte [rsp + 0x41]
mov dword [rbx + 0xc], ecx
jmp 0x14000e190
test edx, edx
je 0x14000e2e5
mov r8, qword [rbp + 0xf66]
movzx r9d, word [rbp + 0xf64]
mov eax, edx
mov rdx, qword [rbp + 0xf68]
nop
xor edi, edi
cmp word [rcx], r9w
jne 0x14000e269
cmp word [rcx + 2], r8w
jne 0x14000e269
cmp word [rcx + 4], dx
jne 0x14000e269
mov word [rcx + 6], di
add rcx, 8
sub rax, 1
jne 0x14000e250
jmp 0x14000e2e7
cmp dword [rbx + 0xc], 2
jne 0x14000e2aa
xor edi, edi
test edx, edx
je 0x14000e2e7
movzx r8d, byte [rbp + 0xf60]
nop dword [rax]
cmp byte [rcx], r8b
lea rcx, [rcx + 2]
mov eax, 0xff
cmove eax, edi
mov byte [rcx - 1], al
sub rdx, 1
jne 0x14000e290
jmp 0x14000e2e7
test edx, edx
je 0x14000e2e5
movzx r8d, byte [rbp + 0xf61]
movzx r9d, byte [rbp + 0xf60]
mov eax, edx
movzx edx, byte [rbp + 0xf62]
cmp byte [rcx], r9b
jne 0x14000e2db
cmp byte [rcx + 1], r8b
jne 0x14000e2db
cmp byte [rcx + 2], dl
jne 0x14000e2db
mov byte [rcx + 3], 0
add rcx, 4
sub rax, 1
jne 0x14000e2c7
xor edi, edi
test r12d, r12d
je 0x14000e325
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov eax, 0x14
cmp dword [rax + rcx], 0
je 0x14000e30d
mov eax, 0x18
mov eax, dword [rax + rcx]
jmp 0x14000e313
mov eax, dword [0x14008c2b0]
test eax, eax
je 0x14000e325
cmp dword [rbx + 0xc], 2
jle 0x14000e325
mov rcx, r15
call fcn.14000d810
test sil, sil
je 0x14000e34e
movzx r9d, sil
lea rdx, [rbp + 0xf70]
mov rcx, r15
mov dword [rbx + 8], r9d
mov dword [rbx + 0xc], r9d
call fcn.14000d6b0
test eax, eax
jne 0x14000e356
jmp 0x14000e541
test r14b, r14b
je 0x14000e356
inc dword [rbx + 8]
mov rcx, qword [r15 + 0x10]
call fcn.140036340
mov rcx, rbx
mov qword [r15 + 0x10], rdi
call fcn.1400053c0
mov eax, 1
jmp 0x14000e543
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.no_PLTE
jmp 0x14000e538
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.outofmem
jmp 0x14000e538
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.outofdata
jmp 0x14000e538
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.bad_ctype
jmp 0x14000e538
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.bad_comp_method
jmp 0x14000e538
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.bad_filter_method
jmp 0x14000e538
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.0_pixel_image
jmp 0x14000e538
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.bad_interlace_method
jmp 0x14000e538
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.1_2_4_8_16_bit_only
jmp 0x14000e538
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.bad_IHDR_len
jmp 0x14000e538
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.multiple_IHDR
jmp 0x14000e538
mov eax, edx
shr eax, 0x18
mov byte [str.XXXX_PNG_chunk_not_known], al
mov eax, edx
shr eax, 0x10
mov byte [0x140088c19], al
movzx eax, byte [rsp + 0x5c]
mov byte [0x140088c1b], al
mov rax, qword gs:[0x58]
shr edx, 8
mov byte [0x140088c1a], dl
mov rcx, qword [rax]
lea rax, str.XXXX_PNG_chunk_not_known
jmp 0x14000e538
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.bad_tRNS_len
jmp 0x14000e538
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.tRNS_before_PLTE
jmp 0x14000e538
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.tRNS_with_alpha
jmp 0x14000e538
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.tRNS_after_IDAT
jmp 0x14000e538
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.invalid_PLTE
jmp 0x14000e538
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.first_not_IHDR
mov edx, 0x20
mov qword [rdx + rcx], rax
xor eax, eax
mov rsi, qword [rsp + 0x14b8]
mov rdi, qword [rsp + 0x14c0]
mov rcx, qword [rbp + 0x1370]
xor rcx, rsp
call fcn.140029de0
mov rbx, qword [rsp + 0x14c8]
add rsp, 0x1480
pop r15
pop r14
pop r13
pop r12
pop rbp
ret