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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0x10]
sub esp, 0x10
test ecx, ecx
je 0x104c970
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x104c970
cmp dword [ebp + 8], 0
je 0x104c970
push edi
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x104c96f
cmp dword [ebp + 0x18], 0
je 0x104c96f
mov edx, eax
shr edx, 1
mov dl, byte [edx + ecx]
push ebx
mov ebx, edi
mov byte [ebp - 1], dl
shr ebx, 1
xor edx, edx
push esi
mov dword [ebp - 0x10], ebx
mov dword [ebp - 8], 0xadac
test eax, eax
jbe 0x104c84f
movzx si, byte [edx + ecx]
xor word [ebp - 8], si
test byte [ebp - 8], 1
je 0x104c758
mov si, word [ebp - 8]
shr si, 1
mov edi, 0x8408
xor si, di
movzx esi, si
mov dword [ebp - 8], esi
jmp 0x104c75c
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x104c779
mov si, word [ebp - 8]
shr si, 1
mov edi, 0x8408
xor si, di
movzx esi, si
mov dword [ebp - 8], esi
jmp 0x104c77d
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x104c79a
mov si, word [ebp - 8]
shr si, 1
mov edi, 0x8408
xor si, di
movzx esi, si
mov dword [ebp - 8], esi
jmp 0x104c79e
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x104c7bb
mov si, word [ebp - 8]
shr si, 1
mov edi, 0x8408
xor si, di
movzx esi, si
mov dword [ebp - 8], esi
jmp 0x104c7bf
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x104c7dc
mov si, word [ebp - 8]
shr si, 1
mov edi, 0x8408
xor si, di
movzx esi, si
mov dword [ebp - 8], esi
jmp 0x104c7e0
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x104c7fd
mov si, word [ebp - 8]
shr si, 1
mov edi, 0x8408
xor si, di
movzx esi, si
mov dword [ebp - 8], esi
jmp 0x104c801
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x104c81e
mov si, word [ebp - 8]
shr si, 1
mov edi, 0x8408
xor si, di
movzx esi, si
mov dword [ebp - 8], esi
jmp 0x104c822
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x104c83f
mov si, word [ebp - 8]
shr si, 1
mov edi, 0x8408
xor si, di
movzx esi, si
mov dword [ebp - 8], esi
jmp 0x104c843
shr word [ebp - 8], 1
inc edx
cmp edx, eax
jb 0x104c732
mov edi, dword [ebp + 0xc]
mov edx, ebx
xor edx, eax
xor edx, dword [ebp - 8]
dec ebx
movzx eax, dx
mov dword [ebp + 0xc], eax
movzx eax, byte [ebp - 1]
cdq
mov esi, 0xa
idiv esi
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], edx
jmp 0x104c874
mov ecx, dword [ebp + 0x10]
mov esi, dword [ebp + 8]
sub edi, 2
mov eax, 0xaaaaaaab
mul edi
shr edx, 1
lea edx, [edx + edx*2]
mov eax, edi
add esi, edi
sub eax, edx
jne 0x104c8ab
movzx eax, byte [ecx]
cdq
mov ecx, 0xa
idiv ecx
mov al, byte [esi]
sub al, dl
sub al, 0x41
cmp al, cl
jae 0x104c8a7
add al, 0x30
jmp 0x104c8ad
add al, 0x37
jmp 0x104c8ad
mov al, byte [esi]
mov dl, al
sub dl, 0x30
cmp dl, 9
ja 0x104c8bf
movsx eax, al
sub eax, 0x30
jmp 0x104c8d3
mov cl, al
sub cl, 0x41
cmp cl, 5
ja 0x104c8d1
movsx eax, al
sub eax, 0x37
jmp 0x104c8d3
xor eax, eax
shl al, 4
mov cl, al
mov eax, 1
mov al, byte [eax + esi]
sub al, byte [ebp - 0xc]
sub al, 0x41
cmp al, 0xa
jae 0x104c8ed
add al, 0x30
jmp 0x104c8ef
add al, 0x37
cmp al, 0x30
jl 0x104c8ff
cmp al, 0x39
jg 0x104c8ff
movsx eax, al
sub eax, 0x30
jmp 0x104c911
cmp al, 0x41
jl 0x104c90f
cmp al, 0x46
jg 0x104c90f
movsx eax, al
sub eax, 0x37
jmp 0x104c911
xor eax, eax
or cl, al
xor edx, edx
mov eax, ebx
div dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
mov esi, 0xff
movzx eax, byte [edx + eax]
cdq
idiv esi
mov eax, dword [ebp + 0xc]
add dl, bl
cmp edi, 2
jb 0x104c951
mov bl, byte [ebp - 0x10]
mov esi, dword [ebp + 8]
and bl, 0xba
xor bl, al
and bl, 0xef
xor dl, bl
xor dl, byte [edi + esi - 2]
mov ebx, dword [ebp - 8]
shr eax, 8
xor dl, al
jmp 0x104c959
shr eax, 7
xor dl, al
xor dl, byte [ebp + 0xc]
xor cl, dl
mov edx, dword [ebp + 0x18]
mov byte [ebx + edx], cl
dec ebx
mov dword [ebp - 8], ebx
test edi, edi
jne 0x104c871
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret 0x14