Function at 0x508140
Capabilities:
Encode data using xor
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x308
mov r12, qword [rcx]
mov rsi, qword [rcx + 0x10]
mov rdi, qword [rcx + 0x18]
mov r9, qword [rcx + 0x38]
mov r10, qword [rcx + 0x20]
mov qword [rsp + 0x360], r8
lea rbp, [rsp + 0x80]
mov r8, qword [rcx + 0x30]
mov qword [rsp + 0x80], r12
mov r11, qword [rcx + 0x28]
mov qword [rsp + 0x90], rsi
mov r15, qword [rcx + 0x48]
mov qword [rsp + 0x98], rdi
mov r13, qword [rcx + 8]
mov qword [rsp + 0xb8], r9
mov r14, qword [rcx + 0x40]
mov qword [rsp + 0xb0], r8
mov qword [rsp + 0xd0], r12
mov qword [rsp + 0xc8], r15
mov qword [rsp + 0xe0], rsi
mov qword [rsp + 0xe8], rdi
mov qword [rsp + 0x100], r8
mov qword [rsp + 0x108], r9
mov qword [rsp + 0x118], r15
mov qword [rsp + 0x120], r12
mov qword [rsp + 0x88], r13
mov qword [rsp + 0xa0], r10
mov qword [rsp + 0xa8], r11
mov qword [rsp + 0xc0], r14
mov qword [rsp + 0xd8], r13
mov qword [rsp + 0xf0], r10
mov qword [rsp + 0xf8], r11
mov qword [rsp + 0x110], r14
mov qword [rsp + 0x128], r13
vmovdqu xmm5, xmmword [rcx]
mov rbx, qword [rdx + 0x18]
mov qword [rsp + 0x150], r8
vmovups xmmword [rsp + 0x170], xmm5
vmovdqu xmm5, xmmword [rdx + 0x20]
mov rcx, qword [rdx + 0x10]
mov qword [rsp + 0x158], r9
mov qword [rsp + 0x1b0], r8
mov r8, qword [rdx]
mov qword [rsp + 0x1b8], r9
mov r9, qword [rdx + 8]
vmovups xmmword [rsp + 0x1e0], xmm5
vmovdqu xmm5, xmmword [rdx + 0x30]
mov qword [rsp + 0x130], rsi
vmovups xmmword [rsp + 0x1f0], xmm5
vmovdqu xmm5, xmmword [rdx + 0x40]
mov qword [rsp + 0x138], rdi
mov qword [rsp + 0x168], r15
xor r15d, r15d
mov qword [rsp + 0x180], r12
lea r12, [rsp + 0x2e0]
mov qword [rsp + 0x190], rsi
lea rsi, [rsp + 0x1c0]
mov qword [rsp + 0x198], rdi
mov edi, 0x20
mov qword [rsp + 0x140], r10
mov qword [rsp + 0x148], r11
mov qword [rsp + 0x160], r14
mov qword [rsp + 0x188], r13
mov qword [rsp + 0x1a0], r10
mov qword [rsp + 0x1a8], r11
mov qword [rsp + 0x1c0], r8
mov qword [rsp + 0x1c8], r9
mov qword [rsp + 0x1d0], rcx
mov qword [rsp + 0x1d8], rbx
vmovups xmmword [rsp + 0x200], xmm5
vmovdqu xmm5, xmmword [rdx + 0x50]
mov qword [rsp + 0x2c0], r8
vmovups xmmword [rsp + 0x210], xmm5
vmovdqu xmm5, xmmword [rdx + 0x60]
mov qword [rsp + 0x2c8], r9
vmovups xmmword [rsp + 0x220], xmm5
vmovdqu xmm5, xmmword [rdx + 0x70]
mov qword [rsp + 0x2d0], rcx
vmovups xmmword [rsp + 0x230], xmm5
vmovdqu xmm5, xmmword [rdx + 0x80]
mov qword [rsp + 0x2d8], rbx
vmovups xmmword [rsp + 0x240], xmm5
vmovdqu xmm5, xmmword [rdx + 0x90]
vmovups xmmword [rsp + 0x250], xmm5
vmovdqu xmm5, xmmword [rdx + 0xa0]
vmovups xmmword [rsp + 0x260], xmm5
vmovdqu xmm5, xmmword [rdx + 0xb0]
vmovups xmmword [rsp + 0x270], xmm5
vmovdqu xmm5, xmmword [rdx + 0xc0]
vmovups xmmword [rsp + 0x280], xmm5
vmovdqu xmm5, xmmword [rdx + 0xd0]
vmovups xmmword [rsp + 0x290], xmm5
vmovdqu xmm5, xmmword [rdx + 0xe0]
vmovups xmmword [rsp + 0x2a0], xmm5
vmovdqu xmm5, xmmword [rdx + 0xf0]
vmovups xmmword [rsp + 0x2b0], xmm5
jmp 0x508419
sub edi, 1
je 0x50864a
lea rdx, [rsi + r15]
mov r8, r12
lea rcx, [rbp + r15]
call fcn.00507f20
mov edx, dword [rsp + 0x2e0]
vmovdqu xmm2, xmmword [rsp + 0x2e0]
vmovdqu xmm1, xmmword [rsp + 0x2f0]
vpmovzxbw xmm4, xmm2
vpsrldq xmm2, xmm2, 8
vpmovzxwd xmm0, xmm4
vpsrldq xmm4, xmm4, 8
vpmovzxbw xmm2, xmm2
vpmovzxwd xmm4, xmm4
vpmovzxbw xmm3, xmm1
vpaddd xmm0, xmm0, xmm4
vpsrldq xmm1, xmm1, 8
vpmovzxwd xmm4, xmm2
vpsrldq xmm2, xmm2, 8
vpmovzxbw xmm1, xmm1
vpmovzxwd xmm2, xmm2
vpaddd xmm2, xmm4, xmm2
vpaddd xmm0, xmm0, xmm2
vpmovzxwd xmm2, xmm3
vpsrldq xmm3, xmm3, 8
vpmovzxwd xmm3, xmm3
vpaddd xmm3, xmm2, xmm3
vpmovzxwd xmm2, xmm1
vpsrldq xmm1, xmm1, 8
vpaddd xmm0, xmm0, xmm3
vpmovzxwd xmm1, xmm1
vpaddd xmm1, xmm2, xmm1
vpaddd xmm0, xmm0, xmm1
vpsrldq xmm1, xmm0, 8
vpaddd xmm0, xmm0, xmm1
vpsrldq xmm1, xmm0, 4
vpaddd xmm0, xmm0, xmm1
vmovd eax, xmm0
movzx r15d, al
lea rbx, [rsi + r15]
mov r14, r15
xor dword [rbx], edx
mov edx, dword [rsp + 0x2e4]
xor dword [rbx + 4], edx
mov edx, dword [rsp + 0x2e8]
xor dword [rbx + 8], edx
mov edx, dword [rsp + 0x2ec]
xor dword [rbx + 0xc], edx
mov edx, dword [rsp + 0x2f0]
xor dword [rbx + 0x10], edx
mov edx, dword [rsp + 0x2f4]
xor dword [rbx + 0x14], edx
mov edx, dword [rsp + 0x2f8]
xor dword [rbx + 0x18], edx
mov edx, dword [rsp + 0x2fc]
xor dword [rbx + 0x1c], edx
and eax, 0xe0
jne 0x5085c0
lea edx, [r15 + 0x100]
add rdx, rsi
cmp r15d, 0x20
ja 0x5086de
mov r9d, 0x20
sub r9d, r15d
mov eax, r9d
mov r8d, r9d
and eax, 3
shr r8d, 2
je 0x50859b
lea ecx, [r8 - 1]
test r8d, r8d
mov r11d, 4
lea rcx, [rcx*4 + 4]
cmove rcx, r11
mov r8d, ecx
cmp ecx, 8
jae 0x5086ef
and ecx, 4
jne 0x508cf9
test r8d, r8d
je 0x50859b
movzx ecx, byte [rbx]
mov byte [rdx], cl
test r8b, 2
jne 0x508ddc
test eax, eax
je 0x5085c0
mov ecx, r9d
sub ecx, eax
cmp ecx, r9d
jae 0x5085c0
mov r8d, ecx
sub eax, 1
lea rcx, [rdx + r8]
lea rdx, [rbx + r8]
lea r8, [rax + 1]
call sub.msvcrt.dll_memcpy
mov r13d, 0x100
sub r13d, r14d
cmp r13d, 0x1f
ja 0x508410
lea r9d, [r14 - 0xe0]
mov eax, r9d
shr eax, 2
je 0x508607
sub eax, 1
mov rcx, rsi
mov dword [rsp + 0x20], r9d
lea rdx, [rsp + 0x2c0]
lea r8, [rax*4 + 4]
call sub.msvcrt.dll_memmove
mov r9d, dword [rsp + 0x20]
mov edx, r9d
and edx, 3
je 0x508410
mov eax, r9d
sub eax, edx
cmp r9d, eax
jbe 0x508410
lea rcx, [rsi + rax]
sub edx, r9d
lea r8d, [r14 + rdx - 0xe1]
lea rdx, [rsp + rax + 0x2c0]
add r8, 1
call sub.msvcrt.dll_memmove
sub edi, 1
jne 0x508419
mov r9d, r13d
cmp r13d, 0x1f
jbe 0x508728
lea rax, [rbx + 0x20]
cmp rbp, rax
jae 0x508671
lea rax, [rsp + 0xa0]
cmp rbx, rax
jb 0x508d0c
vmovdqu xmm5, xmmword [rsp + 0x80]
vinsertf128 ymm1, ymm5, xmmword [rsp + 0x90], 1
vmovdqu xmm5, xmmword [rbx]
vinsertf128 ymm0, ymm5, xmmword [rbx + 0x10], 1
vxorps ymm0, ymm0, ymm1
vmovups xmmword [rbx], xmm0
vextractf128 xmmword [rbx + 0x10], ymm0, 1
vzeroupper
mov rax, qword [rsp + 0x360]
vmovdqu xmm5, xmmword [rbx]
mov rdi, qword [rsp + 0x360]
mov rdx, qword [rbx + 0x18]
vmovups xmmword [rax], xmm5
mov rax, qword [rbx + 0x10]
mov qword [rdi + 0x18], rdx
mov qword [rdi + 0x10], rax
add rsp, 0x308
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r8d, 8
mov r9d, 0x20
jmp 0x508559
mov r8d, ecx
mov r10, qword [rbx + r8 - 8]
mov qword [rdx + r8 - 8], r10
lea r8d, [rcx - 1]
cmp r8d, 8
jb 0x50859b
and r8d, 0xfffffff8
xor ecx, ecx
mov r10d, ecx
add ecx, 8
mov r11, qword [rbx + r10]
mov qword [rdx + r10], r11
cmp ecx, r8d
jb 0x508710
jmp 0x50859b
mov ecx, r13d
shr ecx, 2
je 0x50879e
lea rax, [rbx + 0x10]
cmp rbp, rax
lea rax, [rsp + 0x90]
setae dl
cmp rbx, rax
setae al
or dl, al
je 0x508d60
lea eax, [rcx - 1]
cmp eax, 2
jbe 0x508d60
vmovdqu xmm5, xmmword [rbx]
vpxor xmm0, xmm5, xmmword [rsp + 0x80]
vmovups xmmword [rbx], xmm0
cmp ecx, 4
je 0x50879e
mov eax, dword [rsp + 0x90]
xor dword [rbx + 0x10], eax
cmp ecx, 5
je 0x50879e
mov eax, dword [rsp + 0x94]
xor dword [rbx + 0x14], eax
cmp ecx, 7
jne 0x508e10
mov eax, dword [rsp + 0x98]
xor dword [rbx + 0x18], eax
mov r15d, r9d
and r15d, 3
je 0x508c9a
mov eax, r9d
sub eax, r15d
cmp r9d, eax
jbe 0x508c9a
lea r8, [rsp + 0x40]
mov edx, eax
lea r11, [rbx + rdx + 0x10]
lea r13, [rsp + rdx + 0x80]
lea r12, [rbx + rdx]
cmp r13, r11
lea r11, [rsp + rdx + 0x90]
setae r10b
cmp r12, r11
setae r11b
or r10b, r11b
je 0x508c5f
lea r10d, [r15 - 1]
lea r11d, [r14 + r15 - 0x100]
cmp r10d, 0xe
jbe 0x508c5f
add r11d, r9d
vmovdqu xmm5, xmmword [r13]
vpxor xmm0, xmm5, xmmword [r12]
vmovups xmmword [r12], xmm0
mov edx, r11d
and edx, 0xfffffff0
add eax, edx
cmp r11d, edx
je 0x508980
mov edx, eax
movzx r11d, byte [rsp + rdx + 0x80]
xor byte [rbx + rdx], r11b
lea edx, [rax + 1]
cmp r9d, edx
jbe 0x508980
movzx r11d, byte [rsp + rdx + 0x80]
xor byte [rbx + rdx], r11b
lea edx, [rax + 2]
cmp r9d, edx
jbe 0x508980
movzx r11d, byte [rsp + rdx + 0x80]
xor byte [rbx + rdx], r11b
lea edx, [rax + 3]
cmp r9d, edx
jbe 0x508980
movzx r11d, byte [rsp + rdx + 0x80]
xor byte [rbx + rdx], r11b
lea edx, [rax + 4]
cmp r9d, edx
jbe 0x508980
movzx r11d, byte [rsp + rdx + 0x80]
xor byte [rbx + rdx], r11b
lea edx, [rax + 5]
cmp r9d, edx
jbe 0x508980
movzx r11d, byte [rsp + rdx + 0x80]
xor byte [rbx + rdx], r11b
lea edx, [rax + 6]
cmp r9d, edx
jbe 0x508980
movzx r11d, byte [rsp + rdx + 0x80]
xor byte [rbx + rdx], r11b
lea edx, [rax + 7]
cmp r9d, edx
jbe 0x508980
movzx r11d, byte [rsp + rdx + 0x80]
xor byte [rbx + rdx], r11b
lea edx, [rax + 8]
cmp r9d, edx
jbe 0x508980
movzx r11d, byte [rsp + rdx + 0x80]
xor byte [rbx + rdx], r11b
lea edx, [rax + 9]
cmp r9d, edx
jbe 0x508980
movzx r11d, byte [rsp + rdx + 0x80]
xor byte [rbx + rdx], r11b
lea edx, [rax + 0xa]
cmp r9d, edx
jbe 0x508980
movzx r11d, byte [rsp + rdx + 0x80]
xor byte [rbx + rdx], r11b
lea edx, [rax + 0xb]
cmp r9d, edx
jbe 0x508980
movzx r11d, byte [rsp + rdx + 0x80]
xor byte [rbx + rdx], r11b
lea edx, [rax + 0xc]
cmp r9d, edx
jbe 0x508980
movzx r11d, byte [rsp + rdx + 0x80]
xor byte [rbx + rdx], r11b
lea edx, [rax + 0xd]
cmp r9d, edx
jbe 0x508980
movzx r11d, byte [rsp + rdx + 0x80]
add eax, 0xe
xor byte [rbx + rdx], r11b
cmp r9d, eax
jbe 0x508980
movzx edx, byte [rsp + rax + 0x80]
xor byte [rbx + rax], dl
mov r13d, r9d
lea r12d, [r14 - 0xe0]
add rbp, r13
mov r10d, r12d
shr r10d, 2
je 0x508ab1
lea rax, [r8 + r13 + 0x40]
mov qword [rsp + 0x20], rax
lea rax, [r8 + r13 + 0x60]
lea r11d, [r10 - 1]
cmp rsi, rax
setae byte [rsp + 0x28]
movzx edx, byte [rsp + 0x28]
lea rax, [rsp + 0x1e0]
cmp qword [rsp + 0x20], rax
mov qword [rsp + 0x28], rax
setae al
or dl, al
je 0x508db0
cmp r11d, 6
jbe 0x508db0
lea rdx, [r8 + r13 + 0x40]
mov r11d, r12d
mov rax, rsi
shr r11d, 5
mov dword [rsp + 0x20], r11d
sub r11d, 1
shl r11, 5
add r11, qword [rsp + 0x28]
vmovdqu xmm5, xmmword [rdx]
add rax, 0x20
vinsertf128 ymm1, ymm5, xmmword [rdx + 0x10], 1
add rdx, 0x20
vmovdqu xmm5, xmmword [rax - 0x20]
vinsertf128 ymm0, ymm5, xmmword [rax - 0x10], 1
vxorps ymm0, ymm0, ymm1
vmovups xmmword [rax - 0x20], xmm0
vextractf128 xmmword [rax - 0x10], ymm0, 1
cmp rax, r11
jne 0x508a02
mov eax, dword [rsp + 0x20]
shl eax, 3
cmp eax, r10d
je 0x508ab1
mov edx, eax
mov r11d, dword [rbp + rdx*4]
xor dword [rsi + rdx*4], r11d
lea edx, [rax + 1]
cmp r10d, edx
jbe 0x508ab1
mov r11d, dword [rbp + rdx*4]
xor dword [rsi + rdx*4], r11d
lea edx, [rax + 2]
cmp r10d, edx
jbe 0x508ab1
mov r11d, dword [rbp + rdx*4]
xor dword [rsi + rdx*4], r11d
lea edx, [rax + 3]
cmp r10d, edx
jbe 0x508ab1
mov r11d, dword [rbp + rdx*4]
xor dword [rsi + rdx*4], r11d
lea edx, [rax + 4]
cmp r10d, edx
jbe 0x508ab1
mov r11d, dword [rbp + rdx*4]
xor dword [rsi + rdx*4], r11d
lea edx, [rax + 5]
cmp r10d, edx
jbe 0x508ab1
add eax, 6
mov r11d, dword [rbp + rdx*4]
xor dword [rsi + rdx*4], r11d
cmp r10d, eax
jbe 0x508ab1
mov edx, dword [rbp + rax*4]
xor dword [rsi + rax*4], edx
mov eax, r12d
and eax, 3
mov dword [rsp + 0x20], eax
je 0x508b94
mov eax, r12d
sub eax, dword [rsp + 0x20]
mov dword [rsp + 0x3c], eax
cmp r12d, eax
jbe 0x508b94
lea rdx, [r13 + rax + 0x40]
lea r11, [rax + 0x180]
mov qword [rsp + 0x28], rdx
lea rdx, [r13 + rax + 0x60]
mov qword [rsp + 0x30], r11
cmp r11, rdx
lea rdx, [rax + 0x1a0]
setge r11b
cmp rdx, qword [rsp + 0x28]
setle dl
or r11b, dl
je 0x508c75
mov edx, dword [rsp + 0x20]
sub edx, r12d
lea edx, [r14 + rdx - 0xe1]
cmp edx, 0x1e
jbe 0x508c75
mov rdx, qword [rsp + 0x30]
mov r11d, 0x8000000
xor eax, eax
add rdx, r8
add r8, qword [rsp + 0x28]
add edi, 1
vmovdqu xmm5, xmmword [r8 + rax]
vinsertf128 ymm0, ymm5, xmmword [r8 + rax + 0x10], 1
vmovdqu xmm5, xmmword [rdx + rax]
vinsertf128 ymm1, ymm5, xmmword [rdx + rax + 0x10], 1
vxorps ymm0, ymm0, ymm1
vmovups xmmword [rdx + rax], xmm0
vextractf128 xmmword [rdx + rax + 0x10], ymm0, 1
add rax, 0x20
cmp edi, r11d
jb 0x508b3c
mov edx, dword [rsp + 0x20]
mov eax, dword [rsp + 0x3c]
test edx, edx
je 0x508b94
mov edx, eax
add eax, 1
movzx r8d, byte [rbp + rdx]
xor byte [rsi + rdx], r8b
cmp r12d, eax
ja 0x508b80
test ecx, ecx
je 0x508bbc
lea eax, [rcx - 1]
lea rax, [rax*4 + 4]
cmp eax, 8
jae 0x508ca4
test al, 4
jne 0x508ded
test eax, eax
jne 0x508ce7
test r15d, r15d
je 0x508c92
mov edx, r9d
sub edx, r15d
cmp r9d, edx
jbe 0x508c92
mov rcx, qword [rsp + 0x360]
lea eax, [r15 - 1]
mov dword [rsp + 0x28], r10d
lea r8, [rax + 1]
add rcx, rdx
add rdx, rbx
vzeroupper
call sub.msvcrt.dll_memcpy
mov r10d, dword [rsp + 0x28]
add r13, qword [rsp + 0x360]
test r10d, r10d
je 0x508c20
mov rdx, rsi
mov rcx, r13
lea eax, [r10 - 1]
lea r8, [rax*4 + 4]
call sub.msvcrt.dll_memcpy
mov eax, dword [rsp + 0x20]
test eax, eax
je 0x5086ca
mov eax, dword [rsp + 0x20]
mov edx, r12d
sub edx, eax
cmp r12d, edx
jbe 0x5086ca
lea rcx, [r13 + rdx]
sub eax, r12d
add rdx, rsi
lea eax, [r14 + rax - 0xe1]
lea r8, [rax + 1]
call sub.msvcrt.dll_memcpy
jmp 0x5086ca
movzx eax, byte [rbp + rdx]
xor byte [rbx + rdx], al
add rdx, 1
cmp r9d, edx
ja 0x508c5f
jmp 0x508980
lea r8, [rsi + rax]
movzx edx, byte [r8]
xor dl, byte [rbp + rax]
add rax, 1
mov byte [r8], dl
cmp r12d, eax
ja 0x508c75
jmp 0x508b94
vzeroupper
jmp 0x508bfc
lea r8, [rsp + 0x40]
jmp 0x508980
mov edx, eax
mov rdi, qword [rsp + 0x360]
sub eax, 1
mov rcx, qword [rbx + rdx - 8]
mov qword [rdi + rdx - 8], rcx
cmp eax, 8
jb 0x508bbc
and eax, 0xfffffff8
xor edx, edx
mov ecx, edx
mov rdi, qword [rsp + 0x360]
add edx, 8
mov r8, qword [rbx + rcx]
mov qword [rdi + rcx], r8
cmp edx, eax
jb 0x508cc9
jmp 0x508bbc
movzx eax, byte [rbx]
mov rdi, qword [rsp + 0x360]
mov byte [rdi], al
jmp 0x508bbc
mov ecx, dword [rbx]
mov dword [rdx], ecx
mov ecx, dword [rbx + r8 - 4]
mov dword [rdx + r8 - 4], ecx
jmp 0x50859b
mov eax, dword [rsp + 0x80]
xor dword [rbx], eax
mov eax, dword [rsp + 0x84]
xor dword [rbx + 4], eax
mov eax, dword [rsp + 0x88]
xor dword [rbx + 8], eax
mov eax, dword [rsp + 0x8c]
xor dword [rbx + 0xc], eax
mov eax, dword [rsp + 0x90]
xor dword [rbx + 0x10], eax
mov eax, dword [rsp + 0x94]
xor dword [rbx + 0x14], eax
mov eax, dword [rsp + 0x98]
xor dword [rbx + 0x18], eax
mov eax, dword [rsp + 0x9c]
xor dword [rbx + 0x1c], eax
jmp 0x5086a2
mov eax, dword [rsp + 0x80]
xor dword [rbx], eax
cmp ecx, 1
je 0x50879e
mov eax, dword [rsp + 0x84]
xor dword [rbx + 4], eax
cmp ecx, 2
je 0x50879e
mov eax, dword [rsp + 0x88]
xor dword [rbx + 8], eax
cmp ecx, 3
je 0x50879e
mov eax, dword [rsp + 0x8c]
xor dword [rbx + 0xc], eax
cmp ecx, 4
jne 0x508772
jmp 0x50879e
mov rax, rsi
mov rdx, rbp
mov dword [rsp + 0x20], ecx
lea r11, [rsp + r11*4 + 0x1c4]
mov ecx, dword [rdx]
add rdx, 4
xor dword [rax], ecx
add rax, 4
cmp r11, rax
jne 0x508dc2
mov ecx, dword [rsp + 0x20]
jmp 0x508ab1
movzx ecx, word [rbx + r8 - 2]
mov word [rdx + r8 - 2], cx
jmp 0x50859b
mov edx, dword [rbx]
mov eax, eax
mov rdi, qword [rsp + 0x360]
mov dword [rdi], edx
mov edx, dword [rbx + rax - 4]
mov rdi, qword [rsp + 0x360]
mov dword [rdi + rax - 4], edx
jmp 0x508bbc
mov ecx, 6
jmp 0x50879e