Function at 0x140022eb0
Capabilities:
Encode data using xor
Encrypt data using speck

Disassembly:
mov dword [rcx + 0x74], edx
sub edx, 1
je 0x14001e8e1
sub edx, 1
je 0x14001e8db
cmp edx, 1
je 0x14001e8d5
xor eax, eax
ret
mov eax, 3
ret
mov eax, 2
ret
mov eax, 1
ret
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
push rbx
push rbp
push rdi
push r14
push r15
sub rsp, 0x60
cmp dword [rcx + 0x74], 0
mov r10, r9
mov r14, r8
mov r15, rdx
mov rbp, rcx
mov edi, 1
jge 0x140022eef
xor eax, eax
add rsp, 0x60
pop r15
pop r14
pop rdi
pop rbp
pop rbx
ret
mov rcx, qword [r9]
mov rax, qword [rsp + 0xb0]
test rcx, rcx
je 0x140022f22
test rax, rax
je 0x140022f0a
cmp qword [rax], 0
jne 0x140022f22
mov edx, 0xffffffec
mov rcx, rbp
add rsp, 0x60
pop r15
pop r14
pop rdi
pop rbp
pop rbx
jmp 0x14001e8c0
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x50], r12
mov qword [rsp + 0x48], r13
xor r13d, r13d
test rcx, rcx
cmovne r13, rax
cmp dword [rbp + 0x48], 0
mov qword [rsp + 0x38], r13
jne 0x140022f52
mov rax, qword [rdx]
mov qword [rbp + 0x20], rax
mov rax, qword [r8]
jmp 0x140022f5b
mov edi, 2
lea rax, [rbp + 0x40]
mov qword [rbp + 0x18], rax
lea r11, [0x140000000]
mov esi, 0x40
jmp 0x140022f75
mov r13, qword [rsp + 0x38]
lea r12, [rbp + 0x2a8]
nop dword [rax]
cmp edi, 1
je 0x140023018
cmp edi, 2
jne 0x14002414b
cmp qword [rbp + 0x78], 0
je 0x140022fc6
mov r8, r13
mov dword [rsp + 0x20], 1
mov rdx, r10
mov rcx, rbp
call fcn.1400214d0
test eax, eax
js 0x1400240ec
mov r10, qword [rsp + 0xa8]
lea r11, [0x140000000]
mov ecx, dword [rbp + 0x48]
test ecx, ecx
je 0x140024112
cmp qword [rbp + 0x20], 0
jne 0x140022fef
mov dword [rbp + 0x48], 0
mov rax, qword [r15]
mov qword [rbp + 0x20], rax
mov rax, qword [r14]
mov qword [rbp + 0x18], rax
jmp 0x140023013
cmp qword [r15], 0
je 0x1400240ee
mov rax, qword [r14]
movzx eax, byte [rax]
mov byte [rcx + rbp + 0x40], al
inc dword [rbp + 0x48]
mov eax, dword [rbp + 0x48]
mov qword [rbp + 0x20], rax
inc qword [r14]
dec qword [r15]
mov edi, 1
movsxd rax, dword [rbp]
cmp eax, 0x1a
ja case.default.0x140023030
mov ecx, dword [r11 + rax*4 + 0x241bc]
add rcx, r11
jmp rcx
mov r8d, dword [rbp + 0x10]
cmp esi, r8d
jne 0x140023079
mov rdx, qword [rbp + 0x20]
test rdx, rdx
jne 0x14002304e
mov edi, 2
jmp case.default.0x140023030
mov rcx, qword [rbp + 0x18]
shr qword [rbp + 8], 8
movzx eax, byte [rcx]
shl rax, 0x38
or qword [rbp + 8], rax
lea eax, [r8 - 8]
mov dword [rbp + 0x10], eax
lea rax, [rdx - 1]
mov qword [rbp + 0x20], rax
lea rax, [rcx + 1]
mov qword [rbp + 0x18], rax
mov r9d, dword [rbp + 0x298]
mov eax, r9d
and eax, 0xffffffdf
mov dword [rbp + 0x298], eax
mov ecx, dword [rbp + 0x10]
mov rdx, qword [rbp + 8]
mov rax, rdx
shr rax, cl
lea r8d, [rcx + 1]
mov dword [rbp + 0x10], r8d
test al, 1
jne 0x1400230b1
mov dword [rbp + 0x29c], select
jmp 0x140023125
mov ecx, r8d
mov rax, rdx
shr rax, cl
lea ecx, [r8 + 3]
mov dword [rbp + 0x10], ecx
and eax, 7
je 0x1400230d1
add eax, 0x11
mov dword [rbp + 0x29c], eax
jmp 0x140023125
mov rax, rdx
shr rax, cl
add ecx, 3
and eax, 7
mov dword [rbp + 0x10], ecx
cmp eax, 1
jne 0x14002310c
test r9b, 0x20
je 0x1400230f9
shr rdx, cl
lea eax, [rcx + 1]
mov dword [rbp + 0x10], eax
test dl, 1
je 0x140023103
mov edi, 0xfffffff3
jmp case.default.0x140023030
or dword [rbp + 0x298], 0x20
jmp 0x140023125
test eax, eax
je 0x14002311b
add eax, 8
mov dword [rbp + 0x29c], eax
jmp 0x140023125
mov dword [rbp + 0x29c], select
test byte [rbp + 0x298], 0x20
mov edi, 1
je 0x14002313b
mov dword [rbp], edi
jmp case.default.0x140023030
mov dword [rbp], 2
jmp case.default.0x140023030
mov r8d, dword [rbp + 0x10]
mov eax, esi
sub eax, r8d
cmp eax, 6
jae 0x14002319e
mov rdx, qword [rbp + 0x20]
nop dword [rax]
test rdx, rdx
je 0x140023044
shr qword [rbp + 8], 8
mov rcx, qword [rbp + 0x18]
movzx eax, byte [rcx]
add dword [rbp + 0x10], 0xfffffff8
mov r8d, dword [rbp + 0x10]
shl rax, 0x38
or qword [rbp + 8], rax
lea rax, [rcx + 1]
mov qword [rbp + 0x18], rax
dec rdx
mov eax, esi
mov qword [rbp + 0x20], rdx
sub eax, r8d
cmp eax, 6
jb 0x140023160
mov rax, qword [rbp + 8]
mov ecx, r8d
shr rax, cl
and eax, 0x3f
mov dword [rbp + 0x29c], eax
add dword [rbp + 0x10], 6
mov eax, dword [rbp + 0x29c]
sub eax, 0xa
cmp eax, 0x14
ja 0x1400230f9
mov dword [rbp], 2
mov ecx, dword [rbp + 0x29c]
mov eax, 1
shl eax, cl
mov edx, 0x3030
mov rcx, qword [rbp + 0x38]
sub eax, 0x10
mov dword [rbp + 0x50], eax
call qword [rbp + 0x28]
mov qword [rbp + 0xf0], rax
test rax, rax
jne 0x140023210
mov r10, qword [rsp + 0xa8]
lea edi, [rax - 0x1e]
lea r11, [0x140000000]
jmp case.default.0x140023030
add rax, 0x1da0
mov qword [rbp + 0xf8], rax
xor eax, eax
mov dword [rbp + 0x108], eax
mov dword [rbp + 0x11c], 1
mov dword [rbp + 0x120], 1
mov dword [rbp + 0x124], 1
mov dword [rbp + 0x110], 0x1000000
mov dword [rbp + 0x114], 0x1000000
mov dword [rbp + 0x118], 0x1000000
mov qword [rbp + 0x128], 1
mov qword [rbp + 0x130], 1
mov qword [rbp + 0x138], 1
mov qword [r12], rax
mov qword [rbp + 0x2b0], rax
mov qword [rbp + 0x150], rax
mov qword [rbp + 0x98], rax
mov qword [rbp + 0x158], rax
mov qword [rbp + 0xa0], rax
mov byte [rbp + 0x160], al
mov qword [rbp + 0x90], rax
mov qword [rbp + 0xb0], rax
mov qword [rbp + 0xa8], rax
mov qword [rbp + 0xc8], rax
mov qword [rbp + 0xc0], rax
mov qword [rbp + 0xe0], rax
mov qword [rbp + 0xd8], rax
mov dword [rbp], 4
lea rdx, [rbp + 8]
mov rcx, rbp
call fcn.14001eb00
mov r10, qword [rsp + 0xa8]
mov edi, eax
lea r11, [0x140000000]
cmp eax, 1
jne case.default.0x140023030
test byte [rbp + 0x298], 6
lea r11, [0x140000000]
je 0x140023350
mov ecx, dword [rbp + 0x10]
mov r8d, ecx
neg r8d
and r8d, 7
je 0x140023350
mov rdx, qword [rbp + 8]
mov eax, dword [r11 + r8*4 + 0xce250]
shr rdx, cl
and eax, edx
lea eax, [rcx + r8]
mov dword [rbp + 0x10], eax
je 0x140023350
mov edi, 0xfffffff2
jmp case.default.0x140023030
test byte [rbp + 0x298], 4
je 0x14002336d
mov r10, qword [rsp + 0xa8]
mov dword [rbp], select
jmp case.default.0x140023030
cmp dword [rbp + 0x108], 0
jne 0x14002338a
mov r10, qword [rsp + 0xa8]
mov dword [rbp], select
jmp case.default.0x140023030
mov rcx, rbp
call fcn.140021880
test byte [rbp + 0x298], 2
je case.0x140023030.17
mov r10, qword [rsp + 0xa8]
mov dword [rbp], 0xb
jmp case.default.0x140023030
mov qword [rbp], reloc.WS2_32.dll_select
lea rax, [rbp + 0x3b8]
mov qword [rbp + 0x390], rax
mov qword [rbp + 0x2f0], 0
mov qword [rbp + 0x2e8], 0
movsxd rax, dword [rbp + 4]
cmp eax, 3
jl 0x1400233f8
mov r10, qword [rsp + 0xa8]
mov dword [rbp], 5
jmp case.default.0x140023030
lea r8, [rax*4 + 0x11c]
mov rcx, rbp
add r8, rbp
lea rdx, [rbp + 8]
call fcn.14001e8f0
mov r10, qword [rsp + 0xa8]
mov edi, eax
lea r11, [0x140000000]
cmp eax, 1
jne case.default.0x140023030
movsxd rax, dword [rbp + 4]
inc dword [rbp + rax*4 + 0x11c]
movsxd rcx, dword [rbp + 4]
cmp dword [rbp + rcx*4 + 0x11c], 2
jae 0x140023454
lea eax, [rcx + 1]
mov dword [rbp + 4], eax
lea r11, [0x140000000]
jmp case.default.0x140023030
mov dword [rbp], setsockopt
movsxd rdx, dword [rbp + 4]
xor r9d, r9d
imul eax, edx, 0x278
mov qword [rsp + 0x20], rbp
mov ecx, dword [rbp + rdx*4 + 0x11c]
add ecx, 2
movsxd rdx, eax
mov rax, qword [rbp + 0xf0]
lea r8, [rax + rdx*4]
mov edx, ecx
call fcn.14001f850
mov r10, qword [rsp + 0xa8]
mov edi, eax
lea r11, [0x140000000]
cmp eax, 1
jne case.default.0x140023030
mov dword [rbp], setsockopt
imul eax, dword [rbp + 4], 0x18c
mov edx, 0x1a
xor r9d, r9d
mov qword [rsp + 0x20], rbp
movsxd rcx, eax
mov rax, qword [rbp + 0xf8]
lea r8, [rax + rcx*4]
mov ecx, edx
call fcn.14001f850
mov r10, qword [rsp + 0xa8]
mov edi, eax
lea r11, [0x140000000]
cmp eax, 1
jne case.default.0x140023030
mov dword [rbp], reloc.WS2_32.dll_setsockopt
lea r11, [0x140000000]
movsxd rdx, dword [rbp + 4]
imul eax, edx, 0x18c
cmp dword [rbp + 0x294], 0
lea r14, [rdx*4]
movsxd rcx, eax
mov rax, qword [rbp + 0xf8]
lea r10, [rax + rcx*4]
jne 0x140023600
mov r8d, dword [rbp + 0x10]
mov eax, esi
sub eax, r8d
cmp eax, 0xf
jae 0x14002357e
mov rdx, qword [rbp + 0x20]
nop dword [rax]
test rdx, rdx
je 0x1400235da
shr qword [rbp + 8], 8
mov rcx, qword [rbp + 0x18]
movzx eax, byte [rcx]
add dword [rbp + 0x10], 0xfffffff8
mov r8d, dword [rbp + 0x10]
shl rax, 0x38
or qword [rbp + 8], rax
lea rax, [rcx + 1]
mov qword [rbp + 0x18], rax
dec rdx
mov eax, esi
mov qword [rbp + 0x20], rdx
sub eax, r8d
cmp eax, 0xf
jb 0x140023540
mov r9, qword [rbp + 8]
mov ecx, r8d
shr r9, cl
and r9d, 0x7fff
movzx ecx, r9b
movzx eax, byte [r10 + rcx*4]
lea r10, [r10 + rcx*4]
cmp al, 8
jbe 0x1400235ca
sub eax, 8
shr r9d, 8
add r8d, 8
mov dword [rbp + 0x10], r8d
mov edx, dword [r11 + rax*4 + 0xce250]
movzx eax, word [r10 + 2]
and edx, r9d
add edx, eax
movzx eax, byte [r10 + rdx*4]
lea r10, [r10 + rdx*4]
movzx eax, al
add eax, r8d
mov dword [rbp + 0x10], eax
movzx r10d, word [r10 + 2]
jmp 0x140023607
lea r8, [rsp + 0x90]
mov rcx, r10
lea rdx, [rbp + 8]
call fcn.14001f120
test eax, eax
je 0x1400236ed
mov r10d, dword [rsp + 0x90]
jmp 0x14002360f
mov r10d, dword [rbp + 0x10c]
mov dword [rsp + 0x90], r10d
mov r8d, dword [rbp + 0x10]
lea rcx, [0x140000000]
mov eax, r10d
movzx r9d, byte [rcx + rax*4 + 0x11b262]
movzx r11d, word [rcx + rax*4 + 0x11b260]
mov eax, esi
sub eax, r8d
cmp eax, r9d
jae 0x14002367e
mov rdx, qword [rbp + 0x20]
nop dword [rax]
test rdx, rdx
je 0x1400236dc
shr qword [rbp + 8], 8
mov rcx, qword [rbp + 0x18]
movzx eax, byte [rcx]
add dword [rbp + 0x10], 0xfffffff8
mov r8d, dword [rbp + 0x10]
shl rax, 0x38
or qword [rbp + 8], rax
lea rax, [rcx + 1]
mov qword [rbp + 0x18], rax
dec rdx
mov eax, esi
mov qword [rbp + 0x20], rdx
sub eax, r8d
cmp eax, r9d
jb 0x140023640
mov rax, qword [rbp + 8]
mov ecx, r8d
mov r10, qword [rsp + 0xa8]
shr rax, cl
lea rcx, [0x140000000]
mov ecx, dword [rcx + r9*4 + 0xce250]
and ecx, eax
lea eax, [r9 + r8]
mov dword [rbp + 0x10], eax
lea eax, [rcx + r11]
mov dword [r14 + rbp + 0x110], eax
lea r11, [0x140000000]
inc dword [rbp + 4]
mov r14, qword [rsp + 0xa0]
mov dword [rbp + 0x294], 0
mov dword [rbp], reloc.WS2_32.dll_select
jmp case.default.0x140023030
mov dword [rbp + 0x10c], r10d
mov dword [rbp + 0x294], 1
mov r14, qword [rsp + 0xa0]
lea r11, [0x140000000]
mov r10, qword [rsp + 0xa8]
mov edi, 2
jmp case.default.0x140023030
mov r9, rbp
mov rdx, r13
mov rcx, r10
call fcn.140021700
mov r10, qword [rsp + 0xa8]
mov edi, eax
lea r11, [0x140000000]
cmp eax, 1
jne case.default.0x140023030
mov dword [rbp], select
lea r11, [0x140000000]
jmp case.default.0x140023030
cmp dword [rbp + 0x108], 0
jle 0x1400237b8
mov r8d, dword [rbp + 0x10]
mov eax, esi
sub eax, r8d
cmp eax, 8
jae 0x1400237a2
mov rdx, qword [rbp + 0x20]
test rdx, rdx
je 0x140023044
shr qword [rbp + 8], 8
mov rcx, qword [rbp + 0x18]
movzx eax, byte [rcx]
add dword [rbp + 0x10], 0xfffffff8
mov r8d, dword [rbp + 0x10]
shl rax, 0x38
or qword [rbp + 8], rax
lea rax, [rcx + 1]
mov qword [rbp + 0x18], rax
dec rdx
mov eax, esi
mov qword [rbp + 0x20], rdx
sub eax, r8d
cmp eax, 8
jb 0x140023764
lea eax, [r8 + 8]
mov dword [rbp + 0x10], eax
dec dword [rbp + 0x108]
cmp dword [rbp + 0x108], 0
jg 0x140023752
mov dword [rbp], select
jmp case.default.0x140023030
mov r8d, dword [rbp + 0x10]
mov eax, esi
sub eax, r8d
cmp eax, 6
jae 0x140023814
mov rdx, qword [rbp + 0x20]
test rdx, rdx
je 0x140023044
shr qword [rbp + 8], 8
mov rcx, qword [rbp + 0x18]
movzx eax, byte [rcx]
add dword [rbp + 0x10], 0xfffffff8
mov r8d, dword [rbp + 0x10]
shl rax, 0x38
or qword [rbp + 8], rax
lea rax, [rcx + 1]
mov qword [rbp + 0x18], rax
dec rdx
mov eax, esi
mov qword [rbp + 0x20], rdx
sub eax, r8d
cmp eax, 6
jb 0x1400237d6
mov rdx, qword [rbp + 8]
lea eax, [r8 + 6]
mov dword [rbp + 0x10], eax
mov ecx, r8d
shr rdx, cl
and edx, 0x3f
mov ecx, edx
shr edx, 2
and ecx, 3
shl edx, cl
mov dword [rbp + 0x140], ecx
mov rcx, qword [rbp + 0x38]
mov dword [rbp + 0x144], edx
mov edx, dword [rbp + 0x11c]
call qword [rbp + 0x28]
mov qword [rbp + 0x2b0], rax
lea r11, [0x140000000]
test rax, rax
jne 0x14002386e
mov r10, qword [rsp + 0xa8]
lea edi, [rax - 0x15]
jmp case.default.0x140023030
mov qword [rbp], 6
movsxd r9, dword [rbp + 4]
cmp r9d, dword [rbp + 0x11c]
jge 0x14002390e
mov r10, r9
nop word [rax + rax]
mov r8d, dword [rbp + 0x10]
mov eax, esi
sub eax, r8d
cmp eax, 2
jae 0x1400238e0
mov rdx, qword [rbp + 0x20]
test rdx, rdx
je 0x140023a5d
shr qword [rbp + 8], 8
mov rcx, qword [rbp + 0x18]
movzx eax, byte [rcx]
add dword [rbp + 0x10], 0xfffffff8
mov r8d, dword [rbp + 0x10]
shl rax, 0x38
or qword [rbp + 8], rax
lea rax, [rcx + 1]
mov qword [rbp + 0x18], rax
dec rdx
mov eax, esi
mov qword [rbp + 0x20], rdx
sub eax, r8d
cmp eax, 2
jb 0x1400238a2
mov rdx, qword [rbp + 8]
lea eax, [r8 + 2]
mov dword [rbp + 0x10], eax
mov ecx, r8d
mov rax, qword [rbp + 0x2b0]
inc r9d
shr rdx, cl
and dl, 3
mov byte [r10 + rax], dl
inc r10
cmp r9d, dword [rbp + 0x11c]
jl 0x140023890
mov dword [rbp], 0x16
mov ecx, dword [rbp + 0x11c]
lea rdx, [rbp + 0x2a4]
shl ecx, 6
mov r9, rbp
mov r8, r12
call fcn.14001fea0
mov r10, qword [rsp + 0xa8]
mov edi, eax
lea r11, [0x140000000]
cmp eax, 1
jne case.default.0x140023030
xorps xmm0, xmm0
xor esi, esi
movups xmmword [rbp + 0x2c8], xmm0
movups xmmword [rbp + 0x2d8], xmm0
cmp dword [rbp + 0x11c], esi
jbe 0x140023a10
nop dword [rax]
mov r14, qword [r12]
mov rdi, rsi
shl rdi, 6
xor r11d, r11d
xor r10d, r10d
movzx r9d, byte [rdi + r14]
nop word [rax + rax]
lea rdx, [r14 + r10]
add r10, 4
add rdx, rdi
movzx r8d, byte [rdx + 3]
movzx ecx, byte [rdx + 2]
xor r8, r9
movzx eax, byte [rdx]
xor rcx, r9
or r8, rcx
movzx ecx, byte [rdx + 1]
xor rcx, r9
or r8, rcx
mov rcx, r9
xor rcx, rax
or r8, rcx
or r11, r8
cmp r10, 0x40
jb 0x140023990
test r11, r11
jne 0x1400239f6
mov rax, rsi
mov ecx, esi
shr rax, 5
and ecx, 0x1f
lea rdx, [rax*4]
mov eax, dword [rdx + rbp + 0x2c8]
bts eax, ecx
mov dword [rdx + rbp + 0x2c8], eax
mov eax, dword [rbp + 0x11c]
inc rsi
cmp rsi, rax
jb 0x140023970
mov r14, qword [rsp + 0xa0]
mov dword [rbp], 0x17
mov esi, 0x40
mov r10d, dword [rbp + 0x140]
mov eax, 0x18
mov r8d, dword [rbp + 0x144]
lea ecx, [r10 + 1]
shl eax, cl
lea r12d, [r8 + 0x10]
add r12d, eax
test byte [rbp + 0x298], 0x20
mov r13d, r12d
je 0x140023ada
cmp r8d, 0x7ffffffc
jb 0x140023a73
mov r13d, 0x8000000c
jmp 0x140023ac8
mov r10, qword [rsp + 0xa8]
mov edi, 2
mov dword [rbp + 4], r9d
jmp case.default.0x140023030
mov ecx, r10d
mov edx, 0x7ffffffc
sub edx, r8d
mov r9d, 1
shr edx, cl
xor eax, eax
shl r9d, cl
add edx, 4
mov ecx, edx
dec r9d
shr ecx, 1
je 0x140023a9d
inc eax
shr ecx, 1
jne 0x140023a97
lea ecx, [rax - 1]
shr edx, cl
lea eax, [rax*2 - 4]
and edx, 1
or edx, eax
jne 0x140023ab6
lea r13d, [r8 + 0x10]
jmp 0x140023ac8
lea eax, [rdx - 1]
mov ecx, r10d
shl eax, cl
lea r13d, [r8 + 0x11]
or eax, r9d
add r13d, eax
lea ecx, [r10 + 1]
mov eax, 0x3e
shl eax, cl
lea r12d, [r8 + 0x10]
add r12d, eax
mov ecx, dword [rbp + 0x124]
lea rdx, [rbp + 0x148]
shl ecx, 2
lea r8, [rbp + 0x150]
mov r9, rbp
call fcn.14001fea0
mov r10, qword [rsp + 0xa8]
mov edi, eax
lea r11, [0x140000000]
cmp eax, 1
jne 0x140022f70
mov edi, dword [rbp + 0x2a4]
mov rcx, qword [rbp + 0x38]
imul rdx, rdi, 0x9e8
call qword [rbp + 0x28]
mov dword [rbp + 0xb8], 0x1000100
mov r15, rax
mov word [rbp + 0xbc], di
mov qword [rbp + 0xa8], rax
lea rcx, [rax + rdi*8]
mov qword [rbp + 0xb0], rcx
mov edi, dword [rbp + 0x120]
mov rcx, qword [rbp + 0x38]
imul rdx, rdi, 0x10e8
call qword [rbp + 0x28]
mov dword [rbp + 0xd0], 0x2c002c0
lea edx, [r13 + 0x178]
mov word [rbp + 0xd4], di
add rdx, 2
mov qword [rbp + 0xc0], rax
mov r14, rax
lea rcx, [rax + rdi*8]
mov qword [rbp + 0xc8], rcx
mov edi, dword [rbp + 0x148]
mov rcx, qword [rbp + 0x38]
imul rdx, rdi
shl rdx, 2
call qword [rbp + 0x28]
mov qword [rbp + 0xd8], rax
mov word [rbp + 0xe8], r12w
mov word [rbp + 0xea], r13w
lea rcx, [rax + rdi*8]
mov word [rbp + 0xec], di
mov qword [rbp + 0xe0], rcx
xor ecx, ecx
test rax, rax
setne cl
xor eax, eax
test r14, r14
setne al
and ecx, eax
xor eax, eax
test r15, r15
cmovne eax, ecx
test eax, eax
je 0x1400241a7
mov r14, qword [rsp + 0xa0]
mov r15, qword [rsp + 0x98]
mov qword [rbp], 0x18
mov ecx, dword [rbp + 4]
test ecx, ecx
je 0x140023c2d
sub ecx, 1
je 0x140023c26
cmp ecx, 1
jne 0x1400241b1
mov esi, 0xd8
jmp 0x140023c32
mov esi, 0xc0
jmp 0x140023c32
mov esi, 0xa8
cmp dword [rbp + 0x2e8], 1
je 0x140023c5f
mov rax, qword [rsi + rbp + 8]
xor ecx, ecx
mov qword [rbp + 0x9f0], rax
mov dword [rbp + 0x9ec], 0
mov dword [rbp + 0x2e8], 1
jmp 0x140023c65
mov ecx, dword [rbp + 0x9ec]
movzx eax, word [rsi + rbp + 0x14]
cmp ecx, eax
jge 0x140023ce9
mov r8, qword [rbp + 0x9f0]
nop word [rax + rax]
movzx edx, word [rsi + rbp + 0x12]
lea r9, [rsp + 0xb8]
movzx ecx, word [rsi + rbp + 0x10]
mov qword [rsp + 0x20], rbp
call fcn.14001f850
mov edi, eax
cmp eax, 1
jne 0x140023de9
mov rcx, qword [rsi + rbp]
mov rax, qword [rbp + 0x9f0]
movsxd rdx, dword [rbp + 0x9ec]
mov qword [rcx + rdx*8], rax
inc dword [rbp + 0x9ec]
mov eax, dword [rsp + 0xb8]
shl rax, 2
add qword [rbp + 0x9f0], rax
movzx eax, word [rsi + rbp + 0x14]
mov r8, qword [rbp + 0x9f0]
cmp dword [rbp + 0x9ec], eax
jl 0x140023c80
mov r13, qword [rsp + 0x38]
lea r12, [rbp + 0x2a8]
mov r10, qword [rsp + 0xa8]
lea r11, [0x140000000]
mov dword [rbp + 0x2e8], 0
mov edi, 1
inc dword [rbp + 4]
cmp dword [rbp + 4], 3
lea esi, [rdi + 0x3f]
jl case.default.0x140023030
mov dword [rbp], 0x19
lea r12, [rbp + 0x2a8]
mov ecx, dword [rbp + 0x12c]
mov r8d, ecx
mov eax, ecx
mov r9d, ecx
shr rax, 5
and ecx, 0x1f
shl r8d, 6
add r8, qword [r12]
mov qword [rbp + 0x98], r8
mov edx, dword [rbp + rax*4 + 0x2c8]
mov rax, qword [rbp + 0xa8]
shr rdx, cl
and edx, 1
mov dword [rbp + 0x100], edx
movzx ecx, byte [r8]
mov rcx, qword [rax + rcx*8]
mov rax, qword [rbp + 0x2b0]
mov qword [rbp + 0x158], rcx
movzx ecx, byte [rax + r9]
lea rax, [0x14011b2d0]
and ecx, 3
shl rcx, 9
add rcx, rax
mov rax, qword [rbp + 0x150]
mov qword [rbp + 0xa0], rax
mov rax, qword [rbp + 0xc0]
mov qword [rbp + 0x90], rcx
mov rcx, qword [rax]
mov qword [rbp + 0x88], rcx
mov rcx, rbp
call fcn.140021650
test eax, eax
jne 0x140023e0e
mov r13, qword [rsp + 0x38]
lea edi, [rax - 0x1b]
mov r10, qword [rsp + 0xa8]
lea r11, [0x140000000]
jmp case.default.0x140023030
mov r13, qword [rsp + 0x38]
lea r12, [rbp + 0x2a8]
mov r10, qword [rsp + 0xa8]
lea r11, [0x140000000]
mov esi, 0x40
jmp case.default.0x140023030
mov r15d, dword [rbp + 0x140]
xor edi, edi
mov esi, dword [rbp + 0x144]
mov ecx, r15d
movzx r14d, word [rbp + 0xea]
mov r11d, 1
shl r11d, cl
xor ecx, ecx
lea r9d, [rdi + 1]
lea r8d, [rdi + 0x10]
test esi, esi
je 0x140023e5b
nop
mov eax, r8d
inc ecx
inc r8d
mov byte [rax + rbp + 0x2e8], dil
mov dword [rbp + rax*4 + 0x508], ecx
cmp ecx, esi
jb 0x140023e40
cmp r8d, r14d
jae 0x140023eab
mov ecx, r9d
lea eax, [rdi + 2]
shl eax, cl
lea r10d, [rsi + 1]
sub eax, 4
mov ecx, r15d
shl eax, cl
xor edx, edx
add r10d, eax
test r11d, r11d
je 0x140023ea0
nop
mov ecx, r8d
lea eax, [r10 + rdx]
inc r8d
inc edx
mov byte [rcx + rbp + 0x2e8], r9b
mov dword [rbp + rcx*4 + 0x508], eax
cmp edx, r11d
jb 0x140023e80
add r9d, edi
xor edi, 1
cmp r8d, r14d
jb 0x140023e60
mov r14, qword [rsp + 0xa0]
mov eax, 7
mov r15, qword [rsp + 0x98]
mov dword [rbp], eax
lea esi, [rax + 0x39]
mov rcx, rbp
call fcn.140021900
mov r13, qword [rsp + 0x38]
mov edi, eax
mov r10, qword [rsp + 0xa8]
lea r11, [0x140000000]
cmp eax, 2
jne case.default.0x140023030
mov rcx, rbp
call fcn.140022300
mov r10, qword [rsp + 0xa8]
lea r11, [0x140000000]
mov edi, eax
jmp case.default.0x140023030
mov r8, r13
mov dword [rsp + 0x20], 0
mov rdx, r10
mov rcx, rbp
call fcn.1400214d0
mov r10, qword [rsp + 0xa8]
mov edi, eax
lea r11, [0x140000000]
cmp eax, 1
jne case.default.0x140023030
mov rcx, rbp
call fcn.140021610
mov ecx, dword [rbp + 0x29c]
mov eax, 1
shl eax, cl
cmp dword [rbp + 0x58], eax
jne 0x140023f5b
mov eax, dword [rbp + 0x50]
mov dword [rbp + 0x54], eax
mov eax, dword [rbp]
cmp eax, 0xf
jne 0x140023f8e
mov ecx, 7
cmp dword [rbp + 0x108], 0
lea r11, [0x140000000]
mov r10, qword [rsp + 0xa8]
mov eax, select
cmovne eax, ecx
mov dword [rbp], eax
jmp case.default.0x140023030
cmp eax, 0x10
jne 0x140023faf
mov r10, qword [rsp + 0xa8]
lea r11, [0x140000000]
mov eax, 0xa
mov dword [rbp], eax
jmp case.default.0x140023030
cmp dword [rbp + 4], 0
jne 0x140023fbc
mov ecx, 9
jmp 0x140023f68
mov r10, qword [rsp + 0xa8]
lea r11, [0x140000000]
mov eax, 8
mov dword [rbp], eax
jmp case.default.0x140023030
cmp dword [rbp + 0x108], 0
jge 0x140023feb
mov edi, 0xfffffff6
jmp case.default.0x140023030
mov rcx, rbp
call fcn.140024350
test byte [rbp + 0x298], 1
jne 0x140024017
mov r10, qword [rsp + 0xa8]
lea r11, [0x140000000]
mov dword [rbp], 3
jmp case.default.0x140023030
mov r8d, dword [rbp + 0x10]
mov r9d, r8d
neg r9d
and r9d, 7
je 0x14002405e
mov rdx, qword [rbp + 8]
lea r11, [0x140000000]
mov eax, dword [r11 + r9*4 + 0xce250]
mov ecx, r8d
shr rdx, cl
lea r8d, [r9 + r8]
mov dword [rbp + 0x10], r8d
and eax, edx
je 0x14002405e
mov r10, qword [rsp + 0xa8]
mov edi, 0xfffffff1
jmp case.default.0x140023030
cmp dword [rbp + 0x48], 0
jne 0x1400240a8
mov r9, qword [rbp + 0x20]
mov eax, esi
sub eax, r8d
shr eax, 3
mov ecx, eax
sub qword [rbp + 0x18], rcx
add r9, rcx
mov qword [rbp + 0x20], r9
lea edx, [rax*8]
cmp edx, 0x40
jne 0x140024091
xor eax, eax
mov qword [rbp + 8], rax
jmp 0x140024097
mov ecx, edx
shl qword [rbp + 8], cl
lea eax, [rdx + r8]
mov dword [rbp + 0x10], eax
mov qword [r15], r9
mov rax, qword [rbp + 0x18]
mov qword [r14], rax
mov dword [rbp], 0x1a
cmp qword [rbp + 0x78], 0
je 0x1400240ee
mov rdx, qword [rsp + 0xa8]
mov r8, r13
mov rcx, rbp
mov dword [rsp + 0x20], 1
call fcn.1400214d0
mov edi, eax
cmp eax, 1
je 0x1400240ee
mov r10, qword [rsp + 0xa8]
lea r11, [0x140000000]
jmp case.default.0x140023030
mov edi, eax
mov edx, edi
mov rcx, rbp
mov r12, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
mov r13, qword [rsp + 0x48]
add rsp, 0x60
pop r15
pop r14
pop rdi
pop rbp
pop rbx
jmp 0x14001e8c0
mov rax, qword [rbp + 0x18]
mov qword [r14], rax
mov rax, qword [rbp + 0x20]
mov qword [r15], rax
test rax, rax
je 0x1400240ee
nop word [rax + rax]
mov rax, qword [r14]
mov ecx, dword [rbp + 0x48]
movzx eax, byte [rax]
mov byte [rcx + rbp + 0x40], al
inc dword [rbp + 0x48]
inc qword [r14]
sub qword [r15], 1
jne 0x140024130
jmp 0x1400240ee
cmp dword [rbp + 0x48], 0
je 0x14002415a
mov dword [rbp + 0x48], 0
jmp 0x1400240ee
mov r9, qword [rbp + 0x20]
mov r8d, dword [rbp + 0x10]
sub esi, r8d
shr esi, 3
mov ecx, esi
sub qword [rbp + 0x18], rcx
add r9, rcx
mov qword [rbp + 0x20], r9
lea edx, [rsi*8]
cmp edx, 0x40
jne 0x14002418b
mov qword [rbp + 8], 0
jmp 0x140024191
mov ecx, edx
shl qword [rbp + 8], cl
lea eax, [r8 + rdx]
mov dword [rbp + 0x10], eax
mov qword [r15], r9
mov rax, qword [rbp + 0x18]
mov qword [r14], rax
jmp 0x1400240ee
mov edx, 0xffffffea
jmp 0x1400240f0
mov edx, 0xffffffe1
jmp 0x1400240f0