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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x54
call fcn.00626ba0
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 0x471149
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 0x47117c
cmp eax, 0x18
jne 0x4714f3
test dword [esi + 0xc], 0x100
mov eax, 6
mov dword [ebp - 0xc], 7
mov dword [ebp - 0x1c], eax
je 0x471177
mov ebx, 1
lea edx, [eax + 9]
mov dword [ebp - 0x10], ebx
jmp 0x47117c
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 0x4714f3
xor edx, edx
mov dword [ebp - 0x30], 7
mov dword [ebp - 0x18], edx
nop dword [eax + eax]
test ebx, ebx
jne 0x4711d3
cmp edx, eax
jne 0x4711d3
mov al, byte [esi + ecx]
cmp al, 0x5a
je 0x471381
cmp al, 0x2b
je 0x471381
cmp al, 0x2d
je 0x471381
mov bl, byte [esi + ecx]
mov al, bl
sub al, 0x30
cmp al, 9
ja 0x4714f3
inc esi
movsx eax, bl
mov dword [ebp - 0x28], eax
cmp esi, edi
je 0x4714f3
mov bl, byte [esi + ecx]
mov al, bl
sub al, 0x30
cmp al, 9
ja 0x4714f3
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 0x4714f3
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 + 0x692a40]
jl 0x4714f3
cmp ebx, dword [eax*4 + 0x692a00]
jg 0x4714f3
cmp eax, 6
ja case.default.0x471253
jmp dword [eax*4 + 0x4714fc]
lea eax, [ebx - 0x13]
imul eax, eax, 0x64
mov dword [ebp - 0x40], eax
jmp case.default.0x471253
cmp ecx, 0x17
jne 0x471285
cmp ebx, 0x32
jge 0x47127d
lea eax, [ebx + 0x64]
mov dword [ebp - 0x40], eax
jmp case.default.0x471253
mov dword [ebp - 0x40], ebx
jmp case.default.0x471253
add dword [ebp - 0x40], ebx
jmp case.default.0x471253
lea eax, [ebx - 1]
mov dword [ebp - 0x44], eax
jmp case.default.0x471253
mov ecx, dword [ebp - 0x44]
mov edi, dword [ebp - 0x40]
cmp ecx, 1
jne 0x4712b6
lea ecx, [edi + 0x76c]
call fcn.00471090
mov ecx, dword [ebp - 0x44]
add eax, 0x1c
jmp 0x4712bd
mov eax, dword [ecx*4 + 0x692a90]
cmp ebx, eax
jg 0x4714f3
mov dword [ebp - 0x48], ebx
add edi, 0x76c
add ebx, dword [ecx*4 + 0x6929b4]
lea eax, [ebx - 1]
mov dword [ebp - 0x38], eax
cmp ecx, 2
jl 0x4712f5
mov ecx, edi
call fcn.00471090
dec eax
add eax, ebx
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x44]
add eax, 2
jmp 0x4712f9
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.0x471253
mov dword [ebp - 0x4c], ebx
jmp case.default.0x471253
mov dword [ebp - 0x50], ebx
jmp case.default.0x471253
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 0x4711b0
mov eax, dword [ebp - 0x14]
cmp dword [eax + 4], 0x18
jne 0x4713ce
cmp byte [esi + ecx], 0x2e
jne 0x4713ce
test ebx, ebx
jne 0x4714f3
inc esi
cmp esi, edi
je 0x4714f3
mov edx, esi
jge 0x4714f3
nop dword [eax]
mov al, byte [esi + ecx]
sub al, 0x30
cmp al, 9
ja 0x4713be
inc esi
cmp esi, edi
jl 0x4713b0
cmp edx, esi
je 0x4714f3
cmp esi, edi
je 0x4714f3
mov al, byte [esi + ecx]
mov byte [ebp - 1], al
cmp al, 0x5a
jne 0x4713e1
mov ebx, dword [ebp - 8]
inc esi
jmp 0x4714c7
test ebx, ebx
jne 0x4714f3
cmp al, 0x2b
je 0x4713f5
cmp al, 0x2d
jne 0x4714f3
inc esi
xor edi, edi
lea eax, [esi + 4]
cmp eax, dword [ebp - 8]
jne 0x4714f3
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 0x4714f3
movsx eax, ah
mov dword [ebp - 0x30], eax
mov ah, byte [esi + ecx + 1]
mov al, ah
sub al, 0x30
cmp al, 9
ja 0x4714f3
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 + 0x692a40]
jl 0x4714f3
cmp ecx, dword [eax + 0x692a00]
jg 0x4714f3
cmp dword [ebp - 0x24], 0
je 0x471496
mov eax, dword [ebp - 0xc]
cmp edx, eax
jne 0x471487
imul edi, ecx, 0xe10
jmp 0x471496
inc eax
cmp edx, eax
jne 0x471496
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 0x471410
test edi, edi
je 0x4714c7
mov eax, edi
lea ecx, [ebp - 0x54]
neg eax
cmp byte [ebp - 1], 0x2d
cmove eax, edi
xor edx, edx
push eax
call fcn.0048b870
add esp, 4
test eax, eax
je 0x4714f3
cmp esi, ebx
jne 0x4714f3
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x4714e7
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