Function at 0x1009dd20
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 0x1009dd63
inc edi
mov byte [esp + 0x12], 1
mov dword [esp + 0x48], edi
jmp 0x1009dd68
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 0x1009dda8
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 0x1009e149
cmp al, 0x31
jl 0x1009e69c
cmp al, 0x39
jg 0x1009e69c
mov cl, byte [edi + 1]
lea edx, [edi + 1]
movsx eax, al
sub eax, 0x30
cmp byte [esp + 0x12], 0
je 0x1009de2d
cmp cl, 0x30
jl 0x1009de6c
mov edi, edx
mov dword [esp + 0x30], edx
nop word [eax + eax]
cmp cl, 0x39
ja 0x1009de6c
cmp eax, 0xccccccc
jb 0x1009ddfb
jne 0x1009de1a
mov edi, dword [esp + 0x30]
cmp cl, 0x38
ja 0x1009de1a
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 0x1009dde0
jmp 0x1009de6c
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], 0
mov byte [esp + 0x10], 1
jmp 0x1009de7c
cmp cl, 0x30
jl 0x1009de6c
mov edi, edx
mov dword [esp + 0x30], edx
cmp cl, 0x39
ja 0x1009de6c
cmp eax, 0x19999999
jb 0x1009de4f
jne 0x1009de1a
mov edi, dword [esp + 0x30]
cmp cl, 0x35
ja 0x1009de1a
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 0x1009de38
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 0x1009e141
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 0x1009e003
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 0x1009dfd4
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 0x1009dfd8
cmp ecx, 0xccccccc
jb 0x1009df74
ja 0x1009df5c
cmp esi, 0xcccccccc
jb 0x1009df74
cmp esi, 0xcccccccc
jne 0x1009dfc0
cmp ecx, 0xccccccc
jne 0x1009dfc0
mov edx, dword [esp + 0x38]
cmp al, 0x38
ja 0x1009dfc0
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 0x1009df40
xor ah, ah
jmp 0x1009dfd8
mov edx, ecx
mov ecx, esi
call fcn.101851f0
mov ecx, dword [esp + 0x14]
movaps xmm1, xmm0
mov ah, 1
jmp 0x1009dfd8
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 0x1009e141
jmp 0x1009e108
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 0x1009e141
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 0x1009e145
mov byte [esp + 0xf], ah
cmp ecx, 0x19999999
jb 0x1009e0a1
ja 0x1009e084
cmp esi, 0x99999999
jb 0x1009e0a1
cmp esi, 0x99999999
jne 0x1009e0f3
cmp ecx, 0x19999999
jne 0x1009e0f3
mov edx, dword [esp + 0x38]
mov byte [esp + 0xf], 0
cmp al, 0x35
ja 0x1009e0f3
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 0x1009e060
jmp 0x1009e141
mov edx, ecx
mov ecx, esi
call fcn.101851f0
mov ecx, dword [esp + 0x14]
movaps xmm1, xmm0
mov byte [esp + 0xf], 1
mov al, byte [edi]
cmp al, 0x30
jl 0x1009e141
movsd xmm2, qword [0x1022fa58]
mov edx, edi
cmp al, 0x39
ja 0x1009e141
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 0x1009e118
mov ah, byte [esp + 0xf]
mov edx, dword [esp + 0x18]
cmp byte [edi], 0x2e
mov dword [esp + 0x24], 0
jne 0x1009e265
mov al, byte [edi + 1]
inc edi
mov dword [esp + 0x48], edi
mov byte [esp + 0xf], ah
cmp al, 0x30
jl 0x1009e253
cmp al, 0x39
jg 0x1009e253
test ah, ah
jne 0x1009e19d
cmp byte [esp + 0x10], ah
je 0x1009e184
mov eax, esi
jmp 0x1009e188
mov eax, edx
xor ecx, ecx
mov edx, ecx
mov ecx, eax
call fcn.101851f0
mov ecx, dword [esp + 0x14]
movaps xmm1, xmm0
mov byte [esp + 0xf], 1
mov dl, byte [edi]
mov eax, edi
movsd xmm3, qword [0x1022fa58]
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 0x1009e23b
cmp edx, 0x11
jge 0x1009e210
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 0x1009e20c
inc edx
mov eax, edi
jmp 0x1009e21b
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 0x1009e1d0
mov eax, dword [esp + 0x28]
xor edi, edi
cmp byte [eax], 0x65
jne 0x1009e269
mov dl, byte [esp + 0x10]
lea edi, [eax + 1]
mov eax, dword [esp + 0x18]
jmp 0x1009e28d
sub edi, dword [esp + 0x34]
mov eax, 0xe
mov ecx, dword [esp + 0x2c]
jmp 0x1009e6a9
mov eax, edi
jmp 0x1009e23f
cmp byte [eax], 0x45
mov dword [esp + 0x14], ecx
jne 0x1009e45b
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 0x1009e2b3
test dl, dl
je 0x1009e2a0
mov eax, esi
jmp 0x1009e2a2
xor ecx, ecx
mov edx, ecx
mov ecx, eax
call fcn.101851f0
movaps xmm1, xmm0
mov byte [esp + 0xf], 1
mov cl, byte [edi]
xor dl, dl
cmp cl, 0x2b
je 0x1009e2c3
cmp cl, 0x2d
jne 0x1009e2cb
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 0x1009e444
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 0x1009e3f6
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 0x1009e362
nop word [eax + eax]
cmp al, 0x39
ja 0x1009e362
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 0x1009e35c
mov al, byte [edx]
cmp al, 0x30
jl 0x1009e35c
mov ecx, edx
cmp al, 0x39
ja 0x1009e358
lea esi, [ecx + 1]
mov edx, esi
mov ecx, esi
mov al, byte [edx]
cmp al, 0x30
jge 0x1009e347
mov dword [esp + 0x48], edx
mov al, byte [edx]
cmp al, 0x30
jge 0x1009e320
neg edi
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
cmp byte [esp + 0xf], 0
je 0x1009e4cf
lea eax, [edi + edx]
cmp eax, 0xfffffecc
jge 0x1009e487
mulsd xmm1, qword [0x1022f868]
add eax, 0x134
cmp eax, 0xfffffecc
jge 0x1009e474
xorps xmm0, xmm0
cmp byte [esp + 0x12], 0
je 0x1009e3b2
xorps xmm0, xmmword [0x1022fed0]
mov esi, dword [ebp + 0xc]
movsd qword [esp + 0x40], xmm0
mov eax, dword [esi + 0x28]
sub eax, dword [esi + 0x24]
cmp eax, 0x10
jge 0x1009e3cf
push ecx
lea ecx, [esi + 0x18]
call fcn.1009e890
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 0x1009e6c3
mov edx, dword [esp + 0x24]
mov ecx, 0x134
sub ecx, edx
mov dword [esp + 0x38], ecx
cmp al, 0x30
jl 0x1009e368
nop dword [eax]
cmp al, 0x39
ja 0x1009e364
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 0x1009e4b8
cmp byte [edx], 0x30
mov esi, edx
jl 0x1009e364
mov al, byte [edx]
jmp 0x1009e410
mov eax, dword [esp + 0x2c]
sub edi, dword [esp + 0x34]
mov dword [eax + 0x18], 0xf
mov dword [eax + 0x1c], edi
jmp 0x1009e6c3
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 0x1009e370
shl eax, 3
mov ecx, 0x102236a0
sub ecx, eax
movaps xmm0, xmm1
divsd xmm0, qword [ecx]
jmp 0x1009e4aa
lea ecx, [eax*8]
movaps xmm0, xmm1
test eax, eax
js 0x1009e49f
mulsd xmm0, qword [ecx + 0x102236a0]
jmp 0x1009e4aa
mov eax, 0x102236a0
sub eax, ecx
divsd xmm0, qword [eax]
comisd xmm0, xmmword [0x1022fc28]
jbe 0x1009e3a4
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x40]
mov dword [eax + 0x18], 0xd
mov dword [eax + 0x1c], ecx
jmp 0x1009e6c3
cmp byte [esp + 0x10], 0
mov eax, dword [ebp + 0xc]
lea edi, [eax + 0x18]
mov dword [esp + 0x40], edi
je 0x1009e610
mov ecx, dword [edi + 0x10]
sub ecx, dword [edi + 0xc]
cmp byte [esp + 0x12], 0
je 0x1009e594
mov edi, dword [esp + 0x14]
neg esi
adc edi, 0
neg edi
cmp ecx, 0x10
jge 0x1009e50e
push ecx
lea ecx, [eax + 0x18]
call fcn.1009e890
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 0x1009e56f
jg 0x1009e539
test esi, esi
jb 0x1009e56f
mov eax, 0x196
mov word [edx + 0xe], ax
mov ecx, eax
xor eax, eax
or eax, edi
jne 0x1009e555
mov eax, 0x1d6
mov word [edx + 0xe], ax
mov ecx, eax
and esi, 0x80000000
or esi, edi
jne 0x1009e6c3
or ecx, 0x20
mov word [edx + 0xe], cx
jmp 0x1009e6c3
cmp edi, 0xffffffff
jl 0x1009e6c3
jg 0x1009e586
cmp esi, 0x80000000
jb 0x1009e6c3
mov eax, 0xb6
mov word [edx + 0xe], ax
jmp 0x1009e6c3
cmp ecx, 0x10
jge 0x1009e5a1
push ecx
mov ecx, edi
call fcn.1009e890
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 0x1009e5d9
jg 0x1009e5ce
test esi, esi
jb 0x1009e5d9
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 0x1009e5f2
or edi, 0x40
mov word [edx + 0xe], di
movzx eax, di
jmp 0x1009e5f6
mov eax, dword [esp + 0x40]
and esi, 0x80000000
or esi, ecx
jne 0x1009e6c3
or eax, 0x20
mov word [edx + 0xe], ax
jmp 0x1009e6c3
mov eax, dword [edi + 0x10]
sub eax, dword [edi + 0xc]
cmp byte [esp + 0x12], 0
je 0x1009e660
neg ecx
mov dword [esp + 0x18], ecx
cmp eax, 0x10
jge 0x1009e630
push ecx
mov ecx, edi
call fcn.1009e890
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 0x1009e6c3
cmp eax, 0x10
jge 0x1009e66d
push ecx
mov ecx, edi
call fcn.1009e890
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 0x1009e6c3
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