Function at 0x18006d160
Capabilities:
Encrypt data using rc4 ksa
Resolve function by parsing pe exports

Disassembly:
push rbx
push r14
push r15
sub rsp, 0x530
mov rax, qword [0x1802ec4c0]
xor rax, rsp
mov qword [rsp + 0x4f0], rax
mov qword [rsp + 0xd8], rdx
xor r14d, r14d
lea rdx, [rsp + 0x98]
mov qword [rsp + 0xe8], r9
mov r15d, r14d
mov qword [rsp + 0xe0], r8
mov rbx, rcx
mov dword [rsp + 0xb4], 0xff
call fcn.18006cd90
test rax, rax
je 0x18006d201
mov eax, dword [rbx + 4]
mov r8d, eax
neg r8d
mov dword [rsp + 0x90], eax
cmovs r8d, eax
mov dword [rbx + 4], r8d
cmp r8d, 0x1000000
jbe 0x18006d208
mov edx, dword [0x180342d00]
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 0x18006e196
mov r9d, dword [rbx]
cmp r9d, 0x1000000
ja 0x18006d1de
mov eax, dword [rsp + 0xa4]
mov qword [rsp + 0x528], rbp
mov ebp, dword [rsp + 0xa0]
mov qword [rsp + 0x520], rsi
mov esi, dword [rsp + 0xb8]
mov dword [rsp + 0x44], eax
mov eax, dword [rsp + 0xa8]
mov qword [rsp + 0x518], rdi
mov edi, dword [rsp + 0xb0]
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0xac]
mov qword [rsp + 0x510], r12
mov r12d, dword [rsp + 0x9c]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0xb4]
mov qword [rsp + 0x508], r13
mov r13d, dword [rsp + 0x98]
mov dword [rsp + 0x3c], eax
mov dword [rsp + 0x50], edi
mov dword [rsp + 0x2c], esi
mov dword [rsp + 0x30], r12d
mov dword [rsp + 0x34], ebp
mov dword [rsp + 0x20], r13d
cmp ebp, 0xc
jne 0x18006d2c9
cmp r13d, 0x18
jge 0x18006d2e1
mov ecx, r12d
mov eax, 0x55555556
sub ecx, esi
sub ecx, 0x18
imul ecx
mov r15d, edx
shr r15d, 0x1f
add r15d, edx
jmp 0x18006d2dc
cmp r13d, 0x10
jge 0x18006d2e1
mov r15d, r12d
sub r15d, esi
sub r15d, ebp
sar r15d, 2
test r15d, r15d
jne 0x18006d32a
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xd0]
add ecx, dword [rbx + 0xb8]
lea eax, [rcx - 1]
cmp eax, 0x3ff
ja 0x18006e149
cmp r12d, ecx
jl 0x18006e12d
mov edx, r12d
sub edx, ecx
cmp edx, 0x400
jg 0x18006e12d
mov rcx, rbx
call fcn.180063040
mov r8d, dword [rbx + 4]
mov r9d, dword [rbx]
cmp r13d, 0x18
jne 0x18006d33f
cmp edi, 0xff000000
jne 0x18006d33f
mov eax, 3
jmp 0x18006d34a
test edi, edi
mov eax, r14d
setne al
add eax, 3
mov dword [rbx + 8], eax
test r9d, r9d
js 0x18006e111
jne 0x18006d362
lea ecx, [r9*4]
jmp 0x18006d384
mov eax, 0x7fffffff
cdq
idiv r9d
cmp eax, 4
jl 0x18006e111
lea ecx, [r9*4]
test ecx, ecx
js 0x18006e111
test r8d, r8d
js 0x18006e111
je 0x18006d3a0
mov eax, 0x7fffffff
cdq
idiv r8d
cmp ecx, eax
jg 0x18006e111
test r9d, r9d
je 0x18006d3b7
mov eax, 0x7fffffff
cdq
idiv r9d
cmp eax, 4
jl 0x18006e0f5
lea ecx, [r9*4]
test r8d, r8d
je 0x18006d3d5
mov eax, 0x7fffffff
cdq
idiv r8d
cmp ecx, eax
jg 0x18006e0f5
imul r8d, r9d
lea eax, [r8*4]
movsxd rcx, eax
call fcn.180215350
mov qword [rsp + 0x60], rax
mov rcx, rax
test rax, rax
je 0x18006e0f5
cmp r13d, 0x10
jge 0x18006d966
mov dword [rsp + 0x24], r14d
mov edi, r14d
test r15d, r15d
je 0x18006d942
cmp r15d, 0x100
jg 0x18006d942
mov rsi, rax
test r15d, r15d
jle 0x18006d57f
mov r12d, dword [rsp + 0x34]
lea rbp, [rbx + 0x30]
movsxd rdi, r15d
nop word [rax + rax]
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x18006d45f
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18006d489
cmp dword [rbx + 0x30], 0
lea rbp, [rbx + 0x30]
je 0x18006d487
mov rcx, rbx
call fcn.180062fc0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18006d489
xor cl, cl
mov r13, rbp
mov byte [rsp + r14*4 + 0xf2], cl
cmp rax, qword [rbx + 0xc8]
jae 0x18006d4ac
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18006d4d2
cmp dword [rbp], 0
je 0x18006d4d0
mov rcx, rbx
call fcn.180062fc0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18006d4d2
xor cl, cl
mov byte [rsp + r14*4 + 0xf1], cl
cmp rax, qword [rbx + 0xc8]
jae 0x18006d4f6
movzx ecx, byte [rax]
lea rbp, [rbx + 0x30]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18006d51c
cmp dword [rbp], 0
je 0x18006d51a
mov rcx, rbx
call fcn.180062fc0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18006d51c
xor cl, cl
mov byte [rsp + r14*4 + 0xf0], cl
cmp r12d, 0xc
je 0x18006d555
cmp rax, qword [rbx + 0xc8]
jae 0x18006d53f
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18006d555
cmp dword [r13], 0
je 0x18006d555
mov rcx, rbx
call fcn.180062fc0
inc qword [rbx + 0xc0]
mov byte [rsp + r14*4 + 0xf3], 0xff
inc r14
cmp r14, rdi
jl 0x18006d440
mov edi, dword [rsp + 0x24]
xor r14d, r14d
mov r12d, dword [rsp + 0x30]
mov ebp, dword [rsp + 0x34]
mov r13d, dword [rsp + 0x20]
mov eax, r14d
cmp ebp, 0xc
mov rcx, rbx
setne al
add eax, 3
imul eax, r15d
sub r12d, eax
sub r12d, dword [rsp + 0x2c]
sub r12d, ebp
mov edx, r12d
call fcn.180063040
cmp r13d, 1
jne 0x18006d5b8
mov r15d, dword [rbx]
add r15d, 7
shr r15d, 3
jmp 0x18006d5d6
cmp r13d, 4
jne 0x18006d5c9
mov r15d, dword [rbx]
inc r15d
shr r15d, 1
jmp 0x18006d5d6
cmp r13d, 8
jne 0x18006d91b
mov r15d, dword [rbx]
mov eax, dword [rbx + 4]
neg r15d
and r15d, 3
mov edx, eax
cmp r13d, 1
jne 0x18006d75c
mov r12d, r14d
test eax, eax
jle 0x18006dff5
mov rdi, r14
nop word [rax + rax]
mov rax, qword [rbx + 0xc0]
mov r14d, 7
cmp rax, qword [rbx + 0xc8]
jae 0x18006d625
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18006d64b
cmp dword [rbx + 0x30], 0
je 0x18006d649
mov rcx, rbx
call fcn.180062fc0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18006d64b
xor cl, cl
xor ebp, ebp
movzx edx, cl
cmp dword [rbx], ebp
jle 0x18006d703
nop dword [rax + rax]
mov eax, edx
mov ecx, r14d
sar eax, cl
and eax, 1
lea rcx, [rax*4]
movzx eax, byte [rsp + rcx + 0xf0]
mov byte [rdi + rsi], al
movzx eax, byte [rsp + rcx + 0xf1]
mov byte [rdi + rsi + 1], al
movzx eax, byte [rsp + rcx + 0xf2]
mov byte [rdi + rsi + 2], al
lea eax, [rbp + 1]
mov byte [rdi + rsi + 3], 0xff
add rdi, 4
cmp eax, dword [rbx]
je 0x18006d703
sub r14d, 1
jns 0x18006d6f9
mov rax, qword [rbx + 0xc0]
mov r14d, 7
cmp rax, qword [rbx + 0xc8]
jae 0x18006d6d0
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18006d6f6
cmp dword [rbx + 0x30], 0
je 0x18006d6f4
mov rcx, rbx
call fcn.180062fc0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18006d6f6
xor cl, cl
movzx edx, cl
inc ebp
cmp ebp, dword [rbx]
jl 0x18006d660
test r15d, r15d
je 0x18006d746
cmp qword [rbx + 0x10], 0
je 0x18006d73c
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, r15d
jge 0x18006d73c
mov rax, qword [rbx + 0xc8]
mov edx, r15d
sub edx, ecx
mov qword [rbx + 0xc0], rax
mov rcx, qword [rbx + 0x28]
call qword [rbx + 0x18]
jmp 0x18006d746
mov eax, r15d
add qword [rbx + 0xc0], rax
mov eax, dword [rbx + 4]
inc r12d
mov edx, eax
cmp r12d, eax
jl 0x18006d600
jmp 0x18006dff5
xor r14d, r14d
test eax, eax
jle 0x18006dff5
nop word [rax + rax]
xor ebp, ebp
cmp dword [rbx], ebp
jle 0x18006d8c2
nop word [rax + rax]
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x18006d79f
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18006d7c5
cmp dword [rbx + 0x30], 0
je 0x18006d7c3
mov rcx, rbx
call fcn.180062fc0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18006d7c5
xor cl, cl
xor r8d, r8d
movzx eax, cl
cmp r13d, 4
jne 0x18006d7db
mov r8d, eax
and r8d, 0xf
shr eax, 4
movsxd rcx, edi
lea rdx, [rax*4]
movzx eax, byte [rsp + rdx + 0xf0]
inc edi
mov byte [rcx + rsi], al
movzx eax, byte [rsp + rdx + 0xf1]
movsxd rcx, edi
inc edi
mov byte [rcx + rsi], al
movzx eax, byte [rsp + rdx + 0xf2]
movsxd rcx, edi
inc edi
mov byte [rcx + rsi], al
movsxd rax, edi
inc edi
mov byte [rax + rsi], 0xff
lea eax, [rbp + 1]
cmp eax, dword [rbx]
je 0x18006d8c2
cmp r13d, 8
jne 0x18006d876
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x18006d84c
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18006d872
cmp dword [rbx + 0x30], 0
je 0x18006d870
mov rcx, rbx
call fcn.180062fc0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18006d872
xor cl, cl
movzx r8d, cl
movsxd rcx, edi
lea rdx, [r8*4]
movzx eax, byte [rsp + rdx + 0xf0]
inc edi
add ebp, 2
mov byte [rcx + rsi], al
movzx eax, byte [rsp + rdx + 0xf1]
movsxd rcx, edi
inc edi
mov byte [rcx + rsi], al
movzx eax, byte [rsp + rdx + 0xf2]
movsxd rcx, edi
inc edi
mov byte [rcx + rsi], al
movsxd rax, edi
inc edi
mov byte [rax + rsi], 0xff
cmp ebp, dword [rbx]
jl 0x18006d780
test r15d, r15d
je 0x18006d905
cmp qword [rbx + 0x10], 0
je 0x18006d8fb
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, r15d
jge 0x18006d8fb
mov rax, qword [rbx + 0xc8]
mov edx, r15d
sub edx, ecx
mov qword [rbx + 0xc0], rax
mov rcx, qword [rbx + 0x28]
call qword [rbx + 0x18]
jmp 0x18006d905
mov eax, r15d
add qword [rbx + 0xc0], rax
mov eax, dword [rbx + 4]
inc r14d
mov edx, eax
cmp r14d, eax
jl 0x18006d770
jmp 0x18006dff5
mov rcx, rsi
call fcn.180215358
mov edx, dword [0x180342d00]
mov rax, qword gs:[0x58]
mov rax, qword [rax + rdx*8]
lea rdx, str.bad_bpp
jmp 0x18006e163
call fcn.180215358
mov edx, dword [0x180342d00]
mov rax, qword gs:[0x58]
mov rax, qword [rax + rdx*8]
lea rdx, str.invalid
jmp 0x18006e163
sub r12d, esi
mov dword [rsp + 0x2c], r14d
sub r12d, ebp
mov dword [rsp + 0x40], r14d
mov edx, r12d
mov dword [rsp + 0x34], r14d
mov rcx, rbx
mov dword [rsp + 0x30], r14d
mov r13d, r14d
xor edi, edi
xor r15d, r15d
call fcn.180063040
mov r12d, dword [rsp + 0x20]
cmp r12d, 0x18
jne 0x18006d9a6
mov eax, dword [rbx]
lea r10d, [rax + rax*2]
jmp 0x18006d9b7
cmp r12d, 0x10
jne 0x18006d9b4
mov r10d, dword [rbx]
add r10d, r10d
jmp 0x18006d9b7
xor r10d, r10d
neg r10d
and r10d, 3
mov dword [rsp + 0x20], r10d
cmp r12d, 0x18
jne 0x18006d9ec
mov rsi, qword [rsp + 0x60]
mov r9d, edi
mov qword [rsp + 0x58], rsi
mov r8d, edi
mov qword [rsp + 0x48], 1
mov r11d, edi
mov ebp, edi
jmp 0x18006dc28
mov rdx, qword [rsp + 0x60]
xor eax, eax
mov ecx, dword [rsp + 0x38]
mov rsi, rdx
mov qword [rsp + 0x48], rax
cmp r12d, 0x20
jne 0x18006da69
mov qword [rsp + 0x48], rax
mov eax, dword [rsp + 0x28]
cmp eax, 0xff
jne 0x18006da6d
xor eax, eax
mov qword [rsp + 0x48], rax
cmp ecx, 0xff00
jne 0x18006da69
cmp dword [rsp + 0x44], 0xff0000
mov qword [rsp + 0x48], rax
jne 0x18006da69
mov r10d, dword [rsp + 0x50]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x58], rdx
cmp r10d, 0xff000000
jne 0x18006da9a
mov qword [rsp + 0x48], 2
mov r9d, eax
mov qword [rsp + 0x58], rdx
mov r8d, eax
mov r11d, eax
mov ebp, eax
jmp 0x18006dc23
mov eax, dword [rsp + 0x28]
mov edi, dword [rsp + 0x44]
test edi, edi
je 0x18006e0d1
test ecx, ecx
je 0x18006e0d1
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x60], rdx
test eax, eax
je 0x18006e0d1
mov r10d, dword [rsp + 0x50]
jmp 0x18006da9e
mov edi, dword [rsp + 0x44]
mov ecx, edi
call fcn.18006ccb0
mov edx, edi
mov ecx, edi
mov edi, dword [rsp + 0x38]
and ecx, 0x55555555
shr edx, 1
and edx, 0x55555555
lea r11d, [rax - 7]
add edx, ecx
mov dword [rsp + 0x2c], r11d
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, edi
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.18006ccb0
mov edx, edi
mov ecx, edi
mov edi, dword [rsp + 0x28]
and ecx, 0x55555555
shr edx, 1
and edx, 0x55555555
lea ebp, [rax - 7]
add edx, ecx
mov dword [rsp + 0x40], ebp
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, edi
and edx, 0xf0f0f0f
mov eax, edx
shr eax, 8
add edx, eax
mov eax, edx
shr eax, 0x10
add eax, edx
movzx r13d, al
call fcn.18006ccb0
sub eax, 7
mov edx, edi
shr edx, 1
mov ecx, edi
and edx, 0x55555555
mov dword [rsp + 0x34], 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 r14d, al
call fcn.18006ccb0
mov edx, r10d
mov ecx, r10d
shr edx, 1
and ecx, 0x55555555
and edx, 0x55555555
add edx, ecx
lea r8d, [rax - 7]
mov ecx, edx
mov dword [rsp + 0x30], r8d
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 edi, al
cmp r9d, 8
ja 0x18006e0d1
cmp r13d, 8
ja 0x18006e0d1
cmp r14d, 8
ja 0x18006e0d1
cmp edi, 8
ja 0x18006e0d1
mov r10d, dword [rsp + 0x20]
mov eax, dword [rbx + 4]
mov edx, eax
mov dword [rsp + 0x24], r15d
test eax, eax
jle 0x18006dff5
mov eax, r11d
mov qword [rsp + 0x68], rdi
neg eax
mov dword [rsp + 0x74], eax
mov eax, 8
mov ecx, eax
sub ecx, r9d
mov dword [rsp + 0x78], ecx
mov ecx, ebp
neg ecx
mov dword [rsp + 0x7c], ecx
mov ecx, eax
sub ecx, r13d
mov dword [rsp + 0x80], ecx
mov ecx, dword [rsp + 0x34]
neg ecx
mov dword [rsp + 0x84], ecx
mov ecx, eax
sub ecx, r14d
mov dword [rsp + 0x88], ecx
mov ecx, r8d
neg ecx
sub eax, edi
mov dword [rsp + 0x8c], ecx
mov dword [rsp + 0x70], eax
mov eax, r9d
mov ecx, r13d
mov r13d, dword [rsp + 0x70]
mov qword [rsp + 0xc0], rax
mov eax, r14d
mov r14, qword [rsp + 0x48]
mov qword [rsp + 0xd0], rax
mov qword [rsp + 0xc8], rcx
mov eax, dword [rbx]
xor ebp, ebp
movsxd rcx, r15d
test r14, r14
je 0x18006de27
test eax, eax
jle 0x18006df91
lea rdi, [rcx + rsi]
nop dword [rax]
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x18006dcff
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18006dd25
cmp dword [rbx + 0x30], 0
je 0x18006dd23
mov rcx, rbx
call fcn.180062fc0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18006dd25
xor cl, cl
mov byte [rdi + 2], cl
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x18006dd47
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18006dd6d
cmp dword [rbx + 0x30], 0
je 0x18006dd6b
mov rcx, rbx
call fcn.180062fc0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18006dd6d
xor cl, cl
mov byte [rdi + 1], cl
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x18006dd8f
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18006ddb5
cmp dword [rbx + 0x30], 0
je 0x18006ddb3
mov rcx, rbx
call fcn.180062fc0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18006ddb5
xor cl, cl
mov byte [rdi], cl
cmp r14, 2
jne 0x18006de04
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x18006dddc
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18006de06
cmp dword [rbx + 0x30], 0
je 0x18006de00
mov rcx, rbx
call fcn.180062fc0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18006de06
xor cl, cl
jmp 0x18006de06
mov cl, 0xff
mov byte [rdi + 3], cl
add r15d, 4
movzx eax, cl
add rdi, 4
or dword [rsp + 0x3c], eax
inc ebp
cmp ebp, dword [rbx]
jl 0x18006dce0
jmp 0x18006df8c
test eax, eax
jle 0x18006df91
lea r14, [rcx + rsi]
mov esi, dword [rsp + 0x40]
mov rcx, rbx
call fcn.180063260
cmp r12d, 0x10
je 0x18006de59
mov rcx, rbx
mov edi, eax
call fcn.180063260
shl eax, 0x10
add eax, edi
mov rdi, qword [rsp + 0x68]
mov r11d, dword [rsp + 0x2c]
mov edx, eax
and edx, dword [rsp + 0x44]
test r11d, r11d
jns 0x18006de71
mov ecx, dword [rsp + 0x74]
shl edx, cl
jmp 0x18006de76
mov ecx, r11d
shr edx, cl
mov r8, qword [rsp + 0xc0]
lea r9, [0x180000000]
mov ecx, dword [rsp + 0x78]
shr edx, cl
imul edx, dword [r9 + r8*4 + 0x2a2cd8]
mov ecx, dword [r9 + r8*4 + 0x2a2d00]
sar edx, cl
mov byte [r14], dl
mov edx, eax
and edx, dword [rsp + 0x38]
test esi, esi
jns 0x18006deb3
mov ecx, dword [rsp + 0x7c]
shl edx, cl
jmp 0x18006deb7
mov ecx, esi
shr edx, cl
mov r8, qword [rsp + 0xc8]
mov ecx, dword [rsp + 0x80]
shr edx, cl
imul edx, dword [r9 + r8*4 + 0x2a2cd8]
mov ecx, dword [r9 + r8*4 + 0x2a2d00]
sar edx, cl
mov ecx, dword [rsp + 0x34]
mov byte [r14 + 1], dl
mov edx, eax
and edx, dword [rsp + 0x28]
test ecx, ecx
jns 0x18006def8
mov ecx, dword [rsp + 0x84]
shl edx, cl
jmp 0x18006defa
shr edx, cl
mov r8, qword [rsp + 0xd0]
mov ecx, dword [rsp + 0x88]
mov r10d, dword [rsp + 0x50]
shr edx, cl
imul edx, dword [r9 + r8*4 + 0x2a2cd8]
mov ecx, dword [r9 + r8*4 + 0x2a2d00]
sar edx, cl
mov byte [r14 + 2], dl
test r10d, r10d
je 0x18006df63
mov r8d, dword [rsp + 0x30]
and eax, r10d
test r8d, r8d
jns 0x18006df44
mov ecx, dword [rsp + 0x8c]
shl eax, cl
jmp 0x18006df49
mov ecx, r8d
shr eax, cl
mov ecx, r13d
shr eax, cl
imul eax, dword [r9 + rdi*4 + 0x2a2cd8]
mov ecx, dword [r9 + rdi*4 + 0x2a2d00]
sar eax, cl
jmp 0x18006df68
mov eax, 0xff
or dword [rsp + 0x3c], eax
add r15d, 4
mov byte [r14 + 3], al
inc ebp
add r14, 4
cmp ebp, dword [rbx]
jl 0x18006de37
mov rsi, qword [rsp + 0x58]
mov r14, qword [rsp + 0x48]
mov r10d, dword [rsp + 0x20]
test r10d, r10d
je 0x18006dfd9
cmp qword [rbx + 0x10], 0
je 0x18006dfcf
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, r10d
jge 0x18006dfcf
mov rax, qword [rbx + 0xc8]
mov edx, r10d
sub edx, ecx
mov qword [rbx + 0xc0], rax
mov rcx, qword [rbx + 0x28]
call qword [rbx + 0x18]
mov r10d, dword [rsp + 0x20]
jmp 0x18006dfd9
mov eax, r10d
add qword [rbx + 0xc0], rax
mov ecx, dword [rsp + 0x24]
mov eax, dword [rbx + 4]
inc ecx
mov rdi, qword [rsp + 0x68]
mov edx, eax
mov dword [rsp + 0x24], ecx
cmp ecx, eax
jl 0x18006dcc0
cmp dword [rsp + 0x3c], 0
jne 0x18006e01f
imul eax, dword [rbx]
lea eax, [rax*4 - 1]
movsxd rcx, eax
test eax, eax
js 0x18006e01f
mov rax, qword [rsp + 0x60]
mov byte [rcx + rax], 0xff
sub rcx, 4
jns 0x18006e012
mov edx, dword [rbx + 4]
cmp dword [rsp + 0x90], 0
jle 0x18006e09e
xor r10d, r10d
test edx, 0xfffffffe
jle 0x18006e09e
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
lea eax, [rcx*4]
shl edx, 2
shl r9d, 2
add rdx, rsi
add r9, rsi
test eax, eax
jle 0x18006e08f
sub r9, rdx
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 0x18006e070
mov edx, dword [rbx + 4]
inc r10d
mov eax, edx
sar eax, 1
cmp r10d, eax
jl 0x18006e040
mov eax, dword [rbx]
mov rcx, qword [rsp + 0xd8]
mov dword [rcx], eax
mov rcx, qword [rsp + 0xe0]
mov eax, dword [rbx + 4]
mov dword [rcx], eax
mov rcx, qword [rsp + 0xe8]
test rcx, rcx
je 0x18006e0c9
mov eax, dword [rbx + 8]
mov dword [rcx], eax
mov rax, rsi
jmp 0x18006e16e
mov rcx, rsi
call fcn.180215358
mov edx, dword [0x180342d00]
mov rax, qword gs:[0x58]
mov rax, qword [rax + rdx*8]
lea rdx, str.bad_masks
jmp 0x18006e163
mov edx, dword [0x180342d00]
mov rax, qword gs:[0x58]
mov rax, qword [rax + rdx*8]
lea rdx, str.outofmem
jmp 0x18006e163
mov edx, dword [0x180342d00]
mov rax, qword gs:[0x58]
mov rax, qword [rax + rdx*8]
lea rdx, str.too_large
jmp 0x18006e163
mov edx, dword [0x180342d00]
mov rax, qword gs:[0x58]
mov rax, qword [rax + rdx*8]
lea rdx, str.bad_offset
jmp 0x18006e163
mov edx, dword [0x180342d00]
mov rax, qword gs:[0x58]
mov rax, qword [rax + rdx*8]
lea rdx, str.bad_header
mov ecx, 0x28
mov qword [rcx + rax], rdx
xor eax, eax
mov r12, qword [rsp + 0x510]
mov rdi, qword [rsp + 0x518]
mov rsi, qword [rsp + 0x520]
mov rbp, qword [rsp + 0x528]
mov r13, qword [rsp + 0x508]
mov rcx, qword [rsp + 0x4f0]
xor rcx, rsp
call fcn.18020e120
add rsp, 0x530
pop r15
pop r14
pop rbx
ret