Function at 0x140156534
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
mov rbp, rsp
sub rsp, 0x70
mov rax, qword [r8]
mov rsi, rcx
mov rcx, qword [rcx + 0x148]
mov r14, rdx
mov qword [rbp - 0x18], rax
mov rbx, rcx
mov qword [rbp - 0x10], rcx
mov r12, rcx
lea r13, [rsi + 0xc10]
mov r15, rax
mov rdi, rax
mov r8, rax
mov edx, 0xa
mov qword [rbp + 0x40], r12
call fcn.140173b70
mov rcx, rax
mov rdx, r12
test rax, rax
je 0x140156e87
mov rdi, qword [rbp + 0x50]
lea r8, [rcx + 1]
sub rbx, rax
mov rcx, r13
lea rax, [r15 - 1]
add rax, rbx
mov qword [rdi], rax
mov qword [rsi + 0x148], r8
sub r8, r12
call fcn.140141604
xor r15d, r15d
test eax, eax
jne 0x140156633
cmp dword [rsi + 0x144], r15d
jne 0x14015664b
mov rcx, r13
call fcn.140141648
mov rcx, r13
mov rbx, rax
call fcn.140141650
mov r8, rbx
mov rdx, rax
mov rcx, rsi
call fcn.140157464
lea ebx, [r15 + 2]
cmp eax, ebx
jne 0x140156650
mov edx, ebx
mov rcx, r14
call fcn.14014c8e0
cmp byte [rsi + 0xa4a], r15b
je 0x140156ef8
mov byte [rsi + 0x1c2], r15b
cmp qword [rdi], r15
je 0x140156d67
mov dword [rsi + 0x140], 1
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
mov ebx, 2
mov rcx, r13
call fcn.140141650
mov r12, rax
cmp byte [rax], 0xa
je 0x140156964
cmp byte [rax], 0xd
je 0x140156964
mov edx, dword [rsi + 0x144]
mov r15d, ebx
lea ecx, [rdx + 1]
mov dword [rsi + 0x144], ecx
test edx, edx
jne 0x14015686d
mov rax, qword [r14 + 0x2e8]
mov ecx, dword [rax + 0x84]
test cl, 3
je 0x140156805
lea rax, [rbp + 0x40]
xor r15d, r15d
mov qword [rsp + 0x30], rax
lea rdi, [rsi + 0x158]
lea rax, [rbp - 0x30]
mov qword [rsp + 0x28], rdi
lea r9, [rbp - 0x2c]
mov qword [rsp + 0x20], rax
lea r8, [rbp - 0x28]
mov dword [rbp - 0x2c], r15d
lea rdx, [0x14000d008]
mov byte [rbp + 0x40], r15b
mov rcx, r12
call fcn.140140c24
mov ebx, eax
cmp eax, 1
jne 0x140156715
cmp dword [rbp - 0x28], 2
jl 0x140156715
mov r9, rdi
lea r8, [rbp - 0x24]
lea rdx, [0x14000d020]
mov rcx, r12
call fcn.140140c24
cmp eax, 2
jne 0x140156715
mov byte [r14 + 0x617], r15b
lea ebx, [rax + 2]
mov byte [rbp - 0x30], 0x20
jmp 0x14015673a
mov al, byte [rbp + 0x40]
sub al, 0x30
cmp al, 9
jbe 0x140156dc1
cmp ebx, 4
jl 0x140156797
cmp dword [rdi], 0x64
jl 0x140156dc1
cmp byte [rbp - 0x30], 0x20
jne 0x140156db5
mov eax, dword [rbp - 0x28]
lea ecx, [rax + rax*4]
mov eax, dword [rbp - 0x2c]
lea r9d, [rax + rcx*2]
mov ecx, r9d
mov dword [rbp - 0x2c], r9d
sub ecx, 0xa
je 0x14015675c
cmp ecx, 1
jne 0x140156d84
mov byte [r14 + 0x617], r9b
cmp dword [rsi + 0x174], 3
jne 0x140156781
cmp r9b, 0x14
je 0x140156781
lea rdx, [0x14000d090]
mov rcx, rsi
call fcn.14014bb34
cmp byte [r14 + 0x617], 0x14
jae 0x1401567fb
mov rax, qword [r14 + 0x5d8]
or dword [rax], 0xffffffff
jmp 0x1401567fb
test ebx, ebx
jne 0x140156db5
mov r8, rdi
lea rdx, [0x14000d0b8]
mov rcx, r12
call fcn.140140c24
mov byte [r14 + 0x617], 0xa
test eax, eax
jne 0x140156856
mov rcx, r13
call fcn.140141648
mov rcx, r13
mov rbx, rax
call fcn.140141650
mov rdx, rax
mov r8, rbx
mov rcx, rsi
call fcn.140157464
cmp eax, 1
jne 0x140156dd0
mov dword [rdi], 0xc8
mov ebx, eax
mov byte [r14 + 0x617], 0xa
test ebx, ebx
je 0x140156dd0
jmp 0x140156856
bt ecx, 0x12
jae 0x140156dcd
lea rax, [rsi + 0x158]
mov rcx, r12
mov qword [rsp + 0x28], rax
lea r9, [rbp - 0x20]
lea rax, [rbp - 0x2f]
lea r8, [rbp - 0x1c]
mov qword [rsp + 0x20], rax
lea rdx, [0x14000d0f0]
call fcn.140140c24
cmp eax, 4
jne 0x140156dcd
cmp byte [rbp - 0x2f], 0x20
jne 0x140156dcd
mov byte [r14 + 0x617], 0xb
mov rdx, r14
mov rcx, rsi
call fcn.1401570e8
test eax, eax
jne 0x140156633
lea r15d, [rax + 6]
mov rcx, r13
call fcn.140141650
mov rcx, r13
mov rbx, rax
call fcn.140141648
mov r8, rax
xor edx, edx
mov rcx, rbx
mov rdi, rax
call fcn.140173b70
test rax, rax
jne 0x140156de5
mov ecx, dword [rsi + 0x144]
cmp ecx, 2
jl 0x1401568cc
cmp byte [rbx], 0x20
je 0x1401568ae
cmp byte [rbx], 9
jne 0x1401568b3
cmp ecx, 2
jg 0x1401568cc
mov r8, rdi
mov edx, 0x3a
mov rcx, rbx
call fcn.140173b70
test rax, rax
je 0x140156ddc
mov r8, r12
mov rdx, r14
mov rcx, rsi
call fcn.1401554c4
xor ecx, ecx
test eax, eax
jne 0x140156633
mov ebx, dword [rsi + 0x158]
mov edi, r15d
or edi, 1
cmp byte [rsi + 0xa2b], cl
mov rcx, r13
cmove edi, r15d
call fcn.140141648
mov r9, rax
mov r8, r12
mov edx, 1
mov rcx, rsi
call fcn.14014b984
mov rcx, r13
call fcn.140141648
mov edx, edi
mov r9, rax
or edx, 0x10
lea eax, [rbx - 0x64]
cmp eax, 0x64
mov r8, r12
mov rcx, rsi
cmovae edx, edi
call fcn.14014bbd4
test eax, eax
jne 0x140156633
mov rcx, r13
call fcn.140141648
add qword [rsi + 0x12a8], rax
mov rcx, r13
call fcn.140141648
add qword [rsi + 0x108], rax
jmp 0x140156d36
mov ecx, dword [rsi + 0x158]
lea eax, [rcx - 0x64]
cmp eax, 0x63
ja 0x1401569e4
sub ecx, 0x64
je 0x1401569a7
cmp ecx, 1
je 0x14015698f
lea rdi, [rsi + 0x1c2]
mov dword [rsi + 0x144], r15d
mov byte [rdi], 1
jmp 0x1401569d8
cmp dword [rsi + 0x174], ebx
je 0x140156dfe
lea rdi, [rsi + 0x1c2]
mov byte [rdi], r15b
jmp 0x1401569d8
lea rdi, [rsi + 0x1c2]
mov dword [rsi + 0x144], r15d
mov byte [rdi], 1
cmp dword [rsi + 0x170], r15d
jle 0x1401569d8
or dword [rsi + 0x15c], ebx
xor edx, edx
mov rcx, rsi
mov dword [rsi + 0x170], r15d
call fcn.14013bd64
mov rbx, rdi
lea r12, [rsi + 0xe8]
jmp 0x140156a53
lea rdi, [rsi + 0x1c2]
lea r12, [rsi + 0xe8]
mov byte [rdi], r15b
cmp qword [r12], 0xffffffffffffffff
mov rbx, rdi
jne 0x140156a58
cmp byte [rsi + 0x1c7], r15b
jne 0x140156a58
cmp byte [r14 + 0x2ce], r15b
jne 0x140156a58
cmp byte [r14 + 0x617], 0xb
jne 0x140156a58
mov rax, qword [r14 + 0x2e8]
test dword [rax + 0x84], 0x40000
jne 0x140156a58
cmp byte [rsi + 0x1160], 5
je 0x140156a58
lea rdx, [0x14000cef0]
mov rcx, rsi
call fcn.14014bb34
mov edx, 2
mov rcx, r14
call fcn.14014c8e0
cmp byte [rbx], r15b
jne 0x140156a68
mov rcx, rsi
call fcn.14015706c
test eax, eax
jne 0x140156633
mov al, byte [r14 + 0x2ce]
mov ebx, 0x191
test al, al
je 0x140156aff
mov eax, dword [rsi + 0x158]
cmp eax, ebx
jne 0x140156a90
cmp dword [r14 + 0x3b0], 2
je 0x140156aa1
cmp eax, 0x197
jne 0x140156ac2
cmp dword [r14 + 0x3b4], 2
jne 0x140156ac2
lea rdx, [0x14000cf28]
mov rcx, rsi
call fcn.14014bb34
mov byte [rsi + 0x127d], 1
mov al, byte [r14 + 0x2ce]
test al, al
je 0x140156aff
mov eax, dword [rsi + 0x158]
cmp eax, ebx
jne 0x140156ad8
cmp dword [r14 + 0x4a8], 1
je 0x140156ae9
jmp 0x140156aff
cmp eax, 0x197
jne 0x140156aff
cmp dword [r14 + 0x4ac], 1
jne 0x140156aff
lea rdx, [0x14000cf28]
mov rcx, rsi
call fcn.14014bb34
mov byte [rsi + 0x127d], 1
cmp dword [r14 + 0x4a8], 3
jne 0x140156b1c
cmp dword [rsi + 0x158], ebx
je 0x140156b1c
mov dword [r14 + 0x4a8], 4
cmp dword [r14 + 0x4ac], 3
jne 0x140156b3d
cmp dword [rsi + 0x158], 0x197
je 0x140156b3d
mov dword [r14 + 0x4ac], 4
mov eax, dword [rsi + 0x158]
sub eax, 0x64
cmp eax, 0x64
mov al, byte [rsi + 0xa2b]
sbb ebx, ebx
and ebx, 0x10
neg al
sbb ecx, ecx
neg ecx
add ecx, 2
or ebx, ecx
mov rcx, r13
call fcn.140141648
mov rcx, r13
mov r15, rax
call fcn.140141650
mov r8, rax
mov r9, r15
mov edx, ebx
mov rcx, rsi
call fcn.14014bbd4
xor ebx, ebx
test eax, eax
jne 0x140156633
mov r9, qword [rsi + 0x108]
movsxd rcx, r15d
add qword [rsi + 0x12a8], rcx
add r9, rcx
mov qword [rsi + 0x108], r9
mov rcx, rsi
mov r8d, dword [rsi + 0x158]
call fcn.1401578fc
test al, al
jne 0x140156e71
lea eax, [r8 - 0x64]
cmp eax, 0x63
cmova r9, rbx
mov qword [rsi + 0x110], r9
call fcn.140154504
test eax, eax
jne 0x140156633
cmp dword [rsi + 0x158], 0x12c
jl 0x140156d2e
cmp byte [r14 + 0x2d8], bl
jne 0x140156d06
cmp byte [r14 + 0x2ce], bl
jne 0x140156d06
cmp byte [rsi + 0x128b], bl
jne 0x140156d0e
movzx ecx, byte [rsi + 0x1160]
sub ecx, 1
je 0x140156c32
sub ecx, 1
je 0x140156c32
sub ecx, 1
je 0x140156c32
cmp ecx, 1
jne 0x140156d06
xor edx, edx
mov rcx, rsi
call fcn.14013bd64
cmp byte [rsi + 0x1c4], bl
jne 0x140156d06
cmp dword [rsi + 0x158], 0x1a1
jne 0x140156c93
cmp byte [rsi + 0x127f], bl
je 0x140156c93
lea rdx, [0x14000cf60]
mov rcx, rsi
call fcn.14014bb34
mov rcx, qword [rsi + 0x1168]
mov byte [rsi + 0x1280], 1
call qword [case.0x140147e69.1]
mov rdx, r12
mov rcx, rsi
mov qword [rsi + 0x198], rax
call fcn.14014fb14
jmp 0x140156d06
mov rcx, rsi
cmp byte [rsi + 0xa27], bl
je 0x140156cc1
lea rdx, [0x14000cf80]
call fcn.14014bb34
cmp dword [rsi + 0x170], ebx
jle 0x140156d06
or dword [rsi + 0x15c], 2
mov dword [rsi + 0x170], ebx
jmp 0x140156d06
lea rdx, [0x14000cfb0]
call fcn.14014bb34
mov edx, 2
mov rcx, r14
call fcn.14014c8e0
mov rdx, r12
mov rcx, rsi
call fcn.14014fb14
test eax, eax
jne 0x140156633
mov byte [rsi + 0x1c4], 1
cmp byte [rsi + 0x127f], bl
je 0x140156d06
mov dword [rsi + 0x170], 3
cmp byte [rsi + 0x128b], bl
je 0x140156d2e
cmp qword [r14 + 0x310], 0xffffffffffffffff
je 0x140156d2e
lea rdx, [0x14000cfe0]
mov rcx, rsi
call fcn.14014bb34
or dword [rsi + 0x15c], 2
cmp byte [rdi], bl
je 0x140156e2a
mov rcx, r13
call fcn.140141654
mov rbx, qword [rsi + 0x148]
xor eax, eax
cmp byte [rbx], al
je 0x140156631
mov r15, qword [rbp + 0x50]
mov r12, rbx
mov rcx, rbx
mov r15, qword [r15]
mov rdi, r15
mov r8, r15
jmp 0x140156583
mov rax, qword [rbp - 0x18]
mov dword [rsi + 0x140], ebx
mov qword [rdi], rax
mov rax, qword [rbp - 0x10]
mov qword [rsi + 0x148], rax
jmp 0x140156631
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, [0x14000d060]
sub r9d, ecx
mov rcx, rsi
call fcn.14014ba60
jmp 0x140156f07
lea rdx, [0x14000d0c8]
jmp 0x140156eff
lea rdx, [0x14000d030]
jmp 0x140156eff
xor r15d, r15d
mov byte [rsi + 0x1c2], r15b
jmp 0x140156631
lea rdx, [0x14000ce88]
jmp 0x140156dec
lea rdx, [0x14000ce70]
mov rcx, rsi
call fcn.14014ba60
mov eax, 8
jmp 0x140156633
lea rdx, [0x14000cec8]
mov rcx, rsi
call fcn.14014bb34
mov dword [rsi + 0x174], 3
mov byte [rsi + 0x1c2], 1
mov dword [rsi + 0x144], r15d
jmp 0x140156f07
mov rcx, qword [rbp + 0x58]
cmp byte [rsi + 0x1cc], bl
je 0x140156e3d
mov byte [rcx], 1
mov al, 1
jmp 0x140156e3f
mov al, byte [rcx]
cmp qword [rsi + 0xf0], rbx
jne 0x140156e4d
mov byte [rcx], 1
jmp 0x140156e51
test al, al
je 0x140156e58
and dword [rsi + 0x15c], 0xfffffffe
mov r8, qword [rbp + 0x40]
mov r9, r15
mov edx, 1
mov rcx, rsi
call fcn.14014b984
jmp 0x140156631
lea rdx, [0x14000c448]
call fcn.14014ba60
mov eax, socket
jmp 0x140156633
mov r8, rdi
mov rcx, r13
call fcn.140141604
xor edi, edi
test eax, eax
jne 0x140156633
cmp dword [rsi + 0x144], edi
jne 0x140156631
mov rcx, r13
call fcn.140141648
mov rcx, r13
mov rbx, rax
call fcn.140141650
mov r8, rbx
mov rdx, rax
mov rcx, rsi
call fcn.140157464
lea ecx, [rdi + 2]
cmp eax, ecx
jne 0x140156631
mov dword [rsi + 0x140], ecx
mov edx, ecx
mov rcx, r14
mov byte [rsi + 0x1c2], dil
call fcn.14014c8e0
cmp byte [rsi + 0xa4a], dil
jne 0x140156631
lea rdx, [0x14000cea0]
mov rcx, rsi
call fcn.14014ba60
mov eax, 1
jmp 0x140156633