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

Disassembly:
mov r11, rsp
mov qword [r11 + 0x10], rdx
push rbp
push rbx
push rdi
push r14
push r15
mov rbp, rsp
sub rsp, 0x50
lea rax, [rbp - 0x30]
mov rdi, r9
mov qword [rbp - 8], rax
mov rbx, r8
movzx eax, byte [r8]
mov r14, rdx
mov r15, rcx
test al, al
je 0x140016711
mov qword [r11 + 8], rsi
lea r8, [0x140000000]
movzx esi, byte [rbp - 0x16]
mov qword [r11 + 0x18], r12
mov qword [r11 + 0x20], r13
mov r11d, 0x2d
lea r13d, [r11 + 0x2a]
lea r12d, [r11 + 0xa]
nop word [rax + rax]
inc rbx
cmp al, 0x25
je 0x1400162ff
movzx edx, al
jmp 0x1400166db
movzx ecx, byte [rbx]
xor r9b, r9b
xor r10b, r10b
mov word [rbp - 0x18], 0
mov dword [rbp - 0x14], 0
mov byte [rbp - 0x15], r9b
mov byte [rbp - 0x10], r10b
test cl, cl
je 0x14001634a
inc rbx
cmp cl, 0x23
je 0x14001633f
cmp cl, 0x2d
je 0x140016339
cmp cl, 0x30
jne 0x14001634d
mov byte [rbp - 0x18], 1
jmp 0x140016343
mov byte [rbp - 0x15], 1
jmp 0x140016343
mov byte [rbp - 0x17], 1
movzx ecx, byte [rbx]
test cl, cl
jne 0x140016321
inc rbx
lea eax, [rcx - 0x30]
cmp al, 9
ja 0x1400163a2
xor r8d, r8d
lea eax, [rcx - 0x30]
cmp al, 9
ja 0x140016366
movsx edx, cl
sub edx, 0x30
jmp 0x140016382
lea eax, [rcx - 0x61]
cmp al, 5
ja 0x140016375
movsx edx, cl
sub edx, r13d
jmp 0x140016382
lea eax, [rcx - 0x41]
cmp al, 5
ja 0x140016397
movsx edx, cl
sub edx, r12d
cmp edx, 0xa
ja 0x140016397
movzx ecx, byte [rbx]
lea eax, [r8 + r8*4]
lea r8d, [rdx + rax*2]
inc rbx
jmp 0x140016357
mov dword [rbp - 0x14], r8d
lea r8, [0x140000000]
cmp cl, 0x2e
jne 0x1400163c0
mov byte [rbp - 0x18], 1
nop dword [rax + rax]
movzx ecx, byte [rbx]
inc rbx
cmp cl, 0x30
jl 0x1400163c0
cmp cl, 0x39
jle 0x1400163b0
cmp cl, 0x7a
je 0x1400163d8
cmp cl, 0x6c
jne 0x1400163e1
movzx ecx, byte [rbx]
mov r9b, 1
inc rbx
cmp cl, 0x6c
jne 0x1400163e1
movzx ecx, byte [rbx]
mov r9b, 2
inc rbx
movsx rax, cl
cmp eax, 0x78
ja case.0x140016402.8
movzx eax, byte [r8 + rax + 0x16744]
mov edx, dword [r8 + rax*4 + 0x16720]
add rdx, r8
jmp rdx
add rdi, 8
mov dword [rbp - 0xc], 0xa
lea rdx, [rbp - 0x18]
cmp r9b, 2
jne 0x140016436
mov rcx, qword [rdi - 8]
call fcn.140016db0
lea r8, [rbp - 0x18]
mov rdx, r14
mov rcx, r15
call fcn.140016130
jmp 0x1400166e1
mov ecx, dword [rdi - 8]
cmp r9b, 1
jne 0x14001658a
call fcn.140016cf0
lea r8, [rbp - 0x18]
mov rdx, r14
mov rcx, r15
call fcn.140016130
jmp 0x1400166e1
add rdi, 8
mov dword [rbp - 0xc], 0xa
movzx eax, r10b
cmp r9b, 2
jne 0x14001653e
mov rcx, qword [rdi - 8]
lea r9, [rbp - 0x30]
test rcx, rcx
cmovs eax, r11d
mov r11, rcx
neg r11
mov byte [rbp - 0x10], al
test rcx, rcx
cmovns r11, rcx
xor r10d, r10d
lea ecx, [r10 + 1]
cmp r11, 0xa
jb 0x1400164bb
xor edx, edx
lea rcx, [rcx + rcx*4]
add rcx, rcx
mov rax, r11
div rcx
cmp rax, 0xa
jae 0x1400164a1
test rcx, rcx
je 0x140016526
movabs r14, 0xcccccccccccccccd
nop word [rax + rax]
xor edx, edx
mov rax, r11
div rcx
mov r8, rax
mov r11, rdx
mov rax, r14
mul rcx
mov rcx, rdx
shr rcx, 3
test r10d, r10d
jne 0x1400164fa
test r8d, r8d
jg 0x1400164fa
test rcx, rcx
jne 0x1400164d0
cmp r8d, 0xa
jge 0x140016507
mov eax, 0x30
jmp 0x140016511
test sil, sil
mov eax, r13d
cmovne eax, r12d
add al, r8b
inc r10d
mov byte [r9], al
inc r9
test rcx, rcx
jne 0x1400164d0
mov r14, qword [rbp + 0x38]
lea r8, [rbp - 0x18]
mov byte [r9], 0
mov rdx, r14
mov rcx, r15
call fcn.140016130
jmp 0x1400166e1
mov edx, dword [rdi - 8]
mov ecx, edx
cmp r9b, 1
jne 0x140016576
test edx, edx
cmovs eax, r11d
neg ecx
test edx, edx
mov byte [rbp - 0x10], al
cmovns ecx, edx
lea rdx, [rbp - 0x18]
call fcn.140016cf0
lea r8, [rbp - 0x18]
mov rdx, r14
mov rcx, r15
call fcn.140016130
jmp 0x1400166e1
test edx, edx
cmovs eax, r11d
neg ecx
test edx, edx
mov byte [rbp - 0x10], al
cmovns ecx, edx
lea rdx, [rbp - 0x18]
call fcn.140016c30
lea r8, [rbp - 0x18]
mov rdx, r14
mov rcx, r15
call fcn.140016130
jmp 0x1400166e1
cmp cl, 0x58
mov dword [rbp - 0xc], 0x10
sete sil
add rdi, 8
mov byte [rbp - 0x16], sil
cmp r9b, 2
jne 0x14001665d
mov r11, qword [rdi - 8]
lea r9, [rbp - 0x30]
xor r10d, r10d
lea r8d, [r10 + 1]
cmp r11, 0x10
jb 0x140016600
nop dword [rax + rax]
shl r8, 4
xor edx, edx
mov rax, r11
div r8
cmp rax, 0x10
jae 0x1400165e0
test r8, r8
je 0x140016526
nop dword [rax + rax]
xor edx, edx
mov rax, r11
div r8
shr r8, 4
mov r11, rdx
mov rdx, rax
test r10d, r10d
jne 0x140016620
test edx, edx
jg 0x140016620
test r8, r8
jne 0x140016600
cmp edx, 0xa
jge 0x14001662c
mov eax, 0x30
jmp 0x140016636
cmp cl, 0x58
mov eax, r12d
cmovne eax, r13d
add al, dl
inc r10d
mov byte [r9], al
inc r9
test r8, r8
jne 0x140016600
mov byte [r9], r8b
mov rdx, r14
lea r8, [rbp - 0x18]
mov rcx, r15
call fcn.140016130
jmp 0x1400166e1
mov ecx, dword [rdi - 8]
lea rdx, [rbp - 0x18]
cmp r9b, 1
jne 0x14001658a
call fcn.140016cf0
lea r8, [rbp - 0x18]
mov rdx, r14
mov rcx, r15
call fcn.140016130
jmp 0x1400166e1
mov ecx, dword [rdi]
lea rdx, [rbp - 0x18]
add rdi, 8
mov dword [rbp - 0xc], 8
call fcn.140016c30
lea r8, [rbp - 0x18]
mov rdx, r14
mov rcx, r15
call fcn.140016130
jmp 0x1400166e1
movzx edx, byte [rdi]
add rdi, 8
jmp 0x1400166db
mov rax, qword [rdi]
lea r8, [rbp - 0x18]
add rdi, 8
mov qword [rbp - 8], rax
mov rdx, r14
mov rcx, r15
call fcn.140016130
lea rax, [rbp - 0x30]
mov qword [rbp - 8], rax
jmp 0x1400166e1
movzx edx, cl
mov rcx, r15
call r14
mov r11d, 0x2d
movzx eax, byte [rbx]
lea r8, [0x140000000]
test al, al
jne 0x1400162f0
mov r12, qword [rsp + 0x90]
mov rsi, qword [rsp + 0x80]
mov r13, qword [rsp + 0x98]
add rsp, 0x50
pop r15
pop r14
pop rdi
pop rbx
pop rbp
ret