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

Disassembly:
sub esp, 0xc
mov eax, dword [esp + 0x10]
push ebx
push ebp
push esi
mov ecx, dword [eax]
mov esi, dword [eax + 8]
push edi
mov dword [esp + 0x18], 0xffffffff
cmp byte [ecx], 0x30
jne 0x10087ec2
dec esi
mov dword [esp + 0x14], esi
lea edx, [esi + 1]
push edx
call fcn.100a1307
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x10087ed8
mov edx, 9
mov byte [esi + ebp], 0
mov dword [esp + 0x10], edx
mov ecx, esi
mov eax, 0x30303030
mov ebx, ecx
mov edi, ebp
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, ebx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x24]
mov ecx, dword [eax + 8]
dec ecx
cmp ecx, 0xffffffff
jle 0x10087dfa
mov eax, dword [esp + 0x24]
mov eax, dword [eax]
movsx ebx, byte [eax + ecx]
sub ebx, 0x30
imul ebx, edx
cmp ebx, 9
jle 0x10087df1
test ecx, ecx
je 0x10087e42
mov eax, 0x66666667
imul ebx
mov edi, edx
sar edi, 2
mov edx, edi
mov eax, edi
shr edx, 0x1f
add eax, edx
mov dl, byte [ecx + ebp - 1]
add dl, al
mov eax, ebx
mov byte [ecx + ebp - 1], dl
mov edi, 0xa
cdq
idiv edi
mov al, byte [ecx + ebp]
add al, dl
mov edx, dword [esp + 0x10]
mov byte [ecx + ebp], al
jmp 0x10087df4
add byte [ecx + ebp], bl
dec ecx
cmp ecx, 0xffffffff
jg 0x10087d9d
cmp byte [ebp], 0x39
jg 0x10087e42
lea eax, [esi - 1]
test eax, eax
jle 0x10087e24
mov cl, byte [eax + ebp]
cmp cl, 0x39
jle 0x10087e1f
sub cl, 0xa
mov byte [eax + ebp], cl
mov cl, byte [eax + ebp - 1]
inc cl
mov byte [eax + ebp - 1], cl
dec eax
test eax, eax
jg 0x10087e07
mov eax, dword [esp + 0x20]
mov ecx, esi
mov esi, ebp
mov edi, dword [eax]
inc edi
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x10087e3a
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jle 0x10087e55
mov esi, dword [esp + 0x14]
dec edx
cmp edx, 0xffffffff
mov dword [esp + 0x10], edx
jg 0x10087d79
jmp 0x1008801e
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x18], edx
lea eax, [ecx - 1]
cmp eax, 0xffffffff
jle 0x10087e8f
mov esi, dword [esp + 0x20]
mov edx, dword [esi]
mov bl, byte [edx + eax + 1]
lea ecx, [edx + eax + 1]
mov dl, byte [eax + ebp]
sub bl, dl
mov byte [ecx], bl
mov ecx, dword [esi]
mov bl, byte [ecx + eax + 1]
lea ecx, [ecx + eax + 1]
add bl, 0x30
dec eax
cmp eax, 0xffffffff
mov byte [ecx], bl
jg 0x10087e65
mov edx, dword [esp + 0x20]
mov eax, dword [edx + 8]
dec eax
test eax, eax
jle 0x1008801e
mov ecx, dword [edx]
cmp byte [ecx + eax], 0x30
jge 0x10087eb8
mov bl, byte [ecx + eax - 1]
dec bl
mov byte [ecx + eax - 1], bl
mov ecx, dword [edx]
add ecx, eax
add byte [ecx], 0xa
dec eax
test eax, eax
jg 0x10087e9f
jmp 0x1008801e
lea edx, [esi + 1]
mov dword [esp + 0x14], esi
push edx
call fcn.100a1307
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x10087ee2
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret
mov edx, 9
mov byte [esi + ebp], 0
mov dword [esp + 0x10], edx
mov ecx, esi
mov eax, 0x30303030
mov ebx, ecx
mov edi, ebp
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, ebx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x24]
mov ecx, dword [eax + 8]
dec ecx
cmp ecx, 0xffffffff
jle 0x10087f69
mov eax, dword [esp + 0x24]
mov eax, dword [eax]
movsx ebx, byte [eax + ecx]
sub ebx, 0x30
imul ebx, edx
cmp ebx, 9
jle 0x10087f5f
mov eax, 0x66666667
imul ebx
mov edi, edx
sar edi, 2
mov edx, edi
mov eax, edi
shr edx, 0x1f
add eax, edx
mov dl, byte [ecx + ebp]
add dl, al
mov eax, ebx
mov byte [ecx + ebp], dl
mov edi, 0xa
cdq
idiv edi
mov al, byte [ecx + ebp + 1]
add al, dl
mov edx, dword [esp + 0x10]
mov byte [ecx + ebp + 1], al
jmp 0x10087f63
add byte [ecx + ebp + 1], bl
dec ecx
cmp ecx, 0xffffffff
jg 0x10087f13
cmp byte [ebp], 0x39
jg 0x10087fb0
lea eax, [esi - 1]
test eax, eax
jle 0x10087f93
mov cl, byte [eax + ebp]
cmp cl, 0x39
jle 0x10087f8e
sub cl, 0xa
mov byte [eax + ebp], cl
mov cl, byte [eax + ebp - 1]
inc cl
mov byte [eax + ebp - 1], cl
dec eax
test eax, eax
jg 0x10087f76
mov eax, dword [esp + 0x20]
mov ecx, esi
mov esi, ebp
mov edi, dword [eax]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x10087fa8
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jle 0x10087fc0
mov esi, dword [esp + 0x14]
dec edx
cmp edx, 0xffffffff
mov dword [esp + 0x10], edx
jg 0x10087eef
jmp 0x1008801e
mov edi, dword [esp + 0x14]
xor eax, eax
test edi, edi
mov dword [esp + 0x18], edx
jle 0x10087fef
mov esi, dword [esp + 0x20]
mov dl, byte [eax + ebp]
mov ecx, dword [esi]
add ecx, eax
mov bl, byte [ecx]
sub bl, dl
mov byte [ecx], bl
mov ecx, dword [esi]
add ecx, eax
mov bl, byte [ecx]
add bl, 0x30
inc eax
cmp eax, edi
mov byte [ecx], bl
jl 0x10087fce
lea eax, [edi - 1]
test eax, eax
jle 0x1008801e
mov edx, dword [esp + 0x20]
mov ecx, dword [edx]
cmp byte [ecx + eax], 0x30
jge 0x10088019
mov bl, byte [ecx + eax - 1]
dec bl
mov byte [ecx + eax - 1], bl
mov edx, dword [edx]
lea ecx, [edx + eax]
mov dl, byte [edx + eax]
add dl, 0xa
mov byte [ecx], dl
dec eax
test eax, eax
jg 0x10087ff6
mov al, byte [esp + 0x18]
mov ecx, dword [esp + 0x28]
add al, 0x30
push ebp
mov byte [ecx], al
call fcn.100a121e
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret