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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x70
mov rax, qword [r8]
lea r13, [rcx + 0xe8]
mov rbx, rcx
mov qword [rsp + 0x58], rax
mov rcx, qword [rcx + 0x148]
mov r15, rdx
mov qword [rsp + 0x60], rcx
mov rdi, rcx
mov r14, rcx
mov rsi, rax
lea r12, [rbx + 0xc10]
mov rbp, rax
mov r8, rax
mov edx, 0xa
mov qword [rsp + 0xb0], r14
call fcn.140178fd0
mov rcx, rax
mov rdx, r14
test rax, rax
je 0x140158034
lea r8, [rcx + 1]
sub rdi, rax
lea rax, [rsi - 1]
mov rcx, r12
mov rsi, qword [rsp + 0xc0]
add rax, rdi
xor ebp, ebp
mov qword [rsi], rax
mov qword [rbx + 0x148], r8
sub r8, r14
call fcn.14013f5c0
test eax, eax
jne 0x1401574f3
cmp dword [rbx + 0x144], eax
jne 0x14015737d
mov rcx, r12
call fcn.14013f620
mov rcx, r12
mov rdi, rax
call fcn.14013f630
mov r8, rdi
mov rdx, rax
mov rcx, rbx
call fcn.140158300
cmp eax, 2
je 0x140157e84
mov rcx, r12
call fcn.14013f630
mov r14, rax
movzx ecx, byte [rax]
cmp cl, 0xa
je 0x140157796
cmp cl, 0xd
je 0x140157796
mov edx, dword [rbx + 0x144]
mov esi, 2
lea ecx, [rdx + 1]
mov dword [rbx + 0x144], ecx
test edx, edx
jne 0x1401576a3
mov rax, qword [r15 + 0x2e8]
mov ecx, dword [rax + 0x84]
test cl, 3
je 0x14015756b
lea rax, [rsp + 0xb0]
mov byte [rsp + 0xb0], dl
mov qword [rsp + 0x30], rax
lea rsi, [rbx + 0x158]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rsi
lea r9, [rsp + 0x44]
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x48]
mov dword [rsp + 0x44], ebp
lea rdx, [0x14000cfb8]
mov rcx, r14
call fcn.14013eb10
mov edi, eax
cmp eax, 1
jne 0x140157452
cmp dword [rsp + 0x48], 2
jl 0x140157452
mov r9, rsi
lea r8, [rsp + 0x4c]
lea rdx, [0x14000cfd0]
mov rcx, r14
call fcn.14013eb10
cmp eax, 2
jne 0x140157452
mov byte [r15 + 0x617], 0
lea edi, [rax + 2]
mov byte [rsp + 0x40], 0x20
jmp 0x140157481
movzx eax, byte [rsp + 0xb0]
sub al, 0x30
cmp al, 9
jbe 0x140157f2c
cmp edi, 4
jl 0x14015750b
cmp dword [rsi], 0x64
jl 0x140157f2c
cmp byte [rsp + 0x40], 0x20
jne 0x140157f13
mov eax, dword [rsp + 0x48]
lea ecx, [rax + rax*4]
mov eax, dword [rsp + 0x44]
lea r9d, [rax + rcx*2]
mov ecx, r9d
mov dword [rsp + 0x44], r9d
sub ecx, 0xa
je 0x1401574a6
cmp ecx, 1
jne 0x140157edd
mov byte [r15 + 0x617], r9b
cmp dword [rbx + 0x174], 3
jne 0x1401574cb
cmp r9b, 0x14
je 0x1401574cb
lea rdx, [0x14000d040]
mov rcx, rbx
call fcn.14014b400
cmp byte [r15 + 0x617], 0x14
jae 0x1401574e2
mov rax, qword [r15 + 0x5d8]
mov dword [rax], 0xffffffff
test edi, edi
jne 0x1401575c0
mov byte [rbx + 0x1c2], 0
xor eax, eax
mov rbx, qword [rsp + 0xb8]
add rsp, 0x70
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
test edi, edi
jne 0x140157f13
mov r8, rsi
lea rdx, [0x14000d068]
mov rcx, r14
call fcn.14013eb10
mov byte [r15 + 0x617], 0xa
test eax, eax
jne 0x1401575c0
mov rcx, r12
call fcn.14013f620
mov rcx, r12
mov rdi, rax
call fcn.14013f630
mov rdx, rax
mov r8, rdi
mov rcx, rbx
call fcn.140158300
cmp eax, 1
jne 0x1401574ea
mov dword [rsi], 0xc8
mov byte [r15 + 0x617], 0xa
jmp 0x1401575c0
bt ecx, 0x12
jae 0x1401574ea
lea rax, [rsp + 0x41]
mov rcx, r14
lea rsi, [rbx + 0x158]
mov qword [rsp + 0x28], rsi
lea r9, [rsp + 0x50]
lea r8, [rsp + 0x54]
mov qword [rsp + 0x20], rax
lea rdx, [0x14000d0a0]
call fcn.14013eb10
cmp eax, 4
jne 0x1401574ea
cmp byte [rsp + 0x41], 0x20
jne 0x1401574ea
mov byte [r15 + 0x617], 0xb
mov eax, dword [rsi]
movzx ecx, byte [rbx + 0x10e9]
mov dword [rbx + 0x1290], eax
movzx eax, byte [r15 + 0x617]
mov dword [rbx + 0x1298], eax
movzx eax, byte [r15 + 0x617]
test cl, cl
je 0x1401575ed
cmp cl, al
jbe 0x1401575f3
mov byte [rbx + 0x10e9], al
cmp qword [rbx + 0x10f8], 0
je 0x140157615
cmp byte [rbx + 0x1160], 0
jne 0x140157615
cmp dword [rsi], 0x1a0
jne 0x140157615
mov byte [rbx + 0x1c5], 1
movzx eax, byte [r15 + 0x617]
cmp al, 0xa
jne 0x14015763f
lea rdx, [0x14000cdf8]
mov rcx, rbx
call fcn.14014b400
mov edx, 1
mov rcx, r15
call fcn.14014c330
jmp 0x14015765e
cmp al, 0x14
je 0x140157651
cmp dword [rbx + 0x174], 2
jne 0x14015765e
cmp dword [rsi], 0x65
jne 0x14015765e
mov rax, qword [r15 + 0x5d8]
mov dword [rax], 2
mov ecx, dword [rsi]
lea eax, [rcx - 0x64]
cmp eax, 0x63
setbe al
mov byte [rbx + 0x1c6], al
sub ecx, 0xcc
je 0x14015768c
cmp ecx, 0x64
jne 0x14015769e
cmp byte [rbx + 0x518], 0
je 0x14015768c
mov byte [rbx + 0x1374], 1
mov qword [r13], rbp
mov qword [rbx + 0xf0], rbp
mov byte [rbx + 0x1c6], 1
mov esi, 6
mov rcx, r12
call fcn.14013f630
mov rcx, r12
mov rdi, rax
call fcn.14013f620
mov r8, rax
xor edx, edx
mov rcx, rdi
mov rbp, rax
call fcn.140178fd0
test rax, rax
jne 0x140157f5e
mov edx, dword [rbx + 0x144]
cmp edx, 2
jl 0x140157705
movzx ecx, byte [rdi]
cmp cl, 0x20
je 0x1401576e7
cmp cl, 9
jne 0x1401576ec
cmp edx, 2
jg 0x140157705
mov r8, rbp
mov edx, 0x3a
mov rcx, rdi
call fcn.140178fd0
test rax, rax
je 0x140157f45
mov r8, r14
mov rdx, r15
mov rcx, rbx
call fcn.1401562b0
test eax, eax
jne 0x1401574f3
cmp byte [rbx + 0xa2b], al
je 0x140157726
or esi, 1
mov edi, dword [rbx + 0x158]
mov rcx, r12
call fcn.14013f620
mov r9, rax
mov r8, r14
mov edx, 1
mov rcx, rbx
call fcn.14014b230
mov rcx, r12
call fcn.14013f620
mov edx, esi
mov r9, rax
or edx, 0x10
lea eax, [rdi - 0x64]
cmp eax, 0x64
mov r8, r14
mov rcx, rbx
cmovae edx, esi
call fcn.14014b4a0
test eax, eax
jne 0x1401574f3
mov rcx, r12
call fcn.14013f620
add qword [rbx + 0x12a8], rax
mov rcx, r12
call fcn.14013f620
add qword [rbx + 0x108], rax
jmp 0x140157e50
mov ecx, dword [rbx + 0x158]
lea eax, [rcx - 0x64]
cmp eax, 0x63
ja 0x140157839
sub ecx, 0x64
je 0x1401577fb
cmp ecx, 1
je 0x1401577d3
lea r13, [rbx + 0x1c2]
mov dword [rbx + 0x144], ebp
mov byte [r13], 1
lea rsi, [rbx + 0xe8]
mov rdi, r13
jmp 0x1401578aa
cmp dword [rbx + 0x174], 2
je 0x140157f77
lea r13, [rbx + 0x1c2]
mov byte [r13], 0
lea rsi, [rbx + 0xe8]
mov rdi, r13
jmp 0x1401578aa
cmp dword [rbx + 0x170], 0
lea r13, [rbx + 0x1c2]
mov byte [r13], 1
mov dword [rbx + 0x144], ebp
jle 0x14015782d
or dword [rbx + 0x15c], 2
xor edx, edx
mov rcx, rbx
mov dword [rbx + 0x170], ebp
call fcn.140138f60
mov rdi, r13
lea rsi, [rbx + 0xe8]
jmp 0x1401578aa
lea r13, [rbx + 0x1c2]
lea rsi, [rbx + 0xe8]
mov byte [r13], 0
cmp qword [rsi], 0xffffffffffffffff
mov rdi, r13
jne 0x1401578af
cmp byte [rbx + 0x1c7], 0
jne 0x1401578af
cmp byte [r15 + 0x2ce], 0
jne 0x1401578af
cmp byte [r15 + 0x617], 0xb
jne 0x1401578af
mov rax, qword [r15 + 0x2e8]
test dword [rax + 0x84], 0x40000
jne 0x1401578af
cmp byte [rbx + 0x1160], 5
je 0x1401578af
lea rdx, [0x14000cea0]
mov rcx, rbx
call fcn.14014b400
mov edx, 2
mov rcx, r15
call fcn.14014c330
cmp byte [rdi], 0
jne 0x1401578ff
cmp byte [rbx + 0x1c8], 0
jne 0x1401578f0
cmp byte [rsi + 0xdf], 0
jne 0x1401578f0
mov rdx, qword [rsi]
cmp rdx, 0xffffffffffffffff
je 0x1401578ff
mov rax, qword [rbx + 0x6d8]
test rax, rax
je 0x1401578df
cmp rdx, rax
jg 0x140157fa7
mov rcx, rbx
call fcn.140158ec0
mov rax, qword [rsi]
mov qword [rsi + 8], rax
jmp 0x1401578ff
mov qword [rsi + 8], 0xffffffffffffffff
mov qword [rsi], 0xffffffffffffffff
movzx eax, byte [r15 + 0x2ce]
test al, al
je 0x140157999
mov eax, dword [rbx + 0x158]
cmp eax, 0x191
jne 0x140157926
cmp dword [r15 + 0x3b0], 2
je 0x140157937
cmp eax, 0x197
jne 0x140157959
cmp dword [r15 + 0x3b4], 2
jne 0x140157959
lea rdx, [0x14000ced8]
mov rcx, rbx
call fcn.14014b400
mov byte [rbx + 0x127d], 1
movzx eax, byte [r15 + 0x2ce]
test al, al
je 0x140157999
mov eax, dword [rbx + 0x158]
cmp eax, 0x191
jne 0x140157972
cmp dword [r15 + 0x4a8], 1
je 0x140157983
jmp 0x140157999
cmp eax, 0x197
jne 0x140157999
cmp dword [r15 + 0x4ac], 1
jne 0x140157999
lea rdx, [0x14000ced8]
mov rcx, rbx
call fcn.14014b400
mov byte [rbx + 0x127d], 1
cmp dword [r15 + 0x4a8], 3
jne 0x1401579ba
cmp dword [rbx + 0x158], 0x191
je 0x1401579ba
mov dword [r15 + 0x4a8], 4
cmp dword [r15 + 0x4ac], 3
jne 0x1401579db
cmp dword [rbx + 0x158], 0x197
je 0x1401579db
mov dword [r15 + 0x4ac], 4
mov eax, dword [rbx + 0x158]
mov rcx, r12
sub eax, 0x64
cmp eax, 0x64
mov eax, ebp
sbb edi, edi
and edi, 0x10
cmp byte [rbx + 0xa2b], 0
setne al
add eax, 2
or edi, eax
call fcn.14013f620
lea rcx, [rbx + 0xc10]
mov r12, rax
call fcn.14013f630
mov r8, rax
mov r9, r12
mov edx, edi
mov rcx, rbx
call fcn.14014b4a0
test eax, eax
jne 0x1401574f3
mov rdx, qword [rbx + 0x108]
movsxd rcx, r12d
add qword [rbx + 0x12a8], rcx
add rdx, rcx
mov qword [rbx + 0x108], rdx
mov rcx, rbx
mov r8d, dword [rbx + 0x158]
call fcn.1401586c0
test al, al
jne 0x14015801e
mov rdi, qword [rbx + 0x18]
lea eax, [r8 - 0x64]
cmp eax, 0x63
mov eax, 0xffffffff
cmova rdx, rbp
xor bpl, bpl
mov qword [rbx + 0x110], rdx
xor r14b, r14b
mov rcx, qword [rbx + 0x8f0]
xor esi, esi
test rcx, rcx
mov edx, 0xffffffbf
cmovne edx, eax
lea eax, [r8 - 0x64]
cmp eax, 0x63
jbe 0x140157cd2
cmp byte [rbx + 0x127d], sil
je 0x140157abc
movzx eax, byte [rbx + 0xa26]
neg al
sbb esi, esi
and esi, 0x16
jmp 0x140157cca
cmp qword [rbx + 0x1258], rsi
jne 0x140157aca
test rcx, rcx
je 0x140157b34
cmp r8d, 0x191
je 0x140157ae5
cmp byte [rdi + 0x2d8], sil
je 0x140157b34
cmp r8d, 0x12c
jge 0x140157b34
lea rcx, [rbx + 0xd58]
call fcn.140158a90
movzx ebp, al
test al, al
jne 0x140157aff
mov byte [rbx + 0x127d], 1
cmp dword [rbx + 0xd5c], 8
jne 0x140157b34
cmp byte [rdi + 0x617], 0xb
jbe 0x140157b34
lea rdx, [0x14000c3d8]
mov rcx, rbx
call fcn.14014b400
mov edx, 1
mov rcx, rdi
call fcn.14014c330
mov byte [rbx + 0x10e8], 2
cmp byte [rdi + 0x2ca], sil
je 0x140157b7a
mov eax, dword [rbx + 0x158]
cmp eax, 0x197
je 0x140157b5a
cmp byte [rdi + 0x2d8], sil
je 0x140157b7a
cmp eax, 0x12c
jge 0x140157b7a
lea rcx, [rbx + 0xd68]
mov edx, 0xffffffbf
call fcn.140158a90
movzx r14d, al
test al, al
jne 0x140157b7a
mov byte [rbx + 0x127d], 1
test bpl, bpl
jne 0x140157beb
test r14b, r14b
jne 0x140157beb
cmp dword [rbx + 0x158], 0x12c
jge 0x140157c4d
cmp byte [rbx + 0xd64], sil
jne 0x140157c4d
cmp byte [rdi + 0x2d8], sil
je 0x140157c4d
movzx eax, byte [rbx + 0x1160]
test al, al
je 0x140157c4d
cmp al, 5
je 0x140157c4d
mov rcx, qword [rbx + 0x1168]
call qword [case.0x14013eae8.0]
mov qword [rbx + 0x198], rax
test rax, rax
je 0x140157fc0
mov byte [rbx + 0xd64], 1
jmp 0x140157c4d
movzx eax, byte [rbx + 0x1160]
test al, al
je 0x140157c18
cmp al, 5
je 0x140157c18
cmp byte [rbx + 0x128b], sil
jne 0x140157c18
mov rdx, rdi
mov rcx, rbx
call fcn.1401584c0
mov esi, eax
test eax, eax
jne 0x140157fc5
mov rcx, qword [rbx + 0x198]
call qword [fcn.14017dbf0]
mov rcx, qword [rbx + 0x1168]
mov qword [rbx + 0x198], 0
call qword [case.0x14013eae8.0]
mov qword [rbx + 0x198], rax
test rax, rax
je 0x140157fc0
cmp byte [rbx + 0xa26], 0
mov r8d, dword [rbx + 0x158]
je 0x140157cca
cmp r8d, 0x190
jl 0x140157cca
cmp qword [rbx + 0x10f8], 0
je 0x140157c82
cmp byte [rbx + 0x1160], 0
jne 0x140157c82
cmp r8d, 0x1a0
je 0x140157cca
cmp r8d, 0x191
je 0x140157ca3
cmp r8d, 0x197
jne 0x140157cb6
mov rax, qword [rbx + 0x18]
cmp byte [rax + 0x2ca], 0
jne 0x140157cad
jmp 0x140157cb6
cmp qword [rbx + 0x1258], 0
je 0x140157cb6
cmp byte [rbx + 0x127d], 0
je 0x140157cca
lea rdx, [0x14000c3f8]
mov rcx, rbx
call fcn.14014b310
mov esi, socket
test esi, esi
jne 0x140157fc5
cmp dword [rbx + 0x158], 0x12c
jl 0x140157e37
cmp byte [r15 + 0x2d8], 0
jne 0x140157e0e
cmp byte [r15 + 0x2ce], 0
jne 0x140157e0e
cmp byte [rbx + 0x128b], 0
jne 0x140157e17
movzx ecx, byte [rbx + 0x1160]
sub ecx, 1
je 0x140157d2a
sub ecx, 1
je 0x140157d2a
sub ecx, 1
je 0x140157d2a
cmp ecx, 1
jne 0x140157e0e
xor edx, edx
mov rcx, rbx
call fcn.140138f60
cmp byte [rbx + 0x1c4], 0
jne 0x140157e0e
cmp dword [rbx + 0x158], 0x1a1
jne 0x140157d91
cmp byte [rbx + 0x127f], 0
je 0x140157d91
lea rdx, [0x14000cf10]
mov rcx, rbx
call fcn.14014b400
mov rcx, qword [rbx + 0x1168]
mov byte [rbx + 0x1280], 1
call qword [case.0x14013eae8.0]
lea rdx, [rbx + 0xe8]
mov rcx, rbx
mov qword [rbx + 0x198], rax
call fcn.14014fd50
jmp 0x140157e0e
cmp byte [rbx + 0xa27], 0
mov rcx, rbx
je 0x140157dc5
lea rdx, [0x14000cf30]
call fcn.14014b400
cmp dword [rbx + 0x170], 0
jle 0x140157e0e
or dword [rbx + 0x15c], 2
mov dword [rbx + 0x170], 0
jmp 0x140157e0e
lea rdx, [0x14000cf60]
call fcn.14014b400
mov edx, 2
mov rcx, r15
call fcn.14014c330
lea rdx, [rbx + 0xe8]
mov rcx, rbx
call fcn.14014fd50
test eax, eax
jne 0x1401574f3
mov byte [rbx + 0x1c4], 1
cmp byte [rbx + 0x127f], al
je 0x140157e0e
mov dword [rbx + 0x170], 3
cmp byte [rbx + 0x128b], 0
je 0x140157e37
cmp qword [r15 + 0x310], 0xffffffffffffffff
je 0x140157e37
lea rdx, [0x14000cf90]
mov rcx, rbx
call fcn.14014b400
or dword [rbx + 0x15c], 2
cmp byte [r13], 0
je 0x140157fcc
lea r12, [rbx + 0xc10]
lea r13, [rbx + 0xe8]
mov rcx, r12
call fcn.14013f640
mov rdi, qword [rbx + 0x148]
cmp byte [rdi], 0
je 0x1401574f1
mov rsi, qword [rsp + 0xc0]
mov r14, rdi
mov rcx, rdi
mov rsi, qword [rsi]
mov rbp, rsi
mov r8, rsi
jmp 0x1401572f5
mov edx, 2
mov rcx, r15
call fcn.14014c330
cmp byte [rbx + 0xa4a], 0
je 0x1401580a1
mov byte [rbx + 0x1c2], 0
cmp qword [rsi], 0
je 0x140157eba
mov dword [rbx + 0x140], 1
jmp 0x1401574f1
mov rax, qword [rsp + 0x58]
mov dword [rbx + 0x140], 2
mov qword [rsi], rax
mov rax, qword [rsp + 0x60]
mov qword [rbx + 0x148], rax
jmp 0x1401574f1
mov eax, 0x66666667
imul r9d
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
mov r8d, edx
lea ecx, [rdx + rdx*4]
add ecx, ecx
lea rdx, [0x14000d010]
sub r9d, ecx
mov rcx, rbx
call fcn.14014b310
mov eax, 1
jmp 0x1401574f3
lea rdx, [0x14000d078]
mov rcx, rbx
call fcn.14014b310
mov eax, 1
jmp 0x1401574f3
lea rdx, [0x14000cfe0]
mov rcx, rbx
call fcn.14014b310
mov eax, 1
jmp 0x1401574f3
lea rdx, [0x14000ce38]
mov rcx, rbx
call fcn.14014b310
mov eax, 8
jmp 0x1401574f3
lea rdx, [0x14000ce20]
mov rcx, rbx
call fcn.14014b310
mov eax, 8
jmp 0x1401574f3
lea rdx, [0x14000ce78]
mov rcx, rbx
call fcn.14014b400
mov eax, 1
mov dword [rbx + 0x174], 3
mov byte [rbx + 0x1c2], 1
mov dword [rbx + 0x144], ebp
jmp 0x1401574f3
lea rdx, [0x14000cbc0]
mov rcx, rbx
call fcn.14014b310
mov eax, 0x3f
jmp 0x1401574f3
mov esi, 0x1b
mov eax, esi
jmp 0x1401574f3
cmp byte [rbx + 0x1cc], 0
mov rcx, qword [rsp + 0xc8]
je 0x140157fe4
mov byte [rcx], 1
mov al, 1
jmp 0x140157fe7
movzx eax, byte [rcx]
cmp qword [rbx + 0xf0], 0
jne 0x140157ff6
mov byte [rcx], 1
jmp 0x140157ffa
test al, al
je 0x140158001
and dword [rbx + 0x15c], 0xfffffffe
mov r8, qword [rsp + 0xb0]
mov r9, r12
mov edx, 1
mov rcx, rbx
call fcn.14014b230
jmp 0x1401574f1
lea rdx, [0x14000c3f8]
call fcn.14014b310
mov eax, socket
jmp 0x1401574f3
mov r8, rbp
mov rcx, r12
call fcn.14013f5c0
test eax, eax
jne 0x1401574f3
cmp dword [rbx + 0x144], eax
jne 0x1401574f1
mov rcx, r12
call fcn.14013f620
mov rcx, r12
mov rdi, rax
call fcn.14013f630
mov r8, rdi
mov rdx, rax
mov rcx, rbx
call fcn.140158300
cmp eax, 2
jne 0x1401574f1
mov edx, eax
mov byte [rbx + 0x1c2], 0
mov rcx, r15
mov dword [rbx + 0x140], eax
call fcn.14014c330
cmp byte [rbx + 0xa4a], 0
jne 0x1401574f1
lea rdx, [0x14000ce50]
mov rcx, rbx
call fcn.14014b310
mov eax, 1
jmp 0x1401574f3