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

Disassembly:
mov r11, rsp
push rbp
lea rbp, [r11 - 0x5f]
sub rsp, 0xa0
movzx eax, byte [rdx]
mov r9, rcx
mov qword [r11 - 0x10], rbx
mov rbx, r8
xor r8d, r8d
mov qword [r11 - 0x20], rdi
mov qword [rbp + 0x7f], rcx
mov rdi, rdx
mov qword [rbp - 0x21], r8
mov qword [rbp - 0x29], rcx
test al, al
je 0x18001c479
mov qword [r11 - 0x18], rsi
lea rsi, [0x180000000]
mov qword [r11 - 0x38], r14
lea r14d, [r8 + 0x10]
mov qword [r11 - 0x40], r15
lea r15, [0x1800499a8]
mov qword [r11 - 0x28], r12
mov qword [r11 - 0x30], r13
mov dword [rbp + 0x6f], 0x41
inc rdi
cmp al, 0x25
je 0x18001c1a7
test r9, r9
je 0x18001c2db
mov byte [r8 + r9], al
inc r8
mov qword [rbp - 0x21], r8
jmp case.0x18001c2b2.47
xor r13b, r13b
xor eax, eax
cmp byte [rdi], 0x30
mov r11d, 2
mov qword [rbp - 0x15], rax
mov qword [rbp - 0x11], 2
mov byte [rbp + 0x67], r13b
mov byte [rbp - 0x19], r13b
mov dword [rbp + 0x77], r11d
jne 0x18001c20e
movzx edx, byte [rdi + 1]
inc rdi
xor ecx, ecx
mov r10, rdi
test dl, dl
je 0x18001c20e
nop
lea eax, [rdx - 0x30]
cmp al, 9
ja 0x18001c1fd
inc rdi
movsx eax, dl
lea ecx, [rcx + rcx*4]
lea ecx, [rcx - 0x18]
movzx edx, byte [rdi]
lea ecx, [rax + rcx*2]
test dl, dl
jne 0x18001c1e0
mov r12d, dword [rbp - 0x15]
cmp rdi, r10
cmovne r12d, ecx
mov dword [rbp - 0x15], r12d
jmp 0x18001c212
mov r12d, dword [rbp - 0x15]
cmp byte [rdi], 0x2e
jne 0x18001c25c
movzx edx, byte [rdi + 1]
inc rdi
xor ecx, ecx
mov r10, rdi
test dl, dl
je 0x18001c45a
nop dword [rax + rax]
lea eax, [rdx - 0x30]
cmp al, 9
ja 0x18001c24d
inc rdi
movsx eax, dl
lea ecx, [rcx + rcx*4]
lea ecx, [rcx - 0x18]
movzx edx, byte [rdi]
lea ecx, [rax + rcx*2]
test dl, dl
jne 0x18001c230
cmp rdi, r10
cmovne r11d, ecx
mov dword [rbp + 0x77], r11d
mov dword [rbp - 0x11], r11d
movzx ecx, byte [rdi]
test cl, cl
je 0x18001c45a
xor edx, edx
xor eax, eax
cmp cl, 0x6c
jne 0x18001c281
cmp eax, 2
jge 0x18001c281
inc rdi
inc eax
inc edx
cmp byte [rdi], 0x6c
je 0x18001c270
movzx eax, byte [rdi]
test al, al
je 0x18001c45a
movsx eax, al
inc rdi
add eax, 0xffffffdb
cmp eax, 0x53
ja case.0x18001c2b2.47
cdqe
movzx eax, byte [rsi + rax + 0x1c754]
mov ecx, dword [rsi + rax*4 + 0x1c728]
add rcx, rsi
jmp rcx
test r9, r9
je 0x18001c2be
mov byte [r8 + r9], 0x25
inc r8
mov qword [rbp - 0x21], r8
jmp case.0x18001c2b2.47
add rbx, 8
test r9, r9
je 0x18001c2db
movzx eax, byte [rbx - 8]
mov byte [r8 + r9], al
inc r8
mov qword [rbp - 0x21], r8
jmp case.0x18001c2b2.47
mov rax, qword [rbx]
lea rdx, [0x1800499a0]
add rbx, 8
test rax, rax
cmovne rdx, rax
test r9, r9
je 0x18001c31e
mov r10, r8
mov rcx, rdx
sub r10, rdx
add r10, r9
nop dword [rax]
movzx eax, byte [rcx]
mov byte [r10 + rcx], al
inc rcx
test al, al
jne 0x18001c310
or rax, 0xffffffffffffffff
inc rax
cmp byte [rdx + rax], 0
jne 0x18001c322
add r8, rax
mov qword [rbp - 0x21], r8
jmp case.0x18001c2b2.47
add rbx, 8
mov r8d, dword [rbx - 8]
lea rdx, [rbp - 0x19]
lea rcx, [rbp - 0x29]
call fcn.18001c7b0
mov r9, qword [rbp - 0x29]
mov r8, qword [rbp - 0x21]
mov qword [rbp + 0x7f], r9
jmp case.0x18001c2b2.47
sub edx, 1
je 0x18001c371
add rbx, 8
cmp edx, 1
jne 0x18001c375
mov r11, qword [rbx - 8]
jmp 0x18001c379
add rbx, 8
movsxd r11, dword [rbx - 8]
test r11, r11
jns 0x18001c384
neg r11
mov r13b, 1
movzx r15d, byte [rbp - 0xc]
xor esi, esi
xor r10d, r10d
mov r14d, 0xa
cmp byte [rbp - 0xd], sil
mov eax, 0x10
cmovne r14d, eax
xor edx, edx
mov rax, r11
div r14
mov rcx, r10
mov r11, rax
cmp edx, 0xa
jge 0x18001c3b9
add dl, 0x30
jmp 0x18001c3cd
test r15b, r15b
mov eax, 0x61
cmovne eax, dword [rbp + 0x6f]
sub dl, 0xa
add al, dl
movzx edx, al
mov byte [rbp + r10 - 9], dl
inc esi
inc r10
test r11, r11
jne 0x18001c3a1
test r13b, r13b
je 0x18001c3f2
test r9, r9
je 0x18001c3eb
mov byte [r8 + r9], 0x2d
inc r8
mov qword [rbp - 0x21], r8
cmp r12d, esi
jle 0x18001c419
sub r12d, esi
test r12d, r12d
jle 0x18001c419
mov eax, r12d
test r9, r9
je 0x18001c40c
mov byte [r8 + r9], 0x30
inc r8
sub rax, 1
jne 0x18001c402
mov qword [rbp - 0x21], r8
test rcx, rcx
js 0x18001c43b
nop
test r9, r9
je 0x18001c42e
movzx eax, byte [rbp + rcx - 9]
mov byte [r8 + r9], al
inc r8
sub rcx, 1
jns 0x18001c420
mov qword [rbp - 0x21], r8
lea rsi, [0x180000000]
mov r14d, 0x10
lea r15, [0x1800499a8]
movzx eax, byte [rdi]
test al, al
jne 0x18001c187
mov r13, qword [rsp + 0x78]
mov r12, qword [rsp + 0x80]
mov r14, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x90]
mov r15, qword [rsp + 0x68]
mov rdi, qword [rsp + 0x88]
lea rax, [r8 + 1]
mov rbx, qword [rsp + 0x98]
test r9, r9
je 0x18001c497
mov byte [r8 + r9], 0
add rsp, 0xa0
pop rbp
ret
mov dword [rbp - 0x15], r14d
test r9, r9
je 0x18001c4cf
mov rax, r8
mov rcx, r15
sub rax, r15
lea r10, [rax + r9]
nop word [rax + rax]
movzx eax, byte [rcx]
mov byte [r10 + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x18001c4c0
add r8, 2
mov qword [rbp - 0x21], r8
mov byte [rbp - 0xc], 1
mov byte [rbp - 0xd], 1
sub edx, 1
je 0x18001c337
add rbx, 8
cmp edx, 1
jne 0x18001c33b
mov r8, qword [rbx - 8]
jmp 0x18001c33f
movsd xmm1, qword [rbx]
add rbx, 8
mov ecx, 1
test r11d, r11d
jle 0x18001c51e
mov eax, r11d
lea ecx, [rcx + rcx*4]
add ecx, ecx
sub rax, 1
jne 0x18001c513
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
cvttsd2si eax, xmm0
cdq
idiv ecx
cvttsd2si eax, xmm1
movsxd r13, edx
movsxd r11, eax
test eax, eax
jns 0x18001c546
neg r11
mov byte [rbp + 0x67], 1
xor esi, esi
xor r10d, r10d
cmp byte [rbp - 0xd], sil
mov r15d, 0xa
cmovne r15, r14
movzx r14d, byte [rbp - 0xc]
nop
xor edx, edx
mov rax, r11
div r15
mov rcx, r10
mov r11, rax
cmp edx, 0xa
jge 0x18001c578
add dl, 0x30
jmp 0x18001c58c
test r14b, r14b
mov eax, 0x61
cmovne eax, dword [rbp + 0x6f]
sub dl, 0xa
add al, dl
movzx edx, al
mov byte [rbp + r10 - 9], dl
inc esi
inc r10
test r11, r11
jne 0x18001c560
cmp byte [rbp + 0x67], r11b
je 0x18001c5b2
test r9, r9
je 0x18001c5ab
mov byte [r8 + r9], 0x2d
inc r8
mov qword [rbp - 0x21], r8
cmp r12d, esi
jle 0x18001c5d9
sub r12d, esi
test r12d, r12d
jle 0x18001c5d9
mov eax, r12d
test r9, r9
je 0x18001c5cc
mov byte [r8 + r9], 0x30
inc r8
sub rax, 1
jne 0x18001c5c2
mov qword [rbp - 0x21], r8
test rcx, rcx
js 0x18001c5fb
nop
test r9, r9
je 0x18001c5ee
movzx eax, byte [rbp + rcx - 9]
mov byte [r8 + r9], al
inc r8
sub rcx, 1
jns 0x18001c5e0
mov qword [rbp - 0x21], r8
cmp dword [rbp + 0x77], 0
je 0x18001c43b
test r9, r9
je 0x18001c60f
mov byte [r8 + r9], 0x2e
xor r11d, r11d
mov dword [rbp - 0x15], 0
inc r8
mov rsi, r13
mov qword [rbp - 0x21], r8
xor r10d, r10d
lea r9d, [r11 + 0x41]
nop word [rax + rax]
xor edx, edx
mov rax, rsi
div r15
mov rcx, r10
mov rsi, rax
cmp edx, 0xa
jge 0x18001c648
add dl, 0x30
jmp 0x18001c65c
test r14b, r14b
mov eax, 0x61
cmovne eax, r9d
sub dl, 0xa
add al, dl
movzx edx, al
mov byte [rbp + r10 - 9], dl
inc r11d
inc r10
test rsi, rsi
jne 0x18001c630
mov r9, qword [rbp + 0x7f]
cmp byte [rbp + 0x67], sil
je 0x18001c687
test r9, r9
je 0x18001c680
mov byte [r8 + r9], 0x2d
inc r8
mov qword [rbp - 0x21], r8
test r11d, r11d
jns 0x18001c6ae
neg r11d
test r11d, r11d
jle 0x18001c6ae
mov eax, r11d
test r9, r9
je 0x18001c6a1
mov byte [r8 + r9], 0x30
inc r8
sub rax, 1
jne 0x18001c697
mov qword [rbp - 0x21], r8
test rcx, rcx
js 0x18001c43b
test r9, r9
je 0x18001c6c5
movzx eax, byte [rbp + rcx - 9]
mov byte [r8 + r9], al
inc r8
sub rcx, 1
jns 0x18001c6b7
jmp 0x18001c437
mov rdx, qword [rbx]
add rbx, 8
test rdx, rdx
je 0x18001c6e8
mov rdx, qword [rdx + 0x10]
test rdx, rdx
jne 0x18001c6ef
lea rdx, [0x1800499a0]
test r9, r9
je 0x18001c70e
mov r10, r8
mov rcx, rdx
sub r10, rdx
add r10, r9
movzx eax, byte [rcx]
mov byte [r10 + rcx], al
inc rcx
test al, al
jne 0x18001c700
or rax, 0xffffffffffffffff
inc rax
cmp byte [rdx + rax], 0
jne 0x18001c712
add r8, rax
mov qword [rbp - 0x21], r8
jmp case.0x18001c2b2.47