Function at 0x140057ab0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
movsxd rdi, dword [rcx + 0xd8]
mov rbx, rdx
mov rdx, qword [rcx + 0xe0]
mov qword [rsp + 0x90], rcx
mov rsi, r8
test rdx, rdx
mov qword [rsp + 0x28], rdx
je 0x140057f68
xor eax, eax
test rbx, rbx
je 0x140057b30
movsx r9, byte [rbx]
xor eax, eax
mov rcx, rbx
test r9b, r9b
je 0x140057b30
nop
add rax, r9
add rcx, 1
movsx r9, byte [rcx]
mov rbp, rax
shl rbp, 0xa
add rax, rbp
mov r8, rax
shr r8, 8
xor rax, r8
test r9b, r9b
jne 0x140057b00
xor edx, edx
div rdi
movsxd rax, edx
shl rax, 3
mov r10, qword [rsp + 0x28]
mov r12, qword [r10 + rax]
test r12, r12
jne 0x140057b51
jmp 0x140057c8d
mov r12, qword [r12 + 0x10]
test r12, r12
je 0x140057c8d
mov rdx, qword [r12]
mov rcx, rbx
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x140057b43
cmp qword [r12 + 8], 0
je 0x140057c8d
movsx r15, byte [rbx]
test r15b, r15b
je 0x140057f60
mov r11, rbx
xor eax, eax
nop
add rax, r15
add r11, 1
movsx r15, byte [r11]
mov r13, rax
shl r13, 0xa
add rax, r13
mov r14, rax
shr r14, 8
xor rax, r14
test r15b, r15b
jne 0x140057b80
xor edx, edx
div rdi
movsxd rdi, edx
lea r12, [rdi*8]
mov rcx, qword [rsp + 0x28]
mov r13, qword [rcx + r12]
test r13, r13
je 0x140057c8d
xor ebp, ebp
jmp 0x140057be3
mov r8, qword [r13 + 0x10]
mov rbp, r13
test r8, r8
je 0x140057c8d
mov r13, r8
mov rdx, qword [r13]
mov rcx, rbx
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x140057bd0
mov rcx, qword [r13 + 8]
call fcn.14016b5d8
test rbp, rbp
je 0x140057f37
mov r9, qword [r13 + 0x10]
mov qword [rbp + 0x10], r9
mov rcx, qword [r13]
call fcn.14016b5d8
mov rcx, r13
call fcn.14016b5d8
mov r14, qword [rsp + 0x90]
mov rcx, rsi
mov rdi, qword [r14 + 0xe0]
mov qword [rsp + 0x28], rdi
call sub.msvcrt.dll__strdup
test rdi, rdi
mov rsi, rax
jne 0x140057c98
mov edx, 8
mov ecx, 1
xor r12d, r12d
call sub.msvcrt.dll_calloc
mov rbp, qword [rsp + 0x90]
mov r13, qword [rsp + 0x90]
test rax, rax
setne r12b
test rbx, rbx
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x34], r12d
mov qword [rbp + 0xe0], rax
mov dword [r13 + 0xd8], r12d
jne 0x140057cb1
xor r14d, r14d
jmp 0x140057cf9
mov rcx, rsi
call sub.msvcrt.dll__strdup
mov rsi, rax
mov rcx, qword [rsp + 0x90]
test rbx, rbx
mov r8d, dword [rcx + 0xd8]
mov dword [rsp + 0x34], r8d
je 0x140057c88
movsx rdi, byte [rbx]
test dil, dil
je 0x140057c88
mov r9, rbx
xor eax, eax
nop
add rax, rdi
add r9, 1
movsx rdi, byte [r9]
mov r10, rax
shl r10, 0xa
add rax, r10
mov r11, rax
shr r11, 8
xor rax, r11
test dil, dil
jne 0x140057cc0
movsxd r15, dword [rsp + 0x34]
xor edx, edx
div r15
movsxd rcx, edx
lea r14, [rcx*8]
mov ecx, 0x18
call sub.msvcrt.dll_malloc
mov rcx, rbx
mov rbp, rax
call sub.msvcrt.dll__strdup
add r14, qword [rsp + 0x28]
mov qword [rbp + 8], rsi
mov qword [rbp], rax
mov rbx, qword [r14]
mov qword [rbp + 0x10], rbx
mov qword [r14], rbp
mov rsi, qword [rbp + 0x10]
test rsi, rsi
je 0x140057eff
mov r8d, 1
nop dword [rax + rax]
mov rsi, qword [rsi + 0x10]
add r8d, 1
test rsi, rsi
jne 0x140057d40
cmp r8d, 3
jle 0x140057eff
mov r12d, dword [rsp + 0x34]
xor esi, esi
lea r13d, [r12 + r12*2 + 6]
mov ebp, r13d
shr ebp, 0x1f
add ebp, r13d
sar ebp, 1
test ebp, ebp
jle 0x140057d8f
movsxd rcx, ebp
mov edx, 8
mov r14d, 0
call sub.msvcrt.dll_calloc
test rax, rax
mov rsi, rax
cmove ebp, r14d
mov r9d, dword [rsp + 0x34]
test r9d, r9d
jle 0x140057f53
mov rax, qword [rsp + 0x28]
sub r9d, 1
lea r10, [rax + r9*8 + 8]
mov r12, rax
mov qword [rsp + 0x38], r10
mov r15, qword [r12]
test r15, r15
je 0x140057e5d
test rsi, rsi
mov rdi, qword [r15 + 8]
mov r13, qword [r15]
je 0x140057f17
test r13, r13
je 0x140057f10
movsx r8, byte [r13]
test r8b, r8b
je 0x140057f10
mov r11, r13
xor eax, eax
nop dword [rax]
add rax, r8
add r11, 1
movsx r8, byte [r11]
mov rdx, rax
shl rdx, 0xa
add rax, rdx
mov rcx, rax
shr rcx, 8
xor rax, rcx
test r8b, r8b
jne 0x140057df0
movsxd r14, ebp
xor edx, edx
div r14
movsxd r9, edx
lea rbx, [r9*8]
mov ecx, 0x18
add rbx, rsi
call sub.msvcrt.dll_malloc
mov rcx, r13
mov r14, rax
call sub.msvcrt.dll__strdup
mov r10, qword [rbx]
mov qword [rbx], r14
mov qword [r14], rax
mov qword [r14 + 8], rdi
mov qword [r14 + 0x10], r10
mov r15, qword [r15 + 0x10]
test r15, r15
jne 0x140057dc0
add r12, 8
cmp qword [rsp + 0x38], r12
jne 0x140057db3
xor r12d, r12d
xor edi, edi
cmp qword [rsp + 0x28], 0
je 0x140057eea
nop dword [rax]
mov r13, qword [rsp + 0x28]
mov rbx, qword [r13 + r12]
test rbx, rbx
je 0x140057ed3
nop
mov rcx, qword [rbx]
mov r14, qword [rbx + 0x10]
call fcn.14016b5d8
mov rcx, rbx
mov rbx, r14
call fcn.14016b5d8
test r14, r14
jne 0x140057e90
mov r11, qword [rsp + 0x90]
mov rcx, qword [rsp + 0x90]
mov eax, dword [r11 + 0xd8]
mov r8, qword [rcx + 0xe0]
mov dword [rsp + 0x34], eax
mov qword [rsp + 0x28], r8
add edi, 1
add r12, 8
cmp edi, dword [rsp + 0x34]
jl 0x140057e80
mov rcx, qword [rsp + 0x28]
call fcn.14016b5d8
mov rdx, qword [rsp + 0x90]
mov dword [rdx + 0xd8], ebp
mov qword [rdx + 0xe0], rsi
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
xor ebx, ebx
jmp 0x140057e27
mov edx, 8
mov ecx, 1
xor ebp, ebp
call sub.msvcrt.dll_calloc
test rax, rax
mov rsi, rax
setne bpl
jmp 0x140057dd0
mov r11, qword [rsp + 0x90]
mov r10, qword [r13 + 0x10]
mov rax, qword [r11 + 0xe0]
mov qword [rax + r12], r10
jmp 0x140057c0d
cmp qword [rsp + 0x28], 0
jne 0x140057ee0
jmp 0x140057eea
xor r12d, r12d
jmp 0x140057bb4
mov rcx, r8
call sub.msvcrt.dll__strdup
mov rsi, rax
jmp 0x140057c42