Function at 0x140496790
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x2a8
mov r13, r9
mov rbp, r8
mov r15, rdx
mov r14, rcx
mov rdx, r8
call fcn.140496ef0
mov r12d, eax
test eax, eax
jne 0x140496ed8
mov rcx, r14
mov rdx, r13
call fcn.140496f50
mov r12d, eax
test eax, eax
jne 0x140496ed8
mov r12d, 0xffffb080
cmp qword [r14 + 0x60], 0
je 0x140496ed8
cmp qword [r14 + 0x78], 0
je 0x140496ed8
mov r12, qword [rsp + 0x310]
lea rcx, [rsp + 0x220]
call fcn.1404db220
test r12, r12
je 0x14049681b
mov rax, qword [rsp + 0x318]
jmp 0x1404968c2
mov rdi, qword [r14 + 0xb8]
add rdi, 7
mov rsi, rdi
shr rsi, 3
call fcn.14048a020
mov ecx, dword [rax]
call fcn.14048a030
mov r12d, 0xffffb300
cmp rdi, 0x187
ja 0x140496865
mov rbx, rax
lea rdx, [rsp + 0x120]
mov rcx, rbp
mov r8, rsi
call fcn.14048eb10
mov r12d, eax
test eax, eax
je 0x14049687f
lea rcx, [rsp + 0x120]
mov rdx, rsi
call fcn.14048a010
xor r13d, r13d
xor ebx, ebx
jmp 0x140496e61
lea rdi, [rsp + 0x120]
lea rax, [rsp + 0x220]
mov rcx, rax
mov rdx, rbx
mov r8, rdi
mov r9, rsi
call fcn.1404db380
mov r12d, eax
mov rcx, rdi
mov rdx, rsi
call fcn.14048a010
test r12d, r12d
jne 0x140496875
lea r12, [0x140497b90]
lea rax, [rsp + 0x220]
mov qword [rsp + 0x60], rax
lea rdx, [r14 + 0x68]
lea rcx, [r13 + 0x18]
call fcn.14048ee10
test eax, eax
je 0x1404968dc
xor esi, esi
jmp 0x1404968ee
lea rdx, [r14 + 0x50]
mov rcx, r13
call fcn.14048ee10
test eax, eax
sete sil
mov rax, qword [r14 + 0xb8]
cmp rax, 4
seta cl
add cl, cl
add cl, 2
movzx edi, cl
lea ecx, [rdi - 1]
mov edx, 1
shl edx, cl
mov qword [rsp + 0x38], rdx
add rax, rdi
add rax, 0xffffffffffffffff
mov qword [rsp + 0x68], rax
xor edx, edx
div rdi
mov qword [rsp + 0x40], rax
test sil, sil
je 0x14049693e
mov rbx, qword [r14 + 0xe8]
test rbx, rbx
jne 0x140496b60
mov dword [rsp + 0x5c], ecx
mov dword [rsp + 0x58], esi
mov qword [rsp + 0x30], r15
movzx r15d, byte [rsp + 0x38]
mov edx, 0x48
mov rcx, r15
call fcn.14036e420
xor esi, esi
test rax, rax
jne 0x14049696f
mov r12d, 0xffffb280
xor ebx, ebx
jmp 0x1404969c5
mov rbx, rax
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x48], r12
movzx esi, sil
lea rdi, [rsi + rsi*8]
lea rcx, [rbx + rdi*8]
call fcn.14048e290
lea rcx, [rbx + rdi*8]
add rcx, 0x18
call fcn.14048e290
lea rcx, [rbx + rdi*8]
add rcx, 0x30
call fcn.14048e290
inc sil
movzx eax, sil
cmp r15d, eax
ja 0x14049697c
mov rcx, rbx
mov rdx, r13
call fcn.140495d20
test eax, eax
je 0x1404969cf
mov r12d, eax
mov r15, qword [rsp + 0x30]
jmp 0x140496b9d
movsxd r13, dword [rsp + 0x5c]
mov rcx, qword [rsp + 0x40]
imul r13, rcx
test r13, r13
je 0x140496a3b
xor esi, esi
mov rax, rsi
xor edx, edx
div rcx
mov edi, 1
mov ecx, eax
shl edi, cl
movzx eax, dil
lea rcx, [rax + rax*8]
lea rdi, [rbx + rcx*8]
test rdx, rdx
jne 0x140496a1c
shr eax, 1
lea rax, [rax + rax*8]
lea rdx, [rbx + rax*8]
mov rcx, rdi
call fcn.140495d20
test eax, eax
jne 0x1404969c2
mov rcx, r14
mov rdx, rdi
mov r8, rdi
call fcn.140497ba0
test eax, eax
jne 0x1404969c2
inc rsi
cmp rsi, r13
mov rcx, qword [rsp + 0x40]
jb 0x1404969e4
xor r8d, r8d
cmp r15d, 1
ja 0x140496a4b
mov r13, qword [rsp + 0x38]
jmp 0x140496a74
mov eax, 1
mov r13, qword [rsp + 0x38]
mov ecx, eax
lea rcx, [rcx + rcx*8]
lea rcx, [rbx + rcx*8]
mov qword [rsp + r8*8 + 0xa0], rcx
inc r8
and eax, 0x7f
add eax, eax
cmp eax, r15d
jb 0x140496a55
lea rdx, [rsp + 0xa0]
mov rcx, r14
call fcn.1404981d0
test eax, eax
je 0x140496a95
mov r12d, eax
mov r15, qword [rsp + 0x30]
jmp 0x140496e61
cmp r15d, 1
ja 0x140496aa3
xor r8d, r8d
jmp 0x140496b24
mov sil, 1
movzx esi, sil
lea rax, [rsi + rsi*8]
lea r13, [rbx + rax*8]
mov rdi, rsi
test rdi, rdi
je 0x140496ae6
dec rdi
lea rax, [rdi + rdi*8]
lea r8, [rbx + rax*8]
lea rax, [rdi + rsi]
lea rax, [rax + rax*8]
lea rdx, [rbx + rax*8]
mov rcx, r14
mov r9, r13
call fcn.140497370
test eax, eax
jne 0x1404969c2
jmp 0x140496ab5
add sil, sil
movzx eax, sil
cmp r15d, eax
ja 0x140496aa6
mov rax, rbx
add rax, 0x48
mov ecx, 1
xor edx, edx
mov r13, qword [rsp + 0x38]
mov r8, rcx
lea rcx, [rdx + rdx*8]
lea rcx, [rax + rcx*8]
mov qword [rsp + rdx*8 + 0xa0], rcx
lea rcx, [r8 + 1]
mov rdx, r8
cmp rcx, r15
jne 0x140496b05
lea rdx, [rsp + 0xa0]
mov rcx, r14
call fcn.1404981d0
test eax, eax
jne 0x140496a88
cmp byte [rsp + 0x58], 0
je 0x140496b51
mov qword [r14 + 0xe8], rbx
mov qword [r14 + 0xf0], r15
mov r15, qword [rsp + 0x30]
mov r12, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x50]
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x48], r12
lea rcx, [rsp + 0x70]
call fcn.14048e290
lea rcx, [rsp + 0x88]
call fcn.14048e290
lea rsi, [r14 + 0x98]
mov rcx, rsi
xor edx, edx
call fcn.14048e530
mov r12d, 0xffffb080
cmp eax, 1
je 0x140496ba7
mov r13, qword [rsp + 0x38]
jmp 0x140496e61
mov rcx, rbp
xor edx, edx
call fcn.14048e530
test eax, eax
sete byte [rsp + 0x30]
lea rcx, [rsp + 0x70]
mov rdx, rbp
call fcn.14048e410
mov r12d, eax
test eax, eax
mov r13, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x40]
jne 0x140496cdc
lea rcx, [rsp + 0x88]
mov rdx, rsi
mov r8, rbp
call fcn.14048f200
mov r12d, eax
test eax, eax
jne 0x140496cdc
lea rcx, [rsp + 0x70]
lea rdx, [rsp + 0x88]
mov r8b, byte [rsp + 0x30]
call fcn.14048df40
mov r12d, eax
test eax, eax
jne 0x140496cdc
lea r8, [rdi + 1]
lea rcx, [rsp + 0x150]
xor r12d, r12d
xor edx, edx
call fcn.1401ee070
mov rax, qword [rsp + 0x68]
cmp rax, qword [rsp + 0x50]
jb 0x140496cdc
lea rsi, [rsp + 0x70]
mov r13, qword [rsp + 0x50]
xor ebp, ebp
mov rdx, rbp
imul rdx, rdi
add rdx, r12
mov rcx, rsi
call fcn.14048e530
mov ecx, ebp
shl eax, cl
or byte [rsp + r12 + 0x150], al
inc rbp
cmp rbp, r13
jne 0x140496c4c
inc r12
cmp r12, rdi
jne 0x140496c4a
mov rsi, rdi
mov edi, 1
mov r8b, byte [rsp + 0x150]
xor r12d, r12d
xor ebp, ebp
mov dl, byte [rsp + rdi + 0x150]
mov r9d, edx
and r9b, bpl
xor dl, bpl
mov ecx, edx
not cl
and cl, 1
mov eax, ecx
mul r8b
mov ebp, eax
and bpl, dl
or bpl, r9b
xor dl, al
mov byte [rsp + rdi + 0x150], dl
shl cl, 7
or cl, r8b
mov byte [rsp + rdi + 0x14f], cl
inc rdi
mov r8d, edx
cmp rdi, rsi
jbe 0x140496c8f
mov rdi, rsi
mov r13, qword [rsp + 0x38]
lea rcx, [rsp + 0x88]
call fcn.14048e2a0
lea rcx, [rsp + 0x70]
call fcn.14048e2a0
test r12d, r12d
jne 0x140496e61
lea rcx, [rsp + 0xd8]
call fcn.14048e290
mov rsi, r15
lea r15, [rsp + 0xf0]
mov rcx, r15
call fcn.14048e290
lea rbp, [rsp + 0x108]
mov rcx, rbp
call fcn.14048e290
mov al, byte [rsp + rdi + 0x150]
mov byte [rsp + 0x20], al
mov rcx, r14
mov rdi, rsi
mov rdx, rsi
mov r8, rbx
mov r9d, r13d
call fcn.1404986c0
mov r12d, eax
test eax, eax
jne 0x140496dfc
lea rcx, [rdi + 0x30]
mov edx, 1
call fcn.14048e4d0
mov r12d, eax
test eax, eax
jne 0x140496dfc
mov rcx, r14
mov rdx, rdi
mov r8, qword [rsp + 0x48]
mov r9, qword [rsp + 0x60]
call fcn.1404985c0
mov r12d, eax
test eax, eax
jne 0x140496dfc
lea rsi, [rsp + 0xd8]
cmp qword [rsp + 0x40], 0
jne 0x140496da0
xor r12d, r12d
jmp 0x140496dfc
mov rcx, r14
mov rdx, rdi
mov r8, rdi
call fcn.140497ba0
test eax, eax
je 0x140496db7
mov r12d, eax
jmp 0x140496dfc
mov rax, qword [rsp + 0x40]
dec rax
mov qword [rsp + 0x40], rax
mov al, byte [rsp + rax + 0x150]
mov byte [rsp + 0x20], al
mov rcx, r14
mov rdx, rsi
mov r8, rbx
mov r9d, r13d
call fcn.1404986c0
test eax, eax
jne 0x140496db2
mov rcx, r14
mov rdx, rdi
mov r8, rdi
mov r9, rsi
call fcn.140497370
mov r12d, eax
test eax, eax
je 0x140496d93
lea rcx, [rsp + 0xd8]
call fcn.14048e2a0
mov rcx, r15
call fcn.14048e2a0
mov rcx, rbp
call fcn.14048e2a0
test r12d, r12d
je 0x140496e23
mov r15, rdi
jmp 0x140496e61
mov rcx, r14
mov r15, rdi
mov rdx, rdi
mov r8b, byte [rsp + 0x30]
call fcn.140498550
test eax, eax
jne 0x140496e5e
mov rcx, r14
mov rdx, r15
mov r8, qword [rsp + 0x48]
mov r9, qword [rsp + 0x60]
call fcn.1404985c0
test eax, eax
jne 0x140496e5e
mov rcx, r14
mov rdx, r15
call fcn.1404978e0
mov r12d, eax
lea rcx, [rsp + 0x220]
call fcn.1404db6b0
test rbx, rbx
je 0x140496ec6
cmp rbx, qword [r14 + 0xe8]
je 0x140496ec6
and r13d, 0xff
je 0x140496ebe
xor esi, esi
movzx esi, sil
lea rdi, [rsi + rsi*8]
lea rcx, [rbx + rdi*8]
call fcn.14048e2a0
lea rcx, [rbx + rdi*8]
add rcx, 0x18
call fcn.14048e2a0
lea rcx, [rbx + rdi*8]
add rcx, 0x30
call fcn.14048e2a0
inc sil
movzx eax, sil
cmp r13d, eax
ja 0x140496e87
mov rcx, rbx
call fcn.14036e430
test r12d, r12d
jne 0x140496ed0
xor r12d, r12d
jmp 0x140496ed8
mov rcx, r15
call fcn.140495bd0
mov eax, r12d
add rsp, 0x2a8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret