Function at 0x140059fd8
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
sub rsp, 0x20
mov rdi, rcx
mov ecx, dword [rcx + 0x138]
mov esi, r9d
mov eax, dword [rdi + 0xe8]
mov r12d, r8d
mov ebp, edx
sub eax, r8d
dec eax
imul eax, dword [rdi + 0x130]
movsxd rbx, eax
mov eax, ecx
imul eax, edx
cdqe
add rbx, rax
add rbx, qword [rdi + 0x128]
cmp dword [rdi + 0x144], 0
jne 0x14005a4d1
cmp dword [rdi + 0x148], 0
jne 0x14005a4d1
mov eax, dword [rdi + 0x13c]
test al, 2
je 0x14005a082
test r9d, r9d
je 0x14005a4f6
mov al, byte [rdi + 0x150]
xor byte [rbx + 2], al
mov al, byte [rdi + 0x154]
xor byte [rbx + 1], al
mov al, byte [rdi + 0x158]
xor byte [rbx], al
movsxd rax, dword [rdi + 0x138]
add rbx, rax
dec esi
jne 0x14005a055
jmp 0x14005a4f6
bt eax, 8
jae 0x14005a0c1
test r9d, r9d
je 0x14005a4f6
mov al, byte [rdi + 0x150]
mov byte [rbx + 2], al
mov al, byte [rdi + 0x154]
mov byte [rbx + 1], al
mov al, byte [rdi + 0x158]
mov byte [rbx], al
mov al, byte [rdi + 0x15c]
add rbx, 4
dec esi
mov byte [rbx - 1], al
jne 0x14005a091
jmp 0x14005a4f6
test al, 8
je 0x14005a0f0
cmp ecx, 4
jne 0x14005a4f6
test r9d, r9d
je 0x14005a4f6
add rbx, 3
mov al, byte [rdi + 0x15c]
mov byte [rbx], al
add rbx, 4
dec esi
jne 0x14005a0db
jmp 0x14005a4f6
test al, 0x10
je 0x14005a2e4
cmp ecx, 4
jne 0x14005a25b
test r9d, r9d
je 0x14005a4f6
mov r11d, 0x80808081
mov r10d, dword [rdi + 0x15c]
movzx r9d, byte [rbx + 3]
test r10d, r10d
jne 0x14005a127
movzx eax, byte [rbx + 2]
jmp 0x14005a16b
test r9d, r9d
jne 0x14005a138
mov eax, dword [rdi + 0x150]
cdq
idiv r10d
jmp 0x14005a16b
mov r8d, dword [rdi + 0x160]
movzx eax, byte [rbx + 2]
mov ecx, dword [rdi + 0x150]
imul r10d, r10d, 0xff
imul eax, r8d
imul ecx, ecx, 0xff
imul r8d, r9d
add r8d, r10d
imul eax, r9d
add eax, ecx
cdq
idiv r8d
mov byte [rbx + 2], al
mov r10d, dword [rdi + 0x15c]
test r10d, r10d
jne 0x14005a180
movzx eax, byte [rbx + 1]
jmp 0x14005a1c4
test r9d, r9d
jne 0x14005a191
mov eax, dword [rdi + 0x154]
cdq
idiv r10d
jmp 0x14005a1c4
mov r8d, dword [rdi + 0x160]
movzx eax, byte [rbx + 1]
mov ecx, dword [rdi + 0x154]
imul r10d, r10d, 0xff
imul eax, r8d
imul ecx, ecx, 0xff
imul r8d, r9d
add r8d, r10d
imul eax, r9d
add eax, ecx
cdq
idiv r8d
mov byte [rbx + 1], al
mov r10d, dword [rdi + 0x15c]
test r10d, r10d
jne 0x14005a1d8
movzx eax, byte [rbx]
jmp 0x14005a21b
test r9d, r9d
jne 0x14005a1e9
mov eax, dword [rdi + 0x158]
cdq
idiv r10d
jmp 0x14005a21b
mov r8d, dword [rdi + 0x160]
movzx eax, byte [rbx]
mov ecx, dword [rdi + 0x158]
imul r10d, r10d, 0xff
imul eax, r8d
imul ecx, ecx, 0xff
imul r8d, r9d
add r8d, r10d
imul eax, r9d
add eax, ecx
cdq
idiv r8d
mov byte [rbx], al
imul r9d, dword [rdi + 0x160]
mov eax, dword [rdi + 0x15c]
add rbx, 4
imul eax, eax, 0xff
add r9d, eax
mov eax, r11d
imul r9d
add edx, r9d
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
dec esi
mov byte [rbx - 1], dl
jne 0x14005a110
jmp 0x14005a4f6
test r9d, r9d
je 0x14005a4f6
mov r11d, 0x80808081
movzx ecx, byte [rbx + 2]
mov eax, r11d
imul ecx, dword [rdi + 0x160]
add ecx, dword [rdi + 0x150]
imul ecx
add edx, ecx
movzx ecx, byte [rbx + 1]
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, r11d
mov byte [rbx + 2], dl
imul ecx, dword [rdi + 0x160]
add ecx, dword [rdi + 0x154]
imul ecx
add edx, ecx
movzx ecx, byte [rbx]
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, r11d
mov byte [rbx + 1], dl
imul ecx, dword [rdi + 0x160]
add ecx, dword [rdi + 0x158]
imul ecx
add edx, ecx
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
mov byte [rbx], dl
add rbx, 3
dec esi
jne 0x14005a26a
jmp 0x14005a4f6
test al, 0x20
je 0x14005a4a2
cmp ecx, 4
jne 0x14005a41c
test r9d, r9d
je 0x14005a4f6
mov r10d, dword [rdi + 0x15c]
movzx r9d, byte [rbx + 3]
test r10d, r10d
jne 0x14005a315
movzx eax, byte [rbx + 2]
jmp 0x14005a359
test r9d, r9d
jne 0x14005a326
mov eax, dword [rdi + 0x150]
cdq
idiv r10d
jmp 0x14005a359
mov r8d, dword [rdi + 0x160]
movzx eax, byte [rbx + 2]
mov ecx, dword [rdi + 0x150]
imul r10d, r10d, 0xff
imul eax, r8d
imul ecx, ecx, 0xff
imul r8d, r9d
add r8d, r10d
imul eax, r9d
add eax, ecx
cdq
idiv r8d
mov byte [rbx + 2], al
mov r10d, dword [rdi + 0x15c]
test r10d, r10d
jne 0x14005a36e
movzx eax, byte [rbx + 1]
jmp 0x14005a3b2
test r9d, r9d
jne 0x14005a37f
mov eax, dword [rdi + 0x154]
cdq
idiv r10d
jmp 0x14005a3b2
mov r8d, dword [rdi + 0x160]
movzx eax, byte [rbx + 1]
mov ecx, dword [rdi + 0x154]
imul r10d, r10d, 0xff
imul eax, r8d
imul ecx, ecx, 0xff
imul r8d, r9d
add r8d, r10d
imul eax, r9d
add eax, ecx
cdq
idiv r8d
mov byte [rbx + 1], al
mov r10d, dword [rdi + 0x15c]
test r10d, r10d
jne 0x14005a3c6
movzx eax, byte [rbx]
jmp 0x14005a409
test r9d, r9d
jne 0x14005a3d7
mov eax, dword [rdi + 0x158]
cdq
idiv r10d
jmp 0x14005a409
mov r8d, dword [rdi + 0x160]
movzx eax, byte [rbx]
mov ecx, dword [rdi + 0x158]
imul r10d, r10d, 0xff
imul eax, r8d
imul ecx, ecx, 0xff
imul r8d, r9d
add r8d, r10d
imul eax, r9d
add eax, ecx
cdq
idiv r8d
mov byte [rbx], al
add rbx, 4
dec esi
jne 0x14005a2fe
jmp 0x14005a4f6
test r9d, r9d
je 0x14005a4f6
mov r11d, 0x80808081
movzx ecx, byte [rbx + 2]
mov eax, r11d
imul ecx, dword [rdi + 0x160]
add ecx, dword [rdi + 0x150]
imul ecx
add edx, ecx
movzx ecx, byte [rbx + 1]
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, r11d
mov byte [rbx + 2], dl
imul ecx, dword [rdi + 0x160]
add ecx, dword [rdi + 0x154]
imul ecx
add edx, ecx
movzx ecx, byte [rbx]
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, r11d
mov byte [rbx + 1], dl
imul ecx, dword [rdi + 0x160]
add ecx, dword [rdi + 0x158]
imul ecx
add edx, ecx
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
mov byte [rbx], dl
add rbx, 3
dec esi
jne 0x14005a42b
jmp 0x14005a4f6
test r9d, r9d
je 0x14005a4f6
mov al, byte [rdi + 0x150]
mov byte [rbx + 2], al
mov al, byte [rdi + 0x154]
mov byte [rbx + 1], al
mov al, byte [rdi + 0x158]
mov byte [rbx], al
movsxd rax, dword [rdi + 0x138]
add rbx, rax
dec esi
jne 0x14005a4a7
jmp 0x14005a4f6
test r9d, r9d
je 0x14005a4f6
mov r9, rbx
mov r8d, r12d
mov edx, ebp
mov rcx, rdi
call fcn.140059a34
movsxd r11, dword [rdi + 0x138]
inc ebp
add rbx, r11
dec esi
jne 0x14005a4d6
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r12
ret