Function at 0x643750
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
mov rax, qword [rsp + 0xc0]
mov ebx, dword [rax]
mov ebp, dword [rax + 4]
mov r13, rdx
mov eax, r8d
mov edx, dword [rsp + 0xc8]
mov r14, rcx
sub eax, 8
mov dword [rsp + 0xb0], r8d
mov rdi, r9
mov dword [rsp + 0x2c], eax
test edx, edx
je 0x6438a0
test eax, eax
js 0x643b50
shr eax, 3
lea rsi, [rsp + 0x48]
lea r15d, [rax + 1]
mov dword [rsp + 0x20], eax
lea rax, [r15*8]
mov r15, r13
mov qword [rsp + 0x30], rax
lea r12, [rcx + rax]
mov eax, ebp
nop dword [rax]
movq xmm1, qword [r14]
movd xmm2, eax
movd xmm0, ebx
mov rdx, rdi
punpckldq xmm0, xmm2
mov rcx, rsi
add r15, 8
add r14, 8
pxor xmm0, xmm1
movq qword [rsp + 0x48], xmm0
call sym.RC2_encrypt
mov ebx, dword [rsp + 0x48]
movzx eax, bh
mov byte [r15 - 8], bl
mov byte [r15 - 7], al
mov eax, ebx
shr eax, 0x10
mov byte [r15 - 6], al
mov eax, ebx
shr eax, 0x18
mov byte [r15 - 5], al
mov eax, dword [rsp + 0x4c]
mov edx, eax
mov byte [r15 - 4], al
movzx ecx, ah
shr edx, 0x10
mov byte [r15 - 3], cl
mov byte [r15 - 2], dl
mov edx, eax
shr edx, 0x18
mov byte [r15 - 1], dl
cmp r12, r14
jne 0x6437c8
mov ebp, eax
mov eax, dword [rsp + 0x20]
mov esi, dword [rsp + 0xb0]
add r13, qword [rsp + 0x30]
neg eax
shl eax, 3
lea ecx, [rsi + rax - 0x10]
add eax, dword [rsp + 0x2c]
mov dword [rsp + 0xb0], eax
cmp ecx, 0xfffffff8
je 0x643b70
movsxd rcx, dword [rsp + 0xb0]
cmp dword [rsp + 0xb0], 7
lea r10, [r14 + rcx]
ja case.0x64389b.0
mov eax, dword [rsp + 0xb0]
lea r9, [0x007c7460]
movsxd rcx, dword [r9 + rax*4]
add rcx, r9
jmp rcx
test eax, eax
js 0x643b60
shr eax, 3
lea rsi, [rsp + 0x48]
mov qword [rsp + 0xa0], rcx
mov r14d, ebx
mov dword [rsp + 0x30], eax
add eax, 1
shl rax, 3
mov qword [rsp + 0x38], rax
add rax, r13
mov qword [rsp + 0x20], rax
mov rax, rsi
mov esi, ebp
mov rbp, rcx
mov r12, rax
nop
mov rax, qword [rbp]
mov rdx, rdi
mov rcx, r12
mov ebx, r14d
mov r15d, esi
mov r14d, dword [rbp]
mov esi, dword [rbp + 4]
add r13, 8
mov qword [rsp + 0x48], rax
add rbp, 8
call sym.RC2_decrypt
xor ebx, dword [rsp + 0x48]
mov eax, dword [rsp + 0x4c]
mov edx, ebx
movzx ecx, bh
mov byte [r13 - 8], bl
xor eax, r15d
shr edx, 0x18
mov byte [r13 - 7], cl
mov ecx, ebx
mov byte [r13 - 5], dl
mov edx, eax
movzx ebx, ah
shr ecx, 0x10
mov byte [r13 - 4], al
shr edx, 0x10
shr eax, 0x18
mov byte [r13 - 6], cl
mov byte [r13 - 3], bl
mov byte [r13 - 2], dl
mov byte [r13 - 1], al
cmp qword [rsp + 0x20], r13
jne 0x6438e0
mov ecx, dword [rsp + 0x30]
mov eax, dword [rsp + 0xb0]
mov ebx, r14d
mov ebp, esi
mov r14, qword [rsp + 0xa0]
add r14, qword [rsp + 0x38]
neg ecx
shl ecx, 3
lea r8d, [rax + rcx - 0x10]
add ecx, dword [rsp + 0x2c]
mov dword [rsp + 0xb0], ecx
cmp r8d, 0xfffffff8
je 0x643a27
mov rcx, qword [r14]
mov rdx, rdi
mov esi, dword [r14]
mov r12d, dword [r14 + 4]
mov qword [rsp + 0x48], rcx
lea rcx, [rsp + 0x48]
call sym.RC2_decrypt
xor ebx, dword [rsp + 0x48]
xor ebp, dword [rsp + 0x4c]
movsxd rdx, dword [rsp + 0xb0]
cmp dword [rsp + 0xb0], 7
lea rax, [r13 + rdx]
ja case.0x6439e3.0
mov edi, dword [rsp + 0xb0]
lea rcx, [0x007c7480]
movsxd rdx, dword [rcx + rdi*4]
add rdx, rcx
jmp rdx
mov edx, ebp
sub rax, 1
shr edx, 0x10
mov byte [rax], dl
mov ecx, ebp
sub rax, 1
mov byte [rax], ch
mov byte [rax - 1], bpl
lea rdx, [rax - 1]
mov ecx, ebx
lea rax, [rdx - 1]
shr ecx, 0x18
mov byte [rdx - 1], cl
mov ecx, ebx
lea rdx, [rax - 1]
shr ecx, 0x10
mov byte [rax - 1], cl
mov byte [rdx - 1], bh
lea rax, [rdx - 1]
mov byte [rax - 1], bl
mov ebp, r12d
mov ebx, esi
mov rax, qword [rsp + 0xc0]
mov dword [rax], ebx
mov dword [rax + 4], ebp
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
xor r8d, r8d
movzx ecx, byte [r10 - 1]
sub r10, 1
shl ecx, 8
or ecx, r8d
movzx r9d, byte [r10 - 1]
lea r8, [r10 - 1]
or ecx, r9d
xor ebp, ecx
lea r10, [r8 - 1]
movzx r8d, byte [r8 - 1]
shl r8d, 0x18
movzx ecx, byte [r10 - 1]
lea r9, [r10 - 1]
shl ecx, 0x10
or r8d, ecx
movzx ecx, byte [r9 - 1]
lea r10, [r9 - 1]
shl ecx, 8
or ecx, r8d
movzx r8d, byte [r10 - 1]
or ecx, r8d
xor ebx, ecx
movd xmm0, ebx
movd xmm3, ebp
lea rcx, [rsp + 0x48]
mov rdx, rdi
punpckldq xmm0, xmm3
movq qword [rsp + 0x48], xmm0
call sym.RC2_encrypt
mov ecx, dword [rsp + 0x4c]
mov ebx, dword [rsp + 0x48]
mov edx, ecx
movzx esi, cl
movzx edi, ch
shr ecx, 0x18
mov r11d, ecx
mov rcx, qword [rsp + 0x48]
movzx eax, bh
mov r8d, ebx
shr r8d, 0x10
movzx r9d, bl
mov r10d, eax
shr ebx, 0x18
mov qword [r13], rcx
shr edx, 0x10
movzx r11d, r11b
movzx eax, dl
movzx edi, dil
movzx ebx, bl
shl r11, 8
movzx r8d, r8b
movzx r10d, r10b
or r11, rax
mov rax, qword [rsp + 0xc0]
shl r11, 8
or r11, rdi
shl r11, 8
or r11, rsi
shl r11, 8
or r11, rbx
shl r11, 8
or r11, r8
shl r11, 8
or r11, r10
shl r11, 8
or r11, r9
mov qword [rax], r11
jmp 0x643a34
mov ecx, eax
jmp 0x643863
mov r8d, eax
jmp 0x643985
movzx eax, bh
mov r8d, ebx
movzx esi, bpl
movzx r9d, bl
shr r8d, 0x10
mov r10d, eax
mov eax, ebp
shr ebp, 0x18
movzx edi, ah
shr eax, 0x10
mov r11d, ebp
shr ebx, 0x18
mov edx, eax
jmp 0x643af2
xor ecx, ecx
jmp 0x643a93
mov r9, r10
xor r8d, r8d
jmp 0x643a84
xor r8d, r8d
jmp 0x643a75
mov r8, r10
jmp 0x643a68
xor ecx, ecx
jmp 0x643a5a
movzx ecx, byte [r10 - 1]
sub r10, 1
shl ecx, 0x10
mov r8d, ecx
jmp 0x643a4b
mov rdx, rax
jmp 0x643a00
mov rdx, rax
jmp 0x643a18
mov ebp, r12d
mov ebx, esi
jmp 0x643a27