Function at 0x40ca80
Capabilities:
Encode data using xor

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x1a8
lea rbp, [rsp + 0x80]
vmovups xmmword [rbp + 0xb0], xmm6
vmovups xmmword [rbp + 0xc0], xmm7
vmovups xmmword [rbp + 0xd0], xmm8
vmovups xmmword [rbp + 0xe0], xmm9
vmovups xmmword [rbp + 0xf0], xmm10
vmovups xmmword [rbp + 0x100], xmm11
vmovups xmmword [rbp + 0x110], xmm12
mov rax, qword [0x006f6cd0]
movsxd rax, dword [rax]
add rax, 0xf
and rax, 0xfffffffffffffff0
mov rdi, rdx
mov rbx, r8
mov qword [rbp + 0x170], rcx
call fcn.00686400
mov r15d, edx
sub rsp, rax
lea r12, [rdx + 3]
mov eax, 0xffffffff
and r15d, 3
shr r12, 2
lea r14, [rsp + 0x20]
lea ecx, [r15*8]
shl eax, cl
mov rcx, r8
mov dword [rbp - 0x44], eax
call sub.msvcrt.dll_strlen
mov rcx, r12
mov edx, 4
mov rsi, rax
call sub.msvcrt.dll_calloc
mov rcx, rax
test rsi, rsi
je 0x40cc84
lea rax, [rbx + rsi]
mov r13, rbx
mov r9, rbx
mov qword [rbp - 0x50], rax
lea rax, [r12 - 1]
lea r10, str.123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz
mov qword [rbp - 0x58], rax
movzx r8d, byte [r9]
mov eax, 1
cmp r8b, 0x31
je 0x40d050
nop dword [rax]
movzx r11d, byte [r10 + rax]
mov edx, eax
cmp r11b, r8b
je 0x40cc28
add rax, 1
test r11b, r11b
jne 0x40cb78
call sub.msvcrt.dll_free
lea rax, [rsi - 8]
cmp rax, 0x52
ja 0x40cbd0
lea rdx, [rsi - 1]
xor eax, eax
nop word cs:[rax + rax]
cmp byte [rbx + rdx], 0x31
mov r8, rax
lea rax, [rax + 1]
je 0x40cf50
sub rdx, 1
cmp rsi, rax
jne 0x40cbb0
nop word [rax + rax]
xor r12d, r12d
vmovups xmm6, xmmword [rbp + 0xb0]
vmovups xmm7, xmmword [rbp + 0xc0]
mov rax, r12
vmovups xmm8, xmmword [rbp + 0xd0]
vmovups xmm9, xmmword [rbp + 0xe0]
vmovups xmm10, xmmword [rbp + 0xf0]
vmovups xmm11, xmmword [rbp + 0x100]
vmovups xmm12, xmmword [rbp + 0x110]
lea rsp, [rbp + 0x128]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
test r12, r12
je 0x40cb91
mov rax, qword [rbp - 0x58]
lea r8, [rcx + rax*4]
nop dword [rax]
mov eax, dword [r8]
mov edx, edx
mov r11, r8
sub r8, 4
imul rax, rax, 0x3a
add rax, rdx
mov rdx, rax
mov dword [r8 + 4], eax
shr rdx, 0x20
cmp rcx, r11
jne 0x40cc40
test edx, edx
jne 0x40cb91
mov eax, dword [rbp - 0x44]
test dword [rcx], eax
jne 0x40cb91
add r9, 1
cmp qword [rbp - 0x50], r9
jne 0x40cb62
cmp r15d, 2
je 0x40d0a0
cmp r15d, 3
je 0x40d060
cmp r15d, 1
je 0x40d090
mov rdx, r14
xor r9d, r9d
cmp r12, r9
jbe 0x40cefb
lea rax, [r12 - 1]
mov r11, r12
sub rax, r9
sub r11, r9
cmp rax, 0x1e
jbe 0x40d641
mov r10, r11
vmovdqu ymm4, ymmword [0x00695fc0]
mov rax, rdx
lea r8, [rcx + r9*4]
shr r10, 5
vmovdqu ymm5, ymmword [0x00695fe0]
shl r10, 7
add r10, rdx
nop
vmovdqu xmm6, xmmword [r8]
vmovdqu xmm7, xmmword [r8 + 0x20]
sub rax, 0xffffffffffffff80
sub r8, 0xffffffffffffff80
vinserti128 ymm0, ymm6, xmmword [r8 - 0x70], 1
vinserti128 ymm8, ymm7, xmmword [r8 - 0x50], 1
vmovdqu xmm6, xmmword [r8 - 0x40]
vmovdqu xmm7, xmmword [r8 - 0x20]
vinserti128 ymm3, ymm6, xmmword [r8 - 0x30], 1
vinserti128 ymm7, ymm7, xmmword [r8 - 0x10], 1
vpand ymm1, ymm4, ymm8
vpand ymm2, ymm4, ymm0
vpackusdw ymm2, ymm2, ymm1
vpand ymm9, ymm4, ymm3
vpand ymm1, ymm4, ymm7
vpackusdw ymm9, ymm9, ymm1
vpsrld ymm10, ymm7, 0x10
vpermq ymm2, ymm2, 0xd8
vpermq ymm9, ymm9, 0xd8
vpand ymm6, ymm5, ymm2
vpand ymm10, ymm4, ymm10
vpsrlw ymm2, ymm2, 8
vpsrld ymm7, ymm7, 0x18
vpand ymm1, ymm5, ymm9
vpsrlw ymm9, ymm9, 8
vpand ymm2, ymm5, ymm2
vpackuswb ymm6, ymm6, ymm1
vpand ymm9, ymm5, ymm9
vpsrld ymm1, ymm0, 0x10
vpand ymm7, ymm4, ymm7
vpackuswb ymm2, ymm2, ymm9
vpsrld ymm9, ymm8, 0x10
vpand ymm1, ymm4, ymm1
vpand ymm9, ymm4, ymm9
vpsrld ymm0, ymm0, 0x18
vpermq ymm6, ymm6, 0xd8
vpackusdw ymm1, ymm1, ymm9
vpsrld ymm8, ymm8, 0x18
vpand ymm0, ymm4, ymm0
vpsrld ymm9, ymm3, 0x10
vpsrld ymm3, ymm3, 0x18
vpand ymm8, ymm4, ymm8
vpand ymm9, ymm4, ymm9
vpand ymm3, ymm4, ymm3
vpackusdw ymm0, ymm0, ymm8
vpackusdw ymm3, ymm3, ymm7
vpackusdw ymm9, ymm9, ymm10
vpermq ymm1, ymm1, 0xd8
vpermq ymm9, ymm9, 0xd8
vpermq ymm0, ymm0, 0xd8
vpermq ymm3, ymm3, 0xd8
vpand ymm3, ymm5, ymm3
vpand ymm1, ymm5, ymm1
vpand ymm9, ymm5, ymm9
vpand ymm0, ymm5, ymm0
vpackuswb ymm1, ymm1, ymm9
vpermq ymm2, ymm2, 0xd8
vpackuswb ymm0, ymm0, ymm3
vpermq ymm1, ymm1, 0xd8
vpermq ymm0, ymm0, 0xd8
vpunpcklbw ymm3, ymm0, ymm2
vpunpckhbw ymm0, ymm0, ymm2
vpunpcklbw ymm2, ymm1, ymm6
vpunpckhbw ymm1, ymm1, ymm6
vperm2i128 ymm7, ymm3, ymm0, 0x20
vperm2i128 ymm0, ymm3, ymm0, 0x31
vperm2i128 ymm3, ymm2, ymm1, 0x20
vperm2i128 ymm1, ymm2, ymm1, 0x31
vpunpcklbw ymm2, ymm7, ymm3
vpunpckhbw ymm3, ymm7, ymm3
vperm2i128 ymm6, ymm2, ymm3, 0x20
vperm2i128 ymm2, ymm2, ymm3, 0x31
vmovups xmmword [rax - 0x60], xmm2
vextracti128 xmmword [rax - 0x50], ymm2, 1
vpunpcklbw ymm2, ymm0, ymm1
vpunpckhbw ymm0, ymm0, ymm1
vperm2i128 ymm1, ymm2, ymm0, 0x20
vperm2i128 ymm0, ymm2, ymm0, 0x31
vmovups xmmword [rax - 0x80], xmm6
vextracti128 xmmword [rax - 0x70], ymm6, 1
vmovups xmmword [rax - 0x40], xmm1
vextracti128 xmmword [rax - 0x30], ymm1, 1
vextracti128 xmmword [rax - 0x10], ymm0, 1
vmovups xmmword [rax - 0x20], xmm0
cmp rax, r10
jne 0x40ccf0
mov rax, r11
and rax, 0xffffffffffffffe0
add r9, rax
lea rdx, [rdx + rax*4]
cmp rax, r11
je 0x40d649
mov rsi, rbx
vzeroupper
nop word [rax + rax]
mov eax, dword [rcx + r9*4]
add r9, 1
add rdx, 4
mov r8d, eax
mov byte [rdx - 1], al
mov byte [rdx - 2], ah
shr r8d, 0x10
shr eax, 0x18
mov byte [rdx - 3], r8b
mov byte [rdx - 4], al
cmp r12, r9
ja 0x40ced0
mov rbx, rsi
call sub.msvcrt.dll_free
lea rcx, [rbp + 0x50]
lea r8d, [rdi - 4]
mov rdx, r14
call fcn.0059fbf0
mov eax, dword [r14 + rdi - 4]
cmp dword [rbp + 0x50], eax
jne 0x40cbd0
movzx esi, byte [r14]
xor eax, eax
test sil, sil
je 0x40cf3f
jmp 0x40d0b3
add rax, 1
cmp byte [r14 + rax], 0
jne 0x40d0b0
cmp byte [rbx + rax], 0x31
je 0x40cf30
jmp 0x40cbd0
cmp rsi, rax
jbe 0x40cbd0
cmp r8, 5
jbe 0x40cbd0
test rdx, rdx
je 0x40d628
mov eax, 1
xor r10d, r10d
xor r11d, r11d
xor r12d, r12d
mov ecx, eax
jmp 0x40d01a
lea r9d, [r14 - 0x41]
cmp r9d, 0x19
ja 0x40cf9f
add r14d, 0x20
mov r10d, 1
mov eax, r14d
mov r9d, ecx
mov byte [rbp + r12 + 0x50], al
shl ecx, 5
add r12, 1
shr r9d, 0x19
and ecx, 0x3fffffe0
sar r14d, 5
mov eax, r9d
and eax, 1
neg eax
and eax, 0x3b6a57b2
xor ecx, eax
mov eax, r9d
shl eax, 0x1e
sar eax, 0x1f
and eax, 0x26508e6d
xor ecx, eax
mov eax, r9d
shl eax, 0x1d
sar eax, 0x1f
and eax, 0x1ea119fa
xor eax, ecx
mov ecx, r9d
shl r9d, 0x1b
shl ecx, 0x1c
sar r9d, 0x1f
sar ecx, 0x1f
and r9d, 0x2a1462b3
and ecx, 0x3d4233dd
xor ecx, eax
xor ecx, r9d
xor ecx, r14d
cmp rdx, r12
je 0x40d190
movsx r14d, byte [rbx + r12]
lea r9d, [r14 - 0x21]
mov eax, r14d
cmp r9d, 0x5d
ja 0x40cbd0
lea r9d, [r14 - 0x61]
cmp r9d, 0x19
ja 0x40cf88
mov r11d, 1
jmp 0x40cf9f
xor edx, edx
test r12, r12
jne 0x40cc31
jmp 0x40cc6b
mov r8d, dword [rcx]
lea rdx, [r14 + 1]
mov eax, r8d
shr eax, 0x10
mov byte [r14], al
mov eax, r8d
lea rsi, [rdx + 1]
mov byte [rdx], ah
mov byte [rsi], r8b
lea rdx, [rsi + 1]
mov r9d, 1
jmp 0x40cca8
mov r8d, dword [rcx]
mov rsi, r14
jmp 0x40d079
mov r8d, dword [rcx]
mov rdx, r14
jmp 0x40d070
add rbx, rax
cmp byte [rbx], 0x31
je 0x40cbd0
mov rax, qword [0x006f6b50]
cmp byte [rax], 0
jne 0x40d170
cmp sil, 5
je 0x40d128
cmp sil, 0xc4
je 0x40d128
mov r12d, 0x19
cmp rdi, 0x18
jbe 0x40cbd3
vmovdqu xmm5, xmmword [r14 + 1]
mov rax, qword [rbp + 0x170]
mov edx, 0xffffa976
mov ecx, 0xffffac88
mov rdi, qword [rbp + 0x170]
mov word [rax], dx
mov byte [rax + 2], 0x14
vmovups xmmword [rax + 3], xmm5
mov eax, dword [r14 + 0x11]
mov word [rdi + 0x17], cx
mov dword [rdi + 0x13], eax
jmp 0x40cbd3
mov r12d, 0x17
cmp rdi, 0x16
jbe 0x40cbd3
mov rax, qword [rbp + 0x170]
vmovdqu xmm5, xmmword [r14 + 1]
mov r8d, 0x14a9
mov rdi, qword [rbp + 0x170]
mov word [rax], r8w
vmovups xmmword [rax + 2], xmm5
mov eax, dword [r14 + 0x11]
mov byte [rdi + 0x16], 0x87
mov dword [rdi + 0x12], eax
jmp 0x40cbd3
lea rdx, str.Coinbase_address_uses_B58_coding
mov ecx, 4
call fcn.0040ae30
jmp 0x40d0cc
mov eax, ecx
shr ecx, 0x19
mov byte [rbp + rdx + 0x50], 0
mov r9d, ecx
shl eax, 5
and r9d, 1
and eax, 0x3fffffe0
neg r9d
and r9d, 0x3b6a57b2
xor eax, r9d
mov r9d, ecx
shl r9d, 0x1e
sar r9d, 0x1f
and r9d, 0x26508e6d
xor eax, r9d
mov r9d, ecx
shl r9d, 0x1d
sar r9d, 0x1f
and r9d, 0x1ea119fa
xor eax, r9d
mov r9d, ecx
shl ecx, 0x1b
shl r9d, 0x1c
sar ecx, 0x1f
sar r9d, 0x1f
and ecx, 0x2a1462b3
and r9d, 0x3d4233dd
xor eax, r9d
lea r9, [rbx + rdx]
xor eax, ecx
mov r12d, eax
nop word [rax + rax]
movzx eax, byte [r13]
mov ecx, r12d
shl r12d, 5
add r13, 1
shr ecx, 0x19
and r12d, 0x3fffffe0
and eax, 0x1f
xor eax, r12d
mov r12d, ecx
and r12d, 1
neg r12d
and r12d, 0x3b6a57b2
xor eax, r12d
mov r12d, ecx
shr r12d, 4
neg r12d
and r12d, 0x2a1462b3
xor eax, r12d
mov r12d, ecx
shl r12d, 0x1e
sar r12d, 0x1f
and r12d, 0x26508e6d
xor eax, r12d
mov r12d, ecx
shl ecx, 0x1c
shl r12d, 0x1d
sar ecx, 0x1f
sar r12d, 0x1f
and ecx, 0x3d4233dd
and r12d, 0x1ea119fa
xor eax, r12d
xor ecx, eax
mov r12d, ecx
cmp r13, r9
jne 0x40d210
add rdx, 1
mov eax, ecx
cmp rsi, rdx
jbe 0x40d3a0
mov rcx, r8
lea r12, [0x006958e0]
mov r13d, 1
sub rcx, rsi
lea r14, [rbp + rcx - 0x10]
jmp 0x40d366
sub ecx, 0x41
cmp cl, 0x19
cmovbe r10d, r13d
cmp r9d, 0xffffffff
je 0x40cbd0
mov ecx, eax
shl eax, 5
shr ecx, 0x19
and eax, 0x3fffffe0
mov r15d, ecx
and r15d, 1
neg r15d
and r15d, 0x3b6a57b2
xor eax, r15d
mov r15d, ecx
shl r15d, 0x1e
sar r15d, 0x1f
and r15d, 0x26508e6d
xor eax, r15d
mov r15d, ecx
shl r15d, 0x1d
sar r15d, 0x1f
and r15d, 0x1ea119fa
xor r15d, eax
mov eax, ecx
shl ecx, 0x1b
shl eax, 0x1c
sar ecx, 0x1f
sar eax, 0x1f
and ecx, 0x2a1462b3
and eax, 0x3d4233dd
xor eax, r15d
xor eax, ecx
lea rcx, [rdx + 6]
xor eax, r9d
cmp rsi, rcx
jbe 0x40d35d
mov byte [r14 + rdx], r9b
add rdx, 1
cmp rsi, rdx
jbe 0x40d3a0
movzx ecx, byte [rbx + rdx]
mov r9d, 0xffffffff
test cl, cl
js 0x40d37d
movsx r9, cl
movsx r9d, byte [r12 + r9]
lea r15d, [rcx - 0x61]
cmp r15b, 0x19
ja 0x40d2d0
mov r11d, 1
jmp 0x40d2da
test r10d, r11d
jne 0x40cbd0
cmp eax, 1
jne 0x40cbd0
lea rax, [r8 - 7]
cmp rax, 0x40
ja 0x40cbd0
movzx ebx, byte [rbp - 0x10]
cmp bl, 0x10
ja 0x40cbd0
test rax, rax
je 0x40cbd0
movzx edx, byte [rbp - 0xf]
cmp r8, 8
je 0x40cbd0
vmovdqu ymm11, ymmword [0x00696000]
vmovdqu ymm4, ymmword [0x00695fc0]
lea r12, [rbp + r8 - 0x16]
mov eax, 5
vmovdqu ymm5, ymmword [0x00695fe0]
vmovdqu ymm10, ymmword [0x00696020]
xor r8d, r8d
lea r10, [rbp - 0xe]
vmovdqu ymm9, ymmword [0x00696040]
vmovdqu ymm8, ymmword [0x00696060]
lea rsi, [rbp - 0x40]
vmovdqu ymm7, ymmword [0x00696080]
vmovdqu ymm6, ymmword [0x006960a0]
nop dword [rax]
movzx ecx, byte [r10]
shl edx, 5
add r10, 1
or edx, ecx
lea ecx, [rax + 5]
cmp ecx, 7
jle 0x40d651
lea r11d, [rax - 3]
mov r9d, r11d
shr r9d, 3
lea r13d, [r9 + 1]
cmp r11d, 0xf7
jbe 0x40d610
mov r14d, r13d
vmovd xmm2, eax
vmovd xmm3, edx
shr r14d, 5
vpbroadcastd ymm2, xmm2
lea rax, [rsi + r8]
shl r14, 5
vpaddd ymm2, ymm2, ymm11
vpbroadcastd ymm3, xmm3
add r14, rax
nop
vmovdqu ymm12, ymm2
add rax, 0x20
vpaddd ymm2, ymm2, ymm10
vpaddd ymm0, ymm12, ymm9
vpaddd ymm1, ymm12, ymm8
vpsrlvd ymm0, ymm3, ymm0
vpsrlvd ymm1, ymm3, ymm1
vpand ymm0, ymm4, ymm0
vpand ymm1, ymm4, ymm1
vpackusdw ymm0, ymm0, ymm1
vpaddd ymm1, ymm12, ymm7
vpaddd ymm12, ymm12, ymm6
vpsrlvd ymm1, ymm3, ymm1
vpsrlvd ymm12, ymm3, ymm12
vpermq ymm0, ymm0, 0xd8
vpand ymm0, ymm5, ymm0
vpand ymm1, ymm4, ymm1
vpand ymm12, ymm4, ymm12
vpackusdw ymm1, ymm1, ymm12
vpermq ymm1, ymm1, 0xd8
vpand ymm1, ymm5, ymm1
vpackuswb ymm1, ymm0, ymm1
vpermq ymm1, ymm1, 0xd8
vmovups xmmword [rax - 0x20], xmm1
vextracti128 xmmword [rax - 0x10], ymm1, 1
cmp r14, rax
jne 0x40d4a0
mov r14d, r13d
and r14d, 0xffffffe0
mov eax, r14d
neg eax
lea ecx, [rcx + rax*8]
mov eax, r14d
add rax, r8
cmp r14d, r13d
je 0x40d556
add rax, rsi
nop word [rax + rax]
sub ecx, 8
mov r13d, edx
add rax, 1
shr r13d, cl
mov byte [rax - 1], r13b
cmp ecx, 7
jg 0x40d540
mov eax, r9d
lea r8, [r8 + r9 + 1]
neg eax
lea eax, [r11 + rax*8]
cmp r10, r12
jne 0x40d440
mov ecx, 8
sub ecx, eax
shl edx, cl
test dl, dl
jne 0x40d620
cmp eax, 4
jg 0x40d620
lea rax, [r8 - 2]
cmp rax, 0x26
ja 0x40d620
cmp r8, 0x14
setne dl
cmp r8, 0x20
setne al
test dl, al
je 0x40d5ab
test bl, bl
je 0x40d620
lea r12, [r8 + 2]
cmp rdi, r12
jb 0x40d600
lea eax, [rbx + 0x50]
test bl, bl
lea rdx, [rbp - 0x40]
cmovne ebx, eax
mov rax, qword [rbp + 0x170]
lea rcx, [rax + 2]
mov byte [rax], bl
mov byte [rax + 1], r8b
vzeroupper
call sub.msvcrt.dll_memcpy
mov rax, qword [0x006f6b50]
cmp byte [rax], 0
je 0x40cbd3
lea rdx, str.Coinbase_address_uses_Bech32_coding
mov ecx, 4
call fcn.0040ae30
jmp 0x40cbd3
xor r12d, r12d
vzeroupper
jmp 0x40cbd3
mov rax, r8
jmp 0x40d537
vzeroupper
jmp 0x40cbd0
mov byte [rbp + 0x50], 0
xor r11d, r11d
xor r10d, r10d
mov eax, 0x20
mov edx, 1
jmp 0x40d2ab
mov rsi, rbx
jmp 0x40ced0
vzeroupper
jmp 0x40cefb
mov eax, ecx
jmp 0x40d564