Function at 0x40a7e0
Capabilities:
Encode data using xor

Disassembly:
push rsi
push rbx
sub rsp, 0x28
test rcx, rcx
mov rbx, rcx
je 0x40a7c0
mov ecx, dword [rcx]
call fcn.00409b90
test eax, eax
mov esi, eax
jne 0x40a7b7
movsxd rax, dword [rbx]
lea rcx, [rbx + 0x118]
lea rdx, [rax + rax*2]
shl rdx, 6
add rdx, qword [0x00443ca0]
call qword [rdx + 0x40]
mov eax, esi
add rsp, 0x28
pop rbx
pop rsi
ret
lea rdx, str.src_modes_ctr_ctr_done.c
lea rcx, [0x00440a89]
mov r8d, 0x19
call fcn.00409b50
nop
nop
nop
nop
nop
nop
nop
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
test rcx, rcx
mov rsi, rcx
mov rdi, rdx
mov ebp, r8d
mov rbx, r9
je 0x40b0ed
test rdx, rdx
je 0x40b0d4
test r9, r9
je 0x40b0bb
mov ecx, dword [r9]
call fcn.00409b90
test eax, eax
mov r12d, eax
jne 0x40aae4
mov ecx, dword [rbx + 4]
mov r12d, 0x10
lea eax, [rcx - 1]
cmp eax, 0x7f
ja 0x40aae4
movsxd rax, dword [rbx + 8]
cmp eax, 0x80
ja 0x40aae4
mov r12d, ecx
and r12d, 7
jne 0x40ab00
movsxd rdx, dword [rbx]
mov r13, qword [0x00443ca0]
lea r8, [rdx + rdx*2]
shl r8, 6
cmp qword [r13 + r8 + 0x70], 0
je 0x40a8d7
cmp ecx, ebp
ja 0x40a8d7
cmp ecx, eax
jg 0x40acc0
cmp ebp, ecx
jb 0x40a8d7
xor edx, edx
movsxd r10, dword [rbx]
mov eax, ebp
div ecx
mov ecx, dword [rbx + 0xc]
lea r9, [rbx + 0x118]
mov rdx, rdi
lea r11, [r10 + r10*2]
mov qword [rsp + 0x28], r9
lea r9, [rbx + 0x14]
mov dword [rsp + 0x20], ecx
mov rcx, rsi
shl r11, 6
mov r8d, eax
call qword [r13 + r11 + 0x70]
test eax, eax
jne 0x40aae1
mov ecx, dword [rbx + 4]
mov eax, ebp
xor edx, edx
div ecx
imul eax, ecx
mov ebp, edx
add rsi, rax
add rdi, rax
test ebp, ebp
lea r15, [rbx + 0x118]
lea r14, [rbx + 0x14]
jne 0x40a924
jmp 0x40aae4
test r9d, r9d
je 0x40aa9d
lea edx, [r9 + 1]
movzx eax, byte [rsi]
sub ebp, 1
add rdi, 1
add rsi, 1
mov dword [rbx + 8], edx
xor al, byte [rbx + r9 + 0x94]
mov byte [rdi - 1], al
test ebp, ebp
je 0x40aae4
mov ecx, dword [rbx + 4]
movsxd r9, dword [rbx + 8]
cmp r9d, ecx
jne 0x40a8f0
mov r8d, dword [rbx + 0xc]
mov r9d, dword [rbx + 0x10]
test r8d, r8d
jne 0x40ab10
test r9d, r9d
jle 0x40aa72
add byte [rbx + 0x14], 1
jne 0x40aa72
lea rax, [rbx + 0x15]
sub r9d, 1
lea r10, [rax + r9]
and r9d, 7
je 0x40aa2f
movzx ecx, byte [rbx + 0x15]
lea rax, [rbx + 0x16]
lea r11d, [rcx + 1]
test r11b, r11b
mov byte [rbx + 0x15], r11b
jne 0x40aa72
cmp r9, 1
je 0x40aa2f
cmp r9, 2
je 0x40aa1a
cmp r9, 3
je 0x40aa09
cmp r9, 4
je 0x40a9f4
cmp r9, 5
je 0x40a9db
cmp r9, 6
je 0x40a9c4
movzx r9d, byte [rbx + 0x16]
add rax, 1
lea edx, [r9 + 1]
test dl, dl
mov byte [rbx + 0x16], dl
jne 0x40aa72
movzx r8d, byte [rax]
add rax, 1
lea ecx, [r8 + 1]
mov byte [rax - 1], cl
test cl, cl
jne 0x40aa72
movzx r11d, byte [rax]
add rax, 1
add r11d, 1
mov byte [rax - 1], r11b
test r11b, r11b
jne 0x40aa72
movzx r9d, byte [rax]
add rax, 1
add r9d, 1
mov byte [rax - 1], r9b
test r9b, r9b
jne 0x40aa72
movzx edx, byte [rax]
add rax, 1
add edx, 1
mov byte [rax - 1], dl
test dl, dl
jne 0x40aa72
movzx r8d, byte [rax]
add rax, 1
add r8d, 1
mov byte [rax - 1], r8b
test r8b, r8b
jne 0x40aa72
cmp r10, rax
je 0x40aa72
add byte [rax], 1
jne 0x40aa72
add byte [rax + 1], 1
jne 0x40aa72
add byte [rax + 2], 1
jne 0x40aa72
add byte [rax + 3], 1
jne 0x40aa72
add byte [rax + 4], 1
jne 0x40aa72
add byte [rax + 5], 1
jne 0x40aa72
add byte [rax + 6], 1
jne 0x40aa72
movzx ecx, byte [rax + 7]
add rax, 8
lea r11d, [rcx + 1]
mov byte [rax - 1], r11b
test r11b, r11b
je 0x40aa2f
movsxd r10, dword [rbx]
lea rdx, [rbx + 0x94]
mov r8, r15
mov rcx, r14
lea rax, [r10 + r10*2]
shl rax, 6
call qword [r13 + rax + 0x28]
test eax, eax
jne 0x40aae1
mov ecx, dword [rbx + 4]
mov dword [rbx + 8], 0
xor r9d, r9d
cmp ecx, ebp
ja 0x40a8f9
test ecx, ecx
jle 0x40aace
lea r11, [rbx + 0x94]
movsxd r10, r9d
add r9d, 8
mov rcx, qword [rsi + r10]
xor rcx, qword [r11 + r10]
mov qword [rdi + r10], rcx
mov ecx, dword [rbx + 4]
cmp ecx, r9d
jg 0x40aab3
movsxd r9, ecx
sub ebp, ecx
mov dword [rbx + 8], ecx
add rsi, r9
add rdi, r9
jmp 0x40a919
mov r12d, eax
mov eax, r12d
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r12d, 0x10
jmp 0x40aae4
lea eax, [rcx - 1]
cmp eax, r9d
jl 0x40aa72
cdqe
movzx r10d, byte [rbx + rax + 0x14]
lea r11d, [r10 + 1]
test r11b, r11b
mov byte [rbx + rax + 0x14], r11b
jne 0x40aa72
sub ecx, 2
movsxd rcx, ecx
mov edx, ecx
sub edx, r9d
add edx, 1
and edx, 7
je 0x40ac36
cmp r9d, ecx
jg 0x40aa72
movzx r8d, byte [rbx + rcx + 0x14]
lea eax, [r8 + 1]
mov byte [rbx + rcx + 0x14], al
sub rcx, 1
test al, al
jne 0x40aa72
cmp edx, 1
je 0x40ac36
cmp edx, 2
je 0x40ac1a
cmp edx, 3
je 0x40ac02
cmp edx, 4
je 0x40abe6
cmp edx, 5
je 0x40abce
cmp edx, 6
je 0x40abb2
movzx r10d, byte [rbx + rcx + 0x14]
add r10d, 1
mov byte [rbx + rcx + 0x14], r10b
sub rcx, 1
test r10b, r10b
jne 0x40aa72
movzx r11d, byte [rbx + rcx + 0x14]
add r11d, 1
mov byte [rbx + rcx + 0x14], r11b
sub rcx, 1
test r11b, r11b
jne 0x40aa72
movzx edx, byte [rbx + rcx + 0x14]
add edx, 1
mov byte [rbx + rcx + 0x14], dl
sub rcx, 1
test dl, dl
jne 0x40aa72
movzx r8d, byte [rbx + rcx + 0x14]
add r8d, 1
mov byte [rbx + rcx + 0x14], r8b
sub rcx, 1
test r8b, r8b
jne 0x40aa72
movzx eax, byte [rbx + rcx + 0x14]
add eax, 1
mov byte [rbx + rcx + 0x14], al
sub rcx, 1
test al, al
jne 0x40aa72
movzx r10d, byte [rbx + rcx + 0x14]
add r10d, 1
mov byte [rbx + rcx + 0x14], r10b
sub rcx, 1
test r10b, r10b
jne 0x40aa72
cmp r9d, ecx
jg 0x40aa72
movzx r11d, byte [rbx + rcx + 0x14]
lea rdx, [rcx - 1]
add r11d, 1
test r11b, r11b
mov byte [rbx + rcx + 0x14], r11b
jne 0x40aa72
add byte [rbx + rdx + 0x14], 1
jne 0x40aa72
add byte [rbx + rcx + 0x12], 1
jne 0x40aa72
add byte [rbx + rcx + 0x11], 1
jne 0x40aa72
add byte [rbx + rcx + 0x10], 1
jne 0x40aa72
add byte [rbx + rcx + 0xf], 1
jne 0x40aa72
add byte [rbx + rcx + 0xe], 1
jne 0x40aa72
movzx r8d, byte [rbx + rcx + 0xd]
add r8d, 1
mov byte [rbx + rcx + 0xd], r8b
sub rcx, 8
test r8b, r8b
je 0x40ac36
jmp 0x40aa72
mov r14d, ecx
lea r9, [rbx + 0x118]
lea r10, [rbx + 0x14]
sub r14d, eax
mov qword [rsp + 0xa0], rsi
mov r15, rdi
mov dword [rsp + 0x4c], r14d
mov qword [rsp + 0x38], r9
mov qword [rsp + 0x40], r10
jmp 0x40ad2c
test eax, eax
je 0x40aea6
lea r8d, [rax + 1]
movzx r10d, byte [rsi]
sub r14d, 1
add r15, 1
add rsi, 1
mov dword [rbx + 8], r8d
xor r10b, byte [rbx + rax + 0x94]
mov byte [r15 - 1], r10b
mov ecx, dword [rbx + 4]
test r14d, r14d
je 0x40b0a0
movsxd rax, dword [rbx + 8]
cmp eax, ecx
jne 0x40acf0
mov ecx, dword [rbx + 0xc]
mov edx, dword [rbx + 0x10]
test ecx, ecx
jne 0x40aef0
test edx, edx
jle 0x40ae73
add byte [rbx + 0x14], 1
jne 0x40ae73
lea r10, [rbx + 0x15]
sub edx, 1
lea r9, [r10 + rdx]
and edx, 7
je 0x40ae2a
movzx eax, byte [rbx + 0x15]
lea r10, [rbx + 0x16]
lea r11d, [rax + 1]
test r11b, r11b
mov byte [rbx + 0x15], r11b
jne 0x40ae73
cmp rdx, 1
je 0x40ae2a
cmp rdx, 2
je 0x40ae17
cmp rdx, 3
je 0x40ae02
cmp rdx, 4
je 0x40adef
cmp rdx, 5
je 0x40add6
cmp rdx, 6
je 0x40adbf
movzx edx, byte [rbx + 0x16]
add r10, 1
add edx, 1
test dl, dl
mov byte [rbx + 0x16], dl
jne 0x40ae73
movzx ecx, byte [r10]
add r10, 1
add ecx, 1
mov byte [r10 - 1], cl
test cl, cl
jne 0x40ae73
movzx r8d, byte [r10]
add r10, 1
add r8d, 1
mov byte [r10 - 1], r8b
test r8b, r8b
jne 0x40ae73
movzx eax, byte [r10]
add r10, 1
add eax, 1
mov byte [r10 - 1], al
test al, al
jne 0x40ae73
movzx r11d, byte [r10]
add r10, 1
add r11d, 1
mov byte [r10 - 1], r11b
test r11b, r11b
jne 0x40ae73
movzx edx, byte [r10]
add r10, 1
add edx, 1
mov byte [r10 - 1], dl
test dl, dl
jne 0x40ae73
cmp r9, r10
je 0x40ae73
add byte [r10], 1
jne 0x40ae73
add byte [r10 + 1], 1
jne 0x40ae73
add byte [r10 + 2], 1
jne 0x40ae73
add byte [r10 + 3], 1
jne 0x40ae73
add byte [r10 + 4], 1
jne 0x40ae73
add byte [r10 + 5], 1
jne 0x40ae73
add byte [r10 + 6], 1
jne 0x40ae73
movzx ecx, byte [r10 + 7]
add r10, 8
add ecx, 1
mov byte [r10 - 1], cl
test cl, cl
je 0x40ae2a
movsxd r9, dword [rbx]
lea rdx, [rbx + 0x94]
mov r8, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x40]
lea rax, [r9 + r9*2]
shl rax, 6
call qword [r13 + rax + 0x28]
test eax, eax
jne 0x40aae1
mov ecx, dword [rbx + 4]
mov dword [rbx + 8], 0
xor eax, eax
cmp ecx, r14d
ja 0x40acf8
test ecx, ecx
jle 0x40aed9
lea r9, [rbx + 0x94]
nop dword [rax]
movsxd rdx, eax
add eax, 8
mov rcx, qword [rsi + rdx]
xor rcx, qword [r9 + rdx]
mov qword [r15 + rdx], rcx
mov ecx, dword [rbx + 4]
cmp ecx, eax
jg 0x40aec0
movsxd rax, ecx
sub r14d, ecx
mov dword [rbx + 8], ecx
add rsi, rax
add r15, rax
jmp 0x40ad1f
lea r8d, [rax - 1]
cmp r8d, edx
jl 0x40ae73
movsxd r9, r8d
movzx r11d, byte [rbx + r9 + 0x14]
lea r10d, [r11 + 1]
test r10b, r10b
mov byte [rbx + r9 + 0x14], r10b
jne 0x40ae73
sub eax, 2
cdqe
mov ecx, eax
sub ecx, edx
add ecx, 1
and ecx, 7
je 0x40b01b
cmp edx, eax
jg 0x40ae73
movzx r8d, byte [rbx + rax + 0x14]
lea r9d, [r8 + 1]
mov byte [rbx + rax + 0x14], r9b
sub rax, 1
test r9b, r9b
jne 0x40ae73
cmp ecx, 1
je 0x40b01b
cmp ecx, 2
je 0x40afff
cmp ecx, 3
je 0x40afe3
cmp ecx, 4
je 0x40afc7
cmp ecx, 5
je 0x40afaf
cmp ecx, 6
je 0x40af93
movzx r11d, byte [rbx + rax + 0x14]
add r11d, 1
mov byte [rbx + rax + 0x14], r11b
sub rax, 1
test r11b, r11b
jne 0x40ae73
movzx r10d, byte [rbx + rax + 0x14]
add r10d, 1
mov byte [rbx + rax + 0x14], r10b
sub rax, 1
test r10b, r10b
jne 0x40ae73
movzx ecx, byte [rbx + rax + 0x14]
add ecx, 1
mov byte [rbx + rax + 0x14], cl
sub rax, 1
test cl, cl
jne 0x40ae73
movzx r8d, byte [rbx + rax + 0x14]
add r8d, 1
mov byte [rbx + rax + 0x14], r8b
sub rax, 1
test r8b, r8b
jne 0x40ae73
movzx r9d, byte [rbx + rax + 0x14]
add r9d, 1
mov byte [rbx + rax + 0x14], r9b
sub rax, 1
test r9b, r9b
jne 0x40ae73
movzx r11d, byte [rbx + rax + 0x14]
add r11d, 1
mov byte [rbx + rax + 0x14], r11b
sub rax, 1
test r11b, r11b
jne 0x40ae73
cmp edx, eax
jg 0x40ae73
movzx r10d, byte [rbx + rax + 0x14]
lea rcx, [rax - 1]
add r10d, 1
test r10b, r10b
mov byte [rbx + rax + 0x14], r10b
jne 0x40ae73
add byte [rbx + rcx + 0x14], 1
jne 0x40ae73
add byte [rbx + rax + 0x12], 1
jne 0x40ae73
add byte [rbx + rax + 0x11], 1
jne 0x40ae73
add byte [rbx + rax + 0x10], 1
jne 0x40ae73
add byte [rbx + rax + 0xf], 1
jne 0x40ae73
add byte [rbx + rax + 0xe], 1
jne 0x40ae73
movzx r8d, byte [rbx + rax + 0xd]
add r8d, 1
mov byte [rbx + rax + 0xd], r8b
sub rax, 8
test r8b, r8b
je 0x40b01b
jmp 0x40ae73
movsxd r14, dword [rsp + 0x4c]
mov rsi, qword [rsp + 0xa0]
add rdi, r14
add rsi, r14
sub ebp, r14d
jmp 0x40a881
lea rdx, str.src_modes_ctr_ctr_encrypt.c
lea rcx, [0x00440ad2]
mov r8d, 0x5c
call fcn.00409b50
lea rdx, str.src_modes_ctr_ctr_encrypt.c
lea rcx, str.ct___NULL
mov r8d, 0x5b
call fcn.00409b50
lea rdx, str.src_modes_ctr_ctr_encrypt.c
lea rcx, str.pt___NULL
mov r8d, 0x5a
call fcn.00409b50
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop