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

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x228
xor eax, eax
mov r10, rcx
mov rbx, rdx
test rcx, rcx
je 0x40675d
mov rax, qword [rcx]
cmp rax, r8
jle 0x40678d
mov dl, byte [r10 + r8 + 0x10]
lea ecx, [rdx - 0x2b]
and cl, 0xfd
jne 0x40678d
movsd xmm1, qword [0x00437ce0]
cmp dl, 0x2d
je 0x406784
movsd xmm1, qword [0x00437ce8]
lea r9, [r8 + 1]
mov r11b, 1
jmp 0x40679b
movsd xmm1, qword [0x00437ce8]
mov r9, r8
xor r11d, r11d
lea rcx, [r9 + 2]
cmp rcx, rax
jge 0x406837
mov dl, byte [r10 + r9 + 0x10]
and edx, 0xffffffdf
cmp dl, 0x4e
je 0x4067bf
cmp dl, 0x49
jne 0x406837
jmp 0x406842
mov dl, byte [r10 + r9 + 0x11]
xor r12d, r12d
and edx, 0xffffffdf
cmp dl, 0x41
jne 0x406c41
mov dl, byte [r10 + rcx + 0x10]
and edx, 0xffffffdf
cmp dl, 0x4e
jne 0x406c41
add r9, 3
cmp r9, rax
jge 0x406817
mov al, byte [r10 + r9 + 0x10]
mov edx, eax
and edx, 0xffffffdf
sub edx, 0x41
cmp dl, 0x19
jbe 0x406c41
lea edx, [rax - 0x30]
cmp dl, 9
jbe 0x406c2d
cmp al, 0x5f
je 0x406c2d
movsd xmm0, qword [0x00437cf0]
xorps xmm1, xmm1
mulsd xmm0, xmm0
cvtsd2ss xmm0, xmm0
mulss xmm0, xmm1
cvtss2sd xmm0, xmm0
jmp 0x406aa0
or rcx, 0xffffffffffffffff
cmp r9, rax
jl 0x4068a3
jmp 0x4068bc
mov dl, byte [r10 + r9 + 0x11]
xor r12d, r12d
and edx, 0xffffffdf
cmp dl, 0x4e
jne 0x406c41
mov dl, byte [r10 + rcx + 0x10]
and edx, 0xffffffdf
cmp dl, 0x46
jne 0x406c41
add r9, 3
cmp r9, rax
jge 0x406a88
mov al, byte [r10 + r9 + 0x10]
mov edx, eax
and edx, 0xffffffdf
sub edx, 0x41
cmp dl, 0x19
jbe 0x406c41
lea edx, [rax - 0x30]
cmp dl, 9
jbe 0x406c2d
cmp al, 0x5f
je 0x406c2d
jmp 0x406a88
mov dl, byte [r10 + r9 + 0x10]
or rcx, 0xffffffffffffffff
lea esi, [rdx - 0x30]
cmp sil, 9
ja 0x4068bc
movzx ecx, dl
sub rcx, 0x30
xor r13d, r13d
xor esi, esi
cmp r9, rax
jge 0x406996
movzx edx, byte [r10 + r9 + 0x10]
lea edi, [rdx - 0x30]
cmp dil, 9
ja 0x4068f7
imul rsi, rsi, 0xa
inc r13
lea rsi, [rsi + rdx - 0x30]
inc r9
cmp r9, rax
je 0x4068c1
cmp byte [r10 + r9 + 0x10], 0x5f
je 0x4068e5
jmp 0x4068c1
cmp dl, 0x2e
jne 0x406996
inc r9
test r13, r13
jne 0x406933
xor edx, edx
mov r12, rdx
cmp r9, rax
jge 0x406936
cmp byte [r10 + r9 + 0x10], 0x30
jne 0x406c32
inc rdx
inc r9
cmp r9, rax
je 0x40690a
cmp byte [r10 + r9 + 0x10], 0x5f
je 0x406921
jmp 0x40690a
xor r12d, r12d
cmp rcx, 0xffffffffffffffff
jne 0x40695a
cmp r9, rax
jge 0x40695a
mov dl, byte [r10 + r9 + 0x10]
or rcx, 0xffffffffffffffff
lea edi, [rdx - 0x30]
cmp dil, 9
ja 0x40695a
movzx ecx, dl
sub rcx, 0x30
xor edx, edx
lea r14, [r12 + rdx]
mov rbp, rdx
cmp r9, rax
jge 0x40699b
movzx edi, byte [r10 + r9 + 0x10]
lea r15d, [rdi - 0x30]
cmp r15b, 9
ja 0x40699b
imul rsi, rsi, 0xa
inc rdx
lea rsi, [rsi + rdi - 0x30]
inc r9
cmp r9, rax
je 0x40695c
cmp byte [r10 + r9 + 0x10], 0x5f
je 0x406984
jmp 0x40695c
xor r14d, r14d
xor ebp, ebp
mov r12, r13
add r12, rbp
jne 0x4069be
cmp r9, r8
je 0x406c41
lea rdx, [r8 + 1]
cmp rdx, r9
jne 0x4069be
test r11b, r11b
jne 0x406c41
lea rdx, [r9 + 1]
cmp rdx, rax
jge 0x406a43
mov r11b, byte [r10 + r9 + 0x10]
and r11d, 0xffffffdf
cmp r11b, 0x45
jne 0x406a43
mov r11b, byte [r10 + rdx + 0x10]
cmp r11b, 0x2b
je 0x4069ed
or rdi, 0xffffffffffffffff
cmp r11b, 0x2d
je 0x4069f2
jmp 0x4069f8
mov edi, 1
add r9, 2
jmp 0x406a00
mov r9, rdx
mov edi, 1
mov dl, byte [r10 + r9 + 0x10]
sub edx, 0x30
cmp dl, 9
ja 0x406c2d
xor r11d, r11d
cmp r9, rax
jge 0x406a4b
movzx r15d, byte [r10 + r9 + 0x10]
lea edx, [r15 - 0x30]
cmp dl, 9
ja 0x406a4b
imul rdx, r11, 0xa
lea r11, [rdx + r15 - 0x30]
inc r9
cmp r9, rax
je 0x406a14
cmp byte [r10 + r9 + 0x10], 0x5f
je 0x406a31
jmp 0x406a14
mov edi, 1
xor r11d, r11d
imul r11, rdi
sub r11, r14
mov rax, r11
sar rax, 0x3f
mov rdi, rax
xor rdi, r11
sub rdi, rax
cmp rdi, 0x3e7
jg 0x406a73
cmp r12, 0xf
jg 0x406aaf
jmp 0x406ac3
test rsi, rsi
je 0x406a7f
test r11, r11
jns 0x406a88
jmp 0x406a99
mov qword [rbx], 0
jmp 0x406aa4
movsd xmm0, qword [0x00437ce8]
xorps xmm2, xmm2
divsd xmm0, xmm2
jmp 0x406a9c
xorps xmm0, xmm0
mulsd xmm0, xmm1
movsd qword [rbx], xmm0
sub r9, r8
mov r12, r9
jmp 0x406c41
cmp r12, 0x10
jne 0x406b67
cmp rcx, 8
jg 0x406b67
cmp rdi, 0x16
jle 0x406ae2
mov eax, 0xf
sub rax, r13
sub rax, rbp
lea rdx, [rax + 0x16]
cmp rdx, rdi
jge 0x406b1e
jmp 0x406b67
test rsi, rsi
js 0x406aee
cvtsi2sd xmm0, rsi
jmp 0x406b03
mov rcx, rsi
and esi, 1
shr rcx, 1
or rcx, rsi
cvtsi2sd xmm0, rcx
addsd xmm0, xmm0
lea rax, [0x00437780]
mulsd xmm0, xmm1
movsd xmm1, qword [rax + rdi*8]
test r11, r11
jns 0x406a9c
divsd xmm0, xmm1
jmp 0x406aa0
test r11, r11
js 0x406b67
sub r9, r8
mov r12, r9
test rsi, rsi
js 0x406b35
cvtsi2sd xmm0, rsi
jmp 0x406b4a
mov rcx, rsi
and esi, 1
shr rcx, 1
or rcx, rsi
cvtsi2sd xmm0, rcx
addsd xmm0, xmm0
lea rcx, [0x00437780]
mulsd xmm0, xmm1
sub rdi, rax
mulsd xmm0, qword [rcx + rax*8]
mulsd xmm0, qword [rcx + rdi*8]
jmp 0x406bf5
lea r13, [rsp + 0x2c]
mov edx, 0x1f4
mov rcx, r13
call fcn.00402a6d
xor ecx, ecx
mov r12, r9
sub r12, r8
cmp r9, r8
jle 0x406bad
cmp byte [r10 + r8 + 0x10], 0x2e
jne 0x406b91
inc r8
xor ecx, ecx
cmp r9, r8
jle 0x406bad
mov al, byte [r10 + r8 + 0x10]
lea edx, [rax - 0x2b]
and dl, 0xfd
je 0x406bfb
lea edx, [rax - 0x30]
cmp dl, 9
jbe 0x406bfb
mov rax, rdi
mov r8d, 0xa
sar r11, 0x3f
mov byte [rsp + rcx + 0x2c], 0x45
cqo
and r11d, 2
idiv r8
add r11d, 0x2b
mov byte [rsp + rcx + 0x2d], r11b
add edx, 0x30
mov byte [rsp + rcx + 0x30], dl
cqo
idiv r8
add edx, 0x30
add eax, 0x30
mov byte [rsp + rcx + 0x2f], dl
xor edx, edx
mov byte [rsp + rcx + 0x2e], al
mov rcx, r13
call fcn.00430f20
movsd qword [rbx], xmm0
jmp 0x406c41
cmp rcx, 0x1ed
jg 0x406c0b
mov byte [rsp + rcx + 0x2c], al
inc rcx
inc r8
cmp r9, r8
jne 0x406c1b
mov r8, r9
jmp 0x406b93
mov al, byte [r10 + r8 + 0x10]
cmp al, 0x2e
je 0x406c0b
cmp al, 0x5f
je 0x406c0b
jmp 0x406b93
xor r12d, r12d
jmp 0x406c41
cmp rcx, 0xffffffffffffffff
jne 0x40695a
jmp 0x406941
mov rax, r12
add rsp, 0x228
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret