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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push esi
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x104efad
push edi
mov edi, dword [ebp + 0x14]
test edi, edi
je 0x104efac
cmp dword [ebp + 8], 0
je 0x104efac
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x104efac
cmp dword [ebp + 0x18], 0
je 0x104efac
mov eax, edi
shr eax, 1
mov cl, byte [eax + esi]
mov byte [ebp - 1], cl
mov eax, 0xadac
xor ecx, ecx
push ebx
mov dword [ebp - 8], eax
test edi, edi
jbe 0x104ee9d
lea esp, [esp]
movzx ax, byte [ecx + esi]
xor word [ebp - 8], ax
test byte [ebp - 8], 1
je 0x104eda6
mov ax, word [ebp - 8]
shr ax, 1
mov ebx, 0x8408
xor ax, bx
movzx eax, ax
mov dword [ebp - 8], eax
jmp 0x104edaa
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x104edc7
mov ax, word [ebp - 8]
shr ax, 1
mov ebx, 0x8408
xor ax, bx
movzx eax, ax
mov dword [ebp - 8], eax
jmp 0x104edcb
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x104ede8
mov ax, word [ebp - 8]
shr ax, 1
mov ebx, 0x8408
xor ax, bx
movzx eax, ax
mov dword [ebp - 8], eax
jmp 0x104edec
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x104ee09
mov ax, word [ebp - 8]
shr ax, 1
mov ebx, 0x8408
xor ax, bx
movzx eax, ax
mov dword [ebp - 8], eax
jmp 0x104ee0d
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x104ee2a
mov ax, word [ebp - 8]
shr ax, 1
mov ebx, 0x8408
xor ax, bx
movzx eax, ax
mov dword [ebp - 8], eax
jmp 0x104ee2e
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x104ee4b
mov ax, word [ebp - 8]
shr ax, 1
mov ebx, 0x8408
xor ax, bx
movzx eax, ax
mov dword [ebp - 8], eax
jmp 0x104ee4f
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x104ee6c
mov ax, word [ebp - 8]
shr ax, 1
mov ebx, 0x8408
xor ax, bx
movzx eax, ax
mov dword [ebp - 8], eax
jmp 0x104ee70
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x104ee8d
mov ax, word [ebp - 8]
shr ax, 1
mov ebx, 0x8408
xor ax, bx
movzx eax, ax
mov dword [ebp - 8], eax
jmp 0x104ee94
shr word [ebp - 8], 1
mov eax, dword [ebp - 8]
inc ecx
cmp ecx, edi
jb 0x104ed80
xor eax, edx
xor eax, edi
movzx ecx, ax
xor esi, esi
xor ebx, ebx
mov dword [ebp - 8], ecx
test edx, edx
jbe 0x104efab
movzx eax, byte [ebp - 1]
cdq
mov ecx, 0xa
idiv ecx
mov dword [ebp - 0xc], edx
xor edx, edx
mov eax, ebx
div edi
mov eax, dword [ebp + 0x10]
mov ecx, 0xff
movzx eax, byte [edx + eax]
cdq
idiv ecx
mov eax, dword [ebp - 8]
mov ecx, edx
add cl, bl
cmp esi, 2
jb 0x104ef02
mov dl, byte [ebp + 0xc]
and dl, 0xba
xor dl, al
and dl, 0xef
xor cl, dl
mov edx, dword [ebp + 0x18]
xor cl, byte [esi + edx - 2]
mov edx, dword [ebp + 8]
xor cl, byte [ebx + edx]
shr eax, 8
jmp 0x104ef0f
mov edx, dword [ebp + 8]
xor cl, byte [ebx + edx]
mov edx, eax
shr edx, 7
xor cl, dl
xor cl, al
mov al, cl
shr al, 4
cmp al, 0xa
jae 0x104ef1e
add al, 0x30
jmp 0x104ef20
add al, 0x37
mov byte [ebp - 1], al
mov eax, 0xaaaaaaab
mul esi
shr edx, 1
lea eax, [edx + edx*2]
mov edx, esi
sub edx, eax
mov dl, byte [ebp - 1]
jne 0x104ef62
mov al, dl
sub al, 0x30
cmp al, 9
ja 0x104ef45
mov byte [ebp - 1], al
jmp 0x104ef4b
sub dl, 0x37
mov byte [ebp - 1], dl
mov eax, dword [ebp + 0x10]
movzx eax, byte [eax]
cdq
mov edi, 0xa
idiv edi
mov edi, dword [ebp + 0x14]
add dl, byte [ebp - 1]
add dl, 0x41
mov eax, dword [ebp + 0x18]
mov byte [esi + eax], dl
movzx eax, cl
and eax, 0x8000000f
jns 0x104ef77
dec eax
or eax, 0xfffffff0
inc eax
cmp al, 0xa
jae 0x104ef7f
add al, 0x30
jmp 0x104ef81
add al, 0x37
mov cl, al
sub cl, 0x30
inc esi
cmp cl, 9
ja 0x104ef90
mov al, cl
jmp 0x104ef92
sub al, 0x37
mov cl, byte [ebp - 0xc]
mov edx, dword [ebp + 0x18]
add cl, al
add cl, 0x41
mov byte [esi + edx], cl
inc ebx
inc esi
cmp ebx, dword [ebp + 0xc]
jb 0x104eec2
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x14