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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x30
push 0x288
push 0x40
call dword [0x10010c8]
test eax, eax
mov dword [ebp - 0x1c], eax
je 0x566b43
and dword [ebp - 4], 0
push esi
mov esi, dword [ebp + 0x10]
push edi
lea edi, [esi + 0x258]
mov dword [ebp - 0x14], edi
push ebx
mov ecx, dword [ebp - 4]
xor eax, eax
inc eax
shl eax, cl
test dword [ebp + 0x14], eax
je 0x566b21
push 0
push 0
push ecx
push dword [ebp + 0xc]
call fcn.00567dba
mov ebx, eax
test ebx, ebx
je 0x566b47
cmp dword [edi + 0x88], ebx
je 0x566866
mov eax, dword [edi]
test eax, eax
je 0x56686b
push eax
call dword [0x10010cc]
and dword [edi + 0x88], 0
and dword [edi], 0
cmp dword [edi], 0
jne 0x566884
push ebx
push 0x40
call dword [0x10010c8]
test eax, eax
mov dword [edi], eax
je 0x566b47
mov dword [edi + 0x88], ebx
mov edi, dword [edi]
push ebx
push edi
push dword [ebp - 4]
push dword [ebp + 0xc]
call fcn.00567dba
mov ecx, dword [edi + 8]
cmp ecx, 1
jbe 0x5668c5
mov edx, dword [edi + 0xc]
cmp edx, ebx
jae 0x566b34
mov eax, dword [edi + 0x10]
cmp eax, ebx
jae 0x566b34
cmp dword [edi + edx*4 + 0x18], ebx
jae 0x566b34
cmp dword [edi + eax*4 + 0x18], ebx
jae 0x566b34
movsx edx, word [esi + 8]
mov eax, 0x80
cmp edx, eax
mov dword [ebp + 0x10], edx
jbe 0x5668d8
mov dword [ebp + 0x10], eax
push 0xc
pop eax
cmp dword [ebp + 0x10], eax
jae 0x5668e3
mov dword [ebp + 0x10], eax
sub dword [ebp + 0x10], 8
mov eax, dword [ebp + 0x10]
push 5
add eax, 0xfffffff9
xor edx, edx
pop ebx
div ebx
mov ebx, eax
cmp ebx, 9
jbe 0x5668fe
push 9
pop ebx
xor edx, edx
mov eax, ecx
div ebx
add eax, 0xa
cmp eax, 0x64
ja 0x56690f
push 0x64
pop eax
xor edx, edx
inc edx
xor ebx, ebx
cmp ecx, edx
jb 0x566922
lea edx, [edx + edx*4]
shl edx, 1
inc ebx
cmp edx, ecx
jbe 0x566918
lea ecx, [ebx + ebx + 1]
mov dword [ebp - 0x18], ecx
mov ecx, eax
shl ecx, 2
cmp dword [esi + 0x36c], ecx
mov dword [ebp - 0x10], ecx
je 0x566959
lea ebx, [esi + 0x368]
mov eax, dword [ebx]
test eax, eax
je 0x566959
push eax
call dword [0x10010cc]
and dword [ebx], 0
and dword [esi + 0x36c], 0
mov ecx, dword [ebp - 0x10]
cmp dword [esi + 0x368], 0
jne 0x566982
push ecx
push 0x40
call dword [0x10010c8]
test eax, eax
mov dword [esi + 0x368], eax
je 0x566b47
mov eax, dword [ebp - 0x10]
mov dword [esi + 0x36c], eax
cmp dword [ebp + 0x18], 0
je 0x56698f
and dword [esi + 0x360], 0
mov eax, dword [esi + 0x368]
mov ecx, dword [esi + 0x360]
mov dword [eax], ecx
mov eax, dword [edi + 0x18]
add eax, edi
push eax
mov dword [ebp - 0xc], 1
call fcn.0056568e
mov ebx, eax
xor eax, eax
inc eax
add ebx, 3
cmp dword [edi + 8], eax
mov dword [ebp - 8], eax
jbe 0x566a23
mov eax, dword [ebp + 0x10]
sub eax, dword [ebp - 0x18]
mov dword [ebp - 0x20], eax
lea eax, [edi + 0x1c]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
add eax, edi
push eax
call fcn.0056568e
lea ebx, [ebx + eax + 3]
cmp ebx, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
ja 0x5669ff
mov eax, dword [esi + 0x368]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
sub ecx, dword [eax + edx*4 - 4]
cmp ecx, 9
jb 0x566a14
mov eax, dword [ebp - 0x24]
mov ebx, dword [ebp - 0xc]
mov ecx, dword [esi + 0x368]
mov edx, dword [ebp - 8]
inc dword [ebp - 0xc]
mov dword [ecx + ebx*4], edx
lea ebx, [eax + 3]
inc dword [ebp - 8]
mov eax, dword [ebp - 8]
add dword [ebp - 0x10], 4
cmp eax, dword [edi + 8]
jb 0x5669ce
mov eax, dword [ebp - 0xc]
mov ecx, dword [esi + 0x368]
mov edx, dword [ebp - 8]
mov ebx, dword [ebp + 0x10]
mov dword [ecx + eax*4], edx
mov dword [esi + 0x364], eax
lea eax, [ebx + ebx*2 + 4]
cmp dword [esi + 0x2dc], eax
jae 0x566a8b
mov eax, dword [esi + 0x2d8]
test eax, eax
je 0x566a66
push eax
call dword [0x10010cc]
and dword [esi + 0x2d8], 0
and dword [esi + 0x2dc], 0
lea eax, [ebx + ebx*2 + 4]
push eax
push 0x40
call dword [0x10010c8]
test eax, eax
mov dword [esi + 0x2d8], eax
je 0x566b47
lea eax, [ebx + ebx*2 + 4]
mov dword [esi + 0x2dc], eax
mov eax, dword [esi + 0x2d8]
push esi
push dword [ebp - 0x18]
lea ecx, [ebx + ebx + 4]
mov dword [eax], ecx
push ebx
add ecx, eax
push ecx
add eax, 4
push eax
push edi
call fcn.00566160
mov edi, eax
mov eax, dword [esi + 0x368]
mov dword [esi + 0x370], 1
shl edi, 2
push dword [eax + edi]
push dword [ebp - 4]
push 0x16
push dword [ebp + 0xc]
call fcn.00567dae
mov eax, dword [esi + 0x368]
add eax, edi
mov ecx, dword [eax + 4]
sub ecx, dword [eax]
push ecx
push dword [ebp - 4]
push 0x17
push dword [ebp + 0xc]
call fcn.00567dae
mov eax, dword [ebp - 0x1c]
and dword [esi + 0x370], 0
push eax
push esi
mov dword [ebp - 0x30], 0x4b425931
mov dword [ebp - 0x2c], 0x288
mov dword [ebp - 0x28], eax
call fcn.005655d3
test eax, eax
je 0x566b1e
lea eax, [ebp - 0x30]
push eax
push dword [ebp + 8]
push dword [esi + 4]
call fcn.00563ac1
mov edi, dword [ebp - 0x14]
inc dword [ebp - 4]
add edi, 4
cmp dword [ebp - 4], 0x20
mov dword [ebp - 0x14], edi
jb 0x56681f
push dword [ebp - 0x1c]
call dword [0x10010cc]
xor eax, eax
inc eax
pop ebx
pop edi
pop esi
leave
ret 0x14
xor eax, eax
jmp 0x566b40