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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x50
mov eax, dword [ebp + 8]
xorps xmm1, xmm1
push esi
push edi
mov dword [esp + 0x2c], ecx
movq xmm0, qword [eax]
mov edx, dword [eax + 8]
movq qword [esp + 0x48], xmm0
mov edi, dword [esp + 0x48]
mov eax, edi
sub eax, edx
mov dword [esp + 0x34], edx
mov dword [esp + 0x40], eax
cmp byte [edi], 0x2d
jne 0x10089b23
inc edi
mov byte [esp + 0x12], 1
mov dword [esp + 0x48], edi
jmp 0x10089b28
mov byte [esp + 0x12], 0
mov al, byte [edi]
xor esi, esi
mov byte [esp + 0x10], 0
xorps xmm0, xmm0
movlpd qword [esp + 0x38], xmm0
mov dword [esp + 0x20], esi
cmp al, 0x30
jne 0x10089b68
mov ecx, dword [esp + 0x3c]
xor edx, edx
mov esi, dword [esp + 0x38]
inc edi
mov dword [esp + 0x18], edx
mov ah, dl
mov dword [esp + 0x48], edi
mov byte [esp + 0xf], dl
mov dword [esp + 0x14], ecx
mov dword [esp + 0x1c], esi
jmp 0x10089f09
cmp al, 0x31
jl 0x1008a45c
cmp al, 0x39
jg 0x1008a45c
mov cl, byte [edi + 1]
lea edx, [edi + 1]
movsx eax, al
sub eax, 0x30
cmp byte [esp + 0x12], 0
je 0x10089bed
cmp cl, 0x30
jl 0x10089c2c
mov edi, edx
mov dword [esp + 0x30], edx
nop word [eax + eax]
cmp cl, 0x39
ja 0x10089c2c
cmp eax, 0xccccccc
jb 0x10089bbb
jne 0x10089bda
mov edi, dword [esp + 0x30]
cmp cl, 0x38
ja 0x10089bda
lea ecx, [eax + eax*4]
inc esi
movsx eax, byte [edi]
lea edx, [edi + 1]
mov edi, edx
mov dword [esp + 0x30], edx
lea eax, [eax + ecx*2]
mov cl, byte [edx]
add eax, 0xffffffd0
cmp cl, 0x30
jge 0x10089ba0
jmp 0x10089c2c
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], 0
mov byte [esp + 0x10], 1
jmp 0x10089c3c
cmp cl, 0x30
jl 0x10089c2c
mov edi, edx
mov dword [esp + 0x30], edx
cmp cl, 0x39
ja 0x10089c2c
cmp eax, 0x19999999
jb 0x10089c0f
jne 0x10089bda
mov edi, dword [esp + 0x30]
cmp cl, 0x35
ja 0x10089bda
lea ecx, [eax + eax*4]
inc esi
movsx eax, byte [edi]
lea edx, [edi + 1]
mov edi, edx
mov dword [esp + 0x30], edx
lea eax, [eax + ecx*2]
mov cl, byte [edx]
add eax, 0xffffffd0
cmp cl, 0x30
jge 0x10089bf8
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x24], ecx
mov cl, byte [esp + 0x10]
mov edi, edx
mov dword [esp + 0x30], esi
mov esi, eax
mov byte [esp + 0x11], cl
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x18], esi
mov esi, dword [esp + 0x24]
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 + 0x10], cl
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x20], esi
mov esi, dword [esp + 0x1c]
mov byte [esp + 0xf], 0
mov dword [esp + 0x48], edi
je 0x10089f01
cmp byte [esp + 0x12], 0
mov esi, dword [esp + 0x24]
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 0x10089dc3
mov byte [esp + 0x13], cl
cmp byte [esp + 0x13], 0x30
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x14], ecx
mov cl, byte [esp + 0x11]
mov byte [esp + 0x10], cl
mov ecx, dword [esp + 0x14]
jl 0x10089d94
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x18], eax
mov al, byte [esp + 0x11]
mov byte [esp + 0x10], al
mov eax, dword [esp + 0x30]
mov dword [esp + 0x20], eax
mov al, byte [esp + 0x13]
mov dword [esp + 0x38], edx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], ecx
nop dword [eax]
xor ah, ah
cmp al, 0x39
ja 0x10089d98
cmp ecx, 0xccccccc
jb 0x10089d34
ja 0x10089d1c
cmp esi, 0xcccccccc
jb 0x10089d34
cmp esi, 0xcccccccc
jne 0x10089d80
cmp ecx, 0xccccccc
jne 0x10089d80
mov edx, dword [esp + 0x38]
cmp al, 0x38
ja 0x10089d80
mov eax, dword [esp + 0x1c]
lea edi, [edx + 1]
movsx esi, byte [edx]
xor edx, edx
shld ecx, eax, 2
sub esi, 0x30
mov dword [esp + 0x38], 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
mov edx, edi
cmp al, 0x30
jge 0x10089d00
xor ah, ah
jmp 0x10089d98
mov edx, ecx
mov ecx, esi
call fcn.101781d0
mov ecx, dword [esp + 0x14]
movaps xmm1, xmm0
mov ah, 1
jmp 0x10089d98
mov ah, byte [esp + 0xf]
mov byte [esp + 0xf], ah
mov dl, byte [esp + 0xf]
mov eax, dword [esp + 0x20]
movsd qword [esp + 0x38], xmm1
mov dword [esp + 0x38], esi
mov dword [esp + 0x48], edi
mov byte [esp + 0x38], dl
test dl, dl
je 0x10089f01
jmp 0x10089ec8
mov byte [esp + 0x13], cl
cmp byte [esp + 0x13], 0x30
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x14], ecx
mov cl, byte [esp + 0x11]
mov byte [esp + 0x10], cl
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x48], edi
jl 0x10089f01
mov esi, dword [esp + 0x24]
mov edi, edx
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x18], eax
mov al, byte [esp + 0x11]
mov byte [esp + 0x10], al
mov eax, dword [esp + 0x30]
mov dword [esp + 0x20], eax
mov al, byte [esp + 0x13]
mov dword [esp + 0x38], edx
mov dword [esp + 0x48], edi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], ecx
nop dword [eax]
xor ah, ah
mov byte [esp + 0xf], ah
cmp al, 0x39
ja 0x10089f05
mov byte [esp + 0xf], ah
cmp ecx, 0x19999999
jb 0x10089e61
ja 0x10089e44
cmp esi, 0x99999999
jb 0x10089e61
cmp esi, 0x99999999
jne 0x10089eb3
cmp ecx, 0x19999999
jne 0x10089eb3
mov edx, dword [esp + 0x38]
mov byte [esp + 0xf], 0
cmp al, 0x35
ja 0x10089eb3
mov eax, dword [esp + 0x1c]
lea edi, [edx + 1]
movsx esi, byte [edx]
xor edx, edx
shld ecx, eax, 2
sub esi, 0x30
mov dword [esp + 0x48], 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
mov dword [esp + 0x38], edi
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
mov edx, edi
cmp al, 0x30
jge 0x10089e20
jmp 0x10089f01
mov edx, ecx
mov ecx, esi
call fcn.101781d0
mov ecx, dword [esp + 0x14]
movaps xmm1, xmm0
mov byte [esp + 0xf], 1
mov al, byte [edi]
cmp al, 0x30
jl 0x10089f01
movsd xmm2, qword [0x10209328]
mov edx, edi
cmp al, 0x39
ja 0x10089f01
movsx eax, byte [edx]
lea edi, [edx + 1]
sub eax, 0x30
mulsd xmm1, xmm2
mov dword [esp + 0x48], edi
mov edx, edi
movd xmm0, eax
mov al, byte [edi]
cvtdq2pd xmm0, xmm0
addsd xmm1, xmm0
cmp al, 0x30
jge 0x10089ed8
mov ah, byte [esp + 0xf]
mov edx, dword [esp + 0x18]
cmp byte [edi], 0x2e
mov dword [esp + 0x24], 0
jne 0x1008a025
mov al, byte [edi + 1]
inc edi
mov dword [esp + 0x48], edi
mov byte [esp + 0xf], ah
cmp al, 0x30
jl 0x1008a013
cmp al, 0x39
jg 0x1008a013
test ah, ah
jne 0x10089f5d
cmp byte [esp + 0x10], ah
je 0x10089f44
mov eax, esi
jmp 0x10089f48
mov eax, edx
xor ecx, ecx
mov edx, ecx
mov ecx, eax
call fcn.101781d0
mov ecx, dword [esp + 0x14]
movaps xmm1, xmm0
mov byte [esp + 0xf], 1
mov dl, byte [edi]
mov eax, edi
movsd xmm3, qword [0x10209328]
xorps xmm2, xmm2
mov byte [esp + 0x11], dl
mov edx, dword [esp + 0x18]
mov dword [esp + 0x18], edx
mov dl, byte [esp + 0x10]
mov byte [esp + 0x10], dl
mov edx, dword [esp + 0x20]
mov dword [esp + 0x30], eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], ecx
cmp byte [esp + 0x11], 0x39
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x28], edi
jg 0x10089ffb
cmp edx, 0x11
jge 0x10089fd0
dec dword [esp + 0x24]
lea eax, [edi + 1]
mov dword [esp + 0x48], eax
movsx eax, byte [edi]
sub eax, 0x30
mulsd xmm1, xmm3
movd xmm0, eax
cvtdq2pd xmm0, xmm0
addsd xmm1, xmm0
comisd xmm1, xmm2
jbe 0x10089fcc
inc edx
mov eax, edi
jmp 0x10089fdb
inc eax
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x30]
mov edi, eax
mov cl, byte [eax + 1]
inc eax
inc edi
mov byte [esp + 0x11], cl
mov dword [esp + 0x48], eax
cmp cl, 0x30
mov ecx, dword [esp + 0x14]
mov eax, edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x28], edi
jge 0x10089f90
mov eax, dword [esp + 0x28]
xor edi, edi
cmp byte [eax], 0x65
jne 0x1008a029
mov dl, byte [esp + 0x10]
lea edi, [eax + 1]
mov eax, dword [esp + 0x18]
jmp 0x1008a04d
sub edi, dword [esp + 0x34]
mov eax, 0xe
mov ecx, dword [esp + 0x2c]
jmp 0x1008a469
mov eax, edi
jmp 0x10089fff
cmp byte [eax], 0x45
mov dword [esp + 0x14], ecx
jne 0x1008a21b
mov dl, byte [esp + 0x10]
lea edi, [eax + 1]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], eax
mov byte [esp + 0x10], dl
cmp byte [esp + 0xf], 0
mov dword [esp + 0x48], edi
jne 0x1008a073
test dl, dl
je 0x1008a060
mov eax, esi
jmp 0x1008a062
xor ecx, ecx
mov edx, ecx
mov ecx, eax
call fcn.101781d0
movaps xmm1, xmm0
mov byte [esp + 0xf], 1
mov cl, byte [edi]
xor dl, dl
cmp cl, 0x2b
je 0x1008a083
cmp cl, 0x2d
jne 0x1008a08b
mov dl, 1
mov cl, byte [edi + 1]
inc edi
mov dword [esp + 0x48], edi
mov al, cl
sub al, 0x30
cmp al, 9
ja 0x1008a204
mov al, byte [edi + 1]
lea esi, [edi + 1]
movsx edi, cl
sub edi, 0x30
mov dword [esp + 0x48], esi
mov byte [esp + 0x13], al
test dl, dl
je 0x1008a1b6
mov ecx, dword [esp + 0x24]
mov eax, 0x66666667
lea ecx, [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 + 0x13]
cmp al, 0x30
jl 0x1008a122
nop word [eax + eax]
cmp al, 0x39
ja 0x1008a122
movsx eax, byte [esi]
lea edi, [edi + edi*4]
lea edi, [edi - 0x18]
lea edx, [esi + 1]
mov dword [esp + 0x48], edx
mov esi, edx
lea edi, [eax + edi*2]
cmp edi, dword [esp + 0x38]
jle 0x1008a11c
mov al, byte [edx]
cmp al, 0x30
jl 0x1008a11c
mov ecx, edx
cmp al, 0x39
ja 0x1008a118
lea esi, [ecx + 1]
mov edx, esi
mov ecx, esi
mov al, byte [edx]
cmp al, 0x30
jge 0x1008a107
mov dword [esp + 0x48], edx
mov al, byte [edx]
cmp al, 0x30
jge 0x1008a0e0
neg edi
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
cmp byte [esp + 0xf], 0
je 0x1008a28f
lea eax, [edi + edx]
cmp eax, 0xfffffecc
jge 0x1008a247
mulsd xmm1, qword [0x10209120]
add eax, 0x134
cmp eax, 0xfffffecc
jge 0x1008a234
xorps xmm0, xmm0
cmp byte [esp + 0x12], 0
je 0x1008a172
xorps xmm0, xmmword [0x10209850]
mov esi, dword [ebp + 0xc]
movsd qword [esp + 0x40], xmm0
mov eax, dword [esi + 0x28]
sub eax, dword [esi + 0x24]
cmp eax, 0x10
jge 0x1008a18f
push ecx
lea ecx, [esi + 0x18]
call fcn.1008a650
mov ecx, dword [esi + 0x24]
xorps xmm0, xmm0
movsd xmm2, qword [esp + 0x40]
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
jmp 0x1008a483
mov edx, dword [esp + 0x24]
mov ecx, 0x134
sub ecx, edx
mov dword [esp + 0x38], ecx
cmp al, 0x30
jl 0x1008a128
nop dword [eax]
cmp al, 0x39
ja 0x1008a124
movsx eax, byte [esi]
lea edi, [edi + edi*4]
lea edi, [edi - 0x18]
lea edx, [esi + 1]
mov dword [esp + 0x48], edx
lea edi, [eax + edi*2]
cmp edi, dword [esp + 0x38]
jg 0x1008a278
cmp byte [edx], 0x30
mov esi, edx
jl 0x1008a124
mov al, byte [edx]
jmp 0x1008a1d0
mov eax, dword [esp + 0x2c]
sub edi, dword [esp + 0x34]
mov dword [eax + 0x18], 0xf
mov dword [eax + 0x1c], edi
jmp 0x1008a483
mov al, byte [esp + 0x10]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x18], ecx
mov byte [esp + 0x10], al
jmp 0x1008a130
shl eax, 3
mov ecx, 0x101fd5d8
sub ecx, eax
movaps xmm0, xmm1
divsd xmm0, qword [ecx]
jmp 0x1008a26a
lea ecx, [eax*8]
movaps xmm0, xmm1
test eax, eax
js 0x1008a25f
mulsd xmm0, qword [ecx + 0x101fd5d8]
jmp 0x1008a26a
mov eax, 0x101fd5d8
sub eax, ecx
divsd xmm0, qword [eax]
comisd xmm0, xmmword [0x10209528]
jbe 0x1008a164
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x40]
mov dword [eax + 0x18], 0xd
mov dword [eax + 0x1c], ecx
jmp 0x1008a483
cmp byte [esp + 0x10], 0
mov eax, dword [ebp + 0xc]
lea edi, [eax + 0x18]
mov dword [esp + 0x40], edi
je 0x1008a3d0
mov ecx, dword [edi + 0x10]
sub ecx, dword [edi + 0xc]
cmp byte [esp + 0x12], 0
je 0x1008a354
mov edi, dword [esp + 0x14]
neg esi
adc edi, 0
neg edi
cmp ecx, 0x10
jge 0x1008a2ce
push ecx
lea ecx, [eax + 0x18]
call fcn.1008a650
mov ecx, dword [esp + 0x40]
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 0x1008a32f
jg 0x1008a2f9
test esi, esi
jb 0x1008a32f
mov eax, 0x196
mov word [edx + 0xe], ax
mov ecx, eax
xor eax, eax
or eax, edi
jne 0x1008a315
mov eax, 0x1d6
mov word [edx + 0xe], ax
mov ecx, eax
and esi, 0x80000000
or esi, edi
jne 0x1008a483
or ecx, 0x20
mov word [edx + 0xe], cx
jmp 0x1008a483
cmp edi, 0xffffffff
jl 0x1008a483
jg 0x1008a346
cmp esi, 0x80000000
jb 0x1008a483
mov eax, 0xb6
mov word [edx + 0xe], ax
jmp 0x1008a483
cmp ecx, 0x10
jge 0x1008a361
push ecx
mov ecx, edi
call fcn.1008a650
mov edx, dword [edi + 0xc]
xorps xmm0, xmm0
mov ecx, dword [esp + 0x14]
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 0x1008a399
jg 0x1008a38e
test esi, esi
jb 0x1008a399
mov eax, 0x196
mov word [edx + 0xe], ax
mov edi, eax
movzx eax, di
mov dword [esp + 0x40], eax
xor eax, eax
or eax, ecx
jne 0x1008a3b2
or edi, 0x40
mov word [edx + 0xe], di
movzx eax, di
jmp 0x1008a3b6
mov eax, dword [esp + 0x40]
and esi, 0x80000000
or esi, ecx
jne 0x1008a483
or eax, 0x20
mov word [edx + 0xe], ax
jmp 0x1008a483
mov eax, dword [edi + 0x10]
sub eax, dword [edi + 0xc]
cmp byte [esp + 0x12], 0
je 0x1008a420
neg ecx
mov dword [esp + 0x18], ecx
cmp eax, 0x10
jge 0x1008a3f0
push ecx
mov ecx, edi
call fcn.1008a650
mov ecx, dword [edi + 0xc]
xorps xmm0, xmm0
mov esi, dword [esp + 0x18]
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 0x1008a483
cmp eax, 0x10
jge 0x1008a42d
push ecx
mov ecx, edi
call fcn.1008a650
mov ecx, dword [edi + 0xc]
xorps xmm0, xmm0
lea eax, [ecx + 0x10]
mov dword [edi + 0xc], eax
mov eax, dword [esp + 0x18]
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 0x1008a483
mov esi, ecx
sub edi, edx
mov eax, 3
mov dword [esp + 0x2c], esi
mov dword [esp + 0x40], ecx
mov esi, 0x18
mov ecx, dword [esp + 0x2c]
lea edx, [esi + 4]
mov dword [ecx + esi], eax
mov ecx, dword [esp + 0x40]
mov dword [edx + ecx], edi
mov ecx, dword [ebp + 8]
movq xmm0, qword [esp + 0x48]
mov eax, dword [esp + 0x34]
pop edi
movq qword [ecx], xmm0
mov dword [ecx + 8], eax
pop esi
mov esp, ebp
pop ebp
ret 8