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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x30
and dword [ebp - 4], 0
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
lea edi, [esi + 0x258]
mov dword [ebp - 0x1c], edi
mov ecx, dword [ebp - 4]
xor eax, eax
inc eax
shl eax, cl
test dword [ebp + 0x14], eax
je 0x5667c6
push 0
push 0
push ecx
push dword [ebp + 0xc]
call fcn.00567dba
mov ebx, eax
test ebx, ebx
je 0x5667e3
cmp dword [edi + 0x88], ebx
je 0x5664b6
mov eax, dword [edi]
test eax, eax
je 0x5664bb
push eax
call dword [0x10010cc]
and dword [edi + 0x88], 0
and dword [edi], 0
cmp dword [edi], 0
jne 0x5664d4
push ebx
push 0x40
call dword [0x10010c8]
test eax, eax
mov dword [edi], eax
je 0x5667e3
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 0x566515
mov edx, dword [edi + 0xc]
cmp edx, ebx
jae 0x5667d9
mov eax, dword [edi + 0x10]
cmp eax, ebx
jae 0x5667d9
cmp dword [edi + edx*4 + 0x18], ebx
jae 0x5667d9
cmp dword [edi + eax*4 + 0x18], ebx
jae 0x5667d9
movsx edx, word [esi + 8]
mov eax, 0x80
cmp edx, eax
mov dword [ebp + 0x10], edx
jbe 0x566528
mov dword [ebp + 0x10], eax
push 0xc
pop eax
cmp dword [ebp + 0x10], eax
jae 0x566533
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 0x10]
push 5
add eax, 0xfffffff9
xor edx, edx
pop ebx
div ebx
mov ebx, eax
cmp ebx, 9
jbe 0x56654a
push 9
pop ebx
xor edx, edx
mov eax, ecx
div ebx
push 0x64
pop edx
add eax, 0xa
cmp eax, edx
mov dword [ebp - 0x10], eax
ja 0x566560
mov dword [ebp - 0x10], edx
cmp dword [edi + 4], 2
jne 0x566576
mov dword [ebp - 0x14], 1
mov dword [ebp - 0x18], 7
jmp 0x566593
xor edx, edx
xor ebx, ebx
inc edx
cmp ecx, edx
mov dword [ebp - 0x14], ebx
jb 0x56658c
lea edx, [edx + edx*4]
shl edx, 1
inc ebx
cmp edx, ecx
jbe 0x566582
lea eax, [ebx + ebx + 1]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x10]
shl ecx, 2
cmp dword [esi + 0x36c], ecx
mov dword [ebp - 0x10], ecx
je 0x5665c4
lea ebx, [esi + 0x368]
mov eax, dword [ebx]
test eax, eax
je 0x5665c4
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 0x5665ed
push ecx
push 0x40
call dword [0x10010c8]
test eax, eax
mov dword [esi + 0x368], eax
je 0x5667e3
mov eax, dword [ebp - 0x10]
mov dword [esi + 0x36c], eax
xor eax, eax
cmp dword [ebp - 0x14], eax
je 0x566640
mov ecx, dword [esi + 0x368]
mov dword [ecx], eax
xor ecx, ecx
inc ecx
cmp dword [ebp + 0x18], eax
je 0x566614
mov eax, dword [edi + 0xc]
push 9
xor edx, edx
pop ebx
div ebx
mov dword [esi + 0x360], edx
mov ebx, dword [esi + 0x360]
jmp 0x566629
mov eax, dword [esi + 0x368]
mov dword [eax + ecx*4], ebx
inc ecx
add ebx, 9
cmp ebx, dword [edi + 8]
jb 0x56661c
mov eax, dword [edi + 8]
cmp ebx, eax
jbe 0x5666e0
mov ebx, eax
jmp 0x5666e0
cmp dword [ebp + 0x18], eax
je 0x56664b
mov dword [esi + 0x360], eax
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 - 8], 1
call fcn.0056568e
xor ebx, ebx
add eax, 3
inc ebx
cmp dword [edi + 8], ebx
mov dword [ebp - 0xc], eax
jbe 0x5666dd
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
mov ecx, dword [ebp - 0xc]
lea ecx, [ecx + eax + 3]
cmp ecx, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0xc], ecx
ja 0x5666be
mov eax, dword [esi + 0x368]
mov edx, dword [ebp - 8]
mov ecx, ebx
sub ecx, dword [eax + edx*4 - 4]
cmp ecx, 9
jb 0x5666d3
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp - 8]
inc dword [ebp - 8]
mov ecx, dword [esi + 0x368]
add eax, 3
mov dword [ecx + edx*4], ebx
mov dword [ebp - 0xc], eax
add dword [ebp - 0x10], 4
inc ebx
cmp ebx, dword [edi + 8]
jb 0x566688
mov ecx, dword [ebp - 8]
mov eax, dword [esi + 0x368]
mov dword [eax + ecx*4], ebx
mov dword [esi + 0x364], ecx
mov ecx, dword [ebp + 0x10]
lea ebx, [ecx + ecx*2 + 4]
cmp dword [esi + 0x2dc], ebx
jae 0x56673d
mov eax, dword [esi + 0x2d8]
test eax, eax
je 0x56671d
push eax
call dword [0x10010cc]
and dword [esi + 0x2d8], 0
and dword [esi + 0x2dc], 0
push ebx
push 0x40
call dword [0x10010c8]
test eax, eax
mov dword [esi + 0x2d8], eax
je 0x5667e3
mov ecx, dword [ebp + 0x10]
mov dword [esi + 0x2dc], ebx
push dword [ebp - 0x14]
mov eax, dword [esi + 0x2d8]
push esi
push dword [ebp - 0x18]
lea edx, [ecx + ecx + 4]
mov dword [eax], edx
push ecx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x30], 0x4b425935
mov dword [ebp - 0x2c], ebx
mov ecx, dword [eax]
add ecx, eax
push ecx
add eax, 4
push eax
push edi
call fcn.00565e57
mov edi, eax
mov eax, dword [esi + 0x368]
mov dword [esi + 0x370], 1
shl edi, 2
push dword [edi + eax]
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
and dword [esi + 0x370], 0
lea eax, [ebp - 0x30]
push eax
push dword [ebp + 8]
push dword [esi + 4]
call fcn.00563ac1
mov edi, dword [ebp - 0x1c]
inc dword [ebp - 4]
add edi, 4
cmp dword [ebp - 4], 0x20
mov dword [ebp - 0x1c], edi
jb 0x56646f
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret 0x14
xor eax, eax
jmp 0x5667dc