Function at 0x1800046f0
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x500
mov rax, qword [0x18001c030]
xor rax, rsp
mov qword [rsp + 0x4e0], rax
xor edx, edx
mov rsi, rcx
lea rcx, [rsp + 0x70]
lea r8d, [rdx + 0x64]
call sub.MSVCR90.dll_memset
cmp qword [rsi + 0x28], 0xffffffffffffffff
je 0x180004afb
xor edi, edi
mov ebx, edi
nop
mov r10, qword [rsi + 0x10]
mov rcx, qword [rsi + 0x28]
movsxd rax, ebx
mov r8d, 0xd
lea rdx, [rsp + rax + 0x70]
xor r9d, r9d
sub r8d, ebx
call qword [r10 + 0x58]
test eax, eax
jle 0x180004afb
add ebx, eax
cmp ebx, 0xd
jl 0x180004730
mov r8d, edi
lea r9, [rsp + 0x70]
nop word [rax + rax]
movzx ecx, byte [r9]
mov eax, 0x51eb851f
inc r9
xor cl, 0xb2
mul r8d
shr edx, 5
mov al, 0x64
imul dl
add al, cl
sub al, r8b
inc r8d
mov byte [r9 - 1], al
cmp r8d, 0xd
jb 0x180004770
cmp byte [rsp + 0x78], 1
lea rcx, [rsp + 0x70]
lea rdx, [rsp + 0x48]
mov rax, qword [rcx]
mov qword [rdx], rax
mov eax, dword [rcx + 8]
mov dword [rdx + 8], eax
movzx eax, byte [rcx + 0xc]
mov byte [rdx + 0xc], al
jne 0x180004afb
mov qword [rsp + 0x528], rbp
mov ebp, dword [rsp + 0x79]
mov qword [rsp + 0x530], r12
mov rcx, rbp
call fcn.180005180
mov r8, rbp
xor edx, edx
mov rcx, rax
mov r12, rax
call sub.MSVCR90.dll_memset
cmp qword [rsi + 0x28], 0xffffffffffffffff
je 0x180004af4
lea rcx, [rsi + 8]
mov r8d, ebp
mov rdx, r12
call fcn.180004440
test al, al
je 0x180004af4
mov qword [rsp + 0x4f8], r13
mov ecx, 0x1400000
mov qword [rsp + 0x4f0], r14
mov r14d, edi
mov r13, rdi
mov dword [rsp + 0x40], 0x1400000
call sub.MSVCR90.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__
mov rbx, rax
test rax, rax
jne 0x180004848
mov ebx, edi
jmp 0x1800048e1
mov ebp, dword [rsp + 0x51]
lea rdx, [rsp + 0x40]
mov r8, r12
mov r9d, ebp
mov rcx, rax
call fcn.180005450
test eax, eax
je 0x1800048a3
cmp eax, 0xfffffffb
jne 0x1800048b8
mov rcx, rbx
call sub.MSVCR90.dll_void___cdecl_operator_delete_void____ptr64_
mov r11d, dword [rsp + 0x40]
add r11d, 0x100000
mov ecx, r11d
mov dword [rsp + 0x40], r11d
call sub.MSVCR90.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__
lea rdx, [rsp + 0x40]
mov r9d, ebp
mov rcx, rax
mov r8, r12
mov rbx, rax
call fcn.180005450
test eax, eax
jne 0x180004863
mov ecx, dword [rsp + 0x40]
call sub.MSVCR90.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__
mov rbp, rax
test rax, rax
jne 0x1800048c4
mov ebx, edi
jmp 0x1800048e1
mov rcx, rbx
call sub.MSVCR90.dll_void___cdecl_operator_delete_void____ptr64_
mov ebx, edi
jmp 0x1800048e1
mov r8d, dword [rsp + 0x40]
mov rdx, rbx
mov rcx, rax
call sub.MSVCR90.dll_memcpy
mov r14d, dword [rsp + 0x40]
mov r13, rbp
mov ebx, 1
mov rcx, r12
call sub.MSVCR90.dll_void___cdecl_operator_delete_void____ptr64_
test ebx, ebx
jne 0x180004932
mov rcx, r13
call sub.MSVCR90.dll_void___cdecl_operator_delete_void____ptr64_
xor eax, eax
mov r13, qword [rsp + 0x4f8]
mov r14, qword [rsp + 0x4f0]
mov rbp, qword [rsp + 0x528]
mov r12, qword [rsp + 0x530]
mov rcx, qword [rsp + 0x4e0]
xor rcx, rsp
call fcn.180014460
add rsp, 0x500
pop rdi
pop rsi
pop rbx
ret
mov qword [rsp + 0x38], rdi
lea rax, [0x180002280]
lea r9, [0x180002250]
mov qword [rsp + 0x30], rax
lea rax, [0x180002270]
lea r8, [0x180002240]
mov qword [rsp + 0x28], rax
lea rax, [0x180002260]
mov edx, r14d
mov rcx, r13
mov qword [rsp + 0x20], rax
call fcn.180002290
mov rcx, r13
mov rbx, rax
call sub.MSVCR90.dll_void___cdecl_operator_delete_void____ptr64_
mov dword [rsp + 0x54], 2
test rbx, rbx
jne 0x180004a43
lea rcx, [rsp + 0xe0]
xor edx, edx
mov r8d, 0x400
mov dword [rsp + 0x50], edi
mov dword [rsp + 0x58], 1
call sub.MSVCR90.dll_memset
mov r10, qword [rsi + 0x28]
lea rcx, [rsp + 0x48]
lea r11, [rsp + 0xe0]
mov rax, qword [rcx]
mov qword [r11], rax
mov rax, qword [rcx + 8]
mov qword [r11 + 8], rax
mov eax, dword [rcx + 0x10]
mov dword [r11 + 0x10], eax
cmp r10, 0xffffffffffffffff
je 0x180004a3c
lea r8, [rsp + 0xe0]
nop word [rax + rax]
mov eax, 0x51eb851f
inc r8
mul edi
mov al, 0x64
shr edx, 5
imul dl
mov cl, al
movzx eax, dil
inc edi
sub al, cl
add al, byte [r8 - 1]
xor al, 0xb2
mov byte [r8 - 1], al
cmp edi, 0x14
jb 0x1800049f0
mov rax, qword [rsi + 0x10]
xor r9d, r9d
lea rdx, [rsp + 0xe0]
lea r8d, [r9 + 0x14]
mov rcx, r10
call qword [rax + 0x50]
cmp eax, 0xffffffff
jne 0x180004aec
xor eax, eax
jmp 0x1800048f7
lea rcx, [rsp + 0xe0]
xor edx, edx
mov r8d, 0x400
mov dword [rsp + 0x50], edi
mov dword [rsp + 0x58], 2
call sub.MSVCR90.dll_memset
mov r10, qword [rsi + 0x28]
lea rcx, [rsp + 0x48]
lea r11, [rsp + 0xe0]
mov rax, qword [rcx]
mov qword [r11], rax
mov rax, qword [rcx + 8]
mov qword [r11 + 8], rax
mov eax, dword [rcx + 0x10]
mov dword [r11 + 0x10], eax
cmp r10, 0xffffffffffffffff
je 0x180004a3c
lea r8, [rsp + 0xe0]
nop dword [rax + rax]
mov eax, 0x51eb851f
inc r8
mul edi
mov al, 0x64
shr edx, 5
imul dl
mov cl, al
movzx eax, byte [r8 - 1]
sub al, cl
add al, dil
inc edi
xor al, 0xb2
mov byte [r8 - 1], al
cmp edi, 0x14
jb 0x180004aa0
mov rax, qword [rsi + 0x10]
xor r9d, r9d
lea rdx, [rsp + 0xe0]
lea r8d, [r9 + 0x14]
mov rcx, r10
call qword [rax + 0x50]
cmp eax, 0xffffffff
je 0x180004a3c
mov rax, rbx
jmp 0x1800048f7
xor eax, eax
jmp 0x180004907
xor eax, eax
jmp 0x180004917