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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x58
mov edx, ecx
mov ecx, dword [ebp + 8]
push esi
push edi
mov dword [esp + 0x34], edx
vmovq xmm0, qword [ecx]
mov ecx, dword [ecx + 8]
vmovq qword [esp + 0x50], xmm0
mov eax, dword [esp + 0x50]
mov esi, eax
sub esi, ecx
mov dword [esp + 0x24], ecx
vxorpd xmm0, xmm0, xmm0
mov dword [esp + 0x44], esi
cmp byte [eax], 0x2d
vmovsd qword [esp + 0x48], xmm0
vxorpd xmm1, xmm1, xmm1
jne 0x1002d76d
inc eax
mov ch, 1
mov dword [esp + 0x50], eax
jmp 0x1002d76f
xor ch, ch
mov cl, byte [eax]
xor esi, esi
mov byte [esp + 0x13], ch
mov byte [esp + 0xf], 0
mov dword [esp + 0x20], esi
vmovlpd qword [esp + 0x38], xmm0
cmp cl, 0x30
jne 0x1002d7b1
mov ecx, dword [esp + 0x3c]
lea edi, [eax + 1]
mov esi, dword [esp + 0x38]
xor edx, edx
mov dword [esp + 0x18], edx
mov dword [esp + 0x50], edi
mov byte [esp + 0x10], dl
mov dword [esp + 0x14], ecx
mov dword [esp + 0x1c], esi
jmp 0x1002dbb2
cmp cl, 0x31
jl 0x1002e122
cmp cl, 0x39
jg 0x1002e122
lea edx, [eax + 1]
movsx eax, cl
mov cl, byte [edx]
sub eax, 0x30
test ch, ch
je 0x1002d825
cmp cl, 0x30
jl 0x1002d85f
mov edi, edx
cmp cl, 0x39
jg 0x1002d85f
cmp eax, 0xccccccc
jb 0x1002d7f2
jne 0x1002d812
mov edi, edx
cmp cl, 0x38
ja 0x1002d812
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 0x1002d85f
mov edi, edx
cmp cl, 0x39
jle 0x1002d7e2
jmp 0x1002d85f
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], 0
mov byte [esp + 0xf], 1
jmp 0x1002d86f
cmp cl, 0x30
jl 0x1002d85f
mov edi, edx
cmp cl, 0x39
jg 0x1002d85f
cmp eax, 0x19999999
jb 0x1002d841
jne 0x1002d812
mov edi, edx
cmp cl, 0x35
ja 0x1002d812
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 0x1002d85f
mov edi, edx
cmp cl, 0x39
jle 0x1002d831
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x28], ecx
mov cl, byte [esp + 0xf]
mov edi, edx
mov dword [esp + 0x30], esi
mov esi, eax
mov byte [esp + 0x11], cl
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x18], esi
mov esi, dword [esp + 0x28]
mov dword [esp + 0x14], ecx
mov cl, byte [esp + 0x11]
mov dword [esp + 0x1c], esi
test cl, cl
mov esi, dword [esp + 0x30]
mov byte [esp + 0xf], cl
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x20], esi
mov esi, dword [esp + 0x1c]
mov byte [esp + 0x10], 0
mov dword [esp + 0x50], edi
je 0x1002dbae
cmp byte [esp + 0x13], 0
mov esi, dword [esp + 0x28]
mov cl, byte [edx]
mov dword [esp + 0x1c], esi
mov esi, dword [esp + 0x30]
mov dword [esp + 0x20], esi
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x18], eax
je 0x1002da3b
mov byte [esp + 0x12], cl
cmp byte [esp + 0x12], 0x30
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x14], ecx
mov cl, byte [esp + 0x11]
mov byte [esp + 0xf], cl
mov ecx, dword [esp + 0x14]
jl 0x1002da14
cmp byte [esp + 0x12], 0x39
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x28]
mov dword [esp + 0x14], ecx
mov cl, byte [esp + 0x11]
mov dword [esp + 0x1c], esi
mov esi, dword [esp + 0x30]
mov byte [esp + 0xf], cl
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x20], esi
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x18], eax
jg 0x1002da14
mov esi, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x18], eax
mov al, byte [esp + 0x11]
mov byte [esp + 0xf], al
mov eax, dword [esp + 0x30]
mov dword [esp + 0x38], edx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], ecx
mov dword [esp + 0x20], eax
mov byte [esp + 0x10], 0
cmp ecx, 0xccccccc
jb 0x1002d9b1
ja 0x1002d97a
cmp esi, 0xcccccccc
jb 0x1002d9b1
cmp esi, 0xcccccccc
jne 0x1002d998
cmp ecx, 0xccccccc
jne 0x1002d998
cmp byte [esp + 0x12], 0x38
mov eax, edx
mov byte [esp + 0x10], 0
jbe 0x1002d9b5
mov edx, ecx
mov ecx, esi
call fcn.101a4b60
mov ecx, dword [esp + 0x14]
mov dl, 1
mov eax, dword [esp + 0x20]
vmovaps xmm1, xmm0
jmp 0x1002da1c
mov eax, dword [esp + 0x38]
movsx esi, byte [eax]
lea edi, [eax + 1]
mov eax, dword [esp + 0x1c]
xor edx, edx
shld ecx, eax, 2
sub esi, 0x30
shl eax, 2
add dword [esp + 0x1c], eax
mov eax, dword [esp + 0x1c]
adc dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x14]
shld ecx, eax, 1
add eax, eax
add esi, eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x1c], esi
adc ecx, edx
mov dl, byte [edi]
inc eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x20], eax
mov byte [esp + 0x12], dl
cmp dl, 0x30
jl 0x1002da18
cmp byte [esp + 0x12], 0x39
mov edx, edi
mov dword [esp + 0x38], edi
jle 0x1002d963
jmp 0x1002da18
mov eax, dword [esp + 0x20]
mov dl, byte [esp + 0x10]
mov byte [esp + 0x10], dl
mov dword [esp + 0x50], edi
vmovsd qword [esp + 0x38], xmm1
mov dword [esp + 0x38], esi
test dl, dl
je 0x1002dbae
jmp 0x1002db74
mov byte [esp + 0x12], cl
cmp byte [esp + 0x12], 0x30
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x14], ecx
mov cl, byte [esp + 0x11]
mov byte [esp + 0xf], cl
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x50], edi
jl 0x1002dbae
cmp byte [esp + 0x12], 0x39
mov edi, edx
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x28]
mov dword [esp + 0x14], ecx
mov cl, byte [esp + 0x11]
mov dword [esp + 0x1c], esi
mov esi, dword [esp + 0x30]
mov byte [esp + 0xf], cl
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x20], esi
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x50], edi
mov dword [esp + 0x18], eax
jg 0x1002dbae
mov esi, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x18], eax
mov al, byte [esp + 0x11]
mov byte [esp + 0xf], al
mov eax, dword [esp + 0x30]
mov dword [esp + 0x20], eax
mov al, byte [esp + 0x12]
mov dword [esp + 0x38], edx
mov dword [esp + 0x50], edi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], ecx
nop
mov byte [esp + 0x10], 0
cmp ecx, 0x19999999
jb 0x1002db04
ja 0x1002dae7
cmp esi, 0x99999999
jb 0x1002db04
cmp esi, 0x99999999
jne 0x1002db5e
cmp ecx, 0x19999999
jne 0x1002db5e
mov dword [esp + 0x38], edx
mov byte [esp + 0x10], 0
cmp al, 0x35
ja 0x1002db5e
mov eax, dword [esp + 0x38]
xor edx, edx
movsx esi, byte [eax]
lea edi, [eax + 1]
mov eax, dword [esp + 0x1c]
sub esi, 0x30
shld ecx, eax, 2
mov dword [esp + 0x50], edi
shl eax, 2
add dword [esp + 0x1c], eax
mov eax, dword [esp + 0x1c]
adc dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x14]
shld ecx, eax, 1
add eax, eax
add esi, eax
mov al, byte [edi]
mov dword [esp + 0x1c], esi
adc ecx, edx
inc dword [esp + 0x20]
mov dword [esp + 0x14], ecx
cmp al, 0x30
jl 0x1002dbae
mov dword [esp + 0x38], edi
mov edx, edi
cmp al, 0x39
jle 0x1002dad0
jmp 0x1002dbae
mov edx, ecx
mov ecx, esi
call fcn.101a4b60
mov ecx, dword [esp + 0x14]
vmovaps xmm1, xmm0
mov byte [esp + 0x10], 1
mov al, byte [edi]
cmp al, 0x30
jl 0x1002dbae
vmovsd xmm2, qword [0x10228728]
mov edx, edi
vmovaps xmm0, xmm1
cmp al, 0x39
ja 0x1002dbae
movsx eax, byte [edx]
lea edi, [edx + 1]
sub eax, 0x30
mov dword [esp + 0x50], edi
vxorps xmm1, xmm1, xmm1
vcvtsi2sd xmm1, xmm1, eax
mov al, byte [edi]
mov edx, edi
vfmadd231sd xmm1, xmm0, xmm2
cmp al, 0x30
jge 0x1002db84
mov edx, dword [esp + 0x18]
cmp byte [edi], 0x2e
mov ah, byte [esp + 0x10]
mov dword [esp + 0x30], 0
jne 0x1002dce1
mov al, byte [edi + 1]
inc edi
mov dword [esp + 0x50], edi
mov byte [esp + 0x10], ah
cmp al, 0x30
jl 0x1002dcc8
cmp al, 0x39
jg 0x1002dcc8
test ah, ah
jne 0x1002dc0b
cmp byte [esp + 0xf], ah
je 0x1002dbf1
mov eax, esi
jmp 0x1002dbf5
mov eax, edx
xor ecx, ecx
mov edx, ecx
mov ecx, eax
call fcn.101a4b60
mov ecx, dword [esp + 0x14]
vmovaps xmm1, xmm0
mov byte [esp + 0x10], 1
mov dl, byte [edi]
mov eax, edi
mov byte [esp + 0x12], dl
mov edx, dword [esp + 0x18]
mov dword [esp + 0x18], edx
mov dl, byte [esp + 0xf]
mov byte [esp + 0xf], dl
mov edx, dword [esp + 0x20]
mov dword [esp + 0x38], eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], ecx
vxorpd xmm2, xmm2, xmm2
nop word [eax + eax]
cmp byte [esp + 0x12], 0x39
mov ecx, dword [esp + 0x14]
vmovaps xmm0, xmm1
mov dword [esp + 0x2c], edi
jg 0x1002dcb0
cmp edx, 0x11
jge 0x1002dc85
dec dword [esp + 0x30]
lea eax, [edi + 1]
mov dword [esp + 0x50], eax
movsx eax, byte [edi]
sub eax, 0x30
vxorps xmm1, xmm1, xmm1
vcvtsi2sd xmm1, xmm1, eax
vfmadd231sd xmm1, xmm0, qword [0x10228728]
vcomisd xmm1, xmm2
jbe 0x1002dc81
inc edx
mov eax, edi
jmp 0x1002dc90
inc eax
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x38]
mov edi, eax
mov cl, byte [eax + 1]
inc eax
inc edi
mov byte [esp + 0x12], cl
mov dword [esp + 0x50], eax
cmp cl, 0x30
mov ecx, dword [esp + 0x14]
mov eax, edi
mov dword [esp + 0x38], edi
mov dword [esp + 0x2c], edi
jge 0x1002dc40
mov eax, dword [esp + 0x2c]
xor edi, edi
cmp byte [eax], 0x65
jne 0x1002dce5
mov dl, byte [esp + 0xf]
lea edi, [eax + 1]
mov eax, dword [esp + 0x18]
jmp 0x1002dd09
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x24]
sub edi, ecx
mov dword [eax + 0x18], 0xe
mov dword [eax + 0x1c], edi
jmp 0x1002e132
mov eax, edi
jmp 0x1002dcb4
cmp byte [eax], 0x45
mov dword [esp + 0x14], ecx
jne 0x1002de86
mov dl, byte [esp + 0xf]
lea edi, [eax + 1]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], eax
mov byte [esp + 0xf], dl
cmp byte [esp + 0x10], 0
mov dword [esp + 0x50], edi
jne 0x1002dd30
test dl, dl
je 0x1002dd1c
mov eax, esi
jmp 0x1002dd1e
xor ecx, ecx
mov edx, ecx
mov ecx, eax
call fcn.101a4b60
vmovaps xmm1, xmm0
mov byte [esp + 0x10], 1
mov cl, byte [edi]
xor dl, dl
cmp cl, 0x2b
je 0x1002dd40
cmp cl, 0x2d
jne 0x1002dd48
mov dl, 1
mov cl, byte [edi + 1]
inc edi
mov dword [esp + 0x50], edi
mov al, cl
sub al, 0x30
cmp al, 9
ja 0x1002de6d
mov al, byte [edi + 1]
lea esi, [edi + 1]
movsx edi, cl
sub edi, 0x30
mov dword [esp + 0x50], esi
mov byte [esp + 0x12], al
test dl, dl
je 0x1002de30
mov ecx, dword [esp + 0x30]
mov eax, 0x66666667
add ecx, 0x7ffffff7
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x38], eax
mov al, byte [esp + 0x12]
cmp al, 0x30
jl 0x1002dddb
cmp al, 0x39
ja 0x1002dddb
movsx eax, byte [esi]
lea ecx, [edi + edi*4]
lea edi, [ecx - 0x18]
lea edx, [esi + 1]
mov dword [esp + 0x50], edx
mov esi, edx
lea edi, [eax + edi*2]
cmp edi, dword [esp + 0x38]
jle 0x1002ddd5
mov al, byte [edx]
cmp al, 0x30
jl 0x1002ddd5
mov ecx, edx
nop
cmp al, 0x39
ja 0x1002ddd1
lea esi, [ecx + 1]
mov edx, esi
mov ecx, esi
mov al, byte [edx]
cmp al, 0x30
jge 0x1002ddc0
mov dword [esp + 0x50], edx
mov al, byte [edx]
cmp al, 0x30
jge 0x1002dd97
neg edi
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
cmp byte [esp + 0x10], 0
mov al, byte [esp + 0xf]
je 0x1002df3d
mov eax, dword [esp + 0x30]
add eax, edi
cmp eax, 0xfffffecc
jge 0x1002de93
vmulsd xmm0, xmm1, qword [0x10228410]
add eax, 0x134
cmp eax, 0xfffffecc
jl 0x1002deb9
shl eax, 3
mov ecx, 0x101b7100
sub ecx, eax
vdivsd xmm2, xmm0, qword [ecx]
jmp 0x1002deb3
mov ecx, 0x134
sub ecx, dword [esp + 0x30]
mov dword [esp + 0x38], ecx
cmp al, 0x30
jl 0x1002dddd
cmp al, 0x39
ja 0x1002dddd
movsx eax, byte [esi]
lea ecx, [edi + edi*4]
lea edi, [ecx - 0x18]
lea edx, [esi + 1]
mov dword [esp + 0x50], edx
lea edi, [eax + edi*2]
cmp edi, dword [esp + 0x38]
jg 0x1002dec9
cmp byte [edx], 0x30
mov esi, edx
jl 0x1002dddd
mov al, byte [edx]
jmp 0x1002de41
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x24]
sub edi, ecx
mov dword [eax + 0x18], 0xf
mov dword [eax + 0x1c], edi
jmp 0x1002e132
mov edx, dword [esp + 0x18]
mov dword [esp + 0x18], edx
jmp 0x1002dde5
lea ecx, [eax*8]
test eax, eax
js 0x1002dea8
vmulsd xmm2, xmm1, qword [ecx + 0x101b7100]
jmp 0x1002deb3
mov eax, 0x101b7100
sub eax, ecx
vdivsd xmm2, xmm1, qword [eax]
vmovsd qword [esp + 0x48], xmm2
vmovsd xmm0, qword [esp + 0x48]
vcomisd xmm0, qword [0x102289f8]
jbe 0x1002dee4
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x44]
mov dword [eax + 0x18], 0xd
mov dword [eax + 0x1c], ecx
mov ecx, dword [esp + 0x24]
jmp 0x1002e132
cmp byte [esp + 0x13], 0
je 0x1002def9
vxorpd xmm0, xmm0, xmmword [0x10229480]
vmovsd qword [esp + 0x48], xmm0
mov esi, dword [ebp + 0xc]
mov eax, dword [esi + 0x28]
sub eax, dword [esi + 0x24]
cmp eax, 0x10
jge 0x1002df10
push ecx
lea ecx, [esi + 0x18]
call fcn.1002e400
mov ecx, dword [esi + 0x24]
vmovsd xmm2, qword [esp + 0x48]
vpxor xmm0, xmm0, xmm0
lea eax, [ecx + 0x10]
mov dword [esi + 0x24], eax
mov eax, 0x216
vmovdqu xmmword [ecx], xmm0
vmovsd qword [ecx], xmm2
mov word [ecx + 0xe], ax
mov ecx, dword [esp + 0x24]
jmp 0x1002e132
mov edi, dword [ebp + 0xc]
lea ecx, [edi + 0x18]
mov dword [esp + 0x44], ecx
test al, al
je 0x1002e08a
mov eax, dword [ecx + 0x10]
sub eax, dword [ecx + 0xc]
cmp byte [esp + 0x13], 0
je 0x1002e006
mov edi, dword [esp + 0x14]
neg esi
adc edi, 0
neg edi
cmp eax, 0x10
jge 0x1002df7a
push ecx
call fcn.1002e400
mov ecx, dword [esp + 0x44]
mov edx, dword [ecx + 0xc]
vpxor xmm0, xmm0, xmm0
lea eax, [edx + 0x10]
mov dword [ecx + 0xc], eax
mov eax, 0x96
vmovdqu xmmword [edx], xmm0
mov dword [edx], esi
mov dword [edx + 4], edi
mov word [edx + 0xe], ax
test edi, edi
jl 0x1002dfdd
jg 0x1002dfa3
test esi, esi
jb 0x1002dfdd
mov eax, 0x196
mov word [edx + 0xe], ax
mov ecx, eax
xor eax, eax
or eax, edi
jne 0x1002dfbf
mov eax, 0x1d6
mov word [edx + 0xe], ax
mov ecx, eax
and esi, 0x80000000
or esi, edi
jne 0x1002dedb
or ecx, 0x20
mov word [edx + 0xe], cx
mov ecx, dword [esp + 0x24]
jmp 0x1002e132
cmp edi, 0xffffffff
jl 0x1002dedb
jg 0x1002dff4
cmp esi, 0x80000000
jb 0x1002dedb
mov ecx, dword [esp + 0x24]
mov eax, 0xb6
mov word [edx + 0xe], ax
jmp 0x1002e132
cmp eax, 0x10
jge 0x1002e015
push ecx
call fcn.1002e400
mov ecx, dword [esp + 0x44]
mov edx, dword [ecx + 0xc]
vpxor xmm0, xmm0, xmm0
lea eax, [edx + 0x10]
mov dword [ecx + 0xc], eax
mov eax, 0x116
mov ecx, dword [esp + 0x14]
mov edi, eax
vmovdqu xmmword [edx], xmm0
mov dword [edx], esi
mov dword [edx + 4], ecx
mov word [edx + 0xe], ax
test ecx, ecx
jl 0x1002e04f
jg 0x1002e044
test esi, esi
jb 0x1002e04f
mov eax, 0x196
mov word [edx + 0xe], ax
mov edi, eax
movzx eax, di
mov dword [esp + 0x44], eax
xor eax, eax
or eax, ecx
jne 0x1002e068
or edi, 0x40
mov word [edx + 0xe], di
movzx eax, di
jmp 0x1002e06c
mov eax, dword [esp + 0x44]
and esi, 0x80000000
or esi, ecx
jne 0x1002dedb
mov ecx, dword [esp + 0x24]
or eax, 0x20
mov word [edx + 0xe], ax
jmp 0x1002e132
mov eax, dword [edi + 0x28]
sub eax, dword [edi + 0x24]
cmp byte [esp + 0x13], 0
je 0x1002e0e2
neg edx
mov dword [esp + 0x18], edx
cmp eax, 0x10
jge 0x1002e0ac
push ecx
call fcn.1002e400
mov edx, dword [esp + 0x18]
mov ecx, dword [edi + 0x24]
mov esi, dword [esp + 0x18]
test esi, esi
vpxor xmm0, xmm0, xmm0
lea eax, [ecx + 0x10]
mov dword [edi + 0x24], eax
mov eax, edx
cdq
vmovdqu 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 [esp + 0x24]
jmp 0x1002e132
cmp eax, 0x10
jge 0x1002e0ed
push ecx
call fcn.1002e400
mov ecx, dword [edi + 0x24]
vpxor xmm0, xmm0, xmm0
lea eax, [ecx + 0x10]
mov dword [edi + 0x24], eax
mov eax, dword [esp + 0x18]
vmovdqu 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 [esp + 0x24]
jmp 0x1002e132
mov ecx, dword [esp + 0x24]
sub eax, ecx
mov dword [edx + 0x18], 3
mov dword [edx + 0x1c], eax
mov eax, dword [ebp + 8]
vmovq xmm0, qword [esp + 0x50]
pop edi
pop esi
vmovq qword [eax], xmm0
mov dword [eax + 8], ecx
mov esp, ebp
pop ebp
ret 8