Function at 0x1400235d0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x3f8]
sub rsp, 0x4f8
mov rax, qword [0x1401e6500]
xor rax, rsp
mov qword [rbp + 0x3e0], rax
mov eax, dword [rbp + 0x460]
xor r14d, r14d
mov qword [rbp - 0x40], rdx
mov rbx, rcx
lea rdx, [rbp - 0x68]
mov dword [rsp + 0x34], r14d
mov qword [rbp - 0x30], r9
mov qword [rbp - 0x38], r8
mov dword [rbp - 0x78], eax
mov dword [rbp - 0x4c], 0xff
call fcn.1400244c0
test rax, rax
je 0x140024495
mov ecx, dword [rbx + 4]
mov eax, ecx
neg eax
mov dword [rbp - 0x74], ecx
cmovs eax, ecx
mov dword [rbx + 4], eax
cmp eax, 0x1000000
jbe 0x14002366c
mov edx, dword [0x1401efdcc]
mov rax, qword gs:[0x58]
mov rax, qword [rax + rdx*8]
lea rdx, str.too_large
jmp 0x14002448c
cmp dword [rbx], 0x1000000
ja 0x14002364d
mov eax, dword [rbp - 0x5c]
mov edi, dword [rbp - 0x60]
mov esi, dword [rbp - 0x50]
mov r12d, dword [rbp - 0x64]
mov r15d, dword [rbp - 0x68]
mov dword [rsp + 0x30], eax
mov eax, dword [rbp - 0x58]
mov dword [rsp + 0x54], eax
mov eax, dword [rbp - 0x54]
mov dword [rsp + 0x60], eax
mov eax, dword [rbp - 0x4c]
mov dword [rsp + 0x40], eax
mov eax, dword [rbp - 0x48]
mov dword [rsp + 0x50], eax
mov dword [rsp + 0x3c], esi
mov dword [rsp + 0x48], r12d
mov dword [rsp + 0x38], edi
mov dword [rsp + 0x5c], r15d
cmp edi, 0xc
jne 0x1400236dd
cmp r15d, 0x18
jge 0x1400236fa
mov ecx, r12d
sub ecx, eax
mov eax, 0x55555556
sub ecx, 0x18
imul ecx
mov r14d, edx
shr r14d, 0x1f
add r14d, edx
jmp 0x1400236f0
cmp r15d, 0x10
jge 0x1400236fa
mov r14d, r12d
sub r14d, eax
sub r14d, edi
sar r14d, 2
mov dword [rsp + 0x34], r14d
test r14d, r14d
jne 0x14002373c
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xd0]
add ecx, dword [rbx + 0xb8]
lea eax, [rcx - 1]
cmp eax, 0x3ff
ja 0x140024472
cmp r12d, ecx
jl 0x140024456
mov edx, r12d
sub edx, ecx
cmp edx, 0x400
jg 0x140024456
mov rcx, rbx
call fcn.140032560
cmp r15d, 0x18
jne 0x140023750
cmp esi, 0xff000000
jne 0x140023750
lea r13d, [r15 - 0x15]
jmp 0x14002375d
xor r13d, r13d
test esi, esi
setne r13b
add r13d, 3
mov eax, dword [rbp - 0x78]
mov dword [rbx + 8], r13d
mov r9d, dword [rbx + 4]
mov r10d, r9d
mov ecx, dword [rbx]
mov r8d, ecx
cmp eax, 3
jl 0x140023778
mov r13d, eax
test r8d, r8d
js 0x14002364d
je 0x140023795
mov eax, 0x7fffffff
cdq
idiv r8d
cmp r13d, eax
jg 0x14002364d
imul r8d, r13d
test r8d, r8d
js 0x14002364d
test r10d, r10d
js 0x14002364d
je 0x1400237bf
mov eax, 0x7fffffff
cdq
idiv r10d
cmp r8d, eax
jg 0x14002364d
test r13d, r13d
js 0x14002443a
test ecx, ecx
jne 0x1400237d5
mov r8d, ecx
imul r8d, r13d
jmp 0x1400237ed
mov eax, 0x7fffffff
cdq
idiv ecx
cmp r13d, eax
jg 0x14002443a
mov r8d, r13d
imul r8d, ecx
test r9d, r9d
je 0x140023804
mov eax, 0x7fffffff
cdq
idiv r9d
cmp r8d, eax
jg 0x14002443a
imul ecx, r9d
mov eax, r13d
imul eax, ecx
movsxd rcx, eax
call fcn.1401486d8
mov qword [rbp - 0x70], rax
mov rsi, rax
test rax, rax
je 0x14002443a
cmp r15d, 0x10
jge 0x140023dcb
xor edi, edi
test r14d, r14d
je 0x140023da4
cmp r14d, 0x100
jg 0x140023da4
movsxd rax, r14d
test r14d, r14d
jle 0x1400239ae
mov esi, dword [rsp + 0x38]
lea r14, [rbx + 0x30]
mov dword [rsp + 0x58], r13d
lea rdi, [rbp - 0x1d]
lea r13, [rbp - 0x20]
xor r12d, r12d
mov r15, rax
nop
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x14002388f
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1400238b9
cmp dword [rbx + 0x30], 0
lea r14, [rbx + 0x30]
je 0x1400238b7
mov rcx, rbx
call fcn.140031dd0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1400238b9
xor cl, cl
lea rdx, [rbp - 0x1e]
mov qword [rsp + 0x68], r14
mov byte [rdx + r12*4], cl
cmp rax, qword [rbx + 0xc8]
jae 0x1400238de
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140023904
cmp dword [r14], 0
je 0x140023902
mov rcx, rbx
call fcn.140031dd0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140023904
xor cl, cl
mov byte [rbp + r12*4 - 0x1f], cl
cmp rax, qword [rbx + 0xc8]
jae 0x140023925
movzx ecx, byte [rax]
lea r14, [rbx + 0x30]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14002394b
cmp dword [r14], 0
je 0x140023949
mov rcx, rbx
call fcn.140031dd0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x14002394b
xor cl, cl
mov byte [r13 + r12*4], cl
cmp esi, 0xc
je 0x140023983
cmp rax, qword [rbx + 0xc8]
jae 0x14002396a
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140023983
mov rax, qword [rsp + 0x68]
cmp dword [rax], 0
je 0x140023983
mov rcx, rbx
call fcn.140031dd0
inc qword [rbx + 0xc0]
mov byte [rdi + r12*4], 0xff
inc r12
cmp r12, r15
jl 0x140023870
mov rsi, qword [rbp - 0x70]
xor edi, edi
mov r13d, dword [rsp + 0x58]
mov r15d, dword [rsp + 0x5c]
mov r14d, dword [rsp + 0x34]
mov r12d, dword [rsp + 0x48]
xor eax, eax
mov rcx, rbx
cmp dword [rsp + 0x38], 0xc
setne al
add eax, 3
imul eax, r14d
sub r12d, eax
sub r12d, dword [rsp + 0x50]
sub r12d, dword [rsp + 0x38]
mov edx, r12d
call fcn.140032560
cmp r15d, 1
jne 0x1400239ea
mov r12d, dword [rbx]
add r12d, 7
shr r12d, 3
jmp 0x140023a08
cmp r15d, 4
jne 0x1400239fb
mov r12d, dword [rbx]
inc r12d
shr r12d, 1
jmp 0x140023a08
cmp r15d, 8
jne 0x140023d7d
mov r12d, dword [rbx]
mov eax, dword [rbx + 4]
neg r12d
and r12d, 3
cmp r15d, 1
jne 0x140023bc5
mov dword [rsp + 0x3c], 0
test eax, eax
jle 0x140024318
xor edi, edi
nop
mov r8, qword [rbx + 0xc0]
mov r14d, 7
cmp r8, qword [rbx + 0xc8]
jae 0x140023a56
movzx ecx, byte [r8]
inc r8
mov qword [rbx + 0xc0], r8
jmp 0x140023a7d
cmp dword [rbx + 0x30], 0
je 0x140023a7b
mov rcx, rbx
call fcn.140031dd0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
lea r8, [rax + 1]
mov qword [rbx + 0xc0], r8
jmp 0x140023a7d
xor cl, cl
mov r9d, dword [rbx]
xor r15d, r15d
movzx r10d, cl
mov rcx, r8
test r9d, r9d
jle 0x140023b66
mov rdx, r8
nop word [rax + rax]
mov eax, r10d
mov ecx, r14d
sar eax, cl
and eax, 1
lea rcx, [rax*4]
movzx eax, byte [rbp + rcx - 0x20]
mov byte [rdi + rsi], al
movzx eax, byte [rbp + rcx - 0x1f]
mov byte [rdi + rsi + 1], al
movzx eax, byte [rbp + rcx - 0x1e]
mov byte [rdi + rsi + 2], al
add rdi, 3
cmp r13d, 4
jne 0x140023ade
mov byte [rdi + rsi], 0xff
inc rdi
lea eax, [r15 + 1]
mov r8d, edx
mov rcx, rdx
mov r15d, eax
cmp eax, r9d
je 0x140023b66
sub r14d, 1
jns 0x140023b4d
mov r14d, 7
cmp rdx, qword [rbx + 0xc8]
jae 0x140023b1a
movzx r8d, byte [rdx]
lea rcx, [rdx + 1]
mov qword [rbx + 0xc0], rcx
movzx r10d, r8b
jmp 0x140023b54
cmp dword [rbx + 0x30], 0
je 0x140023b44
mov rcx, rbx
call fcn.140031dd0
mov rax, qword [rbx + 0xc0]
movzx r8d, byte [rax]
lea rcx, [rax + 1]
mov qword [rbx + 0xc0], rcx
movzx r10d, r8b
jmp 0x140023b54
xor r8b, r8b
movzx r10d, r8b
jmp 0x140023b54
mov rcx, qword [rbx + 0xc0]
mov r9d, dword [rbx]
mov rdx, rcx
mov r8d, ecx
cmp r15d, r9d
jl 0x140023aa0
test r12d, r12d
je 0x140023bab
cmp qword [rbx + 0x10], 0
je 0x140023b9e
mov r9d, dword [rbx + 0xc8]
sub r9d, r8d
cmp r9d, r12d
jge 0x140023b9e
mov rax, qword [rbx + 0xc8]
mov edx, r12d
mov rcx, qword [rbx + 0x28]
sub edx, r9d
mov qword [rbx + 0xc0], rax
call qword [rbx + 0x18]
jmp 0x140023bab
mov eax, r12d
add rax, rcx
mov qword [rbx + 0xc0], rax
mov ecx, dword [rsp + 0x3c]
mov eax, dword [rbx + 4]
inc ecx
mov dword [rsp + 0x3c], ecx
cmp ecx, eax
jl 0x140023a30
jmp 0x140024318
xor ecx, ecx
mov dword [rsp + 0x30], ecx
test eax, eax
jle 0x140024318
xor r14d, r14d
cmp dword [rbx], r14d
jle 0x140023d20
nop
mov r8, qword [rbx + 0xc0]
cmp r8, qword [rbx + 0xc8]
jae 0x140023c00
movzx ecx, byte [r8]
inc r8
mov qword [rbx + 0xc0], r8
jmp 0x140023c27
cmp dword [rbx + 0x30], 0
je 0x140023c25
mov rcx, rbx
call fcn.140031dd0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
lea r8, [rax + 1]
mov qword [rbx + 0xc0], r8
jmp 0x140023c27
xor cl, cl
xor r9d, r9d
movzx eax, cl
cmp r15d, 4
jne 0x140023c3d
mov r9d, eax
and r9d, 0xf
shr eax, 4
movsxd rcx, edi
lea rdx, [rax*4]
movzx eax, byte [rbp + rdx - 0x20]
inc edi
mov byte [rcx + rsi], al
movzx eax, byte [rbp + rdx - 0x1f]
movsxd rcx, edi
inc edi
mov byte [rcx + rsi], al
movzx eax, byte [rbp + rdx - 0x1e]
movsxd rcx, edi
inc edi
mov byte [rcx + rsi], al
cmp r13d, 4
jne 0x140023c7b
movsxd rax, edi
inc edi
mov byte [rax + rsi], 0xff
lea eax, [r14 + 1]
cmp eax, dword [rbx]
je 0x140023d1c
cmp r15d, 8
jne 0x140023cd1
cmp r8, qword [rbx + 0xc8]
jae 0x140023ca7
movzx ecx, byte [r8]
lea rax, [r8 + 1]
mov qword [rbx + 0xc0], rax
jmp 0x140023ccd
cmp dword [rbx + 0x30], 0
je 0x140023ccb
mov rcx, rbx
call fcn.140031dd0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140023ccd
xor cl, cl
movzx r9d, cl
movsxd rcx, edi
lea rdx, [r9*4]
movzx eax, byte [rbp + rdx - 0x20]
inc edi
mov byte [rcx + rsi], al
movzx eax, byte [rbp + rdx - 0x1f]
movsxd rcx, edi
inc edi
mov byte [rcx + rsi], al
movzx eax, byte [rbp + rdx - 0x1e]
movsxd rcx, edi
inc edi
mov byte [rcx + rsi], al
cmp r13d, 4
jne 0x140023d0f
movsxd rax, edi
inc edi
mov byte [rax + rsi], 0xff
add r14d, 2
cmp r14d, dword [rbx]
jl 0x140023be0
mov ecx, dword [rsp + 0x30]
test r12d, r12d
je 0x140023d67
cmp qword [rbx + 0x10], 0
je 0x140023d59
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, r12d
jge 0x140023d59
mov rax, qword [rbx + 0xc8]
mov edx, r12d
sub edx, ecx
mov qword [rbx + 0xc0], rax
mov rcx, qword [rbx + 0x28]
call qword [rbx + 0x18]
jmp 0x140023d63
mov eax, r12d
add qword [rbx + 0xc0], rax
mov ecx, dword [rsp + 0x30]
mov eax, dword [rbx + 4]
inc ecx
mov dword [rsp + 0x30], ecx
cmp ecx, eax
jl 0x140023bd3
jmp 0x140024318
mov rcx, rsi
call fcn.14013f2ec
mov edx, dword [0x1401efdcc]
mov rax, qword gs:[0x58]
mov rax, qword [rax + rdx*8]
lea rdx, str.bad_bpp
jmp 0x14002448c
mov rcx, rsi
call fcn.14013f2ec
mov edx, dword [0x1401efdcc]
mov rax, qword gs:[0x58]
mov rax, qword [rax + rdx*8]
lea rdx, str.invalid
jmp 0x14002448c
mov edx, dword [rsp + 0x48]
xor eax, eax
sub edx, dword [rsp + 0x50]
mov rcx, rbx
sub edx, edi
mov dword [rsp + 0x74], eax
mov dword [rsp + 0x7c], eax
xor r12d, r12d
mov dword [rbp - 0x7c], eax
mov dword [rsp + 0x58], eax
mov dword [rsp + 0x70], eax
mov dword [rsp + 0x78], eax
mov dword [rbp - 0x80], eax
mov dword [rsp + 0x68], eax
call fcn.140032560
cmp r15d, 0x18
jne 0x140023e0d
mov eax, dword [rbx]
lea edx, [rax + rax*2]
jmp 0x140023e1b
cmp r15d, 0x10
jne 0x140023e19
mov edx, dword [rbx]
add edx, edx
jmp 0x140023e1b
xor edx, edx
neg edx
and edx, 3
mov dword [rsp + 0x38], edx
cmp r15d, 0x18
jne 0x140023e3a
mov r15d, 1
mov qword [rsp + 0x48], r15
jmp 0x140024064
mov r10d, dword [rsp + 0x60]
mov eax, r13d
mov r11d, dword [rsp + 0x54]
mov qword [rsp + 0x48], r12
cmp r15d, 0x20
jne 0x140023ea5
xor r15d, r15d
mov qword [rsp + 0x48], r15
cmp r10d, 0xff
jne 0x140023ea8
mov ecx, dword [rsp + 0x30]
mov qword [rsp + 0x48], r15
cmp r11d, 0xff00
jne 0x140023eac
mov qword [rsp + 0x48], r15
cmp ecx, 0xff0000
jne 0x140023eac
mov r9d, dword [rsp + 0x3c]
mov qword [rsp + 0x48], r15
cmp r9d, 0xff000000
jne 0x140023ece
mov r15d, 2
mov qword [rsp + 0x48], r15
jmp 0x140024064
mov r15, r12
mov ecx, dword [rsp + 0x30]
mov r13d, eax
test ecx, ecx
je 0x140024416
test r11d, r11d
je 0x140024416
test r10d, r10d
je 0x140024416
mov r9d, dword [rsp + 0x3c]
call fcn.1400296f0
mov edx, dword [rsp + 0x30]
sub eax, 7
mov ecx, dword [rsp + 0x30]
shr edx, 1
and ecx, 0x55555555
and edx, 0x55555555
mov dword [rsp + 0x74], eax
add edx, ecx
mov ecx, edx
and edx, 0x33333333
shr ecx, 2
and ecx, 0x33333333
add ecx, edx
mov edx, ecx
shr edx, 4
add edx, ecx
mov ecx, r11d
and edx, 0xf0f0f0f
mov eax, edx
shr eax, 8
add edx, eax
mov eax, edx
shr eax, 0x10
add eax, edx
movzx edi, al
mov dword [rsp + 0x70], edi
call fcn.1400296f0
sub eax, 7
mov edx, r11d
shr edx, 1
mov ecx, r11d
and edx, 0x55555555
mov dword [rsp + 0x7c], eax
and ecx, 0x55555555
add edx, ecx
mov ecx, edx
and edx, 0x33333333
shr ecx, 2
and ecx, 0x33333333
add ecx, edx
mov edx, ecx
shr edx, 4
add edx, ecx
mov ecx, r10d
and edx, 0xf0f0f0f
mov eax, edx
shr eax, 8
add edx, eax
mov eax, edx
shr eax, 0x10
add eax, edx
movzx r11d, al
mov dword [rsp + 0x78], r11d
call fcn.1400296f0
sub eax, 7
mov edx, r10d
shr edx, 1
mov ecx, r10d
and edx, 0x55555555
mov dword [rbp - 0x7c], eax
and ecx, 0x55555555
add edx, ecx
mov ecx, edx
and edx, 0x33333333
shr ecx, 2
and ecx, 0x33333333
add ecx, edx
mov edx, ecx
shr edx, 4
add edx, ecx
mov ecx, r9d
and edx, 0xf0f0f0f
mov eax, edx
shr eax, 8
add edx, eax
mov eax, edx
shr eax, 0x10
add eax, edx
movzx r10d, al
mov dword [rbp - 0x80], r10d
call fcn.1400296f0
sub eax, 7
mov edx, r9d
shr edx, 1
mov ecx, r9d
and edx, 0x55555555
mov dword [rsp + 0x58], eax
and ecx, 0x55555555
add edx, ecx
mov ecx, edx
and edx, 0x33333333
shr ecx, 2
and ecx, 0x33333333
add ecx, edx
mov edx, ecx
shr edx, 4
add edx, ecx
and edx, 0xf0f0f0f
mov eax, edx
shr eax, 8
add edx, eax
mov eax, edx
shr eax, 0x10
add eax, edx
movzx r14d, al
mov dword [rsp + 0x68], r14d
cmp edi, 8
ja 0x140024416
cmp r11d, 8
ja 0x140024416
cmp r10d, 8
ja 0x140024416
cmp r14d, 8
ja 0x140024416
mov edx, dword [rsp + 0x38]
mov eax, dword [rbx + 4]
xor edi, edi
mov dword [rsp + 0x34], edi
test eax, eax
jle 0x140024318
nop word [rax + rax]
mov eax, dword [rbx]
movsxd rcx, r12d
test r15, r15
je 0x1400241df
xor r14d, r14d
test eax, eax
jle 0x1400242c6
lea rdi, [rcx + rsi]
nop dword [rax]
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x1400240bf
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1400240e5
cmp dword [rbx + 0x30], 0
je 0x1400240e3
mov rcx, rbx
call fcn.140031dd0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1400240e5
xor cl, cl
mov byte [rdi + 2], cl
cmp rax, qword [rbx + 0xc8]
jae 0x140024100
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140024126
cmp dword [rbx + 0x30], 0
je 0x140024124
mov rcx, rbx
call fcn.140031dd0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140024126
xor cl, cl
mov byte [rdi + 1], cl
cmp rax, qword [rbx + 0xc8]
jae 0x140024141
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140024167
cmp dword [rbx + 0x30], 0
je 0x140024165
mov rcx, rbx
call fcn.140031dd0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x140024167
xor cl, cl
mov byte [rdi], cl
add r12d, 3
add rdi, 3
cmp r15, 2
jne 0x1400241b7
cmp rax, qword [rbx + 0xc8]
jae 0x14002418f
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1400241b9
cmp dword [rbx + 0x30], 0
je 0x1400241b3
mov rcx, rbx
call fcn.140031dd0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1400241b9
xor cl, cl
jmp 0x1400241b9
mov cl, 0xff
movzx eax, cl
or dword [rsp + 0x40], eax
cmp r13d, 4
jne 0x1400241ce
inc r12d
mov byte [rdi], cl
inc rdi
inc r14d
cmp r14d, dword [rbx]
jl 0x1400240a0
jmp 0x1400242be
xor edi, edi
mov dword [rsp + 0x50], edi
test eax, eax
jle 0x1400242c2
lea r15, [rcx + rsi]
mov esi, dword [rsp + 0x5c]
mov rcx, rbx
call fcn.1400275f0
cmp esi, 0x10
jne 0x140024207
mov r14d, eax
jmp 0x14002421f
mov rcx, rbx
mov edi, eax
call fcn.1400275f0
mov r14d, eax
shl r14d, 0x10
add r14d, edi
mov edi, dword [rsp + 0x50]
mov r8d, dword [rsp + 0x70]
mov ecx, r14d
and ecx, dword [rsp + 0x30]
mov edx, dword [rsp + 0x74]
call fcn.1400324d0
mov r8d, dword [rsp + 0x78]
mov ecx, r14d
and ecx, dword [rsp + 0x54]
mov edx, dword [rsp + 0x7c]
mov byte [r15], al
call fcn.1400324d0
mov r8d, dword [rbp - 0x80]
mov ecx, r14d
and ecx, dword [rsp + 0x60]
mov edx, dword [rbp - 0x7c]
mov byte [r15 + 1], al
call fcn.1400324d0
mov r9d, dword [rsp + 0x3c]
add r12d, 3
mov byte [r15 + 2], al
add r15, 3
test r9d, r9d
je 0x14002428f
mov r8d, dword [rsp + 0x68]
and r14d, r9d
mov edx, dword [rsp + 0x58]
mov ecx, r14d
call fcn.1400324d0
jmp 0x140024294
mov eax, 0xff
or dword [rsp + 0x40], eax
cmp r13d, 4
jne 0x1400242a7
inc r12d
mov byte [r15], al
inc r15
inc edi
mov dword [rsp + 0x50], edi
cmp edi, dword [rbx]
jl 0x1400241f5
mov rsi, qword [rbp - 0x70]
mov r15, qword [rsp + 0x48]
mov edx, dword [rsp + 0x38]
mov edi, dword [rsp + 0x34]
test edx, edx
je 0x140024307
cmp qword [rbx + 0x10], 0
je 0x1400242fe
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, edx
jge 0x1400242fe
mov rax, qword [rbx + 0xc8]
sub edx, ecx
mov rcx, qword [rbx + 0x28]
mov qword [rbx + 0xc0], rax
call qword [rbx + 0x18]
mov edx, dword [rsp + 0x38]
jmp 0x140024307
mov eax, edx
add qword [rbx + 0xc0], rax
mov eax, dword [rbx + 4]
inc edi
mov dword [rsp + 0x34], edi
cmp edi, eax
jl 0x140024080
cmp r13d, 4
jne 0x140024340
cmp dword [rsp + 0x40], 0
jne 0x140024340
imul eax, dword [rbx]
lea eax, [rax*4 - 1]
movsxd rcx, eax
test eax, eax
js 0x140024340
mov byte [rcx + rsi], 0xff
sub rcx, 4
jns 0x140024336
cmp dword [rbp - 0x74], 0
jle 0x1400243bf
mov edx, dword [rbx + 4]
xor r10d, r10d
test edx, 0xfffffffe
jle 0x1400243bf
nop dword [rax]
nop dword [rax + rax]
mov ecx, dword [rbx]
sub edx, r10d
dec edx
mov r9d, ecx
imul edx, ecx
xor r8d, r8d
imul r9d, r10d
imul ecx, r13d
imul edx, r13d
imul r9d, r13d
mov eax, edx
add rdx, rsi
test ecx, ecx
jle 0x1400243b0
sub r9, rax
nop dword [rax]
movzx eax, byte [rdx]
inc r8d
movzx ecx, byte [r9 + rdx]
mov byte [r9 + rdx], al
mov eax, r13d
mov byte [rdx], cl
lea rdx, [rdx + 1]
imul eax, dword [rbx]
cmp r8d, eax
jl 0x140024390
mov edx, dword [rbx + 4]
inc r10d
mov eax, edx
sar eax, 1
cmp r10d, eax
jl 0x140024360
mov ecx, dword [rbp - 0x78]
test ecx, ecx
je 0x1400243ef
cmp ecx, r13d
je 0x1400243ef
mov eax, dword [rbx + 4]
mov r8d, ecx
mov r9d, dword [rbx]
mov rcx, rsi
mov edx, r13d
mov dword [rsp + 0x20], eax
call fcn.1400253f0
mov rsi, rax
test rax, rax
je 0x140024495
mov eax, dword [rbx]
mov rcx, qword [rbp - 0x40]
mov dword [rcx], eax
mov rcx, qword [rbp - 0x38]
mov eax, dword [rbx + 4]
mov dword [rcx], eax
mov rcx, qword [rbp - 0x30]
test rcx, rcx
je 0x14002440e
mov eax, dword [rbx + 8]
mov dword [rcx], eax
mov rax, rsi
jmp 0x140024497
mov rcx, rsi
call fcn.14013f2ec
mov edx, dword [0x1401efdcc]
mov rax, qword gs:[0x58]
mov rax, qword [rax + rdx*8]
lea rdx, str.bad_masks
jmp 0x14002448c
mov edx, dword [0x1401efdcc]
mov rax, qword gs:[0x58]
mov rax, qword [rax + rdx*8]
lea rdx, str.outofmem
jmp 0x14002448c
mov edx, dword [0x1401efdcc]
mov rax, qword gs:[0x58]
mov rax, qword [rax + rdx*8]
lea rdx, str.bad_offset
jmp 0x14002448c
mov edx, dword [0x1401efdcc]
mov rax, qword gs:[0x58]
mov rax, qword [rax + rdx*8]
lea rdx, str.bad_header
mov ecx, 0x20
mov qword [rcx + rax], rdx
xor eax, eax
mov rcx, qword [rbp + 0x3e0]
xor rcx, rsp
call fcn.140138270
add rsp, 0x4f8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret