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

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
mov esi, ecx
push edi
mov ecx, dword [esi + 0xc]
mov edi, dword [esi + 0x14]
mov edx, dword [esi + 0x14]
dec edi
mov dword [ebp - 4], edi
mov eax, dword [ecx + 4]
mov eax, dword [eax + 3]
sar eax, 1
cmp edx, eax
jge 0x666615
push edx
call fcn.004e7dd0
inc dword [esi + 0x14]
movzx eax, ax
mov dword [esi + 0x10], eax
jmp 0x666620
mov dword [esi + 0x10], 0x200000
mov byte [esi + 0x1c], 0
mov eax, dword [esi + 0x10]
xor ebx, ebx
add eax, 0xffffffd0
cmp eax, 9
jbe 0x666680
mov ecx, dword [esi + 0xc]
mov dword [esi + 0x14], edi
mov eax, dword [ecx + 4]
mov eax, dword [eax + 3]
sar eax, 1
cmp edi, eax
setl al
mov byte [esi + 0x1c], al
mov eax, dword [ecx + 4]
mov eax, dword [eax + 3]
sar eax, 1
cmp edi, eax
jge 0x666669
push edi
call fcn.004e7dd0
inc dword [esi + 0x14]
movzx eax, ax
pop edi
mov dword [esi + 0x10], eax
xor al, al
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
pop edi
mov byte [esi + 0x1c], bl
xor al, al
mov dword [esi + 0x10], 0x200000
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [esi + 0x10]
lea eax, [ecx - 0x30]
cmp eax, 9
ja 0x666722
lea edi, [ecx - 0x30]
mov eax, 0x66666667
mov ecx, 0x7fffffff
sub ecx, edi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jg 0x6666e4
mov ecx, dword [esi + 0xc]
lea eax, [ebx + ebx*4]
mov edx, dword [esi + 0x14]
lea ebx, [edi + eax*2]
mov eax, dword [ecx + 4]
mov eax, dword [eax + 3]
sar eax, 1
cmp edx, eax
jge 0x6666d7
push edx
call fcn.004e7dd0
inc dword [esi + 0x14]
movzx eax, ax
mov dword [esi + 0x10], eax
jmp 0x666680
mov dword [esi + 0x10], 0x200000
mov byte [esi + 0x1c], 0
jmp 0x666680
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 0x14]
mov eax, dword [ecx + 4]
mov eax, dword [eax + 3]
sar eax, 1
cmp edx, eax
jge 0x666707
push edx
call fcn.004e7dd0
inc dword [esi + 0x14]
movzx eax, ax
mov dword [esi + 0x10], eax
jmp 0x666712
mov dword [esi + 0x10], 0x200000
mov byte [esi + 0x1c], 0
mov eax, dword [esi + 0x10]
add eax, 0xffffffd0
cmp eax, 9
jbe 0x6666e4
mov ebx, 0x7fffffff
mov eax, dword [esi + 0x10]
xor edi, edi
cmp eax, 0x7d
jne 0x666784
mov ecx, dword [esi + 0xc]
mov edi, ebx
mov edx, dword [esi + 0x14]
mov eax, dword [ecx + 4]
mov eax, dword [eax + 3]
sar eax, 1
cmp edx, eax
jge 0x666764
push edx
call fcn.004e7dd0
inc dword [esi + 0x14]
movzx eax, ax
mov dword [esi + 0x10], eax
mov eax, dword [ebp + 8]
mov dword [eax], ebx
mov eax, dword [ebp + 0xc]
mov dword [eax], edi
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp + 8]
mov dword [esi + 0x10], 0x200000
mov byte [esi + 0x1c], 0
mov dword [eax], ebx
mov eax, dword [ebp + 0xc]
mov dword [eax], edi
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, esi
cmp eax, 0x2c
jne 0x66687a
call fcn.00664940
cmp dword [esi + 0x10], 0x7d
jne 0x6667c0
mov edi, 0x7fffffff
mov ecx, esi
call fcn.00664940
mov eax, dword [ebp + 8]
mov dword [eax], ebx
mov eax, dword [ebp + 0xc]
mov dword [eax], edi
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [esi + 0x10]
lea eax, [ecx - 0x30]
cmp eax, 9
ja 0x66686e
lea eax, [ecx - 0x30]
mov ecx, 0x7fffffff
sub ecx, eax
mov dword [ebp - 8], eax
mov eax, 0x66666667
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jg 0x666830
mov ecx, dword [ebp - 8]
lea eax, [edi + edi*4]
mov edx, dword [esi + 0x14]
lea edi, [ecx + eax*2]
mov ecx, dword [esi + 0xc]
mov eax, dword [ecx + 4]
mov eax, dword [eax + 3]
sar eax, 1
cmp edx, eax
jge 0x66681d
push edx
call fcn.004e7dd0
inc dword [esi + 0x14]
movzx eax, ax
mov dword [esi + 0x10], eax
jmp 0x6667c0
mov dword [esi + 0x10], 0x200000
mov byte [esi + 0x1c], 0
jmp 0x6667c0
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 0x14]
mov eax, dword [ecx + 4]
mov eax, dword [eax + 3]
sar eax, 1
cmp edx, eax
jge 0x666853
push edx
call fcn.004e7dd0
inc dword [esi + 0x14]
movzx eax, ax
mov dword [esi + 0x10], eax
jmp 0x66685e
mov dword [esi + 0x10], 0x200000
mov byte [esi + 0x1c], 0
mov eax, dword [esi + 0x10]
add eax, 0xffffffd0
cmp eax, 9
jbe 0x666830
mov edi, 0x7fffffff
cmp dword [esi + 0x10], 0x7d
je 0x66679f
mov ecx, esi
push dword [ebp - 4]
call fcn.00666b50
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8