Function at 0x4e2070
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x108
cmp ecx, 0x400
mov qword [rsp + 0x40], r8
mov r13, r9
mov qword [rsp + 0x90], 0
mov qword [rsp + 0x98], 0
je 0x4e20c4
mov eax, 0x2c
add rsp, 0x108
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
cmp edx, 0xa0
jne 0x4e20ab
test r8, r8
je 0x4e2525
cmp r9, 0x13
mov eax, 0x2d
jbe 0x4e20b0
cmp r13, 0x14
mov ecx, 0x14
cmovae rcx, r13
call fcn.004c8550
test rax, rax
mov rbp, rax
je 0x4e2620
mov ecx, 2
lea r14, [rsp + 0xc0]
lea rbx, [rsp + 0xe0]
call fcn.004cc290
mov ecx, 0x400
mov qword [rsp + 0x50], rax
mov r15, r14
call fcn.004cc310
mov ecx, 0x400
mov rsi, rax
mov qword [rsp + 0x78], rax
call fcn.004cc310
mov qword [rsp + 0x68], rax
lea rax, [rsp + 0x98]
mov qword [rsp + 0x30], r13
mov qword [rsp + 0x58], 0
mov r13, rsi
mov qword [rsp + 0x60], rax
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x80], rax
lea rax, [rsp + 0x90]
mov qword [rsp + 0x38], rax
cmp qword [rsp + 0x40], 0
je 0x4e22a7
mov rsi, qword [rsp + 0x30]
mov rdx, qword [rsp + 0x40]
mov rcx, rbp
mov r8, rsi
mov r12d, esi
call sub.msvcrt.dll_memcpy
sub r12d, 1
js 0x4e21d6
movsxd rdx, r12d
add rdx, rbp
add byte [rdx], 1
jne 0x4e21d6
movsxd rax, r12d
mov edx, r12d
lea rax, [rbp + rax - 1]
jmp 0x4e21d1
movzx esi, byte [rax]
sub rax, 1
lea ecx, [rsi + 1]
mov byte [rax + 1], cl
test cl, cl
jne 0x4e21d6
sub edx, 1
jns 0x4e21c0
mov rsi, qword [rsp + 0x30]
mov r8, qword [rsp + 0x40]
mov rdx, rbx
mov ecx, 2
mov r9, rsi
call fcn.004da380
mov r9, rsi
mov r8, rbp
mov rdx, r15
mov ecx, 2
call fcn.004da380
xor eax, eax
movzx edx, byte [r15 + rax]
xor byte [rbx + rax], dl
add rax, 1
cmp rax, 0x14
jne 0x4e2205
mov rcx, qword [rsp + 0x98]
call fcn.004cc330
mov rcx, qword [rsp + 0x60]
mov qword [rsp + 0x20], 0
mov r9d, 0x14
mov r8, rbx
mov edx, 5
mov qword [rsp + 0x98], 0
call fcn.004ccae0
movzx r14d, ax
test r14d, r14d
jne 0x4e2651
mov rcx, qword [rsp + 0x98]
mov edx, 0x9f
call fcn.004d0200
mov rcx, qword [rsp + 0x98]
xor edx, edx
call fcn.004d01b0
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x98]
xor r9d, r9d
mov qword [rsp + 0x20], 0
mov r8d, 0x40
call fcn.004e02e0
test eax, eax
jne 0x4e22fc
mov rsi, qword [rsp + 0x80]
mov edx, 0x14
mov r12d, 0x13
mov rcx, rsi
call fcn.004dfad0
mov rax, qword [rsp + 0xa0]
mov edx, 0x13
mov qword [rsp + 0x30], 0x14
mov qword [rsp + 0x40], rsi
mov qword [rbp], rax
mov rax, qword [rsp + 0xa8]
mov qword [rbp + 8], rax
mov eax, dword [rsp + 0xb0]
mov dword [rbp + 0x10], eax
jmp 0x4e21a9
mov ecx, 0x400
call fcn.004cc310
mov qword [rsp + 0x58], rax
movsxd rax, r12d
mov dword [rsp + 0x74], 0
lea rsi, [rbp + rax - 1]
mov qword [rsp + 0x88], rbx
mov r14, rax
mov qword [rsp + 0x48], rsi
xor edx, edx
mov rcx, r13
xor ebx, ebx
xor esi, esi
call fcn.004cc1c0
nop dword [rax]
test r12d, r12d
js 0x4e2379
lea rdx, [rbp + r14]
add byte [rdx], 1
jne 0x4e2379
mov rax, qword [rsp + 0x48]
mov edx, r12d
jmp 0x4e2371
movzx edi, byte [rax]
sub rax, 1
lea ecx, [rdi + 1]
mov byte [rax + 1], cl
test cl, cl
jne 0x4e2379
sub edx, 1
cmp edx, 0xffffffff
jne 0x4e2360
mov r9, qword [rsp + 0x30]
mov r8, rbp
mov rdx, r15
mov ecx, 2
call fcn.004da380
mov rcx, qword [rsp + 0x90]
call fcn.004cc330
mov rcx, qword [rsp + 0x38]
mov qword [rsp + 0x20], 0
mov r9d, 0x14
mov r8, r15
mov edx, 5
mov qword [rsp + 0x90], 0
call fcn.004ccae0
movzx edi, ax
test edi, edi
jne 0x4e24d0
cmp esi, 6
je 0x4e2659
mov rcx, qword [rsp + 0x90]
mov r8d, ebx
add ebx, 0xa0
add esi, 1
mov rdx, rcx
call fcn.004d0690
mov r8, qword [rsp + 0x90]
mov rdx, r13
mov rcx, r13
call fcn.004cd700
cmp ebx, 0x460
jne 0x4e2340
mov rsi, qword [rsp + 0x68]
xor edx, edx
mov rcx, rsi
call fcn.004cc1c0
mov rcx, rsi
mov edx, 0x3ff
call fcn.004d0200
mov rdx, rsi
mov rcx, rsi
mov r8, r13
call fcn.004cd700
mov rdx, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x90]
mov r8d, 1
call fcn.004cdee0
mov rcx, qword [rsp + 0x90]
mov rdx, rsi
mov r8, rcx
call fcn.004ced20
mov rcx, qword [rsp + 0x90]
mov r8d, 1
mov rdx, rcx
call fcn.004cdb30
mov rdx, rsi
mov rsi, qword [rsp + 0x58]
mov r8, qword [rsp + 0x90]
mov rcx, rsi
call fcn.004cdcf0
mov rcx, rsi
call fcn.004d00e0
cmp eax, 0x3fe
ja 0x4e2538
add dword [rsp + 0x74], 1
cmp dword [rsp + 0x74], 0x1000
jne 0x4e232b
mov rbx, qword [rsp + 0x88]
jmp 0x4e217c
mov r15d, edi
mov rcx, qword [rsp + 0x90]
call fcn.004cc330
mov rcx, qword [rsp + 0x68]
call fcn.004cc330
mov rcx, qword [rsp + 0x78]
call fcn.004cc330
mov rcx, qword [rsp + 0x58]
call fcn.004cc330
mov rcx, qword [rsp + 0x98]
call fcn.004cc330
mov rcx, rbp
call fcn.004c8620
mov rcx, qword [rsp + 0x50]
call fcn.004cc330
mov eax, r15d
jmp 0x4e20b0
test r9, r9
mov eax, 0x2d
jne 0x4e20b0
jmp 0x4e20e0
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x58]
xor r9d, r9d
mov qword [rsp + 0x20], 0
mov r8d, 0x40
call fcn.004e02e0
test eax, eax
je 0x4e24b0
cmp qword [rsp + 0x170], 0
mov r15d, edi
mov r13, qword [rsp + 0x30]
je 0x4e2593
mov rax, qword [rsp + 0x98]
mov rsi, qword [rsp + 0x170]
mov qword [rsp + 0x98], 0
mov qword [rsi], rax
cmp qword [rsp + 0x178], 0
je 0x4e25b7
mov rsi, qword [rsp + 0x58]
mov rax, qword [rsp + 0x178]
mov qword [rsp + 0x58], 0
mov qword [rax], rsi
cmp qword [rsp + 0x180], 0
je 0x4e25d0
mov rax, qword [rsp + 0x180]
mov esi, dword [rsp + 0x74]
mov dword [rax], esi
cmp qword [rsp + 0x188], 0
je 0x4e24d3
cmp qword [rsp + 0x190], 0
je 0x4e24d3
mov rdx, qword [rsp + 0x40]
mov rcx, rbp
mov r8, r13
call sub.msvcrt.dll_memcpy
mov rax, qword [rsp + 0x188]
mov qword [rax], rbp
mov rax, qword [rsp + 0x190]
xor ebp, ebp
mov qword [rax], r13
jmp 0x4e24d3
call fcn.00512400
mov qword [rsp + 0x58], 0
mov r15d, eax
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x78], 0
mov qword [rsp + 0x50], 0
jmp 0x4e24d3
mov r15d, r14d
jmp 0x4e24d3
mov rcx, qword [rsp + 0x90]
mov edx, 0x3f
call fcn.004d0290
mov rcx, qword [rsp + 0x90]
mov r8d, 0x3c0
mov rdx, rcx
call fcn.004d0690
mov r8, qword [rsp + 0x90]
mov rdx, r13
mov rcx, r13
call fcn.004cd700
jmp 0x4e2417