Function at 0x140023160
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x480
mov rax, qword [0x1400ed0c0]
xor rax, rsp
mov qword [rsp + 0x470], rax
mov r15, rcx
xor eax, eax
xor ecx, ecx
mov word [rsp + 0x4c], ax
mov dword [rsp + 0x48], ecx
mov r14d, ecx
mov r12d, ecx
mov dword [rsp + 0x54], ecx
mov rdi, qword [r15]
mov esi, ecx
mov dword [rsp + 0x44], ecx
xor bl, bl
mov dword [rsp + 0x50], ecx
xor r13b, r13b
mov qword [r15 + 0x10], rcx
mov ebp, 1
mov qword [r15 + 8], rcx
mov qword [r15 + 0x18], rcx
mov rcx, rdi
mov byte [rsp + 0x40], bl
mov byte [rsp + 0x4e], al
call fcn.140021f00
test eax, eax
je 0x140023787
mov rcx, rdi
call fcn.140021ed0
mov rbx, rax
mov qword [rsp + 0x58], rax
shr rax, 0x20
cmp eax, 0x49484452
ja 0x14002345d
je 0x14002330e
cmp eax, 0x43674249
je 0x1400232ef
cmp eax, 0x49444154
je 0x14002324e
cmp eax, 0x49454e44
jne 0x14002346f
test ebp, ebp
jne 0x14002391c
mov rcx, qword [r15 + 8]
test rcx, rcx
jne 0x140023641
lea rcx, str.no_IDAT
call fcn.14001b780
jmp 0x140023789
test ebp, ebp
jne 0x14002391c
test r13b, r13b
je 0x140023264
test r12d, r12d
je 0x1400237dd
cmp ebx, 0x40000000
ja 0x140023807
mov ecx, dword [rsp + 0x48]
lea eax, [rbx + rcx]
cmp eax, ecx
jl 0x140023787
cmp eax, r14d
jbe 0x1400232c5
test r14d, r14d
jne 0x140023296
mov r14d, 0x1000
cmp ebx, r14d
cmova r14d, ebx
cmp eax, r14d
jbe 0x1400232a8
nop dword [rax + rax]
add r14d, r14d
cmp eax, r14d
ja 0x1400232a0
mov rcx, qword [r15 + 8]
mov edx, r14d
call fcn.140076fec
test rax, rax
je 0x1400237eb
mov ecx, dword [rsp + 0x48]
mov qword [r15 + 8], rax
mov edx, ecx
mov r8d, ebx
add rdx, qword [r15 + 8]
mov rcx, rdi
call fcn.14001c1c0
test eax, eax
je 0x1400237f9
add dword [rsp + 0x48], ebx
mov rcx, rdi
call fcn.14001c2c0
jmp 0x1400231e6
mov edx, ebx
mov dword [rsp + 0x50], 1
mov rcx, rdi
call fcn.14001c160
mov rcx, rdi
call fcn.14001c2c0
jmp 0x1400231e6
test ebp, ebp
je 0x14002388f
xor ebp, ebp
cmp ebx, 0xd
jne 0x14002387e
mov rcx, rdi
call fcn.14001c2c0
mov rcx, rdi
mov dword [rdi], eax
call fcn.14001c2c0
mov dword [rdi + 4], eax
cmp eax, 0x1000000
ja 0x140023430
cmp dword [rdi], 0x1000000
ja 0x140023430
mov rcx, rdi
call fcn.14001c0b0
movzx eax, al
mov dword [r15 + 0x20], eax
cmp eax, 0x10
ja 0x14002386d
mov ecx, 0x10116
bt ecx, eax
jae 0x14002386d
mov rcx, rdi
call fcn.14001c0b0
movzx esi, al
mov dword [rsp + 0x44], esi
cmp esi, 6
ja 0x14002385c
cmp esi, 3
jne 0x1400233a1
cmp dword [r15 + 0x20], 0x10
je 0x14002385c
movzx r13d, sil
jmp 0x1400233ab
test sil, 1
jne 0x14002385c
mov rcx, rdi
call fcn.14001c0b0
test al, al
jne 0x14002384b
mov rcx, rdi
call fcn.14001c0b0
test al, al
jne 0x14002383a
mov rcx, rdi
call fcn.14001c0b0
movzx eax, al
mov dword [rsp + 0x54], eax
cmp eax, 1
ja 0x140023829
mov ecx, dword [rdi]
test ecx, ecx
je 0x140023818
mov r9d, dword [rdi + 4]
test r9d, r9d
je 0x140023818
xor edx, edx
mov eax, 0x40000000
div ecx
test r13b, r13b
jne 0x140023441
xor edx, edx
mov r8d, esi
shr r8d, 2
mov ecx, esi
and ecx, 2
and r8d, 1
or ecx, 1
add r8d, ecx
div r8d
mov dword [rdi + 8], r8d
cmp eax, r9d
jae 0x140023634
lea rcx, str.too_large
call fcn.14001b780
jmp 0x140023789
shr eax, 2
mov dword [rdi + 8], 1
cmp eax, r9d
jb 0x140023430
mov rcx, rdi
call fcn.14001c2c0
jmp 0x1400231e6
cmp eax, 0x504c5445
je 0x1400235b6
cmp eax, 0x74524e53
je 0x14002349c
test ebp, ebp
jne 0x14002391c
mov ecx, dword [rsp + 0x5c]
bt ecx, 0x1d
jae 0x1400238a0
mov edx, ebx
mov rcx, rdi
call fcn.14001c160
mov rcx, rdi
call fcn.14001c2c0
jmp 0x1400231e6
test ebp, ebp
jne 0x14002391c
cmp qword [r15 + 8], 0
jne 0x14002390b
test r13b, r13b
je 0x1400234fd
test r12d, r12d
je 0x1400238e9
cmp ebx, r12d
ja 0x1400238d8
xor esi, esi
mov r13b, 4
test ebx, ebx
je 0x140023630
mov rcx, rdi
call fcn.14001c0b0
lea ecx, [rsi*4 + 3]
inc esi
mov byte [rsp + rcx + 0x70], al
cmp esi, ebx
jb 0x1400234d3
mov esi, dword [rsp + 0x44]
mov rcx, rdi
call fcn.14001c2c0
jmp 0x1400231e6
mov ecx, dword [rdi + 8]
test cl, 1
je 0x1400238fa
lea eax, [rcx + rcx]
cmp ebx, eax
jne 0x1400238d8
xor esi, esi
mov byte [rsp + 0x40], 1
xor ebx, ebx
cmp dword [r15 + 0x20], 0x10
jne 0x140023562
test ecx, ecx
jle 0x140023630
nop dword [rax]
cmp rbx, 3
jge 0x140023630
mov rcx, rdi
call fcn.14001c290
mov word [rsp + rbx*2 + 0x60], ax
inc esi
inc rbx
cmp esi, dword [rdi + 8]
jl 0x140023530
mov esi, dword [rsp + 0x44]
mov rcx, rdi
call fcn.14001c2c0
jmp 0x1400231e6
test ecx, ecx
jle 0x140023630
nop word [rax + rax]
cmp rbx, 3
jge 0x140023630
mov rcx, rdi
call fcn.14001c290
movsxd rcx, dword [r15 + 0x20]
lea rdx, [0x1400cb208]
movzx eax, al
inc esi
movzx edx, byte [rcx + rdx]
imul eax, edx
mov byte [rsp + rbx + 0x4c], al
inc rbx
cmp esi, dword [rdi + 8]
jl 0x140023570
mov esi, dword [rsp + 0x44]
mov rcx, rdi
call fcn.14001c2c0
jmp 0x1400231e6
test ebp, ebp
jne 0x14002391c
cmp ebx, 0x300
ja 0x14002392d
mov eax, 0xaaaaaaab
mul ebx
mov r12d, edx
shr r12d, 1
lea eax, [r12 + r12*2]
cmp eax, ebx
jne 0x14002392d
xor esi, esi
test r12d, r12d
je 0x140023630
nop word [rax + rax]
mov rcx, rdi
lea ebx, [rsi*4]
call fcn.14001c0b0
mov rcx, rdi
mov byte [rsp + rbx + 0x70], al
call fcn.14001c0b0
lea ecx, [rbx + 1]
mov byte [rsp + rcx + 0x70], al
mov rcx, rdi
call fcn.14001c0b0
lea ecx, [rbx + 2]
inc esi
mov byte [rsp + rcx + 0x70], al
lea eax, [rbx + 3]
mov byte [rsp + rax + 0x70], 0xff
cmp esi, r12d
jb 0x1400235f0
mov esi, dword [rsp + 0x44]
mov rcx, rdi
call fcn.14001c2c0
jmp 0x1400231e6
mov r8d, dword [rdi]
lea r9, [rsp + 0x44]
imul r8d, dword [r15 + 0x20]
xor r14d, r14d
mov ebp, dword [rsp + 0x50]
mov eax, r14d
mov edx, dword [rsp + 0x48]
add r8d, 7
shr r8d, 3
imul r8d, dword [rdi + 8]
inc r8d
imul r8d, dword [rdi + 4]
test ebp, ebp
sete al
mov dword [rsp + 0x20], eax
mov dword [rsp + 0x44], r8d
call fcn.140021e20
mov qword [r15 + 0x10], rax
test rax, rax
je 0x140023787
mov rcx, qword [r15 + 8]
call fcn.1400729d4
mov qword [r15 + 8], r14
mov eax, dword [rdi + 8]
lea r9d, [rax + 1]
cmp r9d, 4
jne 0x1400236b0
test r13b, r13b
je 0x14002370b
movzx ebx, byte [rsp + 0x40]
test bl, bl
jne 0x1400236bc
mov r9d, eax
mov eax, dword [rsp + 0x54]
mov rcx, r15
mov dword [rsp + 0x30], eax
mov dword [rdi + 0xc], r9d
mov eax, dword [r15 + 0x20]
mov r8d, dword [rsp + 0x44]
mov rdx, qword [r15 + 0x10]
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], eax
call fcn.140022a10
test eax, eax
je 0x140023787
test bl, bl
je 0x140023720
cmp dword [r15 + 0x20], 0x10
mov rcx, r15
mov r8d, dword [rdi + 0xc]
jne 0x140023712
lea rdx, [rsp + 0x60]
call fcn.140022eb0
jmp 0x14002371c
movzx ebx, byte [rsp + 0x40]
jmp 0x1400236bc
lea rdx, [rsp + 0x4c]
call fcn.140022e20
test eax, eax
je 0x140023787
test ebp, ebp
je 0x14002375d
mov rax, qword gs:[0x58]
mov ecx, 0x1c
mov rax, qword [rax]
cmp dword [rcx + rax], r14d
je 0x140023745
mov ecx, 0x20
mov eax, dword [rcx + rax]
jmp 0x14002374b
mov eax, dword [0x1400fe488]
test eax, eax
je 0x14002375d
cmp dword [rdi + 0xc], 2
jle 0x14002375d
mov rcx, r15
call fcn.140023040
test r13b, r13b
je 0x1400237ba
movzx eax, r13b
lea rdx, [rsp + 0x70]
mov r9d, 4
mov dword [rdi + 8], eax
mov rcx, r15
mov dword [rdi + 0xc], 4
call fcn.140022f40
test eax, eax
jne 0x1400237c1
xor eax, eax
mov rcx, qword [rsp + 0x470]
xor rcx, rsp
call fcn.14006ca90
lea r11, [rsp + 0x480]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
test bl, bl
je 0x1400237c1
inc dword [rdi + 8]
mov rcx, qword [r15 + 0x10]
call fcn.1400729d4
mov rcx, rdi
mov qword [r15 + 0x10], r14
call fcn.14001c2c0
mov eax, 1
jmp 0x140023789
lea rcx, str.no_PLTE
call fcn.14001b780
jmp 0x140023789
lea rcx, str.outofmem
call fcn.14001b780
jmp 0x140023789
lea rcx, str.outofdata
call fcn.14001b780
jmp 0x140023789
lea rcx, str.IDAT_size_limit
call fcn.14001b780
jmp 0x140023789
lea rcx, str.0_pixel_image
call fcn.14001b780
jmp 0x140023789
lea rcx, str.bad_interlace_method
call fcn.14001b780
jmp 0x140023789
lea rcx, str.bad_filter_method
call fcn.14001b780
jmp 0x140023789
lea rcx, str.bad_comp_method
call fcn.14001b780
jmp 0x140023789
lea rcx, str.bad_ctype
call fcn.14001b780
jmp 0x140023789
lea rcx, str.1_2_4_8_16_bit_only
call fcn.14001b780
jmp 0x140023789
lea rcx, str.bad_IHDR_len
call fcn.14001b780
jmp 0x140023789
lea rcx, str.multiple_IHDR
call fcn.14001b780
jmp 0x140023789
mov eax, ecx
mov byte [0x1400edcfb], cl
shr eax, 0x18
mov byte [str.XXXX_PNG_chunk_not_known], al
mov eax, ecx
shr eax, 0x10
mov byte [0x1400edcf9], al
mov eax, ecx
shr eax, 8
lea rcx, str.XXXX_PNG_chunk_not_known
mov byte [0x1400edcfa], al
call fcn.14001b780
jmp 0x140023789
lea rcx, str.bad_tRNS_len
call fcn.14001b780
jmp 0x140023789
lea rcx, str.tRNS_before_PLTE
call fcn.14001b780
jmp 0x140023789
lea rcx, str.tRNS_with_alpha
call fcn.14001b780
jmp 0x140023789
lea rcx, str.tRNS_after_IDAT
call fcn.14001b780
jmp 0x140023789
lea rcx, str.first_not_IHDR
call fcn.14001b780
jmp 0x140023789
lea rcx, str.invalid_PLTE
call fcn.14001b780
jmp 0x140023789