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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1000805d
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x1000d040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edx, ecx
mov dword [ebp - 0x34], edx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x14], eax
mov ecx, dword [eax + 4]
mov edi, dword [eax]
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x18], ecx
mov eax, edi
mov dword [ebp - 4], 0
sub eax, ecx
xorps xmm1, xmm1
mov cl, byte [edi]
mov dword [ebp - 0x54], eax
cmp cl, 0x2d
jne 0x100015d8
mov cl, byte [edi + 1]
inc edi
mov byte [ebp - 0x1f], 1
jmp 0x100015dc
mov byte [ebp - 0x1f], 0
xor esi, esi
mov byte [ebp - 0x1e], 0
mov dword [ebp - 0x30], esi
xorps xmm0, xmm0
movlpd qword [ebp - 0x3c], xmm0
mov eax, edi
cmp cl, 0x30
jne 0x10001602
lea edi, [eax + 1]
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x1c], edi
jmp 0x100016c9
cmp cl, 0x31
jl 0x10001d5f
cmp cl, 0x39
jg 0x10001d5f
lea edi, [eax + 1]
movsx ecx, cl
mov al, byte [edi]
sub ecx, 0x30
cmp byte [ebp - 0x1f], 0
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x48], ecx
je 0x10001682
cmp al, 0x30
jl 0x100016c9
mov edx, edi
mov dword [ebp - 0x24], edi
cmp al, 0x39
ja 0x100016c9
cmp ecx, 0xccccccc
jb 0x10001651
jne 0x10001677
mov edx, dword [ebp - 0x24]
cmp al, 0x38
ja 0x10001677
movsx eax, byte [edx]
lea ecx, [ecx + ecx*4]
lea edi, [edx + 1]
inc esi
lea ecx, [ecx - 0x18]
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x30], esi
mov edx, edi
lea ecx, [eax + ecx*2]
mov dword [ebp - 0x24], edi
mov al, byte [edi]
mov dword [ebp - 0x48], ecx
cmp al, 0x30
jge 0x10001638
jmp 0x100016c9
mov dl, 1
mov esi, ecx
xor ecx, ecx
mov byte [ebp - 0x1e], dl
jmp 0x100016d2
cmp al, 0x30
jl 0x100016c9
mov al, byte [edi]
mov edx, edi
mov dword [ebp - 0x24], edi
nop dword [eax]
cmp al, 0x39
jg 0x100016c9
cmp ecx, 0x19999999
jb 0x100016a5
jne 0x10001677
mov edx, dword [ebp - 0x24]
cmp al, 0x35
jg 0x10001677
movsx eax, byte [edx]
lea ecx, [ecx + ecx*4]
lea edi, [edx + 1]
inc esi
lea ecx, [ecx - 0x18]
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x30], esi
mov edx, edi
lea ecx, [eax + ecx*2]
mov dword [ebp - 0x24], edi
mov al, byte [edi]
mov dword [ebp - 0x48], ecx
cmp al, 0x30
jge 0x10001690
mov esi, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x38]
mov dl, byte [ebp - 0x1e]
xor ah, ah
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], ecx
mov byte [ebp - 0x1d], ah
test dl, dl
je 0x10001809
mov al, byte [edi]
cmp byte [ebp - 0x1f], ah
je 0x1000178b
cmp al, 0x30
jl 0x10001809
mov edx, edi
mov dword [ebp - 0x24], edx
nop dword [eax]
cmp al, 0x39
ja 0x10001803
cmp ecx, 0xccccccc
jb 0x10001731
ja 0x1000171a
cmp esi, 0xcccccccc
jb 0x10001731
cmp esi, 0xcccccccc
jne 0x10001778
cmp ecx, 0xccccccc
jne 0x10001778
mov edx, dword [ebp - 0x24]
cmp al, 0x38
ja 0x10001778
mov eax, dword [ebp - 0x2c]
lea edi, [edx + 1]
movsx esi, byte [edx]
xor edx, edx
shld ecx, eax, 2
sub esi, 0x30
mov dword [ebp - 0x1c], edi
shl eax, 2
add dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
adc dword [ebp - 0x28], ecx
mov ecx, dword [ebp - 0x28]
shld ecx, eax, 1
mov dword [ebp - 0x24], edi
add eax, eax
add esi, eax
mov al, byte [edi]
mov dword [ebp - 0x2c], esi
adc ecx, edx
inc dword [ebp - 0x30]
mov dword [ebp - 0x28], ecx
mov edx, edi
cmp al, 0x30
jge 0x10001700
jmp 0x10001803
mov edx, ecx
mov ecx, esi
call fcn.10007670
mov ah, 1
movaps xmm1, xmm0
mov byte [ebp - 0x1d], ah
jmp 0x10001806
cmp al, 0x30
jl 0x10001809
mov edx, edi
mov dword [ebp - 0x24], edx
cmp al, 0x39
ja 0x10001803
cmp ecx, 0x19999999
jb 0x100017c1
ja 0x100017aa
cmp esi, 0x99999999
jb 0x100017c1
cmp esi, 0x99999999
jne 0x10001778
cmp ecx, 0x19999999
jne 0x10001778
mov edx, dword [ebp - 0x24]
cmp al, 0x35
ja 0x10001778
mov eax, dword [ebp - 0x2c]
lea edi, [edx + 1]
movsx esi, byte [edx]
xor edx, edx
shld ecx, eax, 2
sub esi, 0x30
mov dword [ebp - 0x1c], edi
shl eax, 2
add dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
adc dword [ebp - 0x28], ecx
mov ecx, dword [ebp - 0x28]
shld ecx, eax, 1
mov dword [ebp - 0x24], edi
add eax, eax
add esi, eax
mov al, byte [edi]
mov dword [ebp - 0x2c], esi
adc ecx, edx
inc dword [ebp - 0x30]
mov dword [ebp - 0x28], ecx
mov edx, edi
cmp al, 0x30
jge 0x10001794
mov ah, byte [ebp - 0x1d]
mov dl, byte [ebp - 0x1e]
movsd xmm2, qword [0x1000a318]
test ah, ah
je 0x10001848
mov al, byte [edi]
cmp al, 0x30
jl 0x10001848
mov ecx, edi
nop dword [eax]
cmp al, 0x39
ja 0x10001848
movsx eax, byte [ecx]
lea edi, [ecx + 1]
sub eax, 0x30
mulsd xmm1, xmm2
mov dword [ebp - 0x1c], edi
mov ecx, edi
movd xmm0, eax
mov al, byte [edi]
cvtdq2pd xmm0, xmm0
addsd xmm1, xmm0
cmp al, 0x30
jge 0x10001820
mov cl, byte [edi]
mov dword [ebp - 0x4c], 0
cmp cl, 0x2e
jne 0x10001861
inc edi
mov eax, edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x24], eax
jmp 0x10001866
mov eax, edi
mov dword [ebp - 0x24], edi
cmp cl, 0x2e
jne 0x10001935
mov cl, byte [eax]
cmp cl, 0x30
jl 0x10001925
cmp cl, 0x39
jg 0x10001925
mov cl, byte [ebp - 0x1d]
test cl, cl
jne 0x100018bd
test dl, dl
je 0x10001895
mov edx, dword [ebp - 0x28]
mov ecx, esi
jmp 0x1000189a
mov ecx, dword [ebp - 0x48]
xor edx, edx
call fcn.10007670
mov eax, dword [ebp - 0x24]
movaps xmm1, xmm0
movsd xmm2, qword [0x1000a318]
mov ecx, eax
mov dl, byte [edi]
xorps xmm3, xmm3
mov byte [ebp - 0x1d], 1
mov dword [ebp - 0x24], eax
jmp 0x100018d3
mov dl, byte [edi]
xorps xmm3, xmm3
mov byte [ebp - 0x1d], cl
mov ecx, eax
mov dword [ebp - 0x24], eax
jmp 0x100018d3
mov eax, dword [ebp - 0x38]
cmp dl, 0x39
jg 0x10001938
mov edx, dword [ebp - 0x30]
cmp edx, 0x11
jge 0x1000190b
movsx eax, byte [ecx]
lea edi, [ecx + 1]
dec dword [ebp - 0x4c]
sub eax, 0x30
mulsd xmm1, xmm2
mov dword [ebp - 0x1c], edi
movd xmm0, eax
cvtdq2pd xmm0, xmm0
addsd xmm1, xmm0
comisd xmm1, xmm3
jbe 0x10001912
inc edx
mov dword [ebp - 0x30], edx
jmp 0x10001912
mov edi, dword [ebp - 0x24]
inc edi
mov dword [ebp - 0x1c], edi
mov dl, byte [edi]
mov eax, edi
mov ecx, eax
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x38], ecx
cmp dl, 0x30
jge 0x100018d0
jmp 0x10001938
mov ecx, dword [ebp - 0x34]
mov edx, 0xe
add ecx, 0x18
jmp 0x10001d67
mov eax, dword [ebp - 0x24]
xor ecx, ecx
cmp byte [eax], 0x65
jne 0x10001949
lea edi, [eax + 1]
mov eax, edi
mov dword [ebp - 0x24], eax
jmp 0x1000195a
cmp byte [eax], 0x45
jne 0x10001a3d
lea edi, [eax + 1]
mov eax, edi
mov dword [ebp - 0x24], edi
cmp byte [ebp - 0x1d], cl
jne 0x1000197c
cmp byte [ebp - 0x1e], cl
je 0x1000196b
mov edx, dword [ebp - 0x28]
mov ecx, esi
jmp 0x10001970
mov ecx, dword [ebp - 0x48]
xor edx, edx
call fcn.10007670
movaps xmm1, xmm0
mov byte [ebp - 0x1d], 1
mov ecx, dword [ebp - 0x24]
xor ah, ah
mov dl, byte [ecx]
cmp dl, 0x2b
je 0x1000198f
cmp dl, 0x2d
jne 0x10001997
mov ah, 1
mov dl, byte [ecx + 1]
lea edi, [ecx + 1]
mov ecx, edi
mov al, dl
sub al, 0x30
cmp al, 9
ja 0x10001b1f
lea edi, [ecx + 1]
movsx ecx, dl
mov dl, byte [edi]
sub ecx, 0x30
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x24], ecx
mov byte [ebp - 0x41], dl
test ah, ah
je 0x10001ac2
mov ecx, dword [ebp - 0x4c]
mov eax, 0x66666667
lea ecx, [ecx + 0x7ffffff7]
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp byte [ebp - 0x41], 0x30
mov dword [ebp - 0x38], eax
jl 0x10001a38
mov al, byte [edi]
mov edx, edi
cmp al, 0x39
jg 0x10001a35
mov eax, dword [ebp - 0x24]
lea edi, [edx + 1]
mov dword [ebp - 0x1c], edi
lea ecx, [eax + eax*4]
movsx eax, byte [edx]
mov edx, edi
lea eax, [eax + ecx*2]
add eax, 0xffffffd0
mov dword [ebp - 0x24], eax
cmp eax, dword [ebp - 0x38]
jle 0x10001a2f
mov al, byte [edi]
cmp al, 0x30
jl 0x10001a2f
mov ecx, edi
mov dword [ebp - 0x30], edi
mov esi, edi
mov edx, ecx
cmp al, 0x39
ja 0x10001a2f
mov al, byte [esi + 1]
lea edi, [esi + 1]
mov dword [ebp - 0x1c], edi
mov ecx, edi
mov edx, edi
mov esi, edi
cmp al, 0x30
jge 0x10001a16
mov al, byte [edi]
cmp al, 0x30
jge 0x100019e6
mov esi, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x24]
neg ecx
cmp byte [ebp - 0x1d], 0
je 0x10001b8d
mov eax, dword [ebp - 0x4c]
add eax, ecx
cmp eax, 0xfffffecc
jge 0x10001b47
mulsd xmm1, qword [0x1000a310]
add eax, 0x134
cmp eax, 0xfffffecc
jge 0x10001b34
xorps xmm0, xmm0
cmp byte [ebp - 0x1f], 0
je 0x10001a7f
xorps xmm0, xmmword [0x1000a3b0]
mov esi, dword [ebp - 0x40]
movsd qword [ebp - 0x3c], xmm0
mov eax, dword [esi + 0x28]
sub eax, dword [esi + 0x24]
cmp eax, 0x10
jge 0x10001a9c
push 1
lea ecx, [esi + 0x18]
call fcn.10001370
mov ecx, dword [esi + 0x24]
xorps xmm0, xmm0
movsd xmm3, qword [ebp - 0x3c]
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 0x10001d82
mov eax, 0x134
sub eax, dword [ebp - 0x4c]
mov dword [ebp - 0x38], eax
cmp dl, 0x30
jl 0x10001a3d
mov al, byte [edi]
mov edx, edi
nop word [eax + eax]
cmp al, 0x39
jg 0x10001a3d
movsx eax, byte [edx]
lea ecx, [ecx + ecx*4]
lea ecx, [ecx - 0x18]
lea edi, [edx + 1]
mov dword [ebp - 0x1c], edi
lea ecx, [eax + ecx*2]
cmp ecx, dword [ebp - 0x38]
jg 0x10001b0c
mov al, byte [edi]
mov edx, edi
cmp al, 0x30
jge 0x10001ae0
jmp 0x10001a3d
mov ecx, dword [ebp - 0x34]
mov edx, 0xd
add ecx, 0x18
lea eax, [ecx + 4]
jmp 0x10001d7b
mov edx, dword [ebp - 0x34]
sub ecx, dword [ebp - 0x50]
mov dword [edx + 0x18], 0xf
mov dword [edx + 0x1c], ecx
jmp 0x10001d82
shl eax, 3
mov ecx, 0x10009860
sub ecx, eax
movaps xmm0, xmm1
divsd xmm0, qword [ecx]
jmp 0x10001b6a
lea ecx, [eax*8]
movaps xmm0, xmm1
test eax, eax
js 0x10001b5f
mulsd xmm0, qword [ecx + 0x10009860]
jmp 0x10001b6a
mov eax, 0x10009860
sub eax, ecx
divsd xmm0, qword [eax]
comisd xmm0, xmmword [0x1000a320]
jbe 0x10001a72
mov edx, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x54]
mov dword [edx + 0x18], 0xd
mov dword [edx + 0x1c], ecx
jmp 0x10001d82
mov edx, dword [ebp - 0x40]
add edx, 0x18
cmp byte [ebp - 0x1e], 0
mov dword [ebp - 0x34], edx
mov eax, dword [edx + 0x10]
je 0x10001cd5
cmp byte [ebp - 0x1f], 0
je 0x10001c4a
mov ecx, dword [ebp - 0x28]
neg esi
adc ecx, 0
sub eax, dword [edx + 0xc]
neg ecx
mov dword [ebp - 0x28], ecx
cmp eax, 0x10
jge 0x10001bd1
push 1
mov ecx, edx
call fcn.10001370
mov edx, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x28]
mov eax, dword [edx + 0xc]
xorps xmm0, xmm0
mov dword [ebp - 0x38], eax
add eax, 0x10
mov dword [edx + 0xc], eax
mov eax, 0x96
mov edx, dword [ebp - 0x38]
movups xmmword [edx], xmm0
mov dword [edx], esi
mov dword [edx + 4], ecx
mov word [edx + 0xe], ax
test ecx, ecx
jl 0x10001c25
jg 0x10001bfe
test esi, esi
jb 0x10001c25
mov eax, 0x196
mov word [edx + 0xe], ax
xor eax, eax
or eax, ecx
jne 0x10001c1b
mov eax, 0x1d6
mov word [edx + 0xe], ax
jmp 0x10001cbb
mov eax, 0x196
jmp 0x10001cbb
cmp ecx, 0xffffffff
jl 0x10001d82
jg 0x10001c3c
cmp esi, 0x80000000
jb 0x10001d82
mov eax, 0xb6
mov word [edx + 0xe], ax
jmp 0x10001d82
sub eax, dword [edx + 0xc]
cmp eax, 0x10
jge 0x10001c5e
push 1
mov ecx, edx
call fcn.10001370
mov edx, dword [ebp - 0x34]
mov eax, dword [edx + 0xc]
xorps xmm0, xmm0
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x38], eax
add eax, 0x10
mov dword [edx + 0xc], eax
mov eax, 0x116
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x40], eax
movups xmmword [edx], xmm0
mov dword [edx], esi
mov dword [edx + 4], ecx
mov word [edx + 0xe], ax
test ecx, ecx
jl 0x10001c9d
jg 0x10001c91
test esi, esi
jb 0x10001c9d
mov eax, 0x196
mov word [edx + 0xe], ax
mov dword [ebp - 0x40], eax
movzx eax, ax
mov dword [ebp - 0x38], eax
xor eax, eax
or eax, ecx
jne 0x10001cb8
mov eax, dword [ebp - 0x40]
or eax, 0x40
mov word [edx + 0xe], ax
movzx eax, ax
jmp 0x10001cbb
mov eax, dword [ebp - 0x38]
and esi, 0x80000000
or esi, ecx
jne 0x10001d82
or eax, 0x20
mov word [edx + 0xe], ax
jmp 0x10001d82
sub eax, dword [edx + 0xc]
cmp byte [ebp - 0x1f], 0
je 0x10001d20
mov esi, dword [ebp - 0x48]
neg esi
cmp eax, 0x10
jge 0x10001cf4
push 1
mov ecx, edx
call fcn.10001370
mov edx, dword [ebp - 0x34]
mov ecx, dword [edx + 0xc]
xorps xmm0, xmm0
test esi, esi
lea eax, [ecx + 0x10]
mov dword [edx + 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 0x10001d82
cmp eax, 0x10
jge 0x10001d31
push 1
mov ecx, edx
call fcn.10001370
mov edx, dword [ebp - 0x34]
mov ecx, dword [edx + 0xc]
xorps xmm0, xmm0
lea eax, [ecx + 0x10]
mov dword [edx + 0xc], eax
mov eax, dword [ebp - 0x48]
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 0x10001d82
lea ecx, [edx + 0x18]
mov edx, 3
sub eax, dword [ebp - 0x50]
mov esi, ecx
mov dword [ebp - 0x40], 4
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x40]
add eax, esi
mov dword [ecx], edx
mov ecx, dword [ebp - 0x54]
mov dword [eax], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x50]
mov dword [eax], edi
mov dword [eax + 4], ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10007490
mov esp, ebp
pop ebp
ret 8