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

Disassembly:
push rbp
push rdi
push r13
push r15
mov rbp, rsp
sub rsp, 0x28
mov r13, r8
mov r15, rdx
mov rdi, rcx
test r9d, r9d
je 0x14016dbc0
mov dword [0x14027c874], 0x76c
mov dword [0x14027c878], 0xffffffff
movzx edx, byte [rdx]
mov qword [rsp + 0x58], rbx
movzx eax, dl
mov qword [rsp + 0x60], rsi
mov qword [rsp + 0x68], r12
mov qword [rsp + 0x20], r14
mov qword [rbp + 0x28], rcx
test dl, dl
je 0x14016e6e9
lea r12, [0x140000000]
nop dword [rax]
movzx eax, al
xor r8d, r8d
test byte [r12 + rax*2 + 0x231a40], 0x20
je 0x14016dc2e
movzx eax, byte [rdi]
test byte [r12 + rax*2 + 0x231a40], 0x20
je 0x14016dc26
nop
movzx eax, byte [rdi + 1]
inc rdi
test byte [r12 + rax*2 + 0x231a40], 0x20
jne 0x14016dc10
mov qword [rbp + 0x28], rdi
inc r15
jmp 0x14016e6da
inc r15
cmp dl, 0x25
jne case.0x14016dc69.37
nop word [rax + rax]
movzx edx, byte [r15]
inc r15
lea eax, [rdx - 0x25]
cmp eax, 0x55
ja case.0x14016dc69.72
cdqe
movzx eax, byte [r12 + rax + 0x16e7e4]
mov ecx, dword [r12 + rax*4 + 0x16e754]
add rcx, r12
jmp rcx
test r8d, r8d
jne case.0x14016dc69.72
mov r8d, 1
jmp 0x14016dc40
test r8d, r8d
jne case.0x14016dc69.72
mov r8d, 2
jmp 0x14016dc40
test r8d, 0xfffffffe
jne case.0x14016dc69.72
mov rdx, qword [0x1402748a0]
mov rdx, qword [rdx + 0x140]
jmp 0x14016dcb8
test r8d, r8d
jne case.0x14016dc69.72
lea rdx, str._m__d__y
jmp 0x14016dcb8
test r8d, r8d
jne case.0x14016dc69.72
lea rdx, str._Y__m__d
mov r8, r13
xor r9d, r9d
mov rcx, rdi
call 0x14016db90
mov qword [rbp + 0x28], rax
mov rdi, rax
test rax, rax
jne 0x14016e6da
xor eax, eax
jmp 0x14016e733
test r8d, r8d
jne case.0x14016dc69.72
lea rdx, str._H:_M
jmp 0x14016dcb8
test r8d, r8d
jne case.0x14016dc69.72
lea rdx, str._I:_M:_S__p
jmp 0x14016dcb8
test r8d, r8d
jne case.0x14016dc69.72
lea rdx, str._H:_M:_S
jmp 0x14016dcb8
test r8d, 0xfffffffe
jne case.0x14016dc69.72
mov rdx, qword [0x1402748a0]
mov rdx, qword [rdx + 0x150]
jmp 0x14016dcb8
test r8d, 0xfffffffe
jne case.0x14016dc69.72
mov rdx, qword [0x1402748a0]
mov rdx, qword [rdx + 0x148]
jmp 0x14016dcb8
test r8d, r8d
jne case.0x14016dc69.72
xor r14d, r14d
xor esi, esi
nop word [rax + rax]
mov rax, qword [0x1402748a0]
or rbx, 0xffffffffffffffff
mov rcx, qword [rsi + rax + 0x38]
inc rbx
cmp byte [rcx + rbx], 0
jne 0x14016dd60
mov r8d, ebx
mov rdx, rdi
call fcn.140171fa0
test eax, eax
je 0x14016ddac
mov rax, qword [0x1402748a0]
or rbx, 0xffffffffffffffff
mov rcx, qword [rsi + rax]
inc rbx
cmp byte [rcx + rbx], 0
jne 0x14016dd87
mov r8d, ebx
mov rdx, rdi
call fcn.140171fa0
test eax, eax
je 0x14016ddac
inc r14d
add rsi, 8
cmp rsi, 0x38
jl 0x14016dd50
cmp r14d, 7
je case.0x14016dc69.72
add rdi, rbx
mov dword [r13 + 0x18], r14d
mov qword [rbp + 0x28], rdi
jmp 0x14016e6da
test r8d, r8d
jne case.0x14016dc69.72
xor r14d, r14d
mov esi, reloc.WS2_32.dll_WSASetLastError
nop word [rax + rax]
mov rax, qword [0x1402748a0]
or rbx, 0xffffffffffffffff
mov rcx, qword [rsi + rax + 0x60]
inc rbx
cmp byte [rcx + rbx], 0
jne 0x14016ddf0
mov r8d, ebx
mov rdx, rdi
call fcn.140171fa0
test eax, eax
je 0x14016de3f
mov rax, qword [0x1402748a0]
or rbx, 0xffffffffffffffff
mov rcx, qword [rsi + rax]
inc rbx
cmp byte [rcx + rbx], 0
jne 0x14016de17
mov r8d, ebx
mov rdx, rdi
call fcn.140171fa0
test eax, eax
je 0x14016de3f
inc r14d
add rsi, 8
cmp rsi, 0xd0
jl 0x14016dde0
cmp r14d, 0xc
je case.0x14016dc69.72
add rdi, rbx
mov dword [r13 + 0x10], r14d
mov qword [rbp + 0x28], rdi
jmp 0x14016e6da
test r8d, 0xfffffffe
jne case.0x14016dc69.72
movzx ecx, byte [rdi]
mov r8d, 0x63
lea eax, [rcx - 0x30]
cmp al, 9
ja case.0x14016dc69.72
xor edx, edx
nop dword [rax]
movzx r9d, cl
mov eax, 0x66666667
add r9d, edx
inc rdi
imul r8d
lea r10d, [r9 - 0x30]
mov r8d, edx
sar r8d, 2
mov eax, r8d
shr eax, 0x1f
add r8d, eax
lea eax, [r9 - 0x30]
lea edx, [rax + rax*4]
add edx, edx
cmp edx, 0x63
jg 0x14016dec6
test r8d, r8d
je 0x14016dec6
movzx ecx, byte [rdi]
cmp cl, 0x30
jb 0x14016dec6
cmp cl, 0x39
jbe 0x14016de80
mov qword [rbp + 0x28], rdi
cmp r10d, 0x63
ja case.0x14016dc69.72
lea eax, [r9 - 0x30]
imul ecx, eax, 0x64
mov dword [0x14027c874], ecx
jmp 0x14016e6da
test r8d, 0xfffffffd
jne case.0x14016dc69.72
lea rdx, [r13 + 0xc]
mov r9d, 0x1f
mov r8d, 1
lea rcx, [rbp + 0x28]
call fcn.14016dad0
test eax, eax
je case.0x14016dc69.72
mov rdi, qword [rbp + 0x28]
jmp 0x14016e6da
test r8d, r8d
jne case.0x14016dc69.72
test r8d, 0xfffffffd
jne case.0x14016dc69.72
lea rdx, [r13 + 8]
mov r9d, reloc.WS2_32.dll_socket
xor r8d, r8d
jmp 0x14016df03
test r8d, r8d
jne case.0x14016dc69.72
test r8d, 0xfffffffd
jne case.0x14016dc69.72
lea rdx, [r13 + 8]
mov r9d, listen
jmp 0x14016defd
test r8d, r8d
jne case.0x14016dc69.72
mov r9d, 0x16e
lea rdx, [r13 + 0x1c]
mov r8d, 1
lea rcx, [rbp + 0x28]
call fcn.14016dad0
test eax, eax
je case.0x14016dc69.72
dec dword [r13 + 0x1c]
mov rdi, qword [rbp + 0x28]
jmp 0x14016e6da
test r8d, 0xfffffffd
jne case.0x14016dc69.72
lea rdx, [r13 + 4]
mov r9d, 0x3b
xor r8d, r8d
jmp 0x14016df03
test r8d, 0xfffffffd
jne case.0x14016dc69.72
mov r9d, listen
lea rdx, [r13 + 0x10]
lea rcx, [rbp + 0x28]
lea r8d, [r9 - 0xb]
call fcn.14016dad0
test eax, eax
je case.0x14016dc69.72
dec dword [r13 + 0x10]
mov rdi, qword [rbp + 0x28]
jmp 0x14016e6da
test r8d, r8d
jne case.0x14016dc69.72
mov rax, qword [0x1402748a0]
or rbx, 0xffffffffffffffff
mov rcx, qword [rax + 0x130]
nop
inc rbx
cmp byte [rcx + rbx], 0
jne 0x14016e010
mov r8d, ebx
mov rdx, rdi
call fcn.140171fa0
test eax, eax
jne 0x14016e04b
mov eax, dword [r13 + 8]
cmp eax, 0xc
jg case.0x14016dc69.72
jne 0x14016e03f
mov dword [r13 + 8], 0
add rdi, rbx
mov qword [rbp + 0x28], rdi
jmp 0x14016e6da
mov rax, qword [0x1402748a0]
or rbx, 0xffffffffffffffff
mov rcx, qword [rax + 0x138]
nop dword [rax]
inc rbx
cmp byte [rcx + rbx], 0
jne 0x14016e060
mov r8d, ebx
mov rdx, rdi
call fcn.140171fa0
test eax, eax
jne case.0x14016dc69.72
mov eax, dword [r13 + 8]
cmp eax, 0xc
jg case.0x14016dc69.72
jge 0x14016e092
add eax, 0xc
mov dword [r13 + 8], eax
add rdi, rbx
mov qword [rbp + 0x28], rdi
jmp 0x14016e6da
test r8d, 0xfffffffd
jne case.0x14016dc69.72
mov r9d, 0x3d
xor r8d, r8d
mov rdx, r13
jmp 0x14016df03
test r8d, 0xfffffffd
jne case.0x14016dc69.72
movzx ecx, byte [rdi]
mov r8d, 0x35
lea eax, [rcx - 0x30]
cmp al, 9
ja case.0x14016dc69.72
xor edx, edx
nop
movzx ecx, cl
mov eax, 0x66666667
add ecx, edx
inc rdi
imul r8d
lea r9d, [rcx - 0x30]
mov r8d, edx
sar r8d, 2
mov eax, r8d
shr eax, 0x1f
add r8d, eax
lea eax, [rcx - 0x30]
lea edx, [rax + rax*4]
add edx, edx
cmp edx, 0x35
jg 0x14016e123
test r8d, r8d
je 0x14016e123
movzx ecx, byte [rdi]
cmp cl, 0x30
jb 0x14016e123
cmp cl, 0x39
jbe 0x14016e0e0
mov qword [rbp + 0x28], rdi
cmp r9d, 0x35
ja case.0x14016dc69.72
jmp 0x14016e6da
test r8d, 0xfffffffd
jne case.0x14016dc69.72
lea rdx, [r13 + 0x18]
mov r9d, 6
xor r8d, r8d
jmp 0x14016df03
test r8d, 0xfffffffd
jne case.0x14016dc69.72
movzx ecx, byte [rdi]
mov r8d, 7
lea eax, [rcx - 0x30]
cmp al, 9
ja case.0x14016dc69.72
xor edx, edx
nop dword [rax + rax]
lea r9d, [rdx - 0x30]
movzx eax, cl
add r9d, eax
inc rdi
mov eax, 0x66666667
imul r8d
mov r8d, edx
lea edx, [r9 + r9*4]
sar r8d, 2
add edx, edx
mov eax, r8d
shr eax, 0x1f
add r8d, eax
cmp edx, 7
jg 0x14016e1c2
test r8d, r8d
je 0x14016e1c2
movzx ecx, byte [rdi]
cmp cl, 0x30
jb 0x14016e1c2
cmp cl, 0x39
jbe 0x14016e180
lea eax, [r9 - 1]
mov qword [rbp + 0x28], rdi
cmp eax, 6
ja case.0x14016dc69.72
mov eax, 0x92492493
imul r9d
add edx, r9d
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, edx, 7
sub r9d, eax
mov dword [r13 + 0x18], r9d
jmp 0x14016e6da
movzx ecx, byte [rdi]
mov r8d, 0x63
lea eax, [rcx - 0x30]
cmp al, 9
ja case.0x14016dc69.72
xor edx, edx
nop dword [rax]
movzx ecx, cl
mov eax, 0x66666667
add ecx, edx
inc rdi
imul r8d
lea r9d, [rcx - 0x30]
mov r8d, edx
sar r8d, 2
mov eax, r8d
shr eax, 0x1f
add r8d, eax
lea eax, [rcx - 0x30]
lea edx, [rax + rax*4]
add edx, edx
cmp edx, 0x63
jg 0x14016e253
test r8d, r8d
je 0x14016e253
movzx ecx, byte [rdi]
cmp cl, 0x30
jb 0x14016e253
cmp cl, 0x39
jbe 0x14016e210
mov qword [rbp + 0x28], rdi
cmp r9d, 0x63
ja case.0x14016dc69.72
jmp 0x14016e6da
movzx eax, byte [rdi + 1]
inc rdi
test byte [r12 + rax*2 + 0x231a40], 8
jne case.0x14016dc69.44
mov qword [rbp + 0x28], rdi
jmp 0x14016e6da
movzx ecx, byte [rdi]
mov r8d, 0x35
lea eax, [rcx - 0x30]
cmp al, 9
ja case.0x14016dc69.72
xor edx, edx
nop dword [rax]
nop word [rax + rax]
movzx ecx, cl
mov eax, 0x66666667
add ecx, edx
inc rdi
imul r8d
lea r9d, [rcx - 0x30]
mov r8d, edx
sar r8d, 2
mov eax, r8d
shr eax, 0x1f
add r8d, eax
lea eax, [rcx - 0x30]
lea edx, [rax + rax*4]
add edx, edx
cmp edx, 0x35
jg 0x14016e2f3
test r8d, r8d
je 0x14016e2f3
movzx ecx, byte [rdi]
cmp cl, 0x30
jb 0x14016e2f3
cmp cl, 0x39
jbe 0x14016e2b0
mov qword [rbp + 0x28], rdi
cmp r9d, 0x35
ja case.0x14016dc69.72
jmp 0x14016e6da
test r8d, 0xfffffffe
jne case.0x14016dc69.72
movzx ecx, byte [rdi]
mov r8d, 0x270f
lea eax, [rcx - 0x30]
cmp al, 9
ja case.0x14016dc69.72
xor edx, edx
nop dword [rax]
movzx r9d, cl
mov eax, 0x66666667
add r9d, edx
inc rdi
imul r8d
lea r10d, [r9 - 0x30]
mov r8d, edx
sar r8d, 2
mov eax, r8d
shr eax, 0x1f
add r8d, eax
lea eax, [r9 - 0x30]
lea edx, [rax + rax*4]
add edx, edx
cmp edx, 0x270f
jg 0x14016e379
test r8d, r8d
je 0x14016e379
movzx ecx, byte [rdi]
cmp cl, 0x30
jb 0x14016e379
cmp cl, 0x39
jbe 0x14016e330
mov qword [rbp + 0x28], rdi
cmp r10d, 0x270f
ja case.0x14016dc69.72
lea eax, [r9 - 0x79c]
mov dword [0x14027c878], 0xffffffff
mov dword [r13 + 0x14], eax
jmp 0x14016e6da
movzx ecx, byte [rdi]
mov r8d, 0x63
lea eax, [rcx - 0x30]
cmp al, 9
ja case.0x14016dc69.72
xor edx, edx
nop word [rax + rax]
lea r9d, [rdx - 0x30]
movzx eax, cl
add r9d, eax
inc rdi
mov eax, 0x66666667
imul r8d
mov r8d, edx
lea edx, [r9 + r9*4]
sar r8d, 2
add edx, edx
mov eax, r8d
shr eax, 0x1f
add r8d, eax
cmp edx, 0x63
jg 0x14016e402
test r8d, r8d
je 0x14016e402
movzx ecx, byte [rdi]
cmp cl, 0x30
jb 0x14016e402
cmp cl, 0x39
jbe 0x14016e3c0
mov qword [rbp + 0x28], rdi
cmp r9d, 0x63
ja case.0x14016dc69.72
mov dword [0x14027c878], r9d
jmp 0x14016e6da
call fcn.140171c60
mov r8d, 3
lea rdx, [0x1402746e0]
mov rcx, rdi
call fcn.14017db30
test eax, eax
jne 0x14016e44b
add rdi, 3
mov dword [r13 + 0x20], eax
mov qword [rbp + 0x28], rdi
jmp 0x14016e6da
call fcn.1401884e0
mov rsi, rax
test rax, rax
je 0x14016e48c
xor r14d, r14d
nop dword [rax + rax]
mov rcx, qword [rsi]
or rbx, 0xffffffffffffffff
inc rbx
cmp byte [rcx + rbx], 0
jne 0x14016e467
mov r8d, ebx
mov rdx, rdi
call fcn.140171fa0
test eax, eax
je 0x14016e497
inc r14d
add rsi, 8
cmp r14d, 2
jl 0x14016e460
xor edi, edi
mov qword [rbp + 0x28], rdi
jmp 0x14016e6da
mov eax, ebx
add rax, rdi
mov rdi, rax
je 0x14016e48e
mov dword [r13 + 0x20], r14d
mov qword [rbp + 0x28], rax
jmp 0x14016e6da
movzx eax, byte [rdi]
test byte [r12 + rax*2 + 0x231a40], 0x20
je 0x14016e4d2
nop dword [rax]
movzx eax, byte [rdi + 1]
inc rdi
test byte [r12 + rax*2 + 0x231a40], 0x20
jne 0x14016e4c0
movzx ecx, byte [rdi]
inc rdi
mov qword [rbp + 0x28], rdi
lea eax, [rcx - 0x2b]
test al, 0xfd
je 0x14016e60d
cmp cl, 0x47
je 0x14016e5dc
mov rdx, rdi
cmp cl, 0x55
je 0x14016e5ed
cmp cl, 0x5a
je 0x14016e600
dec rdi
lea rsi, [0x1402746e8]
xor r14d, r14d
nop dword [rax]
nop word [rax + rax]
mov rcx, qword [rsi]
or rbx, 0xffffffffffffffff
inc rbx
cmp byte [rcx + rbx], 0
jne 0x14016e527
mov r8d, ebx
mov rdx, rdi
call fcn.140171fa0
test eax, eax
je 0x14016e5ae
inc r14d
add rsi, 8
cmp r14d, 4
jl 0x14016e520
lea rsi, [0x140274710]
xor r14d, r14d
nop word [rax + rax]
mov rcx, qword [rsi]
or rbx, 0xffffffffffffffff
inc rbx
cmp byte [rcx + rbx], 0
jne 0x14016e567
mov r8d, ebx
mov rdx, rdi
call fcn.140171fa0
test eax, eax
je 0x14016e5c1
inc r14d
add rsi, 8
cmp r14d, 4
jl 0x14016e560
movzx ecx, byte [rdi]
lea eax, [rcx - 0x41]
cmp al, 8
jbe 0x14016e5a2
sub cl, 0x4c
cmp cl, 0xd
ja case.0x14016dc69.72
inc rdi
mov qword [rbp + 0x28], rdi
jmp 0x14016e6da
mov eax, ebx
add rax, rdi
je 0x14016e54c
mov rdi, rax
mov qword [rbp + 0x28], rax
jmp 0x14016e6da
mov eax, ebx
add rax, rdi
je 0x14016e58c
mov dword [r13 + 0x20], 1
mov rdi, rax
mov qword [rbp + 0x28], rax
jmp 0x14016e6da
movzx eax, byte [rdi]
inc rdi
mov rdx, rdi
cmp al, 0x4d
jne case.0x14016dc69.72
movzx eax, byte [rdi]
lea rdi, [rdx + 1]
mov qword [rbp + 0x28], rdi
cmp al, 0x54
jne case.0x14016dc69.72
mov dword [r13 + 0x20], 0
jmp 0x14016e6da
xor ecx, ecx
mov r8, rdi
xor edx, edx
nop dword [rax]
nop dword [rax + rax]
movzx eax, byte [rdi]
test byte [r12 + rax*2 + 0x231a40], 8
je 0x14016e63b
lea ecx, [rcx + rcx*4]
inc edx
lea ecx, [rcx - 0x18]
lea ecx, [rax + rcx*2]
jmp 0x14016e644
cmp edx, 2
jne 0x14016e659
cmp al, 0x3a
jne 0x14016e600
lea rdi, [r8 + 1]
mov qword [rbp + 0x28], rdi
mov r8, rdi
cmp edx, 4
jl 0x14016e620
cmp edx, 2
je 0x14016e600
cmp edx, 4
jne case.0x14016dc69.72
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, edx, 0x64
sub ecx, eax
cmp ecx, 0x3c
jge case.0x14016dc69.72
mov dword [r13 + 0x20], 0
jmp 0x14016e6da
test r8d, r8d
jne case.0x14016dc69.72
movzx eax, byte [rdi]
test byte [r12 + rax*2 + 0x231a40], 0x20
je 0x14016e6da
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [rdi + 1]
inc rdi
test byte [r12 + rax*2 + 0x231a40], 0x20
jne 0x14016e6b0
mov qword [rbp + 0x28], rdi
jmp 0x14016e6da
movzx eax, byte [rdi]
inc rdi
mov qword [rbp + 0x28], rdi
cmp dl, al
jne case.0x14016dc69.72
movzx edx, byte [r15]
movzx eax, dl
test dl, dl
jne 0x14016dbf0
mov eax, dword [0x14027c878]
cmp eax, 0xffffffff
je 0x14016e730
cmp dword [0x14027c874], 0x76c
jne 0x14016e71a
cmp eax, 0x44
jg 0x14016e70e
add eax, 0x64
mov dword [r13 + 0x14], eax
jmp 0x14016e730
mov eax, dword [0x14027c878]
mov dword [r13 + 0x14], eax
jmp 0x14016e730
mov ecx, dword [0x14027c874]
add ecx, 0xfffff894
add ecx, dword [0x14027c878]
mov dword [r13 + 0x14], ecx
mov rax, rdi
mov r14, qword [rsp + 0x20]
mov r12, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x58]
add rsp, 0x28
pop r15
pop r13
pop rdi
pop rbp
ret
mov r9d, 1
jmp 0x14016db90