Function at 0x1037df0
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 0x1038090
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x1038090
cmp dword [ebp + 8], 0
je 0x1038090
push edi
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x103808f
cmp dword [ebp + 0x18], 0
je 0x103808f
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 0x1037f6f
movzx si, byte [edx + ecx]
xor word [ebp - 8], si
test byte [ebp - 8], 1
je 0x1037e78
mov si, word [ebp - 8]
shr si, 1
mov edi, 0x8408
xor si, di
movzx esi, si
mov dword [ebp - 8], esi
jmp 0x1037e7c
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x1037e99
mov si, word [ebp - 8]
shr si, 1
mov edi, 0x8408
xor si, di
movzx esi, si
mov dword [ebp - 8], esi
jmp 0x1037e9d
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x1037eba
mov si, word [ebp - 8]
shr si, 1
mov edi, 0x8408
xor si, di
movzx esi, si
mov dword [ebp - 8], esi
jmp 0x1037ebe
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x1037edb
mov si, word [ebp - 8]
shr si, 1
mov edi, 0x8408
xor si, di
movzx esi, si
mov dword [ebp - 8], esi
jmp 0x1037edf
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x1037efc
mov si, word [ebp - 8]
shr si, 1
mov edi, 0x8408
xor si, di
movzx esi, si
mov dword [ebp - 8], esi
jmp 0x1037f00
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x1037f1d
mov si, word [ebp - 8]
shr si, 1
mov edi, 0x8408
xor si, di
movzx esi, si
mov dword [ebp - 8], esi
jmp 0x1037f21
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x1037f3e
mov si, word [ebp - 8]
shr si, 1
mov edi, 0x8408
xor si, di
movzx esi, si
mov dword [ebp - 8], esi
jmp 0x1037f42
shr word [ebp - 8], 1
test byte [ebp - 8], 1
je 0x1037f5f
mov si, word [ebp - 8]
shr si, 1
mov edi, 0x8408
xor si, di
movzx esi, si
mov dword [ebp - 8], esi
jmp 0x1037f63
shr word [ebp - 8], 1
inc edx
cmp edx, eax
jb 0x1037e52
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 0x1037f94
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 0x1037fcb
movzx eax, byte [ecx]
cdq
mov ecx, 0xa
idiv ecx
mov al, byte [esi]
sub al, dl
sub al, 0x41
cmp al, cl
jae 0x1037fc7
add al, 0x30
jmp 0x1037fcd
add al, 0x37
jmp 0x1037fcd
mov al, byte [esi]
mov dl, al
sub dl, 0x30
cmp dl, 9
ja 0x1037fdf
movsx eax, al
sub eax, 0x30
jmp 0x1037ff3
mov cl, al
sub cl, 0x41
cmp cl, 5
ja 0x1037ff1
movsx eax, al
sub eax, 0x37
jmp 0x1037ff3
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 0x103800d
add al, 0x30
jmp 0x103800f
add al, 0x37
cmp al, 0x30
jl 0x103801f
cmp al, 0x39
jg 0x103801f
movsx eax, al
sub eax, 0x30
jmp 0x1038031
cmp al, 0x41
jl 0x103802f
cmp al, 0x46
jg 0x103802f
movsx eax, al
sub eax, 0x37
jmp 0x1038031
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 0x1038071
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 0x1038079
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 0x1037f91
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret 0x14