Function at 0x18004f890
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
mov qword [rax + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xe0
mov r9, qword [0x18020a760]
xor edi, edi
mov r10, qword [0x18020a758]
mov esi, edi
movzx r11d, byte [0x18020a750]
mov r12d, edi
mov qword [rax + 0x18], r14
movaps xmmword [rax - 0x38], xmm6
nop
test r11b, r11b
je 0x18004f8e0
test r10, r10
je 0x18004f8eb
mov eax, dword [r10 + 0x14]
jmp 0x18004f8ed
test r9, r9
je 0x18004f8eb
mov eax, dword [r9 + 0xc]
jmp 0x18004f8ed
mov eax, edi
cmp esi, eax
jge 0x180050172
test r11b, r11b
je 0x18004f93c
test r10, r10
je 0x18004f9b3
test esi, esi
js 0x18004f954
cmp esi, dword [r10 + 0x14]
jg 0x18004f954
movzx ecx, si
mov eax, esi
test esi, esi
jns 0x18004f922
lea eax, [rsi + 0xffff]
sub ecx, 0x10000
mov rdx, qword [r10]
sar eax, 0x10
movsxd r8, eax
movsxd rax, ecx
lea rcx, [rax + rax*2]
mov rax, qword [rdx + r8*8]
mov r14, qword [rax + rcx*8]
jmp 0x18004f957
test r9, r9
je 0x18004f9b3
test esi, esi
js 0x18004f954
cmp esi, dword [r9 + 0xc]
jg 0x18004f954
mov rax, qword [r9]
mov r14, qword [r12 + rax]
jmp 0x18004f957
mov r14, rdi
test r14, r14
je 0x18004f9b3
call fcn.180029ad0
mov rbx, qword [r14 + 0x10]
mov r15, rax
test rbx, rbx
je 0x18004f99d
nop dword [rax]
cmp rbx, r15
je 0x18004f992
mov rcx, rbx
call fcn.18004c7a0
test al, al
je 0x18004f99d
mov eax, dword [0x18020a74c]
mov rbx, qword [rax + rbx]
test rbx, rbx
jne 0x18004f970
jmp 0x18004f99d
mov eax, dword [r14 + 8]
shr eax, 4
test al, 1
je 0x18004f9be
mov r9, qword [0x18020a760]
mov r10, qword [0x18020a758]
movzx r11d, byte [0x18020a750]
inc esi
add r12, 0x18
jmp 0x18004f8d0
mov r12, qword [r14]
test r12, r12
je 0x180050172
mov eax, dword [0x1800e86f8]
xorps xmm0, xmm0
movups xmm1, xmmword [0x1800e86e8]
mov ebx, dword [0x18010b088]
mov r14, 0xffffffffffffffff
mov dword [rbp - 0x29], eax
mov r8d, edi
movzx eax, word [0x1800e86fc]
mov qword [rsp + 0x118], r13
movaps xmmword [rsp + 0xc0], xmm7
mov qword [rbp + 0x67], r14
mov qword [rbp + 0xf], rdi
mov word [rbp - 0x25], ax
movdqu xmmword [rbp - 1], xmm0
movups xmm0, xmmword [str.rWZ_oSKMQM4]
movups xmmword [rbp - 0x39], xmm1
movups xmmword [rbp - 0x49], xmm0
cmp ebx, 2
jl 0x18004fb42
movdqa xmm5, xmmword [0x1800f9b20]
lea rcx, [rbp - 0x49]
movdqa xmm4, xmmword [0x1800f9d80]
movdqa xmm6, xmmword [0x1800f9b90]
movdqa xmm7, xmmword [0x1800f9c90]
movd xmm2, r8d
lea eax, [r8 + 4]
pshufd xmm2, xmm2, 0
lea rcx, [rcx + 0x10]
paddd xmm2, xmm5
add r8d, 8
movdqa xmm1, xmm2
movdqa xmm0, xmm2
punpckhdq xmm0, xmm2
punpckldq xmm1, xmm2
pmuldq xmm0, xmm4
pmuldq xmm1, xmm4
shufps xmm1, xmm0, 0xdd
psrad xmm1, 4
movdqa xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmm6
psubd xmm2, xmm0
pshuflw xmm0, xmm2, 0xd8
movq xmm2, xmm7
pshufhw xmm1, xmm0, 0xd8
movq xmm0, qword [rcx - 0x10]
pshufd xmm3, xmm1, 0xd8
paddw xmm3, xmm2
movd xmm2, eax
pshufd xmm2, xmm2, 0
xorps xmm3, xmm0
movq qword [rcx - 0x10], xmm3
paddd xmm2, xmm5
movdqa xmm1, xmm2
movdqa xmm0, xmm2
punpckhdq xmm0, xmm2
pmuldq xmm0, xmm4
punpckldq xmm1, xmm2
pmuldq xmm1, xmm4
shufps xmm1, xmm0, 0xdd
psrad xmm1, 4
movdqa xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmm6
psubd xmm2, xmm0
pshuflw xmm0, xmm2, 0xd8
movq xmm2, xmm7
pshufhw xmm1, xmm0, 0xd8
movq xmm0, qword [rcx - 8]
pshufd xmm3, xmm1, 0xd8
paddw xmm3, xmm2
xorps xmm3, xmm0
movq qword [rcx - 8], xmm3
cmp r8d, 0x10
jl 0x18004fa51
cmp r8d, 0x13
jge 0x18004fb86
movsxd rax, r8d
lea r9, [rbp - 0x49]
lea r9, [r9 + rax*2]
nop dword [rax]
mov eax, 0x4d4873ed
lea r9, [r9 + 2]
imul r8d
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 1
sub ax, dx
movzx eax, ax
imul ecx, eax, 0x35
add cx, r8w
inc r8d
xor word [r9 - 2], cx
cmp r8d, 0x13
jl 0x18004fb50
mov r10, qword [0x18020a7f8]
mov qword [rbp - 0x69], rdi
test r10, r10
je 0x18004fbd4
mov rax, qword [0x18020a800]
test rax, rax
jne 0x18004fbc0
mov rax, qword gs:[0x60]
mov rcx, qword [rax + 0x10]
mov rax, qword [0x18020a7f8]
add rax, rcx
mov qword [0x18020a800], rax
mov r8b, 1
lea rdx, [rbp - 0x49]
lea rcx, [rbp - 0x69]
call rax
mov r10, qword [0x18020a7f8]
movzx eax, word [0x1800e9100]
mov r8d, edi
movsd xmm0, qword [0x1800e90f8]
mov word [rbp - 0x71], ax
movsd qword [rbp - 0x79], xmm0
movups xmm7, xmmword [str.rWZ_pTHHP_A]
movups xmmword [rsp + 0x20], xmm7
cmp ebx, 2
jl 0x18004fcee
movdqa xmm2, xmmword [0x1800f9b20]
mov r8d, 8
movdqa xmm4, xmmword [0x1800f9d80]
movdqa xmm1, xmm2
movdqa xmm6, xmmword [0x1800f9c90]
movdqa xmm0, xmm2
punpckhdq xmm0, xmm2
punpckldq xmm1, xmm2
pmuldq xmm0, xmm4
pmuldq xmm1, xmm4
shufps xmm1, xmm0, 0xdd
psrad xmm1, 4
movdqa xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmmword [0x1800f9b90]
psubd xmm2, xmm0
pshuflw xmm0, xmm2, 0xd8
movq xmm2, xmm6
pshufhw xmm1, xmm0, 0xd8
pshufd xmm3, xmm1, 0xd8
movq xmm1, xmm7
paddw xmm3, xmm2
movdqa xmm2, xmmword [0x1800f9b40]
xorps xmm3, xmm1
movdqa xmm0, xmm2
punpckhdq xmm0, xmm2
movdqa xmm1, xmm2
pmuldq xmm0, xmm4
punpckldq xmm1, xmm2
pmuldq xmm1, xmm4
movq qword [rsp + 0x20], xmm3
shufps xmm1, xmm0, 0xdd
psrad xmm1, 4
movdqa xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmmword [0x1800f9b90]
psubd xmm2, xmm0
pshuflw xmm0, xmm2, 0xd8
movq xmm2, xmm6
pshufhw xmm1, xmm0, 0xd8
movq xmm0, qword [rsp + 0x28]
pshufd xmm3, xmm1, 0xd8
paddw xmm3, xmm2
xorps xmm3, xmm0
movq qword [rsp + 0x28], xmm3
movaps xmm7, xmmword [rsp + 0xc0]
lea r9, [rsp + 0x20]
movsxd rax, r8d
lea r9, [r9 + rax*2]
nop dword [rax]
nop word [rax + rax]
mov eax, 0x4d4873ed
lea r9, [r9 + 2]
imul r8d
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 1
sub ax, dx
movzx eax, ax
imul ecx, eax, 0x35
add cx, r8w
inc r8d
xor word [r9 - 2], cx
cmp r8d, 0xd
jl 0x18004fd10
mov qword [rbp - 0x61], rdi
test r10, r10
je 0x18004fd87
mov rax, qword [0x18020a800]
test rax, rax
jne 0x18004fd79
mov rax, qword gs:[0x60]
mov rcx, qword [rax + 0x10]
mov rax, qword [0x18020a7f8]
add rax, rcx
mov qword [0x18020a800], rax
mov r8b, 1
lea rdx, [rsp + 0x20]
lea rcx, [rbp - 0x61]
call rax
lea rax, [rbp + 0x67]
mov qword [rbp - 0x51], rdi
mov ecx, 0x20
mov qword [rbp - 0x59], rax
call fcn.1800b31c4
mov r8d, 0x20
mov qword [rbp - 0x19], rax
lea rdx, [rbp - 0x69]
mov rcx, rax
lea rbx, [rax + 0x20]
mov qword [rbp - 9], rbx
call fcn.1800daaf0
lea rdx, [rbp - 0x19]
mov qword [rbp - 0x11], rbx
lea rcx, [rbp - 1]
call fcn.180030640
mov r13d, dword [rbp + 0x67]
mov r15d, edi
add r13d, 8
nop word [rax + rax]
mov rdx, qword [r12]
test rdx, rdx
je 0x18004fee2
mov rax, qword gs:[0x60]
mov r8, qword [rax + 0x10]
cmp rdx, r8
jbe 0x18004fee2
movsxd rax, dword [r8 + 0x3c]
mov ecx, dword [rax + r8 + 0x50]
add rcx, r8
cmp rdx, rcx
jae 0x18004fee2
cmp byte [rdx], 0xe9
jne 0x18004fe4b
mov rax, qword gs:[0x60]
movsxd rbx, dword [rdx + 1]
add rbx, 5
add rbx, rdx
mov r8, qword [rax + 0x10]
cmp rbx, r8
jbe 0x18004fe4b
movsxd rax, dword [r8 + 0x3c]
mov ecx, dword [rax + r8 + 0x50]
add rcx, r8
cmp rbx, rcx
jb 0x18004fe4e
mov rbx, rdx
xorps xmm0, xmm0
mov dword [rsp + 0x20], 0x80
mov ecx, 0x1c
mov dword [rsp + 0x24], 0xb9
movdqu xmmword [rbp - 0x7d], xmm0
mov dword [rsp + 0x28], r13d
call fcn.1800b31c4
mov r8d, 0x1c
lea rdx, [rsp + 0x20]
mov rcx, rax
mov rsi, rax
call fcn.1800daaf0
mov r9d, edi
mov r10, rdi
mov eax, edi
mov rcx, rdi
nop word [rax + rax]
mov r8d, dword [rsi + rcx*4]
lea ecx, [rax + r9]
movzx ecx, byte [rcx + rbx]
cmp ecx, r8d
je 0x18004feba
cmp r8d, r14d
jne 0x18005014b
inc eax
mov ecx, eax
cmp rcx, 7
jb 0x18004fea0
add rbx, r10
test rsi, rsi
je 0x18004fed9
mov edx, 0x1c
mov rcx, rsi
call fcn.1800b31bc
test rbx, rbx
jne 0x180050163
inc r15d
add r12, 8
cmp r15d, 0x150
jl 0x18004fde0
cmp qword [0x18020ab18], rdi
jne 0x1800500eb
cmp dword [0x18010b088], 2
mov r8d, edi
movups xmm0, xmmword [0x1800ea530]
movzx eax, byte [0x1800ea558]
movups xmm1, xmmword [0x1800ea540]
mov byte [rbp - 0x21], al
movups xmmword [rbp - 0x49], xmm0
movsd xmm0, qword [0x1800ea550]
movsd qword [rbp - 0x29], xmm0
movups xmmword [rbp - 0x39], xmm1
jl 0x180050077
movdqa xmm0, xmmword [0x1800f9ce0]
lea rcx, [rbp - 0x45]
movdqa xmm5, xmmword [0x1800f9b20]
movdqa xmm4, xmmword [0x1800f9d80]
movdqa xmm6, xmmword [0x1800f9b90]
movdqa xmmword [rsp + 0x20], xmm0
mov edx, dword [rsp + 0x20]
nop
movd xmm2, r8d
lea eax, [r8 + 4]
pshufd xmm2, xmm2, 0
lea rcx, [rcx + 8]
paddd xmm2, xmm5
movd xmm3, eax
movdqa xmm1, xmm2
pshufd xmm3, xmm3, 0
punpckldq xmm1, xmm2
movdqa xmm0, xmm2
punpckhdq xmm0, xmm2
paddd xmm3, xmm5
pmuldq xmm0, xmm4
add r8d, 8
pmuldq xmm1, xmm4
shufps xmm1, xmm0, 0xdd
psrad xmm1, 4
movdqa xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmm6
psubd xmm2, xmm0
pshuflw xmm0, xmm2, 0xd8
pshufhw xmm1, xmm0, 0xd8
pshufd xmm2, xmm1, 0xd8
movdqa xmm1, xmm3
andps xmm2, xmmword [0x1800f9ca0]
packuswb xmm2, xmm2
punpckldq xmm1, xmm3
pmuldq xmm1, xmm4
movd xmm0, edx
paddb xmm2, xmm0
movd xmm0, dword [rcx - 0xc]
xorps xmm2, xmm0
movdqa xmm0, xmm3
punpckhdq xmm0, xmm3
pmuldq xmm0, xmm4
movd dword [rcx - 0xc], xmm2
shufps xmm1, xmm0, 0xdd
psrad xmm1, 4
movdqa xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmm6
psubd xmm3, xmm0
pshuflw xmm0, xmm3, 0xd8
pshufhw xmm1, xmm0, 0xd8
movd xmm0, edx
pshufd xmm2, xmm1, 0xd8
andps xmm2, xmmword [0x1800f9ca0]
packuswb xmm2, xmm2
paddb xmm2, xmm0
movd xmm0, dword [rcx - 8]
xorps xmm2, xmm0
movd dword [rcx - 8], xmm2
cmp r8d, 0x28
jl 0x18004ff70
cmp r8d, 0x29
jge 0x1800500b4
movsxd rax, r8d
lea r9, [rbp - 0x49]
add r9, rax
mov eax, 0x4d4873ed
lea r9, [r9 + 1]
imul r8d
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 1
sub al, dl
movsx eax, al
imul ecx, eax, 0x35
add cl, r8b
inc r8d
xor byte [r9 - 1], cl
cmp r8d, 0x29
jl 0x180050081
xorps xmm0, xmm0
lea rax, [rbp - 0x49]
xorps xmm1, xmm1
movups xmmword [rbp - 0x69], xmm0
movdqu xmmword [rbp - 0x59], xmm1
inc r14
cmp byte [rax + r14], dil
jne 0x1800500c7
mov r8, r14
lea rdx, [rbp - 0x49]
lea rcx, [rbp - 0x69]
call fcn.180013c60
xor edx, edx
lea rcx, [rbp - 0x69]
call fcn.180028a60
mov rcx, qword [rbp - 0x19]
mov r13, qword [rsp + 0x118]
test rcx, rcx
je 0x18005013d
mov rdx, qword [rbp - 9]
mov rax, rcx
sub rdx, rcx
and rdx, 0xffffffffffffffe0
cmp rdx, 0x1000
jb 0x18005012c
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18005038c
call fcn.1800b31bc
xorps xmm0, xmm0
mov qword [rbp - 9], rdi
movdqu xmmword [rbp - 0x19], xmm0
lea rcx, [rbp - 1]
call fcn.180031cf0
jmp 0x180050365
inc r9d
inc r10
cmp r9d, 0x2e
jb 0x18004fe91
mov rbx, rdi
jmp 0x18004fec7
movsxd rax, r15d
mov qword [0x18020ab18], rax
jmp 0x1800500eb
cmp dword [0x18010b088], 2
movups xmm0, xmmword [0x1800ea560]
mov eax, dword [0x1800ea588]
movups xmm1, xmmword [0x1800ea570]
mov dword [rbp - 0x21], eax
movups xmmword [rbp - 0x49], xmm0
movsd xmm0, qword [0x1800ea580]
movsd qword [rbp - 0x29], xmm0
movups xmmword [rbp - 0x39], xmm1
jl 0x1800502e4
movdqa xmm0, xmmword [0x1800f9ce0]
lea rcx, [rbp - 0x45]
movdqa xmm5, xmmword [0x1800f9b20]
movdqa xmm4, xmmword [0x1800f9d80]
movdqa xmm6, xmmword [0x1800f9b90]
movdqa xmmword [rsp + 0x20], xmm0
mov edx, dword [rsp + 0x20]
nop dword [rax]
movd xmm2, edi
lea eax, [rdi + 4]
pshufd xmm2, xmm2, 0
lea rcx, [rcx + 8]
paddd xmm2, xmm5
movd xmm3, eax
movdqa xmm1, xmm2
pshufd xmm3, xmm3, 0
punpckldq xmm1, xmm2
movdqa xmm0, xmm2
punpckhdq xmm0, xmm2
paddd xmm3, xmm5
pmuldq xmm0, xmm4
add edi, 8
pmuldq xmm1, xmm4
mov eax, edi
shufps xmm1, xmm0, 0xdd
psrad xmm1, 4
movdqa xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmm6
psubd xmm2, xmm0
pshuflw xmm0, xmm2, 0xd8
pshufhw xmm1, xmm0, 0xd8
pshufd xmm2, xmm1, 0xd8
movdqa xmm1, xmm3
andps xmm2, xmmword [0x1800f9ca0]
packuswb xmm2, xmm2
punpckldq xmm1, xmm3
pmuldq xmm1, xmm4
movd xmm0, edx
paddb xmm2, xmm0
movd xmm0, dword [rcx - 0xc]
xorps xmm2, xmm0
movdqa xmm0, xmm3
punpckhdq xmm0, xmm3
pmuldq xmm0, xmm4
movd dword [rcx - 0xc], xmm2
shufps xmm1, xmm0, 0xdd
psrad xmm1, 4
movdqa xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmm6
psubd xmm3, xmm0
pshuflw xmm0, xmm3, 0xd8
pshufhw xmm1, xmm0, 0xd8
movd xmm0, edx
pshufd xmm2, xmm1, 0xd8
andps xmm2, xmmword [0x1800f9ca0]
packuswb xmm2, xmm2
paddb xmm2, xmm0
movd xmm0, dword [rcx - 8]
xorps xmm2, xmm0
movd dword [rcx - 8], xmm2
cmp edi, 0x28
jl 0x1800501e0
cmp eax, 0x2c
jge 0x180050320
movsxd rax, edi
lea r8, [rbp - 0x49]
add r8, rax
nop
mov eax, 0x4d4873ed
lea r8, [r8 + 1]
imul edi
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 1
sub al, dl
movsx eax, al
imul ecx, eax, 0x35
add cl, dil
inc edi
xor byte [r8 - 1], cl
cmp edi, 0x2c
jl 0x1800502f0
xorps xmm0, xmm0
lea rax, [rbp - 0x49]
xorps xmm1, xmm1
mov r14, 0xffffffffffffffff
movups xmmword [rbp - 0x69], xmm0
movdqu xmmword [rbp - 0x59], xmm1
nop word [rax + rax]
inc r14
cmp byte [rax + r14], 0
jne 0x180050340
mov r8, r14
lea rdx, [rbp - 0x49]
lea rcx, [rbp - 0x69]
call fcn.180013c60
mov dl, 1
lea rcx, [rbp - 0x69]
call fcn.180028a60
movaps xmm6, xmmword [rsp + 0xd0]
mov r14, qword [rsp + 0x120]
mov rbx, qword [rsp + 0x128]
add rsp, 0xe0
pop r15
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.1800b9e6c
int3