Function at 0x1400015a9
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x9c8
movaps xmmword [rsp + 0x9b0], xmm7
movaps xmmword [rsp + 0x9a0], xmm6
mov rsi, rdx
mov edi, ecx
mov rax, qword [0x1400e0338]
xor rax, rsp
mov qword [rsp + 0x998], rax
movabs r15, 0xaaaaaaaaaaaaaaaa
movaps xmm6, xmmword [section..rdata]
lea rcx, [rsp + 0xc0]
movaps xmmword [rcx + 0x20], xmm6
movaps xmmword [rcx + 0x10], xmm6
movaps xmmword [rcx], xmm6
call fcn.140032700
mov ecx, edi
mov rdx, rsi
call fcn.1400334d0
call fcn.140033830
mov rbp, rax
mov qword [rsp + 0xa8], r15
mov dword [rsp + 0xa8], 1
mov qword [rsp + 0xb0], 0
movabs rax, 0x100000000
mov qword [rsp + 0xb8], rax
lea rdx, str.nologfile
mov rcx, rbp
call fcn.140033d00
test al, al
je 0x1400010c6
mov dword [rsp + 0xa8], 6
jmp 0x1400010e0
mov dword [rsp + 0xa8], 7
lea rax, str.courgette.log
mov qword [rsp + 0xb0], rax
lea rcx, [rsp + 0xa8]
call fcn.140037ec0
mov ecx, 0xffffffff
call fcn.140038390
lea rdx, str.supported
mov rcx, rbp
call fcn.140033d00
mov byte [rsp + 0x2f], al
lea rdx, [0x1400ba040]
mov rcx, rbp
call fcn.140033d00
mov byte [rsp + 0x26], al
lea rdx, [0x1400ba044]
mov rcx, rbp
call fcn.140033d00
mov byte [rsp + 0x2e], al
lea rdx, str.disadj
mov rcx, rbp
call fcn.140033d00
mov byte [rsp + 0x2d], al
lea rdx, [0x1400ba04f]
mov rcx, rbp
call fcn.140033d00
mov byte [rsp + 0x2c], al
lea rdx, str.apply
mov rcx, rbp
call fcn.140033d00
mov byte [rsp + 0x2b], al
lea rdx, str.genbsdiff
mov rcx, rbp
call fcn.140033d00
mov byte [rsp + 0x2a], al
lea rdx, str.applybsdiff
mov rcx, rbp
call fcn.140033d00
mov byte [rsp + 0x29], al
lea rdx, str.gen1a
mov rcx, rbp
call fcn.140033d00
mov byte [rsp + 0x28], al
lea rdx, str.gen1u
mov rcx, rbp
call fcn.140033d00
mov byte [rsp + 0x27], al
xorps xmm0, xmm0
movaps xmmword [rsp + 0x90], xmm0
mov qword [rsp + 0xa0], 0
lea rsi, [rsp + 0x78]
mov rcx, rbp
mov rdx, rsi
call fcn.1400348f0
mov rax, qword [rsi]
cmp qword [rsi + 8], rax
je 0x140001407
xor r14d, r14d
lea rdi, [rsp + 0x220]
lea r13, [rsp + 0x68]
movabs r12, 0xaaaaaaaaaaaaaaab
movabs rsi, 0xaaaaaaaaaaaaaaa
lea rcx, [r14 + r14*2]
cmp byte [rax + rcx*8 + 0x17], 0
jns 0x14000121e
mov rdx, qword [rax + rcx*8]
jmp 0x140001222
lea rdx, [rax + rcx*8]
mov qword [rsp + 0x68], rdx
movzx edx, byte [rax + rcx*8 + 0x17]
test dl, dl
jns 0x140001235
mov rdx, qword [rax + rcx*8 + 8]
mov qword [rsp + 0x70], rdx
mov rcx, rdi
mov rdx, r13
call fcn.140035910
mov rbx, qword [rsp + 0x98]
mov rax, qword [rsp + 0xa0]
cmp rbx, rax
jae 0x140001276
mov rcx, rbx
mov rdx, rdi
call fcn.1400358f0
add rbx, 0x18
mov qword [rsp + 0x98], rbx
jmp 0x1400013db
mov qword [rsp + 0x290], r15
movaps xmmword [rsp + 0x280], xmm6
movaps xmmword [rsp + 0x270], xmm6
mov rdx, qword [rsp + 0x90]
sub rbx, rdx
sar rbx, 3
imul rbx, r12
lea rcx, [rbx + 1]
cmp rcx, rsi
ja 0x140002474
sub rax, rdx
sar rax, 3
imul rax, r12
lea rdx, [rax + rax]
cmp rdx, rcx
cmovb rdx, rcx
movabs rcx, 0x555555555555555
cmp rax, rcx
cmovae rdx, rsi
lea rcx, [rsp + 0x270]
mov r8, rbx
lea r9, [rsp + 0xa8]
call fcn.140002bb6
mov rcx, qword [rsp + 0x280]
mov rdx, rdi
call fcn.1400358f0
mov rax, qword [rsp + 0x280]
add rax, 0x18
mov qword [rsp + 0x280], rax
mov r15, qword [rsp + 0x90]
mov rbx, qword [rsp + 0x98]
cmp rbx, r15
je 0x140001371
mov rcx, qword [rsp + 0x278]
add rbx, 0xffffffffffffffe8
add rcx, 0xffffffffffffffe8
mov rdx, rbx
call fcn.1400358f0
mov rcx, qword [rsp + 0x278]
add rcx, 0xffffffffffffffe8
mov qword [rsp + 0x278], rcx
cmp r15, rbx
jne 0x14000132e
mov rdx, qword [rsp + 0x90]
mov rbx, qword [rsp + 0x98]
mov rax, qword [rsp + 0x280]
jmp 0x14000137c
mov rcx, qword [rsp + 0x278]
mov rdx, rbx
mov qword [rsp + 0x90], rcx
mov qword [rsp + 0x278], rdx
mov qword [rsp + 0x98], rax
mov qword [rsp + 0x280], rbx
mov rax, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x288]
mov qword [rsp + 0xa0], rcx
mov qword [rsp + 0x288], rax
mov qword [rsp + 0x270], rdx
lea rcx, [rsp + 0x270]
call fcn.140002c2c
movabs r15, 0xaaaaaaaaaaaaaaaa
mov rcx, rdi
call fcn.1400359f0
inc r14
mov rax, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x80]
sub rcx, rax
sar rcx, 3
imul rcx, r12
cmp r14, rcx
jb 0x14000120d
mov dword [rsp + 0x64], 1
lea rsi, [rsp + 0x40]
mov qword [rsi + 0x10], r15
movaps xmmword [rsi], xmm6
lea r8, str.repeat
mov rcx, rbp
mov rdx, rsi
call fcn.140033d70
movzx ecx, byte [rsi + 0x17]
mov rax, rcx
test cl, cl
jns 0x14000143d
mov rax, qword [rsp + 0x48]
test rax, rax
mov bl, byte [rsp + 0x27]
mov dil, byte [rsp + 0x2f]
je 0x140001476
test cl, cl
jns 0x140001454
mov rsi, qword [rsp + 0x40]
lea rcx, [rsp + 0x30]
mov qword [rcx], rsi
mov qword [rcx + 8], rax
lea rdx, [rsp + 0x64]
call fcn.1400395d0
test al, al
jne 0x140001476
mov dword [rsp + 0x64], 1
movzx eax, dil
mov sil, byte [rsp + 0x26]
movzx ecx, sil
add ecx, eax
movzx eax, byte [rsp + 0x2e]
add eax, ecx
movzx ecx, byte [rsp + 0x2d]
add ecx, eax
movzx eax, byte [rsp + 0x2c]
add eax, ecx
movzx ecx, byte [rsp + 0x2b]
add ecx, eax
movzx eax, byte [rsp + 0x2a]
add eax, ecx
movzx ecx, byte [rsp + 0x29]
add ecx, eax
movzx eax, byte [rsp + 0x28]
add eax, ecx
movzx ecx, bl
add ecx, eax
cmp ecx, 1
jne 0x1400024df
mov eax, dword [rsp + 0x64]
lea ecx, [rax - 1]
mov dword [rsp + 0x64], ecx
test eax, eax
jle 0x140002378
test dil, dil
je 0x14000159c
mov rdx, qword [rsp + 0x90]
mov rax, qword [rsp + 0x98]
sub rax, rdx
cmp rax, 0x18
jne 0x140002575
lea rsi, [rsp + 0x270]
movaps xmmword [rsi + 0x40], xmm6
movaps xmmword [rsi + 0x30], xmm6
movaps xmmword [rsi + 0x20], xmm6
movaps xmmword [rsi + 0x10], xmm6
movaps xmmword [rsi], xmm6
lea r8, str.input
mov rcx, rsi
call 0x1400027c0
lea rbx, [rsp + 0x1b0]
mov dword [rbx], 0xaaaaaaaa
lea r9, [rsp + 0x1d0]
mov qword [r9], r15
mov rcx, qword [rsi + 0x38]
mov rdx, qword [rsi + 0x40]
mov r8, rbx
call fcn.140032653
lea rdi, [rsp + 0x220]
mov qword [rdi + 0x10], r15
movaps xmmword [rdi], xmm6
lea rdx, str.Unsupported
mov rcx, rdi
call fcn.140002836
mov eax, dword [rbx]
cmp eax, 1
je 0x140002385
cmp eax, 4
je 0x14000237c
mov esi, 1
cmp eax, 2
jne 0x14000239b
lea rdx, str.ELF_32_X86
jmp 0x14000238c
or bl, byte [rsp + 0x28]
mov byte [rsp + 0x27], bl
xorps xmm7, xmm7
lea r9, [rax - 0x75]
mov rax, rsp
add byte [rax], al
mov ecx, dword [rax + 0x24]
call qword [r9 + 0xd8]
and al, 0x41
call qword [rcx + 0xd8]
lea rdx, [rbx + 0x100]
lea edx, [rbx + 0x100]
mov r8d, 4
mov eax, 4
mov rcx, rax
mov rdi, rax
call fcn.140002ea9
mov rcx, rdi
call fcn.140002e29
movzx ecx, byte [rbx + 0x80]
mov edx, eax
mov byte [rdx + rdi], cl
movzx ecx, byte [rbx + 0x81]
mov byte [rdx + rdi + 1], cl
mov rcx, rdi
call fcn.140002e29
mov ecx, eax
movzx eax, byte [rbx + 0x114]
mov byte [rcx + rdi], al
movzx eax, byte [rbx + 0x115]
mov byte [rcx + rdi + 1], al
movzx eax, byte [rbx + 0x116]
mov byte [rcx + rdi + 2], al
movzx eax, byte [rbx + 0x117]
mov byte [rcx + rdi + 3], al
mov rcx, rdi
call fcn.140002e29
test eax, eax
je 0x14000241d
add byte [rax - 0x75], cl
iretd
mov ecx, eax
lea rdx, [rcx + rdi]
lea r8, [rsi + rcx*2]
nop dword [rax]
movsx ecx, byte [rdx]
lea rdx, [rdx - 1]
mov word [r8], cx
lea r8, [r8 - 2]
add eax, 0xffffffff
jne 0x140002409
mov rbx, qword [rsp + 0x30]
mov ecx, eax
movsx eax, byte [rcx + rdi]
mov word [rsi + rcx*2], ax
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
lea rdx, [rbx + 0xbc]
mov r8d, 3
mov rcx, rax
mov rdi, rax
call fcn.140002ea9
mov rcx, rdi
call fcn.140002e29
movzx ecx, byte [rbx + 0x6c]
mov edx, eax
mov byte [rdx + rdi], cl
movzx ecx, byte [rbx + 0x6d]
mov byte [rdx + rdi + 1], cl
movzx ecx, byte [rbx + 0x6e]
mov byte [rdx + rdi + 2], cl
mov rcx, rdi
movzx eax, byte [rbx + 0x6f]
mov byte [rdx + rdi + 3], al
call fcn.140002e29
mov ecx, eax
movzx eax, byte [rbx + 0x114]
mov byte [rcx + rdi], al
movzx eax, byte [rbx + 0x115]
mov byte [rcx + rdi + 1], al
movzx eax, byte [rbx + 0x116]
mov byte [rcx + rdi + 2], al
movzx eax, byte [rbx + 0x117]
mov byte [rcx + rdi + 3], al
mov rcx, rdi
call fcn.140002e29
test eax, eax
je 0x14000251d
mov ecx, eax
lea rdx, [rcx + rdi]
lea r8, [rsi + rcx*2]
nop word [rax + rax]
movsx ecx, byte [rdx]
lea rdx, [rdx - 1]
mov word [r8], cx
lea r8, [r8 - 2]
add eax, 0xffffffff
jne 0x140002509
mov rbx, qword [rsp + 0x30]
mov ecx, eax
movsx eax, byte [rcx + rdi]
mov word [rsi + rcx*2], ax
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
mov edi, eax
call fcn.1400030d9
lea rdx, [rsp + 0x98]
mov dword [rsp + 0x98], 0x10
lea rcx, [rsp + 0x40]
call qword [rbp + 0x18]
lea rcx, [rsp + 0x40]
mov dword [rsp + 0x98], 0x105
call fcn.140002e69
xor edi, edi
mov ebx, edi
test eax, eax
je 0x1400025df
mov rcx, qword [rsp + 0xa0]
lea rdx, [rsp + 0x40]
mov r8d, eax
mov r9d, dword [rcx + 0x60]
nop
mov ecx, r9d
lea rdx, [rdx + 2]
imul ecx, ebx
movzx ebx, word [rdx - 2]
add ebx, ecx
sub r8, 1
jne 0x1400025c9
xor ebx, r14d
mov ecx, ebx
call qword [rbp + 8]
mov dword [r15], ebx
call qword [rbp + 0x10]
mov ebx, eax
and ebx, 0x80000007
jge 0x1400025fe
dec ebx
or ebx, 0xfffffff8
inc ebx
lea rcx, [rsp + 0x40]
call fcn.140002e69
lea r8d, [rax + 3]
mov eax, edi
add r8d, ebx
mov dword [rsp + 0x98], r8d
movsxd rcx, eax
lea edx, [rax + 0x41]
inc eax
mov byte [rsp + rcx + 0x20], dl
cmp eax, 0x1a
jb 0x140002619
test r8d, r8d
je 0x140002668
movabs rbx, 0x4ec4ec4ec4ec4ec5
call qword [rbp + 0x10]
movsxd rcx, eax
inc edi
mov rax, rbx
lea rsi, [rsi + 2]
mul rcx
shr rdx, 3
imul rax, rdx, 0x1a
sub rcx, rax
movsx eax, byte [rsp + rcx + 0x20]
mov word [rsi - 2], ax
cmp edi, dword [rsp + 0x98]
jb 0x140002639
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rdi
ret