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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [ebp + 8]
mov edx, ecx
mov ecx, dword [ebp + 0xc]
xorps xmm1, xmm1
mov dword [ebp - 0x4c], ecx
push esi
movq xmm0, qword [eax]
mov ecx, dword [eax + 8]
movq qword [ebp - 0x40], xmm0
xorps xmm0, xmm0
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x40]
mov esi, eax
sub esi, ecx
mov dword [ebp - 0x44], edx
push edi
mov dword [ebp - 0x20], ecx
cmp byte [eax], 0x2d
mov dword [ebp - 0x48], esi
movsd qword [ebp - 0x54], xmm0
jne 0x100715fa
inc eax
mov ch, 1
mov dword [ebp - 0x40], eax
jmp 0x100715fc
xor ch, ch
mov cl, byte [eax]
xor esi, esi
mov byte [ebp - 0x11], ch
movlpd qword [ebp - 0x28], xmm0
mov byte [ebp - 1], 0
mov dword [ebp - 0x1c], esi
cmp cl, 0x30
jne 0x10071633
mov ecx, dword [ebp - 0x24]
lea edi, [eax + 1]
mov esi, dword [ebp - 0x28]
xor edx, edx
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x40], edi
mov byte [ebp - 2], dl
mov dword [ebp - 8], ecx
mov dword [ebp - 0x10], esi
jmp 0x100719ac
cmp cl, 0x31
jl 0x10071ec5
cmp cl, 0x39
jg 0x10071ec5
lea edx, [eax + 1]
movsx eax, cl
mov cl, byte [edx]
sub eax, 0x30
test ch, ch
je 0x100716a4
cmp cl, 0x30
jl 0x100716de
mov edi, edx
cmp cl, 0x39
jg 0x100716de
cmp eax, 0xccccccc
jb 0x10071674
jne 0x10071694
mov edi, edx
cmp cl, 0x38
ja 0x10071694
lea ecx, [eax + eax*4]
inc esi
movsx eax, byte [edi]
lea edx, [edi + 1]
lea eax, [eax + ecx*2]
mov cl, byte [edx]
add eax, 0xffffffd0
cmp cl, 0x30
jl 0x100716de
mov edi, edx
cmp cl, 0x39
jle 0x10071664
jmp 0x100716de
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x18], 0
mov byte [ebp - 1], 1
jmp 0x100716ea
cmp cl, 0x30
jl 0x100716de
mov edi, edx
cmp cl, 0x39
jg 0x100716de
cmp eax, 0x19999999
jb 0x100716c0
jne 0x10071694
mov edi, edx
cmp cl, 0x35
ja 0x10071694
lea ecx, [eax + eax*4]
inc esi
movsx eax, byte [edi]
lea edx, [edi + 1]
lea eax, [eax + ecx*2]
mov cl, byte [edx]
add eax, 0xffffffd0
cmp cl, 0x30
jl 0x100716de
mov edi, edx
cmp cl, 0x39
jle 0x100716b0
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x30], ecx
mov cl, byte [ebp - 1]
mov edi, edx
mov dword [ebp - 0x2c], esi
mov esi, eax
mov byte [ebp - 4], cl
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0xc], esi
mov esi, dword [ebp - 0x30]
mov dword [ebp - 8], ecx
mov cl, byte [ebp - 4]
mov dword [ebp - 0x10], esi
test cl, cl
mov esi, dword [ebp - 0x2c]
mov byte [ebp - 1], cl
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x1c], esi
mov esi, dword [ebp - 0x10]
mov byte [ebp - 2], 0
mov dword [ebp - 0x40], edi
je 0x100719a9
cmp byte [ebp - 0x11], 0
mov esi, dword [ebp - 0x30]
mov cl, byte [edx]
mov dword [ebp - 0x10], esi
mov esi, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], esi
mov esi, dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
je 0x1007186f
mov byte [ebp - 3], cl
cmp byte [ebp - 3], 0x30
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 8], ecx
mov cl, byte [ebp - 4]
mov byte [ebp - 1], cl
mov ecx, dword [ebp - 8]
jl 0x1007184e
cmp byte [ebp - 3], 0x39
mov ecx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 8], ecx
mov cl, byte [ebp - 4]
mov dword [ebp - 0x10], esi
mov esi, dword [ebp - 0x2c]
mov byte [ebp - 1], cl
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x1c], esi
mov esi, dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
jg 0x1007184e
mov esi, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0xc], eax
mov al, byte [ebp - 4]
mov byte [ebp - 1], al
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x10], esi
mov dword [ebp - 8], ecx
mov dword [ebp - 0x1c], eax
nop word [eax + eax]
mov byte [ebp - 2], 0
cmp ecx, 0xccccccc
jb 0x100717f8
ja 0x100717c6
cmp esi, 0xcccccccc
jb 0x100717f8
cmp esi, 0xcccccccc
jne 0x100717e2
cmp ecx, 0xccccccc
jne 0x100717e2
cmp byte [ebp - 3], 0x38
mov eax, edx
mov byte [ebp - 2], 0
jbe 0x100717fb
mov edx, ecx
mov ecx, esi
call fcn.1010fb20
mov ecx, dword [ebp - 8]
movaps xmm1, xmm0
mov eax, dword [ebp - 0x1c]
mov dl, 1
jmp 0x10071854
mov eax, dword [ebp - 0x24]
movsx esi, byte [eax]
lea edi, [eax + 1]
mov eax, dword [ebp - 0x10]
xor edx, edx
shld ecx, eax, 2
sub esi, 0x30
shl eax, 2
add dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
adc dword [ebp - 8], ecx
mov ecx, dword [ebp - 8]
shld ecx, eax, 1
add eax, eax
add esi, eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x10], esi
adc ecx, edx
mov dl, byte [edi]
inc eax
mov dword [ebp - 8], ecx
mov dword [ebp - 0x1c], eax
mov byte [ebp - 3], dl
cmp dl, 0x30
jl 0x10071851
cmp byte [ebp - 3], 0x39
mov edx, edi
mov dword [ebp - 0x24], edi
jle 0x100717b0
jmp 0x10071851
mov eax, dword [ebp - 0x1c]
mov dl, byte [ebp - 2]
movsd qword [ebp - 0x28], xmm1
mov byte [ebp - 2], dl
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x24], ecx
test dl, dl
je 0x100719a9
jmp 0x10071971
mov byte [ebp - 3], cl
cmp byte [ebp - 3], 0x30
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 8], ecx
mov cl, byte [ebp - 4]
mov byte [ebp - 1], cl
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x40], edi
jl 0x100719a9
cmp byte [ebp - 3], 0x39
mov edi, edx
mov ecx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 8], ecx
mov cl, byte [ebp - 4]
mov dword [ebp - 0x10], esi
mov esi, dword [ebp - 0x2c]
mov byte [ebp - 1], cl
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x1c], esi
mov esi, dword [ebp - 0x10]
mov dword [ebp - 0x40], edi
mov dword [ebp - 0xc], eax
jg 0x100719a9
mov esi, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0xc], eax
mov al, byte [ebp - 4]
mov byte [ebp - 1], al
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], eax
mov al, byte [ebp - 3]
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x10], esi
mov dword [ebp - 8], ecx
mov byte [ebp - 2], 0
cmp ecx, 0x19999999
jb 0x10071913
ja 0x100718f8
cmp esi, 0x99999999
jb 0x10071913
cmp esi, 0x99999999
jne 0x1007195e
cmp ecx, 0x19999999
jne 0x1007195e
mov dword [ebp - 0x24], edx
mov byte [ebp - 2], 0
cmp al, 0x35
ja 0x1007195e
mov eax, dword [ebp - 0x24]
xor edx, edx
movsx esi, byte [eax]
lea edi, [eax + 1]
mov eax, dword [ebp - 0x10]
sub esi, 0x30
shld ecx, eax, 2
mov dword [ebp - 0x40], edi
shl eax, 2
add dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
adc dword [ebp - 8], ecx
mov ecx, dword [ebp - 8]
shld ecx, eax, 1
add eax, eax
add esi, eax
mov al, byte [edi]
mov dword [ebp - 0x10], esi
adc ecx, edx
inc dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
cmp al, 0x30
jl 0x100719a9
mov dword [ebp - 0x24], edi
mov edx, edi
cmp al, 0x39
jle 0x100718e2
jmp 0x100719a9
mov edx, ecx
mov ecx, esi
call fcn.1010fb20
mov ecx, dword [ebp - 8]
movaps xmm1, xmm0
mov byte [ebp - 2], 1
mov al, byte [edi]
cmp al, 0x30
jl 0x100719a9
movsd xmm2, qword [0x101769c0]
mov edx, edi
cmp al, 0x39
ja 0x100719a9
movsx eax, byte [edx]
lea edi, [edx + 1]
sub eax, 0x30
mulsd xmm1, xmm2
mov dword [ebp - 0x40], edi
mov edx, edi
movd xmm0, eax
mov al, byte [edi]
cvtdq2pd xmm0, xmm0
addsd xmm1, xmm0
cmp al, 0x30
jge 0x10071981
mov edx, dword [ebp - 0xc]
cmp byte [edi], 0x2e
mov ah, byte [ebp - 2]
mov dword [ebp - 0x18], 0
jne 0x10071abb
mov al, byte [edi + 1]
inc edi
mov dword [ebp - 0x40], edi
mov byte [ebp - 2], ah
cmp al, 0x30
jl 0x10071aa4
cmp al, 0x39
jg 0x10071aa4
test ah, ah
jne 0x100719fd
cmp byte [ebp - 1], ah
je 0x100719e6
mov eax, esi
jmp 0x100719ea
mov eax, edx
xor ecx, ecx
mov edx, ecx
mov ecx, eax
call fcn.1010fb20
mov ecx, dword [ebp - 8]
movaps xmm1, xmm0
mov byte [ebp - 2], 1
mov dl, byte [edi]
mov eax, edi
movsd xmm3, qword [0x101769c0]
xorps xmm2, xmm2
mov byte [ebp - 3], dl
mov edx, dword [ebp - 0xc]
mov dword [ebp - 0xc], edx
mov dl, byte [ebp - 1]
mov byte [ebp - 1], dl
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x10], esi
mov dword [ebp - 8], ecx
nop word [eax + eax]
cmp byte [ebp - 3], 0x39
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x2c], edi
jg 0x10071a8f
cmp edx, 0x11
jge 0x10071a6b
dec dword [ebp - 0x18]
lea eax, [edi + 1]
mov dword [ebp - 0x40], eax
movsx eax, byte [edi]
sub eax, 0x30
mulsd xmm1, xmm3
movd xmm0, eax
cvtdq2pd xmm0, xmm0
addsd xmm1, xmm0
comisd xmm1, xmm2
jbe 0x10071a67
inc edx
mov eax, edi
jmp 0x10071a74
inc eax
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x24]
mov edi, eax
mov cl, byte [eax + 1]
inc eax
inc edi
mov byte [ebp - 3], cl
mov dword [ebp - 0x40], eax
cmp cl, 0x30
mov ecx, dword [ebp - 8]
mov eax, edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x2c], edi
jge 0x10071a30
mov eax, dword [ebp - 0x2c]
xor edi, edi
cmp byte [eax], 0x65
jne 0x10071abf
mov dl, byte [ebp - 1]
lea edi, [eax + 1]
mov eax, dword [ebp - 0xc]
jmp 0x10071add
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x20]
sub edi, ecx
mov dword [eax + 0x18], 0xe
mov dword [eax + 0x1c], edi
jmp 0x10071ed4
mov eax, edi
jmp 0x10071a92
cmp byte [eax], 0x45
mov dword [ebp - 8], ecx
jne 0x10071c46
mov dl, byte [ebp - 1]
lea edi, [eax + 1]
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], eax
mov byte [ebp - 1], dl
cmp byte [ebp - 2], 0
mov dword [ebp - 0x40], edi
jne 0x10071b00
test dl, dl
je 0x10071aee
mov eax, esi
jmp 0x10071af0
xor ecx, ecx
mov edx, ecx
mov ecx, eax
call fcn.1010fb20
movaps xmm1, xmm0
mov byte [ebp - 2], 1
mov cl, byte [edi]
xor dl, dl
cmp cl, 0x2b
je 0x10071b10
cmp cl, 0x2d
jne 0x10071b17
mov dl, 1
mov cl, byte [edi + 1]
inc edi
mov dword [ebp - 0x40], edi
mov al, cl
sub al, 0x30
cmp al, 9
ja 0x10071c2f
mov al, byte [edi + 1]
lea esi, [edi + 1]
movsx edi, cl
sub edi, 0x30
mov dword [ebp - 0x40], esi
mov byte [ebp - 3], al
test dl, dl
je 0x10071bf4
mov ecx, dword [ebp - 0x18]
mov eax, 0x66666667
lea ecx, [ecx + 0x7ffffff7]
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x24], eax
mov al, byte [ebp - 3]
cmp al, 0x30
jl 0x10071ba0
cmp al, 0x39
ja 0x10071ba0
movsx eax, byte [esi]
lea edi, [edi + edi*4]
lea edi, [edi - 0x18]
lea edx, [esi + 1]
mov dword [ebp - 0x40], edx
mov esi, edx
lea edi, [eax + edi*2]
cmp edi, dword [ebp - 0x24]
jle 0x10071b9a
mov al, byte [edx]
cmp al, 0x30
jl 0x10071b9a
mov ecx, edx
cmp al, 0x39
ja 0x10071b97
lea esi, [ecx + 1]
mov edx, esi
mov ecx, esi
mov al, byte [edx]
cmp al, 0x30
jge 0x10071b86
mov dword [ebp - 0x40], edx
mov al, byte [edx]
cmp al, 0x30
jge 0x10071b61
neg edi
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xc]
mov esi, dword [ebp - 0x10]
cmp byte [ebp - 2], 0
mov al, byte [ebp - 1]
je 0x10071cf6
lea eax, [edi + edx]
cmp eax, 0xfffffecc
jge 0x10071c54
mulsd xmm1, qword [0x1017dd38]
add eax, 0x134
cmp eax, 0xfffffecc
jl 0x10071c7c
shl eax, 3
mov ecx, 0x1017d240
sub ecx, eax
movaps xmm0, xmm1
divsd xmm0, qword [ecx]
jmp 0x10071c77
mov edx, dword [ebp - 0x18]
mov ecx, 0x134
sub ecx, edx
mov dword [ebp - 0x24], ecx
cmp al, 0x30
jl 0x10071ba5
cmp al, 0x39
ja 0x10071ba2
movsx eax, byte [esi]
lea edi, [edi + edi*4]
lea edi, [edi - 0x18]
lea edx, [esi + 1]
mov dword [ebp - 0x40], edx
lea edi, [eax + edi*2]
cmp edi, dword [ebp - 0x24]
jg 0x10071c8b
cmp byte [edx], 0x30
mov esi, edx
jl 0x10071ba2
mov al, byte [edx]
jmp 0x10071c05
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x20]
sub edi, ecx
mov dword [eax + 0x18], 0xf
mov dword [eax + 0x1c], edi
jmp 0x10071ed4
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0xc], ecx
jmp 0x10071bab
lea ecx, [eax*8]
movaps xmm0, xmm1
test eax, eax
js 0x10071c6c
mulsd xmm0, qword [ecx + 0x1017d240]
jmp 0x10071c77
mov eax, 0x1017d240
sub eax, ecx
divsd xmm0, qword [eax]
movsd qword [ebp - 0x54], xmm0
movsd xmm0, qword [ebp - 0x54]
comisd xmm0, xmmword [0x101769f8]
jbe 0x10071ca3
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x48]
mov dword [eax + 0x18], 0xd
mov dword [eax + 0x1c], ecx
mov ecx, dword [ebp - 0x20]
jmp 0x10071ed4
cmp byte [ebp - 0x11], 0
je 0x10071cb0
xorps xmm0, xmmword [0x10176a50]
mov esi, dword [ebp - 0x4c]
movsd qword [ebp - 0x54], xmm0
mov eax, dword [esi + 0x28]
sub eax, dword [esi + 0x24]
cmp eax, 0x10
jge 0x10071ccd
push 1
lea ecx, [esi + 0x18]
call fcn.10071480
mov ecx, dword [esi + 0x24]
xorps xmm0, xmm0
movsd xmm2, qword [ebp - 0x54]
lea eax, [ecx + 0x10]
mov dword [esi + 0x24], eax
mov eax, 0x216
movups xmmword [ecx], xmm0
mov word [ecx + 0xe], ax
movsd qword [ecx], xmm2
mov ecx, dword [ebp - 0x20]
jmp 0x10071ed4
mov edx, dword [ebp - 0x4c]
test al, al
mov eax, dword [edx + 0x28]
lea edi, [edx + 0x18]
je 0x10071e38
sub eax, dword [edi + 0xc]
cmp byte [ebp - 0x11], 0
je 0x10071dbb
mov edi, dword [ebp - 8]
neg esi
adc edi, 0
neg edi
cmp eax, 0x10
jge 0x10071d30
push 1
lea ecx, [edx + 0x18]
call fcn.10071480
mov edx, dword [ebp - 0x4c]
lea ecx, [edx + 0x18]
xorps xmm0, xmm0
mov edx, dword [ecx + 0xc]
lea eax, [edx + 0x10]
mov dword [ecx + 0xc], eax
mov eax, 0x96
movups xmmword [edx], xmm0
mov dword [edx], esi
mov dword [edx + 4], edi
mov word [edx + 0xe], ax
test edi, edi
jl 0x10071d93
jg 0x10071d5a
test esi, esi
jb 0x10071d93
mov eax, 0x196
mov word [edx + 0xe], ax
mov ecx, eax
xor eax, eax
or eax, edi
jne 0x10071d76
mov eax, 0x1d6
mov word [edx + 0xe], ax
mov ecx, eax
and esi, 0x80000000
or esi, edi
jne 0x10071c9b
or ecx, 0x20
mov word [edx + 0xe], cx
mov ecx, dword [ebp - 0x20]
jmp 0x10071ed4
cmp edi, 0xffffffff
jl 0x10071c9b
jg 0x10071daa
cmp esi, 0x80000000
jb 0x10071c9b
mov ecx, dword [ebp - 0x20]
mov eax, 0xb6
mov word [edx + 0xe], ax
jmp 0x10071ed4
cmp eax, 0x10
jge 0x10071dc9
push 1
mov ecx, edi
call fcn.10071480
mov edx, dword [edi + 0xc]
xorps xmm0, xmm0
mov ecx, dword [ebp - 8]
lea eax, [edx + 0x10]
mov dword [edi + 0xc], eax
mov eax, 0x116
mov edi, eax
movups xmmword [edx], xmm0
mov dword [edx], esi
mov dword [edx + 4], ecx
mov word [edx + 0xe], ax
test ecx, ecx
jl 0x10071e00
jg 0x10071df5
test esi, esi
jb 0x10071e00
mov eax, 0x196
mov word [edx + 0xe], ax
mov edi, eax
movzx eax, di
mov dword [ebp - 0x48], eax
xor eax, eax
or eax, ecx
jne 0x10071e18
or edi, 0x40
mov word [edx + 0xe], di
movzx eax, di
jmp 0x10071e1b
mov eax, dword [ebp - 0x48]
and esi, 0x80000000
or esi, ecx
jne 0x10071c9b
mov ecx, dword [ebp - 0x20]
or eax, 0x20
mov word [edx + 0xe], ax
jmp 0x10071ed4
sub eax, dword [edi + 0xc]
cmp byte [ebp - 0x11], 0
je 0x10071e86
neg ecx
mov dword [ebp - 0xc], ecx
cmp eax, 0x10
jge 0x10071e54
push 1
mov ecx, edi
call fcn.10071480
mov ecx, dword [edi + 0xc]
xorps xmm0, xmm0
mov esi, dword [ebp - 0xc]
test esi, esi
lea eax, [ecx + 0x10]
mov dword [edi + 0xc], eax
mov eax, esi
cdq
movups xmmword [ecx], xmm0
mov dword [ecx], eax
mov eax, 0xb6
mov dword [ecx + 4], edx
mov edx, 0x1f6
cmovns eax, edx
mov word [ecx + 0xe], ax
mov ecx, dword [ebp - 0x20]
jmp 0x10071ed4
cmp eax, 0x10
jge 0x10071e94
push 1
mov ecx, edi
call fcn.10071480
mov ecx, dword [edi + 0xc]
xorps xmm0, xmm0
lea eax, [ecx + 0x10]
mov dword [edi + 0xc], eax
mov eax, dword [ebp - 0xc]
movups xmmword [ecx], xmm0
mov dword [ecx], eax
shr eax, 0x1a
not eax
mov dword [ecx + 4], 0
and eax, 0x20
or eax, 0x1d6
mov word [ecx + 0xe], ax
mov ecx, dword [ebp - 0x20]
jmp 0x10071ed4
mov ecx, dword [ebp - 0x20]
sub eax, ecx
mov dword [edx + 0x18], 3
mov dword [edx + 0x1c], eax
mov eax, dword [ebp - 0x58]
movq xmm0, qword [ebp - 0x40]
pop edi
pop esi
movq qword [eax], xmm0
mov dword [eax + 8], ecx
mov esp, ebp
pop ebp
ret 8