Function at 0xa659c37
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 0xa659ca9
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 0xa65a049
mov byte [esi], 0x30
inc esi
test edi, edi
je 0xa659c9b
mov byte [esi], 0x2e
inc esi
lea eax, [ebp + 0xf]
mov byte [ebp + 0xf], 0x30
push eax
push edi
push esi
call fcn.0a65aa59
add esp, 0xc
add esi, edi
mov eax, dword [ebp + 8]
and dword [eax + 4], 0
mov dword [eax], esi
jmp 0xa65a055
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 0xa659ccc
mov dword [ebp - 4], 0xfffffbce
jmp 0xa659dd1
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 0xa659dd1
test ecx, ecx
jns 0xa659d03
and dword [ebp - 0x20], 0
xor edx, edx
push 0x78
inc edx
pop eax
mov dword [ebp - 0x18], edx
jmp 0xa659d47
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 0xa659dd1
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 + 0xa5933a8]
add eax, edx
imul eax, eax, 0x18
add eax, 0xa5f3748
push eax
push dword [ebp - 0x28]
push dword [ebp - 0x30]
call fcn.0a65d8bd
add esp, 0x10
mov dword [ebp + 0xc], eax
cmp byte [ebp + 0x1b], 0
je 0xa659f14
mov ecx, ebx
sub ecx, esi
cmp ecx, edi
jl 0xa65a049
push esi
push eax
call fcn.0a659bbf
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 0xa659d74
test al, al
jne 0xa659ddd
cmp esi, ebx
je 0xa65a049
mov byte [esi], 0x30
inc esi
mov edi, dword [ebp + 0x1c]
test edi, edi
je 0xa659df0
cmp esi, ebx
je 0xa65a049
mov byte [esi], 0x2e
inc esi
mov ecx, dword [ebp - 4]
test ecx, ecx
jns 0xa65a03d
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 + 0xa5934b8]
cmp dword [ebp - 0x14], eax
jbe 0xa65a03d
test eax, eax
je 0xa659e65
imul ecx, eax, 9
mov dword [ebp - 8], eax
mov eax, ebx
sub eax, esi
mov dword [ebp - 0x30], ecx
cmp eax, ecx
jl 0xa65a049
lea eax, [ebp + 0xf]
mov byte [ebp + 0xf], 0x30
push eax
push ecx
push esi
call fcn.0a65aa59
mov ecx, dword [ebp - 4]
add esp, 0xc
add esi, dword [ebp - 0x30]
mov edx, dword [ebp - 8]
cmp edx, dword [ebp - 0x14]
jae 0xa659c9b
mov eax, ebx
sub eax, esi
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x18]
movzx eax, word [eax*2 + 0xa593428]
mov dword [ebp + 0xc], eax
mov eax, dword [ebp + 0x18]
movzx eax, byte [eax + 0xa5934b8]
sub dword [ebp + 0xc], eax
mov eax, dword [ebp + 0x18]
add dword [ebp + 0xc], edx
movzx eax, word [eax*2 + 0xa59342a]
cmp dword [ebp + 0xc], eax
jae 0xa65a038
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, 0xa5faa08
push eax
mov eax, dword [ebp - 0xc]
shld eax, ecx, 8
shl ecx, 8
push eax
push ecx
call fcn.0a65d8bd
mov ecx, eax
add esp, 0x10
mov eax, dword [ebp - 8]
mov dword [ebp + 0xc], ecx
cmp eax, dword [ebp - 0x2c]
jae 0xa659f4c
cmp dword [ebp - 0x18], 9
jl 0xa65a049
push esi
push ecx
call fcn.0a659bbf
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 0xa659e75
jmp 0xa659c9b
test eax, eax
je 0xa659dbf
push eax
call fcn.0a65d37b
pop ecx
mov ecx, ebx
mov dword [ebp + 0x18], eax
sub ecx, esi
cmp ecx, eax
jl 0xa65a049
push esi
push dword [ebp + 0xc]
push eax
call fcn.0a659af7
add esp, 0xc
mov al, 1
add esi, dword [ebp + 0x18]
mov byte [ebp + 0x1b], al
jmp 0xa659dc2
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 0xa659fb9
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 0xa659f6b
mov ebx, dword [ebp + 0x10]
push 5
mov dword [ebp + 0xc], eax
pop eax
cmp edx, eax
jne 0xa659fb9
mov eax, dword [ebp - 4]
not eax
sub eax, edi
test eax, eax
jle 0xa659fb4
cmp eax, 0x3c
jge 0xa659faf
push eax
push dword [ebp - 0xc]
push dword [ebp - 0x10]
call fcn.0a65da6e
mov ecx, dword [ebp + 0x18]
add esp, 0xc
test al, al
jne 0xa659fb4
xor edi, edi
inc edi
jmp 0xa659fbf
push 2
pop edi
jmp 0xa659fbf
cmp eax, edx
sbb edi, edi
neg edi
test ecx, ecx
je 0xa659fdb
mov eax, ebx
sub eax, esi
cmp eax, ecx
jl 0xa65a049
push esi
push dword [ebp + 0xc]
push ecx
call fcn.0a659a91
add esp, 0xc
add esi, dword [ebp + 0x18]
test edi, edi
je 0xa659c9b
mov eax, esi
mov edx, ebx
cmp esi, dword [ebp - 0x24]
je 0xa65a008
dec eax
mov cl, byte [eax]
cmp cl, 0x2e
jne 0xa659ff8
mov edx, eax
jmp 0xa65a003
cmp cl, 0x39
jne 0xa65a021
xor edi, edi
mov byte [eax], 0x30
inc edi
cmp eax, dword [ebp - 0x24]
jne 0xa659fec
mov byte [eax], 0x31
cmp edx, ebx
je 0xa65a014
mov word [edx], 0x2e30
cmp esi, ebx
je 0xa65a049
mov byte [esi], 0x30
inc esi
jmp 0xa659c9b
cmp edi, 1
je 0xa65a02f
test cl, 1
je 0xa659c9b
inc cl
mov byte [eax], cl
jmp 0xa659c9b
imul eax, edx, 9
sub edi, eax
mov eax, ebx
sub eax, esi
cmp eax, edi
jge 0xa659c87
mov eax, dword [ebp + 8]
mov dword [eax], ebx
mov dword [eax + 4], 0x84
pop edi
pop esi
pop ebx
leave
ret