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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x5f2e68]
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 0x4afcd5
mov dword [edx], 0xfffffff0
mov edx, esi
call fcn.004ccc0d
test eax, eax
jne case.default.0x4afd30
push esi
push 0x20
pop ecx
lea eax, [ebp - 0x24]
call fcn.004ccc3f
mov esi, eax
call fcn.004cd772
mov eax, esi
push eax
mov edi, str.__:__.__
call fcn.004cd6a2
mov al, byte [ebp - 0x24]
test al, al
pop ecx
pop ecx
je 0x4afd1f
mov edx, esi
call fcn.004cddce
test eax, eax
je case.default.0x4afd30
inc edx
mov al, byte [edx]
test al, al
jne 0x4afd0f
lea eax, [ebp - 0x24]
call fcn.004ccc2f
test eax, eax
jne case.default.0x4afd30
cmp ebx, 7
ja case.default.0x4afd30
jmp dword [ebx*4 + 0x4aff93]
xor esi, esi
inc esi
lea ebx, [ebp - 0x24]
call fcn.0046885e
mov esi, eax
mov eax, ebx
push eax
call fcn.00530f70
pop ecx
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x4afd59
lea edx, [eax - 0x10]
mov dword [ecx], edx
cmp esi, 4
jne case.default.0x4afd30
cmp eax, 0xd
je 0x4aff3b
cmp eax, 0x10
je 0x4aff3b
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005317e7
leave
ret
push 2
pop esi
lea ebx, [ebp - 0x24]
call fcn.0046885e
mov esi, eax
mov eax, ebx
push eax
call fcn.00530f70
pop ecx
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x4afda3
lea edx, [eax - 0x10]
mov dword [ecx], edx
add esi, 0xffffffcd
cmp esi, 4
ja case.default.0x4afd30
jmp 0x4afd67
push 2
pop esi
lea ebx, [ebp - 0x24]
call fcn.0046885e
mov esi, eax
mov eax, ebx
push eax
call fcn.00530f70
pop ecx
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x4afdcf
lea edx, [eax - 0xf]
mov dword [ecx], edx
cmp esi, 0x22
je 0x4afdd9
cmp esi, 0x25
jne case.default.0x4afd30
cmp eax, 0xf
jmp 0x4afd6a
push 4
pop esi
lea ebx, [ebp - 0x24]
call fcn.0046885e
mov esi, eax
mov eax, ebx
push eax
call fcn.00530f70
pop ecx
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x4afe00
lea edx, [eax - 0x10]
mov dword [ecx], edx
cmp esi, 0x177b
jne case.default.0x4afd30
jmp 0x4afd67
push 3
pop esi
lea ebx, [ebp - 0x24]
call fcn.0046885e
push 2
pop esi
mov edi, eax
call fcn.0046885e
mov esi, eax
mov eax, ebx
push eax
call fcn.00530f70
pop ecx
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x4afe3d
lea edx, [eax - 0xe]
mov dword [ecx], edx
cmp edi, 0x12c
jl case.default.0x4afd30
cmp edi, 0x131
jle 0x4afe5f
cmp esi, 0x24
je 0x4afe5f
cmp esi, 0x26
jne case.default.0x4afd30
cmp eax, 0xe
jmp 0x4afd6a
push 2
pop esi
lea ebx, [ebp - 0x24]
call fcn.0046885e
mov esi, eax
mov eax, ebx
push eax
call fcn.00530f70
pop ecx
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x4afe56
lea edx, [eax - 0xe]
mov dword [ecx], edx
jmp 0x4afe56
push 4
pop esi
lea ebx, [ebp - 0x24]
call fcn.0046885e
mov esi, eax
mov eax, ebx
push eax
call fcn.00530f70
pop ecx
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x4afead
lea edx, [eax - 0xf]
mov dword [ecx], edx
cmp esi, 0x7de
je 0x4afdd9
cmp esi, 0x865
jmp 0x4afdd7
push 4
pop esi
lea ebx, [ebp - 0x24]
call fcn.0046885e
mov esi, eax
mov eax, ebx
push eax
call fcn.00530f70
pop ecx
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x4afee6
lea edx, [eax - 0x10]
mov dword [ecx], edx
cmp eax, 0xf
jne 0x4aff1e
cmp esi, 0xc10
je 0x4aff3b
cmp esi, 0xc18
je 0x4aff3b
cmp esi, 0xc28
je 0x4aff3b
cmp esi, 0xc56
je 0x4aff3b
cmp esi, 0xd09
je 0x4aff3b
cmp esi, 0xdc8
jmp 0x4afd6a
cmp eax, 0x10
jne case.default.0x4afd30
cmp esi, 0x853
je 0x4aff3b
cmp esi, 0x708
jne case.default.0x4afd30
lea esi, [ebp - 0x24]
call fcn.004ce43b
mov eax, esi
push eax
call fcn.00530f70
xor esi, esi
xor edx, edx
test eax, eax
pop ecx
jle 0x4aff7e
movsx ecx, byte [ebp + edx - 0x24]
mov edi, edx
sub ecx, 0x30
and edi, 0x80000001
jns 0x4aff6b
dec edi
or edi, 0xfffffffe
inc edi
je 0x4aff77
add ecx, ecx
cmp ecx, 9
jle 0x4aff77
sub ecx, 9
add esi, ecx
inc edx
cmp edx, eax
jl 0x4aff54
mov eax, esi
cdq
push 0xa
pop ecx
idiv ecx
mov eax, edx
neg eax
sbb eax, eax
inc eax
jmp 0x4afd72