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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
movsd xmm0, qword [ebp + 0x14]
movsd qword [ebp + 0x14], xmm0
mov edx, dword [ebp + 0x14]
mov eax, edx
mov ecx, dword [ebp + 0x18]
or eax, ecx
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x10], edx
jne 0xa658ac3
mov edi, dword [ebp + 0x1c]
xor ecx, ecx
test edi, edi
mov eax, ebx
setne cl
sub eax, esi
inc ecx
add ecx, edi
cmp eax, ecx
jl 0xa658e63
mov byte [esi], 0x30
inc esi
test edi, edi
je 0xa658ab5
mov byte [esi], 0x2e
inc esi
lea eax, [ebp + 0xf]
mov byte [ebp + 0xf], 0x30
push eax
push edi
push esi
call fcn.0a659873
add esp, 0xc
add esi, edi
mov eax, dword [ebp + 8]
and dword [eax + 4], 0
mov dword [eax], esi
jmp 0xa658e6f
mov eax, ecx
shr ecx, 0x14
push 9
and eax, 0xfffff
mov dword [ebp - 0xc], eax
pop edi
mov dword [ebp - 0x1c], edi
test ecx, ecx
jne 0xa658ae6
mov dword [ebp - 4], 0xfffffbce
jmp 0xa658beb
add ecx, 0xfffffbcd
mov byte [ebp + 0x1b], 0
or eax, 0x100000
mov dword [ebp - 4], ecx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], edx
mov dword [ebp - 0xc], eax
cmp ecx, 0xffffffcc
jl 0xa658beb
test ecx, ecx
jns 0xa658b1d
and dword [ebp - 0x20], 0
xor edx, edx
push 0x78
inc edx
pop eax
mov dword [ebp - 0x18], edx
jmp 0xa658b61
lea edx, [ecx + 0xf]
mov dword [ebp - 4], ecx
shr edx, 4
mov eax, edx
mov dword [ebp - 0x20], edx
shl eax, 4
add eax, 0x78
mov dword [ebp - 0x28], eax
imul eax, edx, 0x134410
xor edx, edx
shr eax, 0x12
add eax, 0x19
div edi
mov edx, eax
mov eax, dword [ebp + 0x14]
sub edx, 1
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], edx
mov dword [ebp - 0xc], eax
js 0xa658beb
mov eax, dword [ebp - 0x28]
mov esi, dword [ebp - 0x14]
sub eax, ecx
add eax, 8
mov dword [ebp - 4], ecx
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0x14]
shld esi, eax, 8
shl eax, 8
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x28], esi
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x20]
push dword [ebp - 0x2c]
movzx eax, word [eax*2 + 0xa593348]
add eax, edx
imul eax, eax, 0x18
add eax, 0xa5f3380
push eax
push dword [ebp - 0x28]
push dword [ebp - 0x30]
call fcn.0a65c6fa
add esp, 0x10
mov dword [ebp + 0xc], eax
cmp byte [ebp + 0x1b], 0
je 0xa658d2e
mov ecx, ebx
sub ecx, esi
cmp ecx, edi
jl 0xa658e63
push esi
push eax
call fcn.0a6589d9
pop ecx
pop ecx
add esi, edi
mov al, byte [ebp + 0x1b]
mov edx, dword [ebp - 0x18]
sub edx, 1
mov dword [ebp - 0x18], edx
jns 0xa658b8e
test al, al
jne 0xa658bf7
cmp esi, ebx
je 0xa658e63
mov byte [esi], 0x30
inc esi
mov edi, dword [ebp + 0x1c]
test edi, edi
je 0xa658c0a
cmp esi, ebx
je 0xa658e63
mov byte [esi], 0x2e
inc esi
mov ecx, dword [ebp - 4]
test ecx, ecx
jns 0xa658e57
mov eax, ecx
cdq
and edx, 0xf
add eax, edx
xor edx, edx
sar eax, 4
neg eax
mov dword [ebp + 0x18], eax
mov eax, edi
div dword [ebp - 0x1c]
xor edx, edx
mov dword [ebp - 0x2c], eax
inc eax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 8], edx
movzx eax, byte [eax + 0xa593458]
cmp dword [ebp - 0x14], eax
jbe 0xa658e57
test eax, eax
je 0xa658c7f
imul ecx, eax, 9
mov dword [ebp - 8], eax
mov eax, ebx
sub eax, esi
mov dword [ebp - 0x30], ecx
cmp eax, ecx
jl 0xa658e63
lea eax, [ebp + 0xf]
mov byte [ebp + 0xf], 0x30
push eax
push ecx
push esi
call fcn.0a659873
mov ecx, dword [ebp - 4]
add esp, 0xc
add esi, dword [ebp - 0x30]
mov edx, dword [ebp - 8]
cmp edx, dword [ebp - 0x14]
jae 0xa658ab5
mov eax, ebx
sub eax, esi
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x18]
movzx eax, word [eax*2 + 0xa5933c8]
mov dword [ebp + 0xc], eax
mov eax, dword [ebp + 0x18]
movzx eax, byte [eax + 0xa593458]
sub dword [ebp + 0xc], eax
mov eax, dword [ebp + 0x18]
add dword [ebp + 0xc], edx
movzx eax, word [eax*2 + 0xa5933ca]
cmp dword [ebp + 0xc], eax
jae 0xa658e52
push 8
pop eax
sub eax, dword [ebp + 0x18]
shl eax, 4
sub eax, ecx
mov ecx, dword [ebp - 0x10]
push eax
imul eax, dword [ebp + 0xc], 0x18
add eax, 0xa5fa640
push eax
mov eax, dword [ebp - 0xc]
shld eax, ecx, 8
shl ecx, 8
push eax
push ecx
call fcn.0a65c6fa
mov ecx, eax
add esp, 0x10
mov eax, dword [ebp - 8]
mov dword [ebp + 0xc], ecx
cmp eax, dword [ebp - 0x2c]
jae 0xa658d66
cmp dword [ebp - 0x18], 9
jl 0xa658e63
push esi
push ecx
call fcn.0a6589d9
mov edx, dword [ebp - 8]
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
push 9
pop eax
sub dword [ebp - 0x18], eax
add esi, eax
inc edx
mov dword [ebp - 8], edx
cmp edx, dword [ebp - 0x14]
jb 0xa658c8f
jmp 0xa658ab5
test eax, eax
je 0xa658bd9
push eax
call fcn.0a65c1b8
pop ecx
mov ecx, ebx
mov dword [ebp + 0x18], eax
sub ecx, esi
cmp ecx, eax
jl 0xa658e63
push esi
push dword [ebp + 0xc]
push eax
call fcn.0a658911
add esp, 0xc
mov al, 1
add esi, dword [ebp + 0x18]
mov byte [ebp + 0x1b], al
jmp 0xa658bdc
imul eax, eax, 9
mov ecx, edi
push 9
xor edx, edx
sub ecx, eax
pop eax
sub eax, ecx
mov dword [ebp + 0x18], ecx
push 5
mov dword [ebp - 0x1c], eax
pop eax
je 0xa658dd3
mov ebx, dword [ebp - 0x1c]
mov eax, dword [ebp + 0xc]
xor edx, edx
mov dword [ebp + 0xc], 0xa
div dword [ebp + 0xc]
sub ebx, 1
jne 0xa658d85
mov ebx, dword [ebp + 0x10]
push 5
mov dword [ebp + 0xc], eax
pop eax
cmp edx, eax
jne 0xa658dd3
mov eax, dword [ebp - 4]
not eax
sub eax, edi
test eax, eax
jle 0xa658dce
cmp eax, 0x3c
jge 0xa658dc9
push eax
push dword [ebp - 0xc]
push dword [ebp - 0x10]
call fcn.0a65c8ab
mov ecx, dword [ebp + 0x18]
add esp, 0xc
test al, al
jne 0xa658dce
xor edi, edi
inc edi
jmp 0xa658dd9
push 2
pop edi
jmp 0xa658dd9
cmp eax, edx
sbb edi, edi
neg edi
test ecx, ecx
je 0xa658df5
mov eax, ebx
sub eax, esi
cmp eax, ecx
jl 0xa658e63
push esi
push dword [ebp + 0xc]
push ecx
call fcn.0a6588ab
add esp, 0xc
add esi, dword [ebp + 0x18]
test edi, edi
je 0xa658ab5
mov eax, esi
mov edx, ebx
cmp esi, dword [ebp - 0x24]
je 0xa658e22
dec eax
mov cl, byte [eax]
cmp cl, 0x2e
jne 0xa658e12
mov edx, eax
jmp 0xa658e1d
cmp cl, 0x39
jne 0xa658e3b
xor edi, edi
mov byte [eax], 0x30
inc edi
cmp eax, dword [ebp - 0x24]
jne 0xa658e06
mov byte [eax], 0x31
cmp edx, ebx
je 0xa658e2e
mov word [edx], 0x2e30
cmp esi, ebx
je 0xa658e63
mov byte [esi], 0x30
inc esi
jmp 0xa658ab5
cmp edi, 1
je 0xa658e49
test cl, 1
je 0xa658ab5
inc cl
mov byte [eax], cl
jmp 0xa658ab5
imul eax, edx, 9
sub edi, eax
mov eax, ebx
sub eax, esi
cmp eax, edi
jge 0xa658aa1
mov eax, dword [ebp + 8]
mov dword [eax], ebx
mov dword [eax + 4], 0x84
pop edi
pop esi
pop ebx
leave
ret