Function at 0x104d910
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 0x104db9d
push edi
mov edi, dword [ebp + 0x14]
test edi, edi
je 0x104db9c
cmp dword [ebp + 8], 0
je 0x104db9c
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x104db9c
cmp dword [ebp + 0x18], 0
je 0x104db9c
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 0x104da8d
lea esp, [esp]
movzx ax, byte [ecx + esi]
xor word [ebp - 8], ax
test byte [ebp - 8], 1
je 0x104d996
mov ax, word [ebp - 8]
shr ax, 1
mov ebx, 0x8408
xor ax, bx
movzx eax, ax
mov dword [ebp - 8], eax
jmp 0x104d99a
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x104d9b7
mov ax, word [ebp - 8]
shr ax, 1
mov ebx, 0x8408
xor ax, bx
movzx eax, ax
mov dword [ebp - 8], eax
jmp 0x104d9bb
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x104d9d8
mov ax, word [ebp - 8]
shr ax, 1
mov ebx, 0x8408
xor ax, bx
movzx eax, ax
mov dword [ebp - 8], eax
jmp 0x104d9dc
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x104d9f9
mov ax, word [ebp - 8]
shr ax, 1
mov ebx, 0x8408
xor ax, bx
movzx eax, ax
mov dword [ebp - 8], eax
jmp 0x104d9fd
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x104da1a
mov ax, word [ebp - 8]
shr ax, 1
mov ebx, 0x8408
xor ax, bx
movzx eax, ax
mov dword [ebp - 8], eax
jmp 0x104da1e
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x104da3b
mov ax, word [ebp - 8]
shr ax, 1
mov ebx, 0x8408
xor ax, bx
movzx eax, ax
mov dword [ebp - 8], eax
jmp 0x104da3f
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x104da5c
mov ax, word [ebp - 8]
shr ax, 1
mov ebx, 0x8408
xor ax, bx
movzx eax, ax
mov dword [ebp - 8], eax
jmp 0x104da60
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x104da7d
mov ax, word [ebp - 8]
shr ax, 1
mov ebx, 0x8408
xor ax, bx
movzx eax, ax
mov dword [ebp - 8], eax
jmp 0x104da84
shr word [ebp - 8], 1
mov eax, dword [ebp - 8]
inc ecx
cmp ecx, edi
jb 0x104d970
xor eax, edx
xor eax, edi
movzx ecx, ax
xor esi, esi
xor ebx, ebx
mov dword [ebp - 8], ecx
test edx, edx
jbe 0x104db9b
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 0x104daf2
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 0x104daff
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 0x104db0e
add al, 0x30
jmp 0x104db10
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 0x104db52
mov al, dl
sub al, 0x30
cmp al, 9
ja 0x104db35
mov byte [ebp - 1], al
jmp 0x104db3b
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 0x104db67
dec eax
or eax, 0xfffffff0
inc eax
cmp al, 0xa
jae 0x104db6f
add al, 0x30
jmp 0x104db71
add al, 0x37
mov cl, al
sub cl, 0x30
inc esi
cmp cl, 9
ja 0x104db80
mov al, cl
jmp 0x104db82
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 0x104dab2
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x14