Function at 0x1400582c0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
test rcx, rcx
mov r12, rcx
mov qword [rsp + 0x50], rdx
je 0x140058a80
test rdx, rdx
je 0x140058a80
xor esi, esi
mov rdi, rdx
cmp qword [rdi + rsi], 0
je 0x14005830c
mov rcx, qword [r12 + rsi]
call fcn.14016b6d8
mov rcx, qword [rdi + rsi]
call sub.msvcrt.dll__strdup
mov qword [r12 + rsi], rax
cmp qword [rdi + rsi + 8], 0
lea rbx, [rsi + 8]
je 0x140058331
mov rcx, qword [r12 + rsi + 8]
call fcn.14016b6d8
mov rcx, qword [rdi + rsi + 8]
call sub.msvcrt.dll__strdup
mov qword [r12 + rsi + 8], rax
cmp qword [rdi + rbx + 8], 0
je 0x140058352
mov rcx, qword [r12 + rbx + 8]
call fcn.14016b6d8
mov rcx, qword [rdi + rbx + 8]
call sub.msvcrt.dll__strdup
mov qword [r12 + rbx + 8], rax
cmp qword [rdi + rbx + 0x10], 0
je 0x140058373
mov rcx, qword [r12 + rbx + 0x10]
call fcn.14016b6d8
mov rcx, qword [rdi + rbx + 0x10]
call sub.msvcrt.dll__strdup
mov qword [r12 + rbx + 0x10], rax
cmp qword [rdi + rbx + 0x18], 0
je 0x140058394
mov rcx, qword [r12 + rbx + 0x18]
call fcn.14016b6d8
mov rcx, qword [rdi + rbx + 0x18]
call sub.msvcrt.dll__strdup
mov qword [r12 + rbx + 0x18], rax
cmp qword [rdi + rbx + 0x20], 0
je 0x1400583b5
mov rcx, qword [r12 + rbx + 0x20]
call fcn.14016b6d8
mov rcx, qword [rdi + rbx + 0x20]
call sub.msvcrt.dll__strdup
mov qword [r12 + rbx + 0x20], rax
cmp qword [rdi + rbx + 0x28], 0
je 0x1400583d6
mov rcx, qword [r12 + rbx + 0x28]
call fcn.14016b6d8
mov rcx, qword [rdi + rbx + 0x28]
call sub.msvcrt.dll__strdup
mov qword [r12 + rbx + 0x28], rax
cmp qword [rdi + rbx + 0x30], 0
je 0x1400583f7
mov rcx, qword [r12 + rbx + 0x30]
call fcn.14016b6d8
mov rcx, qword [rdi + rbx + 0x30]
call sub.msvcrt.dll__strdup
mov qword [r12 + rbx + 0x30], rax
cmp qword [rdi + rbx + 0x38], 0
je 0x140058418
mov rcx, qword [r12 + rbx + 0x38]
call fcn.14016b6d8
mov rcx, qword [rdi + rbx + 0x38]
call sub.msvcrt.dll__strdup
mov qword [r12 + rbx + 0x38], rax
lea rsi, [rbx + 0x40]
cmp rsi, 0xd8
jne 0x1400582ef
mov rdx, qword [rsp + 0x50]
mov rbp, qword [rdx + 0xe0]
mov r15d, dword [rdx + 0xd8]
test rbp, rbp
je 0x140058a60
test r15d, r15d
jle 0x140058a91
lea r8d, [r15 - 1]
mov rcx, rbp
xor r10d, r10d
lea r9, [rbp + r8*8 + 8]
mov r11, qword [rcx]
test r11, r11
je 0x140058472
mov r11, qword [r11 + 0x10]
add r10d, 1
test r11, r11
jne 0x140058465
add rcx, 8
cmp rcx, r9
jne 0x14005845d
lea r13d, [r10 + 1]
movsxd rcx, r13d
shl rcx, 3
call sub.msvcrt.dll_malloc
test rax, rax
mov qword [rsp + 0x40], rax
je 0x140058aad
xor edi, edi
xor esi, esi
mov rbx, qword [rbp + rdi*8]
test rbx, rbx
je 0x1400584cf
mov rdx, qword [rsp + 0x40]
movsxd rax, esi
lea r13, [rdx + rax*8]
mov rcx, qword [rbx]
add esi, 1
add r13, 8
call sub.msvcrt.dll__strdup
mov rbx, qword [rbx + 0x10]
mov qword [r13 - 8], rax
test rbx, rbx
jne 0x1400584b3
add rdi, 1
cmp r15d, edi
jg 0x14005849d
movsxd r14, esi
shl r14, 3
mov r15, qword [rsp + 0x40]
mov qword [r15 + r14], 0
mov rbp, qword [r15]
test rbp, rbp
mov qword [rsp + 0x38], rbp
je 0x140058937
mov ecx, dword [r12 + 0xd8]
mov r8, qword [r12 + 0xe0]
lea r9, [r15 + 8]
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x58], r9
mov dword [rsp + 0x2c], ecx
mov qword [rsp + 0x20], r8
cmp qword [rsp + 0x20], 0
mov r12, qword [rsp + 0x38]
movsx rbx, byte [r12]
je 0x1400589fc
test bl, bl
je 0x140058a40
movsx rdi, bl
mov r10, r12
xor eax, eax
nop dword [rax + rax]
add rax, rdi
add r10, 1
movsx rdi, byte [r10]
mov r11, rax
shl r11, 0xa
add rax, r11
mov r14, rax
shr r14, 8
xor rax, r14
test dil, dil
jne 0x140058550
movsxd rsi, dword [rsp + 0x2c]
xor edx, edx
div rsi
movsxd r13, edx
lea rdi, [r13*8]
mov r15, qword [rsp + 0x20]
mov rbp, qword [r15 + rdi]
test rbp, rbp
je 0x140058979
xor r14d, r14d
mov r12, qword [rsp + 0x38]
jmp 0x1400585b8
mov rcx, qword [rbp + 0x10]
mov r14, rbp
test rcx, rcx
je 0x140058979
mov rbp, rcx
mov rdx, qword [rbp]
mov rcx, r12
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x1400585a5
mov rcx, qword [rbp + 8]
call fcn.14016b6d8
test r14, r14
je 0x140058a47
mov r8, qword [rbp + 0x10]
mov qword [r14 + 0x10], r8
mov rcx, qword [rbp]
call fcn.14016b6d8
mov rcx, rbp
call fcn.14016b6d8
mov rdx, qword [rsp + 0x50]
mov r11, qword [rsp + 0x48]
mov rcx, qword [rdx + 0xe0]
mov rsi, qword [r11 + 0xe0]
movsxd r15, dword [rdx + 0xd8]
test rcx, rcx
mov qword [rsp + 0x20], rsi
je 0x1400589a4
test bl, bl
je 0x140058a24
mov r12, qword [rsp + 0x38]
movsx r9, bl
xor eax, eax
add rax, r9
add r12, 1
movsx r9, byte [r12]
mov rbp, rax
shl rbp, 0xa
add rax, rbp
mov r8, rax
shr r8, 8
xor rax, r8
test r9b, r9b
jne 0x140058633
xor edx, edx
div r15
movsxd rdi, edx
shl rdi, 3
mov rsi, qword [rcx + rdi]
test rsi, rsi
je 0x1400589a4
mov r13, qword [rsp + 0x38]
jmp 0x14005868d
mov rsi, qword [rsi + 0x10]
test rsi, rsi
je 0x1400589a4
mov rdx, qword [rsi]
mov rcx, r13
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x140058680
mov rcx, qword [rsi + 8]
call sub.msvcrt.dll__strdup
cmp qword [rsp + 0x20], 0
mov r15, rax
je 0x1400589ba
mov r10, qword [rsp + 0x48]
test bl, bl
mov r11d, dword [r10 + 0xd8]
mov dword [rsp + 0x2c], r11d
je 0x1400589f5
mov rdi, qword [rsp + 0x38]
xor eax, eax
add rax, rbx
add rdi, 1
movsx rbx, byte [rdi]
mov r12, rax
shl r12, 0xa
add rax, r12
mov rbp, rax
shr rbp, 8
xor rax, rbp
test bl, bl
jne 0x1400586d4
movsxd r8, dword [rsp + 0x2c]
xor edx, edx
div r8
movsxd r9, edx
lea rbx, [r9*8]
mov ecx, 0x18
call sub.msvcrt.dll_malloc
mov rcx, qword [rsp + 0x38]
mov r13, rax
call sub.msvcrt.dll__strdup
add rbx, qword [rsp + 0x20]
mov qword [r13 + 8], r15
mov qword [r13], rax
mov rsi, qword [rbx]
mov qword [r13 + 0x10], rsi
mov qword [rbx], r13
mov r11, qword [r13 + 0x10]
test r11, r11
je 0x140058910
mov r10d, 1
nop dword [rax]
mov r11, qword [r11 + 0x10]
add r10d, 1
test r11, r11
jne 0x140058750
cmp r10d, 3
jle 0x140058910
mov r15d, dword [rsp + 0x2c]
xor esi, esi
lea r14d, [r15 + r15*2 + 6]
mov ebp, r14d
shr ebp, 0x1f
add ebp, r14d
sar ebp, 1
test ebp, ebp
jle 0x14005879d
movsxd rcx, ebp
mov edx, 8
call sub.msvcrt.dll_calloc
mov ecx, 0
test rax, rax
mov rsi, rax
cmove ebp, ecx
mov ebx, dword [rsp + 0x2c]
test ebx, ebx
jle 0x140058a2b
mov rdi, qword [rsp + 0x20]
sub ebx, 1
lea rax, [rdi + rbx*8 + 8]
mov r14, rdi
mov qword [rsp + 0x30], rax
nop
mov r12, qword [r14]
test r12, r12
je 0x140058875
nop dword [rax]
test rsi, rsi
mov rbx, qword [r12 + 8]
mov rdi, qword [r12]
je 0x140058959
test rdi, rdi
je 0x140058951
movzx r10d, byte [rdi]
test r10b, r10b
je 0x140058951
mov r9, rdi
xor eax, eax
nop dword [rax]
movsx r8, r10b
add r9, 1
movzx r10d, byte [r9]
lea rdx, [r8 + rax]
mov r13, rdx
shl r13, 0xa
add rdx, r13
mov rax, rdx
shr rax, 8
xor rax, rdx
test r10b, r10b
jne 0x140058800
movsxd r11, ebp
xor edx, edx
div r11
movsxd rcx, edx
lea r15, [rcx*8]
mov ecx, 0x18
call sub.msvcrt.dll_malloc
mov rcx, rdi
mov r13, rax
call sub.msvcrt.dll__strdup
mov qword [r13 + 8], rbx
lea rbx, [rsi + r15]
mov qword [r13], rax
mov rdi, qword [rbx]
mov qword [rbx], r13
mov qword [r13 + 0x10], rdi
mov r12, qword [r12 + 0x10]
test r12, r12
jne 0x1400587d0
add r14, 8
cmp r14, qword [rsp + 0x30]
jne 0x1400587c0
xor r15d, r15d
xor edi, edi
cmp qword [rsp + 0x20], 0
je 0x1400588f5
mov r8, qword [rsp + 0x20]
mov r9d, dword [rsp + 0x2c]
mov r14, qword [rsp + 0x48]
mov rbx, qword [r8 + r15]
test rbx, rbx
je 0x1400588da
nop dword [rax]
mov rcx, qword [rbx]
mov r13, qword [rbx + 0x10]
call fcn.14016b6d8
mov rcx, rbx
mov rbx, r13
call fcn.14016b6d8
test r13, r13
jne 0x1400588b0
mov r9d, dword [r14 + 0xd8]
mov r8, qword [r14 + 0xe0]
add edi, 1
add r15, 8
cmp edi, r9d
jl 0x1400588a0
mov qword [rsp + 0x20], r8
mov rcx, qword [rsp + 0x20]
call fcn.14016b6d8
mov rax, qword [rsp + 0x48]
mov dword [rsp + 0x2c], ebp
mov qword [rsp + 0x20], rsi
mov dword [rax + 0xd8], ebp
mov qword [rax + 0xe0], rsi
mov rcx, qword [rsp + 0x38]
call fcn.14016b6d8
add qword [rsp + 0x58], 8
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rbp - 8]
test rsi, rsi
mov qword [rsp + 0x38], rsi
jne 0x140058524
mov rcx, qword [rsp + 0x40]
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp fcn.14016b6d8
xor r15d, r15d
jmp 0x14005883c
mov edx, 8
mov ecx, 1
xor ebp, ebp
call sub.msvcrt.dll_calloc
test rax, rax
mov rsi, rax
setne bpl
jmp 0x1400587e2
mov r13, qword [rsp + 0x50]
mov rcx, qword [r13 + 0xe0]
movsxd r15, dword [r13 + 0xd8]
test rcx, rcx
jne 0x140058620
xor ecx, ecx
call sub.msvcrt.dll__strdup
mov r15, rax
jmp 0x1400586b4
xor ecx, ecx
call sub.msvcrt.dll__strdup
cmp qword [rsp + 0x20], 0
mov r15, rax
jne 0x1400586b4
mov ecx, 1
mov edx, 8
call sub.msvcrt.dll_calloc
mov r14, qword [rsp + 0x48]
xor ecx, ecx
test rax, rax
setne cl
test bl, bl
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x2c], ecx
mov qword [r14 + 0xe0], rax
mov dword [r14 + 0xd8], ecx
jne 0x1400586cd
xor ebx, ebx
jmp 0x14005870c
mov r14, qword [rsp + 0x50]
mov rcx, qword [r14 + 0xe0]
movsxd r15, dword [r14 + 0xd8]
test rcx, rcx
jne 0x140058620
xor ecx, ecx
call sub.msvcrt.dll__strdup
mov r15, rax
jmp 0x1400589ba
xor edi, edi
jmp 0x140058664
cmp qword [rsp + 0x20], 0
jne 0x1400588eb
jmp 0x1400588f5
xor edi, edi
jmp 0x140058589
mov r10, qword [rsp + 0x48]
mov r9, qword [rbp + 0x10]
mov rax, qword [r10 + 0xe0]
mov qword [rax + rdi], r9
jmp 0x1400585e2
mov ecx, 8
call sub.msvcrt.dll_malloc
test rax, rax
mov qword [rsp + 0x40], rax
je 0x140058aad
test r15d, r15d
jg 0x140058499
jmp 0x140058aa5
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov ecx, 8
call sub.msvcrt.dll_malloc
test rax, rax
mov qword [rsp + 0x40], rax
je 0x140058aad
xor r14d, r14d
jmp 0x1400584df
mov qword [rsp + 0x40], 0
jmp 0x140058937