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

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r15
sub rsp, 0x80
mov rbx, rdx
movaps xmmword [rsp + 0x60], xmm6
mov rdx, rcx
movaps xmmword [rsp + 0x50], xmm7
movaps xmmword [rsp + 0x40], xmm8
xorps xmm6, xmm6
xorps xmm8, xmm8
mov rax, qword [rbx + 0x28]
mov rcx, qword [rbx + 0x38]
sub rcx, qword [rbx + 0x10]
add rcx, rax
cmp byte [rax], 0x2d
mov qword [rsp + 0x30], rcx
jne 0x14004d1c6
mov rcx, rbx
call fcn.14004b010
mov rdx, qword [rsp + 0xc0]
mov r13b, 1
jmp 0x14004d1c9
xor r13b, r13b
mov rcx, qword [rbx + 0x28]
xor r15d, r15d
movsd xmm7, qword [0x1400f9b00]
xor r12b, r12b
mov byte [rsp + 0xd8], r13b
mov edi, r15d
mov qword [rsp + 0x78], r14
mov ebp, r15d
movsx esi, byte [rcx]
mov byte [rsp + 0xc8], r12b
cmp sil, 0x30
jne 0x14004d21d
mov rcx, rbx
mov dword [rsp + 0x20], r15d
call fcn.14004b010
mov rdx, qword [rbx + 0x28]
mov r14d, r15d
mov qword [rsp + 0x28], r15
jmp 0x14004d3d8
lea eax, [rsi - 0x31]
cmp al, 8
ja 0x14004d88c
mov rcx, rbx
call fcn.14004b010
mov rdx, qword [rbx + 0x28]
lea r14d, [rsi - 0x30]
movzx esi, byte [rdx]
test r13b, r13b
je 0x14004d294
cmp sil, 0x30
jl 0x14004d2e6
nop word [rax + rax]
cmp sil, 0x39
ja 0x14004d2e6
cmp r14d, 0xccccccc
jb 0x14004d26b
jne 0x14004d2e0
cmp sil, 0x38
ja 0x14004d2e0
mov rcx, rbx
call fcn.14004b010
mov rdx, qword [rbx + 0x28]
lea r14d, [r14 + r14*4]
movzx eax, sil
lea r14d, [r14 - 0x18]
inc ebp
movzx esi, byte [rdx]
lea r14d, [rax + r14*2]
cmp sil, 0x30
jge 0x14004d250
jmp 0x14004d2e6
cmp sil, 0x30
jl 0x14004d2e6
nop word [rax + rax]
cmp sil, 0x39
ja 0x14004d2e6
cmp r14d, 0x19999999
jb 0x14004d2b7
jne 0x14004d2e0
cmp sil, 0x35
ja 0x14004d2e0
mov rcx, rbx
call fcn.14004b010
mov rdx, qword [rbx + 0x28]
lea r14d, [r14 + r14*4]
movzx eax, sil
lea r14d, [r14 - 0x18]
inc ebp
movzx esi, byte [rdx]
lea r14d, [rax + r14*2]
cmp sil, 0x30
jge 0x14004d2a0
jmp 0x14004d2e6
mov r12b, 1
mov edi, r14d
movzx ecx, r12b
mov dword [rsp + 0x20], r14d
xor r12b, r12b
mov byte [rsp + 0xc8], cl
test cl, cl
je 0x14004d384
mov rax, qword [rbx + 0x28]
mov dword [rsp + 0x20], r14d
mov rdx, rax
mov byte [rsp + 0xc8], cl
movzx esi, byte [rax]
test r13b, r13b
je 0x14004d4c8
cmp sil, 0x30
jl 0x14004d384
mov dword [rsp + 0x20], r14d
movabs r13, 0xccccccccccccccc
mov byte [rsp + 0xc8], cl
nop dword [rax]
xor r12b, r12b
cmp sil, 0x39
ja 0x14004d384
cmp rdi, r13
jb 0x14004d35e
jne 0x14004d493
cmp sil, 0x38
ja 0x14004d493
mov rcx, rbx
call fcn.14004b010
mov rdx, qword [rbx + 0x28]
lea rax, [rdi + rdi*4]
movzx ecx, sil
inc ebp
sub ecx, 0x30
movzx esi, byte [rdx]
lea rdi, [rcx + rax*2]
cmp sil, 0x30
jge 0x14004d340
mov qword [rsp + 0x28], rdi
mov rax, rdx
test r12b, r12b
je 0x14004d3d8
cmp byte [rax], 0x30
mov rdx, rax
jl 0x14004d3d8
movzx esi, byte [rax]
nop dword [rax]
mov rdx, rax
cmp sil, 0x39
ja 0x14004d3d8
mov rcx, rbx
call fcn.14004b010
mov rdx, qword [rbx + 0x28]
movzx eax, sil
sub eax, 0x30
mulsd xmm6, xmm7
movzx esi, byte [rdx]
movd xmm0, eax
mov rax, rdx
cvtdq2pd xmm0, xmm0
addsd xmm6, xmm0
cmp sil, 0x30
jge 0x14004d3a0
cmp byte [rdx], 0x2e
mov r13d, r15d
mov dword [rsp + 0x24], r15d
jne 0x14004d5a7
mov rcx, rbx
call fcn.14004b010
mov rcx, qword [rbx + 0x28]
movzx esi, byte [rcx]
lea eax, [rsi - 0x30]
cmp al, 9
ja 0x14004d644
test r12b, r12b
jne 0x14004d5eb
mov edi, dword [rsp + 0x20]
mov r8, rcx
cmp byte [rsp + 0xc8], r15b
mov r13d, edi
movabs r14, 0x1fffffffffffff
cmovne rdi, qword [rsp + 0x28]
nop
mov r9, rcx
mov rdx, r8
cmp sil, 0x39
ja 0x14004d47d
cmp rdi, r14
ja 0x14004d47d
mov rcx, rbx
call fcn.14004b010
dec dword [rsp + 0x24]
lea rax, [rdi + rdi*4]
movzx ecx, sil
sub ecx, 0x30
lea rdi, [rcx + rax*2]
mov rcx, qword [rbx + 0x28]
test rdi, rdi
lea eax, [rbp + 1]
mov r8, rcx
mov r9, rcx
cmove eax, ebp
mov rdx, rcx
movzx esi, byte [rcx]
mov ebp, eax
cmp sil, 0x30
jge 0x14004d430
xorps xmm6, xmm6
test rdi, rdi
js 0x14004d57a
cvtsi2sd xmm6, rdi
jmp 0x14004d592
xorps xmm6, xmm6
test rdi, rdi
js 0x14004d4a8
cvtsi2sd xmm6, rdi
mov r12b, 1
jmp 0x14004d384
mov rax, rdi
mov rcx, rdi
shr rcx, 1
and eax, 1
or rcx, rax
mov r12b, 1
cvtsi2sd xmm6, rcx
addsd xmm6, xmm6
jmp 0x14004d384
cmp sil, 0x30
jl 0x14004d384
mov dword [rsp + 0x20], r14d
movabs r13, 0x1999999999999999
mov byte [rsp + 0xc8], cl
nop dword [rax + rax]
xor r12b, r12b
mov qword [rsp + 0x28], rdi
cmp sil, 0x39
ja 0x14004d384
cmp rdi, r13
jb 0x14004d50f
jne 0x14004d53f
cmp sil, 0x35
ja 0x14004d53f
mov rcx, rbx
call fcn.14004b010
mov rdx, qword [rbx + 0x28]
lea rax, [rdi + rdi*4]
movzx ecx, sil
inc ebp
sub ecx, 0x30
movzx esi, byte [rdx]
lea rdi, [rcx + rax*2]
mov qword [rsp + 0x28], rdi
cmp sil, 0x30
jge 0x14004d4f0
jmp 0x14004d3d8
xorps xmm6, xmm6
test rdi, rdi
js 0x14004d557
cvtsi2sd xmm6, rdi
mov r12b, 1
mov rax, rdx
jmp 0x14004d391
mov rax, rdi
mov rcx, rdi
and eax, 1
shr rcx, 1
or rcx, rax
mov r12b, 1
mov rax, rdx
cvtsi2sd xmm6, rcx
addsd xmm6, xmm6
jmp 0x14004d391
mov rax, rdi
mov rcx, rdi
shr rcx, 1
and eax, 1
or rcx, rax
cvtsi2sd xmm6, rcx
addsd xmm6, xmm6
movzx esi, byte [r9]
mov r12b, 1
mov r14, r13
cmp sil, 0x30
jge 0x14004d5f1
mov r13d, dword [rsp + 0x24]
cmp byte [rdx], 0x65
je 0x14004d5b5
cmp byte [rdx], 0x45
jne 0x14004d759
mov rcx, rbx
call fcn.14004b010
test r12b, r12b
jne 0x14004d67c
cmp byte [rsp + 0xc8], r15b
mov rcx, rdi
xorps xmm6, xmm6
cmove rcx, r14
test rcx, rcx
js 0x14004d664
cvtsi2sd xmm6, rcx
jmp 0x14004d679
mov r13d, r14d
mov rdx, rcx
mov r14, r13
cmp sil, 0x39
ja 0x14004d5a2
mov rcx, rbx
cmp ebp, 0x11
jge 0x14004d62d
dec dword [rsp + 0x24]
mulsd xmm6, xmm7
movzx eax, sil
sub eax, 0x30
movd xmm0, eax
lea eax, [rbp + 1]
cvtdq2pd xmm0, xmm0
addsd xmm0, xmm6
comisd xmm0, xmm8
movaps xmm6, xmm0
cmovbe eax, ebp
mov ebp, eax
call fcn.14004b010
mov rdx, qword [rbx + 0x28]
movzx esi, byte [rdx]
cmp sil, 0x30
jge 0x14004d5f1
jmp 0x14004d5a2
sub rcx, qword [rbx + 0x10]
mov rax, qword [rsp + 0xc0]
add rcx, qword [rbx + 0x38]
mov dword [rax + 0x30], select
mov qword [rax + 0x38], rcx
jmp 0x14004d89f
mov rax, rcx
and ecx, 1
shr rax, 1
or rax, rcx
cvtsi2sd xmm6, rax
addsd xmm6, xmm6
mov r12b, 1
mov rcx, qword [rbx + 0x28]
xor bpl, bpl
movzx esi, byte [rcx]
cmp sil, 0x2b
jne 0x14004d696
mov rcx, rbx
call fcn.14004b010
jmp 0x14004d6a7
cmp sil, 0x2d
jne 0x14004d6ae
mov rcx, rbx
call fcn.14004b010
mov bpl, 1
mov rcx, qword [rbx + 0x28]
movzx esi, byte [rcx]
lea eax, [rsi - 0x30]
cmp al, 9
ja 0x14004d7dc
mov rcx, rbx
call fcn.14004b010
mov rax, qword [rbx + 0x28]
movsx r15d, sil
sub r15d, 0x30
movzx esi, byte [rax]
test bpl, bpl
je 0x14004d799
lea ecx, [r13 + 0x7ffffff7]
mov eax, 0x66666667
imul ecx
mov ebp, edx
sar ebp, 2
mov eax, ebp
shr eax, 0x1f
add ebp, eax
cmp sil, 0x30
jl 0x14004d756
nop dword [rax]
cmp sil, 0x39
ja 0x14004d756
mov rcx, rbx
call fcn.14004b010
lea r15d, [r15 + r15*4]
movzx eax, sil
lea r15d, [r15 - 0x18]
lea r15d, [rax + r15*2]
cmp r15d, ebp
jle 0x14004d749
mov rax, qword [rbx + 0x28]
movzx ecx, byte [rax]
cmp cl, 0x30
jl 0x14004d749
nop
cmp cl, 0x39
ja 0x14004d749
mov rcx, rbx
call fcn.14004b010
mov rax, qword [rbx + 0x28]
movzx ecx, byte [rax]
cmp cl, 0x30
jge 0x14004d730
mov rax, qword [rbx + 0x28]
movzx esi, byte [rax]
cmp sil, 0x30
jge 0x14004d700
neg r15d
test r12b, r12b
je 0x14004d81f
lea edx, [r15 + r13]
movaps xmm0, xmm6
call fcn.140015810
comisd xmm0, xmmword [0x1400f9b60]
jbe 0x14004d7fc
mov rax, qword [rsp + 0xc0]
mov rcx, qword [rsp + 0x30]
mov dword [rax + 0x30], select
mov qword [rax + 0x38], rcx
jmp 0x14004d89f
mov ebp, 0x134
sub ebp, r13d
cmp sil, 0x30
jl 0x14004d759
cmp sil, 0x39
ja 0x14004d759
mov rcx, rbx
call fcn.14004b010
lea r15d, [r15 + r15*4]
movzx eax, sil
lea r15d, [r15 - 0x18]
lea r15d, [rax + r15*2]
cmp r15d, ebp
jg 0x14004d77c
mov rax, qword [rbx + 0x28]
movzx esi, byte [rax]
cmp sil, 0x30
jge 0x14004d7a7
jmp 0x14004d759
sub rcx, qword [rbx + 0x10]
mov rax, qword [rsp + 0xc0]
add rcx, qword [rbx + 0x38]
mov dword [rax + 0x30], setsockopt
mov qword [rax + 0x38], rcx
jmp 0x14004d89f
cmp byte [rsp + 0xd8], 0
je 0x14004d80d
xorps xmm0, xmmword [0x1400f9c10]
mov rcx, qword [rsp + 0xd0]
movaps xmm1, xmm0
call fcn.140017a60
jmp 0x14004d86e
cmp byte [rsp + 0xc8], 0
mov rcx, qword [rsp + 0xd0]
je 0x14004d852
cmp byte [rsp + 0xd8], 0
je 0x14004d848
neg rdi
mov rdx, rdi
call fcn.140017b50
jmp 0x14004d86e
mov rdx, rdi
call fcn.140017ac0
jmp 0x14004d86e
cmp byte [rsp + 0xd8], 0
mov edx, dword [rsp + 0x20]
je 0x14004d869
neg edx
call fcn.140017c60
jmp 0x14004d86e
call fcn.140017c00
test al, al
jne 0x14004d89f
mov rax, qword [rsp + 0xc0]
mov rcx, qword [rsp + 0x30]
mov dword [rax + 0x30], setsockopt
mov qword [rax + 0x38], rcx
jmp 0x14004d89f
sub rcx, qword [rbx + 0x10]
add rcx, qword [rbx + 0x38]
mov qword [rdx + 0x38], rcx
mov dword [rdx + 0x30], 3
mov r14, qword [rsp + 0x78]
movaps xmm6, xmmword [rsp + 0x60]
movaps xmm7, xmmword [rsp + 0x50]
movaps xmm8, xmmword [rsp + 0x40]
add rsp, 0x80
pop r15
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret