Function at 0x140005850
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x268]
sub rsp, 0x340
movaps xmmword [rax - 0x38], xmm6
mov rax, qword [0x14001c040]
xor rax, rsp
mov qword [rbp + 0x220], rax
mov rdi, rdx
xor r15d, r15d
mov dword [rsp + 0x30], r15d
mov rax, qword [0x14001d070]
mov qword [rsp + 0x70], rax
movups xmm0, xmmword [str.ktVYZP]
movups xmmword [rbp - 0x50], xmm0
mov eax, dword [0x140015dc8]
mov dword [rbp - 0x40], eax
movzx eax, word [0x140015dcc]
mov word [rbp - 0x3c], ax
movzx eax, byte [0x140015dce]
mov byte [rbp - 0x3a], al
mov r8d, r15d
cmp dword [0x14001c090], 2
jl 0x1400059f7
movdqa xmm4, xmmword [0x1400161c0]
movdqa xmm3, xmmword [0x140016220]
movdqa xmm5, xmmword [0x1400161e0]
movdqa xmm0, xmmword [0x140016210]
movdqa xmmword [rbp - 0x70], xmm0
lea rcx, [rbp - 0x4c]
movdqa xmm6, xmmword [0x1400161f0]
mov edx, dword [rbp - 0x70]
nop
movd xmm2, r8d
pshufd xmm2, xmm2, 0
paddd xmm2, xmm4
movdqa xmm1, xmm2
punpckldq xmm1, xmm2
pmuldq xmm1, xmm3
movdqa xmm0, xmm2
punpckhdq xmm0, xmm2
pmuldq xmm0, xmm3
shufps xmm1, xmm0, 0xdd
psrad xmm1, 4
movdqa xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmm5
psubd xmm2, xmm0
andps xmm2, xmm6
packuswb xmm2, xmm2
packuswb xmm2, xmm2
movd xmm0, edx
paddb xmm2, xmm0
movd xmm0, dword [rcx - 4]
xorps xmm2, xmm0
movd dword [rcx - 4], xmm2
lea eax, [r8 + 4]
movd xmm2, eax
pshufd xmm2, xmm2, 0
paddd xmm2, xmm4
movdqa xmm1, xmm2
punpckldq xmm1, xmm2
pmuldq xmm1, xmm3
movdqa xmm0, xmm2
punpckhdq xmm0, xmm2
pmuldq xmm0, xmm3
shufps xmm1, xmm0, 0xdd
psrad xmm1, 4
movdqa xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmm5
psubd xmm2, xmm0
andps xmm2, xmm6
packuswb xmm2, xmm2
packuswb xmm2, xmm2
movd xmm0, edx
paddb xmm2, xmm0
movd xmm0, dword [rcx]
xorps xmm2, xmm0
movd dword [rcx], xmm2
add r8d, 8
lea rcx, [rcx + 8]
cmp r8d, 0x10
jl 0x140005910
cmp r8d, 0x17
jge 0x140005a40
movsxd rax, r8d
lea r9, [rbp - 0x50]
add r9, rax
nop dword [rax]
nop word [rax + rax]
mov eax, 0x5397829d
imul r8d
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
movsx eax, dl
imul ecx, eax, 0x31
movzx eax, r8b
sub al, cl
add al, 0x37
xor byte [r9], al
inc r8d
lea r9, [r9 + 1]
cmp r8d, 0x17
jl 0x140005a10
mov rax, rdi
mov ecx, r15d
test rdi, rdi
je 0x140005a5b
cmp byte [rdi], cl
je 0x140005a5b
nop
inc ecx
lea rax, [rax + 1]
cmp byte [rax], r15b
jne 0x140005a50
movsxd rdx, ecx
lea rax, [rbp - 0x50]
mov ecx, r15d
movzx ebx, byte [rbp - 0x50]
test bl, bl
je 0x140005a7b
nop dword [rax]
inc ecx
lea rax, [rax + 1]
cmp byte [rax], r15b
jne 0x140005a70
movsxd rcx, ecx
add rcx, rdx
add rcx, 1
mov r14, 0xffffffffffffffff
cmovb rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdx, rax
test rax, rax
jne 0x140005aa3
mov rdx, r15
jmp 0x140005ae0
movzx ecx, byte [rdi]
test cl, cl
je 0x140005abd
sub rdi, rax
nop dword [rax]
mov byte [rax], cl
inc rax
movzx ecx, byte [rdi + rax]
test cl, cl
jne 0x140005ab0
test bl, bl
je 0x140005add
lea rcx, [rbp - 0x50]
sub rcx, rax
nop dword [rax + rax]
mov byte [rax], bl
inc rax
movzx ebx, byte [rcx + rax]
test bl, bl
jne 0x140005ad0
mov byte [rax], r15b
mov qword [rbp - 0x70], rdx
mov rax, r14
inc rax
cmp byte [rdx + rax], r15b
jne 0x140005ae7
mov qword [rbp - 0x68], rax
call fcn.140012c74
movaps xmm0, xmmword [rbp - 0x70]
movdqa xmmword [rbp - 0x70], xmm0
lea r8, [rbp - 0x70]
mov edx, eax
lea rcx, [rsp + 0x50]
call fcn.140001b60
mov esi, 0x30
mov dword [rsp + 0x30], esi
xorps xmm0, xmm0
movdqa xmmword [rbp - 0x70], xmm0
lea rdx, [rsp + 0x50]
lea rcx, [rbp - 0x70]
call fcn.140007e00
test eax, eax
jne 0x140005fcf
mov rdx, qword [rsp + 0x68]
cmp rdx, 7
jbe 0x140005b7e
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140005b79
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140005b79
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140013404
xorps xmm0, xmm0
movups xmmword [rbp - 0x60], xmm0
mov rcx, qword [rbp - 0x68]
test rcx, rcx
je 0x140005b9a
lock inc dword [rcx + 8]
mov rcx, qword [rbp - 0x68]
mov esi, dword [rsp + 0x30]
movaps xmm0, xmmword [rbp - 0x70]
movdqa xmmword [rbp - 0x60], xmm0
test rcx, rcx
je 0x140005bb4
lock inc dword [rcx + 8]
mov rcx, qword [rbp - 0x68]
mov esi, dword [rsp + 0x30]
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x50], xmm1
test rcx, rcx
je 0x140005bf5
mov eax, r14d
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x140005bf1
mov rbx, qword [rbp - 0x68]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
mov eax, r14d
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x140005bf1
mov rcx, qword [rbp - 0x68]
mov rax, qword [rcx]
call qword [rax + 8]
mov esi, dword [rsp + 0x30]
mov rdi, qword [rbp - 0x60]
nop dword [rax]
test rdi, rdi
je 0x140005f1a
lea r12, [rdi + 0x20]
cmp qword [rdi + 0x38], 7
jbe 0x140005c18
mov r12, qword [rdi + 0x20]
mov r15, qword [rdi + 0x30]
call fcn.140012c74
mov r13d, eax
xorps xmm0, xmm0
movups xmmword [rsp + 0x50], xmm0
xor eax, eax
mov qword [rsp + 0x60], rax
mov ecx, 0xf
mov qword [rsp + 0x68], rcx
mov byte [rsp + 0x50], al
or esi, 8
mov dword [rsp + 0x30], esi
test r15, r15
je 0x140005cc9
cmp r15, 0x7fffffff
ja 0x140005fc1
mov dword [rsp + 0x20], eax
xor r9d, r9d
mov r8d, r15d
mov rdx, r12
mov ecx, r13d
call fcn.140012ce4
mov rbx, rax
mov qword [rsp + 0x48], rax
shr rax, 0x20
test eax, eax
jne 0x140005fe6
movsxd rdx, ebx
lea rcx, [rsp + 0x50]
call fcn.140007a80
lea r9, [rsp + 0x50]
cmp qword [rsp + 0x68], 0xf
cmova r9, qword [rsp + 0x50]
mov dword [rsp + 0x20], ebx
mov r8d, r15d
mov rdx, r12
mov ecx, r13d
call fcn.140012ce4
mov qword [rsp + 0x48], rax
shr rax, 0x20
test eax, eax
jne 0x140005fdc
mov rcx, qword [rsp + 0x68]
and esi, 0xfffffff7
or esi, 7
mov dword [rsp + 0x30], esi
lea rbx, [rsp + 0x50]
mov r8, qword [rsp + 0x50]
cmp rcx, 0xf
cmova rbx, r8
jbe 0x140005d18
lea rdx, [rcx + 1]
mov rax, r8
cmp rdx, 0x1000
jb 0x140005d10
add rdx, 0x27
mov r8, qword [r8 - 8]
sub rax, r8
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140005f0c
mov rcx, r8
call fcn.140013404
mov eax, dword [0x140015f80]
mov dword [rsp + 0x34], eax
xor r15d, r15d
movzx eax, byte [0x140015f84]
mov byte [rsp + 0x50], r15b
mov qword [rsp + 0x68], 0xf
mov qword [rsp + 0x60], r15
mov byte [rsp + 0x34], 0x2e
xor byte [rsp + 0x35], 0x38
xor byte [rsp + 0x36], 0x39
xor byte [rsp + 0x37], 0x3a
xor al, 0x3b
mov byte [rsp + 0x38], al
test rbx, rbx
je 0x140005d96
mov rcx, r14
inc rcx
cmp byte [rbx + rcx], 0
jne 0x140005d61
lea rax, [rsp + 0x34]
mov r8, r14
inc r8
cmp byte [rax + r8], 0
jne 0x140005d72
cmp r8, rcx
ja 0x140005d96
sub rcx, r8
add rcx, rbx
lea rdx, [rsp + 0x34]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
je 0x140005e09
mov eax, dword [0x140015dd0]
mov dword [rsp + 0x3c], eax
movzx eax, byte [0x140015dd4]
mov byte [rsp + 0x3c], 0x2e
xor byte [rsp + 0x3d], 0x38
xor byte [rsp + 0x3e], 0x39
xor byte [rsp + 0x3f], 0x3a
xor al, 0x3b
mov byte [rsp + 0x40], al
test rbx, rbx
je 0x140005e70
mov rcx, r14
nop dword [rax]
inc rcx
cmp byte [rbx + rcx], 0
jne 0x140005dd0
lea rax, [rsp + 0x3c]
mov r8, r14
inc r8
cmp byte [rax + r8], 0
jne 0x140005de1
cmp r8, rcx
ja 0x140005e70
sub rcx, r8
add rcx, rbx
lea rdx, [rsp + 0x3c]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x140005e70
mov r8, rbx
lea rdx, [rsp + 0x78]
mov rcx, qword [rsp + 0x70]
call fcn.1400052f0
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x140005e70
mov rdx, qword [rbp - 0x80]
call fcn.140008b60
mov rdx, qword [rbp - 0x78]
mov rcx, qword [rsp + 0x78]
sub rdx, rcx
and rdx, 0xffffffffffffffe0
mov rax, rcx
cmp rdx, 0x1000
jb 0x140005e63
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140005f13
call fcn.140013404
nop dword [rax + rax]
lea rdx, [rbp - 0x30]
mov rcx, qword [rdi + 0x40]
call fcn.140012ed4
cmp eax, 0x12
je 0x140005eb5
test eax, eax
jne 0x140005fc7
cmp word [rbp - 4], 0x2e
jne 0x140005ea7
movzx eax, word [rbp - 2]
test ax, ax
je 0x140005e70
cmp ax, 0x2e
jne 0x140005ea7
cmp word [rbp], 0
je 0x140005e70
lea rdx, [rbp - 0x30]
mov rcx, rdi
call fcn.140002e50
jmp 0x140005efc
mov rdi, r15
mov qword [rbp - 0x60], r15
mov rbx, qword [rbp - 0x58]
mov qword [rbp - 0x58], r15
test rbx, rbx
je 0x140005efc
mov eax, r14d
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x140005ef4
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
mov eax, r14d
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x140005ef4
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 8]
mov esi, dword [rsp + 0x30]
mov rdi, qword [rbp - 0x60]
mov eax, r15d
test eax, eax
jne 0x140005fc7
jmp 0x140005c00
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
mov rcx, qword [rbp - 0x58]
test rcx, rcx
je 0x140005f54
mov eax, r14d
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x140005f54
mov rbx, qword [rbp - 0x58]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
mov eax, r14d
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x140005f54
mov rcx, qword [rbp - 0x58]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rcx, qword [rbp - 0x68]
test rcx, rcx
je 0x140005f8c
mov eax, r14d
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x140005f8c
mov rbx, qword [rbp - 0x68]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
lock xadd dword [rbx + 0xc], r14d
cmp r14d, 1
jne 0x140005f8c
mov rcx, qword [rbp - 0x68]
mov rax, qword [rcx]
call qword [rax + 8]
mov rcx, qword [rbp + 0x220]
xor rcx, rsp
call fcn.1400133a0
lea r11, [rsp + 0x340]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
movaps xmm6, xmmword [r11 - 0x10]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call fcn.140001620
nop
mov edx, eax
call fcn.140002aa0
nop
lea r8, [rsp + 0x50]
mov edx, eax
call fcn.140002b90
nop
mov ecx, dword [rsp + 0x4c]
call fcn.140001900
int3
mov ecx, dword [rsp + 0x4c]
call fcn.140001900
int3