Function at 0x180098320
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 rsi
lea rbp, [rsp - 0x3c0]
sub rsp, 0x4c0
xor esi, esi
mov dword [rbp - 0x6c], 0xff
lea rdx, [rsp + 0x78]
mov dword [rsp + 0x20], esi
mov rbx, rcx
call fcn.180097e10
test rax, rax
je 0x180098399
mov eax, dword [rbx + 4]
mov dword [rsp + 0x68], eax
cdq
xor eax, edx
sub eax, edx
mov dword [rbx + 4], eax
cmp eax, 0x1000000
jbe 0x1800983a6
mov edx, dword [0x1801e95d4]
mov rax, qword gs:[0x58]
mov ecx, Ordinal_41
mov rax, qword [rax + rdx*8]
lea rdx, str.too_large
mov qword [rcx + rax], rdx
xor eax, eax
add rsp, 0x4c0
pop rsi
pop rbx
pop rbp
ret
cmp dword [rbx], 0x1000000
ja 0x180098376
mov eax, dword [rbp - 0x7c]
mov qword [rsp + 0x4e0], rdi
mov edi, dword [rbp - 0x6c]
mov qword [rsp + 0x4b8], r12
mov r12d, dword [rbp - 0x80]
mov dword [rbp + 0x400], eax
mov eax, dword [rbp - 0x78]
mov qword [rsp + 0x4b0], r13
mov r13d, dword [rsp + 0x78]
mov dword [rsp + 0x2c], eax
mov eax, dword [rbp - 0x74]
mov qword [rsp + 0x4a8], r14
mov r14d, dword [rbp - 0x70]
mov dword [rsp + 0x30], eax
mov eax, dword [rbp - 0x68]
mov qword [rsp + 0x4a0], r15
mov r15d, dword [rsp + 0x7c]
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x34], r14d
mov dword [rbp + 0x408], edi
mov dword [rsp + 0x24], r12d
mov dword [rsp + 0x28], r13d
cmp r12d, 0xc
jne 0x180098442
cmp r13d, 0x18
jge 0x18009845f
mov ecx, r15d
sub ecx, eax
mov eax, 0x55555556
sub ecx, 0x18
imul ecx
mov esi, edx
shr esi, 0x1f
add esi, edx
jmp 0x180098453
cmp r13d, 0x10
jge 0x18009845f
mov esi, r15d
sub esi, eax
sub esi, r12d
sar esi, 2
mov dword [rsp + 0x20], esi
test esi, esi
jne 0x1800984ec
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 0x180099236
cmp r15d, edx
jl 0x18009921a
mov ecx, r15d
sub ecx, edx
cmp ecx, 0x400
jg 0x18009921a
test ecx, ecx
je 0x1800984ec
jns 0x1800984b3
mov rax, qword [rbx + 0xc8]
mov qword [rbx + 0xc0], rax
jmp 0x1800984ec
cmp qword [rbx + 0x10], 0
je 0x1800984e2
mov edx, dword [rbx + 0xc8]
sub edx, r8d
cmp edx, ecx
jge 0x1800984e2
mov rax, qword [rbx + 0xc8]
sub ecx, edx
mov edx, ecx
mov qword [rbx + 0xc0], rax
mov rcx, qword [rbx + 0x28]
call qword [rbx + Ordinal_26]
jmp 0x1800984ec
movsxd rax, ecx
add qword [rbx + 0xc0], rax
cmp r13d, 0x18
jne 0x180098501
cmp r14d, 0xff000000
jne 0x180098501
lea eax, [r13 - 0x15]
jmp 0x18009850c
xor eax, eax
test r14d, r14d
setne al
add eax, 3
mov dword [rbx + 8], eax
mov ecx, dword [rbx]
mov r9d, dword [rbx + 4]
test ecx, ecx
js 0x1800991fe
jne 0x18009852c
lea r8d, [rcx*4]
mov r10d, r8d
jmp 0x180098551
mov eax, 0x7fffffff
cdq
idiv ecx
cmp eax, 4
jl 0x1800991fe
lea r8d, [rcx*4]
mov r10d, r8d
test r8d, r8d
js 0x1800991fe
test r9d, r9d
js 0x1800991fe
je 0x18009856e
mov eax, 0x7fffffff
cdq
idiv r9d
cmp r10d, eax
jg 0x1800991fe
test ecx, ecx
je 0x18009858d
xor edx, edx
mov eax, 0x7fffffff
div ecx
cmp eax, 4
jl 0x1800991e2
test r8d, r8d
js 0x1800991e2
test r9d, r9d
je 0x1800985a5
xor edx, edx
mov eax, 0x7fffffff
div r9d
cmp r8d, eax
jg 0x1800991e2
imul ecx, r9d
shl ecx, 2
movsxd rcx, ecx
call fcn.180163030
mov qword [rsp + 0x70], rax
mov r14, rax
test rax, rax
je 0x1800991e2
cmp r13d, 0x10
jge 0x180098b67
xor edi, edi
test esi, esi
je 0x180098b40
cmp esi, 0x100
jg 0x180098b40
movsxd rax, esi
mov qword [rsp + 0x60], rax
test esi, esi
jle 0x180098732
mov rax, qword [rbx + 0xc0]
xor r12d, r12d
mov r14d, dword [rsp + 0x24]
mov r13, qword [rsp + 0x60]
nop dword [rax]
mov rcx, qword [rbx + 0xc8]
cmp rax, rcx
jb 0x180098637
cmp dword [rbx + 0x30], edi
je 0x18009865a
mov rcx, rbx
call fcn.18008dc00
mov rax, qword [rbx + 0xc0]
mov rcx, qword [rbx + 0xc8]
movzx edx, byte [rax]
lea rsi, [r12*4]
inc rax
mov byte [rbp + rsi - 0x5e], dl
mov qword [rbx + 0xc0], rax
mov r8, rsi
cmp rax, rcx
jae 0x18009866a
jmp 0x180098685
lea rsi, [r12*4]
mov byte [rbp + rsi - 0x5e], dil
mov r8, rsi
cmp dword [rbx + 0x30], edi
je 0x1800986aa
mov rcx, rbx
call fcn.18008dc00
mov rax, qword [rbx + 0xc0]
mov rcx, qword [rbx + 0xc8]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
mov byte [rbp + rsi - 0x5f], dl
cmp rax, rcx
jae 0x1800986af
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1800986d4
mov byte [rbp + r8 - 0x5f], dil
cmp dword [rbx + 0x30], edi
je 0x1800986d2
mov rcx, rbx
call fcn.18008dc00
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1800986d4
xor cl, cl
mov byte [rbp + rsi - 0x60], cl
cmp r14d, 0xc
je 0x18009870e
cmp rax, qword [rbx + 0xc8]
jae 0x1800986f3
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18009870e
cmp dword [rbx + 0x30], edi
je 0x18009870e
mov rcx, rbx
call fcn.18008dc00
inc qword [rbx + 0xc0]
mov rax, qword [rbx + 0xc0]
inc r12
mov byte [rbp + rsi - 0x5d], 0xff
cmp r12, r13
jl 0x180098610
mov r14, qword [rsp + 0x70]
mov r13d, dword [rsp + 0x28]
mov esi, dword [rsp + 0x20]
mov r12d, dword [rsp + 0x24]
xor eax, eax
cmp r12d, 0xc
setne al
add eax, 3
imul eax, esi
sub r15d, eax
sub r15d, dword [rsp + 0x38]
sub r15d, r12d
je 0x1800987a1
test r15d, r15d
jns 0x180098763
mov rax, qword [rbx + 0xc8]
mov qword [rbx + 0xc0], rax
jmp 0x1800987a1
cmp qword [rbx + 0x10], rdi
je 0x180098797
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, r15d
jge 0x180098797
mov rax, qword [rbx + 0xc8]
sub r15d, ecx
mov rcx, qword [rbx + 0x28]
mov edx, r15d
mov qword [rbx + 0xc0], rax
call qword [rbx + Ordinal_26]
jmp 0x1800987a1
movsxd rax, r15d
add qword [rbx + 0xc0], rax
cmp r13d, 1
jne 0x1800987b4
mov r12d, dword [rbx]
add r12d, 7
shr r12d, 3
jmp 0x1800987d2
cmp r13d, 4
jne 0x1800987c5
mov r12d, dword [rbx]
inc r12d
shr r12d, 1
jmp 0x1800987d2
cmp r13d, 8
jne 0x180098b19
mov r12d, dword [rbx]
mov eax, dword [rbx + 4]
neg r12d
and r12d, 3
mov ecx, eax
cmp r13d, 1
jne 0x18009895f
xor r13d, r13d
test eax, eax
jle 0x1800990f2
mov rax, qword [rbx + 0xc0]
mov esi, 7
cmp rax, qword [rbx + 0xc8]
jae 0x180098817
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18009883d
cmp dword [rbx + 0x30], 0
je 0x18009883b
mov rcx, rbx
call fcn.18008dc00
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18009883d
xor cl, cl
mov edx, dword [rbx]
xor r15d, r15d
movzx r9d, cl
test edx, edx
jle 0x180098906
mov r8d, edx
mov eax, r9d
mov ecx, esi
sar eax, cl
and eax, 1
lea rcx, [rax*4]
movzx eax, byte [rbp + rcx - 0x60]
mov byte [rdi + r14], al
movzx eax, byte [rbp + rcx - 0x5f]
mov byte [rdi + r14 + 1], al
movzx eax, byte [rbp + rcx - 0x5e]
mov byte [rdi + r14 + 2], al
mov byte [rdi + r14 + 3], 0xff
add rdi, 4
inc r15d
cmp r15d, edx
je 0x180098906
sub esi, 1
jns 0x1800988f7
mov rax, qword [rbx + 0xc0]
mov esi, 7
cmp rax, qword [rbx + 0xc8]
jae 0x1800988c2
movzx ecx, byte [rax]
mov edx, r8d
inc rax
movzx r9d, cl
mov qword [rbx + 0xc0], rax
jmp 0x1800988fa
cmp dword [rbx + 0x30], 0
je 0x1800988ec
mov rcx, rbx
call fcn.18008dc00
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
mov edx, dword [rbx]
movzx r9d, cl
jmp 0x1800988fa
xor cl, cl
mov edx, r8d
movzx r9d, cl
jmp 0x1800988fa
mov edx, r8d
mov r8d, edx
cmp r15d, edx
jl 0x180098851
test r12d, r12d
je 0x180098949
cmp qword [rbx + 0x10], 0
je 0x18009893f
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, r12d
jge 0x18009893f
mov rax, qword [rbx + 0xc8]
mov edx, r12d
sub edx, ecx
mov qword [rbx + 0xc0], rax
mov rcx, qword [rbx + 0x28]
call qword [rbx + Ordinal_26]
jmp 0x180098949
mov eax, r12d
add qword [rbx + 0xc0], rax
mov eax, dword [rbx + 4]
inc r13d
mov ecx, eax
cmp r13d, eax
jl 0x1800987f3
jmp 0x1800990f2
xor r15d, r15d
test eax, eax
jle 0x1800990f2
nop word [rax + rax]
mov r8d, dword [rbx]
xor esi, esi
test r8d, r8d
jle 0x180098ac0
nop
mov r9, qword [rbx + 0xc0]
cmp r9, qword [rbx + 0xc8]
jae 0x1800989a0
movzx ecx, byte [r9]
inc r9
mov qword [rbx + 0xc0], r9
jmp 0x1800989ca
cmp dword [rbx + 0x30], 0
je 0x1800989c8
mov rcx, rbx
call fcn.18008dc00
mov rax, qword [rbx + 0xc0]
mov r8d, dword [rbx]
movzx ecx, byte [rax]
lea r9, [rax + 1]
mov qword [rbx + 0xc0], r9
jmp 0x1800989ca
xor cl, cl
xor r10d, r10d
movzx eax, cl
cmp r13d, 4
jne 0x1800989e0
mov r10d, eax
and r10d, 0xf
shr eax, 4
movsxd rcx, edi
lea rdx, [rax*4]
movzx eax, byte [rbp + rdx - 0x60]
inc edi
mov byte [rcx + r14], al
movzx eax, byte [rbp + rdx - 0x5f]
movsxd rcx, edi
inc edi
mov byte [rcx + r14], al
movzx eax, byte [rbp + rdx - 0x5e]
movsxd rcx, edi
inc edi
mov byte [rcx + r14], al
movsxd rax, edi
inc edi
mov byte [rax + r14], 0xff
lea eax, [rsi + 1]
cmp eax, r8d
je 0x180098ac0
cmp r13d, 8
jne 0x180098a75
cmp r9, qword [rbx + 0xc8]
jae 0x180098a48
movzx ecx, byte [r9]
lea rax, [r9 + 1]
mov qword [rbx + 0xc0], rax
jmp 0x180098a71
cmp dword [rbx + 0x30], 0
je 0x180098a6f
mov rcx, rbx
call fcn.18008dc00
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
mov r8d, dword [rbx]
jmp 0x180098a71
xor cl, cl
movzx r10d, cl
movsxd rcx, edi
lea rdx, [r10*4]
movzx eax, byte [rbp + rdx - 0x60]
inc edi
add esi, 2
mov r9d, r8d
mov byte [rcx + r14], al
movzx eax, byte [rbp + rdx - 0x5f]
movsxd rcx, edi
inc edi
mov byte [rcx + r14], al
movzx eax, byte [rbp + rdx - 0x5e]
movsxd rcx, edi
inc edi
mov byte [rcx + r14], al
movsxd rax, edi
inc edi
mov byte [rax + r14], 0xff
cmp esi, r8d
jl 0x180098980
test r12d, r12d
je 0x180098b03
cmp qword [rbx + 0x10], 0
je 0x180098af9
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, r12d
jge 0x180098af9
mov rax, qword [rbx + 0xc8]
mov edx, r12d
sub edx, ecx
mov qword [rbx + 0xc0], rax
mov rcx, qword [rbx + 0x28]
call qword [rbx + Ordinal_26]
jmp 0x180098b03
mov eax, r12d
add qword [rbx + 0xc0], rax
mov eax, dword [rbx + 4]
inc r15d
mov ecx, eax
cmp r15d, eax
jl 0x180098970
jmp 0x1800990f2
mov rcx, r14
call fcn.180162cf4
mov edx, dword [0x1801e95d4]
mov rax, qword gs:[0x58]
mov rax, qword [rax + rdx*8]
lea rdx, str.bad_bpp
jmp 0x180099250
mov rcx, r14
call fcn.180162cf4
mov edx, dword [0x1801e95d4]
mov rax, qword gs:[0x58]
mov rax, qword [rax + rdx*8]
lea rdx, str.invalid
jmp 0x180099250
sub r15d, dword [rsp + 0x38]
xor eax, eax
mov dword [rsp + 0x44], eax
mov r13d, eax
mov dword [rsp + 0x4c], eax
mov dword [rsp + 0x54], eax
mov dword [rsp + 0x60], eax
mov dword [rsp + 0x40], eax
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x50], eax
mov dword [rsp + 0x58], eax
sub r15d, r12d
je 0x180098beb
test r15d, r15d
jns 0x180098bab
mov rax, qword [rbx + 0xc8]
mov qword [rbx + 0xc0], rax
jmp 0x180098be9
cmp qword [rbx + 0x10], rax
je 0x180098bdf
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, r15d
jge 0x180098bdf
mov rax, qword [rbx + 0xc8]
sub r15d, ecx
mov rcx, qword [rbx + 0x28]
mov edx, r15d
mov qword [rbx + 0xc0], rax
call qword [rbx + Ordinal_26]
jmp 0x180098be9
movsxd rax, r15d
add qword [rbx + 0xc0], rax
xor eax, eax
mov ecx, dword [rsp + 0x28]
cmp ecx, 0x18
jne 0x180098bfb
mov eax, dword [rbx]
lea edx, [rax + rax*2]
jmp 0x180098c08
cmp ecx, 0x10
jne 0x180098c06
mov edx, dword [rbx]
add edx, edx
jmp 0x180098c08
mov edx, eax
neg edx
and edx, 3
mov dword [rsp + 0x24], edx
cmp ecx, 0x18
jne 0x180098c26
mov r12d, 1
mov qword [rsp + 0x38], r12
jmp 0x180098e36
mov r11d, dword [rsp + 0x30]
cmp ecx, 0x20
mov ecx, dword [rbp + 0x400]
mov r10d, dword [rsp + 0x2c]
jne 0x180098c73
cmp r11d, 0xff
jne 0x180098c73
cmp r10d, 0xff00
jne 0x180098c73
cmp ecx, 0xff0000
jne 0x180098c73
mov r9d, dword [rsp + 0x34]
cmp r9d, 0xff000000
jne 0x180098c92
mov r12d, 2
mov qword [rsp + 0x38], r12
jmp 0x180098e36
test ecx, ecx
je 0x1800991be
test r10d, r10d
je 0x1800991be
test r11d, r11d
je 0x1800991be
mov r9d, dword [rsp + 0x34]
call fcn.180097ca0
mov edx, dword [rbp + 0x400]
sub eax, 7
mov ecx, dword [rbp + 0x400]
shr edx, 1
and ecx, 0x55555555
and edx, 0x55555555
mov dword [rsp + 0x44], 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, r10d
and edx, 0xf0f0f0f
mov eax, edx
shr eax, 8
add edx, eax
mov eax, edx
shr eax, 0x10
add eax, edx
movzx r15d, al
mov dword [rsp + 0x40], r15d
call fcn.180097ca0
sub eax, 7
mov edx, r10d
shr edx, 1
mov ecx, r10d
and edx, 0x55555555
mov dword [rsp + 0x4c], 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 esi, al
mov dword [rsp + 0x48], esi
call fcn.180097ca0
sub eax, 7
mov edx, r11d
shr edx, 1
mov ecx, r11d
and edx, 0x55555555
mov dword [rsp + 0x54], 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 r11d, al
mov dword [rsp + 0x50], r11d
call fcn.180097ca0
sub eax, 7
mov edx, r9d
shr edx, 1
mov ecx, r9d
and edx, 0x55555555
mov dword [rsp + 0x60], 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 r8d, al
mov dword [rsp + 0x58], r8d
cmp r15d, 8
ja 0x1800991be
cmp esi, 8
ja 0x1800991be
cmp r11d, 8
ja 0x1800991be
xor r12d, r12d
mov qword [rsp + 0x38], r12
cmp r8d, 8
ja 0x1800991be
mov edx, dword [rsp + 0x24]
mov eax, dword [rbx + 4]
xor esi, esi
mov dword [rsp + 0x20], esi
mov ecx, eax
test eax, eax
jle 0x1800990f2
nop dword [rax]
mov eax, dword [rbx]
movsxd rcx, r13d
test r12, r12
je 0x180098ff2
xor esi, esi
test eax, eax
jle 0x180098fa7
mov r15d, dword [rbp + 0x408]
lea rdi, [rcx + r14]
nop dword [rax]
nop word [rax + rax]
mov rcx, qword [rbx + 0xc8]
mov rax, qword [rbx + 0xc0]
cmp rax, rcx
jb 0x180098eaf
cmp dword [rbx + 0x30], 0
je 0x180098ec6
mov rcx, rbx
call fcn.18008dc00
mov rax, qword [rbx + 0xc0]
mov rcx, qword [rbx + 0xc8]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
mov byte [rdi + 2], dl
cmp rax, rcx
jae 0x180098eca
jmp 0x180098ee6
mov byte [rdi + 2], 0
cmp dword [rbx + 0x30], 0
je 0x180098f0a
mov rcx, rbx
call fcn.18008dc00
mov rax, qword [rbx + 0xc0]
mov rcx, qword [rbx + 0xc8]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
mov byte [rdi + 1], dl
cmp rax, rcx
jae 0x180098f0e
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x180098f34
mov byte [rdi + 1], 0
cmp dword [rbx + 0x30], 0
je 0x180098f32
mov rcx, rbx
call fcn.18008dc00
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x180098f34
xor cl, cl
mov byte [rdi], cl
cmp r12, 2
jne 0x180098f7c
cmp rax, qword [rbx + 0xc8]
jae 0x180098f54
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x180098f7e
cmp dword [rbx + 0x30], 0
je 0x180098f78
mov rcx, rbx
call fcn.18008dc00
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x180098f7e
xor cl, cl
jmp 0x180098f7e
mov cl, 0xff
movzx eax, cl
add r13d, 4
mov byte [rdi + 3], cl
or r15d, eax
add rdi, 4
inc esi
cmp esi, dword [rbx]
jl 0x180098e80
mov edx, dword [rsp + 0x24]
mov edi, r15d
mov dword [rbp + 0x408], r15d
mov esi, dword [rsp + 0x20]
test edx, edx
je 0x1800990df
cmp qword [rbx + 0x10], 0
je 0x1800990d6
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, edx
jge 0x1800990d6
mov rax, qword [rbx + 0xc8]
sub edx, ecx
mov rcx, qword [rbx + 0x28]
mov qword [rbx + 0xc0], rax
call qword [rbx + Ordinal_26]
mov edx, dword [rsp + 0x24]
jmp 0x1800990df
test eax, eax
jle 0x1800990cc
lea r15, [rcx + r14]
mov r14d, dword [rsp + 0x28]
mov rcx, rbx
call fcn.18008de10
cmp r14d, 0x10
jne 0x180099015
mov esi, eax
jmp 0x18009902c
mov rcx, rbx
mov edi, eax
call fcn.18008de10
mov esi, eax
shl esi, 0x10
add esi, edi
mov edi, dword [rbp + 0x408]
mov r8d, dword [rsp + 0x40]
mov ecx, esi
and ecx, dword [rbp + 0x400]
mov edx, dword [rsp + 0x44]
call fcn.180097d10
mov r8d, dword [rsp + 0x48]
mov ecx, esi
and ecx, dword [rsp + 0x2c]
mov edx, dword [rsp + 0x4c]
mov byte [r15], al
call fcn.180097d10
mov r8d, dword [rsp + 0x50]
mov ecx, esi
and ecx, dword [rsp + 0x30]
mov edx, dword [rsp + 0x54]
mov byte [r15 + 1], al
call fcn.180097d10
mov r9d, dword [rsp + 0x34]
mov byte [r15 + 2], al
test r9d, r9d
je 0x180099094
mov r8d, dword [rsp + 0x58]
and esi, r9d
mov edx, dword [rsp + 0x60]
mov ecx, esi
call fcn.180097d10
jmp 0x180099099
mov eax, 0xff
or edi, eax
mov byte [r15 + 3], al
add r15, 4
mov dword [rbp + 0x408], edi
add r13d, 4
inc r12d
cmp r12d, dword [rbx]
jl 0x180099003
mov r14, qword [rsp + 0x70]
mov edx, dword [rsp + 0x24]
mov r12, qword [rsp + 0x38]
jmp 0x180098fa7
mov r12, qword [rsp + 0x38]
jmp 0x180098fab
mov eax, edx
add qword [rbx + 0xc0], rax
mov eax, dword [rbx + 4]
inc esi
mov dword [rsp + 0x20], esi
mov ecx, eax
cmp esi, eax
jl 0x180098e50
cmp dword [rbp + 0x408], 0
jne 0x18009911e
imul eax, dword [rbx]
lea eax, [rax*4 - 1]
movsxd rdx, eax
test eax, eax
js 0x18009911e
nop dword [rax]
mov byte [rdx + r14], 0xff
sub rdx, 4
jns 0x180099110
mov ecx, dword [rbx + 4]
cmp dword [rsp + 0x68], 0
jle 0x180099191
xor r10d, r10d
mov edx, ecx
test ecx, 0xfffffffe
jle 0x180099191
mov ecx, dword [rbx]
sub edx, r10d
dec edx
mov r9d, ecx
imul edx, ecx
xor r8d, r8d
imul r9d, r10d
lea eax, [rcx*4]
shl edx, 2
mov r11d, edx
add rdx, r14
shl r9d, 2
test eax, eax
jle 0x180099180
sub r9, r11
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 0x180099161
mov ecx, dword [rbx + 4]
inc r10d
mov eax, ecx
mov edx, ecx
sar eax, 1
cmp r10d, eax
jl 0x180099132
mov eax, dword [rbx]
mov rdx, qword [rbp + 0x3e8]
mov dword [rdx], eax
mov rax, qword [rbp + 0x3f0]
mov dword [rax], ecx
mov rcx, qword [rbp + 0x3f8]
test rcx, rcx
je 0x1800991b6
mov eax, dword [rbx + 8]
mov dword [rcx], eax
mov rax, r14
jmp 0x18009925b
mov rcx, r14
call fcn.180162cf4
mov edx, dword [0x1801e95d4]
mov rax, qword gs:[0x58]
mov rax, qword [rax + rdx*8]
lea rdx, str.bad_masks
jmp 0x180099250
mov edx, dword [0x1801e95d4]
mov rax, qword gs:[0x58]
mov rax, qword [rax + rdx*8]
lea rdx, str.outofmem
jmp 0x180099250
mov edx, dword [0x1801e95d4]
mov rax, qword gs:[0x58]
mov rax, qword [rax + rdx*8]
lea rdx, str.too_large
jmp 0x180099250
mov edx, dword [0x1801e95d4]
mov rax, qword gs:[0x58]
mov rax, qword [rax + rdx*8]
lea rdx, str.bad_offset
jmp 0x180099250
mov edx, dword [0x1801e95d4]
mov rax, qword gs:[0x58]
mov rax, qword [rax + rdx*8]
lea rdx, str.bad_header
mov ecx, Ordinal_41
mov qword [rcx + rax], rdx
xor eax, eax
mov r14, qword [rsp + 0x4a8]
mov r13, qword [rsp + 0x4b0]
mov r12, qword [rsp + 0x4b8]
mov rdi, qword [rsp + 0x4e0]
mov r15, qword [rsp + 0x4a0]
add rsp, 0x4c0
pop rsi
pop rbx
pop rbp
ret