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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1018c1ad
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x4c
mov eax, dword [ebp + 8]
mov edx, ecx
push esi
push edi
mov dword [ebp - 0x2c], edx
movq xmm0, qword [eax]
mov ecx, dword [eax + 8]
movq qword [ebp - 0x58], xmm0
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x58]
xorps xmm0, xmm0
mov esi, eax
mov dword [ebp - 4], 0
sub esi, ecx
movsd qword [ebp - 0x48], xmm0
mov dword [ebp - 0x38], esi
xorps xmm2, xmm2
cmp byte [eax], 0x2d
jne 0x100206c5
inc eax
mov byte [ebp - 0xf], 1
mov dword [ebp - 0x58], eax
jmp 0x100206c9
mov byte [ebp - 0xf], 0
mov cl, byte [eax]
xor esi, esi
movlpd qword [ebp - 0x40], xmm0
mov byte [ebp - 0xd], 0
mov dword [ebp - 0x28], esi
cmp cl, 0x30
jne 0x100206ec
lea edi, [eax + 1]
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x58], edi
jmp 0x100207a8
cmp cl, 0x31
jl 0x10020e01
cmp cl, 0x39
jg 0x10020e01
lea edi, [eax + 1]
movsx ecx, cl
mov al, byte [edi]
sub ecx, 0x30
cmp byte [ebp - 0xf], 0
mov dword [ebp - 0x58], edi
mov dword [ebp - 0x20], ecx
je 0x10020769
cmp al, 0x30
jl 0x100207a8
mov edx, edi
cmp al, 0x39
ja 0x100207a8
cmp ecx, 0xccccccc
jb 0x10020737
jne 0x1002075e
mov edx, edi
cmp al, 0x38
ja 0x1002075e
movsx eax, byte [edx]
lea ecx, [ecx + ecx*4]
lea edi, [edx + 1]
inc esi
lea ecx, [ecx - 0x18]
mov dword [ebp - 0x58], edi
mov dword [ebp - 0x28], esi
lea ecx, [eax + ecx*2]
mov al, byte [edi]
mov dword [ebp - 0x20], ecx
cmp al, 0x30
jl 0x100207a8
mov edx, edi
cmp al, 0x39
jle 0x10020727
jmp 0x100207a8
mov dl, 1
mov eax, ecx
xor ecx, ecx
mov byte [ebp - 0xd], dl
jmp 0x100207b1
cmp al, 0x30
jl 0x100207a8
mov edx, edi
cmp al, 0x39
jg 0x100207a8
cmp ecx, 0x19999999
jb 0x10020783
jne 0x1002075e
mov edx, edi
cmp al, 0x35
jg 0x1002075e
movsx eax, byte [edx]
lea ecx, [ecx + ecx*4]
lea edi, [edx + 1]
inc esi
lea ecx, [ecx - 0x18]
mov dword [ebp - 0x58], edi
mov dword [ebp - 0x28], esi
lea ecx, [eax + ecx*2]
mov al, byte [edi]
mov dword [ebp - 0x20], ecx
cmp al, 0x30
jl 0x100207a8
mov edx, edi
cmp al, 0x39
jle 0x10020773
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x3c]
mov dl, byte [ebp - 0xd]
xor dh, dh
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], ecx
mov byte [ebp - 0xe], dh
test dl, dl
je 0x100208e7
mov dl, byte [edi]
cmp byte [ebp - 0xf], dh
je 0x1002086a
cmp dl, 0x30
jl 0x100208e4
mov esi, edi
cmp dl, 0x39
jg 0x100208e4
cmp ecx, 0xccccccc
jb 0x1002080a
ja 0x100207f4
cmp eax, 0xcccccccc
jb 0x1002080a
cmp eax, 0xcccccccc
jne 0x10020857
cmp ecx, 0xccccccc
jne 0x10020857
mov esi, edi
cmp dl, 0x38
ja 0x10020857
shld ecx, eax, 2
lea edi, [esi + 1]
xor edx, edx
movsx esi, byte [esi]
shl eax, 2
sub esi, 0x30
add dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
adc dword [ebp - 0x18], ecx
mov ecx, dword [ebp - 0x18]
shld ecx, eax, 1
mov dword [ebp - 0x58], edi
add eax, eax
add eax, esi
mov dword [ebp - 0x14], eax
adc edx, ecx
inc dword [ebp - 0x28]
mov ecx, edx
mov dl, byte [edi]
mov dword [ebp - 0x18], ecx
cmp dl, 0x30
jl 0x100208e1
mov esi, edi
cmp dl, 0x39
jle 0x100207e3
jmp 0x100208e1
mov edx, ecx
mov ecx, eax
call fcn.10131ee0
mov dh, 1
movaps xmm2, xmm0
mov byte [ebp - 0xe], dh
jmp 0x100208e4
cmp dl, 0x30
jl 0x100208e4
mov esi, edi
cmp dl, 0x39
jg 0x100208e4
cmp ecx, 0x19999999
jb 0x1002089d
ja 0x10020887
cmp eax, 0x99999999
jb 0x1002089d
cmp eax, 0x99999999
jne 0x10020857
cmp ecx, 0x19999999
jne 0x10020857
mov esi, edi
cmp dl, 0x35
ja 0x10020857
shld ecx, eax, 2
lea edi, [esi + 1]
xor edx, edx
movsx esi, byte [esi]
shl eax, 2
sub esi, 0x30
add dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
adc dword [ebp - 0x18], ecx
mov ecx, dword [ebp - 0x18]
shld ecx, eax, 1
mov dword [ebp - 0x58], edi
add eax, eax
add eax, esi
mov dword [ebp - 0x14], eax
adc edx, ecx
inc dword [ebp - 0x28]
mov ecx, edx
mov dl, byte [edi]
mov dword [ebp - 0x18], ecx
cmp dl, 0x30
jl 0x100208e1
mov esi, edi
cmp dl, 0x39
jle 0x10020876
mov dh, byte [ebp - 0xe]
mov dl, byte [ebp - 0xd]
movsd xmm1, qword [0x1019b4a0]
test dh, dh
je 0x10020928
mov al, byte [edi]
cmp al, 0x30
jl 0x10020928
mov ecx, edi
nop dword [eax + eax]
cmp al, 0x39
ja 0x10020925
movsx eax, byte [ecx]
lea edi, [ecx + 1]
sub eax, 0x30
mulsd xmm2, xmm1
mov ecx, edi
movd xmm0, eax
mov al, byte [edi]
cvtdq2pd xmm0, xmm0
addsd xmm2, xmm0
cmp al, 0x30
jge 0x10020900
mov dword [ebp - 0x58], edi
mov cl, byte [edi]
mov dword [ebp - 0x24], 0
cmp cl, 0x2e
jne 0x10020941
inc edi
mov eax, edi
mov dword [ebp - 0x58], edi
mov dword [ebp - 0x34], eax
jmp 0x10020946
mov eax, edi
mov dword [ebp - 0x34], edi
cmp cl, 0x2e
jne 0x10020a18
mov cl, byte [eax]
cmp cl, 0x30
jl 0x10020a01
cmp cl, 0x39
jg 0x10020a01
mov cl, byte [ebp - 0xe]
mov esi, dword [ebp - 0x20]
test cl, cl
jne 0x10020995
test dl, dl
je 0x10020979
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
jmp 0x1002097d
mov ecx, esi
xor edx, edx
call fcn.10131ee0
movsd xmm1, qword [0x1019b4a0]
movaps xmm2, xmm0
mov byte [ebp - 0xe], 1
mov eax, edi
jmp 0x10020998
mov byte [ebp - 0xe], cl
mov dl, byte [edi]
xorps xmm3, xmm3
mov edi, dword [ebp - 0x28]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x34], eax
nop dword [eax]
mov ecx, dword [ebp - 0x34]
cmp dl, 0x39
jg 0x10020a1e
cmp edi, 0x11
jge 0x100209e7
dec dword [ebp - 0x24]
lea ecx, [eax + 1]
movsx eax, byte [eax]
mov edx, ecx
sub eax, 0x30
mulsd xmm2, xmm1
mov dword [ebp - 0x58], edx
movd xmm0, eax
cvtdq2pd xmm0, xmm0
addsd xmm2, xmm0
comisd xmm2, xmm3
jbe 0x100209f0
inc edi
jmp 0x100209f0
mov ecx, dword [ebp - 0x30]
inc ecx
mov edx, ecx
mov dword [ebp - 0x58], edx
mov dl, byte [edx]
mov eax, ecx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x34], eax
cmp dl, 0x30
jge 0x100209b0
jmp 0x10020a1e
mov ecx, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x1c]
sub eax, esi
mov dword [ecx + 0x18], 0xe
mov dword [ecx + 0x1c], eax
jmp 0x10020e10
mov esi, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x34]
xor edi, edi
cmp byte [ecx], 0x65
je 0x10020a2e
cmp byte [ecx], 0x45
jne 0x10020afc
cmp byte [ebp - 0xe], 0
lea edi, [ecx + 1]
mov dword [ebp - 0x58], edi
jne 0x10020a58
cmp byte [ebp - 0xd], 0
je 0x10020a48
mov esi, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
jmp 0x10020a4a
xor edx, edx
mov ecx, esi
call fcn.10131ee0
movaps xmm2, xmm0
mov byte [ebp - 0xe], 1
mov cl, byte [edi]
xor dl, dl
cmp cl, 0x2b
je 0x10020a68
cmp cl, 0x2d
jne 0x10020a6f
mov dl, 1
mov cl, byte [edi + 1]
inc edi
mov dword [ebp - 0x58], edi
lea eax, [ecx - 0x30]
cmp al, 9
ja 0x10020b77
lea esi, [edi + 1]
movsx edi, cl
mov cl, byte [esi]
sub edi, 0x30
mov dword [ebp - 0x58], esi
mov byte [ebp - 0x10], cl
test dl, dl
je 0x10020b3e
mov ecx, dword [ebp - 0x24]
mov eax, 0x66666667
add ecx, 0x7ffffff7
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp byte [ebp - 0x10], 0x30
mov dword [ebp - 0x3c], eax
jl 0x10020afa
mov al, byte [esi]
cmp al, 0x39
jg 0x10020afa
movsx eax, byte [esi]
lea edi, [edi + edi*4]
lea edi, [edi - 0x18]
lea edx, [esi + 1]
mov dword [ebp - 0x58], edx
mov esi, edx
lea edi, [eax + edi*2]
cmp edi, dword [ebp - 0x3c]
jle 0x10020af4
mov al, byte [edx]
cmp al, 0x30
jl 0x10020af4
mov ecx, edx
nop dword [eax]
cmp al, 0x39
ja 0x10020af1
lea esi, [ecx + 1]
mov edx, esi
mov ecx, esi
mov al, byte [edx]
cmp al, 0x30
jge 0x10020ae0
mov dword [ebp - 0x58], edx
mov al, byte [edx]
cmp al, 0x30
jge 0x10020ab8
neg edi
mov edx, dword [ebp - 0x24]
cmp byte [ebp - 0xe], 0
je 0x10020c30
lea eax, [edi + edx]
cmp eax, 0xfffffecc
jge 0x10020b8e
divsd xmm2, qword [0x1019b4a8]
add eax, 0x134
cmp eax, 0xfffffecc
jl 0x10020bb6
shl eax, 3
mov ecx, 0x1019a9f0
sub ecx, eax
movaps xmm0, xmm2
divsd xmm0, qword [ecx]
jmp 0x10020bb1
mov edx, dword [ebp - 0x24]
mov eax, 0x134
sub eax, edx
mov dword [ebp - 0x3c], eax
cmp cl, 0x30
jl 0x10020aff
mov al, cl
cmp al, 0x39
jg 0x10020afc
movsx eax, byte [esi]
lea edi, [edi + edi*4]
lea edi, [edi - 0x18]
lea edx, [esi + 1]
mov dword [ebp - 0x58], edx
lea edi, [eax + edi*2]
cmp edi, dword [ebp - 0x3c]
jg 0x10020bc5
mov al, byte [edx]
mov esi, edx
cmp al, 0x30
jge 0x10020b52
jmp 0x10020afc
mov ecx, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x1c]
sub edi, esi
mov dword [ecx + 0x18], 0xf
mov dword [ecx + 0x1c], edi
jmp 0x10020e10
lea ecx, [eax*8]
movaps xmm0, xmm2
test eax, eax
js 0x10020ba6
mulsd xmm0, qword [ecx + 0x1019a9f0]
jmp 0x10020bb1
mov eax, 0x1019a9f0
sub eax, ecx
divsd xmm0, qword [eax]
movsd qword [ebp - 0x48], xmm0
movsd xmm0, qword [ebp - 0x48]
comisd xmm0, xmmword [0x1019b4b0]
jbe 0x10020bdd
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x38]
mov dword [ecx + 0x18], 0xd
mov dword [ecx + 0x1c], eax
mov esi, dword [ebp - 0x1c]
jmp 0x10020e10
cmp byte [ebp - 0xf], 0
je 0x10020bea
xorps xmm0, xmmword [0x1019a480]
mov esi, dword [ebp + 0xc]
movsd qword [ebp - 0x48], xmm0
mov eax, dword [esi + 0x28]
sub eax, dword [esi + 0x24]
cmp eax, 0x10
jge 0x10020c07
push 1
lea ecx, [esi + 0x18]
call fcn.10020520
mov ecx, dword [esi + 0x24]
xorps xmm0, xmm0
movsd xmm3, qword [ebp - 0x48]
lea eax, [ecx + 0x10]
mov dword [esi + 0x24], eax
mov eax, 0x216
mov esi, dword [ebp - 0x1c]
movups xmmword [ecx], xmm0
mov word [ecx + 0xe], ax
movsd qword [ecx], xmm3
jmp 0x10020e10
cmp byte [ebp - 0xd], 0
mov edi, dword [ebp + 0xc]
lea ecx, [edi + 0x18]
mov dword [ebp + 0xc], ecx
je 0x10020d78
mov eax, dword [ecx + 0x10]
sub eax, dword [ecx + 0xc]
cmp byte [ebp - 0xf], 0
je 0x10020cf7
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x18]
neg esi
adc edi, 0
neg edi
cmp eax, 0x10
jge 0x10020c6f
push 1
call fcn.10020520
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0xc]
xorps xmm0, xmm0
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 0x10020ccf
jg 0x10020c96
test esi, esi
jb 0x10020ccf
mov eax, 0x196
mov word [edx + 0xe], ax
mov ecx, eax
xor eax, eax
or eax, edi
jne 0x10020cb2
mov eax, 0x1d6
mov word [edx + 0xe], ax
mov ecx, eax
and esi, 0x80000000
or esi, edi
jne 0x10020bd5
mov esi, dword [ebp - 0x1c]
or ecx, 0x20
mov word [edx + 0xe], cx
jmp 0x10020e10
cmp edi, 0xffffffff
jl 0x10020bd5
jg 0x10020ce6
cmp esi, 0x80000000
jb 0x10020bd5
mov esi, dword [ebp - 0x1c]
mov eax, 0xb6
mov word [edx + 0xe], ax
jmp 0x10020e10
cmp eax, 0x10
jge 0x10020d06
push 1
call fcn.10020520
mov ecx, dword [ebp + 0xc]
mov esi, dword [ecx + 0xc]
xorps xmm0, xmm0
mov edx, dword [ebp - 0x18]
lea eax, [esi + 0x10]
mov dword [ecx + 0xc], eax
mov eax, 0x116
mov ecx, dword [ebp - 0x14]
mov edi, eax
movups xmmword [esi], xmm0
mov dword [esi], ecx
mov dword [esi + 4], edx
mov word [esi + 0xe], ax
test edx, edx
jl 0x10020d40
jg 0x10020d35
test ecx, ecx
jb 0x10020d40
mov eax, 0x196
mov word [esi + 0xe], ax
mov edi, eax
movzx eax, di
mov dword [ebp + 0xc], eax
xor eax, eax
or eax, edx
jne 0x10020d58
or edi, 0x40
mov word [esi + 0xe], di
movzx eax, di
jmp 0x10020d5b
mov eax, dword [ebp + 0xc]
and ecx, 0x80000000
or ecx, edx
jne 0x10020bd5
or eax, 0x20
mov word [esi + 0xe], ax
mov esi, dword [ebp - 0x1c]
jmp 0x10020e10
mov eax, dword [edi + 0x28]
sub eax, dword [edi + 0x24]
cmp byte [ebp - 0xf], 0
je 0x10020dc4
mov esi, dword [ebp - 0x20]
neg esi
cmp eax, 0x10
jge 0x10020d95
push 1
call fcn.10020520
mov ecx, dword [edi + 0x24]
xorps xmm0, xmm0
test esi, esi
lea eax, [ecx + 0x10]
mov dword [edi + 0x24], eax
mov eax, esi
mov esi, dword [ebp - 0x1c]
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
jmp 0x10020e10
cmp eax, 0x10
jge 0x10020dd0
push 1
call fcn.10020520
mov ecx, dword [edi + 0x24]
xorps xmm0, xmm0
mov esi, dword [ebp - 0x1c]
lea eax, [ecx + 0x10]
mov dword [edi + 0x24], eax
mov eax, dword [ebp - 0x20]
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
jmp 0x10020e10
mov esi, dword [ebp - 0x1c]
sub eax, esi
mov dword [edx + 0x18], 3
mov dword [edx + 0x1c], eax
mov eax, dword [ebp + 8]
movq xmm0, qword [ebp - 0x58]
mov ecx, dword [ebp - 0xc]
pop edi
movq qword [eax], xmm0
mov dword [eax + 8], esi
mov dword fs:[0], ecx
pop esi
mov esp, ebp
pop ebp
ret 8