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

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x220
mov r9, rcx
mov rax, rdx
mov rbx, r8
test rdx, rdx
jle 0x31eec7768
mov dl, byte [rcx]
lea ecx, [rdx - 0x2b]
and cl, 0xfd
jne 0x31eec7768
movsd xmm1, qword [0x31ef30ee0]
mov r10b, 1
cmp dl, 0x2d
jne 0x31eec7778
movsd xmm1, qword [0x31ef30ee8]
jmp 0x31eec7778
movsd xmm1, qword [0x31ef30ee0]
xor r10d, r10d
xor r12d, r12d
jmp 0x31eec777e
mov r12d, 1
lea rdx, [r12 + 2]
cmp rdx, rax
jge 0x31eec781e
mov dl, byte [r9 + r12]
mov rcx, r12
and edx, 0xffffffdf
cmp dl, 0x4e
je 0x31eec77a9
cmp dl, 0x49
jne 0x31eec7887
jmp 0x31eec7829
mov dl, byte [r9 + r12 + 1]
and edx, 0xffffffdf
cmp dl, 0x41
jne 0x31eec7bfd
mov dl, byte [r9 + r12 + 2]
and edx, 0xffffffdf
cmp dl, 0x4e
jne 0x31eec7bfd
add r12, 3
cmp r12, rax
jge 0x31eec77fe
mov al, byte [r9 + rcx + 3]
mov edx, eax
and edx, 0xffffffdf
sub edx, 0x41
cmp dl, 0x19
jbe 0x31eec7bfd
lea edx, [rax - 0x30]
cmp dl, 9
jbe 0x31eec7bfd
cmp al, 0x5f
je 0x31eec7bfd
movsd xmm0, qword [0x31ef30ef0]
xorps xmm1, xmm1
mulsd xmm0, xmm0
cvtsd2ss xmm0, xmm0
mulss xmm0, xmm1
cvtss2sd xmm0, xmm0
jmp 0x31eec7bc8
or rcx, 0xffffffffffffffff
cmp r12, rax
jl 0x31eec7887
jmp 0x31eec789e
mov dl, byte [r9 + r12 + 1]
and edx, 0xffffffdf
cmp dl, 0x4e
jne 0x31eec7bfd
mov dl, byte [r9 + r12 + 2]
and edx, 0xffffffdf
cmp dl, 0x46
jne 0x31eec7bfd
add r12, 3
cmp r12, rax
jge 0x31eec7a62
mov al, byte [r9 + rcx + 3]
mov edx, eax
and edx, 0xffffffdf
sub edx, 0x41
cmp dl, 0x19
jbe 0x31eec7bfd
lea edx, [rax - 0x30]
cmp dl, 9
jbe 0x31eec7bfd
cmp al, 0x5f
je 0x31eec7bfd
jmp 0x31eec7a62
movzx edx, byte [r9 + r12]
or rcx, 0xffffffffffffffff
lea r8d, [rdx - 0x30]
cmp r8b, 9
ja 0x31eec789e
lea rcx, [rdx - 0x30]
xor esi, esi
xor edx, edx
cmp r12, rax
jge 0x31eec7974
movzx r8d, byte [r9 + r12]
lea r11d, [r8 - 0x30]
cmp r11b, 9
ja 0x31eec78d7
imul rdx, rdx, 0xa
inc rsi
lea rdx, [rdx + r8 - 0x30]
inc r12
cmp r12, rax
je 0x31eec78a2
cmp byte [r9 + r12], 0x5f
je 0x31eec78c6
jmp 0x31eec78a2
cmp r8b, 0x2e
jne 0x31eec7974
inc r12
test rsi, rsi
jne 0x31eec7913
xor r8d, r8d
mov r13, r8
cmp r12, rax
jge 0x31eec7916
cmp byte [r9 + r12], 0x30
jne 0x31eec7c02
inc r8
inc r12
cmp r12, rax
je 0x31eec78ec
cmp byte [r9 + r12], 0x5f
je 0x31eec7902
jmp 0x31eec78ec
xor r13d, r13d
cmp rcx, 0xffffffffffffffff
jne 0x31eec7938
cmp r12, rax
jge 0x31eec7938
movzx r8d, byte [r9 + r12]
or rcx, 0xffffffffffffffff
lea r11d, [r8 - 0x30]
cmp r11b, 9
ja 0x31eec7938
lea rcx, [r8 - 0x30]
xor r8d, r8d
lea rbp, [r13 + r8]
mov r11, r8
cmp r12, rax
jge 0x31eec7979
movzx edi, byte [r9 + r12]
lea r14d, [rdi - 0x30]
cmp r14b, 9
ja 0x31eec7979
imul rdx, rdx, 0xa
inc r8
lea rdx, [rdx + rdi - 0x30]
inc r12
cmp r12, rax
je 0x31eec793b
cmp byte [r9 + r12], 0x5f
je 0x31eec7963
jmp 0x31eec793b
xor ebp, ebp
xor r11d, r11d
mov rdi, rsi
add rdi, r11
jne 0x31eec7999
test r12, r12
je 0x31eec7c11
cmp r12, 1
jne 0x31eec7999
test r10b, r10b
jne 0x31eec7bfd
lea r8, [r12 + 1]
cmp r8, rax
jge 0x31eec7a1f
mov r10b, byte [r9 + r12]
and r10d, 0xffffffdf
cmp r10b, 0x45
jne 0x31eec7a1f
mov r10b, byte [r9 + r8]
cmp r10b, 0x2b
je 0x31eec79c7
cmp r10b, 0x2d
jne 0x31eec79d3
or r8, 0xffffffffffffffff
jmp 0x31eec79cd
mov r8d, 1
add r12, 2
jmp 0x31eec79dc
mov r12, r8
mov r8d, 1
mov r14b, byte [r9 + r12]
lea r10d, [r14 - 0x30]
cmp r10b, 9
ja 0x31eec7bfd
xor r10d, r10d
cmp r12, rax
jge 0x31eec7a28
movzx r13d, byte [r9 + r12]
lea r14d, [r13 - 0x30]
cmp r14b, 9
ja 0x31eec7a28
imul r10, r10, 0xa
lea r10, [r10 + r13 - 0x30]
inc r12
cmp r12, rax
je 0x31eec79f1
cmp byte [r9 + r12], 0x5f
je 0x31eec7a0e
jmp 0x31eec79f1
mov r8d, 1
xor r10d, r10d
imul r10, r8
sub r10, rbp
mov r8, r10
neg r8
cmovs r8, r10
cmp r8, 0x3e7
jg 0x31eec7a4a
cmp rdi, 0xf
jg 0x31eec7a83
jmp 0x31eec7a97
test rdx, rdx
je 0x31eec7a56
test r10, r10
jns 0x31eec7a62
jmp 0x31eec7a73
mov qword [rbx], 0
jmp 0x31eec7c11
movsd xmm0, qword [0x31ef30ee0]
xorps xmm2, xmm2
divsd xmm0, xmm2
jmp 0x31eec7aed
xorps xmm0, xmm0
mulsd xmm1, xmm0
movsd qword [rbx], xmm1
jmp 0x31eec7c11
cmp rdi, 0x10
jne 0x31eec7b43
cmp rcx, 9
je 0x31eec7b43
cmp r8, 0x16
jle 0x31eec7ab6
mov eax, 0xf
sub rax, rsi
sub rax, r11
lea rcx, [rax + 0x16]
cmp rcx, r8
jge 0x31eec7aff
jmp 0x31eec7b43
test rdx, rdx
js 0x31eec7ac2
cvtsi2sd xmm0, rdx
jmp 0x31eec7ad7
mov rax, rdx
and edx, 1
shr rax, 1
or rax, rdx
cvtsi2sd xmm0, rax
addsd xmm0, xmm0
lea rax, [0x31ef30720]
mulsd xmm0, xmm1
movsd xmm1, qword [rax + r8*8]
test r10, r10
js 0x31eec7af6
mulsd xmm0, xmm1
jmp 0x31eec7bc8
divsd xmm0, xmm1
jmp 0x31eec7bc8
test r10, r10
js 0x31eec7b43
test rdx, rdx
js 0x31eec7b10
cvtsi2sd xmm0, rdx
jmp 0x31eec7b25
mov rcx, rdx
and edx, 1
shr rcx, 1
or rcx, rdx
cvtsi2sd xmm0, rcx
addsd xmm0, xmm0
lea rdx, [0x31ef30720]
mulsd xmm0, xmm1
sub r8, rax
mulsd xmm0, qword [rdx + rax*8]
mulsd xmm0, qword [rdx + r8*8]
jmp 0x31eec7bc8
lea r11, [rsp + 0x2c]
mov edx, 0x1f4
mov rcx, r11
call fcn.31eec36bb
xor ecx, ecx
test r12, r12
je 0x31eec7b80
xor eax, eax
cmp byte [r9], 0x2e
sete al
cmp r12, rax
jle 0x31eec7b80
mov dl, byte [r9 + rax]
lea esi, [rdx - 0x2b]
and sil, 0xfd
je 0x31eec7bce
lea esi, [rdx - 0x30]
cmp sil, 9
jbe 0x31eec7bce
mov rax, r8
mov r9d, 0xa
sar r10, 0x3f
mov byte [rsp + rcx + 0x2c], 0x45
cqo
and r10d, 2
idiv r9
add r10d, 0x2b
mov byte [rsp + rcx + 0x2d], r10b
add edx, 0x30
mov byte [rsp + rcx + 0x30], dl
cqo
idiv r9
add edx, 0x30
add eax, 0x30
mov byte [rsp + rcx + 0x2f], dl
xor edx, edx
mov byte [rsp + rcx + 0x2e], al
mov rcx, r11
call fcn.31ef17750
movsd qword [rbx], xmm0
jmp 0x31eec7c11
cmp rcx, 0x1ed
jg 0x31eec7bde
mov byte [rsp + rcx + 0x2c], dl
inc rcx
inc rax
cmp r12, rax
je 0x31eec7b65
mov dl, byte [r9 + rax]
cmp dl, 0x2e
je 0x31eec7bde
cmp dl, 0x5f
je 0x31eec7bde
jmp 0x31eec7b65
xor r12d, r12d
jmp 0x31eec7c11
cmp rcx, 0xffffffffffffffff
jne 0x31eec7938
jmp 0x31eec7921
mov rax, r12
add rsp, 0x220
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret