Function at 0x14009c380
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
mov r13, rdx
mov r12, rcx
mov ecx, 1
mov edx, 0x28
xor r8d, r8d
call fcn.140042c20
mov rsi, rax
mov qword [rax], r13
mov rax, r13
sub rax, 1
mov qword [rsi + 8], rax
pxor xmm0, xmm0
movdqu xmmword [rsi + 0x10], xmm0
mov qword [rsi + 0x20], 0
jae 0x14009c3e5
lea rcx, str.n___0
lea rdx, str._home_simon_mem_.build_workdirs_bob_jmc5owxa_putty_crypto_ntru.c
mov r8d, 0x273
call fcn.1400c91bc
mov r15, rsi
add r15, 0x18
mov edx, 4
mov rcx, r13
xor r8d, r8d
call fcn.140042c20
mov rdi, rax
mov edx, 4
mov rcx, r13
xor r8d, r8d
call fcn.140042c20
mov qword [rsp + 0x38], rax
test r13, r13
je 0x14009c726
cmp r13, 8
jb 0x14009c435
lea rax, [r12 + r13*2]
cmp rdi, rax
jae 0x14009c4a4
lea rax, [rdi + r13*4]
cmp rax, r12
jbe 0x14009c4a4
xor eax, eax
mov rcx, rax
not rcx
add rcx, r13
mov rdx, r13
and rdx, 3
je 0x14009c462
nop dword [rax]
movzx ebp, word [r12 + rax*2]
mov dword [rdi + rax*4], ebp
add rax, 1
add rdx, 0xffffffffffffffff
jne 0x14009c450
cmp rcx, 3
jb 0x14009c54f
nop dword [rax]
movzx ecx, word [r12 + rax*2]
mov dword [rdi + rax*4], ecx
movzx ecx, word [r12 + rax*2 + 2]
mov dword [rdi + rax*4 + 4], ecx
movzx ecx, word [r12 + rax*2 + 4]
mov dword [rdi + rax*4 + 8], ecx
movzx ecx, word [r12 + rax*2 + 6]
mov dword [rdi + rax*4 + 0xc], ecx
add rax, 4
cmp r13, rax
jne 0x14009c470
jmp 0x14009c54f
mov rax, r13
and rax, 0xfffffffffffffff8
lea rcx, [rax - 8]
mov rbp, rcx
shr rbp, 3
add rbp, 1
test rcx, rcx
je 0x14009c7c6
mov rdx, rbp
and rdx, 0xfffffffffffffffe
xor ecx, ecx
pxor xmm0, xmm0
movq xmm1, qword [r12 + rcx*2]
movq xmm2, qword [r12 + rcx*2 + 8]
punpcklwd xmm1, xmm0
punpcklwd xmm2, xmm0
movdqu xmmword [rdi + rcx*4], xmm1
movdqu xmmword [rdi + rcx*4 + 0x10], xmm2
movq xmm1, qword [r12 + rcx*2 + 0x10]
movq xmm2, qword [r12 + rcx*2 + 0x18]
punpcklwd xmm1, xmm0
punpcklwd xmm2, xmm0
movdqu xmmword [rdi + rcx*4 + 0x20], xmm1
movdqu xmmword [rdi + rcx*4 + 0x30], xmm2
add rcx, 0x10
add rdx, 0xfffffffffffffffe
jne 0x14009c4d0
test bpl, 1
je 0x14009c546
movq xmm0, qword [r12 + rcx*2]
movq xmm1, qword [r12 + rcx*2 + 8]
pxor xmm2, xmm2
punpcklwd xmm0, xmm2
punpcklwd xmm1, xmm2
movdqu xmmword [rdi + rcx*4], xmm0
movdqu xmmword [rdi + rcx*4 + 0x10], xmm1
cmp rax, r13
jne 0x14009c437
cmp r13, 2
jb 0x14009c720
mov rcx, r13
mov rax, rdi
jmp 0x14009c589
xor edx, edx
div ecx
mov qword [rsi + 8], rdx
mov rax, qword [rsp + 0x38]
mov eax, dword [rax + rbx*4]
mov dword [rdi + r13*4], eax
add r13, 1
mov rcx, r13
mov rax, rdi
cmp r13, 1
jbe 0x14009c720
mov rdi, qword [rsp + 0x38]
mov qword [rsp + 0x38], rax
xor ebx, ebx
xor r13d, r13d
mov qword [rsp + 0x40], rcx
jmp 0x14009c5b8
mov eax, ebp
mov dword [rdi + r13*4], eax
add r13, 1
add rbx, 2
mov rcx, qword [rsp + 0x40]
cmp rbx, rcx
jae 0x14009c579
mov rax, rbx
or rax, 1
cmp rax, rcx
je 0x14009c6c0
mov r12, rdi
mov rcx, qword [rsp + 0x38]
mov r14d, dword [rcx + rbx*4]
mov ebp, dword [rcx + rax*4]
imul ebp, r14d
add r14d, 2
mov r9, qword [rsi + 0x10]
mov rcx, qword [rsi + 0x20]
mov byte [rsp + 0x28], 0
mov qword [rsp + 0x20], 1
mov r8d, 4
mov rdx, r15
call fcn.140042cd0
mov qword [rsi + 0x20], rax
movzx ecx, r14w
mov rdx, qword [rsi + 0x10]
lea rdi, [rdx + 1]
mov qword [rsi + 0x10], rdi
mov dword [rax + rdx*4], ecx
cmp cx, 1
je 0x14009c646
mov rcx, qword [rsi]
mov rax, qword [rsi + 8]
add rax, 1
mov rdx, rax
or rdx, rcx
shr rdx, 0x20
je 0x14009c63e
xor edx, edx
div rcx
jmp 0x14009c642
xor edx, edx
div ecx
mov qword [rsi + 8], rdx
cmp ebp, 0x4000
mov rdi, r12
jb 0x14009c5a0
nop word cs:[rax + rax]
nop
mov r9, qword [rsi + 0x10]
mov rcx, qword [rsi + 0x20]
mov byte [rsp + 0x28], 0
mov qword [rsp + 0x20], 1
mov r8d, 4
mov rdx, r15
call fcn.140042cd0
mov qword [rsi + 0x20], rax
mov rcx, qword [rsi + 0x10]
lea rdx, [rcx + 1]
mov qword [rsi + 0x10], rdx
mov dword [rax + rcx*4], 1
add ebp, 0xff
mov eax, ebp
shr eax, 8
cmp ebp, 0x3fffff
mov ebp, eax
ja 0x14009c660
jmp 0x14009c5a2
mov r9, qword [rsi + 0x10]
mov rcx, qword [rsi + 0x20]
mov byte [rsp + 0x28], 0
mov qword [rsp + 0x20], 1
mov r8d, 4
mov rdx, r15
call fcn.140042cd0
mov qword [rsi + 0x20], rax
mov rcx, qword [rsi + 0x10]
lea rdx, [rcx + 1]
mov qword [rsi + 0x10], rdx
mov dword [rax + rcx*4], 0
mov rcx, qword [rsi]
mov rax, qword [rsi + 8]
add rax, 1
mov rdx, rax
or rdx, rcx
shr rdx, 0x20
je 0x14009c561
xor edx, edx
div rcx
jmp 0x14009c565
cmp r13, 1
je 0x14009c73f
lea rcx, str.n__1
lea rdx, str._home_simon_mem_.build_workdirs_bob_jmc5owxa_putty_crypto_ntru.c
mov r8d, 0x2b5
call fcn.1400c91bc
mov ebx, dword [rdi]
cmp ebx, 2
jb 0x14009c7a0
nop word cs:[rax + rax]
mov r9, qword [rsi + 0x10]
mov rcx, qword [rsi + 0x20]
mov byte [rsp + 0x28], 0
mov qword [rsp + 0x20], 1
mov r8d, 4
mov rdx, r15
call fcn.140042cd0
mov qword [rsi + 0x20], rax
mov rcx, qword [rsi + 0x10]
lea rdx, [rcx + 1]
mov qword [rsi + 0x10], rdx
mov dword [rax + rcx*4], 1
add ebx, 0xff
mov eax, ebx
shr eax, 8
cmp ebx, 0x1ff
mov ebx, eax
ja 0x14009c750
mov rcx, rdi
call fcn.140042cc0
mov rcx, qword [rsp + 0x38]
call fcn.140042cc0
mov rax, rsi
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
xor ecx, ecx
test bpl, 1
jne 0x14009c522
jmp 0x14009c546