Function at 0x40c520
Capabilities:
Encode data using xor

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x188
lea rbp, [rsp + 0x80]
movups xmmword [rbp + 0xb0], xmm6
movups xmmword [rbp + 0xc0], xmm7
movups xmmword [rbp + 0xd0], xmm8
movups xmmword [rbp + 0xe0], xmm9
movups xmmword [rbp + 0xf0], xmm10
mov rax, qword [0x00614950]
movsxd rax, dword [rax]
add rax, 0xf
and rax, 0xfffffffffffffff0
mov rdi, rdx
mov rbx, r8
mov qword [rbp + 0x150], rcx
call fcn.005aff00
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 0x40c6fc
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 0x40cb98
nop dword [rax + rax]
movzx r11d, byte [r10 + rax]
mov edx, eax
cmp r11b, r8b
je 0x40c6a0
add rax, 1
test r11b, r11b
jne 0x40c608
call sub.msvcrt.dll_free
lea rax, [rsi - 8]
cmp rax, 0x52
ja 0x40c660
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 0x40ca98
sub rdx, 1
cmp rsi, rax
jne 0x40c640
nop word [rax + rax]
xor r12d, r12d
movups xmm6, xmmword [rbp + 0xb0]
movups xmm7, xmmword [rbp + 0xc0]
mov rax, r12
movups xmm8, xmmword [rbp + 0xd0]
movups xmm9, xmmword [rbp + 0xe0]
movups xmm10, xmmword [rbp + 0xf0]
lea rsp, [rbp + 0x108]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
test r12, r12
je 0x40c621
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 r11, rcx
jne 0x40c6b8
test edx, edx
jne 0x40c621
mov eax, dword [rbp - 0x44]
test dword [rcx], eax
jne 0x40c621
add r9, 1
cmp r9, qword [rbp - 0x50]
jne 0x40c5f0
cmp r15d, 2
je 0x40cbf0
cmp r15d, 3
je 0x40cbb0
cmp r15d, 1
je 0x40cbe0
mov r9, r14
xor r8d, r8d
cmp r12, r8
jbe 0x40ca40
lea rax, [r12 - 1]
mov r11, r12
sub rax, r8
sub r11, r8
cmp rax, 0xe
jbe 0x40c91e
mov r10, r11
movdqu xmm4, xmmword [0x005bfee0]
mov rax, r9
lea rdx, [rcx + r8*4]
shr r10, 4
shl r10, 6
add r10, r9
nop
movdqu xmm0, xmmword [rdx]
movdqu xmm8, xmmword [rdx + 0x10]
add rax, 0x40
add rdx, 0x40
movdqu xmm1, xmmword [rdx - 0x20]
movdqu xmm7, xmmword [rdx - 0x10]
movdqu xmm6, xmm0
movdqu xmm2, xmm0
movdqu xmm9, xmm8
punpcklwd xmm6, xmm8
punpckhwd xmm2, xmm8
movdqu xmm10, xmm7
psrld xmm9, 0x10
psrld xmm10, 0x10
movdqu xmm3, xmm6
punpckhwd xmm3, xmm2
psrld xmm8, 0x18
punpcklwd xmm6, xmm2
movdqu xmm2, xmm1
punpcklwd xmm6, xmm3
movdqu xmm3, xmm1
punpcklwd xmm2, xmm7
punpckhwd xmm3, xmm7
movdqu xmm5, xmm2
psrld xmm7, 0x18
punpcklwd xmm2, xmm3
punpckhwd xmm5, xmm3
movdqu xmm3, xmm4
punpcklwd xmm2, xmm5
movdqu xmm5, xmm4
pand xmm3, xmm2
psrlw xmm2, 8
pand xmm5, xmm6
packuswb xmm5, xmm3
psrlw xmm6, 8
movdqu xmm3, xmm0
pand xmm2, xmm4
psrld xmm3, 0x10
pand xmm6, xmm4
packuswb xmm6, xmm2
psrld xmm0, 0x18
movdqu xmm2, xmm3
punpcklwd xmm3, xmm9
punpckhwd xmm2, xmm9
movdqu xmm9, xmm3
punpcklwd xmm3, xmm2
punpckhwd xmm9, xmm2
movdqu xmm2, xmm1
psrld xmm2, 0x10
psrld xmm1, 0x18
punpcklwd xmm3, xmm9
movdqu xmm9, xmm2
punpcklwd xmm2, xmm10
pand xmm3, xmm4
punpckhwd xmm9, xmm10
movdqu xmm10, xmm2
punpckhwd xmm10, xmm9
punpcklwd xmm2, xmm9
punpcklwd xmm2, xmm10
pand xmm2, xmm4
packuswb xmm3, xmm2
movdqu xmm2, xmm0
punpcklwd xmm0, xmm8
punpckhwd xmm2, xmm8
movdqu xmm8, xmm0
punpckhwd xmm8, xmm2
punpcklwd xmm0, xmm2
movdqu xmm2, xmm1
punpcklwd xmm1, xmm7
punpckhwd xmm2, xmm7
punpcklwd xmm0, xmm8
movdqu xmm7, xmm1
punpcklwd xmm1, xmm2
pand xmm0, xmm4
punpckhwd xmm7, xmm2
movdqu xmm2, xmm3
punpckhbw xmm3, xmm5
punpcklwd xmm1, xmm7
punpcklbw xmm2, xmm5
pand xmm1, xmm4
packuswb xmm0, xmm1
movdqu xmm1, xmm0
punpckhbw xmm0, xmm6
punpcklbw xmm1, xmm6
movdqu xmm5, xmm1
punpckhbw xmm1, xmm2
movups xmmword [rax - 0x30], xmm1
movdqu xmm1, xmm0
punpcklbw xmm5, xmm2
punpckhbw xmm0, xmm3
punpcklbw xmm1, xmm3
movups xmmword [rax - 0x40], xmm5
movups xmmword [rax - 0x20], xmm1
movups xmmword [rax - 0x10], xmm0
cmp rax, r10
jne 0x40c760
mov rax, r11
and rax, 0xfffffffffffffff0
add r8, rax
lea r9, [r9 + rax*4]
cmp rax, r11
je 0x40ca40
mov eax, dword [rcx + r8*4]
bswap eax
mov dword [r9], eax
lea rax, [r8 + 1]
cmp r12, rax
jbe 0x40ca40
mov eax, dword [rcx + rax*4]
bswap eax
mov dword [r9 + 4], eax
lea rax, [r8 + 2]
cmp r12, rax
jbe 0x40ca40
mov eax, dword [rcx + rax*4]
bswap eax
mov dword [r9 + 8], eax
lea rax, [r8 + 3]
cmp r12, rax
jbe 0x40ca40
mov eax, dword [rcx + rax*4]
bswap eax
mov dword [r9 + 0xc], eax
lea rax, [r8 + 4]
cmp r12, rax
jbe 0x40ca40
mov eax, dword [rcx + rax*4]
bswap eax
mov dword [r9 + 0x10], eax
lea rax, [r8 + 5]
cmp r12, rax
jbe 0x40ca40
mov eax, dword [rcx + rax*4]
bswap eax
mov dword [r9 + 0x14], eax
lea rax, [r8 + 6]
cmp r12, rax
jbe 0x40ca40
mov eax, dword [rcx + rax*4]
bswap eax
mov dword [r9 + 0x18], eax
lea rax, [r8 + 7]
cmp r12, rax
jbe 0x40ca40
mov eax, dword [rcx + rax*4]
bswap eax
mov dword [r9 + 0x1c], eax
lea rax, [r8 + 8]
cmp r12, rax
jbe 0x40ca40
mov eax, dword [rcx + rax*4]
bswap eax
mov dword [r9 + 0x20], eax
lea rax, [r8 + 9]
cmp r12, rax
jbe 0x40ca40
mov eax, dword [rcx + rax*4]
bswap eax
mov dword [r9 + 0x24], eax
lea rax, [r8 + 0xa]
cmp r12, rax
jbe 0x40ca40
mov eax, dword [rcx + rax*4]
bswap eax
mov dword [r9 + 0x28], eax
lea rax, [r8 + 0xb]
cmp r12, rax
jbe 0x40ca40
mov eax, dword [rcx + rax*4]
bswap eax
mov dword [r9 + 0x2c], eax
lea rax, [r8 + 0xc]
cmp r12, rax
jbe 0x40ca40
mov eax, dword [rcx + rax*4]
bswap eax
mov dword [r9 + 0x30], eax
lea rax, [r8 + 0xd]
cmp r12, rax
jbe 0x40ca40
mov eax, dword [rcx + rax*4]
add r8, 0xe
bswap eax
mov dword [r9 + 0x34], eax
cmp r12, r8
jbe 0x40ca40
mov eax, dword [rcx + r8*4]
bswap eax
mov dword [r9 + 0x38], eax
call sub.msvcrt.dll_free
lea rcx, [rbp + 0x50]
lea r8d, [rdi - 4]
mov rdx, r14
call fcn.00500f50
mov eax, dword [r14 + rdi - 4]
cmp dword [rbp + 0x50], eax
jne 0x40c660
movzx esi, byte [r14]
xor eax, eax
test sil, sil
je 0x40ca87
jmp 0x40cc03
add rax, 1
cmp byte [r14 + rax], 0
jne 0x40cc00
cmp byte [rbx + rax], 0x31
je 0x40ca78
jmp 0x40c660
cmp rsi, rax
jbe 0x40c660
cmp r8, 5
jbe 0x40c660
test rdx, rdx
je 0x40d03c
mov eax, 1
xor r10d, r10d
xor r11d, r11d
xor r12d, r12d
mov ecx, eax
jmp 0x40cb62
lea r9d, [r14 - 0x41]
cmp r9d, 0x19
ja 0x40cae7
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 r12, rdx
je 0x40cce0
movsx r14d, byte [rbx + r12]
lea r9d, [r14 - 0x21]
mov eax, r14d
cmp r9d, 0x5d
ja 0x40c660
lea r9d, [r14 - 0x61]
cmp r9d, 0x19
ja 0x40cad0
mov r11d, 1
jmp 0x40cae7
xor edx, edx
test r12, r12
jne 0x40c6a9
jmp 0x40c6e3
mov edx, dword [rcx]
lea r8, [r14 + 1]
mov eax, edx
shr eax, 0x10
mov byte [r14], al
movzx eax, dh
lea rsi, [r8 + 1]
mov byte [r8], al
mov byte [rsi], dl
lea r9, [rsi + 1]
mov r8d, 1
jmp 0x40c720
mov edx, dword [rcx]
mov rsi, r14
jmp 0x40cbc8
mov edx, dword [rcx]
mov r8, r14
jmp 0x40cbbe
add rbx, rax
cmp byte [rbx], 0x31
je 0x40c660
mov rax, qword [0x006147d0]
cmp byte [rax], 0
jne 0x40ccc0
cmp sil, 5
je 0x40cc78
cmp sil, 0xc4
je 0x40cc78
mov r12d, 0x19
cmp rdi, 0x18
jbe 0x40c663
movdqu xmm4, xmmword [r14 + 1]
mov rax, qword [rbp + 0x150]
mov edx, 0xffffa976
mov ecx, 0xffffac88
mov rdi, qword [rbp + 0x150]
mov word [rax], dx
mov byte [rax + 2], 0x14
movups xmmword [rax + 3], xmm4
mov eax, dword [r14 + 0x11]
mov word [rdi + 0x17], cx
mov dword [rdi + 0x13], eax
jmp 0x40c663
mov r12d, 0x17
cmp rdi, 0x16
jbe 0x40c663
mov rax, qword [rbp + 0x150]
movdqu xmm4, xmmword [r14 + 1]
mov r8d, 0x14a9
mov rdi, qword [rbp + 0x150]
mov word [rax], r8w
movups xmmword [rax + 2], xmm4
mov eax, dword [r14 + 0x11]
mov byte [rdi + 0x16], 0x87
mov dword [rdi + 0x12], eax
jmp 0x40c663
lea rdx, str.Coinbase_address_uses_B58_coding
mov ecx, 4
call fcn.0040a9f0
jmp 0x40cc1c
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 0x40cd60
add rdx, 1
mov eax, ecx
cmp rsi, rdx
jbe 0x40cef0
mov rcx, r8
lea r12, [0x005bf820]
mov r13d, 1
sub rcx, rsi
lea r14, [rbp + rcx - 0x10]
jmp 0x40ceb6
sub ecx, 0x41
cmp cl, 0x19
cmovbe r10d, r13d
cmp r9d, 0xffffffff
je 0x40c660
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 0x40cead
mov byte [r14 + rdx], r9b
add rdx, 1
cmp rsi, rdx
jbe 0x40cef0
movzx ecx, byte [rbx + rdx]
mov r9d, 0xffffffff
test cl, cl
js 0x40cecd
movsx r9, cl
movsx r9d, byte [r12 + r9]
lea r15d, [rcx - 0x61]
cmp r15b, 0x19
ja 0x40ce20
mov r11d, 1
jmp 0x40ce2a
test r10d, r11d
jne 0x40c660
cmp eax, 1
jne 0x40c660
lea rax, [r8 - 7]
cmp rax, 0x40
ja 0x40c660
movzx r11d, byte [rbp - 0x10]
cmp r11b, 0x10
ja 0x40c660
test rax, rax
je 0x40c660
movzx edx, byte [rbp - 0xf]
cmp r8, 8
je 0x40c660
lea rsi, [rbp + r8 - 0x16]
mov r9d, 5
lea r10, [rbp - 0xe]
xor r8d, r8d
lea rbx, [rbp - 0x40]
nop dword [rax]
movzx eax, byte [r10]
shl edx, 5
lea ecx, [r9 + 5]
add r10, 1
or edx, eax
cmp ecx, 7
jle 0x40d055
lea rax, [rbx + r8]
nop
sub ecx, 8
mov r12d, edx
add rax, 1
shr r12d, cl
mov byte [rax - 1], r12b
cmp ecx, 7
jg 0x40cf70
sub r9d, 3
mov eax, r9d
and r9d, 7
shr eax, 3
lea r8, [r8 + rax + 1]
cmp r10, rsi
jne 0x40cf50
mov ecx, 8
sub ecx, r9d
shl edx, cl
test dl, dl
jne 0x40c660
cmp r9d, 4
jg 0x40c660
lea rax, [r8 - 2]
cmp rax, 0x26
ja 0x40c660
cmp r8, 0x14
setne dl
cmp r8, 0x20
setne al
test dl, al
je 0x40cfe3
test r11b, r11b
je 0x40c660
lea r12, [r8 + 2]
cmp rdi, r12
jb 0x40c660
test r11b, r11b
lea eax, [r11 + 0x50]
lea rdx, [rbp - 0x40]
cmovne r11d, eax
mov rax, qword [rbp + 0x150]
mov byte [rax], r11b
lea rcx, [rax + 2]
mov byte [rax + 1], r8b
call sub.msvcrt.dll_memcpy
mov rax, qword [0x006147d0]
cmp byte [rax], 0
je 0x40c663
lea rdx, str.Coinbase_address_uses_Bech32_coding
mov ecx, 4
call fcn.0040a9f0
jmp 0x40c663
mov byte [rbp + 0x50], 0
xor r11d, r11d
xor r10d, r10d
mov eax, 0x20
mov edx, 1
jmp 0x40cdfb
mov r9d, ecx
jmp 0x40cf99