Function at 0x140004040
Capabilities:
Encode data using xor

Disassembly:
mov r11, rsp
mov qword [r11 + 0x18], rbx
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x180
movaps xmmword [r11 - 0x38], xmm6
movaps xmmword [r11 - 0x48], xmm7
movaps xmmword [r11 - 0x58], xmm8
movaps xmmword [r11 - 0x68], xmm9
movaps xmmword [r11 - 0x78], xmm10
movaps xmmword [r11 - 0x88], xmm11
movaps xmmword [r11 - 0x98], xmm12
mov rax, qword [0x14011d0d0]
mov qword [r11 + 8], rax
xor ebx, ebx
mov esi, dword [0x14013e098]
cmp byte [0x14011d0d7], bl
je 0x1400041d9
mov r8d, ebx
cmp esi, 2
jl 0x1400041a1
movdqa xmm6, xmmword [0x140126a60]
movdqa xmm8, xmmword [0x140126620]
movdqa xmm11, xmmword [str.77777777777777778888888888888888]
movdqa xmm7, xmmword [0x1401265a0]
movdqa xmm1, xmm7
punpckldq xmm1, xmm7
pmuldq xmm1, xmm6
movdqa xmm0, xmm7
punpckhdq xmm0, xmm7
pmuldq xmm0, xmm6
shufps xmm1, xmm0, 0xdd
psrad xmm1, 4
movdqa xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmm8
movdqa xmm1, xmm7
psubd xmm1, xmm0
movdqa xmm9, xmmword [0x1401266c0]
andps xmm1, xmm9
packuswb xmm1, xmm1
packuswb xmm1, xmm1
paddb xmm1, xmm11
movd xmm0, dword [r11 + 8]
xorps xmm1, xmm0
movd dword [r11 + 8], xmm1
movdqa xmm10, xmmword [0x1401265c0]
movdqa xmm1, xmm10
punpckldq xmm1, xmm10
pmuldq xmm1, xmm6
movdqa xmm0, xmm10
punpckhdq xmm0, xmm10
pmuldq xmm0, xmm6
shufps xmm1, xmm0, 0xdd
psrad xmm1, 4
movdqa xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmm8
movdqa xmm1, xmm10
psubd xmm1, xmm0
andps xmm1, xmm9
packuswb xmm1, xmm1
packuswb xmm1, xmm1
paddb xmm1, xmm11
movd xmm0, dword [r11 + 0xc]
xorps xmm1, xmm0
movd dword [r11 + 0xc], xmm1
jmp 0x14000420d
lea r9, [rsp + 0x1b0]
nop dword [rax]
mov eax, 0x51eb851f
mul r8d
shr edx, 4
movsx eax, dl
imul ecx, eax, 0x32
movzx eax, r8b
sub al, cl
add al, 0x37
xor byte [r9], al
inc r8d
lea r9, [r9 + 1]
cmp r8d, 8
jl 0x1400041b0
movdqa xmm10, xmmword [0x1401265c0]
movdqa xmm7, xmmword [0x1401265a0]
movdqa xmm6, xmmword [0x140126a60]
movdqa xmm8, xmmword [0x140126620]
movdqa xmm11, xmmword [str.77777777777777778888888888888888]
movdqa xmm9, xmmword [0x1401266c0]
xorps xmm0, xmm0
movups xmmword [rsp + 0x40], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x50], xmm1
lea rax, [rsp + 0x1b0]
mov r8, 0xffffffffffffffff
nop dword [rax]
inc r8
cmp byte [rax + r8], 0
jne 0x140004230
lea rdx, [rsp + 0x1b0]
lea rcx, [rsp + 0x40]
call fcn.140001460
lea rcx, [rsp + 0x40]
cmp qword [rsp + 0x58], 0xf
cmova rcx, qword [rsp + 0x40]
mov qword [rsp + 0x20], rcx
mov rax, 0xffffffffffffffff
nop dword [rax]
inc rax
cmp byte [rcx + rax], 0
jne 0x140004270
mov qword [rsp + 0x28], rax
movaps xmm0, xmmword [rsp + 0x20]
movdqa xmmword [rsp + 0x30], xmm0
lea rdx, [rsp + 0x30]
call fcn.140003420
mov rdx, qword [rsp + 0x58]
cmp rdx, 0xf
jbe 0x1400042d3
inc rdx
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400042ce
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400042ce
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400fb3b4
movabs r14, 0x7fffffffe2329aff
mov r12d, 1
movabs r15, 0x7fffffffffffffff
movdqa xmm12, xmmword [0x1401265d0]
nop word [rax + rax]
movsd xmm0, qword [0x14011d0d8]
movsd qword [rsp + 0x20], xmm0
mov ecx, dword [0x14011d0e0]
mov dword [rsp + 0x28], ecx
movzx eax, word [0x14011d0e4]
mov word [rsp + 0x2c], ax
cmp byte [0x14011d0e5], 0
je 0x1400044b0
mov r8d, ebx
cmp esi, 2
jl 0x140004475
movdqa xmm1, xmm7
punpckldq xmm1, xmm7
pmuldq xmm1, xmm6
movdqa xmm0, xmm7
punpckhdq xmm0, xmm7
pmuldq xmm0, xmm6
shufps xmm1, xmm0, 0xdd
psrad xmm1, 4
movdqa xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmm8
movdqa xmm1, xmm7
psubd xmm1, xmm0
andps xmm1, xmm9
packuswb xmm1, xmm1
packuswb xmm1, xmm1
movd eax, xmm11
movd xmm0, eax
paddb xmm1, xmm0
movd xmm0, dword [0x14011d0d8]
xorps xmm1, xmm0
movd dword [rsp + 0x20], xmm1
movdqa xmm1, xmm10
punpckldq xmm1, xmm10
pmuldq xmm1, xmm6
movdqa xmm0, xmm10
punpckhdq xmm0, xmm10
pmuldq xmm0, xmm6
shufps xmm1, xmm0, 0xdd
psrad xmm1, 4
movdqa xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmm8
movdqa xmm2, xmm10
psubd xmm2, xmm0
andps xmm2, xmm9
packuswb xmm2, xmm2
packuswb xmm2, xmm2
movd xmm0, eax
paddb xmm2, xmm0
movd xmm1, dword [rsp + 0x24]
xorps xmm2, xmm1
movd dword [rsp + 0x24], xmm2
movdqa xmm1, xmm12
punpckldq xmm1, xmm12
pmuldq xmm1, xmm6
movdqa xmm0, xmm12
punpckhdq xmm0, xmm12
pmuldq xmm0, xmm6
shufps xmm1, xmm0, 0xdd
psrad xmm1, 4
movdqa xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmm8
movdqa xmm2, xmm12
psubd xmm2, xmm0
andps xmm2, xmm9
packuswb xmm2, xmm2
packuswb xmm2, xmm2
movd xmm0, eax
paddb xmm2, xmm0
movd xmm1, ecx
xorps xmm2, xmm1
movd dword [rsp + 0x28], xmm2
mov r8d, 0xc
mov eax, r8d
lea r9, [rsp + 0x20]
add r9, rax
mov eax, 0x51eb851f
imul r8d
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
movsx eax, dl
imul ecx, eax, 0x32
movzx eax, r8b
sub al, cl
add al, 0x37
xor byte [r9], al
inc r8d
lea r9, [r9 + 1]
cmp r8d, 0xe
jl 0x140004480
xorps xmm0, xmm0
movups xmmword [rsp + 0x40], xmm0
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x58], rbx
lea rax, [rsp + 0x20]
mov r8, 0xffffffffffffffff
nop
inc r8
cmp byte [rax + r8], 0
jne 0x1400044d0
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x40]
call fcn.140001460
lea rcx, [rsp + 0x40]
cmp qword [rsp + 0x58], 0xf
cmova rcx, qword [rsp + 0x40]
mov qword [rsp + 0x30], rcx
mov rax, 0xffffffffffffffff
inc rax
cmp byte [rcx + rax], 0
jne 0x140004506
mov qword [rsp + 0x38], rax
movaps xmm0, xmmword [rsp + 0x30]
movdqa xmmword [rsp + 0xa0], xmm0
lea r8, [rsp + 0xa0]
lea rdx, [rsp + 0x60]
call fcn.140003670
mov rdi, qword [rax]
mov qword [rsp + 0x60], rbx
xor r8d, r8d
lea rdx, [0x14011cb4a]
lea rcx, [rsp + 0x68]
call fcn.140002b10
mov rdx, qword [rsp + 0x80]
cmp rdx, 0xf
jbe 0x140004593
inc rdx
mov rcx, qword [rsp + 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000458e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000458e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400fb3b4
mov qword [rsp + 0x78], rbx
mov qword [rsp + 0x80], 0xf
mov byte [rsp + 0x68], 0
mov rdx, qword [rsp + 0x58]
cmp rdx, 0xf
jbe 0x1400045e9
inc rdx
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400045e4
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400045e4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400fb3b4
test rdi, rdi
jne 0x140004657
lea rcx, [rsp + 0x1b8]
call fcn.140002fc0
mov rax, qword [rsp + 0x1b8]
mov qword [rsp + 0x1b0], rax
cmp rax, r14
je 0x14000463d
mov ecx, 0xff
cmovge ecx, r12d
test cl, cl
jns 0x14000463d
add rax, 0x1dcd6500
mov qword [rsp + 0x1b0], rax
lea rcx, [rsp + 0x1b0]
call fcn.140005a60
jmp 0x140004300
mov qword [rsp + 0x1b0], r15
lea rcx, [rsp + 0x1b0]
call fcn.140005a60
jmp 0x140004300
lea rax, str.client.dll
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], 0xa
movaps xmm0, xmmword [rsp + 0x30]
movdqa xmmword [rsp + 0xa0], xmm0
lea r8, [rsp + 0xa0]
lea rdx, [rsp + 0x60]
call fcn.140003670
nop
mov rcx, qword [rax]
mov qword [0x14017b588], rcx
lea rdx, [rax + 8]
lea rcx, [0x14017b590]
cmp rcx, rdx
je 0x1400046bb
mov r8, qword [rdx + 0x10]
cmp qword [rdx + 0x18], 0xf
jbe 0x1400046b5
mov rdx, qword [rdx]
call fcn.140002b10
nop
mov qword [rsp + 0x60], rbx
xor r8d, r8d
lea rdx, [0x14011cb4a]
lea rcx, [rsp + 0x68]
call fcn.140002b10
mov rdx, qword [rsp + 0x80]
cmp rdx, 0xf
jbe 0x140004718
inc rdx
mov rcx, qword [rsp + 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004712
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004712
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400fb3b4
nop
cmp qword [0x14017b588], 0
je 0x140004a72
cmp qword [0x14017b5a0], 0
je 0x140004a72
lea rax, str.engine2.dll
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], 0xb
movaps xmm0, xmmword [rsp + 0x30]
movdqa xmmword [rsp + 0xa0], xmm0
lea r8, [rsp + 0xa0]
lea rdx, [rsp + 0x60]
call fcn.140003670
nop
mov rcx, qword [rax]
mov qword [0x14017b5b0], rcx
lea rdx, [rax + 8]
lea rcx, [0x14017b5b8]
cmp rcx, rdx
je 0x140004798
mov r8, qword [rdx + 0x10]
cmp qword [rdx + 0x18], 0xf
jbe 0x140004792
mov rdx, qword [rdx]
call fcn.140002b10
nop
mov qword [rsp + 0x60], rbx
xor r8d, r8d
lea rdx, [0x14011cb4a]
lea rcx, [rsp + 0x68]
call fcn.140002b10
mov rdx, qword [rsp + 0x80]
cmp rdx, 0xf
jbe 0x1400047f5
inc rdx
mov rcx, qword [rsp + 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400047ef
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400047ef
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400fb3b4
nop
cmp qword [0x14017b5b0], 0
je 0x140004915
cmp qword [0x14017b5c8], 0
je 0x140004915
cmp byte [0x14017c5b2], 0
jne 0x14000481f
call fcn.140081260
lea rdi, vtable.std::_Func_impl_no_alloc_void____cdecl___void___void___.0
lea rsi, [0x1400016a0]
movabs rbx, 0x7ffffffffffffc17
nop word [rax + rax]
cmp byte [0x14017c5b1], 0
jne 0x1400048d8
mov qword [rsp + 0x60], rdi
mov qword [rsp + 0x68], rsi
lea rax, [rsp + 0x60]
mov qword [rsp + 0x98], rax
lea rcx, [rsp + 0x60]
call fcn.140083730
test al, al
je 0x1400048da
lea rcx, [rsp + 0x1b8]
call fcn.140002fc0
mov rax, qword [rsp + 0x1b8]
mov qword [rsp + 0x1b0], rax
cmp rax, rbx
je 0x1400048be
mov ecx, 0xff
cmovge ecx, r12d
test cl, cl
jns 0x1400048be
add rax, 0x3e8
mov qword [rsp + 0x1b0], rax
lea rcx, [rsp + 0x1b0]
call fcn.140005a60
jmp 0x140004840
mov qword [rsp + 0x1b0], r15
lea rcx, [rsp + 0x1b0]
call fcn.140005a60
jmp 0x140004840
xor al, al
lea r11, [rsp + 0x180]
mov rbx, qword [r11 + 0x40]
movaps xmm6, xmmword [r11 - 0x10]
movaps xmm7, xmmword [r11 - 0x20]
movaps xmm8, xmmword [r11 - 0x30]
movaps xmm9, xmmword [r11 - 0x40]
movaps xmm10, xmmword [r11 - 0x50]
movaps xmm11, xmmword [r11 - 0x60]
movaps xmm12, xmmword [r11 - 0x70]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret
lea rdx, [rsp + 0xa0]
call fcn.140004c50
mov r9, rax
cmp byte [rax + 0x20], 0
je 0x140004bf3
cmp esi, 2
jl 0x140004a3a
movdqa xmmword [rsp + 0x20], xmm11
mov rcx, rax
mov edx, dword [rsp + 0x20]
nop word [rax + rax]
movd xmm2, ebx
pshufd xmm2, xmm2, 0
paddd xmm2, xmm7
movdqa xmm1, xmm2
punpckldq xmm1, xmm2
pmuldq xmm1, xmm6
movdqa xmm0, xmm2
punpckhdq xmm0, xmm2
pmuldq xmm0, xmm6
shufps xmm1, xmm0, 0xdd
psrad xmm1, 4
movdqa xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmm8
psubd xmm2, xmm0
andps xmm2, xmm9
packuswb xmm2, xmm2
packuswb xmm2, xmm2
movd xmm0, edx
paddb xmm2, xmm0
movd xmm0, dword [rcx]
xorps xmm2, xmm0
movd dword [rcx], xmm2
lea eax, [rbx + 4]
movd xmm3, eax
pshufd xmm3, xmm3, 0
paddd xmm3, xmm7
movdqa xmm1, xmm3
punpckldq xmm1, xmm3
pmuldq xmm1, xmm6
movdqa xmm0, xmm3
punpckhdq xmm0, xmm3
pmuldq xmm0, xmm6
shufps xmm1, xmm0, 0xdd
psrad xmm1, 4
movdqa xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmm8
psubd xmm3, xmm0
andps xmm3, xmm9
packuswb xmm3, xmm3
packuswb xmm3, xmm3
movd xmm0, edx
paddb xmm3, xmm0
movd xmm0, dword [rcx + 4]
xorps xmm3, xmm0
movd dword [rcx + 4], xmm3
add ebx, 8
lea rcx, [rcx + 8]
cmp ebx, 0x20
jl 0x140004950
cmp ebx, 0x21
jge 0x140004bf3
movsxd r8, ebx
add r8, r9
mov eax, 0x51eb851f
imul ebx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
movsx eax, dl
imul ecx, eax, 0x32
movzx eax, bl
sub al, cl
add al, 0x37
xor byte [r8], al
inc ebx
lea r8, [r8 + 1]
cmp ebx, 0x21
jge 0x140004bf3
jmp 0x140004a40
lea rdx, [rsp + 0x40]
call fcn.140004c30
mov r9, rax
cmp byte [rax + 0x1f], 0
je 0x140004bb5
cmp esi, 2
jl 0x140004b83
movdqa xmmword [rsp + 0x20], xmm11
mov rcx, rax
mov edx, dword [rsp + 0x20]
movd xmm2, ebx
pshufd xmm2, xmm2, 0
paddd xmm2, xmm7
movdqa xmm1, xmm2
punpckldq xmm1, xmm2
pmuldq xmm1, xmm6
movdqa xmm0, xmm2
punpckhdq xmm0, xmm2
pmuldq xmm0, xmm6
shufps xmm1, xmm0, 0xdd
psrad xmm1, 4
movdqa xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmm8
psubd xmm2, xmm0
andps xmm2, xmm9
packuswb xmm2, xmm2
packuswb xmm2, xmm2
movd xmm0, edx
paddb xmm2, xmm0
movd xmm0, dword [rcx]
xorps xmm2, xmm0
movd dword [rcx], xmm2
lea eax, [rbx + 4]
movd xmm3, eax
pshufd xmm3, xmm3, 0
paddd xmm3, xmm7
movdqa xmm1, xmm3
punpckldq xmm1, xmm3
pmuldq xmm1, xmm6
movdqa xmm0, xmm3
punpckhdq xmm0, xmm3
pmuldq xmm0, xmm6
shufps xmm1, xmm0, 0xdd
psrad xmm1, 4
movdqa xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmm8
psubd xmm3, xmm0
andps xmm3, xmm9
packuswb xmm3, xmm3
packuswb xmm3, xmm3
movd xmm0, edx
paddb xmm3, xmm0
movd xmm0, dword [rcx + 4]
xorps xmm3, xmm0
movd dword [rcx + 4], xmm3
add ebx, 8
lea rcx, [rcx + 8]
cmp ebx, 0x20
jl 0x140004aa0
jmp 0x140004bb5
mov r8, r9
nop word [rax + rax]
mov eax, 0x51eb851f
mul ebx
shr edx, 4
movsx eax, dl
imul ecx, eax, 0x32
movzx eax, bl
sub al, cl
add al, 0x37
xor byte [r8], al
inc ebx
lea r8, [r8 + 1]
cmp ebx, 0x20
jl 0x140004b90
mov rdx, r9
lea rcx, [rsp + 0xa0]
call fcn.140001400
nop
mov rcx, rax
call fcn.1400027e0
mov rdx, rax
lea rcx, [rsp + 0xe8]
call fcn.140001260
lea rdx, [0x14013a1a8]
lea rcx, [rsp + 0xe8]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
mov rdx, r9
lea rcx, [rsp + 0x40]
call fcn.140001400
nop
mov rcx, rax
call fcn.1400027e0
mov rdx, rax
lea rcx, [rsp + 0xd0]
call fcn.140001260
lea rdx, [0x14013a1a8]
lea rcx, [rsp + 0xd0]
call sub.VCRUNTIME140.dll__CxxThrowException
int3