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

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x228
xor eax, eax
mov r10, rcx
mov rbx, rdx
test rcx, rcx
je 0x4078fa
mov rax, qword [rcx]
cmp rax, r8
jle 0x40792a
mov dl, byte [r10 + r8 + 0x10]
lea ecx, [rdx - 0x2b]
and cl, 0xfd
jne 0x40792a
movsd xmm1, qword [0x004480b8]
cmp dl, 0x2d
je 0x407921
movsd xmm1, qword [0x004480c0]
lea r9, [r8 + 1]
mov r11b, 1
jmp 0x407938
movsd xmm1, qword [0x004480c0]
mov r9, r8
xor r11d, r11d
lea rcx, [r9 + 2]
cmp rcx, rax
jge 0x4079d1
mov dl, byte [r10 + r9 + 0x10]
and edx, 0xffffffdf
cmp dl, 0x4e
je 0x40795c
cmp dl, 0x49
jne 0x4079d1
jmp 0x4079df
mov dl, byte [r10 + r9 + 0x11]
xor r12d, r12d
and edx, 0xffffffdf
cmp dl, 0x41
jne 0x407ddf
mov dl, byte [r10 + rcx + 0x10]
and edx, 0xffffffdf
cmp dl, 0x4e
jne 0x407ddf
add r9, 3
cmp r9, rax
jge 0x4079b4
mov al, byte [r10 + r9 + 0x10]
mov edx, eax
and edx, 0xffffffdf
sub edx, 0x41
cmp dl, 0x19
jbe 0x407ddf
lea edx, [rax - 0x30]
cmp dl, 9
jbe 0x407dcb
cmp al, 0x5f
je 0x407dcb
movsd xmm0, qword [0x004480c8]
xorps xmm1, xmm1
mulsd xmm0, xmm0
cvtsd2ss xmm0, xmm0
mulss xmm0, xmm1
cvtss2sd xmm0, xmm0
jmp 0x407a4a
or rcx, 0xffffffffffffffff
cmp r9, rax
jl 0x407a59
jmp 0x407a72
mov dl, byte [r10 + r9 + 0x11]
xor r12d, r12d
and edx, 0xffffffdf
cmp dl, 0x4e
jne 0x407ddf
mov dl, byte [r10 + rcx + 0x10]
and edx, 0xffffffdf
cmp dl, 0x46
jne 0x407ddf
add r9, 3
cmp r9, rax
jge 0x407a37
mov al, byte [r10 + r9 + 0x10]
mov edx, eax
and edx, 0xffffffdf
sub edx, 0x41
cmp dl, 0x19
jbe 0x407ddf
lea edx, [rax - 0x30]
cmp dl, 9
jbe 0x407dcb
cmp al, 0x5f
je 0x407dcb
movsd xmm0, qword [0x004480c0]
xorps xmm2, xmm2
divsd xmm0, xmm2
mulsd xmm0, xmm1
sub r9, r8
movsd qword [rbx], xmm0
mov r12, r9
jmp 0x407ddf
mov dl, byte [r10 + r9 + 0x10]
or rcx, 0xffffffffffffffff
lea esi, [rdx - 0x30]
cmp sil, 9
ja 0x407a72
movzx ecx, dl
sub rcx, 0x30
xor r13d, r13d
xor esi, esi
cmp r9, rax
jge 0x407b4c
movzx edx, byte [r10 + r9 + 0x10]
lea edi, [rdx - 0x30]
cmp dil, 9
ja 0x407aad
imul rsi, rsi, 0xa
inc r13
lea rsi, [rsi + rdx - 0x30]
inc r9
cmp r9, rax
je 0x407a77
cmp byte [r10 + r9 + 0x10], 0x5f
je 0x407a9b
jmp 0x407a77
cmp dl, 0x2e
jne 0x407b4c
inc r9
test r13, r13
jne 0x407ae9
xor edx, edx
mov r12, rdx
cmp r9, rax
jge 0x407aec
cmp byte [r10 + r9 + 0x10], 0x30
jne 0x407dd0
inc rdx
inc r9
cmp r9, rax
je 0x407ac0
cmp byte [r10 + r9 + 0x10], 0x5f
je 0x407ad7
jmp 0x407ac0
xor r12d, r12d
cmp rcx, 0xffffffffffffffff
jne 0x407b10
cmp r9, rax
jge 0x407b10
mov dl, byte [r10 + r9 + 0x10]
or rcx, 0xffffffffffffffff
lea edi, [rdx - 0x30]
cmp dil, 9
ja 0x407b10
movzx ecx, dl
sub rcx, 0x30
xor edx, edx
lea r14, [r12 + rdx]
mov rbp, rdx
cmp r9, rax
jge 0x407b51
movzx edi, byte [r10 + r9 + 0x10]
lea r15d, [rdi - 0x30]
cmp r15b, 9
ja 0x407b51
imul rsi, rsi, 0xa
inc rdx
lea rsi, [rsi + rdi - 0x30]
inc r9
cmp r9, rax
je 0x407b12
cmp byte [r10 + r9 + 0x10], 0x5f
je 0x407b3a
jmp 0x407b12
xor r14d, r14d
xor ebp, ebp
mov r12, r13
add r12, rbp
jne 0x407b74
cmp r9, r8
je 0x407ddf
lea rdx, [r8 + 1]
cmp rdx, r9
jne 0x407b74
test r11b, r11b
jne 0x407ddf
lea rdx, [r9 + 1]
cmp rdx, rax
jge 0x407bf9
mov r11b, byte [r10 + r9 + 0x10]
and r11d, 0xffffffdf
cmp r11b, 0x45
jne 0x407bf9
mov r11b, byte [r10 + rdx + 0x10]
cmp r11b, 0x2b
je 0x407ba3
or rdi, 0xffffffffffffffff
cmp r11b, 0x2d
je 0x407ba8
jmp 0x407bae
mov edi, 1
add r9, 2
jmp 0x407bb6
mov r9, rdx
mov edi, 1
mov dl, byte [r10 + r9 + 0x10]
sub edx, 0x30
cmp dl, 9
ja 0x407dcb
xor r11d, r11d
cmp r9, rax
jge 0x407c01
movzx r15d, byte [r10 + r9 + 0x10]
lea edx, [r15 - 0x30]
cmp dl, 9
ja 0x407c01
imul rdx, r11, 0xa
lea r11, [rdx + r15 - 0x30]
inc r9
cmp r9, rax
je 0x407bca
cmp byte [r10 + r9 + 0x10], 0x5f
je 0x407be7
jmp 0x407bca
mov edi, 1
xor r11d, r11d
imul r11, rdi
sub r11, r14
mov rax, r11
sar rax, 0x3f
mov rdi, rax
xor rdi, r11
sub rdi, rax
cmp rdi, 0x3e7
jg 0x407c29
cmp r12, 0xf
jg 0x407c3a
jmp 0x407c4e
xorps xmm0, xmm0
test r11, r11
jns 0x407a37
jmp 0x407a46
cmp r12, 0x10
jne 0x407cf9
cmp rcx, 8
jg 0x407cf9
cmp rdi, 0x16
jle 0x407c6d
mov eax, 0xf
sub rax, r13
sub rax, rbp
lea rdx, [rax + 0x16]
cmp rdx, rdi
jge 0x407cb0
jmp 0x407cf9
test rsi, rsi
js 0x407c79
cvtsi2sd xmm0, rsi
jmp 0x407c8e
mov rcx, rsi
and esi, 1
shr rcx, 1
or rcx, rsi
cvtsi2sd xmm0, rcx
addsd xmm0, xmm0
lea rax, [0x004479e0]
mulsd xmm0, xmm1
movsd xmm1, qword [rax + rdi*8]
test r11, r11
jns 0x407a46
divsd xmm0, xmm1
jmp 0x407a4a
test r11, r11
js 0x407cf9
sub r9, r8
mov r12, r9
test rsi, rsi
js 0x407cc7
cvtsi2sd xmm0, rsi
jmp 0x407cdc
mov rcx, rsi
and esi, 1
shr rcx, 1
or rcx, rsi
cvtsi2sd xmm0, rcx
addsd xmm0, xmm0
lea rcx, [0x004479e0]
mulsd xmm0, xmm1
sub rdi, rax
mulsd xmm0, qword [rcx + rax*8]
mulsd xmm0, qword [rcx + rdi*8]
jmp 0x407d95
lea r13, [rsp + 0x2c]
mov edx, 0x1f4
mov rcx, r13
call fcn.00402beb
xor eax, eax
sub r9, r8
mov r12, r9
test r10, r10
je 0x407d1b
mov rax, qword [r10]
xor ecx, ecx
cmp rax, r8
jle 0x407d4d
cmp byte [r10 + r8 + 0x10], 0x2e
jne 0x407d2d
inc r8
xor ecx, ecx
cmp r8, rax
jge 0x407d4d
mov dl, byte [r10 + r8 + 0x10]
lea r9d, [rdx - 0x2b]
and r9b, 0xfd
je 0x407d9b
lea r9d, [rdx - 0x30]
cmp r9b, 9
jbe 0x407d9b
mov rax, rdi
mov r8d, 0xa
sar r11, 0x3f
mov byte [rsp + rcx + 0x2c], 0x45
cqo
and r11d, 2
idiv r8
add r11d, 0x2b
mov byte [rsp + rcx + 0x2d], r11b
add edx, 0x30
mov byte [rsp + rcx + 0x30], dl
cqo
idiv r8
add edx, 0x30
add eax, 0x30
mov byte [rsp + rcx + 0x2f], dl
xor edx, edx
mov byte [rsp + rcx + 0x2e], al
mov rcx, r13
call fcn.0043eec0
movsd qword [rbx], xmm0
jmp 0x407ddf
cmp rcx, 0x1ed
jg 0x407dab
mov byte [rsp + rcx + 0x2c], dl
inc rcx
inc r8
cmp r8, rax
je 0x407d2f
mov dl, byte [r10 + r8 + 0x10]
cmp dl, 0x2e
je 0x407dab
cmp dl, 0x5f
je 0x407dab
jmp 0x407d2f
xor r12d, r12d
jmp 0x407ddf
cmp rcx, 0xffffffffffffffff
jne 0x407b10
jmp 0x407af7
mov rax, r12
add rsp, 0x228
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret