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

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1012a28d
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x50
mov eax, dword [0x1014a0c0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x4c], edi
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 0xc]
mov dword [ebp - 0x54], ecx
mov dword [ebp - 0x60], eax
movq xmm0, qword [eax]
mov ecx, dword [eax + 8]
movq qword [ebp - 0x24], xmm0
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], 0
xorps xmm1, xmm1
mov esi, dword [ebp - 0x24]
mov eax, esi
sub eax, ecx
mov dword [ebp - 0x50], eax
cmp byte [esi], 0x2d
jne 0x1008f105
inc esi
mov dl, 1
mov dword [ebp - 0x24], esi
jmp 0x1008f107
xor dl, dl
mov al, byte [esi]
xorps xmm0, xmm0
mov byte [ebp - 0x27], dl
movlpd qword [ebp - 0x48], xmm0
mov byte [ebp - 0x25], 0
mov dword [ebp - 0x38], 0
cmp al, 0x30
jne 0x1008f135
lea edi, [esi + 1]
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x24], edi
jmp 0x1008f1e7
cmp al, 0x31
jl 0x1008f808
cmp al, 0x39
jg 0x1008f808
movsx ecx, al
lea edi, [esi + 1]
mov al, byte [edi]
sub ecx, 0x30
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x40], ecx
test dl, dl
je 0x1008f1a9
cmp al, 0x30
jl 0x1008f1e7
mov edx, edi
mov esi, edi
cmp al, 0x39
ja 0x1008f1e7
cmp ecx, 0xccccccc
jb 0x1008f17a
jne 0x1008f19e
mov edx, esi
cmp al, 0x38
ja 0x1008f19e
movsx eax, byte [edx]
lea ecx, [ecx + ecx*4]
inc dword [ebp - 0x38]
lea edi, [edx + 1]
lea ecx, [ecx - 0x18]
mov dword [ebp - 0x24], edi
mov edx, edi
mov esi, edi
lea ecx, [eax + ecx*2]
mov al, byte [edi]
mov dword [ebp - 0x40], ecx
cmp al, 0x30
jge 0x1008f166
jmp 0x1008f1e7
mov dl, 1
mov eax, ecx
xor ecx, ecx
mov byte [ebp - 0x25], dl
jmp 0x1008f1f0
cmp al, 0x30
jl 0x1008f1e7
mov edx, edi
mov esi, edi
cmp al, 0x39
jg 0x1008f1e7
cmp ecx, 0x19999999
jb 0x1008f1c5
jne 0x1008f19e
mov edx, esi
cmp al, 0x35
jg 0x1008f19e
movsx eax, byte [edx]
lea ecx, [ecx + ecx*4]
inc dword [ebp - 0x38]
lea edi, [edx + 1]
lea ecx, [ecx - 0x18]
mov dword [ebp - 0x24], edi
mov edx, edi
mov esi, edi
lea ecx, [eax + ecx*2]
mov al, byte [edi]
mov dword [ebp - 0x40], ecx
cmp al, 0x30
jge 0x1008f1b1
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x44]
mov dl, byte [ebp - 0x25]
xor dh, dh
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x30], ecx
mov byte [ebp - 0x26], dh
test dl, dl
je 0x1008f32a
mov dl, byte [edi]
cmp byte [ebp - 0x27], dh
je 0x1008f2ab
cmp dl, 0x30
jl 0x1008f327
mov esi, edi
mov dword [ebp - 0x34], esi
nop dword [eax]
cmp dl, 0x39
ja 0x1008f324
cmp ecx, 0xccccccc
jb 0x1008f251
ja 0x1008f23a
cmp eax, 0xcccccccc
jb 0x1008f251
cmp eax, 0xcccccccc
jne 0x1008f298
cmp ecx, 0xccccccc
jne 0x1008f298
mov esi, dword [ebp - 0x34]
cmp dl, 0x38
ja 0x1008f298
shld ecx, eax, 2
lea edi, [esi + 1]
xor edx, edx
movsx esi, byte [esi]
shl eax, 2
sub esi, 0x30
add dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
adc dword [ebp - 0x30], ecx
mov ecx, dword [ebp - 0x30]
shld ecx, eax, 1
mov dword [ebp - 0x24], edi
add eax, eax
mov dword [ebp - 0x34], edi
add eax, esi
mov esi, edi
mov dword [ebp - 0x2c], eax
adc edx, ecx
inc dword [ebp - 0x38]
mov ecx, edx
mov dl, byte [edi]
mov dword [ebp - 0x30], ecx
cmp dl, 0x30
jge 0x1008f220
jmp 0x1008f324
mov edx, ecx
mov ecx, eax
call fcn.10125300
mov dh, 1
movaps xmm1, xmm0
mov byte [ebp - 0x26], dh
jmp 0x1008f327
cmp dl, 0x30
jl 0x1008f327
mov esi, edi
mov dword [ebp - 0x34], esi
cmp dl, 0x39
ja 0x1008f324
cmp ecx, 0x19999999
jb 0x1008f2e2
ja 0x1008f2cb
cmp eax, 0x99999999
jb 0x1008f2e2
cmp eax, 0x99999999
jne 0x1008f298
cmp ecx, 0x19999999
jne 0x1008f298
mov esi, dword [ebp - 0x34]
cmp dl, 0x35
ja 0x1008f298
shld ecx, eax, 2
lea edi, [esi + 1]
xor edx, edx
movsx esi, byte [esi]
shl eax, 2
sub esi, 0x30
add dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
adc dword [ebp - 0x30], ecx
mov ecx, dword [ebp - 0x30]
shld ecx, eax, 1
mov dword [ebp - 0x24], edi
add eax, eax
mov dword [ebp - 0x34], edi
add eax, esi
mov esi, edi
mov dword [ebp - 0x2c], eax
adc edx, ecx
inc dword [ebp - 0x38]
mov ecx, edx
mov dl, byte [edi]
mov dword [ebp - 0x30], ecx
cmp dl, 0x30
jge 0x1008f2b5
mov dh, byte [ebp - 0x26]
mov dl, byte [ebp - 0x25]
movsd xmm2, qword [0x1013d898]
test dh, dh
je 0x1008f368
mov al, byte [edi]
cmp al, 0x30
jl 0x1008f368
mov ecx, edi
nop
cmp al, 0x39
ja 0x1008f365
movsx eax, byte [ecx]
lea edi, [ecx + 1]
sub eax, 0x30
mulsd xmm1, xmm2
mov ecx, edi
movd xmm0, eax
mov al, byte [edi]
cvtdq2pd xmm0, xmm0
addsd xmm1, xmm0
cmp al, 0x30
jge 0x1008f340
mov dword [ebp - 0x24], edi
mov al, byte [edi]
mov dword [ebp - 0x34], 0
cmp al, 0x2e
jne 0x1008f379
inc edi
mov dword [ebp - 0x24], edi
mov esi, edi
cmp al, 0x2e
jne 0x1008f425
mov al, byte [esi]
cmp al, 0x30
jl 0x1008f44a
cmp al, 0x39
jg 0x1008f44a
test dh, dh
jne 0x1008f3c0
test dl, dl
je 0x1008f3a5
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x30]
jmp 0x1008f3aa
mov ecx, dword [ebp - 0x40]
xor edx, edx
call fcn.10125300
movsd xmm2, qword [0x1013d898]
movaps xmm1, xmm0
mov byte [ebp - 0x26], 1
jmp 0x1008f3c3
mov byte [ebp - 0x26], dh
mov cl, byte [edi]
mov eax, esi
mov edx, dword [ebp - 0x38]
xorps xmm3, xmm3
mov dword [ebp - 0x5c], esi
mov edi, esi
mov dword [ebp - 0x44], esi
mov esi, edi
cmp cl, 0x39
jg 0x1008f422
cmp edx, 0x11
jge 0x1008f40b
dec dword [ebp - 0x34]
lea esi, [eax + 1]
movsx eax, byte [eax]
mov ecx, esi
sub eax, 0x30
mulsd xmm1, xmm2
mov dword [ebp - 0x24], ecx
movd xmm0, eax
cvtdq2pd xmm0, xmm0
addsd xmm1, xmm0
comisd xmm1, xmm3
jbe 0x1008f414
inc edx
jmp 0x1008f414
mov esi, dword [ebp - 0x5c]
inc esi
mov ecx, esi
mov dword [ebp - 0x24], ecx
mov cl, byte [ecx]
mov eax, esi
mov dword [ebp - 0x5c], eax
mov edi, eax
cmp cl, 0x30
jge 0x1008f3d5
mov dh, byte [ebp - 0x26]
xor edi, edi
cmp byte [esi], 0x65
je 0x1008f435
cmp byte [esi], 0x45
jne 0x1008f511
inc esi
mov dword [ebp - 0x24], esi
test dh, dh
jne 0x1008f46e
cmp byte [ebp - 0x25], dh
je 0x1008f45d
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x30]
jmp 0x1008f462
mov ecx, dword [ebp - 0x4c]
mov eax, 0xe
sub esi, dword [ebp - 0x58]
mov dword [ebp - 0x50], ecx
jmp 0x1008f815
mov ecx, dword [ebp - 0x40]
xor edx, edx
call fcn.10125300
movaps xmm1, xmm0
mov byte [ebp - 0x26], 1
mov cl, byte [esi]
xor dl, dl
cmp cl, 0x2b
je 0x1008f47e
cmp cl, 0x2d
jne 0x1008f485
mov dl, 1
mov cl, byte [esi + 1]
inc esi
mov dword [ebp - 0x24], esi
lea eax, [ecx - 0x30]
cmp al, 9
ja 0x1008f5dc
inc esi
movsx edi, cl
sub edi, 0x30
mov dword [ebp - 0x24], esi
mov cl, byte [esi]
mov byte [ebp - 0x39], cl
test dl, dl
je 0x1008f596
mov ecx, dword [ebp - 0x34]
mov eax, 0x66666667
add ecx, 0x7ffffff7
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp byte [ebp - 0x39], 0x30
mov dword [ebp - 0x44], eax
jl 0x1008f50f
mov al, byte [esi]
nop dword [eax]
cmp al, 0x39
jg 0x1008f50f
movsx eax, byte [esi]
lea ecx, [edi + edi*4]
lea edi, [ecx - 0x18]
lea edx, [esi + 1]
mov dword [ebp - 0x24], edx
mov esi, edx
lea edi, [eax + edi*2]
cmp edi, dword [ebp - 0x44]
jle 0x1008f509
mov al, byte [edx]
cmp al, 0x30
jl 0x1008f509
mov ecx, edx
cmp al, 0x39
ja 0x1008f506
lea esi, [ecx + 1]
mov edx, esi
mov ecx, esi
mov al, byte [edx]
cmp al, 0x30
jge 0x1008f4f5
mov dword [ebp - 0x24], edx
mov al, byte [edx]
cmp al, 0x30
jge 0x1008f4d0
neg edi
mov edx, dword [ebp - 0x34]
cmp byte [ebp - 0x26], 0
je 0x1008f64a
lea eax, [edi + edx]
cmp eax, 0xfffffecc
jge 0x1008f604
mulsd xmm1, qword [0x1013d670]
add eax, 0x134
cmp eax, 0xfffffecc
jge 0x1008f5f1
xorps xmm0, xmm0
cmp byte [ebp - 0x27], 0
je 0x1008f554
xorps xmm0, xmmword [0x1013eab0]
mov esi, dword [ebp - 0x54]
movsd qword [ebp - 0x48], xmm0
mov eax, dword [esi + 0x28]
sub eax, dword [esi + 0x24]
cmp eax, 0x10
jge 0x1008f570
push ecx
lea ecx, [esi + 0x18]
call fcn.1008fa40
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
movups xmmword [ecx], xmm0
mov word [ecx + 0xe], ax
movsd qword [ecx], xmm3
jmp 0x1008f82b
mov edx, dword [ebp - 0x34]
mov eax, 0x134
sub eax, edx
mov dword [ebp - 0x44], eax
cmp cl, 0x30
jl 0x1008f514
mov al, byte [esi]
nop
cmp al, 0x39
jg 0x1008f511
movsx eax, byte [esi]
lea ecx, [edi + edi*4]
lea edi, [ecx - 0x18]
lea edx, [esi + 1]
mov dword [ebp - 0x24], edx
lea edi, [eax + edi*2]
cmp edi, dword [ebp - 0x44]
jg 0x1008f635
mov al, byte [edx]
mov esi, edx
cmp al, 0x30
jge 0x1008f5b0
jmp 0x1008f511
mov eax, dword [ebp - 0x4c]
sub esi, dword [ebp - 0x58]
mov dword [eax + 0x18], 0xf
mov dword [eax + 0x1c], esi
jmp 0x1008f82b
shl eax, 3
mov ecx, 0x1013c4f0
sub ecx, eax
movaps xmm0, xmm1
divsd xmm0, qword [ecx]
jmp 0x1008f627
lea ecx, [eax*8]
movaps xmm0, xmm1
test eax, eax
js 0x1008f61c
mulsd xmm0, qword [ecx + 0x1013c4f0]
jmp 0x1008f627
mov eax, 0x1013c4f0
sub eax, ecx
divsd xmm0, qword [eax]
comisd xmm0, xmmword [0x1013da78]
jbe 0x1008f547
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x50]
mov dword [eax + 0x18], 0xd
mov dword [eax + 0x1c], ecx
jmp 0x1008f82b
mov edx, dword [ebp - 0x54]
mov eax, dword [edx + 0x28]
lea edi, [edx + 0x18]
sub eax, dword [edi + 0xc]
cmp byte [ebp - 0x25], 0
je 0x1008f789
cmp byte [ebp - 0x27], 0
je 0x1008f70d
mov esi, dword [ebp - 0x2c]
mov edi, dword [ebp - 0x30]
neg esi
adc edi, 0
neg edi
cmp eax, 0x10
jge 0x1008f688
push ecx
lea ecx, [edx + 0x18]
call fcn.1008fa40
mov edx, dword [ebp - 0x54]
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 0x1008f6e8
jg 0x1008f6b2
test esi, esi
jb 0x1008f6e8
mov eax, 0x196
mov word [edx + 0xe], ax
mov ecx, eax
xor eax, eax
or eax, edi
jne 0x1008f6ce
mov eax, 0x1d6
mov word [edx + 0xe], ax
mov ecx, eax
and esi, 0x80000000
or esi, edi
jne 0x1008f82b
or ecx, 0x20
mov word [edx + 0xe], cx
jmp 0x1008f82b
cmp edi, 0xffffffff
jl 0x1008f82b
jg 0x1008f6ff
cmp esi, 0x80000000
jb 0x1008f82b
mov eax, 0xb6
mov word [edx + 0xe], ax
jmp 0x1008f82b
cmp eax, 0x10
jge 0x1008f71a
push ecx
mov ecx, edi
call fcn.1008fa40
mov esi, dword [edi + 0xc]
xorps xmm0, xmm0
mov edx, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x2c]
lea eax, [esi + 0x10]
mov dword [edi + 0xc], eax
mov eax, 0x116
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 0x1008f754
jg 0x1008f749
test ecx, ecx
jb 0x1008f754
mov eax, 0x196
mov word [esi + 0xe], ax
mov edi, eax
movzx eax, di
mov dword [ebp - 0x44], eax
xor eax, eax
or eax, edx
jne 0x1008f76c
or edi, 0x40
mov word [esi + 0xe], di
movzx eax, di
jmp 0x1008f76f
mov eax, dword [ebp - 0x44]
and ecx, 0x80000000
or ecx, edx
jne 0x1008f82b
or eax, 0x20
mov word [esi + 0xe], ax
jmp 0x1008f82b
cmp byte [ebp - 0x27], 0
je 0x1008f7cd
mov esi, dword [ebp - 0x40]
neg esi
cmp eax, 0x10
jge 0x1008f7a1
push ecx
mov ecx, edi
call fcn.1008fa40
mov ecx, dword [edi + 0xc]
xorps xmm0, xmm0
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
jmp 0x1008f82b
cmp eax, 0x10
jge 0x1008f7da
push ecx
mov ecx, edi
call fcn.1008fa40
mov ecx, dword [edi + 0xc]
xorps xmm0, xmm0
lea eax, [ecx + 0x10]
mov dword [edi + 0xc], eax
mov eax, dword [ebp - 0x40]
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 0x1008f82b
sub esi, ecx
mov dword [ebp - 0x50], edi
mov eax, 3
mov dword [ebp - 0x4c], edi
mov ecx, dword [ebp - 0x4c]
mov edi, 0x18
mov edx, 0x1c
mov dword [ecx + edi], eax
mov ecx, dword [ebp - 0x50]
mov dword [edx + ecx], esi
mov ecx, dword [ebp - 0x60]
movq xmm0, qword [ebp - 0x24]
mov eax, dword [ebp - 0x58]
movq qword [ecx], xmm0
mov dword [ecx + 8], eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.10123d6c
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 8