Function at 0x180114210
Capabilities:
Encode data using xor

Disassembly:
push r14
sub rsp, 0x50
mov qword [rsp + 0x60], rbx
mov r14, rcx
movsxd rbx, edx
mov dword [rcx], ebx
mov byte [rcx + 4], r8b
mov rcx, rbx
mov qword [rsp + 0x68], rbp
xor ebp, ebp
shl rcx, 3
movaps xmmword [rsp + 0x20], xmm8
test rcx, rcx
jne 0x180114244
mov eax, ebp
jmp 0x18011424d
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ebx, dword [r14]
mov qword [r14 + 0x108], rax
cmp byte [r14 + 4], bpl
je 0x180114265
movsd xmm8, qword [0x180171da0]
jmp 0x18011426e
movsd xmm8, qword [0x18017cf78]
mulsd xmm8, qword [0x180171db8]
mov qword [rsp + 0x70], rsi
mov esi, ebp
mov qword [rsp + 0x78], rdi
movd xmm0, ebx
movaps xmmword [rsp + 0x40], xmm6
movaps xmmword [rsp + 0x30], xmm7
cvtdq2pd xmm0, xmm0
divsd xmm8, xmm0
cmp ebx, 4
jg 0x180114300
test ebx, ebx
jle 0x180114480
mov rdi, rbp
nop word [rax + rax]
movd xmm6, esi
cvtdq2pd xmm6, xmm6
mulsd xmm6, xmm8
movaps xmm0, xmm6
call sub.api_ms_win_crt_math_l1_1_0.dll_cos
xorps xmm7, xmm7
cvtsd2ss xmm7, xmm0
movaps xmm0, xmm6
call sub.api_ms_win_crt_math_l1_1_0.dll_sin
mov rax, qword [r14 + 0x108]
lea rdi, [rdi + 8]
xorps xmm1, xmm1
inc esi
cvtsd2ss xmm1, xmm0
movss dword [rax + rdi - 8], xmm7
movss dword [rax + rdi - 4], xmm1
mov ebx, dword [r14]
cmp esi, ebx
jl 0x1801142b0
jmp 0x180114480
mov eax, ebx
cdq
and edx, 3
add eax, edx
sar eax, 2
test eax, eax
jle 0x180114376
mov rdi, rbp
nop dword [rax]
nop word [rax + rax]
movd xmm6, esi
cvtdq2pd xmm6, xmm6
mulsd xmm6, xmm8
movaps xmm0, xmm6
call sub.api_ms_win_crt_math_l1_1_0.dll_cos
xorps xmm7, xmm7
cvtsd2ss xmm7, xmm0
movaps xmm0, xmm6
call sub.api_ms_win_crt_math_l1_1_0.dll_sin
mov rax, qword [r14 + 0x108]
lea rdi, [rdi + 8]
xorps xmm1, xmm1
inc esi
cvtsd2ss xmm1, xmm0
movss dword [rax + rdi - 8], xmm7
movss dword [rax + rdi - 4], xmm1
mov ebx, dword [r14]
mov eax, ebx
cdq
and edx, 3
add eax, edx
sar eax, 2
cmp esi, eax
jl 0x180114320
movss xmm2, dword [0x18017cfe0]
mov eax, ebx
cdq
and edx, 3
add eax, edx
sar eax, 2
movsxd r8, eax
mov eax, ebx
cdq
sub eax, edx
sar eax, 1
cmp r8d, eax
jge 0x1801143f8
lea r10, [r8*8]
mov r9, qword [r14 + 0x108]
mov eax, ebx
cdq
mov ecx, r8d
and edx, 3
add eax, edx
sar eax, 2
sub ecx, eax
movsxd rax, ecx
movss xmm1, dword [r9 + rax*8]
movss xmm0, dword [r9 + rax*8 + 4]
cmp byte [r14 + 4], bpl
je 0x1801143d2
xorps xmm0, xmm2
jmp 0x1801143d5
xorps xmm1, xmm2
movss dword [r9 + r10], xmm0
inc r8d
movss dword [r9 + r10 + 4], xmm1
add r10, 8
mov ebx, dword [r14]
mov eax, ebx
cdq
sub eax, edx
sar eax, 1
cmp r8d, eax
jl 0x1801143a0
mov r8, qword [r14 + 0x108]
mov eax, ebx
cdq
sub eax, edx
sar eax, 1
movsxd rcx, eax
mov dword [r8 + rcx*8], 0xbf800000
mov eax, dword [r14]
cdq
sub eax, edx
sar eax, 1
movsxd rcx, eax
mov dword [r8 + rcx*8 + 4], ebp
mov ebx, dword [r14]
mov eax, ebx
cdq
sub eax, edx
sar eax, 1
movsxd r8, eax
cmp r8d, ebx
jge 0x180114480
lea r9, [r8*8]
nop dword [rax + rax]
mov rcx, qword [r14 + 0x108]
lea r9, [r9 + 8]
mov eax, ebx
cdq
sub eax, edx
sar eax, 1
add eax, eax
sub eax, r8d
inc r8d
cdqe
movss xmm1, dword [rcx + rax*8 + 4]
movss xmm0, dword [rcx + rax*8]
xorps xmm1, xmm2
movss dword [r9 + rcx - 8], xmm0
movss dword [r9 + rcx - 4], xmm1
mov ebx, dword [r14]
cmp r8d, ebx
jl 0x180114440
movaps xmm8, xmmword [rsp + 0x20]
xorps xmm0, xmm0
movaps xmm7, xmmword [rsp + 0x30]
movaps xmm6, xmmword [rsp + 0x40]
mov rdi, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x70]
movd xmm1, ebx
cvtdq2pd xmm1, xmm1
ucomisd xmm0, xmm1
ja 0x1801144b1
sqrtpd xmm0, xmm1
jmp 0x1801144b9
movaps xmm0, xmm1
call sub.api_ms_win_crt_math_l1_1_0.dll_sqrt
cvttsd2si r9d, xmm0
mov r8d, 4
mov eax, ebx
cdq
idiv r8d
test edx, edx
je 0x180114505
nop
cmp r8d, 2
jne 0x1801144de
mov r8d, 3
jmp 0x1801144f0
cmp r8d, 4
jne 0x1801144ec
mov r8d, 2
jmp 0x1801144f0
add r8d, 2
cmp r8d, r9d
mov ecx, ebx
mov eax, ebx
cmovle ecx, r8d
cdq
idiv ecx
mov r8d, ecx
test edx, edx
jne 0x1801144d0
mov eax, ebx
mov dword [r14 + rbp*8 + 8], r8d
cdq
lea r11, [r14 + rbp*8]
idiv r8d
mov r10d, eax
mov dword [r11 + 0xc], eax
cdq
idiv r8d
test edx, edx
je 0x18011455a
cmp r8d, 2
jne 0x180114531
mov r8d, 3
jmp 0x180114543
cmp r8d, 4
jne 0x18011453f
mov r8d, 2
jmp 0x180114543
add r8d, 2
cmp r8d, r9d
mov ecx, r10d
mov eax, r10d
cmovle ecx, r8d
cdq
idiv ecx
mov r8d, ecx
test edx, edx
jne 0x180114523
mov eax, r10d
mov dword [r14 + rbp*8 + 0x10], r8d
cdq
idiv r8d
mov r10d, eax
mov dword [r11 + 0x14], eax
cdq
idiv r8d
test edx, edx
je 0x1801145ac
cmp r8d, 2
jne 0x180114583
mov r8d, 3
jmp 0x180114595
cmp r8d, 4
jne 0x180114591
mov r8d, 2
jmp 0x180114595
add r8d, 2
cmp r8d, r9d
mov ecx, r10d
mov eax, r10d
cmovle ecx, r8d
cdq
idiv ecx
mov r8d, ecx
test edx, edx
jne 0x180114575
mov eax, r10d
mov dword [r14 + rbp*8 + 0x18], r8d
cdq
idiv r8d
mov r10d, eax
mov dword [r11 + 0x1c], eax
cdq
idiv r8d
test edx, edx
je 0x1801145fe
cmp r8d, 2
jne 0x1801145d5
mov r8d, 3
jmp 0x1801145e7
cmp r8d, 4
jne 0x1801145e3
mov r8d, 2
jmp 0x1801145e7
add r8d, 2
cmp r8d, r9d
mov ecx, r10d
mov eax, r10d
cmovle ecx, r8d
cdq
idiv ecx
mov r8d, ecx
test edx, edx
jne 0x1801145c7
mov eax, r10d
mov dword [r14 + rbp*8 + 0x20], r8d
cdq
idiv r8d
mov r10d, eax
mov dword [r11 + 0x24], eax
cdq
idiv r8d
test edx, edx
je 0x180114657
nop dword [rax]
cmp r8d, 2
jne 0x18011462e
mov r8d, 3
jmp 0x180114640
cmp r8d, 4
jne 0x18011463c
mov r8d, 2
jmp 0x180114640
add r8d, 2
cmp r8d, r9d
mov ecx, r10d
mov eax, r10d
cmovle ecx, r8d
cdq
idiv ecx
mov r8d, ecx
test edx, edx
jne 0x180114620
mov eax, r10d
mov dword [r14 + rbp*8 + 0x28], r8d
cdq
idiv r8d
mov r10d, eax
mov dword [r11 + 0x2c], eax
cdq
idiv r8d
test edx, edx
je 0x1801146a9
cmp r8d, 2
jne 0x180114680
mov r8d, 3
jmp 0x180114692
cmp r8d, 4
jne 0x18011468e
mov r8d, 2
jmp 0x180114692
add r8d, 2
cmp r8d, r9d
mov ecx, r10d
mov eax, r10d
cmovle ecx, r8d
cdq
idiv ecx
mov r8d, ecx
test edx, edx
jne 0x180114672
mov eax, r10d
mov dword [r14 + rbp*8 + 0x30], r8d
cdq
idiv r8d
mov r10d, eax
mov dword [r11 + 0x34], eax
cdq
idiv r8d
test edx, edx
je 0x1801146fb
cmp r8d, 2
jne 0x1801146d2
mov r8d, 3
jmp 0x1801146e4
cmp r8d, 4
jne 0x1801146e0
mov r8d, 2
jmp 0x1801146e4
add r8d, 2
cmp r8d, r9d
mov ecx, r10d
mov eax, r10d
cmovle ecx, r8d
cdq
idiv ecx
mov r8d, ecx
test edx, edx
jne 0x1801146c4
mov eax, r10d
mov dword [r14 + rbp*8 + 0x38], r8d
cdq
idiv r8d
mov r10d, eax
mov dword [r11 + 0x3c], eax
cdq
idiv r8d
test edx, edx
je 0x18011474d
cmp r8d, 2
jne 0x180114724
mov r8d, 3
jmp 0x180114736
cmp r8d, 4
jne 0x180114732
mov r8d, 2
jmp 0x180114736
add r8d, 2
cmp r8d, r9d
mov ecx, r10d
mov eax, r10d
cmovle ecx, r8d
cdq
idiv ecx
mov r8d, ecx
test edx, edx
jne 0x180114716
mov eax, r10d
mov dword [r14 + rbp*8 + 0x40], r8d
cdq
idiv r8d
mov r10d, eax
mov dword [r11 + 0x44], eax
cdq
idiv r8d
test edx, edx
je 0x18011479f
cmp r8d, 2
jne 0x180114776
mov r8d, 3
jmp 0x180114788
cmp r8d, 4
jne 0x180114784
mov r8d, 2
jmp 0x180114788
add r8d, 2
cmp r8d, r9d
mov ecx, r10d
mov eax, r10d
cmovle ecx, r8d
cdq
idiv ecx
mov r8d, ecx
test edx, edx
jne 0x180114768
mov eax, r10d
mov dword [r14 + rbp*8 + 0x48], r8d
cdq
idiv r8d
mov r10d, eax
mov dword [r11 + 0x4c], eax
cdq
idiv r8d
test edx, edx
je 0x1801147f7
nop word [rax + rax]
cmp r8d, 2
jne 0x1801147ce
mov r8d, 3
jmp 0x1801147e0
cmp r8d, 4
jne 0x1801147dc
mov r8d, 2
jmp 0x1801147e0
add r8d, 2
cmp r8d, r9d
mov ecx, r10d
mov eax, r10d
cmovle ecx, r8d
cdq
idiv ecx
mov r8d, ecx
test edx, edx
jne 0x1801147c0
mov eax, r10d
mov dword [r14 + rbp*8 + 0x50], r8d
cdq
idiv r8d
mov r10d, eax
mov dword [r11 + 0x54], eax
cdq
idiv r8d
test edx, edx
je 0x180114849
cmp r8d, 2
jne 0x180114820
mov r8d, 3
jmp 0x180114832
cmp r8d, 4
jne 0x18011482e
mov r8d, 2
jmp 0x180114832
add r8d, 2
cmp r8d, r9d
mov ecx, r10d
mov eax, r10d
cmovle ecx, r8d
cdq
idiv ecx
mov r8d, ecx
test edx, edx
jne 0x180114812
mov eax, r10d
mov dword [r14 + rbp*8 + 0x58], r8d
cdq
idiv r8d
mov r10d, eax
mov dword [r11 + 0x5c], eax
cdq
idiv r8d
test edx, edx
je 0x18011489b
cmp r8d, 2
jne 0x180114872
mov r8d, 3
jmp 0x180114884
cmp r8d, 4
jne 0x180114880
mov r8d, 2
jmp 0x180114884
add r8d, 2
cmp r8d, r9d
mov ecx, r10d
mov eax, r10d
cmovle ecx, r8d
cdq
idiv ecx
mov r8d, ecx
test edx, edx
jne 0x180114864
mov eax, r10d
mov dword [r14 + rbp*8 + 0x60], r8d
cdq
idiv r8d
mov r10d, eax
mov dword [r11 + 0x64], eax
cdq
idiv r8d
test edx, edx
je 0x1801148ed
cmp r8d, 2
jne 0x1801148c4
mov r8d, 3
jmp 0x1801148d6
cmp r8d, 4
jne 0x1801148d2
mov r8d, 2
jmp 0x1801148d6
add r8d, 2
cmp r8d, r9d
mov ecx, r10d
mov eax, r10d
cmovle ecx, r8d
cdq
idiv ecx
mov r8d, ecx
test edx, edx
jne 0x1801148b6
mov eax, r10d
mov dword [r14 + rbp*8 + 0x68], r8d
cdq
idiv r8d
mov r10d, eax
mov dword [r11 + 0x6c], eax
cdq
idiv r8d
test edx, edx
je 0x18011493f
cmp r8d, 2
jne 0x180114916
mov r8d, 3
jmp 0x180114928
cmp r8d, 4
jne 0x180114924
mov r8d, 2
jmp 0x180114928
add r8d, 2
cmp r8d, r9d
mov ecx, r10d
mov eax, r10d
cmovle ecx, r8d
cdq
idiv ecx
mov r8d, ecx
test edx, edx
jne 0x180114908
mov eax, r10d
mov dword [r14 + rbp*8 + 0x70], r8d
cdq
idiv r8d
mov r10d, eax
mov dword [r11 + 0x74], eax
cdq
idiv r8d
test edx, edx
je 0x180114997
nop word [rax + rax]
cmp r8d, 2
jne 0x18011496e
mov r8d, 3
jmp 0x180114980
cmp r8d, 4
jne 0x18011497c
mov r8d, 2
jmp 0x180114980
add r8d, 2
cmp r8d, r9d
mov ecx, r10d
mov eax, r10d
cmovle ecx, r8d
cdq
idiv ecx
mov r8d, ecx
test edx, edx
jne 0x180114960
mov eax, r10d
mov dword [r14 + rbp*8 + 0x78], r8d
cdq
idiv r8d
mov r10d, eax
mov dword [r11 + 0x7c], eax
cdq
idiv r8d
test edx, edx
je 0x1801149e9
cmp r8d, 2
jne 0x1801149c0
mov r8d, 3
jmp 0x1801149d2
cmp r8d, 4
jne 0x1801149ce
mov r8d, 2
jmp 0x1801149d2
add r8d, 2
cmp r8d, r9d
mov ecx, r10d
mov eax, r10d
cmovle ecx, r8d
cdq
idiv ecx
mov r8d, ecx
test edx, edx
jne 0x1801149b2
mov eax, r10d
mov dword [r14 + rbp*8 + 0x80], r8d
cdq
add rbp, 0x10
idiv r8d
mov dword [r11 + 0x84], eax
mov ebx, eax
cmp rbp, 0x20
jl 0x1801144c4
mov rbp, qword [rsp + 0x68]
mov rax, r14
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop r14
ret