Function at 0x180008660
Capabilities:
Validate payment card number using luhn algorithm

Disassembly:
mov qword [rsp + 0x10], rdx
push rbp
push rbx
push rsi
push r12
push r13
push r14
mov rbp, rsp
sub rsp, 0x68
movups xmm0, xmmword [rdx]
mov r14, r8
mov r13, rcx
movaps xmmword [rsp + 0x50], xmm6
xorps xmm2, xmm2
movsd xmm6, qword [rdx + 0x10]
movq r8, xmm0
movsd qword [rbp - 0x28], xmm6
mov rax, r8
mov r12, qword [rbp - 0x28]
xorps xmm1, xmm1
sub rax, r12
cmp byte [r8], 0x2d
movups xmmword [rbp - 0x38], xmm0
mov qword [rbp - 0x40], rax
jne 0x1800086bb
inc r8
mov dl, 1
mov qword [rbp - 0x38], r8
jmp 0x1800086bd
xor dl, dl
movsx ecx, byte [r8]
xor r11d, r11d
movsd xmm3, qword [0x18011ac28]
xor sil, sil
mov qword [rsp + 0xa0], rdi
mov ebx, r11d
mov byte [rbp - 0x48], dl
mov r10d, r11d
mov qword [rsp + 0x60], r15
mov byte [rbp + 0x50], sil
cmp cl, 0x30
jne 0x180008701
lea rdx, [r8 + 1]
mov edi, r11d
mov qword [rbp - 0x38], rdx
xor r15b, r15b
jmp 0x180008861
lea eax, [rcx - 0x31]
cmp al, 8
ja 0x180008e2b
inc r8
lea edi, [rcx - 0x30]
mov qword [rbp - 0x38], r8
mov rax, r8
movzx ecx, byte [r8]
test dl, dl
je 0x180008769
cmp cl, 0x30
jl 0x1800087b2
nop word [rax + rax]
cmp cl, 0x39
ja 0x1800087b2
cmp edi, 0xccccccc
jb 0x180008744
jne 0x1800087a9
cmp cl, 0x38
ja 0x1800087a9
movzx ecx, byte [rax + 1]
lea r8, [rax + 1]
movsx eax, byte [rax]
lea edi, [rdi + rdi*4]
lea edi, [rdi - 0x18]
mov qword [rbp - 0x38], r8
inc r10d
lea edi, [rax + rdi*2]
mov rax, r8
cmp cl, 0x30
jge 0x180008730
jmp 0x1800087b2
cmp cl, 0x30
jl 0x1800087b2
nop
cmp cl, 0x39
jg 0x1800087b2
cmp edi, 0x19999999
jb 0x180008784
jne 0x1800087a9
cmp cl, 0x35
jg 0x1800087a9
movzx ecx, byte [rax + 1]
lea r8, [rax + 1]
movsx eax, byte [rax]
lea edi, [rdi + rdi*4]
lea edi, [rdi - 0x18]
mov qword [rbp - 0x38], r8
inc r10d
lea edi, [rax + rdi*2]
mov rax, r8
cmp cl, 0x30
jge 0x180008770
jmp 0x1800087b2
mov sil, 1
mov ebx, edi
mov byte [rbp + 0x50], sil
xor r15b, r15b
mov r9, rax
test sil, sil
je 0x18000881c
movzx ecx, byte [rax]
test dl, dl
je 0x180008940
cmp cl, 0x30
jl 0x18000881c
movzx eax, byte [r8]
movabs rdx, 0xccccccccccccccc
nop dword [rax + rax]
cmp al, 0x39
jg 0x18000881c
cmp rbx, rdx
jb 0x1800087f7
jne 0x18000890b
cmp al, 0x38
jg 0x18000890b
movsx ecx, byte [r9]
lea r8, [r9 + 1]
sub ecx, 0x30
mov qword [rbp - 0x38], r8
lea rax, [rbx + rbx*4]
inc r10d
mov r9, r8
lea rbx, [rcx + rax*2]
movzx eax, byte [r8]
cmp al, 0x30
jge 0x1800087e0
mov rdx, r9
test r15b, r15b
je 0x180008861
cmp byte [r9], 0x30
mov rdx, r9
jl 0x180008861
movzx eax, byte [r8]
mov rdx, r9
cmp al, 0x39
jg 0x180008861
movsx eax, byte [r9]
lea rdx, [r9 + 1]
sub eax, 0x30
mulsd xmm1, xmm3
mov qword [rbp - 0x38], rdx
mov r9, rdx
movd xmm0, eax
movzx eax, byte [rdx]
cvtdq2pd xmm0, xmm0
addsd xmm1, xmm0
cmp al, 0x30
jge 0x180008831
cmp byte [rdx], 0x2e
mov esi, r11d
jne 0x180008a3e
movzx ecx, byte [rdx + 1]
lea r8, [rdx + 1]
mov qword [rbp - 0x38], r8
lea eax, [rcx - 0x30]
cmp al, 9
ja 0x180008a75
mov rdx, r8
test r15b, r15b
jne 0x1800089e9
cmp byte [rbp + 0x50], sil
mov rcx, r8
movzx r9d, byte [r8]
movabs r15, 0x1fffffffffffff
mov eax, edi
cmovne rax, rbx
mov rbx, rax
nop
mov rdx, rcx
cmp r9b, 0x39
jg 0x1800088f5
cmp rbx, r15
ja 0x1800088f5
movzx r9d, byte [rcx + 1]
lea r8, [rcx + 1]
movsx ecx, byte [rcx]
lea rax, [rbx + rbx*4]
sub ecx, 0x30
mov qword [rbp - 0x38], r8
dec esi
mov rdx, r8
lea rbx, [rcx + rax*2]
mov rcx, r8
test rbx, rbx
lea eax, [r10 + 1]
cmove eax, r10d
mov r10d, eax
cmp r9b, 0x30
jge 0x1800088b0
xorps xmm1, xmm1
test rbx, rbx
js 0x1800089cb
cvtsi2sd xmm1, rbx
jmp 0x1800089e3
xorps xmm1, xmm1
test rbx, rbx
js 0x180008920
cvtsi2sd xmm1, rbx
mov r15b, 1
jmp 0x18000881c
mov rax, rbx
mov rcx, rbx
shr rcx, 1
and eax, 1
or rcx, rax
mov r15b, 1
cvtsi2sd xmm1, rcx
addsd xmm1, xmm1
jmp 0x18000881c
cmp cl, 0x30
jl 0x18000881c
movzx eax, byte [r8]
movabs rsi, 0x1999999999999999
cmp al, 0x39
jg 0x18000881c
cmp rbx, rsi
jb 0x18000896a
jne 0x180008996
cmp al, 0x35
jg 0x180008996
movsx ecx, byte [r9]
lea rdx, [r9 + 1]
sub ecx, 0x30
mov qword [rbp - 0x38], rdx
lea rax, [rbx + rbx*4]
inc r10d
mov r8, rdx
mov r9, rdx
lea rbx, [rcx + rax*2]
movzx eax, byte [rdx]
cmp al, 0x30
jge 0x180008957
jmp 0x180008861
xorps xmm1, xmm1
test rbx, rbx
js 0x1800089ab
cvtsi2sd xmm1, rbx
mov r15b, 1
jmp 0x180008824
mov rax, rbx
mov rcx, rbx
shr rcx, 1
and eax, 1
or rcx, rax
mov r15b, 1
cvtsi2sd xmm1, rcx
addsd xmm1, xmm1
jmp 0x180008824
mov rax, rbx
mov rcx, rbx
shr rcx, 1
and eax, 1
or rcx, rax
cvtsi2sd xmm1, rcx
addsd xmm1, xmm1
movzx ecx, byte [rdx]
mov r15b, 1
cmp cl, 0x30
jl 0x180008a3e
mov rax, rdx
cmp byte [r8], 0x39
mov rdx, rax
jg 0x180008a3e
lea rdx, [rax + 1]
mov qword [rbp - 0x38], rdx
mov r8, rdx
cmp r10d, 0x11
jge 0x180008a35
movsx eax, byte [rax]
dec esi
sub eax, 0x30
mulsd xmm1, xmm3
movd xmm0, eax
lea eax, [r10 + 1]
cvtdq2pd xmm0, xmm0
addsd xmm0, xmm1
comisd xmm0, xmm2
movaps xmm1, xmm0
cmovbe eax, r10d
mov r10d, eax
cmp byte [r8], 0x30
mov rax, rdx
jge 0x1800089f1
movzx eax, byte [rdx]
cmp al, 0x65
je 0x180008a4d
cmp al, 0x45
jne 0x180008b57
inc rdx
mov qword [rbp - 0x38], rdx
test r15b, r15b
jne 0x180008a97
cmp byte [rbp + 0x50], r11b
mov rcx, rbx
mov eax, edi
xorps xmm1, xmm1
cmove rcx, rax
test rcx, rcx
js 0x180008a7f
cvtsi2sd xmm1, rcx
jmp 0x180008a94
mov eax, 0xe
jmp 0x180008e30
mov rax, rcx
and ecx, 1
shr rax, 1
or rax, rcx
cvtsi2sd xmm1, rax
addsd xmm1, xmm1
mov r15b, 1
movzx ecx, byte [rdx]
xor r10b, r10b
cmp cl, 0x2b
je 0x180008aaa
cmp cl, 0x2d
jne 0x180008ab5
mov r10b, 1
movzx ecx, byte [rdx + 1]
inc rdx
mov qword [rbp - 0x38], rdx
lea eax, [rcx - 0x30]
cmp al, 9
ja 0x180008c14
movzx r9d, byte [rdx + 1]
lea r8, [rdx + 1]
movsx r11d, cl
sub r11d, 0x30
mov qword [rbp - 0x38], r8
test r10b, r10b
je 0x180008bc8
lea ecx, [rsi + 0x7ffffff7]
mov eax, 0x66666667
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp r9b, 0x30
jl 0x180008b54
mov r9, r8
nop
cmp byte [r8], 0x39
jg 0x180008b54
movsx eax, byte [r9]
lea r11d, [r11 + r11*4]
lea r8, [r9 + 1]
lea r11d, [r11 - 0x18]
mov qword [rbp - 0x38], r8
mov r9, r8
lea r11d, [rax + r11*2]
cmp r11d, edx
jle 0x180008b4e
movzx eax, byte [r8]
cmp al, 0x30
jl 0x180008b4e
mov rcx, r8
mov r9, rcx
cmp al, 0x39
ja 0x180008b4a
movzx eax, byte [rcx + 1]
lea r8, [rcx + 1]
mov rcx, r8
mov r9, r8
cmp al, 0x30
jge 0x180008b31
mov qword [rbp - 0x38], r8
cmp byte [r8], 0x30
jge 0x180008b00
neg r11d
test r15b, r15b
je 0x180008c84
lea ecx, [r11 + rsi]
cmp ecx, 0xfffffecc
jge 0x180008c28
mulsd xmm1, qword [0x18011a6c8]
lea eax, [rcx + 0x134]
cmp eax, 0xfffffecc
jl 0x180008c4f
movsxd rax, ecx
lea rax, [rax*8 + 0x9a0]
lea rcx, [0x180116780]
movaps xmm2, xmm1
sub rcx, rax
divsd xmm2, qword [rcx]
comisd xmm2, xmmword [0x18011ae08]
jbe 0x180008c4f
mov rax, qword [rbp - 0x40]
mov dword [r13 + 0x30], 0xd
mov qword [r13 + 0x38], rax
jmp 0x180008e3b
mov edx, 0x134
sub edx, esi
cmp r9b, 0x30
jl 0x180008b57
mov rax, r8
nop dword [rax + rax]
cmp byte [r8], 0x39
jg 0x180008b57
lea r8, [rax + 1]
movsx eax, byte [rax]
lea r11d, [r11 + r11*4]
mov qword [rbp - 0x38], r8
lea r11d, [r11 - 0x18]
lea r11d, [rax + r11*2]
cmp r11d, edx
jg 0x180008bb3
cmp byte [r8], 0x30
mov rax, r8
jge 0x180008be0
jmp 0x180008b57
sub rdx, r12
mov dword [r13 + 0x30], 0xf
mov qword [r13 + 0x38], rdx
jmp 0x180008e3b
movsxd rax, ecx
lea rax, [rax*8]
test ecx, ecx
js 0x180008b94
lea rcx, [0x180116780]
movaps xmm2, xmm1
mulsd xmm2, qword [rax + rcx]
jmp 0x180008ba5
cmp byte [rbp - 0x48], 0
je 0x180008c5c
xorps xmm2, xmmword [0x18011b5c0]
movaps xmm1, xmm2
mov rcx, r14
call fcn.180009020
test al, al
jne 0x180008e3b
mov rax, qword [rbp - 0x40]
mov qword [r13 + 0x38], rax
mov dword [r13 + 0x30], 0x10
jmp 0x180008e3b
cmp byte [rbp + 0x50], 0
mov rax, qword [r14 + 0x40]
je 0x180008da1
cmp byte [rbp - 0x48], 0
je 0x180008d2e
mov rdx, qword [r14 + 0x38]
neg rbx
sub rax, rdx
cmp rax, 0x10
jge 0x180008cb9
lea rcx, [r14 + 0x20]
call fcn.180009240
mov rdx, qword [r14 + 0x38]
lea rax, [rdx + 0x10]
xorps xmm0, xmm0
mov qword [r14 + 0x38], rax
mov eax, 0x96
movups xmmword [rdx], xmm0
mov word [rdx + 0xe], ax
mov qword [rdx], rbx
test rbx, rbx
js 0x180008d13
movabs r8, 0xffffffff00000000
mov eax, 0x196
mov word [rdx + 0xe], ax
test r8, rbx
jne 0x180008cf9
mov eax, 0x1d6
mov word [rdx + 0xe], ax
test rbx, 0xffffffff80000000
jne 0x180008e3b
or ax, 0x20
mov word [rdx + 0xe], ax
jmp 0x180008e3b
cmp rbx, 0xffffffff80000000
jl 0x180008e3b
mov eax, 0xb6
mov word [rdx + 0xe], ax
jmp 0x180008e3b
mov rcx, qword [r14 + 0x38]
sub rax, rcx
cmp rax, 0x10
jge 0x180008d48
lea rcx, [r14 + 0x20]
call fcn.180009240
mov rcx, qword [r14 + 0x38]
lea rax, [rcx + 0x10]
xorps xmm0, xmm0
mov qword [r14 + 0x38], rax
mov eax, 0x116
movups xmmword [rcx], xmm0
mov word [rcx + 0xe], ax
mov qword [rcx], rbx
test rbx, rbx
js 0x180008d70
mov eax, 0x196
mov word [rcx + 0xe], ax
movabs r8, 0xffffffff00000000
test r8, rbx
jne 0x180008d87
or ax, 0x40
mov word [rcx + 0xe], ax
test rbx, 0xffffffff80000000
jne 0x180008e3b
or ax, 0x20
mov word [rcx + 0xe], ax
jmp 0x180008e3b
mov rcx, qword [r14 + 0x38]
sub rax, rcx
cmp byte [rbp - 0x48], 0
je 0x180008ded
neg edi
cmp rax, 0x10
jge 0x180008dc3
lea rcx, [r14 + 0x20]
call fcn.180009240
mov rcx, qword [r14 + 0x38]
lea rax, [rcx + 0x10]
xorps xmm0, xmm0
mov qword [r14 + 0x38], rax
test edi, edi
movsxd rax, edi
mov edx, 0x1f6
movups xmmword [rcx], xmm0
mov qword [rcx], rax
mov eax, 0xb6
cmovns ax, dx
mov word [rcx + 0xe], ax
jmp 0x180008e3b
cmp rax, 0x10
jge 0x180008e00
lea rcx, [r14 + 0x20]
call fcn.180009240
mov rcx, qword [r14 + 0x38]
lea rax, [rcx + 0x10]
xorps xmm0, xmm0
mov qword [r14 + 0x38], rax
mov eax, edi
shr edi, 0x1a
not di
movups xmmword [rcx], xmm0
mov qword [rcx], rax
and di, 0x20
mov eax, 0x1d6
or di, ax
mov word [rcx + 0xe], di
jmp 0x180008e3b
mov eax, 3
sub r8, r12
mov dword [r13 + 0x30], eax
mov qword [r13 + 0x38], r8
mov rax, qword [rbp + 0x40]
movups xmm0, xmmword [rbp - 0x38]
mov r15, qword [rsp + 0x60]
mov rdi, qword [rsp + 0xa0]
movups xmmword [rax], xmm0
movsd qword [rax + 0x10], xmm6
movaps xmm6, xmmword [rsp + 0x50]
add rsp, 0x68
pop r14
pop r13
pop r12
pop rsi
pop rbx
pop rbp
ret