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

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x40
mov r15, r8
xor r10d, r10d
mov rdi, rdx
mov qword [rbp + 0x50], r10
mov rbx, r9
xor esi, esi
xor r9d, r9d
xor r11d, r11d
movzx edx, byte [r15]
xor r12d, r12d
inc r15
mov dword [rbp + 0x40], r9d
or r14d, 0xffffffff
mov dword [rbp + 0x48], r9d
xor r8d, r8d
mov r13, rcx
test rcx, rcx
jne 0x14005d142
xor edi, edi
test dl, dl
je 0x14005d758
lea r9, [0x140000000]
cmp r8d, 6
ja case.default.0x14005d169
movsxd rax, r8d
mov ecx, dword [r9 + rax*4 + 0x5d7c4]
add rcx, r9
jmp rcx
cmp dl, 0x25
jne 0x14005d182
movzx edx, byte [r15]
mov r8d, 1
inc r15
jmp case.default.0x14005d169
lea rax, [r10 + 1]
cmp rax, rdi
jae 0x14005d18f
mov byte [r10 + r13], dl
movzx edx, byte [r15]
mov r10, rax
inc r15
mov qword [rbp + 0x50], rax
jmp case.default.0x14005d169
movsx eax, dl
add eax, 0xffffffe0
cmp eax, 0x10
ja case.0x14005d1ba.33
cdqe
mov ecx, dword [r9 + rax*4 + 0x5d7e0]
add rcx, r9
jmp rcx
movzx edx, byte [r15]
or r11d, 1
inc r15
jmp case.default.0x14005d169
movzx edx, byte [r15]
or r11d, 2
inc r15
jmp case.default.0x14005d169
movzx edx, byte [r15]
or r11d, 4
inc r15
jmp case.default.0x14005d169
movzx edx, byte [r15]
or r11d, 8
inc r15
jmp case.default.0x14005d169
movzx edx, byte [r15]
or r11d, 0x10
inc r15
jmp case.default.0x14005d169
movzx edx, byte [r15]
or r11d, 0x20
inc r15
jmp case.default.0x14005d169
mov r8d, 2
jmp case.default.0x14005d169
lea eax, [rdx - 0x30]
cmp al, 9
ja 0x14005d26b
add dl, 0xd0
mov ecx, 0x7fffffff
movsx r9d, dl
mov eax, 0x66666667
sub ecx, r9d
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp r12d, edx
jg 0x14005d764
movzx edx, byte [r15]
lea eax, [r12 + r12*4]
lea r12d, [r9 + rax*2]
inc r15
jmp case.default.0x14005d169
cmp dl, 0x2a
jne 0x14005d28a
mov r12d, dword [rbx]
add rbx, 8
test r12d, r12d
jns 0x14005d283
or r11d, 1
neg r12d
movzx edx, byte [r15]
inc r15
mov r8d, 3
jmp case.default.0x14005d169
cmp dl, 0x2e
jne 0x14005d2ac
movzx edx, byte [r15]
mov r8d, 4
inc r15
jmp case.default.0x14005d169
mov r8d, 5
jmp case.default.0x14005d169
xor eax, eax
cmp r14d, 0xffffffff
cmovne eax, r14d
mov r14d, eax
lea eax, [rdx - 0x30]
cmp al, 9
ja 0x14005d308
add dl, 0xd0
mov ecx, 0x7fffffff
movsx r9d, dl
mov eax, 0x66666667
sub ecx, r9d
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp r14d, edx
jg 0x14005d764
movzx edx, byte [r15]
lea eax, [r14 + r14*4]
lea r14d, [r9 + rax*2]
inc r15
jmp case.default.0x14005d169
mov r8d, 5
cmp dl, 0x2a
jne case.default.0x14005d169
mov r14d, dword [rbx]
add rbx, 8
movzx edx, byte [r15]
test r14d, r14d
mov eax, 0xffffffff
cmovs r14d, eax
inc r15
jmp case.default.0x14005d169
movsx eax, dl
add eax, 0xffffffb4
cmp eax, 0x2e
ja case.0x14005d35b.82
cdqe
movzx eax, byte [r9 + rax + 0x5d840]
mov ecx, dword [r9 + rax*4 + 0x5d824]
add rcx, r9
jmp rcx
movzx edx, byte [r15]
inc r15
cmp dl, 0x68
jne 0x14005d37e
movzx edx, byte [r15]
mov esi, 1
inc r15
lea r8d, [rsi + 5]
jmp case.default.0x14005d169
mov esi, 2
lea r8d, [rsi + 4]
jmp case.default.0x14005d169
movzx edx, byte [r15]
inc r15
cmp dl, 0x6c
jne 0x14005d3ad
movzx edx, byte [r15]
mov esi, 4
inc r15
lea r8d, [rsi + 2]
jmp case.default.0x14005d169
mov esi, 3
lea r8d, [rsi + 3]
jmp case.default.0x14005d169
movzx edx, byte [r15]
mov esi, 5
inc r15
lea r8d, [rsi + 1]
jmp case.default.0x14005d169
movzx edx, byte [r15]
mov esi, 8
inc r15
lea r8d, [rsi - 2]
jmp case.default.0x14005d169
movzx edx, byte [r15]
mov esi, 7
inc r15
lea r8d, [rsi - 1]
jmp case.default.0x14005d169
movzx edx, byte [r15]
mov esi, 6
inc r15
mov r8d, 6
jmp case.default.0x14005d169
movsx eax, dl
add eax, 0xffffffdb
cmp eax, 0x53
ja case.0x14005d436.53
cdqe
movzx eax, byte [r9 + rax + 0x5d8b4]
mov ecx, dword [r9 + rax*4 + 0x5d870]
add rcx, r9
jmp rcx
lea eax, [rsi - 1]
cmp eax, 7
ja case.0x14005d44d.3
cdqe
mov ecx, dword [r9 + rax*4 + 0x5d908]
add rcx, r9
jmp rcx
movsx r9, byte [rbx]
add rbx, 8
jmp 0x14005d473
movsx r9, word [rbx]
add rbx, 8
jmp 0x14005d473
mov r9, qword [rbx]
add rbx, 8
jmp 0x14005d473
movsxd r9, dword [rbx]
add rbx, 8
mov dword [rsp + 0x38], r11d
mov dword [rsp + 0x30], r14d
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], 0xa
mov r8, rdi
lea rdx, [rbp + 0x50]
mov rcx, r13
call fcn.14005da70
mov r10, qword [rbp + 0x50]
jmp case.0x14005d436.53
or r11d, 0x40
mov edx, 0x10
jmp 0x14005d4b9
mov edx, 8
jmp 0x14005d4b9
mov edx, 0xa
bts r11d, 7
lea eax, [rsi - 1]
cmp eax, 7
ja case.0x14005d4d3.3
cdqe
mov ecx, dword [r9 + rax*4 + 0x5d928]
add rcx, r9
jmp rcx
movzx r9d, byte [rbx]
add rbx, 8
jmp 0x14005d4f9
movzx r9d, word [rbx]
add rbx, 8
jmp 0x14005d4f9
mov r9, qword [rbx]
add rbx, 8
jmp 0x14005d4f9
mov r9d, dword [rbx]
add rbx, 8
mov dword [rsp + 0x38], r11d
mov dword [rsp + 0x30], r14d
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], edx
jmp 0x14005d48a
or r11d, 0x40
add rbx, 8
movsd xmm3, qword [rbx - 8]
lea rax, [rbp + 0x48]
mov qword [rsp + 0x38], rax
lea rdx, [rbp + 0x50]
mov dword [rsp + 0x30], r11d
mov r8, rdi
mov dword [rsp + 0x28], r14d
mov rcx, r13
mov dword [rsp + 0x20], r12d
call fcn.14005dd90
mov r9d, dword [rbp + 0x48]
mov dword [rbp + 0x40], r9d
test r9d, r9d
je 0x14005d499
mov r10, qword [rbp + 0x50]
jmp 0x14005d758
or r11d, 0x40
bts r11d, 9
jmp case.0x14005d436.42
or r11d, 0x40
bts r11d, 8
add rbx, 8
test r14d, r14d
mov eax, 1
cmove r14d, eax
jmp 0x14005d519
add rbx, 8
lea rcx, [r10 + 1]
cmp rcx, rdi
jae 0x14005d59a
movzx eax, byte [rbx - 8]
mov byte [r10 + r13], al
mov r10, rcx
mov qword [rbp + 0x50], rcx
jmp case.0x14005d436.53
mov r9, qword [rbx]
lea rdx, [rbp + 0x50]
mov dword [rsp + 0x30], r11d
add rbx, 8
mov dword [rsp + 0x28], r14d
mov r8, rdi
mov rcx, r13
mov dword [rsp + 0x20], r12d
call fcn.14005d970
mov r10, qword [rbp + 0x50]
jmp case.0x14005d436.53
mov r9, qword [rbx]
add rbx, 8
test r9, r9
jne 0x14005d6b7
xor ecx, ecx
lea rax, str._nil_
nop dword [rax]
inc ecx
lea rax, [rax + 1]
cmp byte [rax], 0
jne 0x14005d5f0
sub r12d, ecx
mov eax, 0
cmovns eax, r12d
mov edx, eax
neg edx
and r11b, 1
cmove edx, eax
test edx, edx
jle 0x14005d645
mov r8d, 1
mov eax, edx
sub r8, r13
lea rcx, [r10 + r13]
add r10, rax
nop dword [rax + rax]
lea rax, [r8 + rcx]
cmp rax, rdi
jae 0x14005d63c
mov byte [rcx], 0x20
inc rcx
dec edx
test edx, edx
jg 0x14005d630
mov r9d, 1
lea r8, str._nil_
sub r9, r13
lea rcx, [r10 + r13]
sub r8, r10
nop dword [rax]
lea rax, [rcx + r9]
cmp rax, rdi
jae 0x14005d670
movzx eax, byte [r8 + r10]
mov byte [rcx], al
inc r10
inc rcx
cmp byte [r8 + r10], 0
jne 0x14005d660
mov qword [rbp + 0x50], r10
test edx, edx
jns case.0x14005d436.53
neg edx
lea rcx, [r10 + r13]
mov r8d, edx
add r10, r8
mov qword [rbp + 0x50], r10
nop dword [rax]
lea rax, [rcx + r9]
cmp rax, rdi
jae 0x14005d6ac
mov byte [rcx], 0x20
inc rcx
sub r8, 1
jne 0x14005d6a0
jmp case.0x14005d436.53
or r11d, 0x88
mov dword [rsp + 0x38], r11d
mov dword [rsp + 0x30], r14d
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], setsockopt
jmp 0x14005d48a
lea eax, [rsi - 1]
cmp eax, 7
ja case.0x14005d6ef.3
cdqe
mov ecx, dword [r9 + rax*4 + 0x5d948]
add rcx, r9
jmp rcx
mov rax, qword [rbx]
add rbx, 8
mov byte [rax], r10b
jmp case.0x14005d436.53
mov rax, qword [rbx]
add rbx, 8
mov word [rax], r10w
jmp case.0x14005d436.53
mov rax, qword [rbx]
add rbx, 8
mov qword [rax], r10
jmp case.0x14005d436.53
mov rax, qword [rbx]
add rbx, 8
mov dword [rax], r10d
jmp case.0x14005d436.53
lea rax, [r10 + 1]
cmp rax, rdi
jae 0x14005d72f
mov byte [r10 + r13], dl
mov r10, rax
mov qword [rbp + 0x50], rax
movzx edx, byte [r15]
xor r8d, r8d
inc r15
xor r12d, r12d
xor r11d, r11d
xor esi, esi
or r14d, 0xffffffff
test dl, dl
jne 0x14005d14a
mov r9d, dword [rbp + 0x40]
cmp r10, rdi
jae 0x14005d771
mov byte [r10 + r13], 0
jmp 0x14005d77c
mov eax, 1
mov r9d, eax
mov dword [rbp + 0x40], eax
jmp 0x14005d758
test rdi, rdi
je 0x14005d77c
mov byte [rdi + r13 - 1], 0
test r9d, r9d
jne 0x14005d78f
cmp r10, 0x7fffffff
jae 0x14005d78f
mov eax, r10d
jmp 0x14005d7aa
call fcn.1400808e8
cmp dword [rbp + 0x40], 0
mov ecx, 0x22
mov edx, 0x84
cmovne ecx, edx
mov dword [rax], ecx
or eax, 0xffffffff
mov rbx, qword [rsp + 0x98]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret