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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x5c4e68]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov ebx, ecx
push 7
xor eax, eax
test edx, edx
mov byte [ebp - 0x24], 0
pop ecx
lea edi, [ebp - 0x23]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [ebp - 0x28], edx
stosb byte es:[edi], al
je 0x4a6b87
mov dword [edx], 0xfffffff0
mov edx, esi
call fcn.004c3b34
test eax, eax
jne case.default.0x4a6be2
push esi
push 0x20
pop ecx
lea eax, [ebp - 0x24]
call fcn.004c3b66
mov esi, eax
call fcn.004c4699
mov eax, esi
push eax
mov edi, str.__:__.__
call fcn.004c45c9
mov al, byte [ebp - 0x24]
test al, al
pop ecx
pop ecx
je 0x4a6bd1
mov edx, esi
call fcn.004c4ca0
test eax, eax
je case.default.0x4a6be2
inc edx
mov al, byte [edx]
test al, al
jne 0x4a6bc1
lea eax, [ebp - 0x24]
call fcn.004c3b56
test eax, eax
jne case.default.0x4a6be2
cmp ebx, 7
ja case.default.0x4a6be2
jmp dword [ebx*4 + 0x4a6e45]
xor esi, esi
inc esi
lea ebx, [ebp - 0x24]
call fcn.0045fff6
mov esi, eax
mov eax, ebx
push eax
call fcn.005120b0
pop ecx
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x4a6c0b
lea edx, [eax - 0x10]
mov dword [ecx], edx
cmp esi, 4
jne case.default.0x4a6be2
cmp eax, 0xd
je 0x4a6ded
cmp eax, 0x10
je 0x4a6ded
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0051291c
leave
ret
push 2
pop esi
lea ebx, [ebp - 0x24]
call fcn.0045fff6
mov esi, eax
mov eax, ebx
push eax
call fcn.005120b0
pop ecx
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x4a6c55
lea edx, [eax - 0x10]
mov dword [ecx], edx
add esi, 0xffffffcd
cmp esi, 4
ja case.default.0x4a6be2
jmp 0x4a6c19
push 2
pop esi
lea ebx, [ebp - 0x24]
call fcn.0045fff6
mov esi, eax
mov eax, ebx
push eax
call fcn.005120b0
pop ecx
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x4a6c81
lea edx, [eax - 0xf]
mov dword [ecx], edx
cmp esi, 0x22
je 0x4a6c8b
cmp esi, 0x25
jne case.default.0x4a6be2
cmp eax, 0xf
jmp 0x4a6c1c
push 4
pop esi
lea ebx, [ebp - 0x24]
call fcn.0045fff6
mov esi, eax
mov eax, ebx
push eax
call fcn.005120b0
pop ecx
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x4a6cb2
lea edx, [eax - 0x10]
mov dword [ecx], edx
cmp esi, 0x177b
jne case.default.0x4a6be2
jmp 0x4a6c19
push 3
pop esi
lea ebx, [ebp - 0x24]
call fcn.0045fff6
push 2
pop esi
mov edi, eax
call fcn.0045fff6
mov esi, eax
mov eax, ebx
push eax
call fcn.005120b0
pop ecx
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x4a6cef
lea edx, [eax - 0xe]
mov dword [ecx], edx
cmp edi, 0x12c
jl case.default.0x4a6be2
cmp edi, 0x131
jle 0x4a6d11
cmp esi, 0x24
je 0x4a6d11
cmp esi, 0x26
jne case.default.0x4a6be2
cmp eax, 0xe
jmp 0x4a6c1c
push 2
pop esi
lea ebx, [ebp - 0x24]
call fcn.0045fff6
mov esi, eax
mov eax, ebx
push eax
call fcn.005120b0
pop ecx
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x4a6d08
lea edx, [eax - 0xe]
mov dword [ecx], edx
jmp 0x4a6d08
push 4
pop esi
lea ebx, [ebp - 0x24]
call fcn.0045fff6
mov esi, eax
mov eax, ebx
push eax
call fcn.005120b0
pop ecx
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x4a6d5f
lea edx, [eax - 0xf]
mov dword [ecx], edx
cmp esi, 0x7de
je 0x4a6c8b
cmp esi, 0x865
jmp 0x4a6c89
push 4
pop esi
lea ebx, [ebp - 0x24]
call fcn.0045fff6
mov esi, eax
mov eax, ebx
push eax
call fcn.005120b0
pop ecx
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x4a6d98
lea edx, [eax - 0x10]
mov dword [ecx], edx
cmp eax, 0xf
jne 0x4a6dd0
cmp esi, 0xc10
je 0x4a6ded
cmp esi, 0xc18
je 0x4a6ded
cmp esi, 0xc28
je 0x4a6ded
cmp esi, 0xc56
je 0x4a6ded
cmp esi, 0xd09
je 0x4a6ded
cmp esi, 0xdc8
jmp 0x4a6c1c
cmp eax, 0x10
jne case.default.0x4a6be2
cmp esi, 0x853
je 0x4a6ded
cmp esi, 0x708
jne case.default.0x4a6be2
lea esi, [ebp - 0x24]
call fcn.004c530d
mov eax, esi
push eax
call fcn.005120b0
xor esi, esi
xor edx, edx
test eax, eax
pop ecx
jle 0x4a6e30
movsx ecx, byte [ebp + edx - 0x24]
mov edi, edx
sub ecx, 0x30
and edi, 0x80000001
jns 0x4a6e1d
dec edi
or edi, 0xfffffffe
inc edi
je 0x4a6e29
add ecx, ecx
cmp ecx, 9
jle 0x4a6e29
sub ecx, 9
add esi, ecx
inc edx
cmp edx, eax
jl 0x4a6e06
mov eax, esi
cdq
push 0xa
pop ecx
idiv ecx
mov eax, edx
neg eax
sbb eax, eax
inc eax
jmp 0x4a6c24