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

Disassembly:
mov qword [rsp + 0x18], r8
push rbx
push rbp
push rdi
push r13
push r14
push r15
sub rsp, 0x68
mov rax, qword [rdx + 0x28]
mov r13, rcx
movaps xmmword [rsp + 0x50], xmm6
mov rcx, rax
sub rcx, qword [rdx + 0x10]
mov rbx, rdx
add rcx, qword [rdx + 0x38]
xorps xmm6, xmm6
cmp byte [rax], 0x2d
movaps xmmword [rsp + 0x40], xmm7
xorps xmm7, xmm7
movaps xmmword [rsp + 0x30], xmm8
mov qword [rsp + 0x20], rcx
jne 0x140030464
mov rcx, rdx
call fcn.14002fd40
mov r15b, 1
jmp 0x140030467
xor r15b, r15b
mov rax, qword [rbx + 0x28]
xor r14d, r14d
movsd xmm8, qword [0x1400c2240]
mov edi, r14d
mov qword [rsp + 0xa0], rsi
mov ebp, r14d
mov byte [rsp + 0xb8], r15b
movzx ecx, byte [rax]
mov qword [rsp + 0x60], r12
mov byte [rsp + 0xa8], dil
cmp cl, 0x30
jne 0x1400304b5
mov rcx, rbx
mov esi, r14d
call fcn.14002fd40
xor r12b, r12b
jmp 0x140030672
sub cl, 0x31
cmp cl, 8
ja 0x140030ba3
mov rcx, rbx
call fcn.14002fd40
mov rcx, qword [rbx + 0x28]
movsx esi, al
sub esi, 0x30
movzx eax, byte [rcx]
test r15b, r15b
je 0x140030518
cmp al, 0x30
jl 0x14003055f
cmp al, 0x39
ja 0x14003055f
cmp esi, 0xccccccc
jb 0x1400304f5
jne 0x140030555
cmp al, 0x38
ja 0x140030555
mov rcx, rbx
call fcn.14002fd40
movsx ecx, al
lea esi, [rsi + rsi*4]
lea esi, [rsi - 0x18]
inc ebp
lea esi, [rcx + rsi*2]
mov rcx, qword [rbx + 0x28]
movzx eax, byte [rcx]
cmp al, 0x30
jge 0x1400304e3
jmp 0x14003055f
cmp al, 0x30
jl 0x14003055f
nop dword [rax]
cmp al, 0x39
ja 0x14003055f
cmp esi, 0x19999999
jb 0x140030532
jne 0x140030555
cmp al, 0x35
ja 0x140030555
mov rcx, rbx
call fcn.14002fd40
movsx ecx, al
lea esi, [rsi + rsi*4]
lea esi, [rsi - 0x18]
inc ebp
lea esi, [rcx + rsi*2]
mov rcx, qword [rbx + 0x28]
movzx eax, byte [rcx]
cmp al, 0x30
jge 0x140030520
jmp 0x14003055f
mov byte [rsp + 0xa8], 1
mov edi, esi
xor r12b, r12b
cmp byte [rsp + 0xa8], r12b
je 0x140030672
cmp byte [rcx], 0x30
jl 0x140030672
movzx eax, byte [rcx]
test r15b, r15b
je 0x1400305e0
movabs r15, 0xccccccccccccccc
nop dword [rax + rax]
cmp al, 0x39
ja 0x140030672
cmp rdi, r15
jb 0x1400305a3
jne 0x1400305cb
cmp al, 0x38
ja 0x1400305cb
mov rcx, rbx
call fcn.14002fd40
movsx ecx, al
inc ebp
sub ecx, 0x30
lea rax, [rdi + rdi*4]
lea rdi, [rcx + rax*2]
mov rcx, qword [rbx + 0x28]
movzx eax, byte [rcx]
cmp al, 0x30
jge 0x140030590
jmp 0x140030672
mov rdx, rdi
mov r12b, 1
xorps xmm6, xmm6
test rdx, rdx
js 0x140030627
cvtsi2sd xmm6, rdx
jmp 0x14003063c
movabs r15, 0x1999999999999999
nop word [rax + rax]
mov rdx, rdi
cmp al, 0x39
ja 0x140030672
cmp rdi, r15
jb 0x140030602
jne 0x1400305ce
cmp al, 0x35
ja 0x1400305ce
mov rcx, rbx
call fcn.14002fd40
movsx ecx, al
inc ebp
sub ecx, 0x30
lea rax, [rdi + rdi*4]
lea rdi, [rcx + rax*2]
mov rcx, qword [rbx + 0x28]
movzx eax, byte [rcx]
cmp al, 0x30
jge 0x1400305f0
jmp 0x140030672
mov rax, rdx
and edx, 1
shr rax, 1
or rax, rdx
cvtsi2sd xmm6, rax
addsd xmm6, xmm6
cmp byte [rcx], 0x30
jl 0x140030672
movzx eax, byte [rcx]
cmp al, 0x39
ja 0x140030672
mov rcx, rbx
call fcn.14002fd40
movsx ecx, al
mov rax, qword [rbx + 0x28]
sub ecx, 0x30
mulsd xmm6, xmm8
movzx eax, byte [rax]
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
addsd xmm6, xmm0
cmp al, 0x30
jge 0x140030644
mov rdx, qword [rbx + 0x28]
mov r15d, r14d
cmp byte [rdx], 0x2e
jne 0x14003073c
mov rcx, rbx
call fcn.14002fd40
mov rcx, qword [rbx + 0x28]
movzx r8d, byte [rcx]
lea eax, [r8 - 0x30]
cmp al, 9
ja 0x1400307d2
test r12b, r12b
jne 0x14003077d
cmp byte [rsp + 0xa8], r14b
jne 0x1400306b3
mov edi, esi
mov rax, rcx
movabs r12, 0x1fffffffffffff
mov r9, rcx
mov rdx, rax
cmp r8b, 0x39
ja 0x140030708
cmp rdi, r12
ja 0x140030708
mov rcx, rbx
call fcn.14002fd40
movsx ecx, al
dec r15d
sub ecx, 0x30
lea rax, [rdi + rdi*4]
lea rdi, [rcx + rax*2]
test rdi, rdi
je 0x1400306f1
inc ebp
mov rcx, qword [rbx + 0x28]
mov rax, rcx
mov r9, rcx
mov rdx, rcx
movzx r8d, byte [rcx]
cmp r8b, 0x30
jge 0x1400306c0
xorps xmm6, xmm6
test rdi, rdi
js 0x140030717
cvtsi2sd xmm6, rdi
jmp 0x14003072f
mov rax, rdi
mov rcx, rdi
shr rcx, 1
and eax, 1
or rcx, rax
cvtsi2sd xmm6, rcx
addsd xmm6, xmm6
movzx r8d, byte [r9]
mov r12b, 1
cmp r8b, 0x30
jge 0x140030780
movzx eax, byte [rdx]
cmp al, 0x65
je 0x14003074b
cmp al, 0x45
jne 0x1400308da
mov rcx, rbx
call fcn.14002fd40
test r12b, r12b
jne 0x140030803
mov rcx, rdi
cmp byte [rsp + 0xa8], r14b
jne 0x14003076b
mov ecx, esi
xorps xmm6, xmm6
test rcx, rcx
js 0x1400307eb
cvtsi2sd xmm6, rcx
jmp 0x140030800
mov rdx, rcx
cmp r8b, 0x39
ja 0x14003073c
mov rcx, rbx
cmp ebp, 0x11
jge 0x1400307ba
call fcn.14002fd40
mulsd xmm6, xmm8
dec r15d
movsx ecx, al
sub ecx, 0x30
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
addsd xmm0, xmm6
comisd xmm0, xmm7
movaps xmm6, xmm0
jbe 0x1400307bf
inc ebp
jmp 0x1400307bf
call fcn.14002fd40
mov rdx, qword [rbx + 0x28]
movzx r8d, byte [rdx]
cmp r8b, 0x30
jge 0x140030780
jmp 0x14003073c
sub rcx, qword [rbx + 0x10]
add rcx, qword [rbx + 0x38]
mov qword [r13 + 0x38], rcx
mov dword [r13 + 0x30], 0xe
jmp 0x140030bb7
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 eax, byte [rcx]
cmp al, 0x2b
jne 0x14003081b
mov rcx, rbx
call fcn.14002fd40
jmp 0x14003082a
cmp al, 0x2d
jne 0x140030831
mov rcx, rbx
call fcn.14002fd40
mov bpl, 1
mov rcx, qword [rbx + 0x28]
movzx eax, byte [rcx]
sub al, 0x30
cmp al, 9
ja 0x1400309e0
mov rcx, rbx
call fcn.14002fd40
movsx r14d, al
mov rax, qword [rbx + 0x28]
sub r14d, 0x30
movzx r8d, byte [rax]
test bpl, bpl
je 0x140030983
lea ecx, [r15 + 0x7ffffff7]
mov eax, 0x66666667
imul ecx
mov ebp, edx
sar ebp, 2
mov eax, ebp
shr eax, 0x1f
add ebp, eax
cmp r8b, 0x30
jl 0x1400308d7
nop dword [rax]
cmp r8b, 0x39
ja 0x1400308d7
mov rcx, rbx
call fcn.14002fd40
lea r14d, [r14 + r14*4]
movsx ecx, al
lea r14d, [r14 - 0x18]
lea r14d, [rcx + r14*2]
cmp r14d, ebp
jle 0x1400308c9
mov rax, qword [rbx + 0x28]
movzx ecx, byte [rax]
cmp cl, 0x30
jl 0x1400308c9
nop
cmp cl, 0x39
ja 0x1400308c9
mov rcx, rbx
call fcn.14002fd40
mov rax, qword [rbx + 0x28]
movzx ecx, byte [rax]
cmp cl, 0x30
jge 0x1400308b0
mov rax, qword [rbx + 0x28]
movzx r8d, byte [rax]
cmp r8b, 0x30
jge 0x140030880
neg r14d
test r12b, r12b
je 0x140030a1f
lea ecx, [r14 + r15]
cmp ecx, 0xfffffecc
jge 0x1400309f8
divsd xmm6, qword [0x1400c2248]
lea eax, [rcx + 0x134]
cmp eax, 0xfffffecc
jl 0x140030924
movsxd rax, ecx
lea rax, [rax*8 + 0x9a0]
lea rcx, [0x1400b8210]
movaps xmm7, xmm6
sub rcx, rax
divsd xmm7, qword [rcx]
comisd xmm7, xmmword [0x1400c2250]
ja 0x1400309ce
cmp byte [rsp + 0xb8], 0
je 0x140030943
xorps xmm7, xmmword [0x1400c2370]
mov rbx, qword [rsp + 0xb0]
mov rax, qword [rbx + 0x40]
sub rax, qword [rbx + 0x38]
cmp rax, 0x10
jge 0x140030962
lea rcx, [rbx + 0x20]
call fcn.140036fa0
mov rcx, qword [rbx + 0x38]
xorps xmm0, xmm0
lea rax, [rcx + 0x10]
mov qword [rbx + 0x38], rax
movups xmmword [rcx], xmm0
mov word [rcx + 0xe], 0x216
movsd qword [rcx], xmm7
jmp 0x140030bb7
mov ebp, 0x134
sub ebp, r15d
cmp r8b, 0x30
jl 0x1400308da
cmp r8b, 0x39
ja 0x1400308da
mov rcx, rbx
call fcn.14002fd40
lea r14d, [r14 + r14*4]
movsx ecx, al
lea r14d, [r14 - 0x18]
lea r14d, [rcx + r14*2]
cmp r14d, ebp
jg 0x1400309ce
mov rax, qword [rbx + 0x28]
movzx r8d, byte [rax]
cmp r8b, 0x30
jge 0x140030995
jmp 0x1400308da
mov rax, qword [rsp + 0x20]
mov dword [r13 + 0x30], 0xd
jmp 0x140030bb3
mov rax, qword [rbx + 0x38]
sub rax, qword [rbx + 0x10]
add rax, rcx
mov dword [r13 + 0x30], 0xf
jmp 0x140030bb3
movsxd rax, ecx
lea rax, [rax*8]
test ecx, ecx
js 0x140030913
lea rcx, [0x1400b8210]
movaps xmm7, xmm6
mulsd xmm7, qword [rax + rcx]
jmp 0x140030924
mov rbx, qword [rsp + 0xb0]
add rbx, 0x20
mov rax, qword [rbx + 0x20]
sub rax, qword [rbx + 0x18]
cmp byte [rsp + 0xa8], 0
je 0x140030b1e
cmp byte [rsp + 0xb8], 0
je 0x140030ab3
neg rdi
cmp rax, 0x10
jge 0x140030a5c
mov rcx, rbx
call fcn.140036fa0
mov rcx, qword [rbx + 0x18]
xorps xmm0, xmm0
lea rax, [rcx + 0x10]
mov qword [rbx + 0x18], rax
movups xmmword [rcx], xmm0
mov qword [rcx], rdi
mov word [rcx + 0xe], 0x96
test rdi, rdi
js 0x140030a9b
movabs rdx, 0xffffffff00000000
mov eax, 0x196
mov word [rcx + 0xe], ax
test rdx, rdi
jne 0x140030b04
mov eax, 0x1d6
jmp 0x140030b00
cmp rdi, 0xffffffff80000000
jl 0x140030bb7
mov word [rcx + 0xe], 0xb6
jmp 0x140030bb7
cmp rax, 0x10
jge 0x140030ac1
mov rcx, rbx
call fcn.140036fa0
mov rcx, qword [rbx + 0x18]
xorps xmm0, xmm0
lea rax, [rcx + 0x10]
mov qword [rbx + 0x18], rax
mov eax, 0x116
movups xmmword [rcx], xmm0
mov word [rcx + 0xe], ax
mov qword [rcx], rdi
test rdi, rdi
js 0x140030aed
mov eax, 0x196
mov word [rcx + 0xe], ax
movabs rdx, 0xffffffff00000000
test rdx, rdi
jne 0x140030b04
or ax, 0x40
mov word [rcx + 0xe], ax
test rdi, 0xffffffff80000000
jne 0x140030bb7
or ax, 0x20
mov word [rcx + 0xe], ax
jmp 0x140030bb7
cmp byte [rsp + 0xb8], 0
je 0x140030b66
neg esi
cmp rax, 0x10
jge 0x140030b38
mov rcx, rbx
call fcn.140036fa0
mov rcx, qword [rbx + 0x18]
xorps xmm0, xmm0
test esi, esi
mov edx, 0x1f6
lea rax, [rcx + 0x10]
mov qword [rbx + 0x18], rax
movsxd rax, esi
movups xmmword [rcx], xmm0
mov qword [rcx], rax
mov eax, 0xb6
cmovns ax, dx
mov word [rcx + 0xe], ax
jmp 0x140030bb7
cmp rax, 0x10
jge 0x140030b74
mov rcx, rbx
call fcn.140036fa0
mov rcx, qword [rbx + 0x18]
xorps xmm0, xmm0
lea rax, [rcx + 0x10]
mov qword [rbx + 0x18], rax
mov eax, esi
shr esi, 0x1a
not si
movups xmmword [rcx], xmm0
mov qword [rcx], rax
and si, 0x20
mov eax, 0x1d6
or si, ax
mov word [rcx + 0xe], si
jmp 0x140030bb7
sub rax, qword [rbx + 0x10]
add rax, qword [rbx + 0x38]
mov dword [r13 + 0x30], 3
mov qword [r13 + 0x38], rax
mov r12, qword [rsp + 0x60]
mov rsi, qword [rsp + 0xa0]
movaps xmm6, xmmword [rsp + 0x50]
movaps xmm7, xmmword [rsp + 0x40]
movaps xmm8, xmmword [rsp + 0x30]
add rsp, 0x68
pop r15
pop r14
pop r13
pop rdi
pop rbp
pop rbx
ret