Function at 0x5ae040
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 0x5ae075
push edx
call fcn.00471580
inc dword [esi + 0x14]
movzx eax, ax
mov dword [esi + 0x10], eax
jmp 0x5ae080
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 0x5ae0e0
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 0x5ae0c9
push edi
call fcn.00471580
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 0x5ae182
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 0x5ae144
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 0x5ae137
push edx
call fcn.00471580
inc dword [esi + 0x14]
movzx eax, ax
mov dword [esi + 0x10], eax
jmp 0x5ae0e0
mov dword [esi + 0x10], 0x200000
mov byte [esi + 0x1c], 0
jmp 0x5ae0e0
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 0x5ae167
push edx
call fcn.00471580
inc dword [esi + 0x14]
movzx eax, ax
mov dword [esi + 0x10], eax
jmp 0x5ae172
mov dword [esi + 0x10], 0x200000
mov byte [esi + 0x1c], 0
mov eax, dword [esi + 0x10]
add eax, 0xffffffd0
cmp eax, 9
jbe 0x5ae144
mov ebx, 0x7fffffff
mov eax, dword [esi + 0x10]
xor edi, edi
cmp eax, 0x7d
jne 0x5ae1e4
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 0x5ae1c4
push edx
call fcn.00471580
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 0x5ae2da
call fcn.005ac400
cmp dword [esi + 0x10], 0x7d
jne 0x5ae220
mov edi, 0x7fffffff
mov ecx, esi
call fcn.005ac400
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 0x5ae2ce
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 0x5ae290
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 0x5ae27d
push edx
call fcn.00471580
inc dword [esi + 0x14]
movzx eax, ax
mov dword [esi + 0x10], eax
jmp 0x5ae220
mov dword [esi + 0x10], 0x200000
mov byte [esi + 0x1c], 0
jmp 0x5ae220
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 0x5ae2b3
push edx
call fcn.00471580
inc dword [esi + 0x14]
movzx eax, ax
mov dword [esi + 0x10], eax
jmp 0x5ae2be
mov dword [esi + 0x10], 0x200000
mov byte [esi + 0x1c], 0
mov eax, dword [esi + 0x10]
add eax, 0xffffffd0
cmp eax, 9
jbe 0x5ae290
mov edi, 0x7fffffff
cmp dword [esi + 0x10], 0x7d
je 0x5ae1ff
mov ecx, esi
push dword [ebp - 4]
call fcn.005ae5b0
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8