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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x54
call fcn.00663af0
push ebx
push esi
mov esi, edx
mov dword [ebp - 0x24], ecx
xor ebx, ebx
mov dword [ebp - 0x14], esi
push edi
mov dword [ebp - 0x10], ebx
mov eax, dword [esi + 4]
mov dword [ebp - 0xc], 6
mov dword [ebp - 0x1c], 5
cmp eax, 0x17
jne 0x471339
mov eax, dword [esi + 0xc]
mov edx, ebx
and eax, 0x100
setne dl
test eax, 0x100
mov eax, 5
setne bl
mov dword [ebp - 0x10], ebx
lea edx, [edx*2 + 0xb]
jmp 0x47136c
cmp eax, 0x18
jne 0x4716e3
test dword [esi + 0xc], 0x100
mov eax, 6
mov dword [ebp - 0xc], 7
mov dword [ebp - 0x1c], eax
je 0x471367
mov ebx, 1
lea edx, [eax + 9]
mov dword [ebp - 0x10], ebx
jmp 0x47136c
mov edx, 0xd
mov edi, dword [esi]
xorps xmm0, xmm0
mov ecx, dword [esi + 8]
xor esi, esi
mov dword [ebp - 8], edi
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x34], esi
movups xmmword [ebp - 0x54], xmm0
movups xmmword [ebp - 0x44], xmm0
cmp edi, edx
jl 0x4716e3
xor edx, edx
mov dword [ebp - 0x30], 7
mov dword [ebp - 0x18], edx
nop dword [eax + eax]
test ebx, ebx
jne 0x4713c3
cmp edx, eax
jne 0x4713c3
mov al, byte [esi + ecx]
cmp al, 0x5a
je 0x471571
cmp al, 0x2b
je 0x471571
cmp al, 0x2d
je 0x471571
mov bl, byte [esi + ecx]
mov al, bl
sub al, 0x30
cmp al, 9
ja 0x4716e3
inc esi
movsx eax, bl
mov dword [ebp - 0x28], eax
cmp esi, edi
je 0x4716e3
mov bl, byte [esi + ecx]
mov al, bl
sub al, 0x30
cmp al, 9
ja 0x4716e3
mov eax, dword [ebp - 0x28]
inc esi
lea ecx, [eax + eax*4]
movsx eax, bl
lea ebx, [ecx - 0x108]
lea ebx, [eax + ebx*2]
mov dword [ebp - 0x2c], ebx
cmp esi, edi
je 0x4716e3
mov edi, dword [ebp - 0x14]
lea eax, [edx + 1]
mov ecx, dword [edi + 4]
cmp ecx, 0x17
mov edi, dword [ebp - 8]
cmovne eax, edx
cmp ebx, dword [eax*4 + 0x6d43a0]
jl 0x4716e3
cmp ebx, dword [eax*4 + 0x6d4360]
jg 0x4716e3
cmp eax, 6
ja case.default.0x471443
jmp dword [eax*4 + 0x4716ec]
lea eax, [ebx - 0x13]
imul eax, eax, 0x64
mov dword [ebp - 0x40], eax
jmp case.default.0x471443
cmp ecx, 0x17
jne 0x471475
cmp ebx, 0x32
jge 0x47146d
lea eax, [ebx + 0x64]
mov dword [ebp - 0x40], eax
jmp case.default.0x471443
mov dword [ebp - 0x40], ebx
jmp case.default.0x471443
add dword [ebp - 0x40], ebx
jmp case.default.0x471443
lea eax, [ebx - 1]
mov dword [ebp - 0x44], eax
jmp case.default.0x471443
mov ecx, dword [ebp - 0x44]
mov edi, dword [ebp - 0x40]
cmp ecx, 1
jne 0x4714a6
lea ecx, [edi + 0x76c]
call fcn.00471280
mov ecx, dword [ebp - 0x44]
add eax, 0x1c
jmp 0x4714ad
mov eax, dword [ecx*4 + 0x6d43f0]
cmp ebx, eax
jg 0x4716e3
mov dword [ebp - 0x48], ebx
add edi, 0x76c
add ebx, dword [ecx*4 + 0x6d4314]
lea eax, [ebx - 1]
mov dword [ebp - 0x38], eax
cmp ecx, 2
jl 0x4714e5
mov ecx, edi
call fcn.00471280
dec eax
add eax, ebx
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x44]
add eax, 2
jmp 0x4714e9
dec edi
lea eax, [ecx + 0xe]
imul ecx, eax, 0xd
mov eax, 0x51eb851f
imul edi
sar edx, 5
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
imul eax, ebx, 0xffffff9c
add edi, eax
mov eax, 0x66666667
imul ecx
mov dword [ebp - 0x28], edi
mov eax, ebx
sar edx, 1
mov edi, edx
shr edi, 0x1f
add edi, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
add edi, eax
mov eax, dword [ebp - 0x28]
lea ecx, [eax + ebx*4]
cdq
and edx, 3
add ecx, ebx
add eax, edx
add ecx, edi
sar eax, 2
add eax, ecx
mov edi, dword [ebp - 8]
mov ecx, dword [ebp - 0x2c]
add ecx, 6
add eax, ecx
cdq
idiv dword [ebp - 0x30]
mov dword [ebp - 0x3c], edx
mov edx, dword [ebp - 0x18]
jmp case.default.0x471443
mov dword [ebp - 0x4c], ebx
jmp case.default.0x471443
mov dword [ebp - 0x50], ebx
jmp case.default.0x471443
mov dword [ebp - 0x54], ebx
mov ecx, dword [ebp - 0x20]
inc edx
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x18], edx
cmp edx, dword [ebp - 0xc]
jl 0x4713a0
mov eax, dword [ebp - 0x14]
cmp dword [eax + 4], 0x18
jne 0x4715be
cmp byte [esi + ecx], 0x2e
jne 0x4715be
test ebx, ebx
jne 0x4716e3
inc esi
cmp esi, edi
je 0x4716e3
mov edx, esi
jge 0x4716e3
nop dword [eax]
mov al, byte [esi + ecx]
sub al, 0x30
cmp al, 9
ja 0x4715ae
inc esi
cmp esi, edi
jl 0x4715a0
cmp edx, esi
je 0x4716e3
cmp esi, edi
je 0x4716e3
mov al, byte [esi + ecx]
mov byte [ebp - 1], al
cmp al, 0x5a
jne 0x4715d1
mov ebx, dword [ebp - 8]
inc esi
jmp 0x4716b7
test ebx, ebx
jne 0x4716e3
cmp al, 0x2b
je 0x4715e5
cmp al, 0x2d
jne 0x4716e3
inc esi
xor edi, edi
lea eax, [esi + 4]
cmp eax, dword [ebp - 8]
jne 0x4716e3
mov eax, dword [ebp - 0xc]
mov edx, eax
add eax, 2
mov dword [ebp - 0x2c], eax
nop
mov ah, byte [esi + ecx]
mov al, ah
sub al, 0x30
cmp al, 9
ja 0x4716e3
movsx eax, ah
mov dword [ebp - 0x30], eax
mov ah, byte [esi + ecx + 1]
mov al, ah
sub al, 0x30
cmp al, 9
ja 0x4716e3
mov ecx, dword [ebp - 0x30]
mov ebx, dword [ebp - 0x14]
movsx eax, ah
lea ecx, [ecx + ecx*4]
cmp dword [ebx + 4], 0x17
lea ecx, [ecx - 0x108]
mov ebx, dword [ebp - 8]
lea ecx, [eax + ecx*2]
lea eax, [edx + 1]
cmovne eax, edx
shl eax, 2
cmp ecx, dword [eax + 0x6d43a0]
jl 0x4716e3
cmp ecx, dword [eax + 0x6d4360]
jg 0x4716e3
cmp dword [ebp - 0x24], 0
je 0x471686
mov eax, dword [ebp - 0xc]
cmp edx, eax
jne 0x471677
imul edi, ecx, 0xe10
jmp 0x471686
inc eax
cmp edx, eax
jne 0x471686
mov eax, ecx
shl eax, 4
sub eax, ecx
lea edi, [edi + eax*4]
mov ecx, dword [ebp - 0x20]
inc edx
add esi, 2
cmp edx, dword [ebp - 0x2c]
jl 0x471600
test edi, edi
je 0x4716b7
mov eax, edi
lea ecx, [ebp - 0x54]
neg eax
cmp byte [ebp - 1], 0x2d
cmove eax, edi
xor edx, edx
push eax
call fcn.0048ba30
add esp, 4
test eax, eax
je 0x4716e3
cmp esi, ebx
jne 0x4716e3
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x4716d7
movups xmm0, xmmword [ebp - 0x54]
mov ecx, dword [ebp - 0x34]
movups xmmword [eax], xmm0
movups xmm0, xmmword [ebp - 0x44]
movups xmmword [eax + 0x10], xmm0
mov dword [eax + 0x20], ecx
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret