Function at 0x18007b9e0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
push rbp
push rbx
push rdi
push r13
lea rbp, [rsp - 0x3d8]
sub rsp, 0x4d8
xor r13d, r13d
mov dword [rbp - 0x64], 0xff
lea rdx, [rbp - 0x80]
mov dword [rsp + 0x20], r13d
mov edi, r13d
mov rbx, rcx
call fcn.18007b3a0
test rax, rax
je 0x18007ba5f
mov eax, dword [rbx + 4]
mov dword [rsp + 0x6c], eax
cdq
xor eax, edx
sub eax, edx
mov dword [rbx + 4], eax
cmp eax, 0x1000000
jbe 0x18007ba6e
mov edx, dword [0x18014a334]
mov rax, qword gs:[0x58]
mov ecx, 0x28
mov rax, qword [rax + rdx*8]
lea rdx, str.too_large
mov qword [rcx + rax], rdx
xor eax, eax
add rsp, 0x4d8
pop r13
pop rdi
pop rbx
pop rbp
ret
cmp dword [rbx], 0x1000000
ja 0x18007ba3c
mov eax, dword [rbp - 0x74]
mov r8d, dword [rbp - 0x68]
mov dword [rsp + 0x34], eax
mov eax, dword [rbp - 0x70]
mov dword [rbp + 0x428], eax
mov eax, dword [rbp - 0x6c]
mov qword [rsp + 0x500], rsi
mov esi, dword [rbp - 0x80]
mov dword [rsp + 0x38], eax
mov eax, dword [rbp - 0x64]
mov qword [rsp + 0x4d0], r12
mov r12d, dword [rbp - 0x7c]
mov qword [rsp + 0x4c0], r15
mov r15d, dword [rbp - 0x78]
mov dword [rsp + 0x28], eax
mov eax, dword [rbp - 0x60]
mov dword [rsp + 0x30], eax
mov dword [rbp + 0x418], r8d
mov dword [rsp + 0x2c], r12d
mov dword [rsp + 0x24], r15d
mov dword [rbp + 0x420], esi
cmp r15d, 0xc
jne 0x18007bafc
cmp esi, 0x18
jge 0x18007bb18
mov ecx, r12d
sub ecx, eax
mov eax, 0x55555556
sub ecx, 0x18
imul ecx
mov edi, edx
shr edi, 0x1f
add edi, edx
jmp 0x18007bb0c
cmp esi, 0x10
jge 0x18007bb18
mov edi, r12d
sub edi, eax
sub edi, r15d
sar edi, 2
mov dword [rsp + 0x20], edi
test edi, edi
jne 0x18007bbab
mov edx, dword [rbx + 0xb8]
sub edx, dword [rbx + 0xd0]
mov r8d, dword [rbx + 0xc0]
add edx, r8d
lea eax, [rdx - 1]
cmp eax, 0x3ff
ja 0x18007cea1
cmp r12d, edx
jl 0x18007ce77
mov ecx, r12d
sub ecx, edx
cmp ecx, 0x400
jg 0x18007ce77
test ecx, ecx
je 0x18007bba4
jns 0x18007bb6c
mov rax, qword [rbx + 0xc8]
mov qword [rbx + 0xc0], rax
jmp 0x18007bba4
cmp qword [rbx + 0x10], r13
je 0x18007bb9a
mov edx, dword [rbx + 0xc8]
sub edx, r8d
cmp edx, ecx
jge 0x18007bb9a
mov rax, qword [rbx + 0xc8]
sub ecx, edx
mov edx, ecx
mov qword [rbx + 0xc0], rax
mov rcx, qword [rbx + 0x28]
call qword [rbx + 0x18]
jmp 0x18007bba4
movsxd rax, ecx
add qword [rbx + 0xc0], rax
mov r8d, dword [rbp + 0x418]
cmp esi, 0x18
jne 0x18007bbbe
cmp r8d, 0xff000000
jne 0x18007bbbe
lea eax, [rsi - 0x15]
jmp 0x18007bbca
test r8d, r8d
mov eax, r13d
setne al
add eax, 3
mov dword [rbx + 8], eax
mov r8d, dword [rbx]
mov ecx, dword [rbx + 4]
test r8d, r8d
js 0x18007ce4d
jne 0x18007bbeb
lea r9d, [r8*4]
mov r10d, r9d
jmp 0x18007bc11
mov eax, 0x7fffffff
cdq
idiv r8d
cmp eax, 4
jl 0x18007ce4d
lea r9d, [r8*4]
mov r10d, r9d
test r9d, r9d
js 0x18007ce4d
test ecx, ecx
js 0x18007ce4d
je 0x18007bc2c
mov eax, 0x7fffffff
cdq
idiv ecx
cmp r10d, eax
jg 0x18007ce4d
mov qword [rsp + 0x4c8], r14
test r8d, r8d
je 0x18007bc55
xor edx, edx
mov eax, 0x7fffffff
div r8d
cmp eax, 4
jl 0x18007ce29
test r9d, r9d
js 0x18007ce29
test ecx, ecx
je 0x18007bc6b
xor edx, edx
mov eax, 0x7fffffff
div ecx
cmp r9d, eax
jg 0x18007ce29
imul ecx, r8d
shl ecx, 2
movsxd rcx, ecx
call fcn.1800a5c94
mov qword [rsp + 0x70], rax
mov r14, rax
test rax, rax
je 0x18007ce29
cmp esi, 0x10
mov esi, r13d
jge 0x18007c562
test edi, edi
je 0x18007c539
cmp edi, 0x100
jg 0x18007c539
movsxd rax, edi
mov qword [rbp + 0x418], rax
test edi, edi
jle 0x18007bf5b
mov rax, qword [rbx + 0xc0]
mov r14d, dword [rsp + 0x24]
mov r12, qword [rbp + 0x418]
mov rcx, qword [rbx + 0xc8]
cmp rax, rcx
jb 0x18007bd4f
cmp dword [rbx + 0x30], esi
je 0x18007bd76
mov rax, qword [rbx + 0x10]
lea rdi, [rbx + 0x38]
mov r8d, dword [rbx + 0x34]
mov rdx, rdi
mov rcx, qword [rbx + 0x28]
call rax
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xd0]
add dword [rbx + 0xb8], ecx
mov qword [rbx + 0xc0], rdi
test eax, eax
jne 0x18007bd38
lea rax, [rbx + 0x39]
mov dword [rbx + 0x30], esi
mov qword [rbx + 0xc8], rax
mov rax, qword [rbx + 0xc0]
mov byte [rax], sil
mov rcx, qword [rbx + 0xc8]
jmp 0x18007bd48
cdqe
lea rcx, [rbx + 0x38]
add rcx, rax
mov qword [rbx + 0xc8], rcx
mov rax, qword [rbx + 0xc0]
movzx edx, byte [rax]
lea r15, [r13*4]
inc rax
mov byte [rbp + r15 - 0x3e], dl
mov qword [rbx + 0xc0], rax
mov r8, r15
cmp rax, rcx
jae 0x18007bd86
jmp 0x18007bdf9
lea r15, [r13*4]
mov byte [rbp + r15 - 0x3e], sil
mov r8, r15
cmp dword [rbx + 0x30], esi
je 0x18007be22
mov rax, qword [rbx + 0x10]
lea rdi, [rbx + 0x38]
mov r8d, dword [rbx + 0x34]
mov rdx, rdi
mov rcx, qword [rbx + 0x28]
call rax
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xd0]
add dword [rbx + 0xb8], ecx
mov qword [rbx + 0xc0], rdi
test eax, eax
jne 0x18007bde2
lea rax, [rbx + 0x39]
mov dword [rbx + 0x30], esi
mov qword [rbx + 0xc8], rax
mov rax, qword [rbx + 0xc0]
mov byte [rax], sil
mov rcx, qword [rbx + 0xc8]
jmp 0x18007bdf2
cdqe
lea rcx, [rbx + 0x38]
add rcx, rax
mov qword [rbx + 0xc8], rcx
mov rax, qword [rbx + 0xc0]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
mov byte [rbp + r15 - 0x3f], dl
cmp rax, rcx
jae 0x18007be27
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18007bea0
mov byte [rbp + r8 - 0x3f], sil
cmp dword [rbx + 0x30], esi
je 0x18007be9e
mov rax, qword [rbx + 0x10]
lea rdi, [rbx + 0x38]
mov r8d, dword [rbx + 0x34]
mov rdx, rdi
mov rcx, qword [rbx + 0x28]
call rax
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xd0]
add dword [rbx + 0xb8], ecx
mov qword [rbx + 0xc0], rdi
test eax, eax
jne 0x18007be78
lea rax, [rbx + 0x39]
mov dword [rbx + 0x30], esi
mov qword [rbx + 0xc8], rax
mov rax, qword [rbx + 0xc0]
mov byte [rax], sil
jmp 0x18007be88
cdqe
lea rcx, [rbx + 0x38]
add rcx, rax
mov qword [rbx + 0xc8], rcx
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18007bea0
xor cl, cl
mov byte [rbp + r15 - 0x40], cl
cmp r14d, 0xc
je 0x18007bf33
cmp rax, qword [rbx + 0xc8]
jae 0x18007bec4
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18007bf33
cmp dword [rbx + 0x30], esi
je 0x18007bf33
mov rax, qword [rbx + 0x10]
lea rdi, [rbx + 0x38]
mov r8d, dword [rbx + 0x34]
mov rdx, rdi
mov rcx, qword [rbx + 0x28]
call rax
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xd0]
add dword [rbx + 0xb8], ecx
mov qword [rbx + 0xc0], rdi
test eax, eax
jne 0x18007bf15
lea rax, [rbx + 0x39]
mov dword [rbx + 0x30], esi
mov qword [rbx + 0xc8], rax
mov rax, qword [rbx + 0xc0]
mov byte [rax], sil
jmp 0x18007bf25
cdqe
lea rcx, [rbx + 0x38]
add rcx, rax
mov qword [rbx + 0xc8], rcx
inc qword [rbx + 0xc0]
mov rax, qword [rbx + 0xc0]
inc r13
mov byte [rbp + r15 - 0x3d], 0xff
cmp r13, r12
jl 0x18007bcd0
mov r14, qword [rsp + 0x70]
xor r13d, r13d
mov r12d, dword [rsp + 0x2c]
mov edi, dword [rsp + 0x20]
mov r15d, dword [rsp + 0x24]
cmp r15d, 0xc
mov eax, r13d
setne al
add eax, 3
imul eax, edi
sub r12d, eax
sub r12d, dword [rsp + 0x30]
sub r12d, r15d
je 0x18007bfcb
test r12d, r12d
jns 0x18007bf8d
mov rax, qword [rbx + 0xc8]
mov qword [rbx + 0xc0], rax
jmp 0x18007bfcb
cmp qword [rbx + 0x10], rsi
je 0x18007bfc1
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, r12d
jge 0x18007bfc1
mov rax, qword [rbx + 0xc8]
sub r12d, ecx
mov rcx, qword [rbx + 0x28]
mov edx, r12d
mov qword [rbx + 0xc0], rax
call qword [rbx + 0x18]
jmp 0x18007bfcb
movsxd rax, r12d
add qword [rbx + 0xc0], rax
mov r11d, dword [rbp + 0x420]
cmp r11d, 1
jne 0x18007bfe5
mov r12d, dword [rbx]
add r12d, 7
shr r12d, 3
jmp 0x18007c003
cmp r11d, 4
jne 0x18007bff6
mov r12d, dword [rbx]
inc r12d
shr r12d, 1
jmp 0x18007c003
cmp r11d, 8
jne 0x18007c4df
mov r12d, dword [rbx]
mov eax, dword [rbx + 4]
neg r12d
and r12d, 3
mov edx, eax
cmp r11d, 1
jne 0x18007c25e
mov dword [rbp + 0x420], r13d
test eax, eax
jle 0x18007cd3c
mov rsi, r13
jmp 0x18007c033
xor r13d, r13d
mov rax, qword [rbx + 0xc0]
mov r15d, 7
cmp rax, qword [rbx + 0xc8]
jae 0x18007c058
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18007c0d3
cmp dword [rbx + 0x30], 0
je 0x18007c0d1
mov rax, qword [rbx + 0x10]
lea rdi, [rbx + 0x38]
mov r8d, dword [rbx + 0x34]
mov rdx, rdi
mov rcx, qword [rbx + 0x28]
call rax
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xd0]
add dword [rbx + 0xb8], ecx
mov qword [rbx + 0xc0], rdi
test eax, eax
jne 0x18007c0ab
lea rax, [rbx + 0x39]
mov dword [rbx + 0x30], r13d
mov qword [rbx + 0xc8], rax
mov rax, qword [rbx + 0xc0]
mov byte [rax], 0
jmp 0x18007c0bb
cdqe
lea rcx, [rbx + 0x38]
add rcx, rax
mov qword [rbx + 0xc8], rcx
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18007c0d3
xor cl, cl
mov edx, dword [rbx]
movzx r9d, cl
test edx, edx
jle 0x18007c1fb
mov r8d, edx
mov eax, r9d
mov ecx, r15d
sar eax, cl
and eax, 1
lea rcx, [rax*4]
movzx eax, byte [rbp + rcx - 0x40]
mov byte [r14 + rsi], al
movzx eax, byte [rbp + rcx - 0x3f]
mov byte [r14 + rsi + 1], al
movzx eax, byte [rbp + rcx - 0x3e]
mov byte [r14 + rsi + 2], al
mov byte [r14 + rsi + 3], 0xff
add rsi, 4
inc r13d
cmp r13d, edx
je 0x18007c1fb
sub r15d, 1
jns 0x18007c1ec
mov rax, qword [rbx + 0xc0]
mov r15d, 7
cmp rax, qword [rbx + 0xc8]
jae 0x18007c163
movzx ecx, byte [rax]
mov edx, r8d
inc rax
movzx r9d, cl
mov qword [rbx + 0xc0], rax
jmp 0x18007c1ef
cmp dword [rbx + 0x30], 0
je 0x18007c1e1
mov rax, qword [rbx + 0x10]
lea rdi, [rbx + 0x38]
mov r8d, dword [rbx + 0x34]
mov rdx, rdi
mov rcx, qword [rbx + 0x28]
call rax
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xd0]
add dword [rbx + 0xb8], ecx
mov qword [rbx + 0xc0], rdi
test eax, eax
jne 0x18007c1b5
mov dword [rbx + 0x30], eax
lea rax, [rbx + 0x39]
mov qword [rbx + 0xc8], rax
mov rax, qword [rbx + 0xc0]
mov byte [rax], 0
jmp 0x18007c1c5
cdqe
lea rcx, [rbx + 0x38]
add rcx, rax
mov qword [rbx + 0xc8], rcx
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
mov edx, dword [rbx]
movzx r9d, cl
jmp 0x18007c1ef
xor cl, cl
mov edx, r8d
movzx r9d, cl
jmp 0x18007c1ef
mov edx, r8d
mov r8d, edx
cmp r13d, edx
jl 0x18007c0e4
test r12d, r12d
je 0x18007c23e
cmp qword [rbx + 0x10], 0
je 0x18007c234
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, r12d
jge 0x18007c234
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 0x18007c23e
mov eax, r12d
add qword [rbx + 0xc0], rax
mov ecx, dword [rbp + 0x420]
mov eax, dword [rbx + 4]
inc ecx
mov dword [rbp + 0x420], ecx
mov edx, eax
cmp ecx, eax
jl 0x18007c030
jmp 0x18007cd3c
test eax, eax
jle 0x18007cd3c
nop word [rax + rax]
xor r15d, r15d
cmp dword [rbx], r15d
jle 0x18007c47f
nop dword [rax]
mov r8, qword [rbx + 0xc0]
cmp r8, qword [rbx + 0xc8]
jae 0x18007c2a3
movzx ecx, byte [r8]
inc r8
mov qword [rbx + 0xc0], r8
jmp 0x18007c325
cmp dword [rbx + 0x30], 0
je 0x18007c323
mov rax, qword [rbx + 0x10]
lea rdi, [rbx + 0x38]
mov r8d, dword [rbx + 0x34]
mov rdx, rdi
mov rcx, qword [rbx + 0x28]
call rax
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xd0]
add dword [rbx + 0xb8], ecx
mov qword [rbx + 0xc0], rdi
test eax, eax
jne 0x18007c2f5
mov dword [rbx + 0x30], eax
lea rax, [rbx + 0x39]
mov qword [rbx + 0xc8], rax
mov rax, qword [rbx + 0xc0]
mov byte [rax], 0
jmp 0x18007c305
cdqe
lea rcx, [rbx + 0x38]
add rcx, rax
mov qword [rbx + 0xc8], rcx
mov rax, qword [rbx + 0xc0]
mov r11d, dword [rbp + 0x420]
movzx ecx, byte [rax]
lea r8, [rax + 1]
mov qword [rbx + 0xc0], r8
jmp 0x18007c325
xor cl, cl
xor r10d, r10d
movzx eax, cl
cmp r11d, 4
jne 0x18007c33b
mov r10d, eax
and r10d, 0xf
shr eax, 4
mov r9d, dword [rbx]
lea rdx, [rax*4]
movzx eax, byte [rbp + rdx - 0x40]
movsxd rcx, esi
inc esi
mov byte [rcx + r14], al
movzx eax, byte [rbp + rdx - 0x3f]
movsxd rcx, esi
inc esi
mov byte [rcx + r14], al
movzx eax, byte [rbp + rdx - 0x3e]
movsxd rcx, esi
inc esi
mov byte [rcx + r14], al
movsxd rax, esi
inc esi
mov byte [rax + r14], 0xff
lea eax, [r15 + 1]
cmp eax, r9d
je 0x18007c47f
cmp r11d, 8
jne 0x18007c436
cmp r8, qword [rbx + 0xc8]
jae 0x18007c3ae
movzx ecx, byte [r8]
lea rax, [r8 + 1]
mov qword [rbx + 0xc0], rax
jmp 0x18007c432
cmp dword [rbx + 0x30], 0
je 0x18007c430
mov rax, qword [rbx + 0x10]
lea rdi, [rbx + 0x38]
mov r8d, dword [rbx + 0x34]
mov rdx, rdi
mov rcx, qword [rbx + 0x28]
call rax
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xd0]
add dword [rbx + 0xb8], ecx
mov qword [rbx + 0xc0], rdi
test eax, eax
jne 0x18007c400
mov dword [rbx + 0x30], eax
lea rax, [rbx + 0x39]
mov qword [rbx + 0xc8], rax
mov rax, qword [rbx + 0xc0]
mov byte [rax], 0
jmp 0x18007c410
cdqe
lea rcx, [rbx + 0x38]
add rcx, rax
mov qword [rbx + 0xc8], rcx
mov rax, qword [rbx + 0xc0]
mov r11d, dword [rbp + 0x420]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
mov r9d, dword [rbx]
jmp 0x18007c432
xor cl, cl
movzx r10d, cl
movsxd rcx, esi
lea rdx, [r10*4]
movzx eax, byte [rbp + rdx - 0x40]
inc esi
add r15d, 2
mov byte [rcx + r14], al
movzx eax, byte [rbp + rdx - 0x3f]
movsxd rcx, esi
inc esi
mov byte [rcx + r14], al
movzx eax, byte [rbp + rdx - 0x3e]
movsxd rcx, esi
inc esi
mov byte [rcx + r14], al
movsxd rax, esi
inc esi
mov byte [rax + r14], 0xff
cmp r15d, r9d
jl 0x18007c280
test r12d, r12d
je 0x18007c4c2
cmp qword [rbx + 0x10], 0
je 0x18007c4b8
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, r12d
jge 0x18007c4b8
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 0x18007c4c2
mov eax, r12d
add qword [rbx + 0xc0], rax
mov eax, dword [rbx + 4]
inc r13d
mov r11d, dword [rbp + 0x420]
mov edx, eax
cmp r13d, eax
jl 0x18007c270
jmp 0x18007cd3c
mov rcx, r14
call fcn.1800a0458
mov edx, dword [0x18014a334]
mov rax, qword gs:[0x58]
mov ecx, 0x28
mov rax, qword [rax + rdx*8]
lea rdx, str.bad_bpp
mov qword [rcx + rax], rdx
xor eax, eax
mov r14, qword [rsp + 0x4c8]
mov r12, qword [rsp + 0x4d0]
mov rsi, qword [rsp + 0x500]
mov r15, qword [rsp + 0x4c0]
add rsp, 0x4d8
pop r13
pop rdi
pop rbx
pop rbp
ret
mov rcx, r14
call fcn.1800a0458
mov edx, dword [0x18014a334]
mov rax, qword gs:[0x58]
mov ecx, 0x28
mov rax, qword [rax + rdx*8]
lea rdx, str.invalid
jmp 0x18007c506
sub r12d, dword [rsp + 0x30]
mov r11d, r13d
mov dword [rsp + 0x20], r13d
mov r10d, r13d
mov dword [rsp + 0x3c], r13d
mov r9d, r13d
mov dword [rsp + 0x2c], r13d
mov edi, r13d
mov dword [rsp + 0x24], r13d
sub r12d, r15d
je 0x18007c5e8
test r12d, r12d
jns 0x18007c5a1
mov rax, qword [rbx + 0xc8]
mov qword [rbx + 0xc0], rax
jmp 0x18007c5e8
cmp qword [rbx + 0x10], rsi
je 0x18007c5de
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, r12d
jge 0x18007c5de
mov rax, qword [rbx + 0xc8]
sub r12d, ecx
mov rcx, qword [rbx + 0x28]
mov edx, r12d
mov qword [rbx + 0xc0], rax
call qword [rbx + 0x18]
mov r9d, esi
mov r10d, esi
mov r11d, esi
jmp 0x18007c5e8
movsxd rax, r12d
add qword [rbx + 0xc0], rax
mov ecx, dword [rbp + 0x420]
cmp ecx, 0x18
jne 0x18007c5fb
mov eax, dword [rbx]
lea r12d, [rax + rax*2]
jmp 0x18007c60b
cmp ecx, 0x10
jne 0x18007c608
mov r12d, dword [rbx]
add r12d, r12d
jmp 0x18007c60b
xor r12d, r12d
neg r12d
and r12d, 3
mov dword [rsp + 0x68], r12d
cmp ecx, 0x18
jne 0x18007c62c
mov r8d, 1
mov qword [rsp + 0x48], r8
jmp 0x18007c83a
mov eax, dword [rbp + 0x428]
cmp ecx, 0x20
jne 0x18007c672
cmp dword [rsp + 0x38], 0xff
jne 0x18007c672
cmp eax, 0xff00
jne 0x18007c672
cmp dword [rsp + 0x34], 0xff0000
jne 0x18007c672
mov r15d, dword [rbp + 0x418]
cmp r15d, 0xff000000
jne 0x18007c69f
mov r8d, 2
mov qword [rsp + 0x48], r8
jmp 0x18007c83a
mov r9d, dword [rsp + 0x34]
test r9d, r9d
je 0x18007cdfd
test eax, eax
je 0x18007cdfd
mov r11d, dword [rsp + 0x38]
test r11d, r11d
je 0x18007cdfd
mov r15d, dword [rbp + 0x418]
jmp 0x18007c6a9
mov r9d, dword [rsp + 0x34]
mov r11d, dword [rsp + 0x38]
mov ecx, r9d
call fcn.18007b330
sub eax, 7
mov edx, r9d
shr edx, 1
mov ecx, r9d
mov r9d, dword [rbp + 0x428]
and edx, 0x55555555
and ecx, 0x55555555
mov dword [rsp + 0x20], 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, 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
call fcn.18007b330
sub eax, 7
mov edx, r9d
shr edx, 1
mov ecx, r9d
and edx, 0x55555555
mov dword [rsp + 0x3c], 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, r11d
and edx, 0xf0f0f0f
mov eax, edx
shr eax, 8
add edx, eax
mov eax, edx
shr eax, 0x10
add eax, edx
movzx r9d, al
call fcn.18007b330
sub eax, 7
mov edx, r11d
shr edx, 1
mov ecx, r11d
and edx, 0x55555555
mov dword [rsp + 0x2c], 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, r15d
and edx, 0xf0f0f0f
mov eax, edx
shr eax, 8
add edx, eax
mov eax, edx
shr eax, 0x10
add eax, edx
movzx edi, al
call fcn.18007b330
lea r11d, [rax - 7]
mov edx, r15d
shr edx, 1
mov ecx, r15d
and edx, 0x55555555
mov dword [rsp + 0x24], r11d
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 esi, al
cmp r10d, 8
ja 0x18007cdfd
cmp r9d, 8
ja 0x18007cdfd
cmp edi, 8
ja 0x18007cdfd
xor r8d, r8d
mov qword [rsp + 0x48], r8
cmp esi, 8
ja 0x18007cdfd
mov eax, dword [rbx + 4]
mov edx, eax
mov dword [rsp + 0x30], r13d
test eax, eax
jle 0x18007cd3c
mov eax, dword [rsp + 0x20]
neg eax
mov dword [rsp + 0x44], eax
mov eax, 8
mov ecx, eax
sub ecx, r10d
mov dword [rsp + 0x40], ecx
mov ecx, dword [rsp + 0x3c]
neg ecx
mov dword [rsp + 0x50], ecx
mov ecx, eax
sub ecx, r9d
mov dword [rsp + 0x54], ecx
mov ecx, dword [rsp + 0x2c]
neg ecx
mov dword [rsp + 0x58], ecx
mov ecx, eax
sub ecx, edi
mov dword [rsp + 0x5c], ecx
mov ecx, r11d
neg ecx
sub eax, esi
mov dword [rsp + 0x60], ecx
mov dword [rsp + 0x64], eax
mov eax, r10d
mov qword [rbp - 0x58], rax
mov eax, edi
mov edi, esi
mov ecx, r9d
mov qword [rsp + 0x78], rdi
mov qword [rbp - 0x50], rcx
mov qword [rbp - 0x48], rax
mov eax, dword [rbx]
xor r15d, r15d
movsxd rcx, r13d
test r8, r8
je 0x18007cb55
test eax, eax
jle 0x18007ccd4
lea rsi, [rcx + r14]
mov rcx, qword [rbx + 0xc8]
mov rax, qword [rbx + 0xc0]
cmp rax, rcx
jb 0x18007c957
cmp dword [rbx + 0x30], 0
je 0x18007c96e
mov rax, qword [rbx + 0x10]
lea rdi, [rbx + 0x38]
mov r8d, dword [rbx + 0x34]
mov rdx, rdi
mov rcx, qword [rbx + 0x28]
call rax
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xd0]
add dword [rbx + 0xb8], ecx
mov qword [rbx + 0xc0], rdi
test eax, eax
jne 0x18007c940
mov dword [rbx + 0x30], eax
lea rax, [rbx + 0x39]
mov qword [rbx + 0xc8], rax
mov rax, qword [rbx + 0xc0]
mov byte [rax], 0
mov rcx, qword [rbx + 0xc8]
jmp 0x18007c950
cdqe
lea rcx, [rbx + 0x38]
add rcx, rax
mov qword [rbx + 0xc8], rcx
mov rax, qword [rbx + 0xc0]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
mov byte [rsi + 2], dl
cmp rax, rcx
jae 0x18007c972
jmp 0x18007c9e6
mov byte [rsi + 2], 0
cmp dword [rbx + 0x30], 0
je 0x18007ca0d
mov rax, qword [rbx + 0x10]
lea rdi, [rbx + 0x38]
mov r8d, dword [rbx + 0x34]
mov rdx, rdi
mov rcx, qword [rbx + 0x28]
call rax
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xd0]
add dword [rbx + 0xb8], ecx
mov qword [rbx + 0xc0], rdi
test eax, eax
jne 0x18007c9cf
mov dword [rbx + 0x30], eax
lea rax, [rbx + 0x39]
mov qword [rbx + 0xc8], rax
mov rax, qword [rbx + 0xc0]
mov byte [rax], 0
mov rcx, qword [rbx + 0xc8]
jmp 0x18007c9df
cdqe
lea rcx, [rbx + 0x38]
add rcx, rax
mov qword [rbx + 0xc8], rcx
mov rax, qword [rbx + 0xc0]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
mov byte [rsi + 1], dl
cmp rax, rcx
jae 0x18007ca11
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18007ca8b
mov byte [rsi + 1], 0
cmp dword [rbx + 0x30], 0
je 0x18007ca89
mov rax, qword [rbx + 0x10]
lea rdi, [rbx + 0x38]
mov r8d, dword [rbx + 0x34]
mov rdx, rdi
mov rcx, qword [rbx + 0x28]
call rax
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xd0]
add dword [rbx + 0xb8], ecx
mov qword [rbx + 0xc0], rdi
test eax, eax
jne 0x18007ca63
mov dword [rbx + 0x30], eax
lea rax, [rbx + 0x39]
mov qword [rbx + 0xc8], rax
mov rax, qword [rbx + 0xc0]
mov byte [rax], 0
jmp 0x18007ca73
cdqe
lea rcx, [rbx + 0x38]
add rcx, rax
mov qword [rbx + 0xc8], rcx
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18007ca8b
xor cl, cl
cmp qword [rsp + 0x48], 2
mov byte [rsi], cl
jne 0x18007cb30
cmp rax, qword [rbx + 0xc8]
jae 0x18007cab4
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18007cb32
cmp dword [rbx + 0x30], 0
je 0x18007cb2c
mov rax, qword [rbx + 0x10]
lea rdi, [rbx + 0x38]
mov r8d, dword [rbx + 0x34]
mov rdx, rdi
mov rcx, qword [rbx + 0x28]
call rax
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xd0]
add dword [rbx + 0xb8], ecx
mov qword [rbx + 0xc0], rdi
test eax, eax
jne 0x18007cb06
mov dword [rbx + 0x30], eax
lea rax, [rbx + 0x39]
mov qword [rbx + 0xc8], rax
mov rax, qword [rbx + 0xc0]
mov byte [rax], 0
jmp 0x18007cb16
cdqe
lea rcx, [rbx + 0x38]
add rcx, rax
mov qword [rbx + 0xc8], rcx
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18007cb32
xor cl, cl
jmp 0x18007cb32
mov cl, 0xff
movzx eax, cl
add r13d, 4
or dword [rsp + 0x28], eax
inc r15d
mov byte [rsi + 3], cl
add rsi, 4
cmp r15d, dword [rbx]
jl 0x18007c8d0
jmp 0x18007ccd4
test eax, eax
jle 0x18007ccd4
mov r12d, dword [rbp + 0x418]
lea rsi, [rcx + r14]
mov r14d, dword [rbp + 0x420]
nop
mov rcx, rbx
call fcn.180070970
cmp r14d, 0x10
jne 0x18007cb83
mov r8d, eax
jmp 0x18007cb9c
mov rcx, rbx
mov edi, eax
call fcn.180070970
mov r8d, eax
shl r8d, 0x10
add r8d, edi
mov rdi, qword [rsp + 0x78]
mov r9d, dword [rsp + 0x20]
lea r11, [0x180000000]
mov r10, qword [rbp - 0x58]
mov ecx, r9d
mov edx, r8d
and edx, dword [rsp + 0x34]
mov eax, edx
shr eax, cl
mov ecx, dword [rsp + 0x44]
shl edx, cl
mov ecx, dword [rsp + 0x40]
test r9d, r9d
mov r9d, dword [rsp + 0x3c]
cmovns edx, eax
shr edx, cl
imul edx, dword [r11 + r10*4 + 0x1043f0]
mov ecx, dword [r11 + r10*4 + 0x10c228]
mov r10, qword [rbp - 0x50]
sar edx, cl
mov ecx, r9d
mov byte [rsi], dl
mov edx, r8d
and edx, dword [rbp + 0x428]
mov eax, edx
shr eax, cl
mov ecx, dword [rsp + 0x50]
shl edx, cl
mov ecx, dword [rsp + 0x54]
test r9d, r9d
mov r9d, dword [rsp + 0x2c]
cmovns edx, eax
shr edx, cl
imul edx, dword [r11 + r10*4 + 0x1043f0]
mov ecx, dword [r11 + r10*4 + 0x10c228]
sar edx, cl
mov ecx, r9d
mov byte [rsi + 1], dl
mov edx, r8d
and edx, dword [rsp + 0x38]
mov eax, edx
shr eax, cl
mov ecx, dword [rsp + 0x58]
shl edx, cl
mov ecx, dword [rsp + 0x5c]
test r9d, r9d
mov r9, qword [rbp - 0x48]
cmovns edx, eax
shr edx, cl
imul edx, dword [r11 + r9*4 + 0x1043f0]
mov ecx, dword [r11 + r9*4 + 0x10c228]
sar edx, cl
mov byte [rsi + 2], dl
test r12d, r12d
je 0x18007cca7
mov r11d, dword [rsp + 0x24]
and r8d, r12d
mov eax, r8d
mov ecx, r11d
shr eax, cl
mov ecx, dword [rsp + 0x60]
shl r8d, cl
mov ecx, dword [rsp + 0x64]
test r11d, r11d
cmovns r8d, eax
lea rax, [0x180000000]
shr r8d, cl
imul r8d, dword [rax + rdi*4 + 0x1043f0]
mov ecx, dword [rax + rdi*4 + 0x10c228]
sar r8d, cl
jmp 0x18007ccad
mov r8d, 0xff
or dword [rsp + 0x28], r8d
add r13d, 4
mov byte [rsi + 3], r8b
inc r15d
add rsi, 4
cmp r15d, dword [rbx]
jl 0x18007cb70
mov r14, qword [rsp + 0x70]
mov r12d, dword [rsp + 0x68]
test r12d, r12d
je 0x18007cd17
cmp qword [rbx + 0x10], 0
je 0x18007cd0d
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, r12d
jge 0x18007cd0d
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 0x18007cd17
mov eax, r12d
add qword [rbx + 0xc0], rax
mov r15d, dword [rsp + 0x30]
mov eax, dword [rbx + 4]
inc r15d
mov r8, qword [rsp + 0x48]
mov edx, eax
mov rdi, qword [rsp + 0x78]
mov dword [rsp + 0x30], r15d
cmp r15d, eax
jl 0x18007c8b3
cmp dword [rsp + 0x28], 0
jne 0x18007cd62
imul eax, dword [rbx]
lea eax, [rax*4 - 1]
movsxd rcx, eax
test eax, eax
js 0x18007cd62
mov byte [rcx + r14], 0xff
sub rcx, 4
jns 0x18007cd54
mov edx, dword [rbx + 4]
cmp dword [rsp + 0x6c], 0
jle 0x18007cdde
xor r10d, r10d
test edx, 0xfffffffe
jle 0x18007cdde
nop dword [rax]
nop dword [rax + rax]
mov ecx, dword [rbx]
sub edx, r10d
dec edx
mov r9d, r10d
imul edx, ecx
xor r8d, r8d
imul r9d, ecx
lea eax, [rcx*4]
shl edx, 2
mov r11d, edx
add rdx, r14
shl r9d, 2
test eax, eax
jle 0x18007cdcf
sub r9, r11
nop
movzx eax, byte [rdx]
inc r8d
movzx ecx, byte [rdx + r9]
mov byte [rdx + r9], al
mov byte [rdx], cl
lea rdx, [rdx + 1]
mov eax, dword [rbx]
shl eax, 2
cmp r8d, eax
jl 0x18007cdb0
mov edx, dword [rbx + 4]
inc r10d
mov eax, edx
sar eax, 1
cmp r10d, eax
jl 0x18007cd80
mov eax, dword [rbx]
mov rcx, qword [rbp + 0x408]
mov dword [rcx], eax
mov eax, dword [rbx + 4]
mov rcx, qword [rbp + 0x410]
mov dword [rcx], eax
mov rax, r14
jmp 0x18007c50c
mov rcx, r14
call fcn.1800a0458
mov edx, dword [0x18014a334]
mov rax, qword gs:[0x58]
mov ecx, 0x28
mov rax, qword [rax + rdx*8]
lea rdx, str.bad_masks
jmp 0x18007c506
mov edx, dword [0x18014a334]
mov rax, qword gs:[0x58]
mov ecx, 0x28
mov rax, qword [rax + rdx*8]
lea rdx, str.outofmem
jmp 0x18007c506
mov edx, dword [0x18014a334]
mov rax, qword gs:[0x58]
mov ecx, 0x28
mov rax, qword [rax + rdx*8]
lea rdx, str.too_large
mov qword [rcx + rax], rdx
xor eax, eax
jmp 0x18007c514
mov edx, dword [0x18014a334]
mov rax, qword gs:[0x58]
mov ecx, 0x28
mov rax, qword [rax + rdx*8]
lea rdx, str.bad_offset
mov qword [rcx + rax], rdx
xor eax, eax
jmp 0x18007c514
mov edx, dword [0x18014a334]
mov rax, qword gs:[0x58]
mov ecx, 0x28
mov rax, qword [rax + rdx*8]
lea rdx, str.bad_header
mov qword [rcx + rax], rdx
xor eax, eax
jmp 0x18007c514