Function at 0x104c430
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 0x104c6bd
push edi
mov edi, dword [ebp + 0x14]
test edi, edi
je 0x104c6bc
cmp dword [ebp + 8], 0
je 0x104c6bc
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x104c6bc
cmp dword [ebp + 0x18], 0
je 0x104c6bc
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 0x104c5ad
lea esp, [esp]
movzx ax, byte [ecx + esi]
xor word [ebp - 8], ax
test byte [ebp - 8], 1
je 0x104c4b6
mov ax, word [ebp - 8]
shr ax, 1
mov ebx, 0x8408
xor ax, bx
movzx eax, ax
mov dword [ebp - 8], eax
jmp 0x104c4ba
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x104c4d7
mov ax, word [ebp - 8]
shr ax, 1
mov ebx, 0x8408
xor ax, bx
movzx eax, ax
mov dword [ebp - 8], eax
jmp 0x104c4db
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x104c4f8
mov ax, word [ebp - 8]
shr ax, 1
mov ebx, 0x8408
xor ax, bx
movzx eax, ax
mov dword [ebp - 8], eax
jmp 0x104c4fc
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x104c519
mov ax, word [ebp - 8]
shr ax, 1
mov ebx, 0x8408
xor ax, bx
movzx eax, ax
mov dword [ebp - 8], eax
jmp 0x104c51d
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x104c53a
mov ax, word [ebp - 8]
shr ax, 1
mov ebx, 0x8408
xor ax, bx
movzx eax, ax
mov dword [ebp - 8], eax
jmp 0x104c53e
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x104c55b
mov ax, word [ebp - 8]
shr ax, 1
mov ebx, 0x8408
xor ax, bx
movzx eax, ax
mov dword [ebp - 8], eax
jmp 0x104c55f
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x104c57c
mov ax, word [ebp - 8]
shr ax, 1
mov ebx, 0x8408
xor ax, bx
movzx eax, ax
mov dword [ebp - 8], eax
jmp 0x104c580
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x104c59d
mov ax, word [ebp - 8]
shr ax, 1
mov ebx, 0x8408
xor ax, bx
movzx eax, ax
mov dword [ebp - 8], eax
jmp 0x104c5a4
shr word [ebp - 8], 1
mov eax, dword [ebp - 8]
inc ecx
cmp ecx, edi
jb 0x104c490
xor eax, edx
xor eax, edi
movzx ecx, ax
xor esi, esi
xor ebx, ebx
mov dword [ebp - 8], ecx
test edx, edx
jbe 0x104c6bb
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 0x104c612
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 0x104c61f
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 0x104c62e
add al, 0x30
jmp 0x104c630
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 0x104c672
mov al, dl
sub al, 0x30
cmp al, 9
ja 0x104c655
mov byte [ebp - 1], al
jmp 0x104c65b
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 0x104c687
dec eax
or eax, 0xfffffff0
inc eax
cmp al, 0xa
jae 0x104c68f
add al, 0x30
jmp 0x104c691
add al, 0x37
mov cl, al
sub cl, 0x30
inc esi
cmp cl, 9
ja 0x104c6a0
mov al, cl
jmp 0x104c6a2
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 0x104c5d2
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x14