Function at 0x14035d9d0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
test rdx, rdx
mov qword [rsp + 0x80], rdx
sete al
test ecx, ecx
mov dword [rsp + 0x7c], ecx
setle dl
or eax, edx
cmp byte [0x140398104], 0
mov ebx, eax
je 0x14035dee1
mov ecx, 5
call qword [0x140398170]
test rax, rax
mov qword [rsp + 0x88], rax
je 0x14035dee1
mov rcx, rax
call qword [0x140398180]
test bl, bl
jne 0x14035deae
mov ebx, dword [0x140398320]
test ebx, ebx
je 0x14035ddc1
movzx eax, byte [0x1403983a0]
cmp dword [rsp + 0x7c], eax
mov r8, rax
jle 0x14035de6e
test al, al
jne 0x14035dd8f
nop word [rax + rax]
mov eax, dword [0x140398350]
mov r13d, dword [0x140398320]
mov esi, dword [0x140398324]
mov ebx, dword [0x140398328]
lea ecx, [rax + 1]
mov eax, dword [0x14039834c]
mov r11d, dword [0x14039832c]
mov dword [rsp + 0x48], ecx
mov ebp, dword [0x140398330]
mov dword [0x140398350], ecx
mov edi, dword [0x140398334]
mov dword [rsp + 0x40], r13d
mov r8d, dword [0x140398338]
mov dword [rsp + 0x3c], eax
mov r15d, dword [0x14039833c]
mov dword [rsp + 0x4c], esi
mov eax, dword [0x140398358]
mov dword [rsp + 0x44], ebx
mov r10d, dword [0x140398340]
mov dword [rsp + 0x58], r11d
mov r9d, dword [0x140398344]
mov dword [rsp + 0x54], ebp
mov r12d, dword [0x140398348]
mov dword [rsp + 0x50], edi
mov edx, dword [0x140398354]
mov dword [rsp + 0x74], eax
mov r14d, dword [0x14039835c]
mov dword [rsp + 0x5c], r8d
mov dword [rsp + 0x60], r15d
mov dword [rsp + 0x64], r10d
mov dword [rsp + 0x68], r9d
mov dword [rsp + 0x6c], r12d
mov dword [rsp + 0x70], edx
mov dword [rsp + 0x78], r14d
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x3c]
mov dword [rsp + 0x38], 0xa
mov dword [rsp + 0x2c], eax
mov eax, dword [rsp + 0x30]
nop dword [rax]
add r13d, ebp
add esi, edi
add ebx, r8d
xor ecx, r13d
xor edx, esi
xor eax, ebx
rol ecx, 0x10
rol edx, 0x10
add r10d, ecx
add r9d, edx
rol eax, 0x10
xor ebp, r10d
xor edi, r9d
add r12d, eax
rol ebp, 0xc
rol edi, 0xc
xor r8d, r12d
add r13d, ebp
add esi, edi
rol r8d, 0xc
xor ecx, r13d
xor edx, esi
add ebx, r8d
rol ecx, 8
rol edx, 8
xor eax, ebx
add r10d, ecx
add r9d, edx
xor ebp, r10d
xor edi, r9d
mov dword [rsp + 0x34], r9d
rol ebp, 7
rol edi, 7
mov dword [rsp + 0x30], r10d
rol eax, 8
add r11d, r15d
add r13d, edi
xor r14d, r11d
add r12d, eax
mov r9d, r14d
mov r14d, dword [rsp + 0x2c]
xor r8d, r12d
rol r9d, 0x10
rol r8d, 7
add esi, r8d
xor ecx, esi
add r14d, r9d
rol ecx, 0x10
xor r15d, r14d
mov r10d, r14d
rol r15d, 0xc
add r11d, r15d
xor r9d, r11d
rol r9d, 8
add r10d, r9d
xor r9d, r13d
rol r9d, 0x10
xor r15d, r10d
add r10d, ecx
add r12d, r9d
rol r15d, 7
xor edi, r12d
rol edi, 0xc
add r13d, edi
xor r9d, r13d
mov r14d, r9d
mov r9d, dword [rsp + 0x34]
rol r14d, 8
add r12d, r14d
xor edi, r12d
rol edi, 7
xor r8d, r10d
add ebx, r15d
rol r8d, 0xc
add r11d, ebp
xor edx, ebx
add esi, r8d
xor eax, r11d
rol edx, 0x10
xor ecx, esi
rol eax, 0x10
rol ecx, 8
add r9d, eax
add r10d, ecx
xor ebp, r9d
xor r8d, r10d
mov dword [rsp + 0x2c], r10d
mov r10d, dword [rsp + 0x30]
rol ebp, 0xc
add r11d, ebp
rol r8d, 7
xor eax, r11d
rol eax, 8
add r10d, edx
add r9d, eax
xor r15d, r10d
xor ebp, r9d
rol r15d, 0xc
rol ebp, 7
add ebx, r15d
xor edx, ebx
rol edx, 8
add r10d, edx
xor r15d, r10d
rol r15d, 7
sub dword [rsp + 0x38], 1
jne 0x14035db40
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x40]
add eax, r13d
mov dword [0x140398360], eax
mov eax, dword [rsp + 0x4c]
add eax, esi
mov dword [0x140398364], eax
mov eax, dword [rsp + 0x44]
add eax, ebx
mov ebx, dword [rsp + 0x30]
mov dword [0x140398368], eax
mov eax, dword [rsp + 0x58]
add eax, r11d
mov r11d, dword [rsp + 0x54]
mov dword [0x14039836c], eax
mov eax, dword [rsp + 0x5c]
add r11d, ebp
add r8d, eax
mov eax, dword [rsp + 0x60]
mov dword [0x140398370], r11d
mov dword [0x140398378], r8d
mov r8d, dword [rsp + 0x2c]
mov r11d, dword [rsp + 0x50]
add r15d, eax
mov eax, dword [rsp + 0x64]
mov dword [0x14039837c], r15d
add r11d, edi
mov dword [0x140398374], r11d
add r10d, eax
mov eax, dword [rsp + 0x68]
mov dword [0x140398380], r10d
add r9d, eax
mov eax, dword [rsp + 0x6c]
mov dword [0x140398384], r9d
add r12d, eax
mov eax, dword [rsp + 0x3c]
mov dword [0x140398388], r12d
add r8d, eax
mov eax, dword [rsp + 0x48]
mov dword [0x14039838c], r8d
add eax, ecx
mov dword [0x140398390], eax
mov eax, dword [rsp + 0x70]
add edx, eax
mov eax, dword [rsp + 0x74]
mov dword [0x140398394], edx
add ebx, eax
mov dword [0x140398398], ebx
mov eax, dword [rsp + 0x78]
mov byte [0x1403983a0], 0x40
add r14d, eax
cmp dword [rsp + 0x7c], 0x40
mov dword [0x14039839c], r14d
jle 0x14035deda
mov r8d, 0x40
mov rsi, qword [rsp + 0x80]
lea rdx, [0x140398360]
mov rcx, rsi
call sub.msvcrt.dll_memcpy
movzx edx, byte [0x1403983a0]
sub dword [rsp + 0x7c], edx
add rsi, rdx
mov qword [rsp + 0x80], rsi
jmp 0x14035da68
call fcn.14035b5c0
test eax, eax
jne 0x14035df42
cmp byte [0x140398104], 0
je 0x14035df22
mov ecx, 2
call qword [0x140398170]
test rax, rax
mov rdi, rax
je 0x14035df22
mov rcx, rax
call qword [0x140398180]
mov rsi, qword [0x1403985a0]
mov rcx, rdi
call qword [0x140398190]
movdqa xmm1, xmmword [str.expand_32_byte_kcume_dist]
movaps xmmword [0x140398320], xmm1
test rsi, rsi
je 0x14035df51
mov edx, dword [0x1403982b0]
lea r8, [0x140398330]
test edx, edx
jne 0x14035df70
mov edx, 0x2c
mov rcx, rsi
call qword [rsi + 0x68]
mov ebx, dword [0x140398350]
mov eax, dword [rsp + 0x7c]
mov dword [0x14039835c], ebx
mov dword [0x140398350], 0
mov byte [0x1403983a0], 0
test eax, eax
jg 0x14035da68
xor eax, eax
movsxd r8, dword [rsp + 0x7c]
mov rcx, qword [rsp + 0x80]
sub eax, r8d
mov rbx, r8
lea edx, [rax + 0x40]
lea rax, [0x140398320]
movsxd rdx, edx
add rdx, rax
call sub.msvcrt.dll_memcpy
mov rax, qword [rsp + 0x88]
sub byte [0x1403983a0], bl
test rax, rax
je 0x14035df0e
mov rcx, rax
jmp 0x14035dec0
mov rcx, qword [rsp + 0x88]
mov dword [0x140398320], 0
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp qword [0x140398190]
mov eax, 0x40
jmp 0x14035de6e
test bl, bl
jne 0x14035df04
mov ebx, dword [0x140398320]
mov qword [rsp + 0x88], 0
test ebx, ebx
jne 0x14035da46
jmp 0x14035ddc1
mov dword [0x140398320], 0
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rsi, qword [0x1403985a0]
test rsi, rsi
je 0x14035df42
movdqa xmm2, xmmword [str.expand_32_byte_kcume_dist]
movaps xmmword [0x140398320], xmm2
jmp 0x14035de23
movdqa xmm0, xmmword [str.expand_32_byte_kcume_dist]
movaps xmmword [0x140398320], xmm0
lea rdx, [0x140398330]
mov ecx, 5
xor eax, eax
mov rdi, rdx
rep stosq qword [rdi], rax
mov dword [rdi], 0
jmp 0x14035de49
mov ecx, 5
xor eax, eax
mov rdi, r8
rep stosq qword [rdi], rax
mov dword [0x140398330], edx
mov dword [rdi], 0
jmp 0x14035de49