Function at 0x140215950
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x58
mov r11d, dword [rcx + 0x1c]
mov rsi, rcx
cmp r11d, 1
jne 0x14021597b
cmp dword [rcx + 0x90], 7
je 0x140215b4d
cmp dword [rcx + 0x8b60], 0
jne 0x140215b4d
mov rbp, qword [rcx + 0x8b58]
test rbp, rbp
je 0x140215b4d
mov r8, qword [rcx + 0x8630]
mov r12d, 0x10
mov r9, qword [rcx + 0x86d0]
mov r10d, dword [rcx + 0x85bc]
mov rdx, r9
mov ecx, dword [rcx + 0x18]
mov eax, r10d
mov rdi, qword [r8 + 0x28]
neg eax
mov rax, qword [r8 + 0x38]
mov r15, qword [r8 + 0x40]
sbb r13d, r13d
shl rdx, 4
and r13d, 3
add rdx, 0xfffffffffffffff0
sub rax, rdx
inc rax
cmp rax, r12
cmovb r12, rax
mov rax, qword [r8 + 0x30]
and eax, 0xf
mov qword [rsp + 0x20], r12
xor ebx, ebx
inc rdi
cmp rdx, qword [r8 + 0x30]
mov rdx, qword [r8 + 0x20]
cmovbe ebx, eax
mov qword [rsp + 0x38], rdx
mov rax, qword [rbp + 0x8830]
xor r14d, r14d
movzx ebp, byte [rsi + 0x80d0]
cmp ecx, 4
mov qword [rsp + 0x30], rax
movzx eax, byte [rsi + 0x80d1]
sete r14b
mov byte [rsp + 0xa8], al
add r14, 3
mov rax, qword [r8 + 0x48]
add r14, qword [rsi + 0x28]
shl r9, 7
add rax, r9
mov qword [rsp + 0xb8], rbx
mov byte [rsp + 0xa0], bpl
mov qword [rsp + 0x28], rax
cmp ecx, 7
je 0x140215a68
cmp ecx, 4
jne 0x140215fe2
cmp r11d, 1
jne 0x140215b60
test r10d, r10d
mov eax, 0x400
mov r11d, 0x80
cmovne r11d, eax
neg r10d
sbb eax, eax
and eax, 4
add r11d, eax
cmp rbx, r12
jae 0x140215b4d
mov rbp, qword [rsp + 0x20]
lea r12, [0x1403f9fa0]
mov rax, qword [rsp + 0x28]
mov r9, rbx
shl r9, 4
mov r10, qword [rax + rbx*8 - 0x80]
mov r8, rdx
cmp rdx, rdi
jae 0x140215b35
mov rbx, qword [rsp + 0x30]
mov ebp, 0xff
nop dword [rax + rax]
mov rax, r8
and eax, 0xf
add rax, r9
movzx ecx, byte [rax + r12]
mov rax, r8
and rax, 0xfffffffffffffff0
shl rax, 4
add rcx, rax
mov edx, dword [rbx + rcx*4]
mov ecx, r13d
add edx, r11d
sar edx, cl
test edx, edx
jns 0x140215aff
xor edx, edx
jmp 0x140215b04
cmp edx, ebp
cmovg edx, ebp
mov rax, qword [r15 + r8*8]
inc r8
add rax, qword [rsi + 0x80f0]
add rax, r10
mov byte [rax + r14], dl
cmp r8, rdi
jb 0x140215ad0
mov rbx, qword [rsp + 0xb8]
mov rdx, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x20]
mov rax, qword [rsp + 0x28]
inc rbx
add r9, 0x10
mov qword [rsp + 0xb8], rbx
cmp rbx, rbp
jb 0x140215ab0
xor eax, eax
add rsp, 0x58
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
cmp r11d, 2
jne 0x140215c50
test r10d, r10d
mov ecx, 0x12
mov eax, reloc.WS2_32.dll_ntohs
mov r11d, 1
cmovne eax, ecx
movzx ecx, al
shl r11d, cl
neg r10d
sbb eax, eax
and eax, 4
add r11d, eax
cmp rbx, r12
jae 0x140215b4d
mov rax, qword [rsp + 0x20]
lea r12, [0x1403f9fa0]
mov rcx, qword [rsp + 0x28]
mov r9, rbx
shl r9, 4
nop
mov r10, qword [rcx + rbx*8 - 0x80]
mov r8, rdx
cmp rdx, rdi
jae 0x140215c33
mov rbx, qword [rsp + 0x30]
mov rax, r8
and eax, 0xf
add rax, r9
movzx ecx, byte [rax + r12]
mov rax, r8
and rax, 0xfffffffffffffff0
shl rax, 4
add rcx, rax
mov edx, dword [rbx + rcx*4]
mov ecx, r13d
add edx, r11d
sar edx, cl
mov ecx, ebp
shl edx, cl
test edx, edx
jns 0x140215bf5
xor edx, edx
jmp 0x140215bff
mov eax, 0xffff
cmp edx, eax
cmovg edx, eax
mov rcx, qword [r15 + r8*8]
inc r8
mov rax, qword [rsi + 0x80f0]
add rcx, r10
add rcx, r14
mov word [rax + rcx*2], dx
cmp r8, rdi
jb 0x140215bc2
mov rbx, qword [rsp + 0xb8]
mov rdx, qword [rsp + 0x38]
mov rax, qword [rsp + 0x20]
mov rcx, qword [rsp + 0x28]
inc rbx
add r9, 0x10
mov qword [rsp + 0xb8], rbx
cmp rbx, rax
jb 0x140215bb0
jmp 0x140215b4d
cmp r11d, 3
jne 0x140215d46
neg r10d
sbb eax, eax
and eax, 4
cmp rbx, r12
jae 0x140215b4d
mov rcx, qword [rsp + 0x28]
lea r12, [0x1403f9fa0]
mov dword [rsp + 0xa8], ebp
mov r10, rbx
mov ebp, eax
shl r10, 4
mov rax, qword [rsp + 0x20]
mov r9d, 0x7fff
mov r11, qword [rcx + rbx*8 - 0x80]
mov r8, rdx
cmp rdx, rdi
jae 0x140215d29
mov rbx, qword [rsp + 0x30]
nop dword [rax + rax]
mov rax, r8
and eax, 0xf
add rax, r10
movzx ecx, byte [rax + r12]
mov rax, r8
and rax, 0xfffffffffffffff0
shl rax, 4
add rcx, rax
mov edx, dword [rbx + rcx*4]
mov ecx, r13d
add edx, ebp
sar edx, cl
mov ecx, dword [rsp + 0xa8]
shl edx, cl
cmp edx, 0xffff8000
jge 0x140215cee
mov edx, 0xffff8000
jmp 0x140215cf5
cmp edx, r9d
cmovg edx, r9d
mov rcx, qword [r15 + r8*8]
inc r8
mov rax, qword [rsi + 0x80f0]
add rcx, r11
add rcx, r14
mov word [rax + rcx*2], dx
cmp r8, rdi
jb 0x140215cb0
mov rbx, qword [rsp + 0xb8]
mov rdx, qword [rsp + 0x38]
mov rax, qword [rsp + 0x20]
mov rcx, qword [rsp + 0x28]
inc rbx
add r10, 0x10
mov qword [rsp + 0xb8], rbx
cmp rbx, rax
jb 0x140215c92
jmp 0x140215b4d
cmp r11d, 4
jne 0x140215e18
neg r10d
sbb ebp, ebp
and ebp, r11d
cmp rbx, r12
jae 0x140215b4d
mov rax, qword [rsp + 0x20]
lea r12, [0x1403f9fa0]
mov rcx, qword [rsp + 0x28]
mov r10, rbx
shl r10, 4
mov r9d, 0x7fff
nop
mov r11, qword [rcx + rbx*8 - 0x80]
mov r8, rdx
cmp rdx, rdi
jae 0x140215dfb
mov rbx, qword [rsp + 0x30]
mov rax, r8
and eax, 0xf
add rax, r10
movzx ecx, byte [rax + r12]
mov rax, r8
and rax, 0xfffffffffffffff0
shl rax, 4
add rcx, rax
mov edx, dword [rbx + rcx*4]
mov ecx, r13d
add edx, ebp
sar edx, cl
mov rcx, qword [r15 + r8*8]
mov eax, edx
sar eax, 0x1f
and dx, r9w
xor dx, ax
add rcx, r11
sub dx, ax
add rcx, r14
mov rax, qword [rsi + 0x80f0]
inc r8
mov word [rax + rcx*2], dx
cmp r8, rdi
jb 0x140215d92
mov rbx, qword [rsp + 0xb8]
mov rdx, qword [rsp + 0x38]
mov rax, qword [rsp + 0x20]
mov rcx, qword [rsp + 0x28]
inc rbx
add r10, 0x10
mov qword [rsp + 0xb8], rbx
cmp rbx, rax
jb 0x140215d80
jmp 0x140215b4d
cmp r11d, 6
jne 0x140215edd
neg r10d
sbb r11d, r11d
and r11d, 4
cmp rbx, r12
jae 0x140215b4d
mov rax, qword [rsp + 0x20]
lea r12, [0x1403f9fa0]
mov rcx, qword [rsp + 0x28]
mov r9, rbx
shl r9, 4
nop dword [rax]
mov r10, qword [rcx + rbx*8 - 0x80]
mov r8, rdx
cmp rdx, rdi
jae 0x140215ec0
mov rbx, qword [rsp + 0x30]
mov rax, r8
and eax, 0xf
add rax, r9
movzx ecx, byte [rax + r12]
mov rax, r8
and rax, 0xfffffffffffffff0
shl rax, 4
add rcx, rax
mov rax, qword [rsi + 0x80f0]
mov edx, dword [rbx + rcx*4]
mov ecx, r13d
add edx, r11d
sar edx, cl
mov ecx, ebp
shl edx, cl
mov rcx, qword [r15 + r8*8]
inc r8
add rcx, r10
add rcx, r14
mov dword [rax + rcx*4], edx
cmp r8, rdi
jb 0x140215e62
mov rbx, qword [rsp + 0xb8]
mov rdx, qword [rsp + 0x38]
mov rax, qword [rsp + 0x20]
mov rcx, qword [rsp + 0x28]
inc rbx
add r9, 0x10
mov qword [rsp + 0xb8], rbx
cmp rbx, rax
jb 0x140215e50
jmp 0x140215b4d
cmp r11d, 7
jne 0x140215fe2
neg r10d
sbb r8d, r8d
and r8d, 4
mov dword [rsp + 0xb0], r8d
cmp rbx, r12
jae 0x140215b4d
mov rcx, rbx
lea r12, [0x1403f9fa0]
shl rcx, 4
mov qword [rsp + 0x40], rcx
nop word [rax + rax]
mov rax, qword [rax + rbx*8 - 0x80]
mov rbp, rdx
mov qword [rsp + 0x48], rax
cmp rdx, rdi
jae 0x140215fb9
mov rbx, qword [rsp + 0x30]
nop dword [rax + rax]
movzx edx, byte [rsp + 0xa8]
mov rax, rbp
and eax, 0xf
add rax, rcx
movzx ecx, byte [rax + r12]
mov rax, rbp
and rax, 0xfffffffffffffff0
shl rax, 4
add rcx, rax
mov eax, dword [rbx + rcx*4]
mov ecx, r13d
add eax, r8d
movzx r8d, byte [rsp + 0xa0]
sar eax, cl
mov ecx, eax
call fcn.140217440
mov rcx, qword [r15 + rbp*8]
inc rbp
add rcx, qword [rsp + 0x48]
mov rax, qword [rsi + 0x80f0]
add rcx, r14
mov r8d, dword [rsp + 0xb0]
movss dword [rax + rcx*4], xmm0
mov rcx, qword [rsp + 0x40]
cmp rbp, rdi
jb 0x140215f40
mov rbx, qword [rsp + 0xb8]
mov rdx, qword [rsp + 0x38]
mov rax, qword [rsp + 0x28]
inc rbx
add rcx, 0x10
mov qword [rsp + 0xb8], rbx
mov qword [rsp + 0x40], rcx
cmp rbx, qword [rsp + 0x20]
jb 0x140215f20
jmp 0x140215b4d
mov eax, 0xffffffff
jmp 0x140215b4f