Function at 0x14016e9e0
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 0x14016ea10
mov dword [0x14026fb38], 0x76c
mov dword [0x14026fb3c], 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 0x14016f539
lea r12, [0x140000000]
nop dword [rax]
movzx eax, al
xor r8d, r8d
test byte [r12 + rax*2 + 0x2215f0], 0x20
je 0x14016ea7e
movzx eax, byte [rdi]
test byte [r12 + rax*2 + 0x2215f0], 0x20
je 0x14016ea76
nop
movzx eax, byte [rdi + 1]
inc rdi
test byte [r12 + rax*2 + 0x2215f0], 0x20
jne 0x14016ea60
mov qword [rbp + 0x28], rdi
inc r15
jmp 0x14016f52a
inc r15
cmp dl, 0x25
jne case.0x14016eab9.37
nop word [rax + rax]
movzx edx, byte [r15]
inc r15
lea eax, [rdx - 0x25]
cmp eax, 0x55
ja case.0x14016eab9.72
cdqe
movzx eax, byte [r12 + rax + 0x16f634]
mov ecx, dword [r12 + rax*4 + 0x16f5a4]
add rcx, r12
jmp rcx
test r8d, r8d
jne case.0x14016eab9.72
mov r8d, 1
jmp 0x14016ea90
test r8d, r8d
jne case.0x14016eab9.72
mov r8d, 2
jmp 0x14016ea90
test r8d, 0xfffffffe
jne case.0x14016eab9.72
mov rdx, qword [0x14026a650]
mov rdx, qword [rdx + 0x140]
jmp 0x14016eb08
test r8d, r8d
jne case.0x14016eab9.72
lea rdx, str._m__d__y
jmp 0x14016eb08
test r8d, r8d
jne case.0x14016eab9.72
lea rdx, str._Y__m__d
mov r8, r13
xor r9d, r9d
mov rcx, rdi
call 0x14016e9e0
mov qword [rbp + 0x28], rax
mov rdi, rax
test rax, rax
jne 0x14016f52a
xor eax, eax
jmp 0x14016f583
test r8d, r8d
jne case.0x14016eab9.72
lea rdx, str._H:_M
jmp 0x14016eb08
test r8d, r8d
jne case.0x14016eab9.72
lea rdx, str._I:_M:_S__p
jmp 0x14016eb08
test r8d, r8d
jne case.0x14016eab9.72
lea rdx, str._H:_M:_S
jmp 0x14016eb08
test r8d, 0xfffffffe
jne case.0x14016eab9.72
mov rdx, qword [0x14026a650]
mov rdx, qword [rdx + 0x150]
jmp 0x14016eb08
test r8d, 0xfffffffe
jne case.0x14016eab9.72
mov rdx, qword [0x14026a650]
mov rdx, qword [rdx + 0x148]
jmp 0x14016eb08
test r8d, r8d
jne case.0x14016eab9.72
xor r14d, r14d
xor esi, esi
nop word [rax + rax]
mov rax, qword [0x14026a650]
or rbx, 0xffffffffffffffff
mov rcx, qword [rsi + rax + 0x38]
inc rbx
cmp byte [rcx + rbx], 0
jne 0x14016ebb0
mov r8d, ebx
mov rdx, rdi
call fcn.140170c10
test eax, eax
je 0x14016ebfc
mov rax, qword [0x14026a650]
or rbx, 0xffffffffffffffff
mov rcx, qword [rsi + rax]
inc rbx
cmp byte [rcx + rbx], 0
jne 0x14016ebd7
mov r8d, ebx
mov rdx, rdi
call fcn.140170c10
test eax, eax
je 0x14016ebfc
inc r14d
add rsi, 8
cmp rsi, 0x38
jl 0x14016eba0
cmp r14d, 7
je case.0x14016eab9.72
add rdi, rbx
mov dword [r13 + 0x18], r14d
mov qword [rbp + 0x28], rdi
jmp 0x14016f52a
test r8d, r8d
jne case.0x14016eab9.72
xor r14d, r14d
mov esi, reloc.WS2_32.dll_WSASetLastError
nop word [rax + rax]
mov rax, qword [0x14026a650]
or rbx, 0xffffffffffffffff
mov rcx, qword [rsi + rax + 0x60]
inc rbx
cmp byte [rcx + rbx], 0
jne 0x14016ec40
mov r8d, ebx
mov rdx, rdi
call fcn.140170c10
test eax, eax
je 0x14016ec8f
mov rax, qword [0x14026a650]
or rbx, 0xffffffffffffffff
mov rcx, qword [rsi + rax]
inc rbx
cmp byte [rcx + rbx], 0
jne 0x14016ec67
mov r8d, ebx
mov rdx, rdi
call fcn.140170c10
test eax, eax
je 0x14016ec8f
inc r14d
add rsi, 8
cmp rsi, 0xd0
jl 0x14016ec30
cmp r14d, 0xc
je case.0x14016eab9.72
add rdi, rbx
mov dword [r13 + 0x10], r14d
mov qword [rbp + 0x28], rdi
jmp 0x14016f52a
test r8d, 0xfffffffe
jne case.0x14016eab9.72
movzx ecx, byte [rdi]
mov r8d, 0x63
lea eax, [rcx - 0x30]
cmp al, 9
ja case.0x14016eab9.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 0x14016ed16
test r8d, r8d
je 0x14016ed16
movzx ecx, byte [rdi]
cmp cl, 0x30
jb 0x14016ed16
cmp cl, 0x39
jbe 0x14016ecd0
mov qword [rbp + 0x28], rdi
cmp r10d, 0x63
ja case.0x14016eab9.72
lea eax, [r9 - 0x30]
imul ecx, eax, 0x64
mov dword [0x14026fb38], ecx
jmp 0x14016f52a
test r8d, 0xfffffffd
jne case.0x14016eab9.72
lea rdx, [r13 + 0xc]
mov r9d, 0x1f
mov r8d, 1
lea rcx, [rbp + 0x28]
call fcn.14016e920
test eax, eax
je case.0x14016eab9.72
mov rdi, qword [rbp + 0x28]
jmp 0x14016f52a
test r8d, r8d
jne case.0x14016eab9.72
test r8d, 0xfffffffd
jne case.0x14016eab9.72
lea rdx, [r13 + 8]
mov r9d, reloc.WS2_32.dll_socket
xor r8d, r8d
jmp 0x14016ed53
test r8d, r8d
jne case.0x14016eab9.72
test r8d, 0xfffffffd
jne case.0x14016eab9.72
lea rdx, [r13 + 8]
mov r9d, recvfrom
jmp 0x14016ed4d
test r8d, r8d
jne case.0x14016eab9.72
mov r9d, 0x16e
lea rdx, [r13 + 0x1c]
mov r8d, 1
lea rcx, [rbp + 0x28]
call fcn.14016e920
test eax, eax
je case.0x14016eab9.72
dec dword [r13 + 0x1c]
mov rdi, qword [rbp + 0x28]
jmp 0x14016f52a
test r8d, 0xfffffffd
jne case.0x14016eab9.72
lea rdx, [r13 + 4]
mov r9d, 0x3b
xor r8d, r8d
jmp 0x14016ed53
test r8d, 0xfffffffd
jne case.0x14016eab9.72
mov r9d, recvfrom
lea rdx, [r13 + 0x10]
lea rcx, [rbp + 0x28]
lea r8d, [r9 - 0xb]
call fcn.14016e920
test eax, eax
je case.0x14016eab9.72
dec dword [r13 + 0x10]
mov rdi, qword [rbp + 0x28]
jmp 0x14016f52a
test r8d, r8d
jne case.0x14016eab9.72
mov rax, qword [0x14026a650]
or rbx, 0xffffffffffffffff
mov rcx, qword [rax + 0x130]
nop
inc rbx
cmp byte [rcx + rbx], 0
jne 0x14016ee60
mov r8d, ebx
mov rdx, rdi
call fcn.140170c10
test eax, eax
jne 0x14016ee9b
mov eax, dword [r13 + 8]
cmp eax, 0xc
jg case.0x14016eab9.72
jne 0x14016ee8f
mov dword [r13 + 8], 0
add rdi, rbx
mov qword [rbp + 0x28], rdi
jmp 0x14016f52a
mov rax, qword [0x14026a650]
or rbx, 0xffffffffffffffff
mov rcx, qword [rax + 0x138]
nop dword [rax]
inc rbx
cmp byte [rcx + rbx], 0
jne 0x14016eeb0
mov r8d, ebx
mov rdx, rdi
call fcn.140170c10
test eax, eax
jne case.0x14016eab9.72
mov eax, dword [r13 + 8]
cmp eax, 0xc
jg case.0x14016eab9.72
jge 0x14016eee2
add eax, 0xc
mov dword [r13 + 8], eax
add rdi, rbx
mov qword [rbp + 0x28], rdi
jmp 0x14016f52a
test r8d, 0xfffffffd
jne case.0x14016eab9.72
mov r9d, 0x3d
xor r8d, r8d
mov rdx, r13
jmp 0x14016ed53
test r8d, 0xfffffffd
jne case.0x14016eab9.72
movzx ecx, byte [rdi]
mov r8d, 0x35
lea eax, [rcx - 0x30]
cmp al, 9
ja case.0x14016eab9.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 0x14016ef73
test r8d, r8d
je 0x14016ef73
movzx ecx, byte [rdi]
cmp cl, 0x30
jb 0x14016ef73
cmp cl, 0x39
jbe 0x14016ef30
mov qword [rbp + 0x28], rdi
cmp r9d, 0x35
ja case.0x14016eab9.72
jmp 0x14016f52a
test r8d, 0xfffffffd
jne case.0x14016eab9.72
lea rdx, [r13 + 0x18]
mov r9d, 6
xor r8d, r8d
jmp 0x14016ed53
test r8d, 0xfffffffd
jne case.0x14016eab9.72
movzx ecx, byte [rdi]
mov r8d, 7
lea eax, [rcx - 0x30]
cmp al, 9
ja case.0x14016eab9.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 0x14016f012
test r8d, r8d
je 0x14016f012
movzx ecx, byte [rdi]
cmp cl, 0x30
jb 0x14016f012
cmp cl, 0x39
jbe 0x14016efd0
lea eax, [r9 - 1]
mov qword [rbp + 0x28], rdi
cmp eax, 6
ja case.0x14016eab9.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 0x14016f52a
movzx ecx, byte [rdi]
mov r8d, 0x63
lea eax, [rcx - 0x30]
cmp al, 9
ja case.0x14016eab9.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 0x14016f0a3
test r8d, r8d
je 0x14016f0a3
movzx ecx, byte [rdi]
cmp cl, 0x30
jb 0x14016f0a3
cmp cl, 0x39
jbe 0x14016f060
mov qword [rbp + 0x28], rdi
cmp r9d, 0x63
ja case.0x14016eab9.72
jmp 0x14016f52a
movzx eax, byte [rdi + 1]
inc rdi
test byte [r12 + rax*2 + 0x2215f0], 8
jne case.0x14016eab9.44
mov qword [rbp + 0x28], rdi
jmp 0x14016f52a
movzx ecx, byte [rdi]
mov r8d, 0x35
lea eax, [rcx - 0x30]
cmp al, 9
ja case.0x14016eab9.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 0x14016f143
test r8d, r8d
je 0x14016f143
movzx ecx, byte [rdi]
cmp cl, 0x30
jb 0x14016f143
cmp cl, 0x39
jbe 0x14016f100
mov qword [rbp + 0x28], rdi
cmp r9d, 0x35
ja case.0x14016eab9.72
jmp 0x14016f52a
test r8d, 0xfffffffe
jne case.0x14016eab9.72
movzx ecx, byte [rdi]
mov r8d, 0x270f
lea eax, [rcx - 0x30]
cmp al, 9
ja case.0x14016eab9.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 0x14016f1c9
test r8d, r8d
je 0x14016f1c9
movzx ecx, byte [rdi]
cmp cl, 0x30
jb 0x14016f1c9
cmp cl, 0x39
jbe 0x14016f180
mov qword [rbp + 0x28], rdi
cmp r10d, 0x270f
ja case.0x14016eab9.72
lea eax, [r9 - 0x79c]
mov dword [0x14026fb3c], 0xffffffff
mov dword [r13 + 0x14], eax
jmp 0x14016f52a
movzx ecx, byte [rdi]
mov r8d, 0x63
lea eax, [rcx - 0x30]
cmp al, 9
ja case.0x14016eab9.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 0x14016f252
test r8d, r8d
je 0x14016f252
movzx ecx, byte [rdi]
cmp cl, 0x30
jb 0x14016f252
cmp cl, 0x39
jbe 0x14016f210
mov qword [rbp + 0x28], rdi
cmp r9d, 0x63
ja case.0x14016eab9.72
mov dword [0x14026fb3c], r9d
jmp 0x14016f52a
call fcn.140170690
mov r8d, 3
lea rdx, [0x14026a6c8]
mov rcx, rdi
call fcn.140180590
test eax, eax
jne 0x14016f29b
add rdi, 3
mov dword [r13 + 0x20], eax
mov qword [rbp + 0x28], rdi
jmp 0x14016f52a
call fcn.140185f00
mov rsi, rax
test rax, rax
je 0x14016f2dc
xor r14d, r14d
nop dword [rax + rax]
mov rcx, qword [rsi]
or rbx, 0xffffffffffffffff
inc rbx
cmp byte [rcx + rbx], 0
jne 0x14016f2b7
mov r8d, ebx
mov rdx, rdi
call fcn.140170c10
test eax, eax
je 0x14016f2e7
inc r14d
add rsi, 8
cmp r14d, 2
jl 0x14016f2b0
xor edi, edi
mov qword [rbp + 0x28], rdi
jmp 0x14016f52a
mov eax, ebx
add rax, rdi
mov rdi, rax
je 0x14016f2de
mov dword [r13 + 0x20], r14d
mov qword [rbp + 0x28], rax
jmp 0x14016f52a
movzx eax, byte [rdi]
test byte [r12 + rax*2 + 0x2215f0], 0x20
je 0x14016f322
nop dword [rax]
movzx eax, byte [rdi + 1]
inc rdi
test byte [r12 + rax*2 + 0x2215f0], 0x20
jne 0x14016f310
movzx ecx, byte [rdi]
inc rdi
mov qword [rbp + 0x28], rdi
lea eax, [rcx - 0x2b]
test al, 0xfd
je 0x14016f45d
cmp cl, 0x47
je 0x14016f42c
mov rdx, rdi
cmp cl, 0x55
je 0x14016f43d
cmp cl, 0x5a
je 0x14016f450
dec rdi
lea rsi, [0x14026a6d0]
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 0x14016f377
mov r8d, ebx
mov rdx, rdi
call fcn.140170c10
test eax, eax
je 0x14016f3fe
inc r14d
add rsi, 8
cmp r14d, 4
jl 0x14016f370
lea rsi, [0x14026a6f8]
xor r14d, r14d
nop word [rax + rax]
mov rcx, qword [rsi]
or rbx, 0xffffffffffffffff
inc rbx
cmp byte [rcx + rbx], 0
jne 0x14016f3b7
mov r8d, ebx
mov rdx, rdi
call fcn.140170c10
test eax, eax
je 0x14016f411
inc r14d
add rsi, 8
cmp r14d, 4
jl 0x14016f3b0
movzx ecx, byte [rdi]
lea eax, [rcx - 0x41]
cmp al, 8
jbe 0x14016f3f2
sub cl, 0x4c
cmp cl, 0xd
ja case.0x14016eab9.72
inc rdi
mov qword [rbp + 0x28], rdi
jmp 0x14016f52a
mov eax, ebx
add rax, rdi
je 0x14016f39c
mov rdi, rax
mov qword [rbp + 0x28], rax
jmp 0x14016f52a
mov eax, ebx
add rax, rdi
je 0x14016f3dc
mov dword [r13 + 0x20], 1
mov rdi, rax
mov qword [rbp + 0x28], rax
jmp 0x14016f52a
movzx eax, byte [rdi]
inc rdi
mov rdx, rdi
cmp al, 0x4d
jne case.0x14016eab9.72
movzx eax, byte [rdi]
lea rdi, [rdx + 1]
mov qword [rbp + 0x28], rdi
cmp al, 0x54
jne case.0x14016eab9.72
mov dword [r13 + 0x20], 0
jmp 0x14016f52a
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 + 0x2215f0], 8
je 0x14016f48b
lea ecx, [rcx + rcx*4]
inc edx
lea ecx, [rcx - 0x18]
lea ecx, [rax + rcx*2]
jmp 0x14016f494
cmp edx, 2
jne 0x14016f4a9
cmp al, 0x3a
jne 0x14016f450
lea rdi, [r8 + 1]
mov qword [rbp + 0x28], rdi
mov r8, rdi
cmp edx, 4
jl 0x14016f470
cmp edx, 2
je 0x14016f450
cmp edx, 4
jne case.0x14016eab9.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.0x14016eab9.72
mov dword [r13 + 0x20], 0
jmp 0x14016f52a
test r8d, r8d
jne case.0x14016eab9.72
movzx eax, byte [rdi]
test byte [r12 + rax*2 + 0x2215f0], 0x20
je 0x14016f52a
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [rdi + 1]
inc rdi
test byte [r12 + rax*2 + 0x2215f0], 0x20
jne 0x14016f500
mov qword [rbp + 0x28], rdi
jmp 0x14016f52a
movzx eax, byte [rdi]
inc rdi
mov qword [rbp + 0x28], rdi
cmp dl, al
jne case.0x14016eab9.72
movzx edx, byte [r15]
movzx eax, dl
test dl, dl
jne 0x14016ea40
mov eax, dword [0x14026fb3c]
cmp eax, 0xffffffff
je 0x14016f580
cmp dword [0x14026fb38], 0x76c
jne 0x14016f56a
cmp eax, 0x44
jg 0x14016f55e
add eax, 0x64
mov dword [r13 + 0x14], eax
jmp 0x14016f580
mov eax, dword [0x14026fb3c]
mov dword [r13 + 0x14], eax
jmp 0x14016f580
mov ecx, dword [0x14026fb38]
add ecx, 0xfffff894
add ecx, dword [0x14026fb3c]
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 0x14016e9e0