Function at 0x180050310
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rbx
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x60]
sub rsp, 0x160
mov rax, qword [0x1801772b8]
xor rax, rsp
mov qword [rbp + 0x48], rax
mov rax, qword [rbp + 0xd0]
xor r13d, r13d
mov r12, qword [rbp + 0xe8]
mov r15, r8
mov rdi, qword [rbp + 0xc0]
mov r14, r9
shr r15, 3
mov rbx, rdx
mov qword [rbp - 0x40], rax
mov rax, qword [rbp + 0xe0]
mov qword [rbp - 0x48], rax
lea eax, [r15 - 0x14]
mov qword [rbp - 0x58], rcx
mov rcx, qword [rbp + 0xd8]
mov qword [rbp - 0x70], r9
mov qword [rbp - 0x50], rcx
mov qword [rsp + 0x60], r12
mov dword [rsp + 0x30], r13d
mov qword [rsp + 0x50], r13
mov dword [rsp + 0x40], r13d
mov dword [rsp + 0x34], 2
test eax, 0xfffffff3
jne 0x180050b4e
cmp r15d, 0x18
je 0x180050b4e
mov qword [rsp + 0x158], rsi
test r9, r9
jne 0x1800503cb
call sym.version.dll_EVP_sha1
mov r14, rax
mov qword [rbp - 0x70], rax
movsxd rsi, r15d
mov eax, 0x200
cmp rbx, rax
cmovae rax, rbx
xor ecx, ecx
add rax, 0x3f
and rax, 0xffffffffffffffc0
mov qword [rbp - 0x80], rax
mov rax, qword [rbp + 0xc8]
cmp rax, rsi
cmovae rcx, rax
xor edx, edx
cmp rax, rsi
mov rax, rsi
cmovae rdx, rdi
cmp rcx, rsi
cmovbe rax, rcx
mov qword [rbp - 0x68], rax
test rdx, rdx
je 0x180050420
mov r8, rax
lea rcx, [rbp + 0x28]
call fcn.1800d7020
jmp 0x180050429
test rax, rax
jne 0x18005070d
call sym.version.dll_BN_MONT_CTX_new
mov qword [rsp + 0x50], rax
test rax, rax
je 0x18005070d
call sym.version.dll_BN_CTX_new
mov qword [rsp + 0x38], rax
mov rdi, rax
test rax, rax
je 0x18005070d
mov rcx, rax
call sym.version.dll_BN_CTX_start
mov rcx, rdi
call sym.version.dll_BN_CTX_get
mov rdi, rax
test rax, rax
je 0x1800506f9
mov r13, qword [rsp + 0x38]
mov rcx, r13
call sym.version.dll_BN_CTX_get
mov qword [rsp + 0x78], rax
test rax, rax
je 0x1800506f4
mov rcx, r13
call sym.version.dll_BN_CTX_get
mov qword [rbp - 0x78], rax
test rax, rax
je 0x1800506f4
mov rcx, r13
call sym.version.dll_BN_CTX_get
mov qword [rsp + 0x48], rax
test rax, rax
je 0x1800506f4
mov rcx, r13
call sym.version.dll_BN_CTX_get
mov qword [rsp + 0x58], rax
test rax, rax
je 0x1800506f4
mov rcx, r13
call sym.version.dll_BN_CTX_get
mov qword [rbp - 0x60], rax
test rax, rax
je 0x1800506f4
mov rcx, r13
call sym.version.dll_BN_CTX_get
mov qword [rsp + 0x68], rax
test rax, rax
je 0x1800506f4
mov rcx, r13
call sym.version.dll_BN_CTX_get
mov qword [rsp + 0x70], rax
test rax, rax
je 0x1800506f4
mov rbx, qword [rbp - 0x80]
call sym.version.dll_BN_value_one
mov rcx, qword [rsp + 0x70]
lea r8d, [rbx - 1]
mov rdx, rax
call sym.version.dll_BN_lshift
test eax, eax
je 0x1800506f4
nop dword [rax]
mov ebx, dword [rsp + 0x40]
xor edx, edx
mov r8d, ebx
mov rcx, r12
call sym.version.dll_BN_GENCB_call
inc ebx
mov dword [rsp + 0x40], ebx
test eax, eax
je 0x1800506f4
cmp qword [rbp - 0x68], 0
jne 0x180050569
mov rdx, rsi
lea rcx, [rbp + 0x28]
call sym.version.dll_arc4random_buf
mov ebx, 1
jmp 0x18005056f
xor ebx, ebx
mov qword [rbp - 0x68], rbx
mov r8, rsi
lea rdx, [rbp + 0x28]
lea rcx, [rbp + 8]
call fcn.1800d7020
mov r8, rsi
lea rdx, [rbp + 0x28]
lea rcx, [rbp - 0x18]
call fcn.1800d7020
lea rax, [rsi - 1]
test rax, rax
js 0x1800505a5
add byte [rbp + rax + 8], 1
jne 0x1800505a5
sub rax, 1
jns 0x180050598
mov qword [rsp + 0x28], 0
lea r8, [rbp - 0x38]
xor r9d, r9d
mov qword [rsp + 0x20], r14
mov rdx, rsi
lea rcx, [rbp + 0x28]
call sym.version.dll_EVP_Digest
test eax, eax
je 0x1800506f4
mov qword [rsp + 0x28], 0
lea r8, [rbp - 0x18]
xor r9d, r9d
mov qword [rsp + 0x20], r14
mov rdx, rsi
lea rcx, [rbp + 8]
call sym.version.dll_EVP_Digest
test eax, eax
je 0x1800506f4
xor ecx, ecx
test r15d, r15d
jle 0x180050691
cmp r15d, 0x40
jb 0x180050691
mov edx, r15d
and edx, 0x8000003f
jge 0x18005061e
dec edx
or edx, 0xffffffc0
inc edx
mov eax, r15d
sub eax, edx
movsxd rdx, eax
nop word [rax + rax]
movdqu xmm0, xmmword [rbp + rcx - 0x38]
movdqu xmm1, xmmword [rbp + rcx - 0x18]
pxor xmm1, xmm0
movdqu xmmword [rbp + rcx - 0x38], xmm1
movdqu xmm0, xmmword [rbp + rcx - 0x28]
movdqu xmm1, xmmword [rbp + rcx - 8]
pxor xmm1, xmm0
movdqu xmmword [rbp + rcx - 0x28], xmm1
movdqu xmm0, xmmword [rbp + rcx - 0x18]
movdqu xmm1, xmmword [rbp + rcx + 8]
pxor xmm1, xmm0
movdqu xmmword [rbp + rcx - 0x18], xmm1
movdqu xmm0, xmmword [rbp + rcx - 8]
movdqu xmm1, xmmword [rbp + rcx + 0x18]
pxor xmm1, xmm0
movdqu xmmword [rbp + rcx - 8], xmm1
add rcx, 0x40
cmp rcx, rdx
jl 0x180050630
cmp rcx, rsi
jge 0x1800506b1
nop word [rax + rax]
movzx eax, byte [rbp + rcx - 0x18]
xor byte [rbp + rcx - 0x38], al
inc rcx
cmp rcx, rsi
jl 0x1800506a0
or byte [rbp - 0x38], 0x80
lea rcx, [rbp - 0x38]
mov r8, qword [rsp + 0x48]
mov edx, r15d
or byte [rbp + rsi - 0x39], 1
call sym.version.dll_BN_bin2bn
test rax, rax
je 0x1800506f4
mov rcx, qword [rsp + 0x48]
mov r9d, ebx
mov r8, r13
mov qword [rsp + 0x20], r12
mov edx, gethostbyname
call sym.version.dll_BN_is_prime_fasttest_ex
test eax, eax
jg 0x180050727
je 0x180050530
mov r13d, dword [rsp + 0x30]
mov rcx, qword [rsp + 0x38]
call sym.version.dll_BN_CTX_end
mov rcx, qword [rsp + 0x38]
call sym.version.dll_BN_CTX_free
mov rcx, qword [rsp + 0x50]
call sym.version.dll_BN_MONT_CTX_free
mov rsi, qword [rsp + 0x158]
mov eax, r13d
jmp 0x180050b50
xor r8d, r8d
mov rcx, r12
lea edx, [r8 + 2]
call sym.version.dll_BN_GENCB_call
test eax, eax
je 0x1800506f4
xor r8d, r8d
mov rcx, r12
lea edx, [r8 + 3]
call sym.version.dll_BN_GENCB_call
test eax, eax
je 0x1800506f4
mov rcx, qword [rbp - 0x80]
lea r14, [rsi - 1]
mov rbx, qword [rbp - 0x78]
dec rcx
movabs rax, 0xcccccccccccccccd
xor r13d, r13d
mul rcx
mov r12, rdx
shr r12, 7
test r13d, r13d
je 0x18005078f
mov rcx, qword [rsp + 0x60]
mov r8d, r13d
xor edx, edx
call sym.version.dll_BN_GENCB_call
test eax, eax
je 0x1800506f4
xor edx, edx
mov rcx, rbx
call sym.version.dll_BN_set_word
xor ebx, ebx
test r12d, r12d
js 0x180050843
mov rax, r14
test r14, r14
js 0x1800507bd
nop dword [rax]
add byte [rbp + rax + 8], 1
jne 0x1800507bd
sub rax, 1
jns 0x1800507b0
mov rax, qword [rbp - 0x70]
lea r8, [rbp - 0x38]
mov qword [rsp + 0x28], 0
lea rcx, [rbp + 8]
xor r9d, r9d
mov qword [rsp + 0x20], rax
mov rdx, rsi
call sym.version.dll_EVP_Digest
test eax, eax
je 0x1800506f4
mov r8, rdi
lea rcx, [rbp - 0x38]
mov edx, r15d
call sym.version.dll_BN_bin2bn
test rax, rax
je 0x1800506f4
lea r8d, [r15*8]
mov rdx, rdi
imul r8d, ebx
mov rcx, rdi
call sym.version.dll_BN_lshift
test eax, eax
je 0x1800506f4
mov rdx, qword [rbp - 0x78]
mov r8, rdi
mov rcx, rdx
call sym.version.dll_BN_add
test eax, eax
je 0x1800506f4
inc ebx
cmp ebx, r12d
jle 0x1800507a4
mov rdx, qword [rbp - 0x80]
mov rbx, qword [rbp - 0x78]
dec edx
mov rcx, rbx
call sym.version.dll_BN_mask_bits
test eax, eax
je 0x1800506f4
mov rcx, qword [rsp + 0x58]
mov rdx, rbx
call sym.version.dll_BN_copy
test rax, rax
je 0x1800506f4
mov rdx, qword [rsp + 0x58]
mov r8, qword [rsp + 0x70]
mov rcx, rdx
call sym.version.dll_BN_add
test eax, eax
je 0x1800506f4
mov rdx, qword [rsp + 0x48]
mov rcx, rdi
call sym.version.dll_BN_lshift1
test eax, eax
je 0x1800506f4
mov rax, qword [rsp + 0x38]
mov r9, rdi
mov r8, qword [rsp + 0x58]
xor ecx, ecx
mov rdx, qword [rbp - 0x60]
mov qword [rsp + 0x20], rax
call fcn.18002d560
test eax, eax
je 0x1800506f4
call sym.version.dll_BN_value_one
mov rdx, qword [rbp - 0x60]
mov r8, rax
mov rcx, rdi
call sym.version.dll_BN_sub
test eax, eax
je 0x1800506f4
mov rdx, qword [rsp + 0x58]
mov r8, rdi
mov rcx, qword [rsp + 0x68]
call sym.version.dll_BN_sub
test eax, eax
je 0x1800506f4
mov rdx, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x68]
call sym.version.dll_BN_cmp
test eax, eax
js 0x18005093d
mov rax, qword [rsp + 0x60]
mov r9d, 1
mov r8, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x68]
mov qword [rsp + 0x20], rax
lea edx, [r9 + 0x31]
call sym.version.dll_BN_is_prime_fasttest_ex
test eax, eax
jg 0x180050960
jne 0x1800506f4
inc r13d
cmp r13d, 0x1000
jl 0x180050773
mov r14, qword [rbp - 0x70]
mov r12, qword [rsp + 0x60]
mov r13, qword [rsp + 0x38]
jmp 0x180050530
mov rbx, qword [rsp + 0x60]
mov edx, 2
mov rcx, rbx
lea r8d, [rdx - 1]
call sym.version.dll_BN_GENCB_call
test eax, eax
je 0x1800506f4
call sym.version.dll_BN_value_one
mov r15, qword [rsp + 0x68]
mov r8, rax
mov r12, qword [rsp + 0x70]
mov rdx, r15
mov rcx, r12
call sym.version.dll_BN_sub
test eax, eax
je 0x1800506f4
mov r14, qword [rsp + 0x38]
mov r8, r12
mov r9, qword [rsp + 0x48]
xor edx, edx
mov rcx, rdi
mov qword [rsp + 0x20], r14
call fcn.18002d560
test eax, eax
je 0x1800506f4
mov edx, 2
mov rcx, r12
call sym.version.dll_BN_set_word
test eax, eax
je 0x1800506f4
mov rcx, qword [rsp + 0x50]
mov r8, r14
mov rdx, r15
call sym.version.dll_BN_MONT_CTX_set
test eax, eax
je 0x1800506f4
mov rax, qword [rsp + 0x50]
mov r9, r15
mov rcx, qword [rsp + 0x78]
mov r8, rdi
mov qword [rsp + 0x28], rax
mov rdx, r12
mov qword [rsp + 0x20], r14
call fcn.18002e350
test eax, eax
je 0x1800506f4
nop
mov rcx, qword [rsp + 0x78]
cmp dword [rcx + 8], 1
jne 0x180050a83
mov rax, qword [rcx]
cmp dword [rax], 1
jne 0x180050a83
cmp dword [rcx + 0x10], 0
jne 0x180050a83
call sym.version.dll_BN_value_one
mov r8, rax
mov rdx, r12
mov rcx, r12
call sym.version.dll_BN_add
test eax, eax
je 0x1800506f4
mov rax, qword [rsp + 0x50]
mov r9, r15
mov rcx, qword [rsp + 0x78]
mov r8, rdi
inc dword [rsp + 0x34]
mov rdx, r12
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r14
call fcn.18002e350
test eax, eax
jne 0x180050a20
jmp 0x1800506f4
mov edx, 3
mov rcx, rbx
lea r8d, [rdx - 2]
call sym.version.dll_BN_GENCB_call
test eax, eax
je 0x1800506f4
mov dword [rsp + 0x30], 1
nop dword [rax]
nop dword [rax + rax]
mov rbx, qword [rbp - 0x58]
mov rcx, qword [rbx + 0x10]
call sym.version.dll_BN_clear_free
mov rcx, qword [rbx + 0x18]
call sym.version.dll_BN_clear_free
mov rcx, qword [rbx + 0x20]
call sym.version.dll_BN_clear_free
mov rcx, r15
call sym.version.dll_BN_dup
mov rcx, qword [rsp + 0x48]
mov qword [rbx + 0x10], rax
call sym.version.dll_BN_dup
mov rcx, qword [rsp + 0x78]
mov qword [rbx + 0x18], rax
call sym.version.dll_BN_dup
cmp qword [rbx + 0x10], 0
mov qword [rbx + 0x20], rax
je 0x180050b46
cmp qword [rbx + 0x18], 0
je 0x180050b46
test rax, rax
je 0x180050b46
mov rax, qword [rbp - 0x50]
test rax, rax
je 0x180050b16
mov dword [rax], r13d
mov rdx, qword [rbp - 0x48]
test rdx, rdx
je 0x180050b25
mov eax, dword [rsp + 0x34]
mov dword [rdx], eax
mov rax, qword [rbp - 0x40]
test rax, rax
je 0x1800506f4
mov r8, rsi
lea rdx, [rbp + 0x28]
mov rcx, rax
call fcn.1800d7020
jmp 0x1800506f4
xor r13d, r13d
jmp 0x1800506f9
xor eax, eax
mov rcx, qword [rbp + 0x48]
xor rcx, rsp
call fcn.1800d61c0
add rsp, 0x160
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rbx
pop rbp
ret